[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#684355: marked as done (unblock: autofs/5.0.7-2)



Your message dated Wed, 10 Oct 2012 21:42:26 +0200
with message-id <20121010194225.GL31434@radis.cristau.org>
and subject line Re: Bug#684355: unblock: autofs/5.0.6-3
has caused the Debian Bug report #684355,
regarding unblock: autofs/5.0.7-2
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
684355: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=684355
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: release.debian.org
Severity: normal
User: release.debian.org@packages.debian.org
Usertags: unblock

Please unblock package autofs

There are a few relatively small changes fixing some bugs
and making the package more accurate.  Also, per request
from the previous maintainer, debian/control is changed
to list new maintainer address - this is important change
by its own.

The changelog, with a bit more comments:

autofs (5.0.6-3) unstable; urgency=low

  [Michael Tokarev]
  * almost completely rewrote the startup script, make it cleaner,
    consistent and actually returning proper exit codes.  Removed
    $"" constructs too, dash apparently does not understand these.
    (Closes: #677520)

This change closes a minor bug (reported several times) _and_
makes whole script much more reliable.  It might be too big
a change for wheezy, but I really want it to go, the previous
version was qute a bit too messy.

  * transfer ownership of ucf-conffiles forcibly only if they're
    owned by autofs5, not by any other package.

There's no bug# for this change (should I perhaps file one?)
When we renamed package from autofs5 to autofs, some ucf-owned
files weren't transferred to the new package properly.  It took
several iterations to do it right, this is the last step.

  * run ucf --purge in postrm only if it is installed, and in the
    right order too

Minor change, but is actually needed.

  * added filagdir.patch - fix a typo in configure.in which prevents
    from specifying runtime directory (Closes: #678384)

This is a trivial patch (submitted and accepted upstream) needed
for the next change.

  * use /var/run not /run for runtime files (we don't really need
    it to be available on upgrade, before initscripts et all has
    been replaced) (Closes: #682675)

Current release (5.0.6-2) expects runtime files in /run not /var/run,
but it does not pre-depend on new initscripts which creates /run, so
we'll fail upgrading from squeeze.

  [Dmitry Smirnov]
  * setting current team leader as Maintainer

 -- Michael Tokarev <mjt@tls.msk.ru>  Thu, 09 Aug 2012 09:27:14 +0400


The complete debdiff is below.

NOTE: I haven't uploaded the package yet, awaiting for release team approval.

unblock autofs/5.0.6-3

Thanks!

/mjt



diff -Nru autofs-5.0.6/debian/autofs.init autofs-5.0.6/debian/autofs.init
--- autofs-5.0.6/debian/autofs.init	2012-06-01 16:12:48.000000000 +0400
+++ autofs-5.0.6/debian/autofs.init	2012-06-07 23:41:38.000000000 +0400
@@ -1,7 +1,5 @@
 #! /bin/sh
 #
-# rc file for automount using a Sun-style "master map".
-#
 
 ### BEGIN INIT INFO
 # Provides: autofs
@@ -17,11 +15,10 @@
 
 # Location of the automount daemon and the init directory
 #
-DAEMON=/usr/sbin/automount
-prog=`basename $DAEMON`
-DEVICE="autofs"
-NAME="autofs"
-PIDFILE="/var/run/${NAME}.pid"
+PROG=automount
+DAEMON=/usr/sbin/$PROG
+NAME=autofs
+PIDFILE="/run/$NAME.pid"
 
 test -e $DAEMON || exit 0
 
@@ -37,103 +34,78 @@
 	. /etc/default/autofs
 fi
 
+start_stop_autofs() {
+	start-stop-daemon "$@" --pidfile $PIDFILE --exec $DAEMON -- \
+		$OPTIONS --pid-file $PIDFILE
+}
+
 start() {
-	log_action_begin_msg "Starting $prog" "$prog"
+	log_action_begin_msg "Starting $PROG"
 
-	# Make sure autofs4 module is loaded
-	if ! grep -q autofs /proc/filesystems
+	if ! grep -qw autofs /proc/filesystems
 	then
-		# Try load the autofs4 module fail if we can't
-		modprobe autofs4 >/dev/null 2>&1
-		if [ $? -eq 1 ]
+		if ! modprobe autofs4 >/dev/null 2>&1
 		then
 			log_action_end_msg 1 "failed to load autofs4 module"
 			return 1
 		fi
 	elif [ -f /proc/modules ] && grep -q "^autofs[^4]" /proc/modules
 	then
-		# wrong autofs filesystem module loaded
 		log_action_end_msg 1 "autofs kernel module is loaded, autofs4 required"
 		return 1
 	fi
 
-	start-stop-daemon --start --exec $DAEMON --oknodo -- $OPTIONS --pid-file $PIDFILE
-	RETVAL=$?
-	if [ $RETVAL -eq 0 ] ; then
-		log_end_msg 0
-	else
+	if ! start_stop_autofs --start --oknodo --quiet ; then
 		log_action_end_msg 1 "no valid automount entries defined."
+		return 1
 	fi
+	log_end_msg 0
 	return 0
 }
 
 stop() {
-	log_action_begin_msg $"Stopping $prog: "
-	count=0
-	while [ -n "`pidof $prog`" -a $count -lt 15 ] ; do
-		start-stop-daemon --stop --exec $DAEMON --oknodo
-		[ -z "`pidof $prog`" ] || sleep 3
-		count=`expr $count + 1`
-	done
-	if [ -z "`pidof $prog`" ] ; then
-		RETVAL=0
-		log_action_end_msg 0
-	else
-		RETVAL=1
+	log_action_begin_msg "Stopping $PROG"
+	if ! start_stop_autofs --stop --retry 5 --oknodo --quiet ; then
 		log_action_end_msg 1
+		return 1
 	fi
-	return $RETVAL
-}
-
-restart() {
-	stop
-	start
+	log_end_msg 0
+	return 0
 }
 
 reload() {
-	pid=`pidof $prog`
-	if [ -z $pid ]; then
-		log_action_msg $"$prog not running"
-		RETVAL=1
-	else
-		kill -HUP $pid 2> /dev/null
-		log_action_msg $"Reloading maps"
-		RETVAL=0
+	log_action_begin_msg "Reloading $PROG maps"
+	if ! start_stop_autofs --stop --signal=HUP --quiet
+	then
+		log_action_end_msg 1 "$PROG not running"
+		return 1
 	fi
-	return $RETVAL
+	log_action_end_msg 0
+	return 0
 }
 
-RETVAL=0
+forcestart() {
+	OPTIONS="$OPTIONS --force"
+	start
+}
 
 case "$1" in
-	start)
-		start
-		;;
-	forcestart)
-		OPTIONS="$OPTIONS --force"
-		start
-		;;
-	stop)
-		stop
+	start|forcestart|stop|reload)
+		$1
 		;;
 	restart|force-reload)
