From patchwork Wed Jul 11 19:51:18 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Baruch Siach X-Patchwork-Id: 942668 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=busybox.net (client-ip=140.211.166.133; helo=hemlock.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=tkos.co.il Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 41QqTT0RSXz9s1R for ; Thu, 12 Jul 2018 05:51:57 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id A2A6C835E5; Wed, 11 Jul 2018 19:51:54 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 1b13UINEe2na; Wed, 11 Jul 2018 19:51:50 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id DCA178301D; Wed, 11 Jul 2018 19:51:50 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 467B11BFC53 for ; Wed, 11 Jul 2018 19:51:49 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 443E686AC7 for ; Wed, 11 Jul 2018 19:51:49 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id B5viKXF5M6YF for ; Wed, 11 Jul 2018 19:51:47 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mx.tkos.co.il (guitar.tcltek.co.il [192.115.133.116]) by whitealder.osuosl.org (Postfix) with ESMTPS id 3CF10854A0 for ; Wed, 11 Jul 2018 19:51:46 +0000 (UTC) Received: from tarshish.tkos.co.il (unknown [10.0.8.6]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mx.tkos.co.il (Postfix) with ESMTPS id 3ED7B44004B; Wed, 11 Jul 2018 22:51:26 +0300 (IDT) From: Baruch Siach To: buildroot@busybox.net Date: Wed, 11 Jul 2018 22:51:18 +0300 Message-Id: <2b42d6f4f947a7423813916cd6f8e5f37c5b113a.1531338679.git.baruch@tkos.co.il> X-Mailer: git-send-email 2.18.0 Subject: [Buildroot] [PATCH v2 1/2] coreutils: fix chroot installation X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.24 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Carlos Santos , Thomas Petazzoni MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Since commit 256bb383fb7 (coreutils: use single binary in symlink method) the chroot move command creates a dangling symlink, because the symlink target is 'coreutils' which is not in the /usr/sbin/ directory. Instead of moving, remove the coreutils installed symlink, and create a new one in $(TARGET_DIR)/usr/sbin with the correct target. Should also fix (busybox): http://autobuild.buildroot.net/results/6b3/6b39648b466738162516aa50ab328d839ec85448/ Cc: Carlos Santos Cc: Thomas Petazzoni Signed-off-by: Baruch Siach --- v2: Drop ../usr from symlink target (Arnout, Carlos) --- package/coreutils/coreutils.mk | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/package/coreutils/coreutils.mk b/package/coreutils/coreutils.mk index 3cb96589f228..2fb4a32c794f 100644 --- a/package/coreutils/coreutils.mk +++ b/package/coreutils/coreutils.mk @@ -114,7 +114,8 @@ define COREUTILS_CLEANUP # link for archaic shells ln -fs test $(TARGET_DIR)/usr/bin/[ # gnu thinks chroot is in bin, debian thinks it's in sbin - mv -f $(TARGET_DIR)/usr/bin/chroot $(TARGET_DIR)/usr/sbin/chroot + rm -f $(TARGET_DIR)/usr/bin/chroot + ln -sf ../bin/coreutils $(TARGET_DIR)/usr/sbin/chroot endef COREUTILS_POST_INSTALL_TARGET_HOOKS += COREUTILS_CLEANUP From patchwork Wed Jul 11 19:51:19 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Baruch Siach X-Patchwork-Id: 942667 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=busybox.net (client-ip=140.211.166.137; helo=fraxinus.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=tkos.co.il Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 41QqTQ2VHhz9s01 for ; Thu, 12 Jul 2018 05:51:54 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 050C586FB6; Wed, 11 Jul 2018 19:51:52 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 6UREz8TcEYdU; Wed, 11 Jul 2018 19:51:50 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id 3DABE86ECB; Wed, 11 Jul 2018 19:51:50 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 195811BFC53 for ; Wed, 11 Jul 2018 19:51:49 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 16F6287662 for ; Wed, 11 Jul 2018 19:51:49 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id v+8p6JfcdmTf for ; Wed, 11 Jul 2018 19:51:47 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mx.tkos.co.il (guitar.tcltek.co.il [192.115.133.116]) by whitealder.osuosl.org (Postfix) with ESMTPS id 3DF2586AC7 for ; Wed, 11 Jul 2018 19:51:47 +0000 (UTC) Received: from tarshish.tkos.co.il (unknown [10.0.8.6]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mx.tkos.co.il (Postfix) with ESMTPS id 9B54344044D; Wed, 11 Jul 2018 22:51:26 +0300 (IDT) From: Baruch Siach To: buildroot@busybox.net Date: Wed, 11 Jul 2018 22:51:19 +0300 Message-Id: <5821c4c9a85e95a15423616c8a7f674df515b714.1531338679.git.baruch@tkos.co.il> X-Mailer: git-send-email 2.18.0 In-Reply-To: <2b42d6f4f947a7423813916cd6f8e5f37c5b113a.1531338679.git.baruch@tkos.co.il> References: <2b42d6f4f947a7423813916cd6f8e5f37c5b113a.1531338679.git.baruch@tkos.co.il> Subject: [Buildroot] [PATCH v2 2/2] coreutils: optimize the '[' symlink X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.24 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Link '[' directly to the coreutils binary instead of going through 'test'. Suggested-by: Arnout Vandecappelle Signed-off-by: Baruch Siach --- v2: New patch in this series --- package/coreutils/coreutils.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/coreutils/coreutils.mk b/package/coreutils/coreutils.mk index 2fb4a32c794f..7e7251ff7396 100644 --- a/package/coreutils/coreutils.mk +++ b/package/coreutils/coreutils.mk @@ -112,7 +112,7 @@ endif define COREUTILS_CLEANUP # link for archaic shells - ln -fs test $(TARGET_DIR)/usr/bin/[ + 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