diff --git a/.gitattributes b/.gitattributes index e4d4c81d..bfedd275 100644 --- a/.gitattributes +++ b/.gitattributes @@ -277,6 +277,7 @@ debian/po/fr.po -text debian/po/templates.pot -text debian/rules -text debian/templates -text +etc/alternc/alternc.ini -text etc/alternc/apache-ssl.conf -text etc/alternc/apache.conf -text etc/alternc/apache2-ssl.conf -text diff --git a/debian/NEWS b/debian/NEWS index bf07d324..c990785c 100644 --- a/debian/NEWS +++ b/debian/NEWS @@ -1,3 +1,12 @@ +alternc (0.9.10) stable; urgency=low + + * I have moved back the PHP sessions in the /var/alternc directory to + facilitate sharing sessions between NFS-mounted nodes. This overrides + the default /var/lib/php5 and adds a cronjob that replicates the + manual session garbage collection the PHP package is doing. + + -- Antoine Beaupré Fri, 31 Oct 2008 13:40:18 -0400 + alternc (0.9.9) stable; urgency=low Starting with 0.9.9, we do not overwrite Postfix's main.cf directly diff --git a/debian/alternc.cron.d b/debian/alternc.cron.d index 6f5a65f1..a28f3dd2 100644 --- a/debian/alternc.cron.d +++ b/debian/alternc.cron.d @@ -14,3 +14,7 @@ # Every day at 2am, compute web, mail and db space usage per account. # You may put this computing every week only or on your filer on busy services. 0 2 * * * www-data /usr/lib/alternc/spoolsize.php + +# alternc-specific PHP sessions cleanup routine +# copied from php5's +09,39 * * * * root [ -d /var/alternc/sessions ] && find /var/alternc/sessions/ -type f -cmin +$(if [ -e /usr/lib/php4/maxlifetime ] ; then /usr/lib/php4/maxlifetime ; else /usr/lib/php5/maxlifetime ; fi) -print0 | xargs -r -0 rm diff --git a/debian/alternc.dirs b/debian/alternc.dirs index b9178ee6..a7fd462f 100644 --- a/debian/alternc.dirs +++ b/debian/alternc.dirs @@ -210,6 +210,7 @@ var/alternc/mail/y var/alternc/mail/z var/alternc/mla var/alternc/redir +var/alternc/sessions var/alternc/tmp var/backups/alternc var/log/alternc diff --git a/debian/alternc.postrm b/debian/alternc.postrm index cdc48e64..d72dcf64 100644 --- a/debian/alternc.postrm +++ b/debian/alternc.postrm @@ -52,6 +52,7 @@ case "$1" in rm -rf /var/alternc/apacheconf /var/alternc/cgi-bin /var/alternc/bureau /var/alternc/exec.usr /var/alternc/mla /var/alternc/redir /var/alternc/tmp /var/log/alternc rm -f /etc/apache*/conf.d/override_php.conf /etc/apache*/conf.d/alternc-ssl.conf /etc/apache*/conf.d/alternc.conf + rm -f /etc/php*/conf.d/alternc.ini ;; remove|upgrade|failed-upgrade|abort-install|abort-upgrade) ;; diff --git a/debian/changelog b/debian/changelog index b9310bc9..9d5126e5 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,7 +1,10 @@ alternc (0.9.10) unstable; urgency=low * bugfixes: - * #1163: fix sqlbackup script call routine to retain backwards compatibility + * #1163: fix sqlbackup script call routine to retain backwards + compatibility + * major changes: + * PHP sessions are now stored in /var/alternc/sessions -- Antoine Beaupré Mon, 20 Oct 2008 16:12:28 -0400 diff --git a/debian/rules b/debian/rules index 636635b0..5fdf160f 100755 --- a/debian/rules +++ b/debian/rules @@ -55,6 +55,7 @@ install: build chmod 755 debian/alternc/etc/alternc chmod 644 debian/alternc/etc/alternc/phpmyadmin.inc.php chown -R root:www-data debian/alternc/var/alternc/bureau + chmod 1733 debian/alternc/var/alternc/sessions chmod -R 644 debian/alternc/var/alternc/bureau chmod -R a+X debian/alternc/var/alternc/bureau chown -R www-data:www-data debian/alternc/var/alternc/dns debian/alternc/var/alternc/html debian/alternc/var/run/alternc debian/alternc/var/log/alternc debian/alternc/var/alternc/tmp diff --git a/etc/alternc/alternc.ini b/etc/alternc/alternc.ini new file mode 100644 index 00000000..5ffc76ef --- /dev/null +++ b/etc/alternc/alternc.ini @@ -0,0 +1,2 @@ +; alternc-slave specific configuration for shared sessions +session.save_path = /var/alternc/sessions diff --git a/install/alternc.install b/install/alternc.install index 457d7190..badd6832 100644 --- a/install/alternc.install +++ b/install/alternc.install @@ -198,6 +198,7 @@ tar -zcf "$INSTALLED_CONFIG_TAR" -C / $CONFIG_FILES # php="`ls /usr/lib/apache*/*/*php*.so | sed -e 's/^.*libphp\(.\)\.so$/php\1/' | tail -1`" +ln -fs /etc/alternc/alternc.ini /etc/$php/conf.d/alternc.ini || true if [ -x /usr/sbin/apache ] then # Enable vhost_alias apache module at the right place (ie: BEFORE mod_alias)