[pkg-wpa-devel] Bug#633040: wpasupplicant: /run transition: Please switch to /run/sendsigs.omit.d

Roger Leigh rleigh at codelibre.net
Sun Jul 24 08:51:27 UTC 2011


On Sun, Jul 24, 2011 at 05:35:39PM +1000, Kel Modderman wrote:
> Hi Roger,
> 
> On Fri, 8 Jul 2011 08:39:53 AM Roger Leigh wrote:
> > Source: wpasupplicant
> > Version: 0.7.3-3
> > Severity: important
> > 
> > Your package is currently using/lib/init/rw/sendsigs.omit.d
> > which is now deprecated and pending removal.  Please update your
> > package to use /run/sendsigs.omit.d with a versioned dependency
> > on initscripts, as detailed below.
> > 
> > An overview of the /run transition and its current progress is
> > available at http://wiki.debian.org/ReleaseGoals/RunDirectory
> > Basically, it's now in both testing and unstable, and the next
> > phase of the transition is to migrate all users of /lib/init/rw
> > over to /run and then remove /lib/init/rw entirely for wheezy
> > (as soon as this transition is complete).
> > 
> > Your package is one of the users of sendsigs.omit.d listed here:
> > http://wiki.debian.org/ReleaseGoals/RunDirectory#Packages_using_.2BAC8-lib.
> > 2BAC8-init.2BAC8-rw
> > 
> > Recommendations for how to do the transition may be found here:
> > http://wiki.debian.org/ReleaseGoals/RunDirectory#How_to_transition_from_.2B
> > AC8-lib.2BAC8-init.2BAC8-rw_to_.2BAC8-run.3F
> > 
> > For sendsigs.omit.d, we would recommend that you:
> > 
> > * Depend on initscripts (>= 2.88dsf-13.3)
> 
> Is it really neccessary in this case?

It's necessary if you wish to unconditionally migrate.  Having the
dependency ensures that /run/sendsigs.omit.d will be present when the
postinst runs, so you can just change all the code to point to the
new location, and mv any files from the old location to there in the
postinst.

> > * Replace *all* usage of /lib/init/rw with /run
> 
> I was hoping just to support (with first preference) the new location in
> addition to the previous locations, then remove that code sometime in next
> release cycle.

Given the limited number of programs using /lib/init/rw, it should be
entirely feasible to migrate them all in the next few weeks, at which
point /lib/init/rw can be removed following the addition of the
appropriate Breaks to initscripts.  Is there any need to keep it around
for longer than this?
 
> > * Move all files in /lib/init/rw to /run in the package postinst, for
> >   example:
> > 
> >     if [ -f /lib/init/rw/sendsigs.omit.d/foo ]; then
> >         mv /lib/init/rw/sendsigs.omit.d/foo /run/sendsigs.omit.d/foo
> >     fi
> 
> Attached patch.

I'm not sure this will work correctly on Debian (the Ubuntu-specific
bits are incorrect for Debian AFAICT); see below.  The main point is
that /var/run/sendsigs.omit.d /is/ /run/sendsigs.omit.d as soon as
initscripts is upgraded.  In consequence, there's no need for any
migration (in fact, any mv from /var/run/sendsigs.omit.d/foo to
/run/sendsigs.omit.d/foo will fail, because they will be the /same/
file as a result of the bind mount or symlink, depending upon if the
system was rebooted or not.

This is the main reason you need the initscripts dependency.  It
ensures that the /run/sendsigs.omit.d path is valid, and removes the
need to special-case Ubuntu.

> Index: debian/ifupdown/functions.sh
> ===================================================================
> --- debian/ifupdown/functions.sh	(revision 1586)
> +++ debian/ifupdown/functions.sh	(working copy)
> @@ -40,12 +40,14 @@
>  WPA_CLI_TIMESTAMP="/var/run/wpa_action.${WPA_IFACE}.timestamp"
>  WPA_CLI_IFUPDOWN="/var/run/wpa_action.${WPA_IFACE}.ifupdown"
>  
> -# sendsigs omission interface, present in initscripts (>= 2.86.ds1-48)
> -if [ -d /lib/init/rw/sendsigs.omit.d/ ]; then
> -	# Debian
> +if [ -d /run/sendsigs.omit.d/ ]; then
> +	# Debian, initscripts (>= 2.88dsf-13.3)
> +	WPA_SUP_OMIT_PIDFILE="/run/sendsigs.omit.d/wpasupplicant.wpa_supplicant.${WPA_IFACE}.pid"
> +elif [ -d /lib/init/rw/sendsigs.omit.d/ ]; then
> +	# Debian, initscripts (< 2.88dsf-13.3)
>  	WPA_SUP_OMIT_PIDFILE="/lib/init/rw/sendsigs.omit.d/wpasupplicant.wpa_supplicant.${WPA_IFACE}.pid"
>  elif [ -d /var/run/sendsigs.omit.d/ ]; then
> -	# Ubuntu, see https://launchpad.net/bugs/181541 for status
> +	# Ubuntu (< "oneiric")
>  	WPA_SUP_OMIT_PIDFILE="/var/run/sendsigs.omit.d/wpasupplicant.wpa_supplicant.${WPA_IFACE}.pid"

/var/run/sendsigs.omit.d may be omitted here.  You can just use the same
'if [ -d /run/sendsigs.omit.d/ ]' logic above as for Debian.

>  else
>  	WPA_SUP_OMIT_PIDFILE=
> Index: debian/wpasupplicant.postinst
> ===================================================================
> --- debian/wpasupplicant.postinst	(revision 1586)
> +++ debian/wpasupplicant.postinst	(working copy)
> @@ -23,6 +23,20 @@
>  		if ! getent group netdev >/dev/null; then
>  			addgroup --quiet --system netdev || true
>  		fi
> +
> +		# Migrate sendsigs pid ommission files to /run
> +		if [ -d /run/sendsigs.omit.d ]; then
> +			for omitd in /lib/init/rw/sendsigs.omit.d \
> +			    /var/run/sendsigs.omit.d

/var/run/sendsigs.omit.d may be omitted entirely here, for the reasons
given above...

> +			do
> +				if [ -d "$omitd" ]; then
> +					for f in ${omitd}/wpasupplicant.*.pid
> +					do
> +						mv "$f" /run/sendsigs.omit.d/

...because it would break here.

> +					done
> +				fi
> +			done
> +		fi
>  		;;
>  	abort-upgrade|abort-deconfigure|abort-remove)
>  		;;
> ---


Regards,
Roger

-- 
  .''`.  Roger Leigh
 : :' :  Debian GNU/Linux             http://people.debian.org/~rleigh/
 `. `'   Printing on GNU/Linux?       http://gutenprint.sourceforge.net/
   `-    GPG Public Key: 0x25BFB848   Please GPG sign your mail.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.alioth.debian.org/pipermail/pkg-wpa-devel/attachments/20110724/9cfeb2e4/attachment-0003.pgp>


More information about the Pkg-wpa-devel mailing list