Package: wzdftpd Version: 0.8.3-6.1 Severity: serious Tags: patch Dear Maintainer,
Andreas Beckmann <deb...@abeckmann.de> reported in -devel that your package (as well as 27 others) ships a folder either in /var/run or /var/lock. This is forbidden by policy. Lintian detects the problem and warns as follow: /var/run may be a temporary filesystem, so any directories or files needed /there must be created dynamically at boot time. Refer to Debian Policy Manual section 9.3.2 (Writing the scripts) for details. Severity: serious, Certainty: possible Check: files, Type: binary, udeb which is why I am reporting this bug with severity serious (and there fore, release critical). Please fix your package. I have attached what I believe is a good fix the problem, however, I haven't tried it, and I haven't tested if something more for creating the necessary folder at runtime should be added. Please make sure to test before applying the patch blindly. Cheers, Thomas Goirand (zigo)
diff -u wzdftpd-0.8.3/debian/changelog wzdftpd-0.8.3/debian/changelog --- wzdftpd-0.8.3/debian/changelog +++ wzdftpd-0.8.3/debian/changelog @@ -1,3 +1,10 @@ +wzdftpd (0.8.3-6.2) UNRELEASED; urgency=low + + * Non-maintainer upload. + * Fixes /var/run/wzdftpd life cycle handling (Closes: #XXXXXX). + + -- Thomas Goirand <z...@debian.org> Sat, 06 Oct 2012 23:08:12 +0800 + wzdftpd (0.8.3-6.1) unstable; urgency=low * Non-maintainer upload. diff -u wzdftpd-0.8.3/debian/init.d wzdftpd-0.8.3/debian/init.d --- wzdftpd-0.8.3/debian/init.d +++ wzdftpd-0.8.3/debian/init.d @@ -17,6 +17,7 @@ DAEMON=/usr/sbin/wzdftpd NAME=wzdftpd DESC=wzdftpd +RUNDIR=/var/run/$NAME test -x $DAEMON || exit 0 @@ -31,6 +32,13 @@ set -e +if [ ! -d ${RUNDIR} ] ; then + mkdir -p ${RUNDIR} || true + if [ -d ${RUNDIR} ] && id ftp >/dev/null 2>/dev/null ; then + chown ftp /var/run/wzdftpd + fi +fi + case "$1" in start) echo -n "Starting $DESC: " diff -u wzdftpd-0.8.3/debian/wzdftpd.postrm wzdftpd-0.8.3/debian/wzdftpd.postrm --- wzdftpd-0.8.3/debian/wzdftpd.postrm +++ wzdftpd-0.8.3/debian/wzdftpd.postrm @@ -27,7 +27,7 @@ rm -f /etc/wzdftpd/users /etc/wzdftpd/users.OLD rm -f /etc/wzdftpd/wzd.cfg rm -f /etc/wzdftpd/wzd.cfg.wzdftpd-old /etc/wzdftpd/wzd.cfg.wzdftpd-new /etc/wzdftpd/wzd.cfg.dpkg-dist /etc/wzdftpd/wzd.cfg.ucf-dist /etc/wzdftpd/wzd.cfg.ucf-old - + rm -rf /var/run/wzdftpd ;; remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear) only in patch2: unchanged: --- wzdftpd-0.8.3.orig/debian/dirs +++ wzdftpd-0.8.3/debian/dirs @@ -4,7 +4,6 @@ etc usr/share/man/man1 var/log/wzdftpd -var/run/wzdftpd usr/lib/wzdftpd/backends usr/lib/wzdftpd/modules usr/share/lintian/overrides only in patch2: unchanged: --- wzdftpd-0.8.3.orig/debian/wzdftpd.postinst +++ wzdftpd-0.8.3/debian/wzdftpd.postinst @@ -66,18 +66,6 @@ fi fi -# the following will be used to run the server as a non-privileged user -# # extract PID_DIR from config -# if [ ! -d $PID_DIR ]; then -# mkdir $PID_DIR -# fi - if [ -d $PID_DIR ]; then - if (id ftp >/dev/null 2>/dev/null) ; then - chown ftp $PID_DIR - fi - fi - - case "$1" in configure)