From patchwork Thu Mar 24 05:55:55 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Petr_=C5=A0tetiar?= X-Patchwork-Id: 1608889 X-Patchwork-Delegate: ynezz@true.cz Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=f+dUwvHl; dkim=fail reason="key not found in DNS" header.d=true.cz header.i=@true.cz header.a=rsa-sha256 header.s=xnet header.b=Dj4jM0Mv; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.openwrt.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=) Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4KPF3c022Dz9sBy for ; Thu, 24 Mar 2022 17:01:47 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=7v1myghMiQi2R1IgA+fWPz48RnePWnCtQAIAzPtmpn0=; b=f+dUwvHlPGtxRK 4mPRSX/cktEIX88n1VxpdbNhLMPuOUriWjEAbpo7vrs8VZf2dl71+Wmi+g9ZedORXkavr4Ut8HpDW URFbvEdcb1UNB+IXhmR7hQbi3ExJ5KaDKXoTewaNgO5IDNu4xDBmPvZN3qiVOZwlSDBeQ0Q3JTp08 O1KuIdXDkHVUCLjwJPdQhaTmdPGtZE5rbyaPLCHQS+DCl9PTR4+Nml8Zf3VlaGJ83wP2agPouamz/ 1cvWnoGlKlUiKh8sDQOJdK5gtwxLtd9ukevNzmLL+l3qKI4lGP5EhXnZLmHLAgtqZ7o7oWXZmoabw wG9z2L6fTjDuPPWs/RVg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nXGSA-00Fi4d-Te; Thu, 24 Mar 2022 05:56:11 +0000 Received: from smtp-out.xnet.cz ([178.217.244.18]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nXGS7-00Fi3d-49 for openwrt-devel@lists.openwrt.org; Thu, 24 Mar 2022 05:56:09 +0000 Received: from meh.true.cz (meh.true.cz [108.61.167.218]) (Authenticated sender: petr@true.cz) by smtp-out.xnet.cz (Postfix) with ESMTPSA id 4BE00181F5; Thu, 24 Mar 2022 06:55:59 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=true.cz; s=xnet; t=1648101359; bh=9eU9F0riMuMwuPVNb2v6Qel9ZhG76AUHo1xvaS8sEhE=; h=From:To:Cc:Subject:Date; b=Dj4jM0MvLSrEymN1Lif4LtewzjeFZhqrouPtkolM8hg6apAE6mZE1nzs7OmauR/gk 7uV1hKfPXvR0ZF8kxJ4BBBzkgggXT/lfFGPPViuUN1cx56gj6EwFGXm33gNIK6dUW3 PAFRtg53n6lSoWMy3/+lH+7vzIgcjaxyAHFBzydk= Received: by meh.true.cz (OpenSMTPD) with ESMTP id ba3dd0d7; Thu, 24 Mar 2022 06:55:35 +0100 (CET) From: =?utf-8?q?Petr_=C5=A0tetiar?= To: openwrt-devel@lists.openwrt.org Cc: =?utf-8?q?Petr_=C5=A0tetiar?= Subject: [PATCH] imagebuilder: fix broken image generation with external targets Date: Thu, 24 Mar 2022 06:55:55 +0100 Message-Id: <20220324055555.443-1-ynezz@true.cz> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220323_225607_510811_3CDC1418 X-CRM114-Status: UNSURE ( 8.37 ) X-CRM114-Notice: Please train this message. X-Spam-Score: 0.2 (/) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: When using external targets there is a symlink being created for the target under target/linux which then becomes dangling under Image Builder. Fix it by dereferencing the possible symlink. Tested on IB with external target, ipq40xx and mvebu. Content analysis details: (0.2 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid 0.1 DKIM_INVALID DKIM or DK signature exists, but is not valid X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org When using external targets there is a symlink being created for the target under target/linux which then becomes dangling under Image Builder. Fix it by dereferencing the possible symlink. Tested on IB with external target, ipq40xx and mvebu. Signed-off-by: Petr Štetiar --- target/imagebuilder/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/imagebuilder/Makefile b/target/imagebuilder/Makefile index 8607a2d7094c..3bbadc7204d1 100644 --- a/target/imagebuilder/Makefile +++ b/target/imagebuilder/Makefile @@ -78,7 +78,7 @@ ifneq ($(CONFIG_SIGNATURE_CHECK),) $(CP) -L $(STAGING_DIR_ROOT)/usr/sbin/opkg-key $(PKG_BUILD_DIR)/scripts/ endif - $(CP) $(TOPDIR)/target/linux $(PKG_BUILD_DIR)/target/ + $(CP) -L $(TOPDIR)/target/linux $(PKG_BUILD_DIR)/target/ if [ -d $(TOPDIR)/staging_dir/host/lib/grub ]; then \ $(CP) $(TOPDIR)/staging_dir/host/lib/grub/ $(PKG_BUILD_DIR)/staging_dir/host/lib; \ fi