[PATCH] multipath-tools build: accept KBUILD_BUILD_TIMESTAMP from env

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Chris Lamb <lamby@xxxxxxxxxx>

It would appear KBUILD_BUILD_TIMESTAMP is meant to be used the same way as in
the linux kernel build. For linux, builders are supposed to set
KBUILD_BUILD_TIMESTAMP in the environment if they want a stable timestamp.

The libddmmp makefile however tries to directly call git to get a timestamp,
which fails in a typical Debian build environment, which is not a full git
source tree.

Have libdmmp/Makefile use KBUILD_BUILD_TIMESTAMP from the environment if
available, otherwise use git as before.

Signed-off-by: Chris Hofstaedtler <zeha@xxxxxxxxxx>
---
 libdmmp/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libdmmp/Makefile b/libdmmp/Makefile
index 9ece9528..601933aa 100644
--- a/libdmmp/Makefile
+++ b/libdmmp/Makefile
@@ -75,7 +75,7 @@ docs/man/dmmp_strerror.3:	$(HEADERS)
 	$(Q)TEMPFILE=$(shell mktemp); \
 	cat $^ | perl docs/doc-preclean.pl >$$TEMPFILE; \
 	LC_ALL=C \
-	KBUILD_BUILD_TIMESTAMP=`git log -n1 --pretty=%cd --date=iso -- $^` \
+	KBUILD_BUILD_TIMESTAMP=`echo $$KBUILD_BUILD_TIMESTAMP | grep . || git log -n1 --pretty=%cd --date=iso -- $^` \
 	perl docs/kernel-doc -man $$TEMPFILE | \
 	    perl docs/split-man.pl docs/man; \
 	$(RM) -f $$TEMPFILE
-- 
2.39.2

--
dm-devel mailing list
dm-devel@xxxxxxxxxx
https://listman.redhat.com/mailman/listinfo/dm-devel




[Index of Archives]     [DM Crypt]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Packaging]     [Fedora SELinux]     [Yosemite Discussion]     [KDE Users]     [Fedora Docs]

  Powered by Linux