summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKéléfa Sané <kelefa.sane@smile.fr>2025-04-14 13:58:36 +0200
committerKhem Raj <raj.khem@gmail.com>2025-04-15 12:52:20 -0700
commitac086f2f510038a87c2b3fd94c9bf30dc859a844 (patch)
tree690edf345551f454f27e9ce0f46cd66c192a09a1
parentd6c334c52618e0aabd0f3e8989c0d7417a0a4ada (diff)
downloadmeta-openembedded-ac086f2f510038a87c2b3fd94c9bf30dc859a844.tar.gz
multipath-tool: Fix reproducibility issue on libdmmp docs/man pages
Reproducibility test reveal different timestamp values in docs/man pages. The root cause is due to the makefile target rule which update the timestamp not always beeing executed, depending on the order, the target (dmmp_strerror.3) and prerequisite (libdmmp.h) are written on the disk during the clone of the repo. Update recipe to set the KBUILD_BUILD_TIMESTAMP to reproducible timestamp (SOURCE_DATE_EPOCH). Signed-off-by: Kéléfa Sané <kelefa.sane@smile.fr> Reviewed-by: Yoann Congal <yoann.congal@smile.fr> Signed-off-by: Khem Raj <raj.khem@gmail.com>
-rw-r--r--meta-oe/recipes-support/multipath-tools/files/0013-libdmmp-Makefile-Fix-KBUILD_BUILD_TIMESTAMP-usage.patch29
-rw-r--r--meta-oe/recipes-support/multipath-tools/files/0014-libdmmp-Makefile-Add-target-docs-man-dmmp_strerror.3.patch41
-rw-r--r--meta-oe/recipes-support/multipath-tools/multipath-tools_0.11.1.bb3
3 files changed, 73 insertions, 0 deletions
diff --git a/meta-oe/recipes-support/multipath-tools/files/0013-libdmmp-Makefile-Fix-KBUILD_BUILD_TIMESTAMP-usage.patch b/meta-oe/recipes-support/multipath-tools/files/0013-libdmmp-Makefile-Fix-KBUILD_BUILD_TIMESTAMP-usage.patch
new file mode 100644
index 0000000000..4cca7decb8
--- /dev/null
+++ b/meta-oe/recipes-support/multipath-tools/files/0013-libdmmp-Makefile-Fix-KBUILD_BUILD_TIMESTAMP-usage.patch
@@ -0,0 +1,29 @@
1From bcb052a8dadbd0a837986b1e15924b469fc59edc Mon Sep 17 00:00:00 2001
2From: =?UTF-8?q?K=C3=A9l=C3=A9fa=20San=C3=A9?= <kelefa.sane@smile.fr>
3Date: Thu, 3 Apr 2025 10:08:49 +0200
4Subject: [PATCH] libdmmp/Makefile: Fix KBUILD_BUILD_TIMESTAMP usage
5
6Add missing $ (Makefile need to escape '$' as '$$')
7
8Upstream-Status: Submitted [https://lore.kernel.org/dm-devel/20250404122902.2750036-1-sofiane.hamam@smile.fr/]
9
10Signed-off-by: Yoann Congal <yoann.congal@smile.fr>
11Signed-off-by: Sofiane HAMAM <sofiane.hamam@smile.fr>
12Signed-off-by: Kelefa Sane <kelefa.sane@smile.fr>
13---
14 libdmmp/Makefile | 2 +-
15 1 file changed, 1 insertion(+), 1 deletion(-)
16
17diff --git a/libdmmp/Makefile b/libdmmp/Makefile
18index 172ba045..7e0e2509 100644
19--- a/libdmmp/Makefile
20+++ b/libdmmp/Makefile
21@@ -74,7 +74,7 @@ doc: docs/man/dmmp_strerror.3
22 docs/man/dmmp_strerror.3: $(HEADERS)
23 $(Q)TEMPFILE=$(shell mktemp); \
24 cat $^ | perl docs/doc-preclean.pl >$$TEMPFILE; \
25- [ "$KBUILD_BUILD_TIMESTAMP" ] || \
26+ [ "$$KBUILD_BUILD_TIMESTAMP" ] || \
27 KBUILD_BUILD_TIMESTAMP=`git log -n1 --pretty=%cd --date=iso -- $^`; \
28 export KBUILD_BUILD_TIMESTAMP; \
29 LC_ALL=C \
diff --git a/meta-oe/recipes-support/multipath-tools/files/0014-libdmmp-Makefile-Add-target-docs-man-dmmp_strerror.3.patch b/meta-oe/recipes-support/multipath-tools/files/0014-libdmmp-Makefile-Add-target-docs-man-dmmp_strerror.3.patch
new file mode 100644
index 0000000000..aad46c229b
--- /dev/null
+++ b/meta-oe/recipes-support/multipath-tools/files/0014-libdmmp-Makefile-Add-target-docs-man-dmmp_strerror.3.patch
@@ -0,0 +1,41 @@
1From 6e231d887c20b2139db75e6dc6c20107273aaacd Mon Sep 17 00:00:00 2001
2From: =?UTF-8?q?K=C3=A9l=C3=A9fa=20San=C3=A9?= <kelefa.sane@smile.fr>
3Date: Thu, 3 Apr 2025 10:25:30 +0200
4Subject: [PATCH] libdmmp/Makefile: Add target docs/man/dmmp_strerror.3 to
5 .PHONY list
6
7When cloning git repos, depending on the order of written to the disk, target
8docs/man/dmmp_strerror.3 is more recent that the prerequisite
9libdmmp/libdmmp.h this leads to a non reproducible behavior:
10Sometimes, the timestamps are updated in the man pages, sometimes not.
11
12Upstream-Status: Denied
13
14https://lore.kernel.org/dm-devel/72355f1d0984647e91f8c50f1c2295071af49e33.camel@suse.com/
15The patch has been rejected by upstream, who will update the timestamps of the
16manpages with a new commit.
17In order to be reproducible without having a random result, forcing the target
18rebuild by adding it to .PHONY is the more acceptable solution, the alternative
19would have been to use the make -B option which consider all target has
20obsolete and rebuild them all, which is less efficient.
21
22Signed-off-by: Yoann Congal <yoann.congal@smile.fr>
23Signed-off-by: Sofiane HAMAM <sofiane.hamam@smile.fr>
24Signed-off-by: Kelefa Sane <kelefa.sane@smile.fr>
25---
26 libdmmp/Makefile | 2 +-
27 1 file changed, 1 insertion(+), 1 deletion(-)
28
29diff --git a/libdmmp/Makefile b/libdmmp/Makefile
30index 7e0e2509..187bcb8c 100644
31--- a/libdmmp/Makefile
32+++ b/libdmmp/Makefile
33@@ -20,7 +20,7 @@ CFLAGS += $(LIB_CFLAGS) -fvisibility=hidden
34 LIBDEPS += $(shell $(PKG_CONFIG) --libs json-c) -L$(mpathcmddir) -lmpathcmd -lpthread
35
36 all: $(LIBS) doc
37-.PHONY: doc clean install uninstall check speed_test dep_clean
38+.PHONY: doc clean install uninstall check speed_test dep_clean docs/man/dmmp_strerror.3
39
40 $(LIBS): $(OBJS)
41 $(Q)$(CC) $(LDFLAGS) $(SHARED_FLAGS) -Wl,-soname=$@ -o $@ $(OBJS) $(LIBDEPS)
diff --git a/meta-oe/recipes-support/multipath-tools/multipath-tools_0.11.1.bb b/meta-oe/recipes-support/multipath-tools/multipath-tools_0.11.1.bb
index 3037d0da8d..3443175d21 100644
--- a/meta-oe/recipes-support/multipath-tools/multipath-tools_0.11.1.bb
+++ b/meta-oe/recipes-support/multipath-tools/multipath-tools_0.11.1.bb
@@ -45,6 +45,8 @@ SRC_URI = "git://github.com/opensvc/multipath-tools.git;protocol=https;branch=st
45 file://0011-fix-bug-of-do_compile-and-do_install.patch \ 45 file://0011-fix-bug-of-do_compile-and-do_install.patch \
46 file://0012-add-explicit-dependency-on-libraries.patch \ 46 file://0012-add-explicit-dependency-on-libraries.patch \
47 file://0001-libmpathutils-uxsock.c-Include-string.h-for-memcpy.patch \ 47 file://0001-libmpathutils-uxsock.c-Include-string.h-for-memcpy.patch \
48 file://0013-libdmmp-Makefile-Fix-KBUILD_BUILD_TIMESTAMP-usage.patch \
49 file://0014-libdmmp-Makefile-Add-target-docs-man-dmmp_strerror.3.patch \
48 " 50 "
49 51
50LIC_FILES_CHKSUM = "file://COPYING;md5=9ec28527f3d544b51ceb0e1907d0bf3f" 52LIC_FILES_CHKSUM = "file://COPYING;md5=9ec28527f3d544b51ceb0e1907d0bf3f"
@@ -83,6 +85,7 @@ EXTRA_OEMAKE = 'MULTIPATH_VERSION=${PV} DESTDIR=${D} syslibdir=${base_libdir} \
83 modulesloaddir=${sysconfdir}/modules-load.d \ 85 modulesloaddir=${sysconfdir}/modules-load.d \
84 tmpfilesdir=${sysconfdir}/tmpfiles.d \ 86 tmpfilesdir=${sysconfdir}/tmpfiles.d \
85 ${@bb.utils.contains("DISTRO_FEATURES", "systemd", "SYSTEMD=216", "", d)} \ 87 ${@bb.utils.contains("DISTRO_FEATURES", "systemd", "SYSTEMD=216", "", d)} \
88 KBUILD_BUILD_TIMESTAMP="$(date -u -d "@$SOURCE_DATE_EPOCH" +"%Y-%m-%d %H:%M:%S +0000")" \
86 ' 89 '
87 90
88do_install() { 91do_install() {