From patchwork Mon Jul 20 19:53:30 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Spooren X-Patchwork-Id: 1332627 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.openwrt.org (client-ip=2001:8b0:10b:1231::1; helo=merlin.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=aparcar.org Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=merlin.20170209 header.b=FZfTcLk3; dkim-atps=neutral Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:8b0:10b:1231::1]) (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 ozlabs.org (Postfix) with ESMTPS id 4B9XXF5c6qz9sRR for ; Tue, 21 Jul 2020 05:55:41 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject: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=Cu2NGoLIjh8YGoQIaJ1+0XX6aSjARPWbylEIeWlg4xI=; b=FZfTcLk3s1CMtCKrjnbRjeYRgT Dx3tc+Ab+AXqZEyzrFNg4HCdYCzaywZO38ABEJGabkagFFhJM35GnoLaLQ+4xmhTEQjsgTCp2VSFJ YSj6k9RM3AAnP9a5RDVbIBDkofYcdLZjnL1kWk20uOpWIvonIQVoTVdrViwj1o1q5mhj5jD2SHr1z Wh6lntJaWyA48JYey/aCyMAn0kGqyuRdgnIUnzNfGkX0Bn+5P8h0SggkXCP/94tIU3lr2pHfpCdWL lcgcVhT9nkfflvgu3o3IRX9gn8/gV7r1VoWP/e3Kiq/zOk8GdtOXeFpY9BBrt77qGwPLXSVo+fztX wYIenkmw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jxbrl-0002O8-10; Mon, 20 Jul 2020 19:54:25 +0000 Received: from relay11.mail.gandi.net ([217.70.178.231]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jxbrh-0002Nc-RC for openwrt-devel@lists.openwrt.org; Mon, 20 Jul 2020 19:54:23 +0000 Received: from dawn.lan (udp224251uds.hawaiiantel.net [72.234.141.215]) (Authenticated sender: mail@aparcar.org) by relay11.mail.gandi.net (Postfix) with ESMTPA id F2397100008; Mon, 20 Jul 2020 19:54:13 +0000 (UTC) From: Paul Spooren To: openwrt-devel@lists.openwrt.org Subject: [PATCH v2] build: store buildsystem revision in packages Date: Mon, 20 Jul 2020 09:53:30 -1000 Message-Id: <20200720195329.411647-1-mail@aparcar.org> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200720_155422_063376_65684778 X-CRM114-Status: GOOD ( 10.79 ) X-Spam-Score: -0.7 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-0.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [217.70.178.231 listed in list.dnswl.org] 0.0 RCVD_IN_MSPIKE_H4 RBL: Very Good reputation (+4) [217.70.178.231 listed in wl.mailspike.net] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record 0.0 RCVD_IN_MSPIKE_WL Mailspike good senders X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Paul Spooren Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org Buildinfo files were added to allow reproducible builds testing. The combination of the three buildinfo files {feeds,config,version}.buildinfo allows to recreate the buildsystem and check if compiled binaries are bit for bit the same as distributed on official servers. To support the verification efforts of the reproducible-builds.org team this patch adds the buildsystem revision to the packages manifest. This way all external feeds can be rebuild and verified. Instead of adding a single file to the package folder containing the revision, the *in package storage* of revisions allows incremental updates. Even though the buildbots currently rebuild all packages in each cycle, it would also be possible to only rebuild upgraded packages in the future. To keep the packages index small, as it is downloaded and stored on devices, it isn't added to the index and but only to the manifest. Tested with buildsystem and SDK on ath79/generic. Signed-off-by: Paul Spooren --- v2: Improved the commit message include/package-ipkg.mk | 1 + package/Makefile | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/include/package-ipkg.mk b/include/package-ipkg.mk index 622cbf3223..1dc8dc8f56 100644 --- a/include/package-ipkg.mk +++ b/include/package-ipkg.mk @@ -184,6 +184,7 @@ $$(call addfield,Depends,$$(Package/$(1)/DEPENDS) )$$(call addfield,License,$(LICENSE) )$$(call addfield,LicenseFiles,$(LICENSE_FILES) )$$(call addfield,Section,$(SECTION) +)$$(call addfield,BuildsystemRevision,$(REVISION) )$$(call addfield,Require-User,$(USERID) )$(if $(PKG_CPE_ID),CPE-ID: $(PKG_CPE_ID) )$(if $(filter hold,$(PKG_FLAGS)),Status: unknown hold not-installed diff --git a/package/Makefile b/package/Makefile index 58c1ba2bbf..9ab99dadc3 100644 --- a/package/Makefile +++ b/package/Makefile @@ -84,7 +84,7 @@ $(curdir)/index: FORCE mkdir -p $$d; \ cd $$d || continue; \ $(SCRIPT_DIR)/ipkg-make-index.sh . 2>&1 > Packages.manifest; \ - grep -vE '^(Maintainer|LicenseFiles|Source|SourceName|Require)' Packages.manifest > Packages; \ + grep -vE '^(Maintainer|LicenseFiles|Source|SourceName|Require|BuildsystemRevision)' Packages.manifest > Packages; \ case "$$(((64 + $$(stat -L -c%s Packages)) % 128))" in 110|111) \ $(call ERROR_MESSAGE,WARNING: Applying padding in $$d/Packages to workaround usign SHA-512 bug!); \ { echo ""; echo ""; } >> Packages;; \