aboutsummaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-support
diff options
context:
space:
mode:
authordouglas.royds <douglas.royds@taitradio.com>2018-10-26 14:19:50 +1300
committerKhem Raj <raj.khem@gmail.com>2018-10-26 05:51:11 -0700
commit18efa5fa25bcc6a8d6e28250518593d5ceaac060 (patch)
tree4121e81f868a6c4bc24f7112099747804e82f162 /meta-oe/recipes-support
parent7bf3b548fc74f01b0c2ebd1c4166b0438f1001a5 (diff)
downloadmeta-openembedded-18efa5fa25bcc6a8d6e28250518593d5ceaac060.tar.gz
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 <douglas.royds@taitradio.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-oe/recipes-support')
-rw-r--r--meta-oe/recipes-support/openldap/openldap/remove-user-host-pwd-from-version.patch27
1 files changed, 22 insertions, 5 deletions
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 478a680ca0..4eb3897972 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 <http://www.openldap.org/>.
+@@ -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__