r106198 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r106197‎ | r106198 | r106199 >
Date:14:17, 14 December 2011
Author:hashar
Status:deferred
Tags:
Comment:
Place generated config.ini in /etc/testswarm/ instead of the incorrect
/usr/share/testswarm/site

Much better place to let the testswarm fetcher get the config.ini
informations.
Also fixed user rights so the config.ini file is rw-r----- and owned by
testswarm:ww-data
Modified paths:
  • /trunk/debs/testswarm/debian/changelog (modified) (history)
  • /trunk/debs/testswarm/debian/patches/02_debian_config_ini.patch (modified) (history)
  • /trunk/debs/testswarm/debian/testswarm.postinst (modified) (history)
  • /trunk/debs/testswarm/debian/testswarm.postrm (modified) (history)

Diff [purge]

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+
29 testswarm (0.1.0-3) unstable; urgency=low
310 * symlink testswarm apache conf in /etc/apache2/conf.d just like other
411 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 @@
22 --- /dev/null
33 +++ b/config/config.Debian.ini
4 -@@ -0,0 +1,13 @@
 4+@@ -0,0 +1,12 @@
55 +; 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++;
98 +[database]
109 + host = "_DBC_DBSERVER_"
1110 + username = "_DBC_DBUSER_"
@@ -14,3 +13,15 @@
1514 +; set to /testswarm/ to run a local copy in a non-root directory, also update .htaccess with RewriteBase /testswarm/
1615 +; include trailing slash!
1716 + 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 @@
1111 . /usr/share/debconf/confmodule
1212 . /usr/share/dbconfig-common/dpkg/postinst.mysql
1313 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"
1515 dbc_generate_include_args="-otemplate_infile=/etc/testswarm/config.Debian.ini"
1616 #dbc_generate_include="php:/etc/testswarm/debian.php"
17 -dbc_generate_include_owner="root:www-data"
 17+dbc_generate_include_owner="testswarm:www-data"
1818 dbc_generate_include_perms="0640"
1919 dbc_go testswarm $@
2020
Index: trunk/debs/testswarm/debian/testswarm.postrm
@@ -17,12 +17,12 @@
1818 # FIXME: add files that need to be removed!
1919
2020 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
2323 ucf --purge /etc/testswarm/apache.conf
2424 ucfr --purge testswarm /etc/testswarm/apache.conf
2525 fi
26 - rm -f /usr/share/testswarm/site/config.ini
 26+ rm -f /etc/testswarm/config.ini
2727 rm -f /etc/testswarm/apache.conf
2828
2929 # unlink testswarm apache conf and restart apache