-		restart
+		stop
+		start
 		;;
 	forcerestart)
-		OPTIONS="$OPTIONS --force"
-		restart
-		;;
-	reload)
-		reload
+		stop
+		forcestart
 		;;
 	status)
-		status_of_proc -p $PIDFILE "$DAEMON" "$prog"
+		status_of_proc -p $PIDFILE $DAEMON $PROG
 		;;
 	*)
-		echo $"Usage: $0 {start|forcestart|stop|restart|forcerestart|reload|force-reload|status}"
-		exit 1;
+		echo "Usage: $0 {start|forcestart|stop|restart|forcerestart|reload|force-reload|status}"
+		exit 1
 		;;
 esac
-
-exit $?
-
diff -Nru autofs-5.0.6/debian/autofs.postinst autofs-5.0.6/debian/autofs.postinst
--- autofs-5.0.6/debian/autofs.postinst	2012-06-01 15:17:59.000000000 +0400
+++ autofs-5.0.6/debian/autofs.postinst	2012-07-25 21:31:32.000000000 +0400
@@ -3,14 +3,10 @@
 
 if [ "$1" = "configure" ]; then
   # transfer ownership from old autofs5 package
-  # since there's no official ucfr --query, we can't know if we
-  # already transferred ownership.  So we may only always use --foce
-  #autofs5_ver=`dpkg-query -f '${Version}' -W autofs5 2>/dev/null`
-  #if dpkg --compare-versions "$autofs5_ver" "<=" 5.0.6-2~
-  #then
-    force="--force"
-  #else force=
-  #fi
+  case "$(ucfq -w /etc/default/autofs)" in
+    *:autofs5:*) force=--force ;;
+    *) force= ;;
+  esac
   for map in master net misc smb; do
     ucfr $force autofs /etc/auto.$map
     ucf /usr/share/autofs/conffiles/auto.$map /etc/auto.$map
