base-files: add SOURCE_DATE_EPOCH as OPENWRT_BUILD_DATE to os-release
authorFlorian Eckert <fe@dev.tdt.de>
Thu, 20 Oct 2022 08:02:45 +0000 (10:02 +0200)
committerHauke Mehrtens <hauke@hauke-m.de>
Sun, 20 Oct 2024 21:30:27 +0000 (23:30 +0200)
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@dev.tdt.de>
Link: https://github.com/openwrt/openwrt/pull/15987
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
include/version.mk
package/base-files/files/usr/lib/os-release

index cdee0976dad29fb1f865a3f3f9761e353b58b697..1ac29b629adb6b6eaeb18e45b853cad88b8fc6ca 100644 (file)
@@ -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'
 
index c39913d54fd3e15ee8a3b5804da84dda140428cd..12db2c0ac6668b55c2ee48809b8f35d65b419202 100644 (file)
@@ -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"