From patchwork Tue Jun 18 13:23:43 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Eckert X-Patchwork-Id: 1949127 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.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=CJnG4d7R; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.openwrt.org (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=patchwork.ozlabs.org) Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4W3SF23wnmz20Wb for ; Tue, 18 Jun 2024 23:25:57 +1000 (AEST) 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=Z3E5BthRW5KM0qpzlSifxWGvaFnZ9C9wmjUNaLAlCXQ=; b=CJnG4d7RDLODpt jvWk06V7o3spmLCKDr/y2tiVVmjBpMp6O/ZXcAoyCWksoVfSRWuwV6KxpfT6WN7cOd60NmkLfrfOk psVqde5x+JhoJbNXFS2jizonncz+0GJOzuass2/QqKGIE9s+wqLHg0KR2vujStUBeK5pFFOtWi83T Gl33ltZCzwARzMXyeMrl7s199QklbzGEocELinGqR+nieT/sQElPfhdExGsLfnMGDjRA7/nomsbcB p8eugOBza+2dS+H/WzAJj87sO0HBIAbRZGvqMKILp2CRuig486NzgAUC8xQ/UjVdbcjoYv1RjEgd2 RDNemgv5DJRgCV1t+t+w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sJYod-0000000F6Uo-2G8c; Tue, 18 Jun 2024 13:24:03 +0000 Received: from mxout70.expurgate.net ([194.37.255.70]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sJYoZ-0000000F6QT-3zpX for openwrt-devel@lists.openwrt.org; Tue, 18 Jun 2024 13:24:01 +0000 Received: from [127.0.0.1] (helo=localhost) by relay.expurgate.net with smtp (Exim 4.92) (envelope-from ) id 1sJYoS-000wc5-NT; Tue, 18 Jun 2024 15:23:52 +0200 Received: from [195.243.126.94] (helo=securemail.tdt.de) by relay.expurgate.net with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1sJYoS-006aCI-6W; Tue, 18 Jun 2024 15:23:52 +0200 Received: from securemail.tdt.de (localhost [127.0.0.1]) by securemail.tdt.de (Postfix) with ESMTP id D599B240053; Tue, 18 Jun 2024 15:23:51 +0200 (CEST) Received: from mail.dev.tdt.de (unknown [10.2.4.42]) by securemail.tdt.de (Postfix) with ESMTP id 7F9D9240050; Tue, 18 Jun 2024 15:23:51 +0200 (CEST) Received: from localhost.localdomain (unknown [10.2.3.40]) by mail.dev.tdt.de (Postfix) with ESMTPSA id DEDF536F2E; Tue, 18 Jun 2024 15:23:50 +0200 (CEST) From: Florian Eckert To: mail@aparcar.org Cc: Eckert.Florian@googlemail.com, openwrt-devel@lists.openwrt.org Subject: [PATCH] base-files: add SOURCE_DATE_EPOCH /usr/lib/os-release Date: Tue, 18 Jun 2024 15:23:43 +0200 Message-ID: <20240618132343.3740920-1-fe@dev.tdt.de> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mail.dev.tdt.de X-purgate-ID: 151534::1718717032-455A0746-9E45C80A/0/0 X-purgate-type: clean X-purgate: clean X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240618_062400_152821_F5CDB07D X-CRM114-Status: GOOD ( 11.55 ) X-Spam-Score: -0.7 (/) 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: The variable 'SOURCE_DATE_EPOCH' is used in the build system to have a defined build time for the entire software. This information is discovered with the script '/scripts/get_source_date_epoch.sh'. This information is used to generate reproducible binary builds and should therefore be available in the file '/usr/lib/os-release' on the target. Content analysis details: (-0.7 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [194.37.255.70 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.0 T_SCC_BODY_TEXT_LINE No description available. 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 The variable 'SOURCE_DATE_EPOCH' is used in the build system to have a defined build time for the entire software. This information is discovered with the script '/scripts/get_source_date_epoch.sh'. This information is used to generate reproducible binary builds and should therefore be available in the file '/usr/lib/os-release' on the target. Signed-off-by: Florian Eckert --- include/version.mk | 3 ++- package/base-files/files/usr/lib/os-release | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/include/version.mk b/include/version.mk index cdee0976da..1ac29b629a 100644 --- a/include/version.mk +++ b/include/version.mk @@ -104,5 +104,6 @@ VERSION_SED_SCRIPT:=$(SED) 's,%U,$(call sed_escape,$(VERSION_REPO)),g' \ -e 's,%u,$(call sed_escape,$(VERSION_HOME_URL)),g' \ -e 's,%s,$(call sed_escape,$(VERSION_SUPPORT_URL)),g' \ -e 's,%P,$(call sed_escape,$(VERSION_PRODUCT)),g' \ - -e 's,%h,$(call sed_escape,$(VERSION_HWREV)),g' + -e 's,%h,$(call sed_escape,$(VERSION_HWREV)),g' \ + -e 's,%B,$(call sed_escape,$(SOURCE_DATE_EPOCH)),g' diff --git a/package/base-files/files/usr/lib/os-release b/package/base-files/files/usr/lib/os-release index c39913d54f..12db2c0ac6 100644 --- a/package/base-files/files/usr/lib/os-release +++ b/package/base-files/files/usr/lib/os-release @@ -16,3 +16,4 @@ OPENWRT_DEVICE_MANUFACTURER_URL="%m" OPENWRT_DEVICE_PRODUCT="%P" OPENWRT_DEVICE_REVISION="%h" OPENWRT_RELEASE="%D %V %C" +OPENWRT_BUILD_DATE="%B"