Skip to content

Commit

Permalink
hydra: 2024-08-20 -> 0-unstable-2024-08-27 (#338097)
Browse files Browse the repository at this point in the history
  • Loading branch information
zowoq committed Aug 29, 2024
2 parents 4a57009 + 747060f commit 18e404b
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 25 deletions.
2 changes: 1 addition & 1 deletion maintainers/scripts/haskell/hydra-report.hs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#! /usr/bin/env nix-shell
#! nix-shell -p "haskellPackages.ghcWithPackages (p: [p.aeson p.req])"
#! nix-shell -p hydra-unstable
#! nix-shell -p hydra
#! nix-shell -i runhaskell

{-
Expand Down
12 changes: 9 additions & 3 deletions nixos/modules/services/continuous-integration/hydra/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ in
'';
};

package = mkPackageOption pkgs "hydra_unstable" { };
package = mkPackageOption pkgs "hydra" { };

hydraURL = mkOption {
type = types.str;
Expand Down Expand Up @@ -466,6 +466,7 @@ in
requires = [ "hydra-init.service" ];
after = [ "hydra-init.service" ];
restartTriggers = [ hydraConf ];
path = [ pkgs.zstd ];
environment = env // {
PGPASSFILE = "${baseDir}/pgpass-queue-runner";
HYDRA_DBI = "${env.HYDRA_DBI};application_name=hydra-notify";
Expand Down Expand Up @@ -500,10 +501,15 @@ in
# logs automatically after a step finishes, but this doesn't work
# if the queue runner is stopped prematurely.
systemd.services.hydra-compress-logs =
{ path = [ pkgs.bzip2 ];
{ path = [ pkgs.bzip2 pkgs.zstd ];
script =
''
find /var/lib/hydra/build-logs -type f -name "*.drv" -mtime +3 -size +0c | xargs -r bzip2 -v -f
set -eou pipefail
compression=$(sed -nr 's/compress_build_logs_compression = ()/\1/p' ${baseDir}/hydra.conf)
if [[ $compression == zstd ]]; then
compression="zstd --rm"
fi
find ${baseDir}/build-logs -type f -name "*.drv" -mtime +3 -size +0c | xargs -r $compression --force --quiet
'';
startAt = "Sun 01:45";
};
Expand Down
2 changes: 1 addition & 1 deletion nixos/tests/hydra/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ let
inherit (import ./common.nix { inherit system; }) baseConfig;

hydraPkgs = {
inherit (pkgs) hydra_unstable;
inherit (pkgs) hydra;
};

makeHydraTest = with pkgs.lib; name: package: makeTest {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{ stdenv
, lib
, fetchpatch2
, nix
, perlPackages
, buildEnv
Expand Down Expand Up @@ -124,27 +123,15 @@ let
in
stdenv.mkDerivation (finalAttrs: {
pname = "hydra";
version = "2024-08-20";
version = "0-unstable-2024-08-27";

src = fetchFromGitHub {
owner = "NixOS";
repo = "hydra";
rev = "4bb2f08be14ff86d57b94b520a6cd2181efaee36";
hash = "sha256-NzsqjLSobba4BJ5FS3vccC9rAH0OE9XI97geGj0KHts=";
rev = "2d79b0a4da9e2a8ff97c1173aa56fe92e1f4629b";
hash = "sha256-ZU8/LzdZ0nbUxVxTsRZyMpTGEtps9oG0Yx2cpS9J8I4=";
};

patches = [
(fetchpatch2 {
url = "https://github.com/NixOS/hydra/commit/916531dc9ccee52e6dab256232933fcf6d198158.patch";
hash = "sha256-JOtlYr+K934UIqHvfLMd/jfRRU+Tci0kvtyhOvlwxEs=";
})
(fetchpatch2 {
name = "CVE-2024-45049.patch";
url = "https://github.com/NixOS/hydra/commit/f73043378907c2c7e44f633ad764c8bdd1c947d5.patch";
hash = "sha256-IS6GCuRLW+ULDD7udpGX2tO85bV2gGOX6DLLw3NTkJU=";
})
];

buildInputs = [
unzip
libpqxx
Expand Down Expand Up @@ -243,7 +230,7 @@ stdenv.mkDerivation (finalAttrs: {

passthru = {
inherit nix perlDeps;
tests.basic = nixosTests.hydra.hydra_unstable;
tests.basic = nixosTests.hydra.hydra;
};

meta = with lib; {
Expand Down
2 changes: 1 addition & 1 deletion pkgs/top-level/aliases.nix
Original file line number Diff line number Diff line change
Expand Up @@ -651,7 +651,7 @@ mapAliases ({
hip-nvidia = throw "'hip-nvidia' has been removed in favor of 'rocmPackages.clr'"; # Added 2023-10-08
hll2390dw-cups = throw "The hll2390dw-cups package was dropped since it was unmaintained."; # Added 2024-06-21
ht-rust = xh; # Added 2021-02-13
hydra-unstable = hydra_unstable; # added 2022-05-10
hydra_unstable = hydra; # Added 2024-08-22
hydron = throw "hydron has been removed as the project has been archived upstream since 2022 and is affected by a severe remote code execution vulnerability";

hyper-haskell = throw "'hyper-haskell' has been removed. reason: has been broken for a long time and depends on an insecure electron version"; # Added 2024-03-14
Expand Down
2 changes: 1 addition & 1 deletion pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -20760,7 +20760,7 @@ with pkgs;

hwloc = callPackage ../development/libraries/hwloc { };

hydra_unstable = callPackage ../development/tools/misc/hydra/unstable.nix { nix = nixVersions.nix_2_22; };
hydra = callPackage ../by-name/hy/hydra/package.nix { nix = nixVersions.nix_2_22; };

hydra-cli = callPackage ../development/tools/misc/hydra-cli { };

Expand Down
2 changes: 1 addition & 1 deletion pkgs/top-level/release-haskell.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
https://hydra.nixos.org/jobset/nixpkgs/haskell-updates.
To debug this expression you can use `hydra-eval-jobs` from
`pkgs.hydra_unstable` which prints the jobset description
`pkgs.hydra` which prints the jobset description
to `stdout`:
$ hydra-eval-jobs -I . pkgs/top-level/release-haskell.nix
Expand Down

0 comments on commit 18e404b

Please sign in to comment.