Compare commits
34 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e5620c32da | ||
|
|
0e9eaf4f5d | ||
|
|
4d6566ec33 | ||
|
|
4c08e65ac5 | ||
|
|
f3876f95fc | ||
|
|
31570362fb | ||
|
|
3b7b2934cf | ||
|
|
5613aa6db5 | ||
|
|
ea473973f7 | ||
|
|
6e31795663 | ||
|
|
412cd5dc88 | ||
|
|
7d83a93b9f | ||
|
|
b9c2d66e15 | ||
|
|
f3ee1c5fb0 | ||
|
|
ed0fb27512 | ||
|
|
188062b89f | ||
|
|
ca979f3236 |
||
|
|
cae8293c4b | ||
|
|
022c2b229c | ||
|
|
d4c3be7140 | ||
|
|
6869b51de8 | ||
|
|
494095d7c0 | ||
|
|
9637bfd8ed | ||
|
|
3ad0cbd5bf | ||
|
|
1c3b7305e8 | ||
|
|
b540b74195 | ||
|
|
7133bcde16 | ||
|
|
5e54b26221 | ||
|
|
6b331c3369 | ||
|
|
c1c1f05c7e | ||
|
|
859df262f3 | ||
|
|
9067863c34 | ||
|
|
9af804766b | ||
|
|
e669257b54 |
8 changed files with 199 additions and 64 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
|
@ -1 +1,3 @@
|
|||
/units-*.tar.gz
|
||||
/units-*.tar.gz.sig
|
||||
/units-*/
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
26
0100-units-2.22-no-network.patch
Normal file
26
0100-units-2.22-no-network.patch
Normal 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
|
||||
|
||||
26
0101-fix-make-less-default-pager.patch
Normal file
26
0101-fix-make-less-default-pager.patch
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
From f9e58208af29f62cec46a583039110876fbd5f3e Mon Sep 17 00:00:00 2001
|
||||
From: Jan Macku <jamacku@redhat.com>
|
||||
Date: Mon, 2 Mar 2026 10:23:17 +0100
|
||||
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 2bc1a02..fd138c5 100644
|
||||
--- a/units.c
|
||||
+++ b/units.c
|
||||
@@ -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 */
|
||||
#endif
|
||||
#define DEFAULTLOCALE "en_US" /* Default locale */
|
||||
#define MAXINCLUDE 5 /* Max depth of include files */
|
||||
--
|
||||
2.53.0
|
||||
|
||||
3
sources
3
sources
|
|
@ -1 +1,2 @@
|
|||
SHA512 (units-2.19.tar.gz) = f28df8f0b95b53620d4d21ed369551b8510663ff3658293ba62de2722e7dc2d87506db7c65dc192e35f3c3a20842e8ed09ddaa7352532f7e3eaeab4c001061c8
|
||||
SHA512 (units-2.27.tar.gz.sig) = 6696986c3f40bdbef7a1a761c5314b6cce836c862aaae5926ab40da9516e5bf1d37293bcfc82bd01b92d54125b35d8e426d1b4368c7afef938b4ebf1c3723ee2
|
||||
SHA512 (units-2.27.tar.gz) = 432633abb10c68910d658e7ce50b23c26100566c2e9fc377e963f0d86d60b5366e12519c33b947805d447b7cbbb891578a8e1f7f2120aa8f95c3e9fbab60e881
|
||||
|
|
|
|||
Binary file not shown.
154
units.spec
154
units.spec
|
|
@ -1,19 +1,27 @@
|
|||
Summary: A utility for converting amounts from one unit to another
|
||||
Name: units
|
||||
Version: 2.19
|
||||
Release: 2%{?dist}
|
||||
Version: 2.27
|
||||
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
|
||||
License: GPLv3+
|
||||
BuildRequires: automake
|
||||
License: GPL-3.0-or-later
|
||||
|
||||
Requires: less
|
||||
|
||||
BuildRequires: bison
|
||||
BuildRequires: systemd-rpm-macros
|
||||
BuildRequires: gcc
|
||||
BuildRequires: make
|
||||
BuildRequires: ncurses-devel
|
||||
BuildRequires: python3-devel
|
||||
BuildRequires: readline-devel
|
||||
|
||||
# do not update currency.units from network during build
|
||||
Patch2: 0002-units-2.17-no-network.patch
|
||||
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
|
||||
|
|
@ -24,36 +32,150 @@ 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}
|
||||
# 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
|
||||
make install DESTDIR=$RPM_BUILD_ROOT
|
||||
%make_install
|
||||
|
||||
gzip $RPM_BUILD_ROOT%{_infodir}/units.info
|
||||
# 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
|
||||
|
||||
%files
|
||||
%doc ChangeLog COPYING NEWS README
|
||||
%doc COPYING NEWS README
|
||||
%{_bindir}/units
|
||||
%{_bindir}/units_cur
|
||||
%{_datadir}/units
|
||||
%{_sharedstatedir}/units
|
||||
%{_tmpfilesdir}/units.conf
|
||||
%{_infodir}/*
|
||||
%{_mandir}/man1/*
|
||||
|
||||
%changelog
|
||||
* Fri Jul 17 2026 Fedora Release Engineering <releng@fedoraproject.org> - 2.27-3
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_45_Mass_Rebuild
|
||||
|
||||
* Tue Apr 21 2026 Jan Macku <jamacku@redhat.com> - 2.27-2
|
||||
- fix units compatibility with Image Mode
|
||||
|
||||
* Wed Apr 08 2026 Jan Macku <jamacku@redhat.com> - 2.27-1
|
||||
- new upstream release
|
||||
|
||||
* Mon Mar 02 2026 Jan Macku <jamacku@redhat.com> - 2.26-1
|
||||
- new upstream release
|
||||
|
||||
* Mon Jan 19 2026 Jan Macku <jamacku@redhat.com> - 2.25-1
|
||||
- new upstream release
|
||||
|
||||
* Sat Jan 17 2026 Fedora Release Engineering <releng@fedoraproject.org> - 2.24-5
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild
|
||||
|
||||
* Fri Jul 25 2025 Fedora Release Engineering <releng@fedoraproject.org> - 2.24-4
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild
|
||||
|
||||
* Thu Feb 20 2025 Jan Macku <jamacku@redhat.com> - 2.24-3
|
||||
- Use C17 standard to avoid compilation errors (#2341484)
|
||||
|
||||
* Sun Jan 19 2025 Fedora Release Engineering <releng@fedoraproject.org> - 2.24-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild
|
||||
|
||||
* Fri Nov 29 2024 Jan Macku <jamacku@redhat.com> - 2.24-1
|
||||
- new upstream release
|
||||
|
||||
* Sat Jul 20 2024 Fedora Release Engineering <releng@fedoraproject.org> - 2.23-3
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild
|
||||
|
||||
* Thu Apr 11 2024 Jan Macku <jamacku@redhat.com> - 2.23-2
|
||||
- fix make less the default pager (#2268395)
|
||||
|
||||
* Mon Feb 19 2024 Jan Macku <jamacku@redhat.com> - 2.23-1
|
||||
- new upstream release
|
||||
|
||||
* 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
|
||||
|
||||
* Sat Jan 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 2.21-4
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
|
||||
|
||||
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 2.21-3
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
|
||||
|
||||
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 2.21-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
|
||||
|
||||
* Mon Nov 16 2020 Kamil Dudka <kdudka@redhat.com> - 2.21-1
|
||||
- new upstream release
|
||||
|
||||
* Thu Oct 01 2020 Kamil Dudka <kdudka@redhat.com> - 2.20-1
|
||||
- new upstream release
|
||||
|
||||
* Sat Aug 01 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.19-5
|
||||
- Second attempt - Rebuilt for
|
||||
https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
|
||||
|
||||
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.19-4
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
|
||||
|
||||
* Fri Jan 31 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.19-3
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
|
||||
|
||||
* Sat Jul 27 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.19-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
|
||||
|
||||
|
|
|
|||
5
units.tmpfiles.conf
Normal file
5
units.tmpfiles.conf
Normal file
|
|
@ -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
|
||||
Loading…
Add table
Add a link
Reference in a new issue