From b1e91b59e5ddcdbaf1c29a6b438737ffd66894c2 Mon Sep 17 00:00:00 2001 From: Kamil Dudka Date: Wed, 8 Aug 2018 18:11:26 +0200 Subject: [PATCH] do not update currency.units from network during build --- 0002-units-2.17-no-network.patch | 47 ++++++++++++++++++++++++++++++++ units.spec | 4 +++ 2 files changed, 51 insertions(+) create mode 100644 0002-units-2.17-no-network.patch diff --git a/0002-units-2.17-no-network.patch b/0002-units-2.17-no-network.patch new file mode 100644 index 0000000..3456f9b --- /dev/null +++ b/0002-units-2.17-no-network.patch @@ -0,0 +1,47 @@ +From 06a4ba00e8e4188486fa962dbccbfa1e6afe2cf2 Mon Sep 17 00:00:00 2001 +From: Kamil Dudka +Date: Wed, 8 Aug 2018 18:08:34 +0200 +Subject: [PATCH] Makefile.in: do not update currency.units from network + +Builds of packages are supposed to be reproducible. +--- + Makefile.in | 9 +-------- + 1 file changed, 1 insertion(+), 8 deletions(-) + +diff --git a/Makefile.in b/Makefile.in +index 70e2e10..7c1ee5b 100644 +--- a/Makefile.in ++++ b/Makefile.in +@@ -58,8 +58,6 @@ DEFS=-DUNITSFILE=\"@UDAT@definitions.units\" -DLOCALEMAP=\"@UDAT@locale_map.txt\ + CFLAGS = @CFLAGS@ + OBJECTS = units.@OBJEXT@ parse.tab.@OBJEXT@ getopt.@OBJEXT@ getopt1.@OBJEXT@ @STRFUNC@ + +-.PHONY: currency-units-update +- + .SUFFIXES: + .SUFFIXES: .c .@OBJEXT@ .rc .res .texinfo .pdf + +@@ -107,7 +105,7 @@ units_cur_inst: units_cur + -e "s@/usr/bin/python@$(PYTHON)@" \ + $(srcdir)/units_cur > units_cur_inst + +-install-support: definitions.units units_cur_inst currency-units-update ++install-support: definitions.units units_cur_inst + $(MKDIR_P) $(DESTDIR)@UDAT@ $(DESTDIR)$(bindir) $(DESTDIR)@CDAT@ + $(INSTALL_DATA) $(srcdir)/definitions.units $(DESTDIR)@UDAT@definitions.units + -rm -f $(DESTDIR)@UDAT@currency.units +@@ -204,11 +202,6 @@ texclean: + -rm -f units.log UnitsMKS.log UnitsWin.log \ + *.aux *.cp *.fn *.ky *.op *.pg *.toc *.tp *.vr + +-currency-units-update: +- @echo "Trying to update currency.units (will use existing file if this fails)" +- -$(srcdir)/units_cur currency.units +- if [ ! -s currency.units ]; then cp $(srcdir)/currency.units currency.units;fi +- + sig: + echo units-`sed -n -e '/\#.*VERSION/s/.*"\(.*\)"/\1/gp' \ + $(srcdir)/units.c`.tar.gz > distname +-- +2.17.1 + diff --git a/units.spec b/units.spec index 15d5092..30b44dd 100644 --- a/units.spec +++ b/units.spec @@ -17,6 +17,9 @@ BuildRequires: readline-devel # units_cur: validate rate data from server (#1598913) Patch1: 0001-units-2.17-units_cur-validate.patch +# do not update currency.units from network during build +Patch2: 0002-units-2.17-no-network.patch + %description Units converts an amount from one unit to another, or tells you what mathematical operation you need to perform to convert from one unit to @@ -67,6 +70,7 @@ fi %changelog * Wed Aug 08 2018 Kamil Dudka - 2.17-5 +- do not update currency.units from network during build - units_cur: validate rate data from server (#1598913) * Sat Jul 14 2018 Fedora Release Engineering - 2.17-4