Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Korsgaard <peter@korsgaard.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 02/15 v4] fs/cpio: don't extend packages' permissions table
Date: Sat, 31 Mar 2018 19:43:00 +0200	[thread overview]
Message-ID: <871sg0uonv.fsf@dell.be.48ers.dk> (raw)
In-Reply-To: <1303a4223d2e0a14e009f7585829aef10de66682.1522487149.git.yann.morin.1998@free.fr> (Yann E. MORIN's message of "Sat, 31 Mar 2018 11:05:48 +0200")

>>>>> "Yann" == Yann E MORIN <yann.morin.1998@free.fr> writes:

 > Currently, when we build a cpio filesystem without static devices, we
 > shoehorn the /dev/console node as if it were specified by a package.

 > This means that this device is added for all filesystems as well, not
 > just the cpio. But if we disable cpio, that device is not created for
 > other filesystems.

 > This is not very clean, and may break expectations.

 > Instead, use an explicit mknod as part of the _CMD, as we know it's
 > going to run under fakeroot.

 > This is still visible to all filesystems built after cpio, and not to
 > those built before it, though.

 > Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
 > Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
 > Cc: Arnout Vandecappelle <arnout@mind.be>
 > ---
 >  fs/cpio/cpio.mk | 5 +++--
 >  1 file changed, 3 insertions(+), 2 deletions(-)

 > diff --git a/fs/cpio/cpio.mk b/fs/cpio/cpio.mk
 > index aa4d947fa5..505976512b 100644
 > --- a/fs/cpio/cpio.mk
 > +++ b/fs/cpio/cpio.mk
 > @@ -15,14 +15,15 @@ endef
 >  else
 >  # devtmpfs does not get automounted when initramfs is used.
 >  # Add a pre-init script to mount it before running init
 > +# We must have /dev/console very early, even before /init runs, so
 > +# that it can at least open its stdin/stdout/stderr filedescriptors.
 >  define ROOTFS_CPIO_ADD_INIT
 >  	if [ ! -e $(TARGET_DIR)/init ]; then \
 >  		$(INSTALL) -m 0755 fs/cpio/init $(TARGET_DIR)/init; \
 >  	fi
 > +	mknod -m 0622 $(TARGET_DIR)/dev/console c 5 1

This is executed before makedevs, so we cannot be sure /dev exists (our
default skeleton has it, but a custom one might not).

I've fixed that by adding a mkdir -p $(TARGET_DIR)/dev before mknod.

-- 
Bye, Peter Korsgaard

  reply	other threads:[~2018-03-31 17:43 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-31  9:05 [Buildroot] [PATCH 00/15 v4] fs: support parallel filesystems build Yann E. MORIN
2018-03-31  9:05 ` [Buildroot] [PATCH 01/15 v4] fs: run filesystem hooks under fakeroot Yann E. MORIN
2018-03-31  9:05 ` [Buildroot] [PATCH 02/15 v4] fs/cpio: don't extend packages' permissions table Yann E. MORIN
2018-03-31 17:43   ` Peter Korsgaard [this message]
2018-03-31  9:05 ` [Buildroot] [PATCH 03/15 v4] fs/iso9660: rename internal variable Yann E. MORIN
2018-03-31  9:05 ` [Buildroot] [PATCH 04/15 v4] core: introduce intermediate BASE_TARGET_DIR variable Yann E. MORIN
2018-03-31  9:05 ` [Buildroot] [PATCH 05/15 v4] fs: set per-rootfs variable name Yann E. MORIN
2018-03-31 18:28   ` Arnout Vandecappelle
2018-03-31  9:05 ` [Buildroot] [PATCH 06/15 v4] fs: define per-rootfs directory Yann E. MORIN
2018-03-31  9:05 ` [Buildroot] [PATCH 07/15 v4] fs: use a per-rootfs fakeroot script Yann E. MORIN
2018-03-31 17:50   ` Peter Korsgaard
2018-03-31 18:26   ` Arnout Vandecappelle
2018-03-31 18:43     ` Arnout Vandecappelle
2018-03-31  9:05 ` [Buildroot] [PATCH 08/15 v4] fs: split per-rootfs dependency line Yann E. MORIN
2018-03-31  9:05 ` [Buildroot] [PATCH 09/15 v4] fs: introduce per-rootfs TARGET_DIR variable Yann E. MORIN
2018-03-31 18:30   ` Arnout Vandecappelle
2018-03-31 18:51     ` Yann E. MORIN
2018-03-31 18:57       ` Arnout Vandecappelle
2018-03-31 19:11         ` Yann E. MORIN
2018-03-31  9:05 ` [Buildroot] [PATCH 10/15 v4] fs: new intermediate rootfs-common to gather common dependencies Yann E. MORIN
2018-03-31  9:05 ` [Buildroot] [PATCH 11/15 v4] fs: introduce a macro for reproducible command Yann E. MORIN
2018-03-31  9:05 ` [Buildroot] [PATCH 12/15 v4] fs: use a common tarball as base for the other filesystems Yann E. MORIN
2018-03-31 18:53   ` Arnout Vandecappelle
2018-03-31  9:05 ` [Buildroot] [PATCH 13/15 v4] fs: run packages' filesystem hooks in a copy of target/ Yann E. MORIN
2018-03-31 19:04   ` Arnout Vandecappelle
2018-03-31 20:27     ` Peter Korsgaard
2018-03-31 21:09       ` Arnout Vandecappelle
2018-04-01  9:54         ` Peter Korsgaard
2018-03-31  9:06 ` [Buildroot] [PATCH 14/15 v4] fs: get rid of package-provided post-fs hooks Yann E. MORIN
2018-03-31  9:06 ` [Buildroot] [PATCH 15/15 v4] fs: remove intermediate artefacts Yann E. MORIN
2018-03-31 17:53   ` Peter Korsgaard
2018-03-31 18:53 ` [Buildroot] [PATCH 00/15 v4] fs: support parallel filesystems build Peter Korsgaard

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=871sg0uonv.fsf@dell.be.48ers.dk \
    --to=peter@korsgaard.com \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox