File reproducible.patch of Package nss_ldap.13245

could not be sent upstream. http://bugzilla.padl.com is broken
and support at padl.com returns User unknown

make build reproducible

see https://reproducible-builds.org/ for why this is good
and https://reproducible-builds.org/specs/source-date-epoch/ for the definition of this variable

Index: nss_ldap-265/vers_string
===================================================================
--- nss_ldap-265.orig/vers_string
+++ nss_ldap-265/vers_string
@@ -4,6 +4,7 @@
 #
 # Implementation of SGS vers_string which uses CVSVersionInfo.txt.
 
+use POSIX qw(strftime);
 require "cvslib.pl";
 
 $OUTFILE = (-f "version.h") ? "version.h" : "vers.c";
@@ -13,7 +14,8 @@ $HEADER = '$Id: vers_string,v 2.1 2009/1
 if ($ENV{'PROGRAM'}) { $PROGRAM = $ENV{'PROGRAM'}; }
 
 chop($AUTHOR);
-chop($DATE=`date -u`);
+$AUTHOR = "reproducible" if $ENV{SOURCE_DATE_EPOCH};
+$DATE = strftime("%Y-%m-%d %T", gmtime($ENV{SOURCE_DATE_EPOCH} || time));
 chop($CWD=`pwd`);
 
 ($PROJECT, $VERSION) = split(/\-/, &getCVSVersionInfo());
openSUSE Build Service is sponsored by