Bug#704478: pu: package request-tracker3.8/3.8.8-7+squeeze7
Package: release.debian.org
Severity: normal
User: release.debian.org@packages.debian.org
Usertags: pu
Currently this package keeps data non-cache data in /var/cache,
against Debian policy (see #704109).
The attached patch implements a fix for squeeze, and I would be grateful
if you could consider it at the appropriate moment.
Cheers,
Dominic.
Index: debian/patches/01_layout.dpatch
===================================================================
--- debian/patches/01_layout.dpatch (.../squeeze-security) (revision 1115)
+++ debian/patches/01_layout.dpatch (.../squeeze) (working copy)
@@ -29,9 +29,9 @@
+ fontdir: ${datadir}/fonts
+ manualdir: /usr/share/doc/request-tracker3.8
+ logfiledir: /var/log/request-tracker3.8
-+ localstatedir: /var/cache/request-tracker3.8
-+ masonstatedir: ${localstatedir}/mason_data
-+ sessionstatedir: ${localstatedir}/session_data
++ localstatedir: /var/lib/request-tracker3.8
++ masonstatedir: /var/cache/request-tracker3.8/mason_data
++ sessionstatedir: /var/cache/request-tracker3.8/session_data
+ customdir: /usr/local/share/request-tracker3.8
+ custometcdir: /etc/request-tracker3.8
+ customhtmldir: ${customdir}/html
Index: debian/lintian-overrides
===================================================================
--- debian/lintian-overrides (.../squeeze-security) (revision 1115)
+++ debian/lintian-overrides (.../squeeze) (working copy)
@@ -10,8 +10,9 @@
non-standard-dir-perm var/cache/request-tracker3.8/mason_data/obj/ 2750 != 0755
non-standard-dir-perm var/cache/request-tracker3.8/mason_data/cache/ 2750 != 0755
non-standard-dir-perm var/cache/request-tracker3.8/session_data/ 2750 != 0755
-non-standard-dir-perm var/cache/request-tracker3.8/data/ 2750 != 0755
-non-standard-dir-perm var/cache/request-tracker3.8/data/gpg/ 0700 != 0755
+non-standard-dir-perm var/lib/request-tracker3.8/ 2750 != 0755
+non-standard-dir-perm var/lib/request-tracker3.8/data/ 2750 != 0755
+non-standard-dir-perm var/lib/request-tracker3.8/data/gpg/ 0700 != 0755
# FCKeditor in RT has been modified
embedded-javascript-library usr/share/request-tracker3.8/html/NoAuth/RichText/FCKeditor/fckeditor.js
Index: debian/NEWS
===================================================================
--- debian/NEWS (.../squeeze-security) (revision 1115)
+++ debian/NEWS (.../squeeze) (working copy)
@@ -1,3 +1,14 @@
+request-tracker3.8 (3.8.8-7+squeeze7) UNRELEASED; urgency=low
+
+ This release changes the default location of variable data in RT
+ from /var/cache/request-tracker3.8 to /var/lib/request-tracker3.8; this
+ fixes a long-standing bug where non-cache data was put in /var/cache.
+ The GPG configuration and data is moved automatically by the postinst.
+ but it is worth making sure that you don't have any other data there
+ (perhaps stored by extensions) which should be moved separately.
+
+ -- Dominic Hargreaves <dom@earth.li> Thu, 28 Mar 2013 22:42:02 +0000
+
request-tracker3.8 (3.8.8-7) unstable; urgency=high
* Upgrades to this package version will automatically upgrade the
Index: debian/postinst
===================================================================
--- debian/postinst (.../squeeze-security) (revision 1115)
+++ debian/postinst (.../squeeze) (working copy)
@@ -166,6 +166,25 @@
fi
}
+move_gpg_data() {
+ if [ "$1" = "configure" ] && [ -n "$2" ] && \
+ dpkg --compare-versions "$2" lt 3.8.8-7+squeeze7
+ then
+ if [ -d /var/cache/request-tracker3.8/data/gpg ]; then
+ echo "Moving GPG data from /var/cache to /var/lib"
+ # This should be part of the package, but make sure
+ if [ ! -d /var/lib/request-tracker3.8/data ]; then
+ mkdir -p /var/lib/request-tracker3.8/data
+ chown www-data:root /var/lib/request-tracker3.8/data
+ chown 2750 /var/lib/request-tracker3.8/data
+ fi
+ mv -vu /var/cache/request-tracker3.8/data/gpg/* \
+ /var/lib/request-tracker3.8/data/gpg
+ rmdir --ignore-fail-on-non-empty /var/cache/request-tracker3.8/data/gpg
+ fi
+ fi
+}
+
# The actual work starts here
. /usr/share/debconf/confmodule
@@ -186,6 +205,7 @@
setup_cronjobs
ucf_register
fix_vulnerable_passwords $@
+move_gpg_data $@
case "$1" in
configure)
Index: debian/changelog
===================================================================
--- debian/changelog (.../squeeze-security) (revision 1115)
+++ debian/changelog (.../squeeze) (working copy)
@@ -1,3 +1,16 @@
+request-tracker3.8 (3.8.8-7+squeeze7) UNRELEASED; urgency=low
+
+ * Change localstatedir from /var/cache/request-tracker3.8 to
+ /var/lib/request-tracker3.8 as it contains things which aren't caches
+ * Update other references to /var/cache/request-tracker3.8 where
+ appropriate
+ * Move /var/cache/request-tracker3.8/data/gpg to
+ /var/lib/request-tracker3.8/data/gpg in postinst
+ * Add NEWS item about moves from /var/cache/request-tracker3.8
+ * Closes: #704109
+
+ -- Dominic Hargreaves <dom@earth.li> Thu, 28 Mar 2013 23:23:32 +0000
+
request-tracker3.8 (3.8.8-7+squeeze6) stable-security; urgency=low
* Multiple security fixes for:
Index: debian/rules
===================================================================
--- debian/rules (.../squeeze-security) (revision 1115)
+++ debian/rules (.../squeeze) (working copy)
@@ -147,15 +147,17 @@
chmod 755 $(RT3_PKG)/usr/share/bug/$(RT3)/script
- mkdir -p $(RT3_PKG)/var/cache/$(RT3)/data
+ mkdir -p $(RT3_PKG)/var/lib/$(RT3)/data
find $(RT3_PKG)/var/cache/$(RT3)/ -type d -print0 | xargs --null chown www-data:root
+ find $(RT3_PKG)/var/lib/$(RT)/ -type d -print0 | xargs --null chown www-data:root
find $(RT3_PKG)/var/cache/$(RT3)/ -type d -print0 | xargs --null chmod 2750
+ find $(RT3_PKG)/var/lib/$(RT)/ -type d -print0 | xargs --null chmod 2750
chown www-data:www-data $(RT3_PKG)/var/log/$(RT3)/
# special perms for gpg
- mkdir $(RT3_PKG)/var/cache/$(RT3)/data/gpg
- chown www-data:www-data $(RT3_PKG)/var/cache/$(RT3)/data/gpg
- chmod 700 $(RT3_PKG)/var/cache/$(RT3)/data/gpg
+ mkdir $(RT3_PKG)/var/lib/$(RT3)/data/gpg
+ chown www-data:www-data $(RT3_PKG)/var/lib/$(RT3)/data/gpg
+ chmod 700 $(RT3_PKG)/var/lib/$(RT3)/data/gpg
chmod 2755 $(RT3_PKG)/var/log/$(RT3)/
dh_compress
Reply to: