Accepting request 628805 from home:bmwiedemann:branches:hardware
build non-parallel and Add reproducible.patch to sort input file list to make package build reproducible (boo#1041090) OBS-URL: https://build.opensuse.org/request/show/628805 OBS-URL: https://build.opensuse.org/package/show/hardware/nut?expand=0&rev=78
This commit is contained in:
committed by
Git OBS Bridge
parent
f56c6df38c
commit
9040019ea4
@@ -1,3 +1,9 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed Aug 1 13:35:20 UTC 2018 - bwiedemann@suse.com
|
||||
|
||||
- Add reproducible.patch to sort input file list
|
||||
to make package build reproducible (boo#1041090)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sun Jan 21 20:17:50 UTC 2018 - suse+build@de-korte.org
|
||||
|
||||
|
8
nut.spec
8
nut.spec
@@ -59,6 +59,7 @@ Patch9: nut-doc-cables.patch
|
||||
Patch10: use-pkg-config-gdlib.diff
|
||||
Patch11: openssl-1_1.patch
|
||||
Patch12: nut-upssched.patch
|
||||
Patch13: reproducible.patch
|
||||
BuildRequires: apache2-devel
|
||||
BuildRequires: asciidoc
|
||||
BuildRequires: avahi-devel
|
||||
@@ -255,6 +256,7 @@ cp -a %{SOURCE2} %{SOURCE5} %{SOURCE6} %{SOURCE7} .
|
||||
%patch10 -p1
|
||||
%patch11 -p1
|
||||
%patch12 -p1
|
||||
%patch13 -p1
|
||||
sed -i s/@now@/`date -r ChangeLog +%%Y-%%m-%%d`/g docs/docinfo.xml.in
|
||||
|
||||
sed -i s:%{_prefix}/local/ups/bin:/bin: conf/upssched.conf.sample.in
|
||||
@@ -283,11 +285,13 @@ autoreconf -fvi
|
||||
--with-udev-dir=%{_libexecdir}/udev \
|
||||
--enable-option-checking=fatal
|
||||
|
||||
# There is a bug in doc build that makes impossible to build in parallel
|
||||
# There is a bug in build that makes impossible to build in parallel
|
||||
cd docs
|
||||
make -j1
|
||||
cd ..
|
||||
make %{?_smp_mflags}
|
||||
# does not create reproducible output with parallelism
|
||||
# possibly similar problem as https://bugzilla.sudo.ws/show_bug.cgi?id=842
|
||||
make -j1
|
||||
PORT=$(sed -n 's/#define PORT //p' config.log)
|
||||
if test "$PORT" = 3493 ; then
|
||||
PORT=nut
|
||||
|
43
reproducible.patch
Normal file
43
reproducible.patch
Normal file
@@ -0,0 +1,43 @@
|
||||
PATCH-FIX-UPSTREAM https://github.com/networkupstools/nut/pull/528
|
||||
|
||||
From d1372910ccc449edb5f447b04a5fd50c5423b314 Mon Sep 17 00:00:00 2001
|
||||
From: "Bernhard M. Wiedemann" <bwiedemann@suse.de>
|
||||
Date: Tue, 20 Feb 2018 13:40:18 +0100
|
||||
Subject: [PATCH] Sort input file list
|
||||
|
||||
so that nut builds in a reproducible way
|
||||
in spite of indeterministic filesystem readdir order
|
||||
and http://bugs.python.org/issue30461
|
||||
|
||||
See https://reproducible-builds.org/ for why this is good.
|
||||
---
|
||||
tools/nut-snmpinfo.py | 2 +-
|
||||
tools/nut-usbinfo.pl | 2 +-
|
||||
2 files changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/tools/nut-snmpinfo.py b/tools/nut-snmpinfo.py
|
||||
index 32d17784e..0649ef5a3 100755
|
||||
--- a/tools/nut-snmpinfo.py
|
||||
+++ b/tools/nut-snmpinfo.py
|
||||
@@ -80,7 +80,7 @@ def expand_define(filename,constant):
|
||||
output_file.write( "/* SNMP IDs device table */\n" )
|
||||
output_file.write( "static snmp_device_id_t snmp_device_table[] = {\n" )
|
||||
|
||||
-for filename in glob.glob('../drivers/*-mib.c'):
|
||||
+for filename in sorted(glob.glob('../drivers/*-mib.c')):
|
||||
list_of_line = open(filename,'r').read().split(';')
|
||||
for line in list_of_line:
|
||||
if "mib2nut_info_t" in line:
|
||||
diff --git a/tools/nut-usbinfo.pl b/tools/nut-usbinfo.pl
|
||||
index 2c0dd055b..a8638769b 100755
|
||||
--- a/tools/nut-usbinfo.pl
|
||||
+++ b/tools/nut-usbinfo.pl
|
||||
@@ -76,7 +76,7 @@
|
||||
|
||||
################# MAIN #################
|
||||
|
||||
-find(\&find_usbdevs,$scanPath);
|
||||
+find({wanted=>\&find_usbdevs, preprocess=>sub{sort @_}}, $scanPath);
|
||||
&gen_usb_files;
|
||||
|
||||
################# SUB METHOD #################
|
Reference in New Issue
Block a user