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
44 lines
1.5 KiB
Diff
44 lines
1.5 KiB
Diff
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 #################
|