Compare commits

..

10 Commits

Author SHA1 Message Date
Fedora Release Engineering
f3ee1c5fb0 Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild 2024-01-27 07:08:14 +00:00
Florian Weimer
ed0fb27512 C compatibility fix for the configure script (#2252276)
Related to:

  <https://fedoraproject.org/wiki/Changes/PortingToModernC>
  <https://fedoraproject.org/wiki/Toolchain/PortingToModernC>
2023-11-30 15:56:59 +01:00
Fedora Release Engineering
188062b89f Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2023-07-22 17:08:12 +00:00
Lukáš Zaoral
ca979f3236
migrate to SPDX license format 2023-04-13 14:22:40 +02:00
Fedora Release Engineering
cae8293c4b Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2023-01-21 05:50:19 +00:00
Kamil Dudka
022c2b229c remove a build system tweak related to Python 3
... no longer needed
2022-09-06 09:13:34 +02:00
Kamil Dudka
d4c3be7140 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
```
2022-09-06 09:08:20 +02:00
Kamil Dudka
6869b51de8 units.spec: use %make_build and %make_install RPM macros
No change in behavior expected with this commit.
2022-09-06 09:04:42 +02:00
Kamil Dudka
494095d7c0 units.spec: use %{buildroot} rather than $RPM_BUILD_ROOT
... for consistency.  No change in behavior expected with this commit.
2022-09-06 09:00:03 +02:00
Kamil Dudka
9637bfd8ed new upstream release - 2.22 2022-09-06 08:50:45 +02:00
7 changed files with 92 additions and 62 deletions

1
.gitignore vendored
View File

@ -1 +1,2 @@
/units-*.tar.gz
/units-*.tar.gz.sig

View File

@ -0,0 +1,26 @@
From f18e95585de3d6f94c3b64af7bcc8793063223d3 Mon Sep 17 00:00:00 2001
From: Kamil Dudka <kdudka@redhat.com>
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

View File

@ -1,47 +0,0 @@
From 06a4ba00e8e4188486fa962dbccbfa1e6afe2cf2 Mon Sep 17 00:00:00 2001
From: Kamil Dudka <kdudka@redhat.com>
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

View File

@ -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

Binary file not shown.

26
units-configure-c99.patch Normal file
View File

@ -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 <wchar.h>
#include <locale.h>
#include <langinfo.h>
-], [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);],

View File

@ -1,11 +1,10 @@
Summary: A utility for converting amounts from one unit to another
Name: units
Version: 2.21
Release: 5%{?dist}
Version: 2.22
Release: 8%{?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
License: GPL-3.0-or-later
BuildRequires: bison
BuildRequires: gcc
BuildRequires: make
@ -14,7 +13,8 @@ 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
Patch2: units-configure-c99.patch
%description
Units converts an amount from one unit to another, or tells you what
@ -25,19 +25,17 @@ 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 %{?_smp_mflags}
%make_build
%install
make install DESTDIR=$RPM_BUILD_ROOT
%make_install
gzip $RPM_BUILD_ROOT%{_infodir}/units.info
# replace an absolute symlink by a relative symlink
ln -fsv ../../..%{_sharedstatedir}/units/currency.units %{buildroot}%{_datadir}/units
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
@ -46,7 +44,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 +53,31 @@ make check
%{_mandir}/man1/*
%changelog
* Sat Jan 27 2024 Fedora Release Engineering <releng@fedoraproject.org> - 2.22-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Thu Nov 30 2023 Florian Weimer <fweimer@redhat.com> - 2.22-7
- C compatibility fix for the configure script (#2252276)
* Sat Jul 22 2023 Fedora Release Engineering <releng@fedoraproject.org> - 2.22-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
* Thu Apr 13 2023 Lukáš Zaoral <lzaoral@redhat.com> - 2.22-5
- migrate to SPDX license format
* Sat Jan 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 2.22-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
* Tue Sep 06 2022 Kamil Dudka <kdudka@redhat.com> - 2.22-3
- remove a build system tweak related to Python 3 no longer needed
* Tue Sep 06 2022 Kamil Dudka <kdudka@redhat.com> - 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 <kdudka@redhat.com> - 2.22-1
- new upstream release
* Sat Jul 23 2022 Fedora Release Engineering <releng@fedoraproject.org> - 2.21-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild