meta-openembedded/meta-initramfs/recipes-devtools/dracut/dracut_108.bb
Koen Kooi e3fc979b65
dracut: update to 108
Drop stale patches, add a patch that enables stripping in an OE enviroment.

Upstream changelog:

* systemd-udevd:  99-systemd.rules added in two places ([a8c0a15c](a8c0a15cf9))
* watchdog:  only install wdctl for the non-systemd case ([ad0fd3a8](ad0fd3a8df))

*   add Debian/Ubuntu specific Dracut configuration ([cba1a2c2](cba1a2c2cd))
*   allow the use of $kernel in initrdname= config ([696397dd](696397dd8d))
*   add support for removing a space separated list of files ([f8dfe3ee](f8dfe3ee5b))
*   make variable set check work with "set -u" ([ee8f4f9d](ee8f4f9d3e))
*   support dracutsysrootdir being unset ([348888b8](348888b8d9))
*   tests are not packaged by default to simplify packaging ([e65a87cf](e65a87cf0a))
*   set hostonly_cmdline config to no by default ([efaee447](efaee44736))
*   set hostonly config by default in configure ([62fdf59c](62fdf59c94))
* Makefile:  explicitly list configs to install ([f7416501](f7416501a7))
* base:  add support for rd.driver.pre ([5ca76df3](5ca76df3a2))
* crypt-gpg:  handle multiple gpg pubkeys ([28ad7910](28ad79106c))
* dracut:
  *  drop DRACUT_PATH and rely on PATH ([2606f985](2606f985d6))
  *  support SOURCE_DATE_EPOCH ([dfcfa6fb](dfcfa6fbe8))
  *  allow users to choose which dlopen dependencies they want ([96a91d04](96a91d04dd))
  *  replace ldd with dracut-install --dry-run or header check ([e8b733f7](e8b733f7c5))
  *  set systemdversion global var using pkg-config ([ed80f9f4](ed80f9f42c))
* dracut-install:
  *  add --dry-run option to replace external ldd usage ([161153f9](161153f901))
  *  extend new ELF parsing code to replace ldd calls ([aac5c914](aac5c914af))
  *  parse ELF .note.dlopen entries for extra deps ([19b5faad](19b5faad97))
* initqueue:  factor out initqueue into its own module ([3daf6783](3daf67830d))
* network-manager:  use upstream initrd services if available ([83dffc58](83dffc58f6))
* resume:  do not depend on initqueue if systemd is used ([34457e07](34457e070b))
* rootfs-block-fallback:  factor out rootfallback into its own module ([2676f1a5](2676f1a5fc))
* watchdog:  do not depend on initqueue if systemd is used ([c8dbd9ec](c8dbd9ecc8))

*   load essential storage kernel modules in sloppy hostonly mode ([87304767](87304767b1))
*   increase deteminism by not relying on the default sorting from ls ([c9f6b867](c9f6b8674e))
*   network-manager dracut module no longer depends on systemd ([8f063e23](8f063e2337))
*   support DRACUT_SYSTEMD being unset ([79ffbd28](79ffbd2829))
*   support hostonly being unset ([c85c9324](c85c93245b))
*   support DRACUT_RESOLVE_LAZY being unset ([3d383ba4](3d383ba4fa))
*   loongarch architecture support ([38f44b35](38f44b35d0))
*   let check_vol_slaves_all return 1 when checks on all slaves fail ([b117013b](b117013b78))
*   improve hostonly sloppy mode ([53537ae7](53537ae77e), closes [#1321](https://github.com/dracut-ng/dracut-ng/issues/1321))
*   load more kernel modules in sloppy hostonly mode ([de862885](de862885ec))
* Makefile:  remove test modules after renumbering ([80961ee0](80961ee0b3))
* base:
  *  base module failure if root password is already set ([e4551d40](e4551d403f))
  *  dracut-lib.sh soft depends on poweroff/reboot/halt ([237108c3](237108c332))
  *  support PREFIX being unset ([7bea9dfe](7bea9dfed6))
  *  only create nobody user for nfs dracut module ([8934a8e5](8934a8e50f))
* dmsquash-live:  erofs collision with latest util-linux ([950475e8](950475e848))
* dracut:
  *  only call uname -r if it is safe to do ([3f4497ed](3f4497ed84))
  *  detect if systemd-detect-virt is available before calling it ([5d3298ea](5d3298ea9e))
  *  consolidate reporting running in a container ([000f5dbf](000f5dbfb6))
  *  ensure hardlink deduplication is reproducible ([9fdf683f](9fdf683f6d))
  *  respect PKG_CONFIG env var instead of hardcoding pkg-config ([0ee92dbb](0ee92dbba6))
* dracut-init:  use sysroot when checking udev rule program existence ([c1000cda](c1000cda35))
* dracut-init.sh:
  *  support DRACUT_NO_XATTR being unset ([d520252a](d520252aae))
  *  initialize _files in inst_libdir_file ([2311abeb](2311abeba5))
* dracut-initramfs-restore:  check for Debian initrd.img symlink ([f80128e9](f80128e91a))
* dracut-install:
  *  sort output of --modalias ([41e43068](41e4306840))
  *  install all suppliers of a supplier's module ([80574db7](80574db78c))
  *  do not limit supplier handling to platform bus ([e35c5173](e35c517310))
  *  add sysfs node parents' modules as dependencies ([3607cd8f](3607cd8fcb))
  *  rework broken destination existence logic ([425e263b](425e263be5))
  *  plug memory leak on kerneldir ([082b6b0a](082b6b0a6e))
  *  deadcode.DeadStores static analyzer warnings ([28041543](28041543f6))
* dracut-lib.sh:  initialize variables in getargs ([ef60bd71](ef60bd7179))
* dracut-logger.sh:  initialize errmsg in dlog_init ([f35a8c7f](f35a8c7f04))
* dracut.conf.d:  reserve namespace 50 to out-of-tree configurations ([d470b436](d470b436ae))
* dracut.sh:
  *  do not use uname to detect kernel version in a container ([2b2debd7](2b2debd794))
  *  initialize variables that get exported ([50426818](504268187b))
  *  don't pass empty string as dir ([758f3eaf](758f3eaf61), closes [#1275](https://github.com/dracut-ng/dracut-ng/issues/1275))
* fcoe-uefi:  exit early on empty vlan ([555b6e1d](555b6e1d68))
* fips:  make sha512hmac an optional requirement ([3d319b55](3d319b55a6))
* generic.conf:  increase ordering for generic.conf ([d823fd86](d823fd86d3))
* i18n:  add $dracutsysrootdir to systemd-vconsole-setup.service path ([90956522](90956522ba))
* livenet:  drop stray command call ([9135136d](9135136d7d), closes [#1240](https://github.com/dracut-ng/dracut-ng/issues/1240))
* lsinitrd:  resolve initrd to real path ([22d93bc0](22d93bc0cd))
* man:  document what to expect running dracut non-root ([b853eba8](b853eba876))
* modules:
  *  free up range 00-09 to out of tree dracut modules ([1edcb076](1edcb07619))
  *  document known module dependencies ([2d98ddb5](2d98ddb5d2))
  *  move more modules with unimportant ordering to 70 ([c439438d](c439438d4f))
  *  all modules with 99 ordering should have a unique number ([2199846f](2199846ffe))
* network-manager:  depend on dbus only when using systemd ([58baf861](58baf861c6))
* simpledrm:  add =drivers/gpu/drm/panel ([b7a2f8d0](b7a2f8d0bd))
* systemd:
  *  systemd.volatile needs overlayfs kernel module ([e1452003](e145200352))
  *  make checking for systemd availability consistent ([8e575556](8e575556da))
* systemd-cryptsetup:  don't pull in fido2/pkcs11/tpm2-tss if omitted ([01b369a5](01b369a586))
* systemd-repart:
  *  allow partition format ([02201361](02201361ac))
  *  copy systemd system drop-in configuration ([bb8bf124](bb8bf12452))
* systemd-sysext:
  *  install the required kernel modules ([7f524d3d](7f524d3d24))
  *  make non-hostonly non-host ([e42755c3](e42755c342))
* systemd-sysusers:
  *  maintain users and groups ([50285645](50285645e6))
  *  remove (g)shadow created by systemd-sysusers ([97b5f91f](97b5f91ff0), closes [#1242](https://github.com/dracut-ng/dracut-ng/issues/1242))
* systemd-udevd:  handle root=gpt-auto for systemd-v258 ([fa17b6fb](fa17b6fb0e))
* test:  renumber test modules to 70 ([99ed458b](99ed458b5b))

Signed-off-by: Koen Kooi <koen.kooi@oss.qualcomm.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2025-09-23 07:38:37 -07:00

105 lines
3.9 KiB
BlitzBasic

SUMMARY = "Initramfs generator using udev"
HOMEPAGE = "https://dracut.wiki.kernel.org/index.php/Main_Page"
DESCRIPTION = "Dracut is an event driven initramfs infrastructure. dracut (the tool) is used to create an initramfs image by copying tools and files from an installed system and combining it with the dracut framework, usually found in /usr/lib/dracut/modules.d."
LICENSE = "GPL-2.0-only"
LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
PE = "1"
PV = "108"
SRCREV = "97c5568ec42abd5e6035f0cfa9d319ae6ae4e50a"
SRC_URI = "git://github.com/dracut-ng/dracut-ng.git;protocol=http;branch=main \
file://0001-feat-dracut.sh-try-STRIP-for-strip_cmd-first.patch \
file://0002-fix-broken-symlink-in-dracut-config-examples.patch \
"
DEPENDS += "kmod"
DEPENDS:append:libc-musl = " fts"
inherit bash-completion pkgconfig
EXTRA_OECONF = "--prefix=${prefix} \
--libdir=${nonarch_libdir} \
--datadir=${datadir} \
--sysconfdir=${sysconfdir} \
--sbindir=${sbindir} \
--bindir=${bindir} \
--includedir=${includedir} \
--localstatedir=${localstatedir} \
--disable-documentation \
"
# RDEPEND on systemd optionally
PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}"
PACKAGECONFIG[systemd] = "--with-systemdsystemunitdir=${systemd_unitdir}/system/,,,systemd"
EXTRA_OEMAKE += 'libdir=${nonarch_libdir} LDLIBS="${LDLIBS}" enable_test=no DRACUT_FULL_VERSION=${PV}'
CFLAGS:append = " -fPIC"
LDLIBS:append:libc-musl = " -lfts"
do_configure() {
./configure ${EXTRA_OECONF}
}
do_install() {
oe_runmake install DESTDIR=${D}
# Its Makefile uses cp -arx to install modules.d, so fix the owner
# to root:root
chown -R root:root ${D}/${nonarch_libdir}/dracut/modules.d \
${D}/${nonarch_libdir}/dracut/dracut.conf.d
if ! ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
rm -rf ${D}${nonarch_libdir}/systemd
fi
}
do_install:append:class-target () {
# Generate and install a config file listing where the DISTRO puts things, dracut
# is not always savvy enough to figure it out by itself
# Since this primarily fixes systemd issues, only install it when using systemd.
if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
cat << EOF > ${B}/${DISTRO}.conf
stdloglvl=3
sysloglvl=5
sysctlconfdir=${sysconfdir}/sysctl.d
systemdutildir=${systemd_unitdir}
systemdutilconfdir=${sysconfdir}/systemd
systemdcatalog=${systemd_unitdir}catalog
systemdntpunits=${systemd_unitdir}ntp-units.d
systemdntpunitsconfdir=${sysconfdir}/systemd/ntp-units.d
systemdportable=${systemd_unitdir}/portable
systemdportableconfdir=${sysconfdir}/systemd/portable
systemdsystemunitdir=${systemd_system_unitdir}
systemdsystemconfdir=${sysconfdir}/systemd/system
systemduser=${systemd_user_unitdir}
systemduserconfdir=${sysconfdir}/systemd/user
EOF
install -m 0644 ${B}/${DISTRO}.conf ${D}${libdir}/dracut/dracut.conf.d/
fi
}
FILES:${PN} += "${nonarch_libdir}/kernel \
${nonarch_libdir}/dracut \
${systemd_unitdir} \
"
FILES:${PN}-dbg += "${nonarch_libdir}/dracut/.debug"
CONFFILES:${PN} += "${sysconfdir}/dracut.conf"
# The native variant uses a non-ldd based method of getting library
# dependencies, so ldd is only needed on the target
RDEPENDS:${PN} = "findutils cpio util-linux-blkid util-linux-getopt util-linux bash"
RDEPENDS:${PN}:append:class-target = " ldd"
# This could be optimized a bit, but let's avoid non-booting systems :)
RRECOMMENDS:${PN}:class-target = "kernel-modules \
coreutils \
"
BBCLASSEXTEND = "native nativesdk"
CVE_STATUS[CVE-2010-4176] = "not-applicable-platform: Applies only to Fedora"