Package: mpd
Version: 0.16.7-2
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 mpd-0.16.7/debian/changelog mpd-0.16.7/debian/changelog
--- mpd-0.16.7/debian/changelog
+++ mpd-0.16.7/debian/changelog
@@ -1,3 +1,10 @@
+mpd (0.16.7-2.1) unstable; urgency=low
+
+  * Non-maintainer upload.
+  * Fixes /var/run/mpd life cycle (Closes: #XXXXXX).
+
+ -- Thomas Goirand <[email protected]>  Sat, 06 Oct 2012 22:22:03 +0800
+
 mpd (0.16.7-2) unstable; urgency=low
 
   * [06f520f] Enable lame mp3 encoder (Closes: #559933)
diff -u mpd-0.16.7/debian/mpd.postrm mpd-0.16.7/debian/mpd.postrm
--- mpd-0.16.7/debian/mpd.postrm
+++ mpd-0.16.7/debian/mpd.postrm
@@ -13,7 +13,7 @@
 
         deluser --quiet --system mpd > /dev/null || true
 
-	rm -rf /var/log/mpd /var/run/mpd/pid /var/lib/mpd/state \
+	rm -rf /var/log/mpd /var/run/mpd /var/lib/mpd/state \
             /var/lib/mpd/tag_cache > /dev/null 2>&1
 fi
 
diff -u mpd-0.16.7/debian/mpd.postinst mpd-0.16.7/debian/mpd.postinst
--- mpd-0.16.7/debian/mpd.postinst
+++ mpd-0.16.7/debian/mpd.postinst
@@ -19,7 +19,7 @@
 }
 
 do_mpd_perms () {
-    for i in /var/log/mpd /var/lib/mpd /var/lib/mpd/playlists /var/run/mpd; do
+    for i in /var/log/mpd /var/lib/mpd /var/lib/mpd/playlists; do
         if ! dpkg-statoverride --list --quiet "$i" >/dev/null; then
             dpkg-statoverride --force --quiet --update \
                 --add mpd audio 0755 "$i"
diff -u mpd-0.16.7/debian/mpd.dirs mpd-0.16.7/debian/mpd.dirs
--- mpd-0.16.7/debian/mpd.dirs
+++ mpd-0.16.7/debian/mpd.dirs
@@ -8 +7,0 @@
-var/run/mpd

Reply via email to