Skip to contentSkip to conversation

dracut: RDEPEND on systemd optionally & install modules to /usr/lib

PATCH New [email protected] 1 participant 3 messages Sep 17, 2015

lore
Share & tools
lore
#0 lore raw

v2 cover dracut: RDEPEND on systemd optionally & install modules to /usr/lib

From: Wenzong Fan <[email protected]>

V2 changes:

* Move the "PACKAGECONFIG" next to "EXTRA_OECONF".

The following changes since commit 1692d5c3020434404fc1ee6911a60b88287a5efb:

netmap: add new package (2015-09-15 10:49:30 -0400)

are available in the git repository at:

git://git.pokylinux.org/poky-contrib wenzong/dracut
http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=wenzong/dracut

Robert Yang (1):
dracut: RDEPEND on systemd optionally

Wenzong Fan (1):
dracut: install modules to /usr/lib

 meta-initramfs/recipes-devtools/dracut/dracut_git.bb | 20 +++++++++++++-------
 1 file changed, 13 insertions(+), 7 deletions(-)
Signature · 1 line
1.9.1
#1 lore raw

PATCH v2 1/2 dracut: RDEPEND on systemd optionally

From: Robert Yang <[email protected]>

Use PACKAGECONFIG to depend on systemd optionally.

---
 meta-initramfs/recipes-devtools/dracut/dracut_git.bb | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)
meta-initramfs/recipes-devtools/dracut/dracut_git.bb +6 -5
index b7d88fd..3be78ed 100644
@@ -13,9 +13,6 @@ SRC_URI = "git://git.kernel.org/pub/scm/boot/dracut/dracut.git"
 
 S = "${WORKDIR}/git"
 
-inherit distro_features_check
-REQUIRED_DISTRO_FEATURES = "systemd"
-
 EXTRA_OECONF = "--prefix=${prefix} \
                 --libdir=${libdir} \
                 --datadir=${datadir} \
@@ -25,7 +22,11 @@ EXTRA_OECONF = "--prefix=${prefix} \
                 --bindir=${bindir} \
                 --includedir=${includedir} \
                 --localstatedir=${localstatedir} \
-                --systemdsystemunitdir=${systemd_unitdir}/system"
+               "
+
+# RDEPEND on systemd optionally
+PACKAGECONFIG ??= "${@base_contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)}"
+PACKAGECONFIG[systemd] = "--with-systemdsystemunitdir=${systemd_unitdir}/system/,,,systemd"
 
 do_configure() {
     ./configure ${EXTRA_OECONF}
@@ -44,7 +45,7 @@ FILES_${PN} += " ${libdir}/kernel \
                "
 CONFFILES_${PN} += "${sysconfdir}/dracut.conf"
 
-RDEPENDS_${PN} = "systemd findutils cpio util-linux-blkid util-linux-getopt bash ldd"
+RDEPENDS_${PN} = "findutils cpio util-linux-blkid util-linux-getopt bash ldd"
 RDEPENDS_${PN}-bash-completion = "bash-completion"
 
 # This could be optimized a bit, but let's avoid non-booting systems :)
Signature · 1 line
1.9.1
#2 lore raw

PATCH v2 2/2 dracut: install modules to /usr/lib

In reply to [email protected]

From: Wenzong Fan <[email protected]>

The dracut modules will be installed to /usr/lib64 while building 64bit targets with multilib enabled, this causes runtime errors:

dracut: Cannot find /usr/lib/dracut/dracut-functions.sh.
dracut: Are you running from a git checkout?
dracut: Try passing -l as an argument to /usr/bin/dracut

The dracut modules, 50-dracut.install and 51-dracut-rescue.install must be installed to /usr/lib as Fedora 20 does.

---
 meta-initramfs/recipes-devtools/dracut/dracut_git.bb | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)
meta-initramfs/recipes-devtools/dracut/dracut_git.bb +7 -2
index 3be78ed..8733d54 100644
@@ -14,7 +14,7 @@ SRC_URI = "git://git.kernel.org/pub/scm/boot/dracut/dracut.git"
 S = "${WORKDIR}/git"
 
 EXTRA_OECONF = "--prefix=${prefix} \
-                --libdir=${libdir} \
+                --libdir=${prefix}/lib \
                 --datadir=${datadir} \
                 --sysconfdir=${sysconfdir} \
                 --sbindir=${sbindir} \
@@ -28,6 +28,8 @@ EXTRA_OECONF = "--prefix=${prefix} \
 PACKAGECONFIG ??= "${@base_contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)}"
 PACKAGECONFIG[systemd] = "--with-systemdsystemunitdir=${systemd_unitdir}/system/,,,systemd"
 
+EXTRA_OEMAKE += 'libdir=${prefix}/lib'
+
 do_configure() {
     ./configure ${EXTRA_OECONF}
 }
@@ -40,9 +42,12 @@ PACKAGES =+ "${PN}-bash-completion"
 
 FILES_${PN}-bash-completion = "${datadir}/bash-completion"
 
-FILES_${PN} += " ${libdir}/kernel \
+FILES_${PN} += "${prefix}/lib/kernel \
+                ${prefix}/lib/dracut \
                 ${systemd_unitdir} \
                "
+FILES_${PN}-dbg += "${prefix}/lib/dracut/.debug"
+
 CONFFILES_${PN} += "${sysconfdir}/dracut.conf"
 
 RDEPENDS_${PN} = "findutils cpio util-linux-blkid util-linux-getopt bash ldd"
Signature · 1 line
1.9.1