diff -Nru autofs-5.0.6/debian/autofs.postrm autofs-5.0.6/debian/autofs.postrm
--- autofs-5.0.6/debian/autofs.postrm	2012-06-01 15:17:59.000000000 +0400
+++ autofs-5.0.6/debian/autofs.postrm	2012-06-07 23:41:38.000000000 +0400
@@ -3,9 +3,9 @@
 
 if [ "$1" = "purge" ]; then
   for CONFF in /etc/auto.master /etc/auto.net /etc/auto.misc /etc/auto.smb /etc/default/autofs; do
-    ucfr -p autofs $CONFF
-    ucf --purge $CONFF
     rm -f $CONFF $CONFF.ucf-dist $CONFF.ucf-old $CONFF.ucf-new
+    if which ucf  >/dev/null; then ucf  --purge $CONFF; fi
+    if which ucfr >/dev/null; then ucfr --purge autofs $CONFF; fi
   done
 fi
 
diff -Nru autofs-5.0.6/debian/changelog autofs-5.0.6/debian/changelog
--- autofs-5.0.6/debian/changelog	2012-06-02 14:47:03.000000000 +0400
+++ autofs-5.0.6/debian/changelog	2012-08-09 09:27:27.000000000 +0400
@@ -1,3 +1,25 @@
+autofs (5.0.6-3) unstable; urgency=low
+
+  [Michael Tokarev]
+  * almost completely rewrote the startup script, make it cleaner,
+    consistent and actually returning proper exit codes.  Removed
+    $"" constructs too, dash apparently does not understand these.
+    (Closes: #677520)
+  * transfer ownership of ucf-conffiles forcibly only if they're
+    owned by autofs5, not by any other package.
+  * run ucf --purge in postrm only if it is installed, and in the
+    right order too
+  * added filagdir.patch - fix a typo in configure.in which prevents
+    from specifying runtime directory (Closes: #678384)
+  * use /var/run not /run for runtime files (we don't really need
+    it to be available on upgrade, before initscripts et all has
+    been replaced) (Closes: #682675)
+
+  [Dmitry Smirnov]
+  * setting current team leader as Maintainer
+
+ -- Michael Tokarev <mjt@tls.msk.ru>  Thu, 09 Aug 2012 09:27:14 +0400
+
 autofs (5.0.6-2) unstable; urgency=low
 
   [Dmitry Smirnov]
diff -Nru autofs-5.0.6/debian/control autofs-5.0.6/debian/control
--- autofs-5.0.6/debian/control	2012-06-01 17:28:04.000000000 +0400
+++ autofs-5.0.6/debian/control	2012-06-07 23:39:09.000000000 +0400
@@ -1,9 +1,9 @@
 Source: autofs
 Section: utils
 Priority: extra
-Maintainer: Dmitry Smirnov <onlyjob@member.fsf.org>
+Maintainer: Michael Tokarev <mjt@tls.msk.ru>
 Uploaders: Jan Christoph Nordholz <hesso@pool.math.tu-berlin.de>,
- Michael Tokarev <mjt@tls.msk.ru>, William Dauchy <wdauchy@gmail.com>
+ Dmitry Smirnov <onlyjob@member.fsf.org>, William Dauchy <wdauchy@gmail.com>
 Standards-Version: 3.9.3
 Build-Depends: debhelper (>= 9), autoconf, lsb-base,
  bison, flex, libhesiod-dev, libkrb5-dev, libldap-dev, libsasl2-dev, libssl-dev, libxml2-dev
diff -Nru autofs-5.0.6/debian/patches/filagdir.patch autofs-5.0.6/debian/patches/filagdir.patch
--- autofs-5.0.6/debian/patches/filagdir.patch	1970-01-01 03:00:00.000000000 +0300
+++ autofs-5.0.6/debian/patches/filagdir.patch	2012-07-25 21:45:53.000000000 +0400
@@ -0,0 +1,16 @@
+Subject: fix --with-flagdir in configure.in
+From: John Hedges <john@drystone.co.uk>
+Forwarded: yes
+Bug-Debian: http://bugs.debian.org/678384
+
+--- a/configure.in
++++ b/configure.in
+@@ -114,7 +114,7 @@
+ 	then
+ 		:
+ 	else
+-		filagdir="${withval}"
++		flagdir="${withval}"
+ 	fi
+ )
+ AC_MSG_CHECKING([for autofs flag file directory])
diff -Nru autofs-5.0.6/debian/patches/series autofs-5.0.6/debian/patches/series
--- autofs-5.0.6/debian/patches/series	2012-06-01 23:24:13.000000000 +0400
+++ autofs-5.0.6/debian/patches/series	2012-07-25 21:43:14.000000000 +0400
@@ -2,6 +2,9 @@
 #
 autofs-5.0.6-upstream-git.patch
 #
+# bugfixes forwarded to upstream
+filagdir.patch
+#
 # Debian patches
 #
 11default_automaster_location.patch
diff -Nru autofs-5.0.6/debian/rules autofs-5.0.6/debian/rules
--- autofs-5.0.6/debian/rules	2012-06-01 22:59:00.000000000 +0400
+++ autofs-5.0.6/debian/rules	2012-06-07 23:41:38.000000000 +0400
@@ -20,14 +20,14 @@
 	MOUNT=/bin/mount UMOUNT=/bin/umount \
 	MOUNT_NFS=/sbin/mount.nfs \
 	E2FSCK=/sbin/fsck.ext2 E3FSCK=/sbin/fsck.ext3 E4FSCK=/sbin/fsck.ext4 \
-	initdir=/etc/init.d piddir=/run \
+	initdir=/etc/init.d piddir=/var/run \
 	dh_auto_configure -- \
 		--enable-forced-shutdown \
 		--enable-ignore-busy \
 		--mandir=/usr/share/man \
 		--with-confdir=/etc/default \
 		--with-mapdir=/etc \
-		--with-fifodir=/run --with-flagdir=/run \
+		--with-fifodir=/var/run --with-flagdir=/var/run \
 		--with-hesiod \
 		--with-openldap \
 		--with-sasl

--- End Message ---
--- Begin Message ---
On Wed, Oct 10, 2012 at 23:05:32 +0400, Michael Tokarev wrote:

> On 10.10.2012 20:06, Julien Cristau wrote:
> > On Thu, Aug  9, 2012 at 09:39:22 +0400, Michael Tokarev wrote:
> > 
> >> diff -Nru autofs-5.0.6/debian/autofs.init autofs-5.0.6/debian/autofs.init
> []
> >> +NAME=autofs
> >> +PIDFILE="/run/$NAME.pid"
> >>  
> > the PIDFILE here is broken.  Please fix it and let me know after 5.0.7-3
> > is in sid, I'll unblock the package.
> 
> Thank you very much Julien for this hard work - reviewing autofs
> changes is quite a bit disgusting.  And especially thank you
> very much for finding this my bug - it is the second, forgotten,
> half of the fix for #682675.
> 
> I just uploaded the new release, which contains this fix and a
> tiny debian/changelog change (not mentioned itself in the changelog),
> just word-wrapping of a line for which lintian complained, no
> wording changes.
> 
> Here's the debdiff between 5.0.7-2 and 5.0.7-3:
> 
Unblocked.

Cheers,
Julien

Attachment: signature.asc
Description: Digital signature


--- End Message ---

Reply to: