Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 467754 - =sys-kernel/dracut-027 - Cannot install systemd units properly.
Summary: =sys-kernel/dracut-027 - Cannot install systemd units properly.
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: PATCH
Depends on:
Blocks:
 
Reported: 2013-04-28 15:00 UTC by Łukasz Stelmach
Modified: 2013-05-22 17:19 UTC (History)
2 users (show)

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


Attachments
dracut-027-r1.ebuild.patch (dracut-027-r1.ebuild.patch,1.05 KB, patch)
2013-04-29 17:04 UTC, Alexander Tsoy
Details | Diff
dracut-027-r1.ebuild.patch (dracut-027-r1.ebuild.patch,1.20 KB, patch)
2013-04-29 17:07 UTC, Alexander Tsoy
Details | Diff
dracut-027-r1.ebuild.patch (dracut-027-r1.ebuild.patch,1.19 KB, patch)
2013-04-29 17:25 UTC, Alexander Tsoy
Details | Diff
dracut-027-r1.ebuild.patch (dracut-027-r1.ebuild.patch,2.11 KB, patch)
2013-05-14 17:29 UTC, Alexander Tsoy
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Łukasz Stelmach 2013-04-28 15:00:59 UTC
With systemd in DRACUT_MODULES in make.conf and add_dracutmodules in dracut.conf, dracut does not put its units to initramfs. dracut expects them to be installed in /usr/lib/systemd/system not in /usr/lib/dracut/98systemd

-----cut-----
I: *** Including module: systemd ***
I: Skipping program /usr/lib/systemd/system/systemd-ask-password-plymouth.path as it cannot be found and is flagged to be optional
I: Skipping program /usr/lib/systemd/system/systemd-ask-password-plymouth.service as it cannot be found and is flagged to be optional
I: Skipping program /usr/lib/systemd/system/dracut-cmdline.service as it cannot be found and is flagged to be optional
I: Skipping program /usr/lib/systemd/system/dracut-initqueue.service as it cannot be found and is flagged to be optional
I: Skipping program /usr/lib/systemd/system/dracut-mount.service as it cannot be found and is flagged to be optional
I: Skipping program /usr/lib/systemd/system/dracut-pre-mount.service as it cannot be found and is flagged to be optional
I: Skipping program /usr/lib/systemd/system/dracut-pre-pivot.service as it cannot be found and is flagged to be optional
I: Skipping program /usr/lib/systemd/system/dracut-pre-trigger.service as it cannot be found and is flagged to be optional
I: Skipping program /usr/lib/systemd/system/dracut-pre-udev.service as it cannot be found and is flagged to be optional
I: Skipping program /usr/lib/systemd/system/initrd.target.wants/dracut-cmdline.service as it cannot be found and is flagged to be optional
I: Skipping program /usr/lib/systemd/system/initrd.target.wants/dracut-initqueue.service as it cannot be found and is flagged to be optional
I: Skipping program /usr/lib/systemd/system/initrd.target.wants/dracut-mount.service as it cannot be found and is flagged to be optional
I: Skipping program /usr/lib/systemd/system/initrd.target.wants/dracut-pre-mount.service as it cannot be found and is flagged to be optional
I: Skipping program /usr/lib/systemd/system/initrd.target.wants/dracut-pre-pivot.service as it cannot be found and is flagged to be optional
I: Skipping program /usr/lib/systemd/system/initrd.target.wants/dracut-pre-trigger.service as it cannot be found and is flagged to be optional
I: Skipping program /usr/lib/systemd/system/initrd.target.wants/dracut-pre-udev.service as it cannot be found and is flagged to be optional
-----cut-----
Comment 1 Alexander Tsoy 2013-04-29 17:04:18 UTC
Created attachment 346908 [details, diff]
dracut-027-r1.ebuild.patch

2 fixes here:

- install systemd units into correct location
- fix installation of bash-completion script. dracut-027-r1 installs it twice:

$ qlist dracut | grep bash-completion
/usr/share/bash-completion/dracut
/usr/share/bash-completion/completions/dracut

Note that /usr/share/bash-completion/completions is a default location for >=bash-completion-2 (not in Portage yet) and >=bash-completion-1.3-r1 (not stable yet) installs bash-completion.pc pkg-config file.
Comment 2 Alexander Tsoy 2013-04-29 17:07:02 UTC
Created attachment 346910 [details, diff]
dracut-027-r1.ebuild.patch

- do not inherit bash-completion-r1
Comment 3 Alexander Tsoy 2013-04-29 17:16:34 UTC
I didn't test this patch yet, but seems it works.

before:

