Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 437108 - sys-kernel/dracut should RDEPEND on net-misc/dhcp[ipv6]
Summary: sys-kernel/dracut should RDEPEND on net-misc/dhcp[ipv6]
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Amadeusz Żołnowski (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-10-03 23:07 UTC by Stefan Reimer
Modified: 2012-10-28 11:31 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Stefan Reimer 2012-10-03 23:07:23 UTC
Net boot dhcp via dracut initrd calls dhclient with options not available if dhcp was not emerged having "ipv6".

Reproducible: Always




--- dracut-023.ebuild	2012-10-03 16:03:38.261354951 -0700
+++ /mnt/portage/portage/sys-kernel/dracut/dracut-023.ebuild	2012-09-09 10:01:30.000000000 -0700
@@ -77,7 +77,7 @@
 
         debug? ( dev-util/strace )
         device-mapper? ( || ( sys-fs/device-mapper >=sys-fs/lvm2-2.02.33 ) )
-        net? ( net-misc/curl >=net-misc/dhcp-4.2.1-r1[client,ipv6] sys-apps/iproute2 )
+        net? ( net-misc/curl >=net-misc/dhcp-4.2.1-r1[client] sys-apps/iproute2 )
         selinux? ( sys-libs/libselinux sys-libs/libsepol )
         dracut_modules_biosdevname? ( sys-apps/biosdevname )
         dracut_modules_bootchart? ( app-benchmarks/bootchart2 )
Comment 1 Stefan Reimer 2012-10-03 23:10:36 UTC
Sorry, hit submit a bit early ;-)

I added a suggested patch to the dracut ebuild in this bug report.
Also it is available in my overlay.
http://www.startux.de/gitweb/quarks.git/tree/5b2c767517662026fb689afe2729be80824d4ace:/sys-kernel/dracut

Cheers,
Stefan
Comment 2 Amadeusz Żołnowski (RETIRED) gentoo-dev 2012-10-06 09:28:31 UTC
And this is by default? Even if one doesn't use IPv6 at all?
Comment 3 Stefan Reimer 2012-10-06 18:24:25 UTC
Hi,
problem is that in the dracut script the option "-4" or "-6" is used, but if dhcp got compiled without ipv6 it doesnt have -4 nor -6 so the dhcp call fails.
Comment 4 Amadeusz Żołnowski (RETIRED) gentoo-dev 2012-10-07 09:33:59 UTC
I'd rather patch dracut to handle -4/-6 differently if it is easily possible.
Comment 5 Amadeusz Żołnowski (RETIRED) gentoo-dev 2012-10-07 13:19:45 UTC
To think of this, it is net-misc/dhcp bug (therefore I'm CC'ing you, base-system - I hope you agree with me). dhclient should take '-4' argument either if ipv6 is enabled or not enabled.

Stefan, could you do a little test for me?  Please edit file /usr/lib/dracut/modules.d/40network/ifup.sh and change all occurrences of "do_dhcp -4" to "do_dhcp"; next rebuild the image and test if it works in both cases: net-misc/dhcp[ipv6] and net-misc/dhcp[-ipv6].  If it works, I can patch dracut.  In other case net-misc/dhcp requires fix.  Requiring net-misc/dhcp[ipv6] for ipv4 setup is wrong.
Comment 6 Stefan Reimer 2012-10-09 23:19:13 UTC
Hi,
I like the idea of adding a ipv6 USE flag to dracut and patch the dracut module in case it is not set. That's what you think of doing right ?

Btw. I tried to dhcp-p2 from upstream but that version still removes the "-4" option if compiled without ipv6 support.

After thinking about it, dhcp should be fixed to at least not bail out if presented with the "-4" option...

Cheers,
Stefan
Comment 7 SpanKY gentoo-dev 2012-10-10 04:16:48 UTC
should be all set now in the tree; thanks for the report!

Commit message: Always accept the -4 option even when USE=-ipv6
http://sources.gentoo.org/net-misc/dhcp/dhcp-4.2.4_p2-r1.ebuild?rev=1.1
http://sources.gentoo.org/net-misc/dhcp/files/dhcp-4.2.4-always-accept-4.patch?rev=1.1
Comment 8 SpanKY gentoo-dev 2012-10-10 04:30:48 UTC
should be all set now in the tree; thanks for the report!

Commit message: Add fix from upstream for umount with user= options
http://sources.gentoo.org/sys-apps/util-linux/files/util-linux-2.22-umount-user.patch?rev=1.1
http://sources.gentoo.org/sys-apps/util-linux/util-linux-2.22-r1.ebuild?rev=1.1
Comment 9 SpanKY gentoo-dev 2012-10-10 17:31:57 UTC
(In reply to comment #8)

err, copy & paste in chrome screwed me up.  ignore.
Comment 10 Amadeusz Żołnowski (RETIRED) gentoo-dev 2012-10-28 11:31:45 UTC
Stefan, could you confirm that dhcp-4.2.4_p2-r1 solves the issue for you? If yes, I'll make dracut depend on >=4.2.4_p2-r1.