Bug 74174 - plymouth-populate-initrd installs client and demon binary unders / even if the host install is under /usr
Summary: plymouth-populate-initrd installs client and demon binary unders / even if th...
Status: RESOLVED FIXED
Alias: None
Product: plymouth
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: Ray Strode [halfline]
QA Contact:
URL: https://bugs.gentoo.org/show_bug.cgi?...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-01-29 11:01 UTC by Enrico Tagliavini
Modified: 2014-01-29 14:49 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
Fix initrd binaries install path (714 bytes, patch)
2014-01-29 11:01 UTC, Enrico Tagliavini
Details | Splinter Review

Description Enrico Tagliavini 2014-01-29 11:01:37 UTC
Created attachment 92990 [details] [review]
Fix initrd binaries install path

Original bug is https://bugs.gentoo.org/show_bug.cgi?id=499388

This happens when plymouth is installed under /usr on the host, dracut is used to build the initramfs and systemd dracut plugin is enabled. Might happen in other scenario, but I didn't tested.

Plymouth systemd unit files are included in the initramfs since systemd is, but they have the path hardcoded to /usr, since plymouthd and pluymouth are installed in / systemd will fail to start plymouth.

The problem is here in scripts/plymouth-populate-initrd.in (which is what dracut uses to include plymouth)

[ -z "$PLYMOUTH_DAEMON_PATH" ] && PLYMOUTH_DAEMON_PATH="@PLYMOUTH_DAEMON_DIR@/plymouthd"
[ -z "$PLYMOUTH_CLIENT_PATH" ] && PLYMOUTH_CLIENT_PATH="@PLYMOUTH_CLIENT_DIR@/plymouth"

....

inst ${PLYMOUTH_DAEMON_PATH} $INITRDDIR /sbin/plymouthd
inst ${PLYMOUTH_CLIENT_PATH} $INITRDDIR /bin/plymouth

@PLYMOUTH_DAEMON_DIR@ is used in systemd units as well and will be equal to /usr/sbin (when plymouth is compiled with --with-system-root-install=no) and the client one will be /usr/bin . The script installs the binaries in / regardless.

Attached patch is a simple solution to the problem. An alternative might be not using absolute paths in systemd units.
Comment 1 Ray Strode [halfline] 2014-01-29 14:16:45 UTC
Comment on attachment 92990 [details] [review]
Fix initrd binaries install path

Review of attachment 92990 [details] [review]:
-----------------------------------------------------------------

Thanks for this, the patch looks good! I appreciate you spending the time to debug this and follow through to a fix.  In the future, I would appreciate if the patch was created using "git format-patch", so authorship and a commit message accompany it, but this is fine!
Comment 2 Enrico Tagliavini 2014-01-29 14:49:19 UTC
Thank you Ray :). Eheheh sorry for not doing a git format-patch. It was such a small thing that I was not even thinking about involving git at all. I promise I will if I'll need to submit more patches.

Kind regards


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.