Compare commits

...
Sign in to create a new pull request.

7 commits

Author SHA1 Message Date
Fedora Release Engineering
e5620c32da Rebuilt for https://fedoraproject.org/wiki/Fedora_45_Mass_Rebuild 2026-07-17 08:11:48 +00:00
Jan Macku
0e9eaf4f5d fix units compatibility with Image Mode 2026-04-21 12:41:51 +02:00
Jan Macku
4d6566ec33 new upstream release - 2.27
Resolves: #2454176
2026-04-08 14:01:06 +02:00
Jan Macku
4c08e65ac5 new upstream release - 2.26
Resolves: #2443175
2026-03-02 10:31:21 +01:00
Jan Macku
f3876f95fc new upstream release - 2.25
Resolves: #2430584
2026-01-19 09:52:46 +01:00
Fedora Release Engineering
31570362fb Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild 2026-01-17 19:37:07 +00:00
Fedora Release Engineering
3b7b2934cf Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild 2025-07-25 19:47:45 +00:00
4 changed files with 62 additions and 12 deletions

View file

@ -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 <jamacku@redhat.com>
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

View file

@ -1,2 +1,2 @@
SHA512 (units-2.24.tar.gz) = cf0a5f3ad410ff3eeaabfac71f5570b1eed9014c0a76afb6e6f3059b5eb3184cb577f9f76b1c5acd3a1aa8beb12ad060af5af00eef8361d68a7a19697486540f
SHA512 (units-2.24.tar.gz.sig) = 1f63f46e6a073046f7e53d88d07145271a70735e6dfc2a599dbbbbb938ec880cab1abcf2340f0ec2eb4c14b8d2159220ed7d2528972536472b74aba8895978ff
SHA512 (units-2.27.tar.gz.sig) = 6696986c3f40bdbef7a1a761c5314b6cce836c862aaae5926ab40da9516e5bf1d37293bcfc82bd01b92d54125b35d8e426d1b4368c7afef938b4ebf1c3723ee2
SHA512 (units-2.27.tar.gz) = 432633abb10c68910d658e7ce50b23c26100566c2e9fc377e963f0d86d60b5366e12519c33b947805d447b7cbbb891578a8e1f7f2120aa8f95c3e9fbab60e881

View file

@ -1,14 +1,16 @@
Summary: A utility for converting amounts from one unit to another
Name: units
Version: 2.24
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: 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,32 @@ make check
%{_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)

5
units.tmpfiles.conf Normal file
View 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