From 4c08e65ac55914b6f143fafbe3f45ff23bec2197 Mon Sep 17 00:00:00 2001 From: Jan Macku Date: Mon, 2 Mar 2026 10:31:21 +0100 Subject: [PATCH 1/4] 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 2/4] 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 3/4] 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 4/4] 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