[Resolvconf-devel] What do we need to do to make the Ubuntu version?

Sander van Grieken sander at outrightsolutions.nl
Wed Nov 30 11:42:17 UTC 2011


On 11/29/2011 03:11 PM, Thomas Hood wrote:
> Sander, others,
>
> Marco and I plan to release the current git HEAD as Debian resolvconf 1.62.
>
> Question for this thread: What do we need to do to make the Ubuntu
> version of this?
>
> 1. Handle transition to /run
>
> The resolvconf 1.62 maintainer scripts are carefully crafted to handle
> the transition to /run in Debian.
>
> AIUI Ubuntu is also introducing /run.  I hope and presume that after
> this Debian and Ubuntu packages can use the same locations for
> run-time state files.
>
> But the starting point is different.  In Debian resolvconf formerly
> used /lib/init/rw/ (having earlier used /dev/shm/) whereas in Ubuntu
> resolvconf used /var/run/.  Consequently Ubuntu resolvconf had
> different maintainer scripts: the Ubuntu postinst (version
> 1.48ubuntu1) creates the target directory /var/run/resolvconf/ rather
> than /lib/init/rw/.
>
>       http://patches.ubuntu.com/r/resolvconf/resolvconf_1.48ubuntu1.patch
>
> Maintainer scripts version 1.62 need to copy run-time files to
> /run/resolvconf/ and update the /etc/resolvconf/run symlink.  The
> Ubuntu versions of these maintainer scripts have and do this *from*
> /var/run/resolvconf/ rather than from /lib/init/rw/resolvconf/.
This looks like a minor difference. The structure under /var/run or 
/lib/init/rw is the same, the moving semantics in the maintainer scripts 
as well. Maybe the maintainer scripts should use a variable to contain 
this directory so the maintainer diffs are minimal.

>
> 2. Add upstart support
>
> What is needed for this?
Basically include /etc/init/resolvconf.conf, and disable or remove 
/etc/init.d/resolvconf and its associated /etc/rcS.d/S07resolvconf 
symlink. The upstart script totally replaces the sys-v init script.

The most robust way might be to install it, but detect the presence of 
upstart. I don't know exactly if upstart in debian is already a feasible 
option, and if it can be installed/deinstalled at will, but if so, it 
bypasses any smartness in the postinst script.

For Ubuntu upstart is not optional, so the sysv script can be entirely 
removed.

>
> 3. Carry over Ubuntu tweaks
> 3a. /sbin/resolvconf exits if /etc/resolv.conf is not a symlink
> 3b. debian/control Maintainer, XSBC-Original-Maintainer stuff
> 3c. debian/changelog entries for Ubuntu
> 3d. debian/rules dh_installinit has different init sequence numbers
>
> Regarding #3d: AIUI init sequence numbers are obsolete in the upstart
> world. Yet initscripts are still present in Ubuntu.  And on startup it
> is still necessary to do the equivalent of "/etc/init.d/resolvconf
> start" which, as of resolvconf 1.62 is simply:
>
>          resolvconf --create-runtime-directories
>          resolvconf --enable-updates
>
> So what do we do with the dh_installinit command?
This is where resolvconf on Ubuntu is broken. With the SysV script it 
starts too late if udev handles network devices (thus, devices managed 
by /etc/network/interfaces, not NetworkManager), leading to LP bugs 
366967 and 448095. This is solved by only using the upstart script.

So preferably don't install the SysV script on Ubuntu..

>
> 4. Dependencies
>
> Debian resolvconf 1.62 depends on initscripts (>= 2.88dsf-13.6).  Does
> this need to be different in Ubuntu?
I will test
>
> 5. ...?
>
> What else needs to be changed for the Ubuntu version?
>
Debian is quite far ahead w.r.t. resolvconf. The last merge is at 1.48

Regards,
Sander




More information about the Resolvconf-devel mailing list