diff options
Diffstat (limited to 'meta-oe/recipes-devtools/openocd')
-rw-r--r-- | meta-oe/recipes-devtools/openocd/openocd/0001-Makefile.am-Use-SOURCE_DATE_EPOCH-environment-variab.patch | 38 | ||||
-rw-r--r-- | meta-oe/recipes-devtools/openocd/openocd_git.bb | 6 |
2 files changed, 41 insertions, 3 deletions
diff --git a/meta-oe/recipes-devtools/openocd/openocd/0001-Makefile.am-Use-SOURCE_DATE_EPOCH-environment-variab.patch b/meta-oe/recipes-devtools/openocd/openocd/0001-Makefile.am-Use-SOURCE_DATE_EPOCH-environment-variab.patch new file mode 100644 index 0000000000..a7d7552d5a --- /dev/null +++ b/meta-oe/recipes-devtools/openocd/openocd/0001-Makefile.am-Use-SOURCE_DATE_EPOCH-environment-variab.patch | |||
@@ -0,0 +1,38 @@ | |||
1 | From 65969a2b73ce93db4c80f1706677351b0e57fa72 Mon Sep 17 00:00:00 2001 | ||
2 | From: Sofiane HAMAM <sofiane.hamam@smile.fr> | ||
3 | Date: Fri, 28 Mar 2025 12:31:17 +0100 | ||
4 | Subject: [PATCH] Makefile.am: Use SOURCE_DATE_EPOCH environment variable | ||
5 | |||
6 | This package defines PKGBLDDATE as build timestamp which makes | ||
7 | it non reproducible. Use SOURCE_DATE_EPOCH if it is found, otherwise | ||
8 | use build timestamp. Following best practices, see : | ||
9 | https://reproducible-builds.org/docs/source-date-epoch/ | ||
10 | |||
11 | The patch is BSD compatible too. | ||
12 | |||
13 | Change-Id: I26c1a00f2e8059ae31fe72a794b5962af5a84f44 | ||
14 | Co-developed-by: Yoann Congal <yoann.congal@smile.fr> | ||
15 | Signed-off-by: Yoann Congal <yoann.congal@smile.fr> | ||
16 | Signed-off-by: Sofiane HAMAM <sofiane.hamam@smile.fr> | ||
17 | |||
18 | Upstream-Status: Backport [https://repo.or.cz/openocd.git?a=commit;h=6834f022b96fb1c7f5829166578e01a0ac223cb0] | ||
19 | --- | ||
20 | src/Makefile.am | 5 ++++- | ||
21 | 1 file changed, 4 insertions(+), 1 deletion(-) | ||
22 | |||
23 | diff --git a/src/Makefile.am b/src/Makefile.am | ||
24 | index 6d79cd631..9ca697407 100644 | ||
25 | --- a/src/Makefile.am | ||
26 | +++ b/src/Makefile.am | ||
27 | @@ -30,7 +30,10 @@ if RELEASE | ||
28 | else | ||
29 | %C%_libopenocd_la_CPPFLAGS += -DRELSTR=\"`$(top_srcdir)/guess-rev.sh $(top_srcdir)`\" | ||
30 | %C%_libopenocd_la_CPPFLAGS += -DGITVERSION=\"`cd $(top_srcdir) && git describe`\" | ||
31 | -%C%_libopenocd_la_CPPFLAGS += -DPKGBLDDATE=\"`date +%F-%R`\" | ||
32 | +%C%_libopenocd_la_CPPFLAGS += -DPKGBLDDATE=\"`DATE_FMT=+%F-%R; \ | ||
33 | + SOURCE_DATE_EPOCH="$${SOURCE_DATE_EPOCH:-$$(date +%s)}"; \ | ||
34 | + date -u -d "@$$SOURCE_DATE_EPOCH" "$$DATE_FMT" 2>/dev/null || \ | ||
35 | + date -u -r "$$SOURCE_DATE_EPOCH" "$$DATE_FMT" 2>/dev/null || date -u "$$DATE_FMT"`\" | ||
36 | endif | ||
37 | |||
38 | # add default CPPFLAGS | ||
diff --git a/meta-oe/recipes-devtools/openocd/openocd_git.bb b/meta-oe/recipes-devtools/openocd/openocd_git.bb index 559fe29ff8..3bbe33ca1d 100644 --- a/meta-oe/recipes-devtools/openocd/openocd_git.bb +++ b/meta-oe/recipes-devtools/openocd/openocd_git.bb | |||
@@ -7,8 +7,9 @@ RDEPENDS:${PN} = "libusb1" | |||
7 | SRC_URI = " \ | 7 | SRC_URI = " \ |
8 | git://repo.or.cz/openocd.git;protocol=http;name=openocd;branch=master \ | 8 | git://repo.or.cz/openocd.git;protocol=http;name=openocd;branch=master \ |
9 | git://repo.or.cz/r/git2cl.git;protocol=http;destsuffix=tools/git2cl;name=git2cl;branch=master \ | 9 | git://repo.or.cz/r/git2cl.git;protocol=http;destsuffix=tools/git2cl;name=git2cl;branch=master \ |
10 | git://github.com/msteveb/jimtcl.git;protocol=https;destsuffix=git/jimtcl;name=jimtcl;branch=master \ | 10 | git://github.com/msteveb/jimtcl.git;protocol=https;destsuffix=${BB_GIT_DEFAULT_DESTSUFFIX}/jimtcl;name=jimtcl;branch=master \ |
11 | git://repo.or.cz/r/libjaylink.git;protocol=http;destsuffix=git/src/jtag/drivers/libjaylink;name=libjaylink;branch=master \ | 11 | git://repo.or.cz/r/libjaylink.git;protocol=http;destsuffix=${BB_GIT_DEFAULT_DESTSUFFIX}/src/jtag/drivers/libjaylink;name=libjaylink;branch=master \ |
12 | file://0001-Makefile.am-Use-SOURCE_DATE_EPOCH-environment-variab.patch \ | ||
12 | " | 13 | " |
13 | 14 | ||
14 | SRCREV_FORMAT = "openocd" | 15 | SRCREV_FORMAT = "openocd" |
@@ -18,7 +19,6 @@ SRCREV_jimtcl = "fcbb4499a6b46ef69e7a95da53e30796e20817f0" | |||
18 | SRCREV_libjaylink = "9aa7a5957c07bb6e862fc1a6d3153d109c7407e4" | 19 | SRCREV_libjaylink = "9aa7a5957c07bb6e862fc1a6d3153d109c7407e4" |
19 | 20 | ||
20 | PV = "0.12+git" | 21 | PV = "0.12+git" |
21 | S = "${WORKDIR}/git" | ||
22 | 22 | ||
23 | inherit pkgconfig autotools-brokensep gettext | 23 | inherit pkgconfig autotools-brokensep gettext |
24 | 24 | ||