From 18efa5fa25bcc6a8d6e28250518593d5ceaac060 Mon Sep 17 00:00:00 2001 From: "douglas.royds" Date: Fri, 26 Oct 2018 14:19:50 +1300 Subject: openldap: Reproducibility: Remove user, hostname, pwd from version string This updated patch also sets the date and time strings to the SOURCE_DATE_EPOCH. The WHOWHERE string will now be set to simply "openldap" in the case that a SOURCE_DATE_EPOCH is set. Upstream-Status: Submitted [https://www.openldap.org/its/index.cgi/Incoming?id=8928] Signed-off-by: Douglas Royds Signed-off-by: Khem Raj --- .../remove-user-host-pwd-from-version.patch | 27 ++++++++++++++++++---- 1 file changed, 22 insertions(+), 5 deletions(-) (limited to 'meta-oe') diff --git a/meta-oe/recipes-support/openldap/openldap/remove-user-host-pwd-from-version.patch b/meta-oe/recipes-support/openldap/openldap/remove-user-host-pwd-from-version.patch index 478a680ca..4eb389797 100644 --- a/meta-oe/recipes-support/openldap/openldap/remove-user-host-pwd-from-version.patch +++ b/meta-oe/recipes-support/openldap/openldap/remove-user-host-pwd-from-version.patch @@ -1,12 +1,29 @@ -diff -ru openldap-2.4.46.original/build/mkversion openldap-2.4.46/build/mkversion ---- openldap-2.4.46.original/build/mkversion 2018-03-23 04:44:27.000000000 +1300 -+++ openldap-2.4.46/build/mkversion 2018-10-09 14:34:51.152684040 +1300 -@@ -50,7 +50,7 @@ +diff -ru openldap-2.4.46.orig/build/mkversion openldap-2.4.46/build/mkversion +--- openldap-2.4.46.orig/build/mkversion 2018-10-25 18:46:10.383750480 +1300 ++++ openldap-2.4.46/build/mkversion 2018-10-25 18:46:33.156232586 +1300 +@@ -50,7 +50,15 @@ fi APPLICATION=$1 -WHOWHERE="$USER@`uname -n`:`pwd`" -+WHOWHERE="${SOURCE_DATE_EPOCH:-$USER@`uname -n`:`pwd`}" ++if [ -n "${SOURCE_DATE_EPOCH}" ]; then ++ WHOWHERE="openldap" ++ DATE=$(date -d@$SOURCE_DATE_EPOCH +' %b %d %Y ') ++ TIME=$(date -d@$SOURCE_DATE_EPOCH +' %H:%M:%S ') ++else ++ WHOWHERE="$USER@$(uname -n):$(pwd)" ++ DATE='" __DATE__ "' ++ TIME='" __TIME__ "' ++fi cat << __EOF__ /* This work is part of OpenLDAP Software . +@@ -72,7 +80,7 @@ + "COPYING RESTRICTIONS APPLY\n"; + + $static $const char $SYMBOL[] = +-"@(#) \$$PACKAGE: $APPLICATION $VERSION (" __DATE__ " " __TIME__ ") \$\n" ++"@(#) \$$PACKAGE: $APPLICATION $VERSION ($DATE $TIME) \$\n" + "\t$WHOWHERE\n"; + + __EOF__ -- cgit v1.2.3-54-g00ecf