From 6d2225324d4fb84984a869ea93deb9a663d2f4b7 Mon Sep 17 00:00:00 2001 From: Jan Macku Date: Thu, 11 Apr 2024 16:18:40 +0200 Subject: [PATCH] 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 729bda1..599457a 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.22 -Release: 8%{?dist} +Release: 9%{?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 @@ -16,6 +19,9 @@ BuildRequires: readline-devel Patch1: 0001-units-2.22-no-network.patch Patch2: units-configure-c99.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 @@ -53,6 +59,9 @@ make check %{_mandir}/man1/* %changelog +* Thu Apr 11 2024 Jan Macku - 2.22-9 +- fix make less the default pager (#2268395) + * Sat Jan 27 2024 Fedora Release Engineering - 2.22-8 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild