Re: [Buildroot] [PATCH 3/3] package/dracut: add subpackage for dracut-util
Fiona Klute via buildroot <[email protected]>
| Newsgroups | net.busybox.buildroot |
|---|---|
| Message-ID | <[email protected]> |
Hi everyone, I'm withdrawing this patch for now. We definitely need target dracut-util for fully functional Dracut (I'm working on getting initramfs with systemd to work, which the current tests exclude), but there are a bunch of things that need fixing upstream, and depending on the results this may take a different shape. Please see [1] if you're interested in the upstream side. And thanks to Julien for excluding it when merging the rest of the series, that was a good call. Best regards, Fiona [1] https://github.com/dracut-ng/dracut/pull/2588 Am 13.08.26 um 16:34 schrieb Fiona Klute: > From: "Fiona Klute (Othermo GmbH)" <[email protected]> > > dracut-util is a small executable that provides dracut-getarg{,s} > commands for scripts in the initramfs. As such it must be built and > installed for the target so it is available when building the > initramfs. > > The reason to create a subpackage instead of adding a target build for > package/dracut is to avoid a conflict in case someone needs "full" > dracut on the target in the future (to build an initramfs on the > target system, outside the Buildroot build). Also using ./configure > would require a dependency on kmod, which is not needed for > dracut-util. > > Signed-off-by: Fiona Klute (Othermo GmbH) <[email protected]> > --- > package/Config.in | 1 + > package/dracut/Config.in | 1 + > package/dracut/Config.in.host | 1 + > package/dracut/dracut-util/Config.in | 14 +++++++++++++ > package/dracut/dracut-util/dracut-util.hash | 1 + > package/dracut/dracut-util/dracut-util.mk | 23 +++++++++++++++++++++ > package/dracut/dracut.mk | 2 ++ > 7 files changed, 43 insertions(+) > create mode 100644 package/dracut/Config.in > create mode 100644 package/dracut/dracut-util/Config.in > create mode 120000 package/dracut/dracut-util/dracut-util.hash > create mode 100644 package/dracut/dracut-util/dracut-util.mk > > diff --git a/package/Config.in b/package/Config.in > index ce316334e1..34a848fa74 100644 > --- a/package/Config.in > +++ b/package/Config.in > @@ -2822,6 +2822,7 @@ menu "System tools" > source "package/docker-credential-acr-env/Config.in" > source "package/docker-credential-gcr/Config.in" > source "package/docker-engine/Config.in" > + source "package/dracut/Config.in" > source "package/dtui/Config.in" > source "package/earlyoom/Config.in" > source "package/efibootmgr/Config.in" > diff --git a/package/dracut/Config.in b/package/dracut/Config.in > new file mode 100644 > index 0000000000..496b72c105 > --- /dev/null > +++ b/package/dracut/Config.in > @@ -0,0 +1 @@ > +source package/dracut/dracut-util/Config.in > diff --git a/package/dracut/Config.in.host b/package/dracut/Config.in.host > index af68728457..51e428ea2f 100644 > --- a/package/dracut/Config.in.host > +++ b/package/dracut/Config.in.host > @@ -1,6 +1,7 @@ > config BR2_PACKAGE_HOST_DRACUT > bool > select BR2_PACKAGE_HOST_KMOD > + select BR2_PACKAGE_DRACUT_UTIL # must be included in initramfs > help > dracut-ng is used to create an initramfs image by > copying tools and files from an installed system > diff --git a/package/dracut/dracut-util/Config.in b/package/dracut/dracut-util/Config.in > new file mode 100644 > index 0000000000..1de35bed40 > --- /dev/null > +++ b/package/dracut/dracut-util/Config.in > @@ -0,0 +1,14 @@ > +config BR2_PACKAGE_DRACUT_UTIL > + bool > + help > + dracut-ng is used to create an initramfs image by > + copying tools and files from an installed system > + and combining it with the dracut framework. > + dracut-ng is a drop-in replacement for the legacy > + dracut project. > + > + This package installs only the dracut-util executable, which > + is needed by many of the Dracut scripts installed into the > + initramfs. > + > + https://dracut-ng.github.io/dracut/ > diff --git a/package/dracut/dracut-util/dracut-util.hash b/package/dracut/dracut-util/dracut-util.hash > new file mode 120000 > index 0000000000..22e15cf0aa > --- /dev/null > +++ b/package/dracut/dracut-util/dracut-util.hash > @@ -0,0 +1 @@ > +../dracut.hash > \ No newline at end of file > diff --git a/package/dracut/dracut-util/dracut-util.mk b/package/dracut/dracut-util/dracut-util.mk > new file mode 100644 > index 0000000000..e14e6bc5ad > --- /dev/null > +++ b/package/dracut/dracut-util/dracut-util.mk > @@ -0,0 +1,23 @@ > +################################################################################ > +# > +# dracut-util > +# > +################################################################################ > + > +# The following assignments work only because dracut.mk is included > +# before this file is. > +DRACUT_UTIL_VERSION = $(DRACUT_VERSION) > +DRACUT_UTIL_SITE = $(DRACUT_SITE) > +DRACUT_UTIL_LICENSE = $(DRACUT_LICENSE) > +DRACUT_UTIL_LICENSE_FILES = $(DRACUT_LICENSE_FILES) > + > +# share the dracut archive, build only src/util > +DRACUT_UTIL_SOURCE = dracut-$(DRACUT_VERSION).tar.gz > +DRACUT_UTIL_DL_SUBDIR = dracut > +DRACUT_UTIL_SUBDIR = src/util > + > +define DRACUT_UTIL_INSTALL_TARGET_CMDS > + $(INSTALL) -D -m 0755 $(@D)/src/util/dracut-util $(TARGET_DIR)/usr/bin/dracut-util > +endef > + > +$(eval $(cmake-package)) > diff --git a/package/dracut/dracut.mk b/package/dracut/dracut.mk > index 0bf755319e..6844ac0b65 100644 > --- a/package/dracut/dracut.mk > +++ b/package/dracut/dracut.mk > @@ -51,3 +51,5 @@ HOST_DRACUT_POST_INSTALL_HOOKS += HOST_DRACUT_POST_INSTALL_BUSYBOX_INIT_MODULE > endif > > $(eval $(host-autotools-package)) > + > +include package/dracut/dracut-util/dracut-util.mk _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot