From: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH v2] package/coreutils: allow building individual binaries
Date: Thu, 11 Apr 2019 18:56:58 +0200 [thread overview]
Message-ID: <20190411185658.57ea2a38@windsurf.home> (raw)
In-Reply-To: <20190410201746.14678-1-mmayer@broadcom.com>
Hello Markus,
On Wed, 10 Apr 2019 13:17:46 -0700
Markus Mayer <mmayer@broadcom.com> wrote:
> We add configuration option BR2_PACKAGE_COREUTILS_INDIVIDUAL_BINARIES
> so that coreutils can be built and installed as individual binaries.
> It can be used if the target file system doesn't support symlinks or
> symlinks are undesirable.
>
> The approach is modelled after Busybox's similarly named configuration
> option.
>
> Signed-off-by: Markus Mayer <mmayer@broadcom.com>
I tested this, with BR2_ROOTFS_MERGED_USR and got some broken symlinks
in /bin. I believe your patch is not sufficient. Indeed, it doesn't
take care of the following parts of coreutils.mk:
ifeq ($(BR2_ROOTFS_MERGED_USR),)
define COREUTILS_CLEANUP_BIN
# some things go in /bin rather than /usr/bin
$(foreach f,$(COREUTILS_BIN_PROGS), \
rm -f $(TARGET_DIR)/usr/bin/$(f) && \
ln -sf ../usr/bin/coreutils $(TARGET_DIR)/bin/$(f)
)
endef
COREUTILS_POST_INSTALL_TARGET_HOOKS += COREUTILS_CLEANUP_BIN
endif
This probably needs to be changed to move applets from /usr/bin to /bin
rather than changing the symlinks.
define COREUTILS_CLEANUP
# link for archaic shells
ln -fs coreutils $(TARGET_DIR)/usr/bin/[
# gnu thinks chroot is in bin, debian thinks it's in sbin
rm -f $(TARGET_DIR)/usr/bin/chroot
ln -sf ../bin/coreutils $(TARGET_DIR)/usr/sbin/chroot
endef
The symlink logic here also needs to be adjusted I guess.
Could you fix this and retest ?
Thanks,
Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
next prev parent reply other threads:[~2019-04-11 16:56 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-10 20:17 [Buildroot] [PATCH v2] package/coreutils: allow building individual binaries Markus Mayer
2019-04-10 21:05 ` Peter Korsgaard
2019-04-10 22:04 ` Markus Mayer
2019-04-11 16:56 ` Thomas Petazzoni [this message]
2019-06-05 2:47 ` Markus Mayer
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=20190411185658.57ea2a38@windsurf.home \
--to=thomas.petazzoni@bootlin.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.