From patchwork Tue Dec 6 22:14:35 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Fainelli X-Patchwork-Id: 703357 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2001:1868:205::9]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3tYGFb0S7dz9t1B for ; Wed, 7 Dec 2016 09:17:07 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="xPyD1qjm"; dkim-atps=neutral Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1cEO0s-0005qY-PF; Tue, 06 Dec 2016 22:15:02 +0000 Received: from mail-pg0-x241.google.com ([2607:f8b0:400e:c05::241]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1cEO0p-0005nB-0v for lede-dev@lists.infradead.org; Tue, 06 Dec 2016 22:14:59 +0000 Received: by mail-pg0-x241.google.com with SMTP id 3so21127389pgd.0 for ; Tue, 06 Dec 2016 14:14:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=GRIQpNiPHTcLxvoyzHP+0KRxLnea9UkYpaRAnz5pMjU=; b=xPyD1qjmQRPGCNneAbe9xvmZsqqxH+ehDvL9LLgWDojQPBDgyvzd/0T2R3NBTrsO/f 6Gf3iu0G3NLQ/8Ff6BYv853XXLUKI/xc1d3QiJPvQYhFVSmbXgeIiW7b7LFk9UwJhwgV FYPrld6Q9FhcY61i9NStXPdh7TbDZkSa4BUpAX4T8TD3sZtDMEi9MgmhiumvPgR1vJNv aUCA/awFtgsyAB5EEqH5gETpFGe3w1mANMq6lwKfgRUmdbjJnOlJEl/0tr74pH58ChPB fMbv8tiZm2l9OdsVensrQL3TBcYtgG+G81E8XOhOpDufY3ICaRiMFAON7vscq32LeCTX hELQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=GRIQpNiPHTcLxvoyzHP+0KRxLnea9UkYpaRAnz5pMjU=; b=laWeYNOhPyMrZ99a+lYGjFh0xTQG45hJFxPhBhGpv8NGwK83HmQVv7M6w7gu6BqOBU mxJdcLV3XWfsXcyqtF/37VI2Vmm4JHg7yCGHujgT5zG+SZCbGPFgpOr6PHKzsFnmmb6X sgOaPlp7CjuSDlyEMtcLmeChjzyfIoymAlXqmXiE4lBh1ejia3P9NH1Bi+yDd4LdwSjn sS993B855hLLWTyxnAIdAi9oCt3HQwHcdm3pkNjzEMMEK5JNFmldxQ5OYPMnnU0redzT A3tgXTOT2tPP3MsJ/0uZhqEoun/XImHX7P/mqSGT8lNUp0qdasd96nPUUkZwPoooswKJ 5Wqw== X-Gm-Message-State: AKaTC032K3dxxbjFDMzJtMz6zy6WIqEHdzaLojd8rboLdPkC8k8W3FkqCC53VrHwReZsNQ== X-Received: by 10.84.176.131 with SMTP id v3mr140471314plb.51.1481062477916; Tue, 06 Dec 2016 14:14:37 -0800 (PST) Received: from stb-bld-03.irv.broadcom.com ([192.19.255.250]) by smtp.gmail.com with ESMTPSA id k25sm36988492pfg.84.2016.12.06.14.14.36 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 06 Dec 2016 14:14:37 -0800 (PST) From: Florian Fainelli To: lede-dev@lists.infradead.org Date: Tue, 6 Dec 2016 14:14:35 -0800 Message-Id: <20161206221435.27872-1-f.fainelli@gmail.com> X-Mailer: git-send-email 2.10.2 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20161206_141459_188214_A0F776D3 X-CRM114-Status: UNSURE ( 8.30 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -2.0 (--) X-Spam-Report: SpamAssassin version 3.4.0 on bombadil.infradead.org summary: Content analysis details: (-2.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [2607:f8b0:400e:c05:0:0:0:241 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (f.fainelli[at]gmail.com) -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid Subject: [LEDE-DEV] [PATCH] package-ipkg: Do not fail build without base-files X-BeenThere: lede-dev@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Florian Fainelli , nbd@nbd.name MIME-Version: 1.0 Sender: "Lede-dev" Errors-To: lede-dev-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org If the base-files package is not selected, we will fail executing the very first postinst script: make[3]: Leaving directory `/local/users/fainelli/openwrt/trunk' cp -fpR /local/users/fainelli/openwrt/trunk/build_dir/target-arm_xscale_musl-1.1.15_eabi/root-orion /local/users/fainelli/openwrt/trunk/build_dir/target-arm_xscale_musl-1.1.15_eabi/root.orig-orion ./usr/lib/opkg/info/busybox.postinst: line 3: /local/users/fainelli/openwrt/trunk/build_dir/target-arm_xscale_musl-1.1.15_eabi/root-orion/lib/functions.sh: No such file or directory ./usr/lib/opkg/info/busybox.postinst: line 4: default_postinst: command not found postinst script ./usr/lib/opkg/info/busybox.postinst has failed with exit code 127 make[2]: *** [package/install] Error 1 Just create postinst/prerm scripts that return 0 to statisfy opkg's requirement while installing packages in the rootfs. Signed-off-by: Florian Fainelli --- include/package-ipkg.mk | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/include/package-ipkg.mk b/include/package-ipkg.mk index afd2d4ef7a21..de02a9dab480 100644 --- a/include/package-ipkg.mk +++ b/include/package-ipkg.mk @@ -197,6 +197,9 @@ $(_endef) printf "Description: "; echo "$$$$DESCRIPTION" | sed -e 's,^[[:space:]]*, ,g'; \ ) > control; \ chmod 644 control; \ + ) + ifneq ($(CONFIG_PACKAGE_base-files),) + (cd $$(IDIR_$(1))/CONTROL; \ ( \ echo "#!/bin/sh"; \ echo "[ \"\$$$${IPKG_NO_SCRIPT}\" = \"1\" ] && exit 0"; \ @@ -211,6 +214,20 @@ $(_endef) chmod 0755 postinst prerm; \ $($(1)_COMMANDS) \ ) + else + (cd $$(IDIR_$(1))/CONTROL; \ + ( \ + echo "#!/bin/sh"; \ + echo "exit 0"; \ + ) > postinst; \ + ( \ + echo "#!/bin/sh"; \ + echo "exit 0"; \ + ) > prerm; \ + chmod 0755 postinst prerm; \ + $($(1)_COMMANDS) \ + ) + endif ifneq ($$(KEEP_$(1)),) @( \