Package: havp
Version: 3.0-a9-1
Severity: serious
Tags: patch

Dear Maintainer,

Andreas Beckmann <[email protected]> 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 havp-0.92a/debian/changelog havp-0.92a/debian/changelog
--- havp-0.92a/debian/changelog
+++ havp-0.92a/debian/changelog
@@ -1,3 +1,10 @@
+havp (0.92a-2.1) unstable; urgency=low
+
+  * Non-maintainer upload.
+  * Fixes (Closes: #XXXXXX).
+
+ -- Thomas Goirand <[email protected]>  Sun, 07 Oct 2012 11:05:10 +0000
+
 havp (0.92a-2) unstable; urgency=low
 
   * Include debconf language updates from previous NMU and new updates.
diff -u havp-0.92a/debian/havp.init havp-0.92a/debian/havp.init
--- havp-0.92a/debian/havp.init
+++ havp-0.92a/debian/havp.init
@@ -37,6 +37,13 @@
 
 set -e
 
+if [ ! -d ${RUNDIR} ] ; then
+	mkdir -p ${RUNDIR}
+	if [ -d ${RUNDIR} ] ; then
+		chown ${USER}:${GROUP} ${RUNDIR}
+	fi
+fi
+
 case "$1" in
   start)
         # Create the run directory if it doesn't exist
diff -u havp-0.92a/debian/havp.postinst havp-0.92a/debian/havp.postinst
--- havp-0.92a/debian/havp.postinst
+++ havp-0.92a/debian/havp.postinst
@@ -37,7 +37,6 @@
       fi
       # care for proper ownership in any case (e.g. updating from an earlier 
       # havp package with different paths)
-      chown havp:havp /var/run/havp
       chown havp:havp /var/log/havp
       chown havp:havp /var/lib/havp
       chown havp:havp /var/spool/havp
diff -u havp-0.92a/debian/havp.postrm havp-0.92a/debian/havp.postrm
--- havp-0.92a/debian/havp.postrm
+++ havp-0.92a/debian/havp.postrm
@@ -29,7 +29,7 @@
           rm /var/lib/havp/havp.tmp
           rm /etc/default/havp
         fi
-
+	rm -rf /var/run/havp
         ;;
 
        remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)

Reply via email to