Hello community,

here is the log from the commit of package nut for openSUSE:Factory checked in 
at 2018-08-13 09:54:40
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/nut (Old)
 and      /work/SRC/openSUSE:Factory/.nut.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "nut"

Mon Aug 13 09:54:40 2018 rev:63 rq:628814 version:2.7.4

Changes:
--------
--- /work/SRC/openSUSE:Factory/nut/nut.changes  2018-01-31 19:51:55.465385857 
+0100
+++ /work/SRC/openSUSE:Factory/.nut.new/nut.changes     2018-08-13 
09:54:52.878897762 +0200
@@ -1,0 +2,6 @@
+Wed Aug  1 13:35:20 UTC 2018 - [email protected]
+
+- Add reproducible.patch to sort input file list
+  to make package build reproducible (boo#1041090)
+
+-------------------------------------------------------------------

New:
----
  reproducible.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ nut.spec ++++++
--- /var/tmp/diff_new_pack.xd3411/_old  2018-08-13 09:54:57.730907589 +0200
+++ /var/tmp/diff_new_pack.xd3411/_new  2018-08-13 09:54:57.734907597 +0200
@@ -59,6 +59,7 @@
 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 @@
 %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 @@
        --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


++++++ reproducible.patch ++++++
PATCH-FIX-UPSTREAM https://github.com/networkupstools/nut/pull/528

>From d1372910ccc449edb5f447b04a5fd50c5423b314 Mon Sep 17 00:00:00 2001
From: "Bernhard M. Wiedemann" <[email protected]>
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 #################

Reply via email to