Bug#689769: Patch for this bug

2012-10-07 Thread René Mayorga
On Sun, Oct 07, 2012 at 11:32:06PM +0800, Thomas Goirand wrote:
> Hi,
> 

Hi Thomas, 

> Here's a possible patch for fixing this bug.

Thanks for your bug report and your patch, I've filled an RFA for this package
and there is one ITA there but maybe needs to be renamed to RFA again though.

I'll try to upload the package during the next week, but anyway feel free to NMU
it(you or someone else).


Cheers

--
René


--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Bug#689769: Patch for this bug

2012-10-07 Thread Thomas Goirand

Hi,

Here's a possible patch for fixing this bug.

Cheers,

Thomas
reverted:
--- ample-0.5.7/debian/postinst
+++ ample-0.5.7.orig/debian/postinst
@@ -1,37 +0,0 @@
-#!/bin/sh
-# postinst script for ample
-#
-
-set -e
-
-case "$1" in
-configure)
-if [ ! -d /var/run/ample ]; then
-   # old postrm removed /var/run/ample even on 'upgrade'
-   mkdir /var/run/ample
-fi 
-
-# don't override local permissions if they are setted with 
dpkg-statoverride
-if ! dpkg-statoverride --list /var/run/ample >/dev/null; then
-chown nobody:nogroup /var/run/ample
-fi
-
-;;
-
-abort-upgrade|abort-remove|abort-deconfigure)
-;;
-
-*)
-echo "postinst called with unknown argument \`$1'" >&2
-exit 1
-;;
-esac
-
-# dh_installdeb will replace this with shell code automatically
-# generated by other debhelper scripts.
-
-#DEBHELPER#
-
-exit 0
-
-
diff -u ample-0.5.7/debian/postrm ample-0.5.7/debian/postrm
--- ample-0.5.7/debian/postrm
+++ ample-0.5.7/debian/postrm
@@ -5,12 +5,7 @@
 case "$1" in
 purge|remove)
 if [ -d /var/run/ample ]; then
-rmdir /var/run/ample
-   
-   # delete override if exists
-   if dpkg-statoverride --list /var/run/ample >/dev/null; then
-   dpkg-statoverride --remove /var/run/ample >/dev/null
-   fi
+rmdir /var/run/ample || true
 fi
 ;;
 upgrade|abort-upgrade|failed-upgrade|abort-install|disapper)
diff -u ample-0.5.7/debian/init.d ample-0.5.7/debian/init.d
--- ample-0.5.7/debian/init.d
+++ ample-0.5.7/debian/init.d
@@ -43,6 +43,13 @@
 
 . /lib/lsb/init-functions
 
+if ! [ -d /var/run/ample ] ; then
+   mkdir -p /var/run/ample || true
+   if [ -d /var/run/ample ] ; then
+   chown nobody:nogroup /var/run/ample
+   fi
+fi
+
 do_start()
 {
# Return
diff -u ample-0.5.7/debian/changelog ample-0.5.7/debian/changelog
--- ample-0.5.7/debian/changelog
+++ ample-0.5.7/debian/changelog
@@ -1,3 +1,10 @@
+ample (0.5.7-6.1) unstable; urgency=low
+
+  * Non-maintainer upload.
+  * Maintains /var/run/ample dynamically at boot time (Closes: #XX).
+
+ -- Thomas Goirand   Sat, 06 Oct 2012 15:17:14 +0800
+
 ample (0.5.7-6) unstable; urgency=low
 
   * debian/postrm