Index: trunk/debs/testswarm/debian/changelog |
— | — | @@ -1,3 +1,10 @@ |
| 2 | +testswarm (0.1.0-4) lucid; urgency=low |
| 3 | + |
| 4 | + * Place generated config.ini in /etc/testswarm/ instead of the incorrect |
| 5 | + /usr/share/testswarm/site |
| 6 | + |
| 7 | + -- Antoine Musso <amusso@wikimedia.org> Wed, 14 Dec 2011 13:53:33 +0000 |
| 8 | + |
2 | 9 | testswarm (0.1.0-3) unstable; urgency=low |
3 | 10 | * symlink testswarm apache conf in /etc/apache2/conf.d just like other |
4 | 11 | Debian packages. Administration using virtual hosts will have to set |
Index: trunk/debs/testswarm/debian/patches/02_debian_config_ini.patch |
— | — | @@ -1,10 +1,9 @@ |
2 | 2 | --- /dev/null |
3 | 3 | +++ b/config/config.Debian.ini |
4 | | -@@ -0,0 +1,13 @@ |
| 4 | +@@ -0,0 +1,12 @@ |
5 | 5 | +; This file is a template only. The actual config has been added in testswarm root |
6 | | -+; directory as /usr/share/testswarm/site/config.ini |
7 | | -+; Rename to config.ini |
8 | | -+; and move to the site root |
| 6 | ++; directory as /etc/testswarm/config.ini |
| 7 | ++; |
9 | 8 | +[database] |
10 | 9 | + host = "_DBC_DBSERVER_" |
11 | 10 | + username = "_DBC_DBUSER_" |
— | — | @@ -14,3 +13,15 @@ |
15 | 14 | +; set to /testswarm/ to run a local copy in a non-root directory, also update .htaccess with RewriteBase /testswarm/ |
16 | 15 | +; include trailing slash! |
17 | 16 | + contextpath = "/testswarm/" |
| 17 | +--- a/index.php |
| 18 | +@@ -3,7 +3,8 @@ |
| 19 | + |
| 20 | + require "inc/utilities.php"; |
| 21 | + |
| 22 | +- $swarmConfig = parse_ini_file("config.ini", true); |
| 23 | ++ // Load Debian parameters as generated by dbconfig-common |
| 24 | ++ $swarmConfig = parse_ini_file("/etc/testswarm/config.ini", true); |
| 25 | + // Extend default options |
| 26 | + $swarmConfig = array_extend(array( |
| 27 | + "database" => array( |
Index: trunk/debs/testswarm/debian/testswarm.postinst |
— | — | @@ -10,10 +10,10 @@ |
11 | 11 | . /usr/share/debconf/confmodule |
12 | 12 | . /usr/share/dbconfig-common/dpkg/postinst.mysql |
13 | 13 | dbc_first_version="0.1.0-1" |
14 | | -dbc_generate_include="template:/usr/share/testswarm/site/config.ini" |
| 14 | +dbc_generate_include="template:/etc/testswarm/config.ini" |
15 | 15 | dbc_generate_include_args="-otemplate_infile=/etc/testswarm/config.Debian.ini" |
16 | 16 | #dbc_generate_include="php:/etc/testswarm/debian.php" |
17 | | -dbc_generate_include_owner="root:www-data" |
| 17 | +dbc_generate_include_owner="testswarm:www-data" |
18 | 18 | dbc_generate_include_perms="0640" |
19 | 19 | dbc_go testswarm $@ |
20 | 20 | |
Index: trunk/debs/testswarm/debian/testswarm.postrm |
— | — | @@ -17,12 +17,12 @@ |
18 | 18 | # FIXME: add files that need to be removed! |
19 | 19 | |
20 | 20 | if which ucf >/dev/null 2>&1; then |
21 | | - ucf --purge /usr/share/testswarm/site/config.ini |
22 | | - ucfr --purge testswarm /usr/share/testswarm/site/config.ini |
| 21 | + ucf --purge /etc/testswarm/config.ini |
| 22 | + ucfr --purge testswarm /etc/testswarm/config.ini |
23 | 23 | ucf --purge /etc/testswarm/apache.conf |
24 | 24 | ucfr --purge testswarm /etc/testswarm/apache.conf |
25 | 25 | fi |
26 | | - rm -f /usr/share/testswarm/site/config.ini |
| 26 | + rm -f /etc/testswarm/config.ini |
27 | 27 | rm -f /etc/testswarm/apache.conf |
28 | 28 | |
29 | 29 | # unlink testswarm apache conf and restart apache |