[openwrt/openwrt] base-files: add SOURCE_DATE_EPOCH as OPENWRT_BUILD_DATE to os-release
LEDE Commits
lede-commits at lists.infradead.org
Sun Oct 20 14:31:19 PDT 2024
hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/6e6b82ac5f2a33ec2bf14a3d0ac2f03fd787282b
commit 6e6b82ac5f2a33ec2bf14a3d0ac2f03fd787282b
Author: Florian Eckert <fe at dev.tdt.de>
AuthorDate: Thu Oct 20 10:02:45 2022 +0200
base-files: add SOURCE_DATE_EPOCH as OPENWRT_BUILD_DATE to os-release
This commit adds the build date during compilation to the os-release file.
This information can then be used later to output this via the the ubus,
Signed-off-by: Florian Eckert <fe at dev.tdt.de>
Link: https://github.com/openwrt/openwrt/pull/15987
Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
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"
More information about the lede-commits
mailing list