From patchwork Tue May 8 13:42:02 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Yann E. MORIN" X-Patchwork-Id: 910196 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=free.fr Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="VZ5pSXk3"; dkim-atps=neutral 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 40gLJR4xGDz9rvt for ; Tue, 8 May 2018 23:42:15 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 9ACDC880F4; Tue, 8 May 2018 13:42:13 +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 O20xtDhOvb5l; Tue, 8 May 2018 13:42:12 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id 133FB880F5; Tue, 8 May 2018 13:42:12 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by ash.osuosl.org (Postfix) with ESMTP id 76C111C012F for ; Tue, 8 May 2018 13:42:11 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 6852222152 for ; Tue, 8 May 2018 13:42:11 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 8hutg+VAA0iM for ; Tue, 8 May 2018 13:42:07 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wr0-f194.google.com (mail-wr0-f194.google.com [209.85.128.194]) by silver.osuosl.org (Postfix) with ESMTPS id 3A859244DC for ; Tue, 8 May 2018 13:42:06 +0000 (UTC) Received: by mail-wr0-f194.google.com with SMTP id y15-v6so20640305wrg.11 for ; Tue, 08 May 2018 06:42:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=DcnybWweCBUx2tB+BikGIVZ/1TfTBi7kNEnv+wS4rGY=; b=VZ5pSXk3SZ1XHBT2Ca3v3ESs9DfSfaoQFK/i+jK7mJ06pXsZ6Rf+sTxfavwnX9Wceu Xu/qHamHq4AMXLE9huSHPyPDzhpLqrNV89RqYL1PH6GkFoEglHkwjk3YS9SydYtO/Z+N qoT6Uc9DUGKV3WcdLwrt9IhM9Urtd5DWN2afzpWTR/HXn6IEvw6eeqn+vubWIIGwTjmp roI15FM7RzbM1j6UsBiISJ/+XL0RoEZlPa7a7fcrTVX/LtOi5fnwtBLrCobQvnMUDUfh GNd0d7uzf4Wpqqdhe6CkgtOAdzLexFIWcU2BglAMa3NLsm/wuQS4e+atqCuKCRxiWJTL UWzQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=DcnybWweCBUx2tB+BikGIVZ/1TfTBi7kNEnv+wS4rGY=; b=SEQgyVebkXUZ+zPb/TCwkOLkQakhhzWO/A4Nz4VNYJH1KVI4xXX8OmUDZeLSohHUhb w43bM2g41Ft/kqur2egsbyj8oF+y+qnRUXwNPWqzka2Au048QD8pHnPxdNazvRLVd1Oy +xj7iab2eaqFs+8JLyCmmtmpM/f9kRDIJvvSoBLcFdrfXqXMFoBNA53mgu8TciuO+SzO +MnIq2my/GC1mTxB4sHjGax5mubaP1j6rZyEfqWUbR+etUeQkAPsFD7z6RlBz0+mx4f3 hXnJOKfnLCcp0i+Ac7x1ZBDe2LFyRajNp4Wm3M1qyHlrHYMFLFJ0Bro3CumA+qMAeiJz imrg== X-Gm-Message-State: ALQs6tB5NfMGnli3CxQfc1GUP72KMyWLbCAPnpTuCoqVmWLPC231Z4cK UF5NKaygpdenh4vqSwWrtcpHSA== X-Google-Smtp-Source: AB8JxZoqROn8ucDttV8BlvlewR+zeq6dKa2VgsKNJOc0YlU1mfw8Zi6MisnpILmSLjkke66QMEdLLA== X-Received: by 2002:adf:9615:: with SMTP id b21-v6mr33021766wra.253.1525786924507; Tue, 08 May 2018 06:42:04 -0700 (PDT) Received: from scaer.bzh.lan (2a01cb0886107300517c0c28e3b77189.ipv6.abo.wanadoo.fr. [2a01:cb08:8610:7300:517c:c28:e3b7:7189]) by smtp.gmail.com with ESMTPSA id k126sm14187488wmg.6.2018.05.08.06.42.03 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 08 May 2018 06:42:03 -0700 (PDT) From: "Yann E. MORIN" To: buildroot@buildroot.org Date: Tue, 8 May 2018 15:42:02 +0200 Message-Id: <8b860ca93d0672e9d84d2321027f425fce34181d.1525786906.git.yann.morin.1998@free.fr> X-Mailer: git-send-email 2.14.1 In-Reply-To: References: Subject: [Buildroot] [PATCH 2/2] package/ac: fix install 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: mzweerspenko+bugzilla@gmail.com, "Yann E. MORIN" MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Do not overwrite destination file if it exists. Simliar to bug #10986. Signed-off-by: "Yann E. MORIN" Cc: mzweerspenko+bugzilla@gmail.com --- ...-all-use-install-1-to-install-executables.patch | 67 ++++++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100644 package/acl/0003-all-use-install-1-to-install-executables.patch diff --git a/package/acl/0003-all-use-install-1-to-install-executables.patch b/package/acl/0003-all-use-install-1-to-install-executables.patch new file mode 100644 index 0000000000..9640dd866d --- /dev/null +++ b/package/acl/0003-all-use-install-1-to-install-executables.patch @@ -0,0 +1,67 @@ +From d3bd7b29b79147b4155e78a8ea06ded98b91f92a Mon Sep 17 00:00:00 2001 +From: "Yann E. MORIN" +Date: Tue, 8 May 2018 15:23:57 +0200 +Subject: [PATCH] all: use install(1) to install executables + +When the destination file already exists, the current install script +will overwrite it with the new executable. + +However, when the existing executable is a symlink or hardlink to +something else, like busybox, this effectively overwrites that something +with the new executable, and thus replaces busybox and all its applets +with the code for either of the three commands. + +We fix that by simply calling install(1). install(1) is sufficiently +widespread that we don't bother checking for it, as tis is just a +workaround while waiting for the version bump that will eventually fix +it for good. + +Signed-off-by: "Yann E. MORIN" +--- + chacl/Makefile | 4 ++-- + getfacl/Makefile | 4 ++-- + setfacl/Makefile | 4 ++-- + 3 files changed, 6 insertions(+), 6 deletions(-) + +diff --git a/chacl/Makefile b/chacl/Makefile +index 33858d6..c857329 100644 +--- a/chacl/Makefile ++++ b/chacl/Makefile +@@ -30,6 +30,6 @@ default: $(LTCOMMAND) + include $(BUILDRULES) + + install: default +- $(INSTALL) -m 755 -d $(PKG_BIN_DIR) +- $(LTINSTALL) -m 755 $(LTCOMMAND) $(PKG_BIN_DIR) ++ install -D -m 755 $(LTCOMMAND) $(PKG_BIN_DIR)/$(LTCOMMAND) ++ + install-dev install-lib: +diff --git a/getfacl/Makefile b/getfacl/Makefile +index 7fbafda..8ac63e0 100644 +--- a/getfacl/Makefile ++++ b/getfacl/Makefile +@@ -31,6 +31,6 @@ default: $(LTCOMMAND) + include $(BUILDRULES) + + install: default +- $(INSTALL) -m 755 -d $(PKG_BIN_DIR) +- $(LTINSTALL) -m 755 $(LTCOMMAND) $(PKG_BIN_DIR) ++ install -D -m 755 $(LTCOMMAND) $(PKG_BIN_DIR)/$(LTCOMMAND) ++ + install-dev install-lib: +diff --git a/setfacl/Makefile b/setfacl/Makefile +index c44e7c0..eea2ede 100644 +--- a/setfacl/Makefile ++++ b/setfacl/Makefile +@@ -31,6 +31,6 @@ default: $(LTCOMMAND) + include $(BUILDRULES) + + install: default +- $(INSTALL) -m 755 -d $(PKG_BIN_DIR) +- $(LTINSTALL) -m 755 $(LTCOMMAND) $(PKG_BIN_DIR) ++ install -D -m 755 $(LTCOMMAND) $(PKG_BIN_DIR)/$(LTCOMMAND) ++ + install-dev install-lib: +-- +2.14.1 +