From mboxrd@z Thu Jan 1 00:00:00 1970 From: Yann E. MORIN Date: Thu, 20 Jun 2019 22:16:45 +0200 Subject: [Buildroot] [git commit] package/coreutils: allow building as individual binaries In-Reply-To: <20190620192137.DB4A482283@busybox.osuosl.org> References: <20190620192137.DB4A482283@busybox.osuosl.org> Message-ID: <20190620201645.GK2216@scaer> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: buildroot@busybox.net Thomas, Markus, All, On 2019-06-20 21:04 +0200, Thomas Petazzoni spake thusly: > 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. [--SNIP--] > @@ -111,16 +130,28 @@ COREUTILS_CONF_OPTS += --enable-no-install-program=stdbuf > endif > > # link for archaic shells > +ifeq ($(BR2_PACKAGE_COREUTILS_INDIVIDUAL_BINARIES),y) > +define COREUTILS_CREATE_TEST_SYMLINK > + ln -fs test $(TARGET_DIR)/usr/bin/[ > +endef > +else > define COREUTILS_CREATE_TEST_SYMLINK > ln -fs coreutils $(TARGET_DIR)/usr/bin/[ > endef > +endif > COREUTILS_POST_INSTALL_TARGET_HOOKS += COREUTILS_CREATE_TEST_SYMLINK If we are single-binary, then test is it self a symlink to coreutils already, as done by the install of coreutils. If we're multi-binary, then test is standalone. So, in either case, doing the [ -> test symlink should have been valid, no? (sorry I did not reply earlier, I only thought about it after seeing Thomas' split patches.) Regards, Yann E. MORIN. > # gnu thinks chroot is in bin, debian thinks it's in sbin > +ifeq ($(BR2_PACKAGE_COREUTILS_INDIVIDUAL_BINARIES),y) > +define COREUTILS_FIX_CHROOT_LOCATION > + mv $(TARGET_DIR)/usr/bin/chroot $(TARGET_DIR)/usr/sbin > +endef > +else > define COREUTILS_FIX_CHROOT_LOCATION > rm -f $(TARGET_DIR)/usr/bin/chroot > ln -sf ../bin/coreutils $(TARGET_DIR)/usr/sbin/chroot > endef > +endif > COREUTILS_POST_INSTALL_TARGET_HOOKS += COREUTILS_FIX_CHROOT_LOCATION > > $(eval $(autotools-package)) > _______________________________________________ > buildroot mailing list > buildroot at busybox.net > http://lists.busybox.net/mailman/listinfo/buildroot -- .-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------'