* [Buildroot] [PATCH] fs/cpio: don't fail systems without /dev/null
@ 2022-11-01 18:30 Yann E. MORIN
2022-11-01 20:45 ` Thomas Petazzoni via buildroot
0 siblings, 1 reply; 2+ messages in thread
From: Yann E. MORIN @ 2022-11-01 18:30 UTC (permalink / raw)
To: buildroot; +Cc: Yann E. MORIN, Thomas Petazzoni
We pass all our dracut configuration files via a config dir, but dracut
insist with having one config file. Because we do not want to have to
chose which file we pass (which would then have to be excluded fro; the
config dir), we jsut used an arbitrary empty file, and /dev/null seemed
to be a good candidate.
However, some build environments do not have a complete /dev, and may be
missing entries otherwise taken for granted, like /dev/null. This is
especially the case in constrained environments like containers.
Switch away from using /dev/n ull, and do create an actual empty file
that we can use as the dracut config file.
Fixes: https://gitlab.com/buildroot.org/buildroot/-/jobs/3249828364
Reported-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
---
fs/cpio/cpio.mk | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/fs/cpio/cpio.mk b/fs/cpio/cpio.mk
index d671c337df..061f4a18f1 100644
--- a/fs/cpio/cpio.mk
+++ b/fs/cpio/cpio.mk
@@ -69,12 +69,13 @@ endif
define ROOTFS_CPIO_CMD
mkdir -p $(ROOTFS_CPIO_DIR)/tmp $(ROOTFS_CPIO_DIR)/confdir
+ touch $(ROOTFS_CPIO_DIR)/empty-config
$(foreach cfg,$(ROOTFS_CPIO_DRACUT_CONF_FILES), \
cp $(cfg) $(ROOTFS_CPIO_DIR)/confdir/$(notdir $(cfg))
)
$(HOST_DIR)/bin/dracut \
$(ROOTFS_CPIO_OPTS) \
- -c /dev/null \
+ -c $(ROOTFS_CPIO_DIR)/empty-config \
--confdir $(ROOTFS_CPIO_DIR)/confdir \
--sysroot $(TARGET_DIR) \
--tmpdir $(ROOTFS_CPIO_DIR)/tmp \
--
2.25.1
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [Buildroot] [PATCH] fs/cpio: don't fail systems without /dev/null
2022-11-01 18:30 [Buildroot] [PATCH] fs/cpio: don't fail systems without /dev/null Yann E. MORIN
@ 2022-11-01 20:45 ` Thomas Petazzoni via buildroot
0 siblings, 0 replies; 2+ messages in thread
From: Thomas Petazzoni via buildroot @ 2022-11-01 20:45 UTC (permalink / raw)
To: Yann E. MORIN; +Cc: buildroot
On Tue, 1 Nov 2022 19:30:32 +0100
"Yann E. MORIN" <yann.morin.1998@free.fr> wrote:
> We pass all our dracut configuration files via a config dir, but dracut
> insist with having one config file. Because we do not want to have to
> chose which file we pass (which would then have to be excluded fro; the
> config dir), we jsut used an arbitrary empty file, and /dev/null seemed
> to be a good candidate.
>
> However, some build environments do not have a complete /dev, and may be
> missing entries otherwise taken for granted, like /dev/null. This is
> especially the case in constrained environments like containers.
>
> Switch away from using /dev/n ull, and do create an actual empty file
> that we can use as the dracut config file.
>
> Fixes: https://gitlab.com/buildroot.org/buildroot/-/jobs/3249828364
> Reported-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
> Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
> ---
> fs/cpio/cpio.mk | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
Applied to master, thanks.
Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-11-01 20:46 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-11-01 18:30 [Buildroot] [PATCH] fs/cpio: don't fail systems without /dev/null Yann E. MORIN
2022-11-01 20:45 ` Thomas Petazzoni via buildroot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox