Move GC roots to /nix/var/nix/gcroots/hydra
[?]
Dec 14, 2015, 12:31 PM
KKHVM4KAM6I5B4KZPIKCEBWRB3LNYCFD7XIH4NCPGLNSMRCGJC6ACDependencies
- [2]
WQXF2T3Dhydra-evaluator: Don't require $HYDRA_CONFIG - [3]
V4R3SIRMhydra-module.nix: Don't use a password - [4]
PMDWFZHWhydra-module.nix: Fix setting the logo - [5]
G2RULGMMhydra-module: add config.extraEnv - [6]
TJK27WSBOpen the DB using Hydra::Model::DB->new - [7]
F5RYSE7Tqualify order by column - [8]
AFTXA575* $HYDRA_DATA environment variable. - [9]
LZO3C2KI* Hack around those SQLite timeouts: just retry the transaction. - [10]
RBGYFVWXuse HYDRA_DATA/hydra.conf as default location for hydra.conf - [11]
A63IHCMX* Register GC roots properly. - [12]
W3HI52QVuse NIX_*_DIR env vars when defined - [13]
2T42QGZD* Register builds as GC roots so they don't get deleted. - [*]
D3MDJONY - [*]
4J33F22Thydra-module.nix: Make it possible to add extra config lines - [*]
2GK5DOU7* Downloading closures. - [*]
AMFMXR52Provide a command ‘hydra-init’ to initialise/upgrade the database
Change contents
- edit in hydra-module.nix at line 147
gcRootsDir = mkOption {type = types.path;default = "/nix/var/nix/gcroots/hydra";description = "Directory that holds Hydra garbage collector roots.";}; - edit in hydra-module.nix at line 198
gc_roots_dir ${cfg.gcRootsDir} - edit in hydra-module.nix at line 240
if [ ! -e ${cfg.gcRootsDir} ]; then# Move legacy roots directory.if [ -e /nix/var/nix/gcroots/per-user/hydra/hydra-roots ]; thenmv /nix/var/nix/gcroots/per-user/hydra/hydra-roots ${cfg.gcRootsDir}fimkdir -p ${cfg.gcRootsDir}fi# Move legacy hydra-www roots.if [ -e /nix/var/nix/gcroots/per-user/hydra-www/hydra-roots ]; thenfind /nix/var/nix/gcroots/per-user/hydra-www/hydra-roots/ -type f \| xargs -r mv -f -t ${cfg.gcRootsDir}/rmdir /nix/var/nix/gcroots/per-user/hydra-www/hydra-rootsfichown hydra.hydra ${cfg.gcRootsDir}chmod 2775 ${cfg.gcRootsDir} - edit in src/lib/Hydra/Helper/Nix.pm at line 33[18.2634][18.2634]
- edit in src/lib/Hydra/Helper/Nix.pm at line 35[18.2635][18.2635]
my $hydraConfig; - edit in src/lib/Hydra/Helper/Nix.pm at line 38
return $hydraConfig if defined $hydraConfig; - replacement in src/lib/Hydra/Helper/Nix.pm at line 40
return {} unless -f $conf;my %config = new Config::General($conf)->getall;return \%config;if (-f $conf) {my %h = new Config::General($conf)->getall;$hydraConfig = \%h;} else {$hydraConfig = {};}return $hydraConfig; - replacement in src/lib/Hydra/Helper/Nix.pm at line 78
die unless defined $ENV{LOGNAME};my $dir = ($ENV{NIX_STATE_DIR} || "/nix/var/nix" ) . "/gcroots/per-user/$ENV{LOGNAME}/hydra-roots";my $config = getHydraConfig();my $dir = $config->{gc_roots_dir};unless (defined $dir) {die unless defined $ENV{LOGNAME};$dir = ($ENV{NIX_STATE_DIR} || "/nix/var/nix" ) . "/gcroots/per-user/$ENV{LOGNAME}/hydra-roots";}