Control: tags -1 + patch On Sun, Dec 11, 2016 at 12:10:04PM +0000, Dominic Hargreaves wrote: > As of 2.3-1 the Debian package of lurker unfortunately started > violating the FHS, because it moved its HTML generation output to > /usr/share/lurker/www. According to the FHS[1] /usr must not be > written to in normal operations. > > I discovered this whilst migrating a lurker installation to a new host. > As far as I can tell, this is a genuine cache, and so I rsynced > /usr/share/lurker/www/ to /var/cache/lurker/www/ and updated the > config file reference, and everything still worked. > > Fixing this in the package would also involve cleaning up any > left-over cache in /usr/share/lurker/www. It's probably not safe > to do this in an automated way, so a similar news item as the one > used in 2.3-1 would be needed.
Please find attached an initial patch. It's been lightly tested but could do with some sanity checking. Note that it's note quite a straight swap, because we've kept the shipped images in /usr and symlinked them. Cheers, Dominic.
diff -Nru lurker-2.3/debian/changelog lurker-2.3/debian/changelog --- lurker-2.3/debian/changelog 2014-07-24 11:31:10.000000000 +0100 +++ lurker-2.3/debian/changelog 2016-12-11 12:29:12.000000000 +0000 @@ -1,3 +1,11 @@ +lurker (2.3-5.1) UNRELEASED; urgency=medium + + * Non-maintainer upload. + * Move default htdocs from /usr/share/lurker/www to /var/cache/lurker/www + for FHS compliance (Closes: #847751) + + -- Dominic Hargreaves <d...@earth.li> Sun, 11 Dec 2016 12:25:55 +0000 + lurker (2.3-5) unstable; urgency=high * Acknowledge NMU. Thanks to Colin Watson. (closes: #734731) diff -Nru lurker-2.3/debian/NEWS lurker-2.3/debian/NEWS --- lurker-2.3/debian/NEWS 2011-09-19 11:51:07.000000000 +0100 +++ lurker-2.3/debian/NEWS 2016-12-11 12:54:50.000000000 +0000 @@ -1,3 +1,29 @@ +lurker (2.3-5.1) UNRELEASED; urgency=high + + The lurker htdocs directory has been moved from /usr/share/lurker/www to + /var/cache/lurker/www in order to comply with the File Hierarchy Standard. + You will have to migrate custom files manually from /usr/share/lurker/www to + /var/cache/lurker/www, and update the configuration files in /etc/lurker + accordingly. + Mail archives are stored in the lurker database at /var/lib/lurker. The html + files are generated from this database, thus no archives will be lost. + Please remove the following files/directories after everything has been + migrated and tested: + + /usr/share/lurker/www/attach + /usr/share/lurker/www/index.html + /usr/share/lurker/www/list + /usr/share/lurker/www/lurker.docroot + /usr/share/lurker/www/mbox + /usr/share/lurker/www/message + /usr/share/lurker/www/mindex + /usr/share/lurker/www/search + /usr/share/lurker/www/splash + /usr/share/lurker/www/thread + /usr/share/lurker/www/zap + + -- Dominic Hargreaves <d...@earth.li> Sun, 11 Dec 2016 12:21:15 +0000 + lurker (2.3-1) unstable; urgency=low The lurker htdocs directory has been moved from /var/www/lurker to diff -Nru lurker-2.3/debian/postinst lurker-2.3/debian/postinst --- lurker-2.3/debian/postinst 2014-07-24 11:20:51.000000000 +0100 +++ lurker-2.3/debian/postinst 2016-12-11 12:48:29.000000000 +0000 @@ -26,10 +26,9 @@ chmod u=rwx,g=rwxs,o=rx /var/lib/lurker fi - chown root:root /usr/share/lurker/www www_data_files="attach list lurker.docroot mbox message mindex search splash thread zap" for f in $www_data_files; do - chown -R www-data:www-data /usr/share/lurker/www/$f + chown -R www-data:www-data /var/cache/lurker/www/$f done # apache2 configuration section diff -Nru lurker-2.3/debian/rules lurker-2.3/debian/rules --- lurker-2.3/debian/rules 2013-12-13 00:51:52.000000000 +0000 +++ lurker-2.3/debian/rules 2016-12-11 12:41:21.000000000 +0000 @@ -35,7 +35,8 @@ --prefix=/usr \ --sysconfdir=/etc \ --localstatedir=/var \ - --with-cgi-bin-dir=/usr/lib/cgi-bin/lurker + --with-cgi-bin-dir=/usr/lib/cgi-bin/lurker \ + --with-default-www-dir=/var/cache/lurker/www touch $@ build-stamp: configure-stamp @@ -74,6 +75,7 @@ echo "#############################################################################" > lurker.conf.local echo "# Mailing list configuration." >> lurker.conf.local awk 'BEGIN { X=0 } { if ( X ) { print $$0'\n' } } /'"^# Mailing list configuration.$$"'/ { X=1 }' < lurker.conf >> lurker.conf.local + install -d $(CURDIR)/debian/lurker/usr/share/lurker/www touch $@ # Build architecture-independent files here. @@ -93,8 +95,10 @@ dh_installexamples lurker.conf dh_lintian mv debian/lurker/etc/apache2/conf-available/apache.conf debian/lurker/etc/apache2/conf-available/lurker.conf - mv debian/lurker/usr/share/lurker/www/ui debian/lurker/etc/lurker - dh_link etc/lurker/ui usr/share/lurker/www/ui + mv debian/lurker/var/cache/lurker/www/ui debian/lurker/etc/lurker + dh_link etc/lurker/ui var/cache/lurker/www/ui + mv debian/lurker/var/cache/lurker/www/imgs debian/lurker/usr/share/lurker/www + dh_link usr/share/lurker/www/imgs var/cache/lurker/www/imgs dh_strip dh_compress dh_fixperms