svn path=/nixos/trunk/; revision=10692
This commit is contained in:
parent
ffd96f07fe
commit
a06b51f895
|
@ -6,20 +6,42 @@ let
|
||||||
|
|
||||||
urlPrefix = "/release";
|
urlPrefix = "/release";
|
||||||
distDir = "/tmp/dist";
|
distDir = "/tmp/dist";
|
||||||
distConfDir = "/tmp/dist-conf";
|
distPasswords = "/tmp/dist-conf/upload_passwords";
|
||||||
|
|
||||||
|
directoriesConf = pkgs.writeText "directories.conf" ''
|
||||||
|
nix ${distDir}/nix nix-upload
|
||||||
|
nix-cache ${distDir}/nix-cache nix-upload stratego-upload autobundle-upload swe-upload meta-environment-upload hut-upload
|
||||||
|
test ${distDir}/test test-upload nix-upload
|
||||||
|
test-cache ${distDir}/test-cache test-upload nix-upload
|
||||||
|
stratego ${distDir}/stratego stratego-upload
|
||||||
|
autobundle ${distDir}/autobundle autobundle-upload
|
||||||
|
courses ${distDir}/courses swe-upload
|
||||||
|
meta-environment ${distDir}/meta-environment meta-environment-upload
|
||||||
|
hut ${distDir}/hut hut-upload
|
||||||
|
'';
|
||||||
|
|
||||||
|
uploaderIPs = [
|
||||||
|
"127.0.0.1"
|
||||||
|
"10.0.0.0/255.0.0.0"
|
||||||
|
"131.211.0.0/255.255.0.0" # *.cs.uu.nl
|
||||||
|
"130.145.0.0/255.255.0.0" # philips.com
|
||||||
|
"130.161.158.181" # TUD supervisor
|
||||||
|
];
|
||||||
|
|
||||||
staticFiles = substituteInAll {
|
staticFiles = substituteInAll {
|
||||||
name = "svn-server-scripts";
|
name = "dist-manager-files";
|
||||||
src = pkgs.lib.cleanSource ../../../services/dist-manager/files;
|
src = pkgs.lib.cleanSource ../../../services/dist-manager/files;
|
||||||
|
|
||||||
perl = "${pkgs.perl}/bin/perl";
|
perl = "${pkgs.perl}/bin/perl";
|
||||||
|
|
||||||
inherit (serverInfo) canonicalName;
|
inherit (serverInfo) canonicalName;
|
||||||
|
|
||||||
inherit urlPrefix;
|
inherit urlPrefix directoriesConf;
|
||||||
|
|
||||||
|
defaultPath = "${pkgs.coreutils}/bin:${pkgs.findutils}/bin";
|
||||||
|
|
||||||
|
saxon8 = pkgs.saxonb;
|
||||||
|
|
||||||
defaultPath = ""; # !!!
|
|
||||||
|
|
||||||
# Do a syntax check on the generated file.
|
# Do a syntax check on the generated file.
|
||||||
postInstall = ''
|
postInstall = ''
|
||||||
$perl -c $out/cgi-bin/create-dist.pl # !!! should use -T
|
$perl -c $out/cgi-bin/create-dist.pl # !!! should use -T
|
||||||
|
@ -45,29 +67,21 @@ in {
|
||||||
|
|
||||||
Alias ${urlPrefix}/css ${staticFiles}/css
|
Alias ${urlPrefix}/css ${staticFiles}/css
|
||||||
|
|
||||||
|
|
||||||
ScriptAlias ${urlPrefix}/cgi-bin ${staticFiles}/cgi-bin
|
ScriptAlias ${urlPrefix}/cgi-bin ${staticFiles}/cgi-bin
|
||||||
|
|
||||||
<Directory ${staticFiles}/cgi-bin>
|
<Directory ${staticFiles}/cgi-bin>
|
||||||
AllowOverride FileInfo AuthConfig Limit
|
Options SymLinksIfOwnerMatch ExecCGI
|
||||||
Options MultiViews SymLinksIfOwnerMatch ExecCGI
|
|
||||||
SetHandler cgi-script
|
SetHandler cgi-script
|
||||||
|
|
||||||
# !!! this shouldn't be here
|
|
||||||
Order allow,deny
|
Order allow,deny
|
||||||
Allow from 131.211.0.0/255.255.0.0 # *.cs.uu.nl
|
${pkgs.lib.concatMapStrings (ip: "Allow from ${ip}\n") uploaderIPs}
|
||||||
Allow from 130.145.0.0/255.255.0.0 # philips.com
|
|
||||||
Allow from 130.161.158.181 # TUD supervisor
|
|
||||||
Allow from 192.168.1.0/24 # TUD builders
|
|
||||||
Allow from 127.0.0.1
|
|
||||||
|
|
||||||
Require valid-user
|
Require valid-user
|
||||||
AuthType Basic
|
AuthType Basic
|
||||||
AuthName "Nix Upload"
|
AuthName "Nix Upload"
|
||||||
AuthUserFile ${distConfDir}/upload_passwords
|
AuthUserFile ${distPasswords}
|
||||||
</Directory>
|
</Directory>
|
||||||
|
|
||||||
|
|
||||||
Alias ${urlPrefix} ${distDir}/
|
Alias ${urlPrefix} ${distDir}/
|
||||||
|
|
||||||
<Location ${urlPrefix}>
|
<Location ${urlPrefix}>
|
||||||
|
|
Loading…
Reference in New Issue