From 26cfaebdeb038af6a32a01beec18fe74782bfdf4 Mon Sep 17 00:00:00 2001 From: Kamil Dudka Date: Thu, 9 Mar 2017 10:10:10 +0100 Subject: [PATCH 01/58] new upstream release - 2.14 --- sources | 2 +- units-2.13.tar.gz.sig | Bin 72 -> 0 bytes units-2.14.tar.gz.sig | Bin 0 -> 72 bytes units.spec | 11 +++++++---- 4 files changed, 8 insertions(+), 5 deletions(-) delete mode 100644 units-2.13.tar.gz.sig create mode 100644 units-2.14.tar.gz.sig diff --git a/sources b/sources index a1f8653..0182943 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -5cbf2a6af76e94ba0ac55fc8d99d5a3e units-2.13.tar.gz +SHA512 (units-2.14.tar.gz) = 3cd09a76fb1cccbafaa3e023c791740738c8347425b2645cad1fa768dee3ebde917602cf65988ee8922fed512ec0bc2367f68545450789fc6bf1a79f066a6986 diff --git a/units-2.13.tar.gz.sig b/units-2.13.tar.gz.sig deleted file mode 100644 index 421bcb4b70d3576e943b88d60ee8dd91e40306d7..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 72 zcmV-O0Jr~$Mg#y60ssaD0#|7j761wf5EzNo@Ze)_NzTUrpJwJ7?PF8QCNqn^V?3%& eCg-pUIRKp(T%X{22Tfwf)FNqM!8n6{+H`waiW{i_ diff --git a/units-2.14.tar.gz.sig b/units-2.14.tar.gz.sig new file mode 100644 index 0000000000000000000000000000000000000000..5892a0ee5e426acf26f941ffb5e7cd396c54d5ea GIT binary patch literal 72 zcmV-O0Jr~$Mg#y60ssaD0$9M2d;kgw5EzNo@Ze)_N&dV5pG|l@?S)vs356Ggl`ON# ea%%!~Z2+HPtHa(sR;>Zm{NT7{m76&bsdcZj@E%71 literal 0 HcmV?d00001 diff --git a/units.spec b/units.spec index 2bac90e..9255ecf 100644 --- a/units.spec +++ b/units.spec @@ -1,9 +1,9 @@ Summary: A utility for converting amounts from one unit to another Name: units -Version: 2.13 -Release: 3%{?dist} -Source: ftp://ftp.gnu.org/gnu/units/%{name}-%{version}.tar.gz -URL: http://www.gnu.org/software/units/units.html +Version: 2.14 +Release: 1%{?dist} +Source: https://ftp.gnu.org/gnu/units/%{name}-%{version}.tar.gz +URL: https://www.gnu.org/software/units/units.html License: GPLv3+ Group: Applications/Engineering Requires(post): /sbin/install-info @@ -59,6 +59,9 @@ fi %{_mandir}/man1/* %changelog +* Thu Mar 09 2017 Kamil Dudka - 2.14-1 +- new upstream release + * Sat Feb 11 2017 Fedora Release Engineering - 2.13-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild From 24a7317bb9f85dc5d52e3e6f5faf71bcc3c8b1b4 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 27 Jul 2017 21:00:50 +0000 Subject: [PATCH 02/58] - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild --- units.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/units.spec b/units.spec index 9255ecf..c8c9791 100644 --- a/units.spec +++ b/units.spec @@ -1,7 +1,7 @@ Summary: A utility for converting amounts from one unit to another Name: units Version: 2.14 -Release: 1%{?dist} +Release: 2%{?dist} Source: https://ftp.gnu.org/gnu/units/%{name}-%{version}.tar.gz URL: https://www.gnu.org/software/units/units.html License: GPLv3+ @@ -59,6 +59,9 @@ fi %{_mandir}/man1/* %changelog +* Thu Jul 27 2017 Fedora Release Engineering - 2.14-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + * Thu Mar 09 2017 Kamil Dudka - 2.14-1 - new upstream release From 8696bc201b98d5d5be2ee008d4519829ce77a64f Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 3 Aug 2017 09:48:40 +0000 Subject: [PATCH 03/58] - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild --- units.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/units.spec b/units.spec index c8c9791..be1f734 100644 --- a/units.spec +++ b/units.spec @@ -1,7 +1,7 @@ Summary: A utility for converting amounts from one unit to another Name: units Version: 2.14 -Release: 2%{?dist} +Release: 3%{?dist} Source: https://ftp.gnu.org/gnu/units/%{name}-%{version}.tar.gz URL: https://www.gnu.org/software/units/units.html License: GPLv3+ @@ -59,6 +59,9 @@ fi %{_mandir}/man1/* %changelog +* Thu Aug 03 2017 Fedora Release Engineering - 2.14-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild + * Thu Jul 27 2017 Fedora Release Engineering - 2.14-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild From 71b1cff5fa1857337fcc7cdf7c59f9ef1d8bb823 Mon Sep 17 00:00:00 2001 From: Kamil Dudka Date: Tue, 31 Oct 2017 10:47:00 +0100 Subject: [PATCH 04/58] new upstream release - 2.15 --- sources | 2 +- units-2.14.tar.gz.sig | Bin 72 -> 0 bytes units-2.15.tar.gz.sig | Bin 0 -> 72 bytes units.spec | 7 +++++-- 4 files changed, 6 insertions(+), 3 deletions(-) delete mode 100644 units-2.14.tar.gz.sig create mode 100644 units-2.15.tar.gz.sig diff --git a/sources b/sources index 0182943..7fbe34e 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (units-2.14.tar.gz) = 3cd09a76fb1cccbafaa3e023c791740738c8347425b2645cad1fa768dee3ebde917602cf65988ee8922fed512ec0bc2367f68545450789fc6bf1a79f066a6986 +SHA512 (units-2.15.tar.gz) = 3fd60acd12142ea3c20bf39184394f300a8284a8946beaf89a8bf2f87c77d8a1ab02189c8a2fd3f93d64517945136fe4ea671edd2d48ea9bae55f9a87b30423f diff --git a/units-2.14.tar.gz.sig b/units-2.14.tar.gz.sig deleted file mode 100644 index 5892a0ee5e426acf26f941ffb5e7cd396c54d5ea..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 72 zcmV-O0Jr~$Mg#y60ssaD0$9M2d;kgw5EzNo@Ze)_N&dV5pG|l@?S)vs356Ggl`ON# ea%%!~Z2+HPtHa(sR;>Zm{NT7{m76&bsdcZj@E%71 diff --git a/units-2.15.tar.gz.sig b/units-2.15.tar.gz.sig new file mode 100644 index 0000000000000000000000000000000000000000..322c87fac2d7b472d917d7660bfeb4f4ae59e461 GIT binary patch literal 72 zcmV-O0Jr~$Mg#y60ssaD0$J{V{s0OI5EzNo@Ze)_Ng~YvpLu;0BO}Gs!NQ9~OeiFc eXF_%SO#q%W@zw@FWTvlUqr5$4pY9xV;$%3byB#P1 literal 0 HcmV?d00001 diff --git a/units.spec b/units.spec index be1f734..a1c9dd6 100644 --- a/units.spec +++ b/units.spec @@ -1,7 +1,7 @@ Summary: A utility for converting amounts from one unit to another Name: units -Version: 2.14 -Release: 3%{?dist} +Version: 2.15 +Release: 1%{?dist} Source: https://ftp.gnu.org/gnu/units/%{name}-%{version}.tar.gz URL: https://www.gnu.org/software/units/units.html License: GPLv3+ @@ -59,6 +59,9 @@ fi %{_mandir}/man1/* %changelog +* Tue Oct 31 2017 Kamil Dudka - 2.15-1 +- new upstream release + * Thu Aug 03 2017 Fedora Release Engineering - 2.14-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild From cc78d9929634ef28064e73248c34c388a1f6f4e3 Mon Sep 17 00:00:00 2001 From: Kamil Dudka Date: Tue, 31 Oct 2017 12:07:44 +0100 Subject: [PATCH 05/58] Resolves: #1507782 - update units_cur script from units-2.15 --- units-2.15-units_cur | 336 +++++++++++++++++++++++++++++++++++++++++++ units.spec | 10 +- 2 files changed, 345 insertions(+), 1 deletion(-) create mode 100644 units-2.15-units_cur diff --git a/units-2.15-units_cur b/units-2.15-units_cur new file mode 100644 index 0000000..ec5872a --- /dev/null +++ b/units-2.15-units_cur @@ -0,0 +1,336 @@ +#!/usr/bin/python +# +# Version 4 +# 2 October 2017 +# +# Complete rewrite to use Yahoo YQL API due to removal of TimeGenie RSS feed. +# Switched to requests library using JSON. One program now runs under +# Python 2 or Python 3. Thanks to Ray Hamel for some help with this update. + +# For Python 2 & 3 compatibility +from __future__ import absolute_import, division, print_function + +# Normal imports +import requests +import codecs +from argparse import ArgumentParser +from collections import OrderedDict +from datetime import date +from os import linesep +from sys import exit, stderr, stdout + +outfile_name = 'currency.units' + +# The Yahoo API is excellent, but unfortunately requires we explicitly request +# each currency we want +# +currency = OrderedDict([ + ('ATS', ['austriaschilling', '1|13.7603 euro']), + ('BEF', ['belgiumfranc', '1|40.3399 euro']), + ('CYP', ['cypruspound', '1|0.585274 euro']), + ('EEK', ['estoniakroon', '1|15.6466 euro # Equal to 1|8 germanymark']), + ('FIM', ['finlandmarkka', '1|5.94573 euro']), + ('FRF', ['francefranc', '1|6.55957 euro']), + ('DEM', ['germanymark', '1|1.95583 euro']), + ('GRD', ['greecedrachma', '1|340.75 euro']), + ('IEP', ['irelandpunt', '1|0.787564 euro']), + ('ITL', ['italylira', '1|1936.27 euro']), + ('LVL', ['latvialats', '1|0.702804 euro']), + ('LTL', ['lithuanialitas', '1|3.4528 euro']), + ('LUF', ['luxembourgfranc', '1|40.3399 euro']), + ('MTL', ['maltalira', '1|0.4293 euro']), + ('SKK', ['slovakiakornua', '1|30.1260 euro']), + ('SIT', ['sloveniatolar', '1|239.640 euro']), + ('ESP', ['spainpeseta', '1|166.386 euro']), + ('NLG', ['netherlandsguilder','1|2.20371 euro']), + ('PTE', ['portugalescudo', '1|200.482 euro']), + ('CVE', ['capeverdeescudo', '1|110.265 euro']), + ('BGN', ['bulgarialev', '1|1.9558 euro']), + ('BAM', ['bosniaconvertiblemark','germanymark']), + ('KMF', ['comorosfranc', '1|491.96775 euro']), + ('XOF', ['westafricanfranc', '1|655.957 euro']), + ('XPF', ['cfpfranc', '1|119.33 euro']), + ('XAF', ['centralafricancfafranc','1|655.957 euro']), + ('AED', ['uaedirham','']), + ('AFN', ['afghanafghani','']), + ('ALL', ['albanialek','']), + ('AMD', ['armeniadram','']), + ('AOA', ['angolakwanza','']), + ('ARS', ['argentinapeso','']), + ('AUD', ['australiadollar','']), + ('AWG', ['arubaflorin','']), + ('AZN', ['azerbaijanmanat','']), + ('BAM', ['bosniaconvertiblemark','']), + ('BBD', ['barbadosdollar','']), + ('BDT', ['bangladeshtaka','']), + ('BGN', ['bulgarialev','']), + ('BHD', ['bahraindinar','']), + ('BIF', ['burundifranc','']), + ('BMD', ['bermudadollar','']), + ('BND', ['bruneidollar','']), + ('BOB', ['boliviaboliviano','']), + ('BRL', ['brazilreal','']), + ('BSD', ['bahamasdollar','']), + ('BTN', ['bhutanngultrum','']), + ('BWP', ['botswanapula','']), + ('BYN', ['belarusruble','']), + ('BYR', ['oldbelarusruble','10000 BYN']), + ('BZD', ['belizedollar','']), + ('CAD', ['canadadollar','']), + ('CDF', ['drcfranccongolais','']), + ('CHF', ['swissfranc','']), + ('CLP', ['chilepeso','']), + ('CNY', ['chinayuan','']), + ('COP', ['colombiapeso','']), + ('CRC', ['costaricacolon','']), + ('CUP', ['cubapeso','']), + ('CVE', ['capeverdeescudo','']), + ('CZK', ['czechkoruna','']), + ('DJF', ['djiboutifranc','']), + ('DKK', ['denmarkkrona','']), + ('DOP', ['dominicanrepublicpeso','']), + ('DZD', ['algeriadinar','']), + ('EGP', ['egyptpound','']), + ('ERN', ['eritreanakfa','']), + ('ETB', ['ethiopianbirr','']), + ('EUR', ['euro','']), + ('FJD', ['fijidollar','']), + ('FKP', ['falklandislandspound','']), + ('GBP', ['ukpound','']), + ('GEL', ['georgialari','']), + ('GHS', ['ghanacedi','']), + ('GIP', ['gibraltarpound','']), + ('GMD', ['gambiadalasi','']), + ('GNF', ['guineafranc','']), + ('GTQ', ['guatemalaquetzal','']), + ('GYD', ['guyanadollar','']), + ('HKD', ['hongkongdollar','']), + ('HNL', ['honduraslempira','']), + ('HRK', ['croatiakuna','']), + ('HTG', ['haitigourde','']), + ('HUF', ['hungariaforint','']), + ('IDR', ['indonesiarupiah','']), + ('ILS', ['israelnewshekel','']), + ('INR', ['indiarupee','']), + ('IQD', ['iraqdinar','']), + ('IRR', ['iranrial','']), + ('ISK', ['icelandkrona','']), + ('JMD', ['jamaicadollar','']), + ('JOD', ['jordandinar','']), + ('JPY', ['japanyen','']), + ('KES', ['kenyaschilling','']), + ('KGS', ['kyrgyzstansom','']), + ('KHR', ['cambodiariel','']), + ('KMF', ['comorosfranc','']), + ('KPW', ['northkoreawon','']), + ('KRW', ['southkoreawon','']), + ('KWD', ['kuwaitdinar','']), + ('KYD', ['caymanislandsdollar','']), + ('KZT', ['kazakhstantenge','']), + ('LAK', ['laokip','']), + ('LBP', ['lebanonpound','']), + ('LKR', ['srilankanrupee','']), + ('LRD', ['liberiadollar','']), + ('LTL', ['lithuanialita','']), + ('LVL', ['latvialat','']), + ('LYD', ['libyadinar','']), + ('MAD', ['moroccodirham','']), + ('MDL', ['moldovaleu','']), + ('MGA', ['madagascarariary','']), + ('MKD', ['macedoniadenar','']), + ('MMK', ['myanmarkyat','']), + ('MNT', ['mongoliatugrik','']), + ('MOP', ['macaupataca','']), + ('MRO', ['mauritaniaouguiya','']), + ('MUR', ['mauritiusrupee','']), + ('MVR', ['maldiverufiyaa','']), + ('MWK', ['malawikwacha','']), + ('MXN', ['mexicopeso','']), + ('MYR', ['malaysiaringgit','']), + ('MZN', ['mozambicanmetical','']), + ('NAD', ['namibiadollar','']), + ('NGN', ['nigerianaira','']), + ('NIO', ['nicaraguacordobaoro','']), + ('NOK', ['norwaykrone','']), + ('NPR', ['nepalrupee','']), + ('NZD', ['newzealanddollar','']), + ('OMR', ['omanrial','']), + ('PAB', ['panamabalboa','']), + ('PEN', ['perunuevosol','']), + ('PGK', ['papuanewguineakina','']), + ('PHP', ['philippinepeso','']), + ('PKR', ['pakistanrupee','']), + ('PLN', ['polandzloty','']), + ('PYG', ['paraguayguarani','']), + ('QAR', ['qatarrial','']), + ('RON', ['romanianewlei','']), + ('RSD', ['serbiadinar','']), + ('RUB', ['russiaruble','']), + ('RWF', ['rwandafranc','']), + ('SAR', ['saudiarabiariyal','']), + ('SBD', ['solomonislandsdollar','']), + ('SCR', ['seychellesrupee','']), + ('SDG', ['sudanpound','']), + ('SEK', ['swedenkrona','']), + ('SGD', ['singaporedollar','']), + ('SHP', ['sainthelenapound','']), + ('SLL', ['sierraleoneleone','']), + ('SOS', ['somaliaschilling','']), + ('SRD', ['surinamedollar','']), + ('STD', ['saotome&principedobra','']), + ('SVC', ['elsalvadorcolon','']), + ('SYP', ['syriapound','']), + ('SZL', ['swazilandlilangeni','']), + ('THB', ['thailandbaht','']), + ('TJS', ['tajikistansomoni','']), + ('TMT', ['turkmenistanmanat','']), + ('TND', ['tunisiadinar','']), + ('TOP', ["tongapa'anga",'']), + ('TRY', ['turkeylira','']), + ('TTD', ['trinidadandtobagodollar','']), + ('TWD', ['taiwandollar','']), + ('TZS', ['tanzaniashilling','']), + ('UAH', ['ukrainehryvnia','']), + ('UGX', ['ugandaschilling','']), + ('UYU', ['uruguaypeso','']), + ('UZS', ['uzbekistansum','']), + ('VEF', ['venezuelabolivar','']), + ('VEB', ['venezuelaoldbolivar', '1000 VEF']), + ('VND', ['vietnamdong','']), + ('VUV', ['vanuatuvatu','']), + ('WST', ['samoatala','']), + ('XAF', ['centralafricancfafranc','']), + ('XCD', ['eastcaribbeandollar','']), + ('XDR', ['specialdrawingrights','']), + ('YER', ['yemenrial','']), + ('ZAR', ['southafricarand','']), + ('ZMW', ['zambiakwacha','']), + ('ZWL', ['zimbabwedollar','']), +]) + +ap = ArgumentParser( + description="Update currency information for 'units' " + "into the specified filename or if no filename is " + "given, the default: '{}'. The special filename '-' " + "will send the currency data to stdout.".format(outfile_name), +) + +ap.add_argument( + 'output_file', + default=outfile_name, + help='the file to update', + metavar='filename', + nargs='?', + type=str, +) + +ap.add_argument('-v','--verbose', + action='store_true', + help='display details when fetching currency data', +) + +outfile_name = ap.parse_args().output_file +verbose = ap.parse_args().verbose + +try: + res = requests.get('http://finance.yahoo.com/webservice/v1/symbols' + '/allcurrencies/quote?format=json') + res.raise_for_status() + webdata = res.json()['list']['resources'] +except requests.exceptions.RequestException as e: + stderr.write('Error connecting to currency server:\n{}.\n'. + format(e)) + exit(1) + +rates = [ data['resource']['fields']['price'] for data in webdata] +codes = [ data['resource']['fields']['symbol'][0:3] for data in webdata] + +rate_index = 1 + +for (code,rate) in zip(codes,rates): + if code not in currency.keys(): + if (verbose): + stderr.write('Got unknown currency with code {}\n'.format(code)) + else: + if not currency[code][rate_index]: + currency[code][rate_index] = '1|{} US$'.format(rate) + elif verbose: + stderr.write('Got value "{}" for currency "{}" but ' + 'it is already defined\n'.format(rate, code)) + +# Delete currencies where we have no rate data +for code in currency.keys(): + if not currency[code][rate_index]: + if verbose: + stderr.write('No data for {}'.format(code)) + del currency[code] + +try: + req = requests.get('http://services.packetizer.com/spotprices/?f=json') + req.raise_for_status() + metals = req.json() +except requests.exceptions.RequestException as e: + stderr.write('Error connecting to spotprices server:\n{}\n'.format(e)) + exit(1) + +del metals['date'] + +try: + req = requests.get('http://services.packetizer.com/btc/?f=json') + req.raise_for_status() + bitcoin = req.json() +except requests.exceptions.RequestException as e: + stderr.write('Error connecting to bitcoin server:\n{}\n'.format(e)) + exit(1) + +cnames = [currency[code][0] for code in currency.keys()] +crates = [currency[code][1] for code in currency.keys()] + +codestr = '\n'.join('{:23}{}'. + format(code, name) for (code,name) in zip(currency.keys(), cnames)) + +datestr = date.today().isoformat() + +maxlen = max(len(name) for name in cnames) + 2 + +ratestr = '\n'.join( + '{:{}}{}'.format(name, maxlen, rate) for (name, rate) in zip(cnames, crates) + ) + +ozzystr = '\n'.join('{:19}{} US$/troyounce'.format( + metal + 'price', + price, + ) for metal, price in metals.items()) + +bitcoinstr = '{:{}}{} US$ # From services.packetizer.com/btc\n'.format( + 'bitcoin',maxlen,bitcoin['usd']) + +outstr = ( +"""# ISO Currency Codes + +{codestr} + +# Currency exchange rates from Yahoo Finance (finance.yahoo.com) + +!message Currency exchange rates from finance.yahoo.com on {datestr} + +{ratestr} +{bitcoinstr} + +# Precious metals prices from Packetizer (services.packetizer.com/spotprices) + +{ozzystr} + +""".format(codestr=codestr, datestr=datestr, ratestr=ratestr, ozzystr=ozzystr, + bitcoinstr=bitcoinstr) +).replace('\n', linesep) + +try: + if outfile_name == '-': + codecs.StreamReader(stdout, codecs.getreader('utf8')).write(outstr) + else: + with codecs.open(outfile_name, 'w', 'utf8') as of: + of.write(outstr) +except IOError as e: + stderr.write('Unable to write to output file:\n{}\n'.format(e)) + exit(1) diff --git a/units.spec b/units.spec index 2bac90e..61b7297 100644 --- a/units.spec +++ b/units.spec @@ -1,7 +1,7 @@ Summary: A utility for converting amounts from one unit to another Name: units Version: 2.13 -Release: 3%{?dist} +Release: 4%{?dist} Source: ftp://ftp.gnu.org/gnu/units/%{name}-%{version}.tar.gz URL: http://www.gnu.org/software/units/units.html License: GPLv3+ @@ -16,6 +16,9 @@ BuildRequires: readline-devel # used by the units_cur script Requires: python-unidecode +# units_cur script taken from units-2.15 +Source1: units-2.15-units_cur + %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 @@ -24,6 +27,8 @@ well as conversions such as Fahrenheit to Celsius. %prep %setup -q +install -p -m0755 %{SOURCE1} units_cur2 +touch units_cur3 %build %configure @@ -59,6 +64,9 @@ fi %{_mandir}/man1/* %changelog +* Tue Oct 31 2017 Kamil Dudka - 2.13-4 +- update units_cur script from units-2.15 (#1507782) + * Sat Feb 11 2017 Fedora Release Engineering - 2.13-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild From 10e8deba4ee8f94f9e209096637fdb71262e3492 Mon Sep 17 00:00:00 2001 From: Kamil Dudka Date: Wed, 1 Nov 2017 13:31:10 +0100 Subject: [PATCH 06/58] remove obsolete Group tag --- units.spec | 1 - 1 file changed, 1 deletion(-) diff --git a/units.spec b/units.spec index a1c9dd6..3e833cf 100644 --- a/units.spec +++ b/units.spec @@ -5,7 +5,6 @@ Release: 1%{?dist} Source: https://ftp.gnu.org/gnu/units/%{name}-%{version}.tar.gz URL: https://www.gnu.org/software/units/units.html License: GPLv3+ -Group: Applications/Engineering Requires(post): /sbin/install-info Requires(preun): /sbin/install-info BuildRequires: bison From 971d7417fe9ef51ee4324cb55f66aa7169f180bf Mon Sep 17 00:00:00 2001 From: Kamil Dudka Date: Wed, 1 Nov 2017 13:31:31 +0100 Subject: [PATCH 07/58] new upstream release - 2.16 --- sources | 2 +- units-2.15.tar.gz.sig | Bin 72 -> 0 bytes units-2.16.tar.gz.sig | Bin 0 -> 72 bytes units.spec | 5 ++++- 4 files changed, 5 insertions(+), 2 deletions(-) delete mode 100644 units-2.15.tar.gz.sig create mode 100644 units-2.16.tar.gz.sig diff --git a/sources b/sources index 7fbe34e..38fa512 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (units-2.15.tar.gz) = 3fd60acd12142ea3c20bf39184394f300a8284a8946beaf89a8bf2f87c77d8a1ab02189c8a2fd3f93d64517945136fe4ea671edd2d48ea9bae55f9a87b30423f +SHA512 (units-2.16.tar.gz) = afca2bf313208db2d0a3f4e96fed7bb86a3e96030b420e1cfa68a140499b9a8f2ef8c166c1d608d03c9ca6260199569a67c67c623d8c6a4b8d52e9d5cb6e3091 diff --git a/units-2.15.tar.gz.sig b/units-2.15.tar.gz.sig deleted file mode 100644 index 322c87fac2d7b472d917d7660bfeb4f4ae59e461..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 72 zcmV-O0Jr~$Mg#y60ssaD0$J{V{s0OI5EzNo@Ze)_Ng~YvpLu;0BO}Gs!NQ9~OeiFc eXF_%SO#q%W@zw@FWTvlUqr5$4pY9xV;$%3byB#P1 diff --git a/units-2.16.tar.gz.sig b/units-2.16.tar.gz.sig new file mode 100644 index 0000000000000000000000000000000000000000..7d011f796e8541921728ad638f49df4c9cbcb9c9 GIT binary patch literal 72 zcmV-O0Jr~$Mg#y60ssaD0$KS!AOH#p5EzNo@Ze)_Nx_2vpLX(MQ7jjqK)X!>FLZq6 erYRC)6ab%n%K~ - 2.16-1 +- new upstream release + * Tue Oct 31 2017 Kamil Dudka - 2.15-1 - new upstream release From 14e7c82d66104daf867747dda3e9f243e83f142d Mon Sep 17 00:00:00 2001 From: Kamil Dudka Date: Mon, 5 Feb 2018 08:52:22 +0100 Subject: [PATCH 08/58] make units_cur use Python 3 Closes #1 --- units.spec | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/units.spec b/units.spec index b574a2a..dcaa391 100644 --- a/units.spec +++ b/units.spec @@ -1,19 +1,20 @@ Summary: A utility for converting amounts from one unit to another Name: units Version: 2.16 -Release: 1%{?dist} +Release: 2%{?dist} Source: https://ftp.gnu.org/gnu/units/%{name}-%{version}.tar.gz URL: https://www.gnu.org/software/units/units.html License: GPLv3+ Requires(post): /sbin/install-info Requires(preun): /sbin/install-info +BuildRequires: automake BuildRequires: bison BuildRequires: ncurses-devel -BuildRequires: python +BuildRequires: python3 BuildRequires: readline-devel # used by the units_cur script -Requires: python-unidecode +Requires: python3-unidecode %description Units converts an amount from one unit to another, or tells you what @@ -24,6 +25,10 @@ well as conversions such as Fahrenheit to Celsius. %prep %setup -q +# make units_cur use Python 3 +sed -e 's|^AC_PATH_PROG(PYTHON, python|&3|' -i configure.ac +autoreconf -fiv + %build %configure make %{?_smp_mflags} @@ -58,6 +63,9 @@ fi %{_mandir}/man1/* %changelog +* Mon Feb 05 2018 Kamil Dudka - 2.16-2 +- make units_cur use Python 3 + * Wed Nov 01 2017 Kamil Dudka - 2.16-1 - new upstream release From f90fed859c8f8a45bfb54e39023aa143de350d38 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 9 Feb 2018 20:03:12 +0000 Subject: [PATCH 09/58] - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- units.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/units.spec b/units.spec index dcaa391..b81c052 100644 --- a/units.spec +++ b/units.spec @@ -1,7 +1,7 @@ Summary: A utility for converting amounts from one unit to another Name: units Version: 2.16 -Release: 2%{?dist} +Release: 3%{?dist} Source: https://ftp.gnu.org/gnu/units/%{name}-%{version}.tar.gz URL: https://www.gnu.org/software/units/units.html License: GPLv3+ @@ -63,6 +63,9 @@ fi %{_mandir}/man1/* %changelog +* Fri Feb 09 2018 Fedora Release Engineering - 2.16-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + * Mon Feb 05 2018 Kamil Dudka - 2.16-2 - make units_cur use Python 3 From 9cac3b9e2dbc850c99443ab70bd12c99cf72348e Mon Sep 17 00:00:00 2001 From: Kamil Dudka Date: Mon, 19 Feb 2018 17:40:45 +0100 Subject: [PATCH 10/58] add explicit BR for the gcc compiler ... as instructed at: https://fedoraproject.org/wiki/Packaging:C_and_C%2B%2B --- units.spec | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/units.spec b/units.spec index b81c052..3cb9f67 100644 --- a/units.spec +++ b/units.spec @@ -1,7 +1,7 @@ Summary: A utility for converting amounts from one unit to another Name: units Version: 2.16 -Release: 3%{?dist} +Release: 4%{?dist} Source: https://ftp.gnu.org/gnu/units/%{name}-%{version}.tar.gz URL: https://www.gnu.org/software/units/units.html License: GPLv3+ @@ -9,6 +9,7 @@ Requires(post): /sbin/install-info Requires(preun): /sbin/install-info BuildRequires: automake BuildRequires: bison +BuildRequires: gcc BuildRequires: ncurses-devel BuildRequires: python3 BuildRequires: readline-devel @@ -63,6 +64,9 @@ fi %{_mandir}/man1/* %changelog +* Mon Feb 19 2018 Kamil Dudka - 2.16-4 +- add explicit BR for the gcc compiler + * Fri Feb 09 2018 Fedora Release Engineering - 2.16-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild From 8200b417c0434fd2b8e60ff31eaf59593e7f25e9 Mon Sep 17 00:00:00 2001 From: Kamil Dudka Date: Mon, 28 May 2018 14:24:33 +0200 Subject: [PATCH 11/58] Resolves: #1574835 - make units_cur work again --- 0001-units-2.16-units_cur.patch | 80 +++++++++++++++++++++++++++++++++ units.spec | 10 ++++- 2 files changed, 88 insertions(+), 2 deletions(-) create mode 100644 0001-units-2.16-units_cur.patch diff --git a/0001-units-2.16-units_cur.patch b/0001-units-2.16-units_cur.patch new file mode 100644 index 0000000..101a396 --- /dev/null +++ b/0001-units-2.16-units_cur.patch @@ -0,0 +1,80 @@ +From 29b4b1ac90bfe54f1d7d83a3b3e4e1a1305332fa Mon Sep 17 00:00:00 2001 +From: Kamil Dudka +Date: Mon, 28 May 2018 14:21:35 +0200 +Subject: [PATCH] Resolves: #1574835 - make units_cur work again + +--- + units_cur | 44 ++++++++++++++++++++++++++------------------ + 1 file changed, 26 insertions(+), 18 deletions(-) + +diff --git a/units_cur b/units_cur +index 5541355..d00c12c 100755 +--- a/units_cur ++++ b/units_cur +@@ -5,14 +5,17 @@ from __future__ import absolute_import, division, print_function + # + # + +-version = '4.1' ++version = '4.2' + +-# 30 October 2017 ++# Version 4.2: 18 April 2018 ++# ++# Handle case of empty/malformed entry returned from the server ++# ++# Version 4.1: 30 October 2017 + # + # Fixed to include USD in the list of currency codes. + # +-# Version 4 +-# 2 October 2017 ++# Version 4: 2 October 2017 + # + # Complete rewrite to use Yahoo YQL API due to removal of TimeGenie RSS feed. + # Switched to requests library using JSON. One program now runs under +@@ -258,22 +261,27 @@ except requests.exceptions.RequestException as e: + format(e)) + exit(1) + +-rates = [ data['resource']['fields']['price'] for data in webdata] +-codes = [ data['resource']['fields']['symbol'][0:3] for data in webdata] + + rate_index = 1 +- +-for (code,rate) in zip(codes,rates): +- if code not in currency.keys(): +- if (verbose): +- stderr.write('Got unknown currency with code {}\n'.format(code)) +- else: +- if not currency[code][rate_index]: +- currency[code][rate_index] = '1|{} US$'.format(rate) +- elif verbose: +- stderr.write('Got value "{}" for currency "{}" but ' +- 'it is already defined\n'.format(rate, code)) +- ++for data in webdata: ++ entry = data['resource']['fields'] ++ if 'price' not in entry or 'symbol' not in entry: # Skip empty/bad entries ++ if verbose: ++ stderr.write('Got bad entry from server: '+str(entry)+'\n') ++ else: ++ rate = entry['price'] ++ code = entry['symbol'][0:3] ++ if code not in currency.keys(): ++ if (verbose): ++ stderr.write('Got unknown currency with code {}\n'.format(code)) ++ else: ++ if not currency[code][rate_index]: ++ currency[code][rate_index] = '1|{} US$'.format(rate) ++ elif verbose: ++ stderr.write('Got value "{}" for currency "{}" but ' ++ 'it is already defined\n'.format(rate, code)) ++ ++ + # Delete currencies where we have no rate data + for code in currency.keys(): + if not currency[code][rate_index]: +-- +2.14.3 + diff --git a/units.spec b/units.spec index 3cb9f67..9878896 100644 --- a/units.spec +++ b/units.spec @@ -1,7 +1,7 @@ Summary: A utility for converting amounts from one unit to another Name: units Version: 2.16 -Release: 4%{?dist} +Release: 5%{?dist} Source: https://ftp.gnu.org/gnu/units/%{name}-%{version}.tar.gz URL: https://www.gnu.org/software/units/units.html License: GPLv3+ @@ -17,6 +17,9 @@ BuildRequires: readline-devel # used by the units_cur script Requires: python3-unidecode +# make units_cur work again (#1574835) +Patch1: 0001-units-2.16-units_cur.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 @@ -24,7 +27,7 @@ another. The units program can handle multiplicative scale changes as well as conversions such as Fahrenheit to Celsius. %prep -%setup -q +%autosetup -p1 # make units_cur use Python 3 sed -e 's|^AC_PATH_PROG(PYTHON, python|&3|' -i configure.ac @@ -64,6 +67,9 @@ fi %{_mandir}/man1/* %changelog +* Mon May 25 2018 Kamil Dudka - 2.16-5 +- make units_cur work again (#1574835) + * Mon Feb 19 2018 Kamil Dudka - 2.16-4 - add explicit BR for the gcc compiler From c8f18391ddc4999ae3b00ea17cccd0ec5c900df3 Mon Sep 17 00:00:00 2001 From: Kamil Dudka Date: Mon, 4 Jun 2018 14:50:33 +0200 Subject: [PATCH 12/58] changelog: fix typo in the last entry --- units.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/units.spec b/units.spec index 9878896..c17ed81 100644 --- a/units.spec +++ b/units.spec @@ -67,7 +67,7 @@ fi %{_mandir}/man1/* %changelog -* Mon May 25 2018 Kamil Dudka - 2.16-5 +* Mon May 28 2018 Kamil Dudka - 2.16-5 - make units_cur work again (#1574835) * Mon Feb 19 2018 Kamil Dudka - 2.16-4 From e31a3f56520e386774014723070357d2a836e9b8 Mon Sep 17 00:00:00 2001 From: Kamil Dudka Date: Tue, 26 Jun 2018 10:02:47 +0200 Subject: [PATCH 13/58] new upstream release - 2.17 --- 0001-units-2.16-units_cur.patch | 80 -------------------------------- sources | 2 +- units-2.16.tar.gz.sig | Bin 72 -> 0 bytes units-2.17.tar.gz.sig | Bin 0 -> 95 bytes units.spec | 11 +++-- 5 files changed, 7 insertions(+), 86 deletions(-) delete mode 100644 0001-units-2.16-units_cur.patch delete mode 100644 units-2.16.tar.gz.sig create mode 100644 units-2.17.tar.gz.sig diff --git a/0001-units-2.16-units_cur.patch b/0001-units-2.16-units_cur.patch deleted file mode 100644 index 101a396..0000000 --- a/0001-units-2.16-units_cur.patch +++ /dev/null @@ -1,80 +0,0 @@ -From 29b4b1ac90bfe54f1d7d83a3b3e4e1a1305332fa Mon Sep 17 00:00:00 2001 -From: Kamil Dudka -Date: Mon, 28 May 2018 14:21:35 +0200 -Subject: [PATCH] Resolves: #1574835 - make units_cur work again - ---- - units_cur | 44 ++++++++++++++++++++++++++------------------ - 1 file changed, 26 insertions(+), 18 deletions(-) - -diff --git a/units_cur b/units_cur -index 5541355..d00c12c 100755 ---- a/units_cur -+++ b/units_cur -@@ -5,14 +5,17 @@ from __future__ import absolute_import, division, print_function - # - # - --version = '4.1' -+version = '4.2' - --# 30 October 2017 -+# Version 4.2: 18 April 2018 -+# -+# Handle case of empty/malformed entry returned from the server -+# -+# Version 4.1: 30 October 2017 - # - # Fixed to include USD in the list of currency codes. - # --# Version 4 --# 2 October 2017 -+# Version 4: 2 October 2017 - # - # Complete rewrite to use Yahoo YQL API due to removal of TimeGenie RSS feed. - # Switched to requests library using JSON. One program now runs under -@@ -258,22 +261,27 @@ except requests.exceptions.RequestException as e: - format(e)) - exit(1) - --rates = [ data['resource']['fields']['price'] for data in webdata] --codes = [ data['resource']['fields']['symbol'][0:3] for data in webdata] - - rate_index = 1 -- --for (code,rate) in zip(codes,rates): -- if code not in currency.keys(): -- if (verbose): -- stderr.write('Got unknown currency with code {}\n'.format(code)) -- else: -- if not currency[code][rate_index]: -- currency[code][rate_index] = '1|{} US$'.format(rate) -- elif verbose: -- stderr.write('Got value "{}" for currency "{}" but ' -- 'it is already defined\n'.format(rate, code)) -- -+for data in webdata: -+ entry = data['resource']['fields'] -+ if 'price' not in entry or 'symbol' not in entry: # Skip empty/bad entries -+ if verbose: -+ stderr.write('Got bad entry from server: '+str(entry)+'\n') -+ else: -+ rate = entry['price'] -+ code = entry['symbol'][0:3] -+ if code not in currency.keys(): -+ if (verbose): -+ stderr.write('Got unknown currency with code {}\n'.format(code)) -+ else: -+ if not currency[code][rate_index]: -+ currency[code][rate_index] = '1|{} US$'.format(rate) -+ elif verbose: -+ stderr.write('Got value "{}" for currency "{}" but ' -+ 'it is already defined\n'.format(rate, code)) -+ -+ - # Delete currencies where we have no rate data - for code in currency.keys(): - if not currency[code][rate_index]: --- -2.14.3 - diff --git a/sources b/sources index 38fa512..cda758f 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (units-2.16.tar.gz) = afca2bf313208db2d0a3f4e96fed7bb86a3e96030b420e1cfa68a140499b9a8f2ef8c166c1d608d03c9ca6260199569a67c67c623d8c6a4b8d52e9d5cb6e3091 +SHA512 (units-2.17.tar.gz) = e4114f7dc0e40146f969375511c5d930497cb9502306ef82feac78c8e09a03e84ed0b582ff82e2878beae41702c9612f7a3d28fc6e9ed2cfae708f9feb8b737b diff --git a/units-2.16.tar.gz.sig b/units-2.16.tar.gz.sig deleted file mode 100644 index 7d011f796e8541921728ad638f49df4c9cbcb9c9..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 72 zcmV-O0Jr~$Mg#y60ssaD0$KS!AOH#p5EzNo@Ze)_Nx_2vpLX(MQ7jjqK)X!>FLZq6 erYRC)6ab%n%K~Fh9sxvT5tY{O>w%-ZI>CpC}aTviK$dv5zLR literal 0 HcmV?d00001 diff --git a/units.spec b/units.spec index c17ed81..4de7d10 100644 --- a/units.spec +++ b/units.spec @@ -1,7 +1,7 @@ Summary: A utility for converting amounts from one unit to another Name: units -Version: 2.16 -Release: 5%{?dist} +Version: 2.17 +Release: 1%{?dist} Source: https://ftp.gnu.org/gnu/units/%{name}-%{version}.tar.gz URL: https://www.gnu.org/software/units/units.html License: GPLv3+ @@ -17,9 +17,6 @@ BuildRequires: readline-devel # used by the units_cur script Requires: python3-unidecode -# make units_cur work again (#1574835) -Patch1: 0001-units-2.16-units_cur.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 @@ -63,10 +60,14 @@ fi %{_bindir}/units %{_bindir}/units_cur %{_datadir}/units +%{_sharedstatedir}/units %{_infodir}/* %{_mandir}/man1/* %changelog +* Tue Jun 26 2018 Kamil Dudka - 2.17-1 +- new upstream release + * Mon May 28 2018 Kamil Dudka - 2.16-5 - make units_cur work again (#1574835) From 510f0d885b0b7737c39a2ba6ab1bf710ce427e56 Mon Sep 17 00:00:00 2001 From: Kamil Dudka Date: Wed, 27 Jun 2018 16:57:51 +0200 Subject: [PATCH 14/58] drop the dependency on python3-unidecode ... no longer used by units_cur --- units.spec | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/units.spec b/units.spec index 4de7d10..b4b3c6f 100644 --- a/units.spec +++ b/units.spec @@ -1,7 +1,7 @@ Summary: A utility for converting amounts from one unit to another Name: units Version: 2.17 -Release: 1%{?dist} +Release: 2%{?dist} Source: https://ftp.gnu.org/gnu/units/%{name}-%{version}.tar.gz URL: https://www.gnu.org/software/units/units.html License: GPLv3+ @@ -14,9 +14,6 @@ BuildRequires: ncurses-devel BuildRequires: python3 BuildRequires: readline-devel -# used by the units_cur script -Requires: python3-unidecode - %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 @@ -65,6 +62,9 @@ fi %{_mandir}/man1/* %changelog +* Wed Jun 27 2018 Kamil Dudka - 2.17-2 +- drop the dependency on python3-unidecode no longer used by units_cur + * Tue Jun 26 2018 Kamil Dudka - 2.17-1 - new upstream release From e186563567e908f01895144a6949427cfe10c0b3 Mon Sep 17 00:00:00 2001 From: Kamil Dudka Date: Wed, 4 Jul 2018 15:03:45 +0200 Subject: [PATCH 15/58] use %{__python3} as the python interpreter --- units.spec | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/units.spec b/units.spec index b4b3c6f..4d1145c 100644 --- a/units.spec +++ b/units.spec @@ -1,7 +1,7 @@ Summary: A utility for converting amounts from one unit to another Name: units Version: 2.17 -Release: 2%{?dist} +Release: 3%{?dist} Source: https://ftp.gnu.org/gnu/units/%{name}-%{version}.tar.gz URL: https://www.gnu.org/software/units/units.html License: GPLv3+ @@ -11,7 +11,7 @@ BuildRequires: automake BuildRequires: bison BuildRequires: gcc BuildRequires: ncurses-devel -BuildRequires: python3 +BuildRequires: python3-devel BuildRequires: readline-devel %description @@ -24,7 +24,8 @@ well as conversions such as Fahrenheit to Celsius. %autosetup -p1 # make units_cur use Python 3 -sed -e 's|^AC_PATH_PROG(PYTHON, python|&3|' -i configure.ac +sed -e 's|^AC_PATH_PROG(PYTHON, .*$|PYTHON=%{__python3}\nAC_SUBST(PYTHON)|' \ + -i configure.ac autoreconf -fiv %build @@ -62,6 +63,9 @@ fi %{_mandir}/man1/* %changelog +* Wed Jul 04 2018 Kamil Dudka - 2.17-3 +- use %%{__python3} as the python interpreter + * Wed Jun 27 2018 Kamil Dudka - 2.17-2 - drop the dependency on python3-unidecode no longer used by units_cur From b4e9ee3fe905730e88a114f87bc07aa1378f1b36 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 14 Jul 2018 08:15:26 +0000 Subject: [PATCH 16/58] - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- units.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/units.spec b/units.spec index 4d1145c..2291941 100644 --- a/units.spec +++ b/units.spec @@ -1,7 +1,7 @@ Summary: A utility for converting amounts from one unit to another Name: units Version: 2.17 -Release: 3%{?dist} +Release: 4%{?dist} Source: https://ftp.gnu.org/gnu/units/%{name}-%{version}.tar.gz URL: https://www.gnu.org/software/units/units.html License: GPLv3+ @@ -63,6 +63,9 @@ fi %{_mandir}/man1/* %changelog +* Sat Jul 14 2018 Fedora Release Engineering - 2.17-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + * Wed Jul 04 2018 Kamil Dudka - 2.17-3 - use %%{__python3} as the python interpreter From 3a790c3d3a0f6fe88b2b27fcdcabbe225caeb492 Mon Sep 17 00:00:00 2001 From: Kamil Dudka Date: Wed, 8 Aug 2018 18:02:49 +0200 Subject: [PATCH 17/58] Resolves: #1598913 - units_cur: validate rate data from server --- 0001-units-2.17-units_cur-validate.patch | 152 +++++++++++++++++++++++ units.spec | 8 +- 2 files changed, 159 insertions(+), 1 deletion(-) create mode 100644 0001-units-2.17-units_cur-validate.patch diff --git a/0001-units-2.17-units_cur-validate.patch b/0001-units-2.17-units_cur-validate.patch new file mode 100644 index 0000000..237903e --- /dev/null +++ b/0001-units-2.17-units_cur-validate.patch @@ -0,0 +1,152 @@ +From 9d1129f41f193a47d6791f44f14abe9479999266 Mon Sep 17 00:00:00 2001 +From: Kamil Dudka +Date: Wed, 8 Aug 2018 17:42:17 +0200 +Subject: [PATCH] units_cur: validate rate data from server + +--- + units_cur | 72 ++++++++++++++++++++++++++++++++++++++++++------------- + 1 file changed, 55 insertions(+), 17 deletions(-) + +diff --git a/units_cur b/units_cur +index 00281d8..d625570 100755 +--- a/units_cur ++++ b/units_cur +@@ -28,8 +28,12 @@ from __future__ import absolute_import, division, print_function + # + # + +-version = '4.2' ++version = '4.3' + ++# Version 4.3: 20 July 2018 ++# ++# Validate rate data from server ++# + # Version 4.2: 18 April 2018 + # + # Handle case of empty/malformed entry returned from the server +@@ -55,6 +59,10 @@ from sys import exit, stderr, stdout + + outfile_name = 'currency.units' + ++# valid metals ++ ++validmetals = ['silver','gold','platinum'] ++ + # This exchange rate table lists the currency ISO 4217 codes, their + # long text names, and any fixed definitions. If the definition is + # empty then units_cur will query the server for a value. +@@ -271,11 +279,19 @@ ap.add_argument('-v','--verbose', + help='display details when fetching currency data', + ) + ++ ++def validfloat(x): ++ try: ++ float(x) ++ return True ++ except ValueError: ++ return False ++ + outfile_name = ap.parse_args().output_file + verbose = ap.parse_args().verbose + + try: +- res = requests.get('http://finance.yahoo.com/webservice/v1/symbols' ++ res = requests.get('https://finance.yahoo.com/webservice/v1/symbols' + '/allcurrencies/quote?format=json') + res.raise_for_status() + webdata = res.json()['list']['resources'] +@@ -299,10 +315,16 @@ for data in webdata: + stderr.write('Got unknown currency with code {}\n'.format(code)) + else: + if not currency[code][rate_index]: +- currency[code][rate_index] = '1|{} US$'.format(rate) ++ if validfloat(rate): ++ currency[code][rate_index] = '1|{} US$'.format(rate) ++ else: ++ stderr.write('Got invalid rate "{}" for currency "{}"\n'.format( ++ rate, code)) + elif verbose: +- stderr.write('Got value "{}" for currency "{}" but ' +- 'it is already defined\n'.format(rate, code)) ++ if currency[code][rate_index] != '1|{} US$'.format(rate): ++ stderr.write('Got value "{}" for currency "{}" but ' ++ 'it is already defined as {}\n'.format(rate, code, ++ currency[code][rate_index])) + + + # Delete currencies where we have no rate data +@@ -313,17 +335,15 @@ for code in currency.keys(): + del currency[code] + + try: +- req = requests.get('http://services.packetizer.com/spotprices/?f=json') ++ req = requests.get('https://services.packetizer.com/spotprices/?f=json') + req.raise_for_status() + metals = req.json() + except requests.exceptions.RequestException as e: + stderr.write('Error connecting to spotprices server:\n{}\n'.format(e)) + exit(1) + +-del metals['date'] +- + try: +- req = requests.get('http://services.packetizer.com/btc/?f=json') ++ req = requests.get('https://services.packetizer.com/btc/?f=json') + req.raise_for_status() + bitcoin = req.json() + except requests.exceptions.RequestException as e: +@@ -344,13 +364,31 @@ ratestr = '\n'.join( + '{:{}}{}'.format(name, maxlen, rate) for (name, rate) in zip(cnames, crates) + ) + +-ozzystr = '\n'.join('{:19}{} US$/troyounce'.format( +- metal + 'price', +- price, +- ) for metal, price in metals.items()) +- +-bitcoinstr = '{:{}}{} US$ # From services.packetizer.com/btc\n'.format( ++metallist = ['']*len(validmetals) ++for metal, price in metals.items(): ++ if metal in validmetals: ++ metalindex = validmetals.index(metal) ++ if validfloat(price): ++ if not metallist[metalindex]: ++ metallist[validmetals.index(metal)] = '{:19}{} US$/troyounce'.format( ++ metal + 'price', price) ++ elif verbose: ++ stderr.write('Got value "{}" for metal "{}" but ' ++ 'it is already defined\n'.format(price,metal)) ++ else: ++ stderr.write('Got invalid rate "{}" for metal "{}"\n'.format( ++ price, metal)) ++ elif metal != 'date' and verbose: # Don't print a message for the "date" entry ++ stderr.write('Got unknown metal "{}" with value "{}"\n',metal,price) ++metalstr = '\n'.join(metallist) ++ ++if validfloat(bitcoin['usd']): ++ bitcoinstr = '{:{}}{} US$ # From services.packetizer.com/btc\n'.format( + 'bitcoin',maxlen,bitcoin['usd']) ++else: ++ stderr.write('Got invalid bitcoin rate "{}"\n', bitcoint['usd']) ++ bitcointstr='' ++ + + outstr = ( + """# ISO Currency Codes +@@ -366,9 +404,9 @@ outstr = ( + + # Precious metals prices from Packetizer (services.packetizer.com/spotprices) + +-{ozzystr} ++{metalstr} + +-""".format(codestr=codestr, datestr=datestr, ratestr=ratestr, ozzystr=ozzystr, ++""".format(codestr=codestr, datestr=datestr, ratestr=ratestr, metalstr=metalstr, + bitcoinstr=bitcoinstr) + ).replace('\n', linesep) + +-- +2.17.1 + diff --git a/units.spec b/units.spec index 2291941..15d5092 100644 --- a/units.spec +++ b/units.spec @@ -1,7 +1,7 @@ Summary: A utility for converting amounts from one unit to another Name: units Version: 2.17 -Release: 4%{?dist} +Release: 5%{?dist} Source: https://ftp.gnu.org/gnu/units/%{name}-%{version}.tar.gz URL: https://www.gnu.org/software/units/units.html License: GPLv3+ @@ -14,6 +14,9 @@ BuildRequires: ncurses-devel BuildRequires: python3-devel BuildRequires: readline-devel +# units_cur: validate rate data from server (#1598913) +Patch1: 0001-units-2.17-units_cur-validate.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 @@ -63,6 +66,9 @@ fi %{_mandir}/man1/* %changelog +* Wed Aug 08 2018 Kamil Dudka - 2.17-5 +- units_cur: validate rate data from server (#1598913) + * Sat Jul 14 2018 Fedora Release Engineering - 2.17-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild From b1e91b59e5ddcdbaf1c29a6b438737ffd66894c2 Mon Sep 17 00:00:00 2001 From: Kamil Dudka Date: Wed, 8 Aug 2018 18:11:26 +0200 Subject: [PATCH 18/58] 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 From 48b9f73cc854eaf69f8dbe3e1a00f463098046f8 Mon Sep 17 00:00:00 2001 From: Kamil Dudka Date: Mon, 29 Oct 2018 13:14:39 +0100 Subject: [PATCH 19/58] new upstream release - 2.18 --- 0001-units-2.17-units_cur-validate.patch | 152 ----------------------- 0002-units-2.17-no-network.patch | 8 +- sources | 2 +- units-2.17.tar.gz.sig | Bin 95 -> 0 bytes units-2.18.tar.gz.sig | Bin 0 -> 95 bytes units.spec | 10 +- 6 files changed, 10 insertions(+), 162 deletions(-) delete mode 100644 0001-units-2.17-units_cur-validate.patch delete mode 100644 units-2.17.tar.gz.sig create mode 100644 units-2.18.tar.gz.sig diff --git a/0001-units-2.17-units_cur-validate.patch b/0001-units-2.17-units_cur-validate.patch deleted file mode 100644 index 237903e..0000000 --- a/0001-units-2.17-units_cur-validate.patch +++ /dev/null @@ -1,152 +0,0 @@ -From 9d1129f41f193a47d6791f44f14abe9479999266 Mon Sep 17 00:00:00 2001 -From: Kamil Dudka -Date: Wed, 8 Aug 2018 17:42:17 +0200 -Subject: [PATCH] units_cur: validate rate data from server - ---- - units_cur | 72 ++++++++++++++++++++++++++++++++++++++++++------------- - 1 file changed, 55 insertions(+), 17 deletions(-) - -diff --git a/units_cur b/units_cur -index 00281d8..d625570 100755 ---- a/units_cur -+++ b/units_cur -@@ -28,8 +28,12 @@ from __future__ import absolute_import, division, print_function - # - # - --version = '4.2' -+version = '4.3' - -+# Version 4.3: 20 July 2018 -+# -+# Validate rate data from server -+# - # Version 4.2: 18 April 2018 - # - # Handle case of empty/malformed entry returned from the server -@@ -55,6 +59,10 @@ from sys import exit, stderr, stdout - - outfile_name = 'currency.units' - -+# valid metals -+ -+validmetals = ['silver','gold','platinum'] -+ - # This exchange rate table lists the currency ISO 4217 codes, their - # long text names, and any fixed definitions. If the definition is - # empty then units_cur will query the server for a value. -@@ -271,11 +279,19 @@ ap.add_argument('-v','--verbose', - help='display details when fetching currency data', - ) - -+ -+def validfloat(x): -+ try: -+ float(x) -+ return True -+ except ValueError: -+ return False -+ - outfile_name = ap.parse_args().output_file - verbose = ap.parse_args().verbose - - try: -- res = requests.get('http://finance.yahoo.com/webservice/v1/symbols' -+ res = requests.get('https://finance.yahoo.com/webservice/v1/symbols' - '/allcurrencies/quote?format=json') - res.raise_for_status() - webdata = res.json()['list']['resources'] -@@ -299,10 +315,16 @@ for data in webdata: - stderr.write('Got unknown currency with code {}\n'.format(code)) - else: - if not currency[code][rate_index]: -- currency[code][rate_index] = '1|{} US$'.format(rate) -+ if validfloat(rate): -+ currency[code][rate_index] = '1|{} US$'.format(rate) -+ else: -+ stderr.write('Got invalid rate "{}" for currency "{}"\n'.format( -+ rate, code)) - elif verbose: -- stderr.write('Got value "{}" for currency "{}" but ' -- 'it is already defined\n'.format(rate, code)) -+ if currency[code][rate_index] != '1|{} US$'.format(rate): -+ stderr.write('Got value "{}" for currency "{}" but ' -+ 'it is already defined as {}\n'.format(rate, code, -+ currency[code][rate_index])) - - - # Delete currencies where we have no rate data -@@ -313,17 +335,15 @@ for code in currency.keys(): - del currency[code] - - try: -- req = requests.get('http://services.packetizer.com/spotprices/?f=json') -+ req = requests.get('https://services.packetizer.com/spotprices/?f=json') - req.raise_for_status() - metals = req.json() - except requests.exceptions.RequestException as e: - stderr.write('Error connecting to spotprices server:\n{}\n'.format(e)) - exit(1) - --del metals['date'] -- - try: -- req = requests.get('http://services.packetizer.com/btc/?f=json') -+ req = requests.get('https://services.packetizer.com/btc/?f=json') - req.raise_for_status() - bitcoin = req.json() - except requests.exceptions.RequestException as e: -@@ -344,13 +364,31 @@ ratestr = '\n'.join( - '{:{}}{}'.format(name, maxlen, rate) for (name, rate) in zip(cnames, crates) - ) - --ozzystr = '\n'.join('{:19}{} US$/troyounce'.format( -- metal + 'price', -- price, -- ) for metal, price in metals.items()) -- --bitcoinstr = '{:{}}{} US$ # From services.packetizer.com/btc\n'.format( -+metallist = ['']*len(validmetals) -+for metal, price in metals.items(): -+ if metal in validmetals: -+ metalindex = validmetals.index(metal) -+ if validfloat(price): -+ if not metallist[metalindex]: -+ metallist[validmetals.index(metal)] = '{:19}{} US$/troyounce'.format( -+ metal + 'price', price) -+ elif verbose: -+ stderr.write('Got value "{}" for metal "{}" but ' -+ 'it is already defined\n'.format(price,metal)) -+ else: -+ stderr.write('Got invalid rate "{}" for metal "{}"\n'.format( -+ price, metal)) -+ elif metal != 'date' and verbose: # Don't print a message for the "date" entry -+ stderr.write('Got unknown metal "{}" with value "{}"\n',metal,price) -+metalstr = '\n'.join(metallist) -+ -+if validfloat(bitcoin['usd']): -+ bitcoinstr = '{:{}}{} US$ # From services.packetizer.com/btc\n'.format( - 'bitcoin',maxlen,bitcoin['usd']) -+else: -+ stderr.write('Got invalid bitcoin rate "{}"\n', bitcoint['usd']) -+ bitcointstr='' -+ - - outstr = ( - """# ISO Currency Codes -@@ -366,9 +404,9 @@ outstr = ( - - # Precious metals prices from Packetizer (services.packetizer.com/spotprices) - --{ozzystr} -+{metalstr} - --""".format(codestr=codestr, datestr=datestr, ratestr=ratestr, ozzystr=ozzystr, -+""".format(codestr=codestr, datestr=datestr, ratestr=ratestr, metalstr=metalstr, - bitcoinstr=bitcoinstr) - ).replace('\n', linesep) - --- -2.17.1 - diff --git a/0002-units-2.17-no-network.patch b/0002-units-2.17-no-network.patch index 3456f9b..9eba690 100644 --- a/0002-units-2.17-no-network.patch +++ b/0002-units-2.17-no-network.patch @@ -12,8 +12,8 @@ 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@ +@@ -61,8 +61,6 @@ CFLAGS = @CFLAGS@ + CPPFLAGS = @CPPFLAGS@ OBJECTS = units.@OBJEXT@ parse.tab.@OBJEXT@ getopt.@OBJEXT@ getopt1.@OBJEXT@ @STRFUNC@ -.PHONY: currency-units-update @@ -21,7 +21,7 @@ index 70e2e10..7c1ee5b 100644 .SUFFIXES: .SUFFIXES: .c .@OBJEXT@ .rc .res .texinfo .pdf -@@ -107,7 +105,7 @@ units_cur_inst: units_cur +@@ -110,7 +108,7 @@ units_cur_inst: units_cur -e "s@/usr/bin/python@$(PYTHON)@" \ $(srcdir)/units_cur > units_cur_inst @@ -30,7 +30,7 @@ index 70e2e10..7c1ee5b 100644 $(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: +@@ -207,11 +205,6 @@ texclean: -rm -f units.log UnitsMKS.log UnitsWin.log \ *.aux *.cp *.fn *.ky *.op *.pg *.toc *.tp *.vr diff --git a/sources b/sources index cda758f..f2c6e2a 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (units-2.17.tar.gz) = e4114f7dc0e40146f969375511c5d930497cb9502306ef82feac78c8e09a03e84ed0b582ff82e2878beae41702c9612f7a3d28fc6e9ed2cfae708f9feb8b737b +SHA512 (units-2.18.tar.gz) = 2ae9f08acb03f2f443514800dafb454434d7d1a43497d2a937c2e9e8429f63d821be11ae3090693e8cadbd2f9cdeafba8f80c1671d84a9cceb0f72ad75d8cad7 diff --git a/units-2.17.tar.gz.sig b/units-2.17.tar.gz.sig deleted file mode 100644 index 18f432cbeb1892168d68c94e07af1a507bcb7a71..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 95 zcmeB(WnmCxVvrS6WSMp2k7LsH$u-~nr|U^{Uj6VOIp33&DcUfYfq{!t04BoH#W24r veaSU5RSgf8Wp-E1{vX#czt)$>Fh9sxvT5tY{O>w%-ZI>CpC}aTviK$dv5zLR diff --git a/units-2.18.tar.gz.sig b/units-2.18.tar.gz.sig new file mode 100644 index 0000000000000000000000000000000000000000..3ac9c3d1c0eec4b09a61b051b2b64b72553020af GIT binary patch literal 95 zcmeB(WnmCxVvrS6WSMp2k7LsH$u-~nr|U^{Uj6VOIp33&Df+bOcLpv_0hkC+6vJG( vOzr<^xiL*w>~maf7A;HMmh?M{VV-4|o?L#NMn%S>KOx*6*Jte9ai$gk0Usz{ literal 0 HcmV?d00001 diff --git a/units.spec b/units.spec index 30b44dd..11ad686 100644 --- a/units.spec +++ b/units.spec @@ -1,7 +1,7 @@ Summary: A utility for converting amounts from one unit to another Name: units -Version: 2.17 -Release: 5%{?dist} +Version: 2.18 +Release: 1%{?dist} Source: https://ftp.gnu.org/gnu/units/%{name}-%{version}.tar.gz URL: https://www.gnu.org/software/units/units.html License: GPLv3+ @@ -14,9 +14,6 @@ BuildRequires: ncurses-devel BuildRequires: python3-devel 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 @@ -69,6 +66,9 @@ fi %{_mandir}/man1/* %changelog +* Mon Oct 29 2018 Kamil Dudka - 2.18-1 +- new upstream release + * 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) From 84c7852e73797c21b862115a77909b4a5a7828f8 Mon Sep 17 00:00:00 2001 From: Igor Gnatenko Date: Sun, 27 Jan 2019 19:40:33 +0100 Subject: [PATCH 20/58] Remove obsolete scriptlets References: https://fedoraproject.org/wiki/Changes/RemoveObsoleteScriptlets Signed-off-by: Igor Gnatenko --- units.spec | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/units.spec b/units.spec index 11ad686..9c0990d 100644 --- a/units.spec +++ b/units.spec @@ -5,8 +5,6 @@ Release: 1%{?dist} Source: https://ftp.gnu.org/gnu/units/%{name}-%{version}.tar.gz URL: https://www.gnu.org/software/units/units.html License: GPLv3+ -Requires(post): /sbin/install-info -Requires(preun): /sbin/install-info BuildRequires: automake BuildRequires: bison BuildRequires: gcc @@ -46,16 +44,6 @@ ln -s units.1 %{buildroot}%{_mandir}/man1/units_cur.1 %check make check -%post -if [ -e %{_infodir}/units.info.gz ]; then - /sbin/install-info %{_infodir}/units.info.gz %{_infodir}/dir || : -fi - -%preun -if [ $1 = 0 -a -e %{_infodir}/units.info.gz ]; then - /sbin/install-info --delete %{_infodir}/units.info.gz %{_infodir}/dir || : -fi - %files %doc ChangeLog COPYING NEWS README %{_bindir}/units From 860a3b91b3c559e1a9c4cb89b64c5584309bf525 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sun, 3 Feb 2019 10:50:20 +0000 Subject: [PATCH 21/58] - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- units.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/units.spec b/units.spec index 9c0990d..13b4a45 100644 --- a/units.spec +++ b/units.spec @@ -1,7 +1,7 @@ Summary: A utility for converting amounts from one unit to another Name: units Version: 2.18 -Release: 1%{?dist} +Release: 2%{?dist} Source: https://ftp.gnu.org/gnu/units/%{name}-%{version}.tar.gz URL: https://www.gnu.org/software/units/units.html License: GPLv3+ @@ -54,6 +54,9 @@ make check %{_mandir}/man1/* %changelog +* Sun Feb 03 2019 Fedora Release Engineering - 2.18-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + * Mon Oct 29 2018 Kamil Dudka - 2.18-1 - new upstream release From 5414c854184951479a3002cce87fb70bfde41a26 Mon Sep 17 00:00:00 2001 From: Igor Gnatenko Date: Sun, 17 Feb 2019 09:30:53 +0100 Subject: [PATCH 22/58] Rebuild for readline 8.0 --- units.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/units.spec b/units.spec index 13b4a45..b8dd1f8 100644 --- a/units.spec +++ b/units.spec @@ -1,7 +1,7 @@ Summary: A utility for converting amounts from one unit to another Name: units Version: 2.18 -Release: 2%{?dist} +Release: 3%{?dist} Source: https://ftp.gnu.org/gnu/units/%{name}-%{version}.tar.gz URL: https://www.gnu.org/software/units/units.html License: GPLv3+ @@ -54,6 +54,9 @@ make check %{_mandir}/man1/* %changelog +* Sun Feb 17 2019 Igor Gnatenko - 2.18-3 +- Rebuild for readline 8.0 + * Sun Feb 03 2019 Fedora Release Engineering - 2.18-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild From 7dabb4033ef44889f42759bc0908015708d9336a Mon Sep 17 00:00:00 2001 From: Kamil Dudka Date: Sat, 1 Jun 2019 17:55:28 +0200 Subject: [PATCH 23/58] new upstream release - 2.19 --- sources | 2 +- units-2.18.tar.gz.sig | Bin 95 -> 0 bytes units-2.19.tar.gz.sig | Bin 0 -> 95 bytes units.spec | 7 +++++-- 4 files changed, 6 insertions(+), 3 deletions(-) delete mode 100644 units-2.18.tar.gz.sig create mode 100644 units-2.19.tar.gz.sig diff --git a/sources b/sources index f2c6e2a..bbb4aad 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (units-2.18.tar.gz) = 2ae9f08acb03f2f443514800dafb454434d7d1a43497d2a937c2e9e8429f63d821be11ae3090693e8cadbd2f9cdeafba8f80c1671d84a9cceb0f72ad75d8cad7 +SHA512 (units-2.19.tar.gz) = f28df8f0b95b53620d4d21ed369551b8510663ff3658293ba62de2722e7dc2d87506db7c65dc192e35f3c3a20842e8ed09ddaa7352532f7e3eaeab4c001061c8 diff --git a/units-2.18.tar.gz.sig b/units-2.18.tar.gz.sig deleted file mode 100644 index 3ac9c3d1c0eec4b09a61b051b2b64b72553020af..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 95 zcmeB(WnmCxVvrS6WSMp2k7LsH$u-~nr|U^{Uj6VOIp33&Df+bOcLpv_0hkC+6vJG( vOzr<^xiL*w>~maf7A;HMmh?M{VV-4|o?L#NMn%S>KOx*6*Jte9ai$gk0Usz{ diff --git a/units-2.19.tar.gz.sig b/units-2.19.tar.gz.sig new file mode 100644 index 0000000000000000000000000000000000000000..5285b102e1ca03111d9eddf4d5c744e7a00b0201 GIT binary patch literal 95 zcmeB(WnmCxVvrS6WSMp2k7LsH$u-~nr|U^{Uj6VOIp33&DdyuECk8G~0howt6vI6I wE6d+<3ra=KWBePTX>z)0@|lK%40CuMD}@!x-mnR~VefMD!~3gG7kTyq00_7#J^%m! literal 0 HcmV?d00001 diff --git a/units.spec b/units.spec index b8dd1f8..c594cc9 100644 --- a/units.spec +++ b/units.spec @@ -1,7 +1,7 @@ Summary: A utility for converting amounts from one unit to another Name: units -Version: 2.18 -Release: 3%{?dist} +Version: 2.19 +Release: 1%{?dist} Source: https://ftp.gnu.org/gnu/units/%{name}-%{version}.tar.gz URL: https://www.gnu.org/software/units/units.html License: GPLv3+ @@ -54,6 +54,9 @@ make check %{_mandir}/man1/* %changelog +* Sat Jun 01 2019 Kamil Dudka - 2.19-1 +- new upstream release + * Sun Feb 17 2019 Igor Gnatenko - 2.18-3 - Rebuild for readline 8.0 From f25849d86356c76c2a7c1389ff172285c74ad8f3 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 27 Jul 2019 02:31:39 +0000 Subject: [PATCH 24/58] - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- units.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/units.spec b/units.spec index c594cc9..f01d79e 100644 --- a/units.spec +++ b/units.spec @@ -1,7 +1,7 @@ Summary: A utility for converting amounts from one unit to another Name: units Version: 2.19 -Release: 1%{?dist} +Release: 2%{?dist} Source: https://ftp.gnu.org/gnu/units/%{name}-%{version}.tar.gz URL: https://www.gnu.org/software/units/units.html License: GPLv3+ @@ -54,6 +54,9 @@ make check %{_mandir}/man1/* %changelog +* Sat Jul 27 2019 Fedora Release Engineering - 2.19-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + * Sat Jun 01 2019 Kamil Dudka - 2.19-1 - new upstream release From e669257b548151ac6b6c56adb5fd32d4b7fed707 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 31 Jan 2020 02:37:35 +0000 Subject: [PATCH 25/58] - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- units.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/units.spec b/units.spec index f01d79e..14e33fb 100644 --- a/units.spec +++ b/units.spec @@ -1,7 +1,7 @@ Summary: A utility for converting amounts from one unit to another Name: units Version: 2.19 -Release: 2%{?dist} +Release: 3%{?dist} Source: https://ftp.gnu.org/gnu/units/%{name}-%{version}.tar.gz URL: https://www.gnu.org/software/units/units.html License: GPLv3+ @@ -54,6 +54,9 @@ make check %{_mandir}/man1/* %changelog +* Fri Jan 31 2020 Fedora Release Engineering - 2.19-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + * Sat Jul 27 2019 Fedora Release Engineering - 2.19-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild From 9af804766b279beb10f3c6744f95adfc198bb3be Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 29 Jul 2020 13:18:47 +0000 Subject: [PATCH 26/58] - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- units.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/units.spec b/units.spec index 14e33fb..6781617 100644 --- a/units.spec +++ b/units.spec @@ -1,7 +1,7 @@ Summary: A utility for converting amounts from one unit to another Name: units Version: 2.19 -Release: 3%{?dist} +Release: 4%{?dist} Source: https://ftp.gnu.org/gnu/units/%{name}-%{version}.tar.gz URL: https://www.gnu.org/software/units/units.html License: GPLv3+ @@ -54,6 +54,9 @@ make check %{_mandir}/man1/* %changelog +* Wed Jul 29 2020 Fedora Release Engineering - 2.19-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + * Fri Jan 31 2020 Fedora Release Engineering - 2.19-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild From 9067863c34a9aff4c29e305fab65ab27c93fe0b1 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 1 Aug 2020 09:33:21 +0000 Subject: [PATCH 27/58] - Second attempt - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- units.spec | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/units.spec b/units.spec index 6781617..c2e7cbf 100644 --- a/units.spec +++ b/units.spec @@ -1,7 +1,7 @@ Summary: A utility for converting amounts from one unit to another Name: units Version: 2.19 -Release: 4%{?dist} +Release: 5%{?dist} Source: https://ftp.gnu.org/gnu/units/%{name}-%{version}.tar.gz URL: https://www.gnu.org/software/units/units.html License: GPLv3+ @@ -54,6 +54,10 @@ make check %{_mandir}/man1/* %changelog +* Sat Aug 01 2020 Fedora Release Engineering - 2.19-5 +- Second attempt - Rebuilt for + https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + * Wed Jul 29 2020 Fedora Release Engineering - 2.19-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild From 859df262f39231f07c782347346a5935507ef64d Mon Sep 17 00:00:00 2001 From: Kamil Dudka Date: Thu, 1 Oct 2020 10:01:40 +0200 Subject: [PATCH 28/58] new upstream release - 2.20 --- sources | 2 +- units-2.19.tar.gz.sig | Bin 95 -> 0 bytes units-2.20.tar.gz.sig | Bin 0 -> 95 bytes units.spec | 7 +++++-- 4 files changed, 6 insertions(+), 3 deletions(-) delete mode 100644 units-2.19.tar.gz.sig create mode 100644 units-2.20.tar.gz.sig diff --git a/sources b/sources index bbb4aad..ac04de1 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (units-2.19.tar.gz) = f28df8f0b95b53620d4d21ed369551b8510663ff3658293ba62de2722e7dc2d87506db7c65dc192e35f3c3a20842e8ed09ddaa7352532f7e3eaeab4c001061c8 +SHA512 (units-2.20.tar.gz) = 5292588fb7ea0ab12e45e5521a115a0eaba4e37378011677cbd80e6e17a6ffa5f388a57859c590b6d65460fc91a4ff33e6603e27d4909b8122d4ad3696c8600d diff --git a/units-2.19.tar.gz.sig b/units-2.19.tar.gz.sig deleted file mode 100644 index 5285b102e1ca03111d9eddf4d5c744e7a00b0201..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 95 zcmeB(WnmCxVvrS6WSMp2k7LsH$u-~nr|U^{Uj6VOIp33&DdyuECk8G~0howt6vI6I wE6d+<3ra=KWBePTX>z)0@|lK%40CuMD}@!x-mnR~VefMD!~3gG7kTyq00_7#J^%m! diff --git a/units-2.20.tar.gz.sig b/units-2.20.tar.gz.sig new file mode 100644 index 0000000000000000000000000000000000000000..a8210a05b87a06d1a665546f269ca67b834bc537 GIT binary patch literal 95 zcmeB(WnmCxVvrS6WSMp2k7LsH$u-~nr|U^{Uj6VOIp33&DZW(5iGhn#048!`1;ae; w#S&4c53X|ckgJ_~+5X7#2-aoc4D;PrzB?~{f-#|7@_o0G-_E;Tle2yR0QJErp#T5? literal 0 HcmV?d00001 diff --git a/units.spec b/units.spec index c2e7cbf..190aaab 100644 --- a/units.spec +++ b/units.spec @@ -1,7 +1,7 @@ Summary: A utility for converting amounts from one unit to another Name: units -Version: 2.19 -Release: 5%{?dist} +Version: 2.20 +Release: 1%{?dist} Source: https://ftp.gnu.org/gnu/units/%{name}-%{version}.tar.gz URL: https://www.gnu.org/software/units/units.html License: GPLv3+ @@ -54,6 +54,9 @@ make check %{_mandir}/man1/* %changelog +* Thu Oct 01 2020 Kamil Dudka - 2.20-1 +- new upstream release + * Sat Aug 01 2020 Fedora Release Engineering - 2.19-5 - Second attempt - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild From c1c1f05c7e976b9b29ccc49f8f82ca5cce111ad2 Mon Sep 17 00:00:00 2001 From: Kamil Dudka Date: Mon, 16 Nov 2020 14:38:46 +0100 Subject: [PATCH 29/58] new upstream release - 2.21 --- sources | 2 +- units-2.20.tar.gz.sig | Bin 95 -> 0 bytes units-2.21.tar.gz.sig | Bin 0 -> 95 bytes units.spec | 5 ++++- 4 files changed, 5 insertions(+), 2 deletions(-) delete mode 100644 units-2.20.tar.gz.sig create mode 100644 units-2.21.tar.gz.sig diff --git a/sources b/sources index ac04de1..d59bc0d 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (units-2.20.tar.gz) = 5292588fb7ea0ab12e45e5521a115a0eaba4e37378011677cbd80e6e17a6ffa5f388a57859c590b6d65460fc91a4ff33e6603e27d4909b8122d4ad3696c8600d +SHA512 (units-2.21.tar.gz) = 34bacff606f12aa5b2e59170f6b2142277aa1121d79610a51b57f07f17ae2dbdfbbb0e60be34522f367679cc152408f77c1ebb551016224d23f81c21f4b3ba62 diff --git a/units-2.20.tar.gz.sig b/units-2.20.tar.gz.sig deleted file mode 100644 index a8210a05b87a06d1a665546f269ca67b834bc537..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 95 zcmeB(WnmCxVvrS6WSMp2k7LsH$u-~nr|U^{Uj6VOIp33&DZW(5iGhn#048!`1;ae; w#S&4c53X|ckgJ_~+5X7#2-aoc4D;PrzB?~{f-#|7@_o0G-_E;Tle2yR0QJErp#T5? diff --git a/units-2.21.tar.gz.sig b/units-2.21.tar.gz.sig new file mode 100644 index 0000000000000000000000000000000000000000..3fcb5eaa23810355041f02be3e1b708c4f49e47c GIT binary patch literal 95 zcmeB(WnmCxVvrS6WSMp2k7LsH$u-~nr|U^{Uj6VOIp33&DSqQe4+bty0hoyOJ%+gg vr=Mm?@IE7tF>P)FwC>a&3|4jRPy4^b8~Sqs|yAZ;gZV%N}VY? literal 0 HcmV?d00001 diff --git a/units.spec b/units.spec index 190aaab..9c0d150 100644 --- a/units.spec +++ b/units.spec @@ -1,6 +1,6 @@ Summary: A utility for converting amounts from one unit to another Name: units -Version: 2.20 +Version: 2.21 Release: 1%{?dist} Source: https://ftp.gnu.org/gnu/units/%{name}-%{version}.tar.gz URL: https://www.gnu.org/software/units/units.html @@ -54,6 +54,9 @@ make check %{_mandir}/man1/* %changelog +* Mon Nov 16 2020 Kamil Dudka - 2.21-1 +- new upstream release + * Thu Oct 01 2020 Kamil Dudka - 2.20-1 - new upstream release From 6b331c3369fd5a2691cede4649597c023f0dc40e Mon Sep 17 00:00:00 2001 From: Tom Stellard Date: Sat, 9 Jan 2021 00:24:22 +0000 Subject: [PATCH 30/58] Add BuildRequires: make https://fedoraproject.org/wiki/Changes/Remove_make_from_BuildRoot --- units.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/units.spec b/units.spec index 9c0d150..c4a99ff 100644 --- a/units.spec +++ b/units.spec @@ -5,6 +5,7 @@ Release: 1%{?dist} Source: https://ftp.gnu.org/gnu/units/%{name}-%{version}.tar.gz URL: https://www.gnu.org/software/units/units.html License: GPLv3+ +BuildRequires: make BuildRequires: automake BuildRequires: bison BuildRequires: gcc From 5e54b26221068d9894d08ee7ce7c54f540bd68e9 Mon Sep 17 00:00:00 2001 From: Kamil Dudka Date: Sat, 9 Jan 2021 14:03:11 +0100 Subject: [PATCH 31/58] units.spec: keep BR list alphabetically sorted --- units.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/units.spec b/units.spec index c4a99ff..5d27124 100644 --- a/units.spec +++ b/units.spec @@ -5,10 +5,10 @@ Release: 1%{?dist} Source: https://ftp.gnu.org/gnu/units/%{name}-%{version}.tar.gz URL: https://www.gnu.org/software/units/units.html License: GPLv3+ -BuildRequires: make BuildRequires: automake BuildRequires: bison BuildRequires: gcc +BuildRequires: make BuildRequires: ncurses-devel BuildRequires: python3-devel BuildRequires: readline-devel From 7133bcde165ef8aa9fe4c398c08d3c766478ec23 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 27 Jan 2021 22:41:10 +0000 Subject: [PATCH 32/58] - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- units.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/units.spec b/units.spec index 5d27124..8cbce73 100644 --- a/units.spec +++ b/units.spec @@ -1,7 +1,7 @@ Summary: A utility for converting amounts from one unit to another Name: units Version: 2.21 -Release: 1%{?dist} +Release: 2%{?dist} Source: https://ftp.gnu.org/gnu/units/%{name}-%{version}.tar.gz URL: https://www.gnu.org/software/units/units.html License: GPLv3+ @@ -55,6 +55,9 @@ make check %{_mandir}/man1/* %changelog +* Wed Jan 27 2021 Fedora Release Engineering - 2.21-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + * Mon Nov 16 2020 Kamil Dudka - 2.21-1 - new upstream release From b540b74195081199fd63828b2abc1515a5463397 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 23 Jul 2021 20:03:25 +0000 Subject: [PATCH 33/58] - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- units.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/units.spec b/units.spec index 8cbce73..7aa1d6e 100644 --- a/units.spec +++ b/units.spec @@ -1,7 +1,7 @@ Summary: A utility for converting amounts from one unit to another Name: units Version: 2.21 -Release: 2%{?dist} +Release: 3%{?dist} Source: https://ftp.gnu.org/gnu/units/%{name}-%{version}.tar.gz URL: https://www.gnu.org/software/units/units.html License: GPLv3+ @@ -55,6 +55,9 @@ make check %{_mandir}/man1/* %changelog +* Fri Jul 23 2021 Fedora Release Engineering - 2.21-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + * Wed Jan 27 2021 Fedora Release Engineering - 2.21-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild From 1c3b7305e8693b8c8d592b994fc8e65372fdc986 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 22 Jan 2022 03:32:26 +0000 Subject: [PATCH 34/58] - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- units.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/units.spec b/units.spec index 7aa1d6e..7764996 100644 --- a/units.spec +++ b/units.spec @@ -1,7 +1,7 @@ Summary: A utility for converting amounts from one unit to another Name: units Version: 2.21 -Release: 3%{?dist} +Release: 4%{?dist} Source: https://ftp.gnu.org/gnu/units/%{name}-%{version}.tar.gz URL: https://www.gnu.org/software/units/units.html License: GPLv3+ @@ -55,6 +55,9 @@ make check %{_mandir}/man1/* %changelog +* Sat Jan 22 2022 Fedora Release Engineering - 2.21-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + * Fri Jul 23 2021 Fedora Release Engineering - 2.21-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild From 3ad0cbd5bf17dd14b5203df8e954904c0db228e7 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 23 Jul 2022 11:24:49 +0000 Subject: [PATCH 35/58] Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- units.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/units.spec b/units.spec index 7764996..02596a8 100644 --- a/units.spec +++ b/units.spec @@ -1,7 +1,7 @@ Summary: A utility for converting amounts from one unit to another Name: units Version: 2.21 -Release: 4%{?dist} +Release: 5%{?dist} Source: https://ftp.gnu.org/gnu/units/%{name}-%{version}.tar.gz URL: https://www.gnu.org/software/units/units.html License: GPLv3+ @@ -55,6 +55,9 @@ make check %{_mandir}/man1/* %changelog +* Sat Jul 23 2022 Fedora Release Engineering - 2.21-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + * Sat Jan 22 2022 Fedora Release Engineering - 2.21-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild From 9637bfd8edc46b6f92635adc94ef94b3a8d824f7 Mon Sep 17 00:00:00 2001 From: Kamil Dudka Date: Tue, 6 Sep 2022 08:34:14 +0200 Subject: [PATCH 36/58] new upstream release - 2.22 --- .gitignore | 1 + 0001-units-2.22-no-network.patch | 26 +++++++++++++++++ 0002-units-2.17-no-network.patch | 47 ------------------------------- sources | 3 +- units-2.21.tar.gz.sig | Bin 95 -> 0 bytes units.spec | 14 ++++++--- 6 files changed, 39 insertions(+), 52 deletions(-) create mode 100644 0001-units-2.22-no-network.patch delete mode 100644 0002-units-2.17-no-network.patch delete mode 100644 units-2.21.tar.gz.sig diff --git a/.gitignore b/.gitignore index e2612c2..78bb7c3 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ /units-*.tar.gz +/units-*.tar.gz.sig diff --git a/0001-units-2.22-no-network.patch b/0001-units-2.22-no-network.patch new file mode 100644 index 0000000..6c85a81 --- /dev/null +++ b/0001-units-2.22-no-network.patch @@ -0,0 +1,26 @@ +From f18e95585de3d6f94c3b64af7bcc8793063223d3 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 | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/Makefile.in b/Makefile.in +index 79baf1d..2b71aeb 100644 +--- a/Makefile.in ++++ b/Makefile.in +@@ -266,7 +266,7 @@ units.txt: units.1 + + doc: units.dvi units.info units.txt units.pdf UnitsMKS.pdf UnitsWin.pdf + +-check: all currency-update-check ++check: all + @echo Checking units + @./units -f $(srcdir)/definitions.units \ + '(((square(kiloinch)+2.84m2) /0.5) meters^2)^(1|4)' m \ +-- +2.37.2 + diff --git a/0002-units-2.17-no-network.patch b/0002-units-2.17-no-network.patch deleted file mode 100644 index 9eba690..0000000 --- a/0002-units-2.17-no-network.patch +++ /dev/null @@ -1,47 +0,0 @@ -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 -@@ -61,8 +61,6 @@ CFLAGS = @CFLAGS@ - CPPFLAGS = @CPPFLAGS@ - OBJECTS = units.@OBJEXT@ parse.tab.@OBJEXT@ getopt.@OBJEXT@ getopt1.@OBJEXT@ @STRFUNC@ - --.PHONY: currency-units-update -- - .SUFFIXES: - .SUFFIXES: .c .@OBJEXT@ .rc .res .texinfo .pdf - -@@ -110,7 +108,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 -@@ -207,11 +205,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/sources b/sources index d59bc0d..0fd55d9 100644 --- a/sources +++ b/sources @@ -1 +1,2 @@ -SHA512 (units-2.21.tar.gz) = 34bacff606f12aa5b2e59170f6b2142277aa1121d79610a51b57f07f17ae2dbdfbbb0e60be34522f367679cc152408f77c1ebb551016224d23f81c21f4b3ba62 +SHA512 (units-2.22.tar.gz) = 4ed62ce6ee861b817916bc925713794187fa63eb5320e8e720558ac1d5bd48d5f1c9500e1d1f90414a6f4410f1ab806928c2a655adf4cd8b51829cd73397ab2f +SHA512 (units-2.22.tar.gz.sig) = 50a94263631d05642e56f42805711d56a54c93c73a143cdf7c18087722b5f1fff46bb8ab56abe3ca984738d8301be75ecfd2f1f9ea1917976353357a0aaad742 diff --git a/units-2.21.tar.gz.sig b/units-2.21.tar.gz.sig deleted file mode 100644 index 3fcb5eaa23810355041f02be3e1b708c4f49e47c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 95 zcmeB(WnmCxVvrS6WSMp2k7LsH$u-~nr|U^{Uj6VOIp33&DSqQe4+bty0hoyOJ%+gg vr=Mm?@IE7tF>P)FwC>a&3|4jRPy4^b8~Sqs|yAZ;gZV%N}VY? diff --git a/units.spec b/units.spec index 02596a8..4faa6c4 100644 --- a/units.spec +++ b/units.spec @@ -1,7 +1,7 @@ Summary: A utility for converting amounts from one unit to another Name: units -Version: 2.21 -Release: 5%{?dist} +Version: 2.22 +Release: 1%{?dist} Source: https://ftp.gnu.org/gnu/units/%{name}-%{version}.tar.gz URL: https://www.gnu.org/software/units/units.html License: GPLv3+ @@ -14,7 +14,7 @@ BuildRequires: python3-devel BuildRequires: readline-devel # do not update currency.units from network during build -Patch2: 0002-units-2.17-no-network.patch +Patch1: 0001-units-2.22-no-network.patch %description Units converts an amount from one unit to another, or tells you what @@ -37,6 +37,9 @@ make %{?_smp_mflags} %install make install DESTDIR=$RPM_BUILD_ROOT +# remove %%{buildroot} from the target of an absolute symlink +ln -fsv %{_sharedstatedir}/units/currency.units %{buildroot}%{_datadir}/units + gzip $RPM_BUILD_ROOT%{_infodir}/units.info # provide a man page for units_cur as a symlink to units.1 @@ -46,7 +49,7 @@ ln -s units.1 %{buildroot}%{_mandir}/man1/units_cur.1 make check %files -%doc ChangeLog COPYING NEWS README +%doc COPYING NEWS README %{_bindir}/units %{_bindir}/units_cur %{_datadir}/units @@ -55,6 +58,9 @@ make check %{_mandir}/man1/* %changelog +* Tue Sep 06 2022 Kamil Dudka - 2.22-1 +- new upstream release + * Sat Jul 23 2022 Fedora Release Engineering - 2.21-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild From 494095d7c0e2c0df9e7323d4bff49b28b6d62007 Mon Sep 17 00:00:00 2001 From: Kamil Dudka Date: Tue, 6 Sep 2022 09:00:03 +0200 Subject: [PATCH 37/58] units.spec: use %{buildroot} rather than $RPM_BUILD_ROOT ... for consistency. No change in behavior expected with this commit. --- units.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/units.spec b/units.spec index 4faa6c4..85e66b7 100644 --- a/units.spec +++ b/units.spec @@ -35,12 +35,12 @@ autoreconf -fiv make %{?_smp_mflags} %install -make install DESTDIR=$RPM_BUILD_ROOT +make install DESTDIR=%{buildroot} # remove %%{buildroot} from the target of an absolute symlink ln -fsv %{_sharedstatedir}/units/currency.units %{buildroot}%{_datadir}/units -gzip $RPM_BUILD_ROOT%{_infodir}/units.info +gzip %{buildroot}%{_infodir}/units.info # provide a man page for units_cur as a symlink to units.1 ln -s units.1 %{buildroot}%{_mandir}/man1/units_cur.1 From 6869b51de8f6d0a9c0d73bdd48ceb42bffdb6e3c Mon Sep 17 00:00:00 2001 From: Kamil Dudka Date: Tue, 6 Sep 2022 09:03:02 +0200 Subject: [PATCH 38/58] units.spec: use %make_build and %make_install RPM macros No change in behavior expected with this commit. --- units.spec | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/units.spec b/units.spec index 85e66b7..480dcfe 100644 --- a/units.spec +++ b/units.spec @@ -1,7 +1,7 @@ Summary: A utility for converting amounts from one unit to another Name: units Version: 2.22 -Release: 1%{?dist} +Release: 2%{?dist} Source: https://ftp.gnu.org/gnu/units/%{name}-%{version}.tar.gz URL: https://www.gnu.org/software/units/units.html License: GPLv3+ @@ -32,10 +32,10 @@ autoreconf -fiv %build %configure -make %{?_smp_mflags} +%make_build %install -make install DESTDIR=%{buildroot} +%make_install # remove %%{buildroot} from the target of an absolute symlink ln -fsv %{_sharedstatedir}/units/currency.units %{buildroot}%{_datadir}/units @@ -58,6 +58,9 @@ make check %{_mandir}/man1/* %changelog +* Tue Sep 06 2022 Kamil Dudka - 2.22-2 +- use %%make_build and %%make_install RPM macros + * Tue Sep 06 2022 Kamil Dudka - 2.22-1 - new upstream release From d4c3be7140fa69b57bcf5a9ac98b43bf919b63e5 Mon Sep 17 00:00:00 2001 From: Kamil Dudka Date: Tue, 6 Sep 2022 09:07:25 +0200 Subject: [PATCH 39/58] units.spec: replace an absolute symlink by a relative symlink ... to eliminate the following rpmbuild warning: ``` RPM build warnings: absolute symlink: /usr/share/units/currency.units -> /var/lib/units/currency.units ``` --- units.spec | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/units.spec b/units.spec index 480dcfe..1240257 100644 --- a/units.spec +++ b/units.spec @@ -37,8 +37,8 @@ autoreconf -fiv %install %make_install -# remove %%{buildroot} from the target of an absolute symlink -ln -fsv %{_sharedstatedir}/units/currency.units %{buildroot}%{_datadir}/units +# replace an absolute symlink by a relative symlink +ln -fsv ../../..%{_sharedstatedir}/units/currency.units %{buildroot}%{_datadir}/units gzip %{buildroot}%{_infodir}/units.info @@ -59,6 +59,7 @@ make check %changelog * Tue Sep 06 2022 Kamil Dudka - 2.22-2 +- replace an absolute symlink by a relative symlink - use %%make_build and %%make_install RPM macros * Tue Sep 06 2022 Kamil Dudka - 2.22-1 From 022c2b229c2e258bf774f3868998b77f55d75759 Mon Sep 17 00:00:00 2001 From: Kamil Dudka Date: Tue, 6 Sep 2022 09:13:34 +0200 Subject: [PATCH 40/58] remove a build system tweak related to Python 3 ... no longer needed --- units.spec | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/units.spec b/units.spec index 1240257..67e7e27 100644 --- a/units.spec +++ b/units.spec @@ -1,11 +1,10 @@ Summary: A utility for converting amounts from one unit to another Name: units Version: 2.22 -Release: 2%{?dist} +Release: 3%{?dist} Source: https://ftp.gnu.org/gnu/units/%{name}-%{version}.tar.gz URL: https://www.gnu.org/software/units/units.html License: GPLv3+ -BuildRequires: automake BuildRequires: bison BuildRequires: gcc BuildRequires: make @@ -25,11 +24,6 @@ well as conversions such as Fahrenheit to Celsius. %prep %autosetup -p1 -# make units_cur use Python 3 -sed -e 's|^AC_PATH_PROG(PYTHON, .*$|PYTHON=%{__python3}\nAC_SUBST(PYTHON)|' \ - -i configure.ac -autoreconf -fiv - %build %configure %make_build @@ -58,6 +52,9 @@ make check %{_mandir}/man1/* %changelog +* Tue Sep 06 2022 Kamil Dudka - 2.22-3 +- remove a build system tweak related to Python 3 no longer needed + * Tue Sep 06 2022 Kamil Dudka - 2.22-2 - replace an absolute symlink by a relative symlink - use %%make_build and %%make_install RPM macros From cae8293c4baac5cec4b1e6946bfd15fac544a8b2 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 21 Jan 2023 05:50:19 +0000 Subject: [PATCH 41/58] Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- units.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/units.spec b/units.spec index 67e7e27..658bdb4 100644 --- a/units.spec +++ b/units.spec @@ -1,7 +1,7 @@ Summary: A utility for converting amounts from one unit to another Name: units Version: 2.22 -Release: 3%{?dist} +Release: 4%{?dist} Source: https://ftp.gnu.org/gnu/units/%{name}-%{version}.tar.gz URL: https://www.gnu.org/software/units/units.html License: GPLv3+ @@ -52,6 +52,9 @@ make check %{_mandir}/man1/* %changelog +* Sat Jan 21 2023 Fedora Release Engineering - 2.22-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + * Tue Sep 06 2022 Kamil Dudka - 2.22-3 - remove a build system tweak related to Python 3 no longer needed From ca979f32368a749247ce49cfeb3092045fc53f29 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Zaoral?= Date: Thu, 13 Apr 2023 14:22:40 +0200 Subject: [PATCH 42/58] migrate to SPDX license format --- units.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/units.spec b/units.spec index 658bdb4..9dbdaf0 100644 --- a/units.spec +++ b/units.spec @@ -1,10 +1,10 @@ Summary: A utility for converting amounts from one unit to another Name: units Version: 2.22 -Release: 4%{?dist} +Release: 5%{?dist} Source: https://ftp.gnu.org/gnu/units/%{name}-%{version}.tar.gz URL: https://www.gnu.org/software/units/units.html -License: GPLv3+ +License: GPL-3.0-or-later BuildRequires: bison BuildRequires: gcc BuildRequires: make @@ -52,6 +52,9 @@ make check %{_mandir}/man1/* %changelog +* Thu Apr 13 2023 Lukáš Zaoral - 2.22-5 +- migrate to SPDX license format + * Sat Jan 21 2023 Fedora Release Engineering - 2.22-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild From 188062b89fa4a8fcc449cbf4da550a472d4915f4 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 22 Jul 2023 17:08:12 +0000 Subject: [PATCH 43/58] Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- units.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/units.spec b/units.spec index 9dbdaf0..5f486a7 100644 --- a/units.spec +++ b/units.spec @@ -1,7 +1,7 @@ Summary: A utility for converting amounts from one unit to another Name: units Version: 2.22 -Release: 5%{?dist} +Release: 6%{?dist} Source: https://ftp.gnu.org/gnu/units/%{name}-%{version}.tar.gz URL: https://www.gnu.org/software/units/units.html License: GPL-3.0-or-later @@ -52,6 +52,9 @@ make check %{_mandir}/man1/* %changelog +* Sat Jul 22 2023 Fedora Release Engineering - 2.22-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + * Thu Apr 13 2023 Lukáš Zaoral - 2.22-5 - migrate to SPDX license format From ed0fb27512cf2e9ccd90ea695fcf7cab2651aba5 Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Thu, 30 Nov 2023 15:56:59 +0100 Subject: [PATCH 44/58] C compatibility fix for the configure script (#2252276) Related to: --- units-configure-c99.patch | 26 ++++++++++++++++++++++++++ units.spec | 6 +++++- 2 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 units-configure-c99.patch diff --git a/units-configure-c99.patch b/units-configure-c99.patch new file mode 100644 index 0000000..69ce068 --- /dev/null +++ b/units-configure-c99.patch @@ -0,0 +1,26 @@ +diff --git a/configure b/configure +index 22c75a6222b06f68..43461d54e59f1568 100755 +--- a/configure ++++ b/configure +@@ -3881,7 +3881,7 @@ else + int + main () + { +-wchar_t *out;char *in;char *res; ++wchar_t *out;char *in;const char *res; + res=setlocale(LC_CTYPE,"");res=in; + mbsrtowcs(out, &res, 2, NULL); + wcswidth(out,2); +diff --git a/configure.ac b/configure.ac +index c728d5c15d16ab2e..cd39f96e39f7d587 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -121,7 +121,7 @@ AC_CACHE_CHECK([for locale and UTF-8 support], am_cv_utf8, + #include + #include + #include +-], [wchar_t *out;char *in;char *res; ++], [wchar_t *out;char *in;const char *res; + res=setlocale(LC_CTYPE,"");res=in; + mbsrtowcs(out, &res, 2, NULL); + wcswidth(out,2);], diff --git a/units.spec b/units.spec index 5f486a7..74f3a40 100644 --- a/units.spec +++ b/units.spec @@ -1,7 +1,7 @@ Summary: A utility for converting amounts from one unit to another Name: units Version: 2.22 -Release: 6%{?dist} +Release: 7%{?dist} Source: https://ftp.gnu.org/gnu/units/%{name}-%{version}.tar.gz URL: https://www.gnu.org/software/units/units.html License: GPL-3.0-or-later @@ -14,6 +14,7 @@ BuildRequires: readline-devel # do not update currency.units from network during build Patch1: 0001-units-2.22-no-network.patch +Patch2: units-configure-c99.patch %description Units converts an amount from one unit to another, or tells you what @@ -52,6 +53,9 @@ make check %{_mandir}/man1/* %changelog +* Thu Nov 30 2023 Florian Weimer - 2.22-7 +- C compatibility fix for the configure script (#2252276) + * Sat Jul 22 2023 Fedora Release Engineering - 2.22-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild From f3ee1c5fb0f6d397ce73fd30ec9d2c7cb578126a Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 27 Jan 2024 07:08:14 +0000 Subject: [PATCH 45/58] Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild --- units.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/units.spec b/units.spec index 74f3a40..729bda1 100644 --- a/units.spec +++ b/units.spec @@ -1,7 +1,7 @@ Summary: A utility for converting amounts from one unit to another Name: units Version: 2.22 -Release: 7%{?dist} +Release: 8%{?dist} Source: https://ftp.gnu.org/gnu/units/%{name}-%{version}.tar.gz URL: https://www.gnu.org/software/units/units.html License: GPL-3.0-or-later @@ -53,6 +53,9 @@ make check %{_mandir}/man1/* %changelog +* Sat Jan 27 2024 Fedora Release Engineering - 2.22-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + * Thu Nov 30 2023 Florian Weimer - 2.22-7 - C compatibility fix for the configure script (#2252276) From b9c2d66e15226938f51eb0f3c49241e280294fc1 Mon Sep 17 00:00:00 2001 From: Jan Macku Date: Mon, 19 Feb 2024 15:52:23 +0100 Subject: [PATCH 46/58] new upstream release - 2.23 Resolves: #2264817 --- ....patch => 0100-units-2.22-no-network.patch | 0 sources | 4 +-- units-configure-c99.patch | 26 ------------------- units.spec | 10 ++++--- 4 files changed, 8 insertions(+), 32 deletions(-) rename 0001-units-2.22-no-network.patch => 0100-units-2.22-no-network.patch (100%) delete mode 100644 units-configure-c99.patch diff --git a/0001-units-2.22-no-network.patch b/0100-units-2.22-no-network.patch similarity index 100% rename from 0001-units-2.22-no-network.patch rename to 0100-units-2.22-no-network.patch diff --git a/sources b/sources index 0fd55d9..2020c73 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (units-2.22.tar.gz) = 4ed62ce6ee861b817916bc925713794187fa63eb5320e8e720558ac1d5bd48d5f1c9500e1d1f90414a6f4410f1ab806928c2a655adf4cd8b51829cd73397ab2f -SHA512 (units-2.22.tar.gz.sig) = 50a94263631d05642e56f42805711d56a54c93c73a143cdf7c18087722b5f1fff46bb8ab56abe3ca984738d8301be75ecfd2f1f9ea1917976353357a0aaad742 +SHA512 (units-2.23.tar.gz) = 628aac3a560ed728f1aba91841f9fccc0b145375a0b8953b98ac00c71bcc7f647377d16c6ba7b59e987a6e7a74b44038a62f2576f757a43d7564be469be81ee8 +SHA512 (units-2.23.tar.gz.sig) = 47fddead011bc3683033993f6e225bb580d4c86e165c7e9bcaba5eef88498992166ec206cc86f96cb1a62271513d715cdf62503fa4c08bbf943d6f60f8f792f9 diff --git a/units-configure-c99.patch b/units-configure-c99.patch deleted file mode 100644 index 69ce068..0000000 --- a/units-configure-c99.patch +++ /dev/null @@ -1,26 +0,0 @@ -diff --git a/configure b/configure -index 22c75a6222b06f68..43461d54e59f1568 100755 ---- a/configure -+++ b/configure -@@ -3881,7 +3881,7 @@ else - int - main () - { --wchar_t *out;char *in;char *res; -+wchar_t *out;char *in;const char *res; - res=setlocale(LC_CTYPE,"");res=in; - mbsrtowcs(out, &res, 2, NULL); - wcswidth(out,2); -diff --git a/configure.ac b/configure.ac -index c728d5c15d16ab2e..cd39f96e39f7d587 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -121,7 +121,7 @@ AC_CACHE_CHECK([for locale and UTF-8 support], am_cv_utf8, - #include - #include - #include --], [wchar_t *out;char *in;char *res; -+], [wchar_t *out;char *in;const char *res; - res=setlocale(LC_CTYPE,"");res=in; - mbsrtowcs(out, &res, 2, NULL); - wcswidth(out,2);], diff --git a/units.spec b/units.spec index 729bda1..996af7e 100644 --- a/units.spec +++ b/units.spec @@ -1,7 +1,7 @@ Summary: A utility for converting amounts from one unit to another Name: units -Version: 2.22 -Release: 8%{?dist} +Version: 2.23 +Release: 1%{?dist} Source: https://ftp.gnu.org/gnu/units/%{name}-%{version}.tar.gz URL: https://www.gnu.org/software/units/units.html License: GPL-3.0-or-later @@ -13,8 +13,7 @@ BuildRequires: python3-devel BuildRequires: readline-devel # do not update currency.units from network during build -Patch1: 0001-units-2.22-no-network.patch -Patch2: units-configure-c99.patch +Patch100: 0100-units-2.22-no-network.patch %description Units converts an amount from one unit to another, or tells you what @@ -53,6 +52,9 @@ make check %{_mandir}/man1/* %changelog +* Mon Feb 19 2024 Jan Macku - 2.23-1 +- new upstream release + * Sat Jan 27 2024 Fedora Release Engineering - 2.22-8 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild From 7d83a93b9fa7872efb35a7e11d11439498f8d1a4 Mon Sep 17 00:00:00 2001 From: Jan Macku Date: Thu, 11 Apr 2024 16:18:40 +0200 Subject: [PATCH 47/58] make less a default pager to avoid error about missing /usr/bin/pager Resolves: #2268395 --- 0101-fix-make-less-default-pager.patch | 26 ++++++++++++++++++++++++++ units.spec | 11 ++++++++++- 2 files changed, 36 insertions(+), 1 deletion(-) create mode 100644 0101-fix-make-less-default-pager.patch diff --git a/0101-fix-make-less-default-pager.patch b/0101-fix-make-less-default-pager.patch new file mode 100644 index 0000000..574a06d --- /dev/null +++ b/0101-fix-make-less-default-pager.patch @@ -0,0 +1,26 @@ +From 413f9f5563ec85756ff1a35276e1c4833d15713e Mon Sep 17 00:00:00 2001 +From: Jan Macku +Date: Thu, 11 Apr 2024 16:10:28 +0200 +Subject: [PATCH] fix: make less default pager + +Resolves: #2268395 +--- + units.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/units.c b/units.c +index 469a82b..8b7dd78 100644 +--- a/units.c ++++ b/units.c +@@ -130,7 +130,7 @@ under the terms of the GNU General Public License." + #ifdef _WIN32 + # define DEFAULTPAGER "more" /* Default pager for Windows */ + #else +-# define DEFAULTPAGER "/usr/bin/pager" /* Default pager for Unix */ ++# define DEFAULTPAGER "/usr/bin/less" /* Default pager for Unix */ + #endif + #define DEFAULTLOCALE "en_US" /* Default locale */ + #define MAXINCLUDE 5 /* Max depth of include files */ +-- +2.44.0 + diff --git a/units.spec b/units.spec index 996af7e..14a9f6b 100644 --- a/units.spec +++ b/units.spec @@ -1,10 +1,13 @@ Summary: A utility for converting amounts from one unit to another Name: units Version: 2.23 -Release: 1%{?dist} +Release: 2%{?dist} Source: https://ftp.gnu.org/gnu/units/%{name}-%{version}.tar.gz URL: https://www.gnu.org/software/units/units.html License: GPL-3.0-or-later + +Requires: less + BuildRequires: bison BuildRequires: gcc BuildRequires: make @@ -15,6 +18,9 @@ BuildRequires: readline-devel # do not update currency.units from network during build Patch100: 0100-units-2.22-no-network.patch +# make less a default pager to avoid error about missing /usr/bin/pager +Patch101: 0101-fix-make-less-default-pager.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 @@ -52,6 +58,9 @@ make check %{_mandir}/man1/* %changelog +* Thu Apr 11 2024 Jan Macku - 2.23-2 +- fix make less the default pager (#2268395) + * Mon Feb 19 2024 Jan Macku - 2.23-1 - new upstream release From 412cd5dc88cf29f177328d9e2e97fbb0fe8814b7 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 20 Jul 2024 08:17:15 +0000 Subject: [PATCH 48/58] Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild --- units.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/units.spec b/units.spec index 14a9f6b..2d9f88f 100644 --- a/units.spec +++ b/units.spec @@ -1,7 +1,7 @@ Summary: A utility for converting amounts from one unit to another Name: units Version: 2.23 -Release: 2%{?dist} +Release: 3%{?dist} Source: https://ftp.gnu.org/gnu/units/%{name}-%{version}.tar.gz URL: https://www.gnu.org/software/units/units.html License: GPL-3.0-or-later @@ -58,6 +58,9 @@ make check %{_mandir}/man1/* %changelog +* Sat Jul 20 2024 Fedora Release Engineering - 2.23-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild + * Thu Apr 11 2024 Jan Macku - 2.23-2 - fix make less the default pager (#2268395) From 6e31795663e8c7b20ea0bd01d50e862d8544755a Mon Sep 17 00:00:00 2001 From: Jan Macku Date: Fri, 29 Nov 2024 13:03:48 +0100 Subject: [PATCH 49/58] new upstream release - 2.24 Resolves: #2328816 --- .gitignore | 1 + sources | 4 ++-- units.spec | 7 +++++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 78bb7c3..b916051 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ /units-*.tar.gz /units-*.tar.gz.sig +/units-*/ diff --git a/sources b/sources index 2020c73..5152430 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (units-2.23.tar.gz) = 628aac3a560ed728f1aba91841f9fccc0b145375a0b8953b98ac00c71bcc7f647377d16c6ba7b59e987a6e7a74b44038a62f2576f757a43d7564be469be81ee8 -SHA512 (units-2.23.tar.gz.sig) = 47fddead011bc3683033993f6e225bb580d4c86e165c7e9bcaba5eef88498992166ec206cc86f96cb1a62271513d715cdf62503fa4c08bbf943d6f60f8f792f9 +SHA512 (units-2.24.tar.gz) = cf0a5f3ad410ff3eeaabfac71f5570b1eed9014c0a76afb6e6f3059b5eb3184cb577f9f76b1c5acd3a1aa8beb12ad060af5af00eef8361d68a7a19697486540f +SHA512 (units-2.24.tar.gz.sig) = 1f63f46e6a073046f7e53d88d07145271a70735e6dfc2a599dbbbbb938ec880cab1abcf2340f0ec2eb4c14b8d2159220ed7d2528972536472b74aba8895978ff diff --git a/units.spec b/units.spec index 2d9f88f..04c6b48 100644 --- a/units.spec +++ b/units.spec @@ -1,7 +1,7 @@ Summary: A utility for converting amounts from one unit to another Name: units -Version: 2.23 -Release: 3%{?dist} +Version: 2.24 +Release: 1%{?dist} Source: https://ftp.gnu.org/gnu/units/%{name}-%{version}.tar.gz URL: https://www.gnu.org/software/units/units.html License: GPL-3.0-or-later @@ -58,6 +58,9 @@ make check %{_mandir}/man1/* %changelog +* Fri Nov 29 2024 Jan Macku - 2.24-1 +- new upstream release + * Sat Jul 20 2024 Fedora Release Engineering - 2.23-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild From ea473973f786479b8d1963eca3381f34b3fa0f03 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sun, 19 Jan 2025 13:47:07 +0000 Subject: [PATCH 50/58] Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild --- units.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/units.spec b/units.spec index 04c6b48..f7625b9 100644 --- a/units.spec +++ b/units.spec @@ -1,7 +1,7 @@ Summary: A utility for converting amounts from one unit to another Name: units Version: 2.24 -Release: 1%{?dist} +Release: 2%{?dist} Source: https://ftp.gnu.org/gnu/units/%{name}-%{version}.tar.gz URL: https://www.gnu.org/software/units/units.html License: GPL-3.0-or-later @@ -58,6 +58,9 @@ make check %{_mandir}/man1/* %changelog +* Sun Jan 19 2025 Fedora Release Engineering - 2.24-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild + * Fri Nov 29 2024 Jan Macku - 2.24-1 - new upstream release From 5613aa6db572d8280686e59a1e197521b7c85b12 Mon Sep 17 00:00:00 2001 From: Jan Macku Date: Thu, 20 Feb 2025 13:18:51 +0100 Subject: [PATCH 51/58] Use C17 standard to avoid compilation errors We will revert this change once the upstream adopts the latest C standard Resolves: #2341484 --- units.spec | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/units.spec b/units.spec index f7625b9..54c6fa0 100644 --- a/units.spec +++ b/units.spec @@ -1,7 +1,7 @@ Summary: A utility for converting amounts from one unit to another Name: units Version: 2.24 -Release: 2%{?dist} +Release: 3%{?dist} Source: https://ftp.gnu.org/gnu/units/%{name}-%{version}.tar.gz URL: https://www.gnu.org/software/units/units.html License: GPL-3.0-or-later @@ -31,7 +31,9 @@ well as conversions such as Fahrenheit to Celsius. %autosetup -p1 %build -%configure +# Use C17 standard to avoid compilation errors +# We will revert this change once the upstream adopts the latest C standard +%configure CFLAGS="$RPM_OPT_FLAGS -std=c17" %make_build %install @@ -58,6 +60,9 @@ make check %{_mandir}/man1/* %changelog +* Thu Feb 20 2025 Jan Macku - 2.24-3 +- Use C17 standard to avoid compilation errors (#2341484) + * Sun Jan 19 2025 Fedora Release Engineering - 2.24-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild From 3b7b2934cf93d08adb2514c27e2ba59e13fa0c6b Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 25 Jul 2025 19:47:45 +0000 Subject: [PATCH 52/58] Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild --- units.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/units.spec b/units.spec index 54c6fa0..b6e38aa 100644 --- a/units.spec +++ b/units.spec @@ -1,7 +1,7 @@ Summary: A utility for converting amounts from one unit to another Name: units Version: 2.24 -Release: 3%{?dist} +Release: 4%{?dist} Source: https://ftp.gnu.org/gnu/units/%{name}-%{version}.tar.gz URL: https://www.gnu.org/software/units/units.html License: GPL-3.0-or-later @@ -60,6 +60,9 @@ make check %{_mandir}/man1/* %changelog +* Fri Jul 25 2025 Fedora Release Engineering - 2.24-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild + * Thu Feb 20 2025 Jan Macku - 2.24-3 - Use C17 standard to avoid compilation errors (#2341484) From 31570362fb7571ad67b4051fcf72a66691a3dd1f Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 17 Jan 2026 19:37:07 +0000 Subject: [PATCH 53/58] Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild --- units.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/units.spec b/units.spec index b6e38aa..89e01df 100644 --- a/units.spec +++ b/units.spec @@ -1,7 +1,7 @@ Summary: A utility for converting amounts from one unit to another Name: units Version: 2.24 -Release: 4%{?dist} +Release: 5%{?dist} Source: https://ftp.gnu.org/gnu/units/%{name}-%{version}.tar.gz URL: https://www.gnu.org/software/units/units.html License: GPL-3.0-or-later @@ -60,6 +60,9 @@ make check %{_mandir}/man1/* %changelog +* Sat Jan 17 2026 Fedora Release Engineering - 2.24-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild + * Fri Jul 25 2025 Fedora Release Engineering - 2.24-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild From f3876f95fcf5ab94baa00eec6a42f631d9f73a08 Mon Sep 17 00:00:00 2001 From: Jan Macku Date: Mon, 19 Jan 2026 09:43:58 +0100 Subject: [PATCH 54/58] new upstream release - 2.25 Resolves: #2430584 --- sources | 4 ++-- units.spec | 7 +++++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/sources b/sources index 5152430..1f3fb0a 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (units-2.24.tar.gz) = cf0a5f3ad410ff3eeaabfac71f5570b1eed9014c0a76afb6e6f3059b5eb3184cb577f9f76b1c5acd3a1aa8beb12ad060af5af00eef8361d68a7a19697486540f -SHA512 (units-2.24.tar.gz.sig) = 1f63f46e6a073046f7e53d88d07145271a70735e6dfc2a599dbbbbb938ec880cab1abcf2340f0ec2eb4c14b8d2159220ed7d2528972536472b74aba8895978ff +SHA512 (units-2.25.tar.gz) = 0483e149936d56378b384bf399e5083ea9824c8bbf177426509a7ca90127774ebb509d9ec497acfdbebb785d85ddee15215276d53bc955ff7a196401e12c7578 +SHA512 (units-2.25.tar.gz.sig) = 55423b2c4950d78238b644cb5365dea665cffba23006bb9e59acbae2c8be1c9c9d92a77e9e3e8e0a2f7091e7b22807eb63900e284e885bd642c413143911c63a diff --git a/units.spec b/units.spec index 89e01df..23f6876 100644 --- a/units.spec +++ b/units.spec @@ -1,7 +1,7 @@ Summary: A utility for converting amounts from one unit to another Name: units -Version: 2.24 -Release: 5%{?dist} +Version: 2.25 +Release: 1%{?dist} Source: https://ftp.gnu.org/gnu/units/%{name}-%{version}.tar.gz URL: https://www.gnu.org/software/units/units.html License: GPL-3.0-or-later @@ -60,6 +60,9 @@ make check %{_mandir}/man1/* %changelog +* Mon Jan 19 2026 Jan Macku - 2.25-1 +- new upstream release + * Sat Jan 17 2026 Fedora Release Engineering - 2.24-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild From 4c08e65ac55914b6f143fafbe3f45ff23bec2197 Mon Sep 17 00:00:00 2001 From: Jan Macku Date: Mon, 2 Mar 2026 10:31:21 +0100 Subject: [PATCH 55/58] new upstream release - 2.26 Resolves: #2443175 --- 0101-fix-make-less-default-pager.patch | 12 ++++++------ sources | 4 ++-- units.spec | 5 ++++- 3 files changed, 12 insertions(+), 9 deletions(-) diff --git a/0101-fix-make-less-default-pager.patch b/0101-fix-make-less-default-pager.patch index 574a06d..6f2599f 100644 --- a/0101-fix-make-less-default-pager.patch +++ b/0101-fix-make-less-default-pager.patch @@ -1,6 +1,6 @@ -From 413f9f5563ec85756ff1a35276e1c4833d15713e Mon Sep 17 00:00:00 2001 +From f9e58208af29f62cec46a583039110876fbd5f3e Mon Sep 17 00:00:00 2001 From: Jan Macku -Date: Thu, 11 Apr 2024 16:10:28 +0200 +Date: Mon, 2 Mar 2026 10:23:17 +0100 Subject: [PATCH] fix: make less default pager Resolves: #2268395 @@ -9,18 +9,18 @@ Resolves: #2268395 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/units.c b/units.c -index 469a82b..8b7dd78 100644 +index 2bc1a02..fd138c5 100644 --- a/units.c +++ b/units.c -@@ -130,7 +130,7 @@ under the terms of the GNU General Public License." +@@ -137,7 +137,7 @@ under the terms of the GNU General Public License." #ifdef _WIN32 # define DEFAULTPAGER "more" /* Default pager for Windows */ #else -# define DEFAULTPAGER "/usr/bin/pager" /* Default pager for Unix */ -+# define DEFAULTPAGER "/usr/bin/less" /* Default pager for Unix */ ++# define DEFAULTPAGER "/usr/bin/less" /* Default pager for Unix */ #endif #define DEFAULTLOCALE "en_US" /* Default locale */ #define MAXINCLUDE 5 /* Max depth of include files */ -- -2.44.0 +2.53.0 diff --git a/sources b/sources index 1f3fb0a..54a0df7 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (units-2.25.tar.gz) = 0483e149936d56378b384bf399e5083ea9824c8bbf177426509a7ca90127774ebb509d9ec497acfdbebb785d85ddee15215276d53bc955ff7a196401e12c7578 -SHA512 (units-2.25.tar.gz.sig) = 55423b2c4950d78238b644cb5365dea665cffba23006bb9e59acbae2c8be1c9c9d92a77e9e3e8e0a2f7091e7b22807eb63900e284e885bd642c413143911c63a +SHA512 (units-2.26.tar.gz) = aa62bfefca52a4aad61e4c907df31e0418cdb9d2e0c7a8351c66451515408f65a9c93e36a4a110fe4ce7080e5bdd8cadeff853df43dc620b80afeb652e9ecfba +SHA512 (units-2.26.tar.gz.sig) = ce3ae1a5f64ab9c5284c9d7b2a6737caffd880dbbde8acf8e45030a6f17521e304ee85ce761510ae2e87a15231cb518d6adf57aad8342228396a6a3bc71695f0 diff --git a/units.spec b/units.spec index 23f6876..228ffbe 100644 --- a/units.spec +++ b/units.spec @@ -1,6 +1,6 @@ Summary: A utility for converting amounts from one unit to another Name: units -Version: 2.25 +Version: 2.26 Release: 1%{?dist} Source: https://ftp.gnu.org/gnu/units/%{name}-%{version}.tar.gz URL: https://www.gnu.org/software/units/units.html @@ -60,6 +60,9 @@ make check %{_mandir}/man1/* %changelog +* Mon Mar 02 2026 Jan Macku - 2.26-1 +- new upstream release + * Mon Jan 19 2026 Jan Macku - 2.25-1 - new upstream release From 4d6566ec337b7a582769e668eacbcd0b5b018c3b Mon Sep 17 00:00:00 2001 From: Jan Macku Date: Wed, 8 Apr 2026 14:01:06 +0200 Subject: [PATCH 56/58] new upstream release - 2.27 Resolves: #2454176 --- sources | 4 ++-- units.spec | 5 ++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/sources b/sources index 54a0df7..c90157e 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (units-2.26.tar.gz) = aa62bfefca52a4aad61e4c907df31e0418cdb9d2e0c7a8351c66451515408f65a9c93e36a4a110fe4ce7080e5bdd8cadeff853df43dc620b80afeb652e9ecfba -SHA512 (units-2.26.tar.gz.sig) = ce3ae1a5f64ab9c5284c9d7b2a6737caffd880dbbde8acf8e45030a6f17521e304ee85ce761510ae2e87a15231cb518d6adf57aad8342228396a6a3bc71695f0 +SHA512 (units-2.27.tar.gz.sig) = 6696986c3f40bdbef7a1a761c5314b6cce836c862aaae5926ab40da9516e5bf1d37293bcfc82bd01b92d54125b35d8e426d1b4368c7afef938b4ebf1c3723ee2 +SHA512 (units-2.27.tar.gz) = 432633abb10c68910d658e7ce50b23c26100566c2e9fc377e963f0d86d60b5366e12519c33b947805d447b7cbbb891578a8e1f7f2120aa8f95c3e9fbab60e881 diff --git a/units.spec b/units.spec index 228ffbe..826f6eb 100644 --- a/units.spec +++ b/units.spec @@ -1,6 +1,6 @@ Summary: A utility for converting amounts from one unit to another Name: units -Version: 2.26 +Version: 2.27 Release: 1%{?dist} Source: https://ftp.gnu.org/gnu/units/%{name}-%{version}.tar.gz URL: https://www.gnu.org/software/units/units.html @@ -60,6 +60,9 @@ make check %{_mandir}/man1/* %changelog +* Wed Apr 08 2026 Jan Macku - 2.27-1 +- new upstream release + * Mon Mar 02 2026 Jan Macku - 2.26-1 - new upstream release From 0e9eaf4f5d1865099b0b91f1b9ed477b0df92264 Mon Sep 17 00:00:00 2001 From: Jan Macku Date: Tue, 21 Apr 2026 11:14:45 +0200 Subject: [PATCH 57/58] fix units compatibility with Image Mode --- units.spec | 35 +++++++++++++++++++++++++++++++---- units.tmpfiles.conf | 5 +++++ 2 files changed, 36 insertions(+), 4 deletions(-) create mode 100644 units.tmpfiles.conf diff --git a/units.spec b/units.spec index 826f6eb..99ce0a7 100644 --- a/units.spec +++ b/units.spec @@ -1,14 +1,16 @@ Summary: A utility for converting amounts from one unit to another Name: units Version: 2.27 -Release: 1%{?dist} +Release: 2%{?dist} Source: https://ftp.gnu.org/gnu/units/%{name}-%{version}.tar.gz +Source1: units.tmpfiles.conf URL: https://www.gnu.org/software/units/units.html License: GPL-3.0-or-later Requires: less BuildRequires: bison +BuildRequires: systemd-rpm-macros BuildRequires: gcc BuildRequires: make BuildRequires: ncurses-devel @@ -39,14 +41,36 @@ well as conversions such as Fahrenheit to Celsius. %install %make_install -# replace an absolute symlink by a relative symlink -ln -fsv ../../..%{_sharedstatedir}/units/currency.units %{buildroot}%{_datadir}/units +# Copy dynamic files to defaults directory as templates for tmpfiles.d +mkdir -p %{buildroot}%{_datadir}/units/defaults +for f in currency cpi metal_prices crypto; do + cp -p %{buildroot}%{_sharedstatedir}/units/${f}.units %{buildroot}%{_datadir}/units/defaults/ +done + +# Remove /var/lib/units from buildroot - now managed by tmpfiles.d +rm -rf %{buildroot}%{_sharedstatedir}/units + +# Replace absolute symlinks by relative symlinks +for f in currency cpi metal_prices crypto; do + ln -fsv ../../../var/lib/units/${f}.units %{buildroot}%{_datadir}/units/${f}.units +done + +# Install tmpfiles.d configuration for Image Mode support +install -m0644 -D %{SOURCE1} %{buildroot}%{_tmpfilesdir}/units.conf gzip %{buildroot}%{_infodir}/units.info # provide a man page for units_cur as a symlink to units.1 ln -s units.1 %{buildroot}%{_mandir}/man1/units_cur.1 +%post +%tmpfiles_create units.conf + +%postun +if [ $1 -eq 0 ]; then + systemd-tmpfiles --purge %{_tmpfilesdir}/units.conf 2>/dev/null || : +fi + %check make check @@ -55,11 +79,14 @@ make check %{_bindir}/units %{_bindir}/units_cur %{_datadir}/units -%{_sharedstatedir}/units +%{_tmpfilesdir}/units.conf %{_infodir}/* %{_mandir}/man1/* %changelog +* Tue Apr 21 2026 Jan Macku - 2.27-2 +- fix units compatibility with Image Mode + * Wed Apr 08 2026 Jan Macku - 2.27-1 - new upstream release diff --git a/units.tmpfiles.conf b/units.tmpfiles.conf new file mode 100644 index 0000000..f32b17a --- /dev/null +++ b/units.tmpfiles.conf @@ -0,0 +1,5 @@ +d /var/lib/units 0755 root root - - +C /var/lib/units/currency.units 0644 root root - /usr/share/units/defaults/currency.units +C /var/lib/units/cpi.units 0644 root root - /usr/share/units/defaults/cpi.units +C /var/lib/units/metal_prices.units 0644 root root - /usr/share/units/defaults/metal_prices.units +C /var/lib/units/crypto.units 0644 root root - /usr/share/units/defaults/crypto.units From e5620c32da1869d1d789e0fe7adfe1aa3c74d878 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 17 Jul 2026 08:11:48 +0000 Subject: [PATCH 58/58] Rebuilt for https://fedoraproject.org/wiki/Fedora_45_Mass_Rebuild --- units.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/units.spec b/units.spec index 99ce0a7..14f864d 100644 --- a/units.spec +++ b/units.spec @@ -1,7 +1,7 @@ Summary: A utility for converting amounts from one unit to another Name: units Version: 2.27 -Release: 2%{?dist} +Release: 3%{?dist} Source: https://ftp.gnu.org/gnu/units/%{name}-%{version}.tar.gz Source1: units.tmpfiles.conf URL: https://www.gnu.org/software/units/units.html @@ -84,6 +84,9 @@ make check %{_mandir}/man1/* %changelog +* Fri Jul 17 2026 Fedora Release Engineering - 2.27-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_45_Mass_Rebuild + * Tue Apr 21 2026 Jan Macku - 2.27-2 - fix units compatibility with Image Mode