git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #63957 from aanderse/trac-httpd

nixos/httpd: remove broken trac subservice

commit434667420e54a26d447fc4c0e3532370d42a8c9a authorAaron Andersen <aaron@fosslib.net> dateThu 11 Jul 2019, 19:42 (7 years ago) parent53cad656a1de54
3 files changed+5−195
nixos/doc/manual/release-notes/rl-1909.xml+5 nixos/modules/services/web-servers/apache-httpd/trac.nix−121 nixos/tests/trac.nix−74
nixos/doc/manual/release-notes/rl-1909.xml+5
@@ -318,6 +318,11 @@
318318 The <literal>mercurial</literal> <literal>httpd.extraSubservice</literal> has been removed from nixpkgs due to lack of maintainer.
319319 </para>
320320 </listitem>
321+ <listitem>
322+ <para>
323+ The <literal>trac</literal> <literal>httpd.extraSubservice</literal> has been removed from nixpkgs because it was unmaintained.
324+ </para>
325+ </listitem>
321326 </itemizedlist>
322327 </section>
323328</section>
nixos/modules/services/web-servers/apache-httpd/trac.nixdeleted−121
@@ -1,121 +0,0 @@
1−{ config, lib, pkgs, serverInfo, ... }:
2−
3−with lib;
4−
5−let
6−
7− # Build a Subversion instance with Apache modules and Swig/Python bindings.
8− subversion = pkgs.subversion.override {
9− bdbSupport = true;
10− httpServer = true;
11− pythonBindings = true;
12− apacheHttpd = httpd;
13− };
14−
15− httpd = serverInfo.serverConfig.package;
16−
17− versionPre24 = versionOlder httpd.version "2.4";
18−
19−in
20−
21−{
22−
23− options = {
24−
25− projectsLocation = mkOption {
26− description = "URL path in which Trac projects can be accessed";
27− default = "/projects";
28− };
29−
30− projects = mkOption {
31− description = "List of projects that should be provided by Trac. If they are not defined yet empty projects are created.";
32− default = [];
33− example =
34− [ { identifier = "myproject";
35− name = "My Project";
36− databaseURL="postgres://root:password@/tracdb";
37− subversionRepository="/data/subversion/myproject";
38− }
39− ];
40− };
41−
42− user = mkOption {
43− default = "wwwrun";
44− description = "User account under which Trac runs.";
45− };
46−
47− group = mkOption {
48− default = "wwwrun";
49− description = "Group under which Trac runs.";
50− };
51−
52− ldapAuthentication = {
53− enable = mkOption {
54− default = false;
55− description = "Enable the ldap authentication in trac";
56− };
57−
58− url = mkOption {
59− default = "ldap://127.0.0.1/dc=example,dc=co,dc=ke?uid?sub?(objectClass=inetOrgPerson)";
60− description = "URL of the LDAP authentication";
61− };
62−
63− name = mkOption {
64− default = "Trac server";
65− description = "AuthName";
66− };
67− };
68−
69− };
70−
71− extraModules = singleton
72− { name = "python"; path = "${pkgs.mod_python}/modules/mod_python.so"; };
73−
74− extraConfig = ''
75− <Location ${config.projectsLocation}>
76− SetHandler mod_python
77− PythonHandler trac.web.modpython_frontend
78− PythonOption TracEnvParentDir /var/trac/projects
79− PythonOption TracUriRoot ${config.projectsLocation}
80− PythonOption PYTHON_EGG_CACHE /var/trac/egg-cache
81− </Location>
82− ${if config.ldapAuthentication.enable then ''
83− <LocationMatch "^${config.projectsLocation}[^/]+/login$">
84− AuthType Basic
85− AuthName "${config.ldapAuthentication.name}"
86− AuthBasicProvider "ldap"
87− AuthLDAPURL "${config.ldapAuthentication.url}"
88− ${if versionPre24 then "authzldapauthoritative Off" else ""}
89− require valid-user
90− </LocationMatch>
91− '' else ""}
92− '';
93−
94− globalEnvVars = singleton
95− { name = "PYTHONPATH";
96− value =
97− makeSearchPathOutput "lib" "lib/${pkgs.python.libPrefix}/site-packages"
98− [ pkgs.mod_python
99− pkgs.pythonPackages.trac
100− pkgs.pythonPackages.setuptools
101− pkgs.pythonPackages.genshi
102− pkgs.pythonPackages.psycopg2
103− subversion
104− ];
105− };
106−
107− startupScript = pkgs.writeScript "activateTrac" ''
108− mkdir -p /var/trac
109− chown ${config.user}:${config.group} /var/trac
110−
111− ${concatMapStrings (project:
112− ''
113− if [ ! -d /var/trac/${project.identifier} ]
114− then
115− export PYTHONPATH=${pkgs.pythonPackages.psycopg2}/lib/${pkgs.python.libPrefix}/site-packages
116− ${pkgs.pythonPackages.trac}/bin/trac-admin /var/trac/${project.identifier} initenv "${project.name}" "${project.databaseURL}" svn "${project.subversionRepository}"
117− fi
118− '' ) (config.projects)}
119− '';
120−
121−}
nixos/tests/trac.nixdeleted−74
@@ -1,74 +0,0 @@
1−import ./make-test.nix ({ pkgs, ... }: {
2− name = "trac";
3− meta = with pkgs.stdenv.lib.maintainers; {
4− maintainers = [ eelco ];
5− };
6−
7− nodes = {
8− storage =
9− { ... }:
10− { services.nfs.server.enable = true;
11− services.nfs.server.exports = ''
12− /repos 192.168.1.0/255.255.255.0(rw,no_root_squash)
13− '';
14− services.nfs.server.createMountPoints = true;
15− };
16−
17− postgresql =
18− { pkgs, ... }:
19− { services.postgresql.enable = true;
20− services.postgresql.package = pkgs.postgresql;
21− services.postgresql.enableTCPIP = true;
22− services.postgresql.authentication = ''
23− # Generated file; do not edit!
24− local all all trust
25− host all all 127.0.0.1/32 trust
26− host all all ::1/128 trust
27− host all all 192.168.1.0/24 trust
28− '';
29− };
30−
31− webserver =
32− { pkgs, ... }:
33− { fileSystems = pkgs.lib.mkVMOverride
34− [ { mountPoint = "/repos";
35− device = "storage:/repos";
36− fsType = "nfs";
37− }
38− ];
39− services.httpd.enable = true;
40− services.httpd.adminAddr = "root@localhost";
41− services.httpd.extraSubservices = [ { serviceType = "trac"; } ];
42− environment.systemPackages = [ pkgs.pythonPackages.trac pkgs.subversion ];
43− };
44−
45− client =
46− { ... }:
47− { imports = [ ./common/x11.nix ];
48− services.xserver.desktopManager.plasma5.enable = true;
49− };
50− };
51−
52− testScript =
53− ''
54− startAll;
55−
56− $postgresql->waitForUnit("postgresql");
57− $postgresql->succeed("createdb trac");
58−
59− $webserver->succeed("mkdir -p /repos/trac");
60− $webserver->succeed("svnadmin create /repos/trac");
61−
62− $webserver->waitForUnit("httpd");
63− $webserver->waitForFile("/var/trac");
64− $webserver->succeed("mkdir -p /var/trac/projects/test");
65− $webserver->succeed("PYTHONPATH=${pkgs.pythonPackages.psycopg2}/lib/${pkgs.python.libPrefix}/site-packages trac-admin /var/trac/projects/test initenv Test postgres://root\@postgresql/trac svn /repos/trac");
66−
67− $client->waitForX;
68− $client->execute("konqueror http://webserver/projects/test &");
69− $client->waitForWindow(qr/Test.*Konqueror/);
70− $client->sleep(30); # loading takes a long time
71−
72− $client->screenshot("screen");
73− '';
74−})