system: add build date to ubus output main master
authorFlorian Eckert <fe@dev.tdt.de>
Mon, 22 Jul 2024 09:24:18 +0000 (11:24 +0200)
committerHauke Mehrtens <hauke@hauke-m.de>
Sun, 20 Oct 2024 21:33:14 +0000 (23:33 +0200)
In the buildsystm the value 'SOURCE_DATE_EPOCH' is used for reproducible
builds. This commit adds the new information to the system board ubus call.

This information must also be added during the openwrt build to the
'/usr/lib/os-release' file so that this can be read.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
system.c

index dcc37e0e1d09ec6243bd81471ee496785a292a1b..680ead97618ff432beaa2b406b69f420546c1bf6 100644 (file)
--- a/system.c
+++ b/system.c
@@ -279,6 +279,8 @@ static int system_board(struct ubus_context *ctx, struct ubus_object *obj,
                                key = "target";
                        else if (!strcasecmp(key, "PRETTY_NAME"))
                                key = "description";
+                       else if (!strcasecmp(key, "OPENWRT_BUILD_DATE"))
+                               key = "builddate";
                        else
                                continue;