forked from pool/libheimdal
Accepting request 627941 from home:bmwiedemann:branches:network
Add reproducible.patch to override build date (boo#1047218) Use constant hostname (boo#1084909) OBS-URL: https://build.opensuse.org/request/show/627941 OBS-URL: https://build.opensuse.org/package/show/network/libheimdal?expand=0&rev=21
This commit is contained in:
parent
544cfdcdbc
commit
85f30dff55
@ -1,3 +1,9 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Aug 7 06:22:33 UTC 2018 - bwiedemann@suse.com
|
||||||
|
|
||||||
|
- Add reproducible.patch to override build date (boo#1047218)
|
||||||
|
- Use constant hostname (boo#1084909)
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Fri Dec 29 13:16:21 UTC 2017 - joerg.lorenzen@ki.tng.de
|
Fri Dec 29 13:16:21 UTC 2017 - joerg.lorenzen@ki.tng.de
|
||||||
|
|
||||||
|
@ -28,6 +28,8 @@ Url: http://www.h5l.org
|
|||||||
Source0: heimdal-%{version}-patched.tar.bz2
|
Source0: heimdal-%{version}-patched.tar.bz2
|
||||||
Source2: heimdal-patch-source.sh
|
Source2: heimdal-patch-source.sh
|
||||||
Patch0: heimdal-patched.diff
|
Patch0: heimdal-patched.diff
|
||||||
|
# PATCH-FIX-UPSTREAM bmwiedemann -- make build reproducible (boo#1047218)
|
||||||
|
Patch1: reproducible.patch
|
||||||
%if 0%{?sles_version} == 11
|
%if 0%{?sles_version} == 11
|
||||||
BuildRequires: libcom_err-devel
|
BuildRequires: libcom_err-devel
|
||||||
BuildRequires: sqlite3-devel
|
BuildRequires: sqlite3-devel
|
||||||
@ -98,8 +100,10 @@ libraries are required by 64-bit package of ICAClient version 13.2.
|
|||||||
%prep
|
%prep
|
||||||
%setup -q -n heimdal-%{version}
|
%setup -q -n heimdal-%{version}
|
||||||
%patch0 -p1
|
%patch0 -p1
|
||||||
|
%patch1 -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
|
export SOURCE_HOST=OBS # for reproducible builds (boo#1084909)
|
||||||
autoreconf -fi
|
autoreconf -fi
|
||||||
%configure \
|
%configure \
|
||||||
--with-sqlite3=%{_prefix}
|
--with-sqlite3=%{_prefix}
|
||||||
|
127
reproducible.patch
Normal file
127
reproducible.patch
Normal file
@ -0,0 +1,127 @@
|
|||||||
|
From 6d27e0048963955b547584f004109bbbad6e9baf Mon Sep 17 00:00:00 2001
|
||||||
|
From: Nicolas Williams <nico@twosigma.com>
|
||||||
|
Date: Wed, 27 Sep 2017 15:30:00 -0500
|
||||||
|
Subject: [PATCH] Make builds reproduceable (#336)
|
||||||
|
|
||||||
|
---
|
||||||
|
Makefile.am | 1 -
|
||||||
|
cf/krb-version.m4 | 24 ------------------------
|
||||||
|
configure.ac | 51 ++++++++++++++++++++++++++++++++++++++++++++++-----
|
||||||
|
3 files changed, 46 insertions(+), 30 deletions(-)
|
||||||
|
delete mode 100644 cf/krb-version.m4
|
||||||
|
|
||||||
|
diff --git a/Makefile.am b/Makefile.am
|
||||||
|
index f2bb5ac116..7fb69fdf4e 100644
|
||||||
|
--- a/Makefile.am
|
||||||
|
+++ b/Makefile.am
|
||||||
|
@@ -50,7 +50,6 @@ EXTRA_DIST = \
|
||||||
|
cf/krb-prog-yacc.m4 \
|
||||||
|
cf/krb-sys-aix.m4 \
|
||||||
|
cf/krb-sys-nextstep.m4 \
|
||||||
|
- cf/krb-version.m4 \
|
||||||
|
cf/roken.m4 \
|
||||||
|
cf/valgrind-suppressions \
|
||||||
|
cf/maybe-valgrind.sh \
|
||||||
|
diff --git a/cf/krb-version.m4 b/cf/krb-version.m4
|
||||||
|
deleted file mode 100644
|
||||||
|
index e196d993de..0000000000
|
||||||
|
--- a/cf/krb-version.m4
|
||||||
|
+++ /dev/null
|
||||||
|
@@ -1,24 +0,0 @@
|
||||||
|
-dnl $Id$
|
||||||
|
-dnl
|
||||||
|
-dnl
|
||||||
|
-dnl output a C header-file with some version strings
|
||||||
|
-dnl
|
||||||
|
-
|
||||||
|
-AC_DEFUN([AC_KRB_VERSION],[
|
||||||
|
-cat > include/newversion.h.in <<FOOBAR
|
||||||
|
-const char *${PACKAGE_TARNAME}_long_version = "@(#)\$Version: $PACKAGE_STRING by @USER@ on @HOST@ ($host) @DATE@ \$";
|
||||||
|
-const char *${PACKAGE_TARNAME}_version = "$PACKAGE_STRING";
|
||||||
|
-FOOBAR
|
||||||
|
-
|
||||||
|
-if test -f include/version.h && cmp -s include/newversion.h.in include/version.h.in; then
|
||||||
|
- echo "include/version.h is unchanged"
|
||||||
|
- rm -f include/newversion.h.in
|
||||||
|
-else
|
||||||
|
- echo "creating include/version.h"
|
||||||
|
- User=${USER-${LOGNAME}}
|
||||||
|
- Host=`(hostname || uname -n) 2>/dev/null | sed 1q`
|
||||||
|
- Date=`date`
|
||||||
|
- mv -f include/newversion.h.in include/version.h.in
|
||||||
|
- sed -e "s/@USER@/$User/" -e "s/@HOST@/$Host/" -e "s/@DATE@/$Date/" include/version.h.in > include/version.h
|
||||||
|
-fi
|
||||||
|
-])
|
||||||
|
diff --git a/configure.ac b/configure.ac
|
||||||
|
index 806b639730..212a7d2744 100644
|
||||||
|
--- a/configure.ac
|
||||||
|
+++ b/configure.ac
|
||||||
|
@@ -663,22 +663,63 @@ dnl
|
||||||
|
dnl This is the release version name-number[beta]
|
||||||
|
dnl
|
||||||
|
|
||||||
|
-cat > include/newversion.h.in <<EOF
|
||||||
|
+if test -d "$srcdir/.git"; then
|
||||||
|
+ cat > include/newversion.h.in <<EOF
|
||||||
|
+#ifndef VERSION_HIDDEN
|
||||||
|
+#define VERSION_HIDDEN
|
||||||
|
+#endif
|
||||||
|
+VERSION_HIDDEN const char *heimdal_long_version = "@([#])\$Version: $PACKAGE_STRING by @USER@ on @HOST@ @BRANCH@ @TAG@ ($host) @COMMIT@ @DATE@ \$";
|
||||||
|
+VERSION_HIDDEN const char *heimdal_version = "AC_PACKAGE_STRING";
|
||||||
|
+EOF
|
||||||
|
+else
|
||||||
|
+ cat > include/newversion.h.in <<EOF
|
||||||
|
#ifndef VERSION_HIDDEN
|
||||||
|
#define VERSION_HIDDEN
|
||||||
|
#endif
|
||||||
|
VERSION_HIDDEN const char *heimdal_long_version = "@([#])\$Version: $PACKAGE_STRING by @USER@ on @HOST@ ($host) @DATE@ \$";
|
||||||
|
VERSION_HIDDEN const char *heimdal_version = "AC_PACKAGE_STRING";
|
||||||
|
EOF
|
||||||
|
+fi
|
||||||
|
|
||||||
|
if test -f include/version.h && cmp -s include/newversion.h.in include/version.h.in; then
|
||||||
|
echo "include/version.h is unchanged"
|
||||||
|
rm -f include/newversion.h.in
|
||||||
|
else
|
||||||
|
echo "creating include/version.h"
|
||||||
|
- User=${USER-${LOGNAME}}
|
||||||
|
- Host=`(hostname || uname -n || echo unknown) 2>/dev/null | sed 1q`
|
||||||
|
- Date=`date`
|
||||||
|
+ if test -n "$SOURCE_DATE_EPOCH"; then
|
||||||
|
+ Date=`date -u -d "@$SOURCE_DATE_EPOCH" "+%Y-%m-%dT%H:%M:%SZ"`
|
||||||
|
+ else
|
||||||
|
+ Date=`date -u "+%Y-%m-%dT%H:%M:%SZ"`
|
||||||
|
+ fi
|
||||||
|
+ if test -n "$SOURCE_HOST"; then
|
||||||
|
+ Host=$SOURCE_HOST
|
||||||
|
+ else
|
||||||
|
+ Host=`uname -n`
|
||||||
|
+ fi
|
||||||
|
+ if test -n "$SOURCE_USER"; then
|
||||||
|
+ User=$SOURCE_USER
|
||||||
|
+ else
|
||||||
|
+ User=${USER:-${LOGNAME:-`id -nu`}}
|
||||||
|
+ fi
|
||||||
|
+ if test -d "$srcdir/.git"; then
|
||||||
|
+ GitCommit=`git rev-parse HEAD`
|
||||||
|
+ GitBranch=`git rev-parse --abbrev-ref HEAD`
|
||||||
|
+ if test "x$GitBranch" = master; then
|
||||||
|
+ GitDesc=`git describe --all --dirty`
|
||||||
|
+ else
|
||||||
|
+ GitDesc=`git describe --tags --match 'heimdal-*' --dirty`
|
||||||
|
+ fi
|
||||||
|
+ else
|
||||||
|
+ GitCommit='<commit-unknown>'
|
||||||
|
+ GitBranch='<branch-unknown>'
|
||||||
|
+ GitDesc='<tag-unknown>'
|
||||||
|
+ fi
|
||||||
|
mv -f include/newversion.h.in include/version.h.in
|
||||||
|
- sed -e "s/@USER@/$User/" -e "s/@HOST@/$Host/" -e "s/@DATE@/$Date/" include/version.h.in > include/version.h
|
||||||
|
+ sed -e "s/@HOST@/$Host/" \
|
||||||
|
+ -e "s;@USER@;$User;" \
|
||||||
|
+ -e "s;@DATE@;$Date;" \
|
||||||
|
+ -e "s;@BRANCH@;$GitBranch;" \
|
||||||
|
+ -e "s;@TAG@;$GitDesc;" \
|
||||||
|
+ -e "s;@COMMIT@;$GitCommit;" \
|
||||||
|
+ include/version.h.in > include/version.h
|
||||||
|
fi
|
Loading…
x
Reference in New Issue
Block a user