Accepting request 507759 from systemsmanagement

1

OBS-URL: https://build.opensuse.org/request/show/507759
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/cfengine?expand=0&rev=69
This commit is contained in:
Dominique Leuenberger 2017-07-04 07:10:54 +00:00 committed by Git OBS Bridge
commit 920d00fa36
3 changed files with 39 additions and 1 deletions

View File

@ -1,3 +1,10 @@
-------------------------------------------------------------------
Sun Jul 2 20:41:57 UTC 2017 - bwiedemann@suse.com
- Use gzip -n to not add timestamps to .gz header
- Add reproducible.patch to override man page date
to make package build fully reproducible
-------------------------------------------------------------------
Fri May 19 18:14:29 UTC 2017 - jengelh@inai.de

View File

@ -64,6 +64,8 @@ Patch1: 0001-Set-sys.bindir-to-usr-sbin-expect-cf-components-ther.patch
# PATCH-FEATURE-UPSTREAM better /etc/SuSE-release parsing, upstream #5423
# kkaempf@suse.de
Patch2: 0002-Simplify-and-fix-parsing-of-etc-SuSE-release-fixes-i.patch
# PATCH-FIX-UPSTREAM https://github.com/cfengine/core/pull/2881
Patch3: reproducible.patch
# SLE 11 or RHEL5 autoconf does not support AM_SUBST_NOTMAKE, kkaempf@suse.de
Patch10: make_home_dir_for_tests.patch
@ -170,6 +172,7 @@ Lots of example promises for CFEngine.
%setup -q -n %{srcname}
%patch1 -p1
%patch2 -p1
%patch3 -p1
%if 0%{?suse_version} <= 1110
%patch99 -p1
%endif
@ -284,7 +287,7 @@ install -d %{buildroot}/%{_mandir}/man8
for i in cf-agent cf-execd cf-key cf-monitord cf-promises cf-runagent cf-serverd
do
LD_LIBRARY_PATH=%{buildroot}%{_libdir}/%{name} %{buildroot}%{_sbindir}/$i -M > %{buildroot}%{_mandir}/man8/$i.8
gzip %{buildroot}%{_mandir}/man8/$i.8
gzip -n9 %{buildroot}%{_mandir}/man8/$i.8
done
# Firewall

28
reproducible.patch Normal file
View File

@ -0,0 +1,28 @@
commit fb4e70f9be4b37ab40505118553caf5a5b7c7daf
Author: Bernhard M. Wiedemann <bwiedemann@suse.de>
Date: Sun Jul 2 11:17:14 2017 +0200
libutils/man.c: allow to override build time
in order to enable reproducible builds.
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.
diff --git a/libutils/man.c b/libutils/man.c
index ef2cd1a28..ba46ba895 100644
--- a/libutils/man.c
+++ b/libutils/man.c
@@ -206,6 +206,11 @@ void ManPageWrite(Writer *out, const char *program, time_t last_modified,
const struct option options[],
const char *const option_hints[], bool accepts_file_argument)
{
+ time_t overridetime;
+ char *source_date_epoch = getenv("SOURCE_DATE_EPOCH");
+ if (source_date_epoch != NULL &&
+ (overridetime = (time_t)strtoll(source_date_epoch, NULL, 10)) > 0)
+ last_modified = overridetime;
WriteCopyright(out);
WriteHeader(out, program, last_modified);
WriteName(out, program, short_description);