Roy Marples wrote: > On 15/06/2010 21:13, Simon Kelley wrote: >> I have the dhcpcd5 package installed and running. It seems to be >> behaving itself and looks like a good start. >> >> Some observations of things that should be looked at. >> >> . The source package should be dhcpcd5, not dhcpcd, since the existing >> source package is dhcpcd > > OK. > >> . The initscript sources /etc/default/dhcpcd, but it doesn't define or >> use any variables. At very least there should be an ENABLED flag, and a >> distributed default file which leaves that disabled. Should it be >> possible to restrict the set of interfaces here too? I'm not clear if >> that can be done in /etc/dhcpcd.conf > > There is no requirement for an ENABLED flag in initscripts. > http://www.debian.org/doc/debian-policy/ch-opersys.html#s-sysvinit > I'll probably just stop it from sourcing /etc/default/dhcpcd as > dhcpcd.conf can handle everything. > > You can restrict interfaces like so in dhcpcd.conf > allowinterfaces eth0 wlan0 > denyinterfaces br0 > >> . Coexistence with dhcpcd3 >> >> The following files are in both dhcpcd and dhcpcd5 >> >> /etc/default/dhcpcd >> /usr/share/man/man8/dhcpcd.8.gz >> /sbin/dhcpcd >> >> dhcpcd5 conflicts with dhcpcd, so the man page and binary are OK, but >> the default file isn't, since it's a config file that could be left even >> after dhcpcd has been removed. It should probably be /etc/default/dhcpcd5 >> >> It's worth thinking about designing dhcpcd5 so that it doesn't conflict >> with dhcpcd. Since taking a working system with dhcpcd and installing >> dhcpcd5 isn't going to keep it working by having dhpcd5 take over, >> making installation of dhcpcd5 cause removal of dhcpcd looks unfriendly. >> The other DHCP clients in Debian can be installed simultaneously, I >> think. The simplest way to do that would be to make the binary >> /sbin/dhcpcd5 and the man page similarly. NOte that if /sbin/dhcpcd >> exists, it's going to be called by ifup. If it doesn't accept the flags >> that ifup provides and work compatibly under those circumstances, then >> it needs to be called something else. >> >> The preinst removal of files left by dhcpcd is wrong, a package should >> not touch files belonging to a different package. > > The above comes from the view that dhcpcd-5 can co-exist with dhcpcd-3. > Whilst they can physically exist on the same system both being present > can cause a few issues: > * Confusion as to which dhcpcd version and documentation is being used > * dhcpcd running as a single daemon will conflict with dhcpcd per > interface as setup in /etc/networking/interfaces due to start order. > > The only valid reason for co-existence so far is that some flags have > been removed from the commandline that could be used by other > people/programs. dhcpcd-4 shipped with some compat code to handle the > transition from dhcpcd-123 to dhcpcd-4, to give both developers and > users time to migrate. Debian doesn't have this luxury as it skipped > dhcpcd-4 entirely! However, a patch can be maintained to add these > compat flags back again. I could not find the source to ifup my Ubuntu > to find out what flags it passes to dhcpcd - can you tell me please?
To get the source on any sane debian system, just do apt-get source ifupdown > > So unless anyone as any other other reasons why co-existance is > benefical I'll work on a new dhcpcd package today. > I still bear the scars from an email I once got from someone who had driven 200 miles to reboot a box which had dropped off the net as a result of an automatic update to dhcpcd. If it's possible to make a package for dhcpcd 5 which can be installed and, under all circumstances, seamlessly replace dhcpcd 3 installation then that's what should happen, no need for dhcpcd5.deb at all. I think we've already established that such a package can't be done except by stretching the backwards compatibilty features in the existing dhcpcd3 package to breaking point, hence the plan to make a new dhcpcd5 package. Given that we've moving to dhcpcd5, it's highly desirable that merely installing dhcpcd5 doesn't disrupt an existing system which is relying on dhcpcd 3 (or any other DHCP client). Next in the priority list is making the dhcpcd5 package as straightforward as possible, but top of the list is not breaking existing systems simply by installing dhcpcd5. It should be possible for an admin to install dhcpd5, then configure it at leisure and finally remove dhcpcd3 or other client. To achieve this, it's necessary that installing dhcpcd5 doesn't cause automatic removal of dhcpcd3, hence they can't conflict, and therefore must no contain any of the same files. It's also necessary that a new dhcpcd5 installation doesn't start trying to configure interfaces when it is first installed, as these may be (probably are) configured by dhcpcd3 and the wider ifupdown system. Hence my suggestion for an ENABLED flag; though there are other ways to achieve this aim. > After careful perusal of the interfaces man page (still can't find the > source for ifup to ensure I'm correct), the only options passed to > dhcpcd are -h $hostname -i $vendor -I $client -l $leasetime > These options still exist and are valid. Good, but what about <interfacename> which is also passed? > With the removal (or just non usage) of /etc/defaults/dhcpcd any > existing user options are just ignored and the user is expected to put > any configuration into /etc/dhcpcd.conf. > I've also solved the init script vs network/interfaces issue by > grepping for iface * inet dhcp and aborting if such a match is found. Aborting installation, or start-up. The best approach is to have a dhcpcd5 package which can be installed and configured at leisure (see above for more details) As such, I cannot justify a reason for having to maintain co-existance with older dhcpcd versions. Again see above for arguments for this. > The only question remainig that I can see is do we want to attempt to > parse /etc/defaults/dhcpcd into /etc/dhcpcd.conf on upgrade? That > would requre bash to be installed and I'm not sure that it's worth the > time spent. A dependency on bash is no big deal, if you want it. I can understand that the biggest problem with making the set of files in dhcpcd3 and dhcpcd5 disjoint is the man page: much better to be able to type "man dhcpcd" rather then "man dhcpcd5". This is achievable by using Debian's "alternatives" system. It would need a new version of dhcpcd3, but that's quite possible. Cheers, Simon. -- To UNSUBSCRIBE, email to [email protected] with a subject of "unsubscribe". Trouble? Contact [email protected]