$ qlist dracut | egrep '.*service$'
/usr/lib/dracut/modules.d/98systemd/dracut-emergency.service
/usr/lib/dracut/modules.d/98systemd/dracut-pre-udev.service
/usr/lib/dracut/modules.d/98systemd/dracut-cmdline.service
/usr/lib/dracut/modules.d/98systemd/rescue.service
/usr/lib/dracut/modules.d/98systemd/dracut-mount.service
/usr/lib/dracut/modules.d/98systemd/dracut-pre-pivot.service
/usr/lib/dracut/modules.d/98systemd/dracut-pre-trigger.service
/usr/lib/dracut/modules.d/98systemd/dracut-pre-mount.service
/usr/lib/dracut/modules.d/98systemd/emergency.service
/usr/lib/dracut/modules.d/98systemd/dracut-initqueue.service

after:

work image # pwd
/var/tmp/portage/sys-kernel/dracut-027-r2/image
work image # find . -name '*.service'
./usr/lib/dracut/modules.d/98systemd/dracut-initqueue.service
./usr/lib/dracut/modules.d/98systemd/emergency.service
./usr/lib/dracut/modules.d/98systemd/dracut-pre-mount.service
./usr/lib/dracut/modules.d/98systemd/dracut-pre-trigger.service
./usr/lib/dracut/modules.d/98systemd/dracut-pre-pivot.service
./usr/lib/dracut/modules.d/98systemd/dracut-mount.service
./usr/lib/dracut/modules.d/98systemd/rescue.service
./usr/lib/dracut/modules.d/98systemd/dracut-cmdline.service
./usr/lib/dracut/modules.d/98systemd/dracut-pre-udev.service
./usr/lib/dracut/modules.d/98systemd/dracut-emergency.service
./usr/lib/systemd/system/dracut-initqueue.service
./usr/lib/systemd/system/dracut-pre-mount.service
./usr/lib/systemd/system/shutdown.target.wants/dracut-shutdown.service
./usr/lib/systemd/system/dracut-shutdown.service
./usr/lib/systemd/system/dracut-pre-trigger.service
./usr/lib/systemd/system/dracut-pre-pivot.service
./usr/lib/systemd/system/dracut-mount.service
./usr/lib/systemd/system/initrd.target.wants/dracut-initqueue.service
./usr/lib/systemd/system/initrd.target.wants/dracut-pre-mount.service
./usr/lib/systemd/system/initrd.target.wants/dracut-pre-trigger.service
./usr/lib/systemd/system/initrd.target.wants/dracut-pre-pivot.service
./usr/lib/systemd/system/initrd.target.wants/dracut-mount.service
./usr/lib/systemd/system/initrd.target.wants/dracut-cmdline.service
./usr/lib/systemd/system/initrd.target.wants/dracut-pre-udev.service
./usr/lib/systemd/system/dracut-cmdline.service
./usr/lib/systemd/system/dracut-pre-udev.service
Comment 4 Alexander Tsoy 2013-04-29 17:25:17 UTC
Created attachment 346912 [details, diff]
dracut-027-r1.ebuild.patch

- "local myconf=..." -> "myconf=..."
Comment 5 Malte Starostik 2013-04-30 08:03:47 UTC
Confirmed working.  In fact while the title might suggest a smallish issue, the impact is actully more severy. Without this fix any system that uses e.g. dracut + systemd + root on LVM actually shows this nasty behaviour:
On boot, dracut times out to the emergency shell, where you need these to get the system running:

systemctl start systemd-udevd
lvm vgchange -ay
Comment 6 Alexander Tsoy 2013-05-14 17:29:28 UTC
Created attachment 348338 [details, diff]
dracut-027-r1.ebuild.patch

- use systemd eclass
Comment 7 Amadeusz Żołnowski (RETIRED) gentoo-dev 2013-05-19 17:16:49 UTC
Thank you Alexander for the patch!  I have removed parts relating to bashcomp leaving bash-completion eclass.  Could you test if my slight modification still works?  I don't have systemd to test with.


+*dracut-027-r2 (19 May 2013)
+
+  19 May 2013; Amadeusz Żołnowski <aidecoe@gentoo.org> +dracut-027-r2.ebuild:
+  Fixes bug #467754:
+
+  - Install systemd units into correct location.
+  - Fix installation of bash-completion script. It used to be installed in two
+  locations.
+
+  Thanks to Alexander Tsoy <alexander@tsoy.me> for patch:
+  https://bugs.gentoo.org/attachment.cgi?id=348338
+
+  Which has been applied slightly modified.
+
Comment 8 Nikoli 2013-05-19 22:44:17 UTC
No, you did it wrong: now dracut installs /dracut

$ file /dracut 
/dracut: Bourne-Again shell script, ASCII text executable
Comment 9 Amadeusz Żołnowski (RETIRED) gentoo-dev 2013-05-20 06:49:55 UTC
Ach, I have had to miss it.  But anyway bashcomp problem is covered in bug #469892.  Please report only problems wrt systemd here.
Comment 10 Malte Starostik 2013-05-22 15:24:57 UTC
-r3 works fine with systemd.
Comment 11 Alexander Tsoy 2013-05-22 15:32:54 UTC
Works for me too.
Comment 12 Amadeusz Żołnowski (RETIRED) gentoo-dev 2013-05-22 17:19:26 UTC
Thank you for testing.