From 95ba5da931c58aedc1381752c5af9eb72fb7d7bd Mon Sep 17 00:00:00 2001 From: Tom Callaway Date: Sat, 12 Jul 2014 18:52:30 -0400 Subject: [PATCH 01/78] fix license handling --- less.spec | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/less.spec b/less.spec index bdd9768..14f7de8 100644 --- a/less.spec +++ b/less.spec @@ -1,7 +1,7 @@ Summary: A text file browser similar to more, but better Name: less Version: 458 -Release: 11%{?dist} +Release: 12%{?dist} License: GPLv3+ Group: Applications/Text Source: http://www.greenwoodsoftware.com/less/%{name}-%{version}.tar.gz @@ -67,7 +67,8 @@ ls -la $RPM_BUILD_ROOT/etc/profile.d %files %defattr(-,root,root,-) -%doc LICENSE +%{!?_licensedir:%global license %%doc} +%license LICENSE /etc/profile.d/* %{_bindir}/* %{_mandir}/man1/* @@ -76,6 +77,9 @@ ls -la $RPM_BUILD_ROOT/etc/profile.d rm -rf $RPM_BUILD_ROOT %changelog +* Sat Jul 12 2014 Tom Callaway - 458-12 +- fix license handling + * Mon Jun 23 2014 Jozef Mlich - 458-11 - rollback of previous problem. See explanation of upstream. http://greenwoodsoftware.com/less/faq.html#profileout From ac423bab0c9d5ca9930e641b352d777a19235de3 Mon Sep 17 00:00:00 2001 From: Peter Robinson Date: Sun, 17 Aug 2014 01:49:38 +0000 Subject: [PATCH 02/78] - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild --- less.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/less.spec b/less.spec index 14f7de8..299e18f 100644 --- a/less.spec +++ b/less.spec @@ -1,7 +1,7 @@ Summary: A text file browser similar to more, but better Name: less Version: 458 -Release: 12%{?dist} +Release: 13%{?dist} License: GPLv3+ Group: Applications/Text Source: http://www.greenwoodsoftware.com/less/%{name}-%{version}.tar.gz @@ -77,6 +77,9 @@ ls -la $RPM_BUILD_ROOT/etc/profile.d rm -rf $RPM_BUILD_ROOT %changelog +* Sun Aug 17 2014 Fedora Release Engineering - 458-13 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild + * Sat Jul 12 2014 Tom Callaway - 458-12 - fix license handling From a24f11f952d99c242abf3efadd04a81194c32983 Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Wed, 17 Jun 2015 14:04:23 +0000 Subject: [PATCH 03/78] - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild --- less.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/less.spec b/less.spec index 483c4d9..d25366c 100644 --- a/less.spec +++ b/less.spec @@ -1,7 +1,7 @@ Summary: A text file browser similar to more, but better Name: less Version: 471 -Release: 4%{?dist} +Release: 5%{?dist} License: GPLv3+ Group: Applications/Text Source: http://www.greenwoodsoftware.com/less/%{name}-%{version}.tar.gz @@ -77,6 +77,9 @@ ls -la $RPM_BUILD_ROOT/etc/profile.d rm -rf $RPM_BUILD_ROOT %changelog +* Wed Jun 17 2015 Fedora Release Engineering - 471-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild + * Mon Jun 01 2015 Jozef Mlich - 471-4 - update of previous patch From 9c78a1274940dfaa77dcfa89210edaaab356b00f Mon Sep 17 00:00:00 2001 From: Jozef Mlich Date: Wed, 24 Jun 2015 10:26:21 +0200 Subject: [PATCH 04/78] update to 478 http://greenwoodsoftware.com/less/news.478.html --- .gitignore | 1 + less-471-out_of_bounds_read.patch | 56 ------------------------------- less.spec | 15 +++++---- sources | 2 +- 4 files changed, 11 insertions(+), 63 deletions(-) delete mode 100644 less-471-out_of_bounds_read.patch diff --git a/.gitignore b/.gitignore index d2f3de1..886b627 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ /less-451.tar.gz /less-458.tar.gz /less-471.tar.gz +/less-478.tar.gz diff --git a/less-471-out_of_bounds_read.patch b/less-471-out_of_bounds_read.patch deleted file mode 100644 index 20bed55..0000000 --- a/less-471-out_of_bounds_read.patch +++ /dev/null @@ -1,56 +0,0 @@ -diff -up ./less-471/charset.c.utf8 ./less-471/charset.c ---- ./less-471/charset.c.utf8 2014-12-14 19:19:11.000000000 +0100 -+++ ./less-471/charset.c 2015-06-01 08:59:38.140122262 +0200 -@@ -506,8 +506,9 @@ utf_len(ch) - * Does the parameter point to the lead byte of a well-formed UTF-8 character? - */ - public int --is_utf8_well_formed(s) -+is_utf8_well_formed(s, slen) - unsigned char *s; -+ int slen; - { - int i; - int len; -@@ -516,6 +517,8 @@ is_utf8_well_formed(s) - return (0); - - len = utf_len((char) s[0]); -+ if (len > slen) -+ return (0); - if (len == 1) - return (1); - if (len == 2) -@@ -547,7 +550,7 @@ utf_bin_count(data, len) - int bin_count = 0; - while (len > 0) - { -- if (is_utf8_well_formed(data)) -+ if (is_utf8_well_formed(data, len)) - { - int clen = utf_len(*data); - data += clen; -diff -up ./less-471/cmdbuf.c.utf8 ./less-471/cmdbuf.c ---- ./less-471/cmdbuf.c.utf8 2014-12-14 19:19:11.000000000 +0100 -+++ ./less-471/cmdbuf.c 2015-06-01 09:00:43.247776312 +0200 -@@ -1264,7 +1264,7 @@ cmd_char(c) - cmd_mbc_buf[cmd_mbc_buf_index++] = c; - if (cmd_mbc_buf_index < cmd_mbc_buf_len) - return (CC_OK); -- if (!is_utf8_well_formed(cmd_mbc_buf)) -+ if (!is_utf8_well_formed(cmd_mbc_buf, cmd_mbc_buf_index)) - { - /* complete, but not well formed (non-shortest form), sequence */ - cmd_mbc_buf_len = 0; -diff -up ./less-471/line.c.utf8 ./less-471/line.c ---- ./less-471/line.c.utf8 2015-06-01 08:57:28.000000000 +0200 -+++ ./less-471/line.c 2015-06-01 09:00:01.061352521 +0200 -@@ -807,7 +807,7 @@ pappend(c, pos) - mbc_buf[mbc_buf_index++] = c; - if (mbc_buf_index < mbc_buf_len) - return (0); -- if (is_utf8_well_formed(mbc_buf)) -+ if (is_utf8_well_formed(mbc_buf, mbc_buf_index)) - r = do_append(get_wchar(mbc_buf), mbc_buf, mbc_pos); - else - /* Complete, but not shortest form, sequence. */ diff --git a/less.spec b/less.spec index d25366c..d736a2f 100644 --- a/less.spec +++ b/less.spec @@ -1,7 +1,7 @@ Summary: A text file browser similar to more, but better Name: less -Version: 471 -Release: 5%{?dist} +Version: 478 +Release: 1%{?dist} License: GPLv3+ Group: Applications/Text Source: http://www.greenwoodsoftware.com/less/%{name}-%{version}.tar.gz @@ -18,7 +18,6 @@ Patch8: less-458-lessecho-usage.patch Patch9: less-458-less-filters-man.patch Patch10: less-458-lesskey-usage.patch Patch11: less-458-old-bot-in-help.patch -Patch12: less-471-out_of_bounds_read.patch URL: http://www.greenwoodsoftware.com/less/ Requires: groff-base BuildRequires: ncurses-devel @@ -46,11 +45,11 @@ files, and you'll use it frequently. %patch9 -p1 -b .less-filters-man %patch10 -p1 -b .lesskey-usage %patch11 -p1 -b .old-bot -%patch12 -p2 -b .out_of_bounds_read.patch -autoreconf - chmod -R a+w * chmod 644 *.c *.h LICENSE README +rm -f ./configure +autoreconf -fiv + %build %configure @@ -77,6 +76,10 @@ ls -la $RPM_BUILD_ROOT/etc/profile.d rm -rf $RPM_BUILD_ROOT %changelog +* Wed Jun 24 2015 Jozef Mlich - 478-1 +- update to 478 + http://greenwoodsoftware.com/less/news.478.html + * Wed Jun 17 2015 Fedora Release Engineering - 471-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild diff --git a/sources b/sources index b42ca60..825264a 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -9a40d29a2d84b41f9f36d7dd90b4f950 less-471.tar.gz +934fcc9f137b9ef66a943c224f413d39 less-478.tar.gz From 9820dc236cc15951a314f13433e5a2920f223f10 Mon Sep 17 00:00:00 2001 From: Jozef Mlich Date: Wed, 8 Jul 2015 08:40:33 +0200 Subject: [PATCH 05/78] Update to 479 (#1240456) --- .gitignore | 1 + less.spec | 5 ++++- sources | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 886b627..0e8ce99 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,4 @@ /less-458.tar.gz /less-471.tar.gz /less-478.tar.gz +/less-479.tar.gz diff --git a/less.spec b/less.spec index d736a2f..1a2a19b 100644 --- a/less.spec +++ b/less.spec @@ -1,6 +1,6 @@ Summary: A text file browser similar to more, but better Name: less -Version: 478 +Version: 479 Release: 1%{?dist} License: GPLv3+ Group: Applications/Text @@ -76,6 +76,9 @@ ls -la $RPM_BUILD_ROOT/etc/profile.d rm -rf $RPM_BUILD_ROOT %changelog +* Tue Jul 07 2015 Fedora Release Monitoring - 479-1 +- Update to 479 (#1240456) + * Wed Jun 24 2015 Jozef Mlich - 478-1 - update to 478 http://greenwoodsoftware.com/less/news.478.html diff --git a/sources b/sources index 825264a..da68519 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -934fcc9f137b9ef66a943c224f413d39 less-478.tar.gz +049f51ccfe2686009c6ce943eeb4bbaf less-479.tar.gz From 396e286dd3e6e3faa7cddd001b012a9d267b79d7 Mon Sep 17 00:00:00 2001 From: Viktor Jancik Date: Mon, 3 Aug 2015 15:44:43 +0200 Subject: [PATCH 06/78] Updated spec file --- less.spec | 30 +++++++++++++----------------- 1 file changed, 13 insertions(+), 17 deletions(-) diff --git a/less.spec b/less.spec index 1a2a19b..3c4acd2 100644 --- a/less.spec +++ b/less.spec @@ -1,7 +1,7 @@ Summary: A text file browser similar to more, but better Name: less Version: 479 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv3+ Group: Applications/Text Source: http://www.greenwoodsoftware.com/less/%{name}-%{version}.tar.gz @@ -45,37 +45,33 @@ files, and you'll use it frequently. %patch9 -p1 -b .less-filters-man %patch10 -p1 -b .lesskey-usage %patch11 -p1 -b .old-bot -chmod -R a+w * -chmod 644 *.c *.h LICENSE README -rm -f ./configure -autoreconf -fiv %build +rm -f ./configure +autoreconf -fiv %configure -make CC="gcc $RPM_OPT_FLAGS -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64" datadir=%{_docdir} +make %{?_smp_mflags} CFLAGS="%{optflags} -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64" %install -rm -rf $RPM_BUILD_ROOT -make DESTDIR=$RPM_BUILD_ROOT install +%make_install mkdir -p $RPM_BUILD_ROOT/etc/profile.d -install -p -c -m 755 %{SOURCE1} $RPM_BUILD_ROOT/%{_bindir} -install -p -c -m 644 %{SOURCE2} $RPM_BUILD_ROOT/etc/profile.d -install -p -c -m 644 %{SOURCE3} $RPM_BUILD_ROOT/etc/profile.d -ls -la $RPM_BUILD_ROOT/etc/profile.d +install -p %{SOURCE1} $RPM_BUILD_ROOT/%{_bindir} +install -p -m 644 %{SOURCE2} $RPM_BUILD_ROOT/etc/profile.d +install -p -m 644 %{SOURCE3} $RPM_BUILD_ROOT/etc/profile.d %files -%defattr(-,root,root,-) -%{!?_licensedir:%global license %%doc} +%doc README NEWS INSTALL COPYING %license LICENSE /etc/profile.d/* %{_bindir}/* %{_mandir}/man1/* -%clean -rm -rf $RPM_BUILD_ROOT - %changelog +* Mon Aug 03 2015 Viktor Jancik - 479-2 +- Updated spec file to comply with current Fedora Packaging Guidelines + Added missing documentation files + * Tue Jul 07 2015 Fedora Release Monitoring - 479-1 - Update to 479 (#1240456) From e4fc7bdaff90209b859f8bd17a2017b5b78e892b Mon Sep 17 00:00:00 2001 From: Viktor Jancik Date: Mon, 3 Aug 2015 15:44:43 +0200 Subject: [PATCH 07/78] Updated spec file --- less.spec | 30 +++++++++++++----------------- 1 file changed, 13 insertions(+), 17 deletions(-) diff --git a/less.spec b/less.spec index 483c4d9..413f090 100644 --- a/less.spec +++ b/less.spec @@ -1,7 +1,7 @@ Summary: A text file browser similar to more, but better Name: less Version: 471 -Release: 4%{?dist} +Release: 5%{?dist} License: GPLv3+ Group: Applications/Text Source: http://www.greenwoodsoftware.com/less/%{name}-%{version}.tar.gz @@ -47,36 +47,32 @@ files, and you'll use it frequently. %patch10 -p1 -b .lesskey-usage %patch11 -p1 -b .old-bot %patch12 -p2 -b .out_of_bounds_read.patch -autoreconf - -chmod -R a+w * -chmod 644 *.c *.h LICENSE README %build +rm -f ./configure +autoreconf -fiv %configure -make CC="gcc $RPM_OPT_FLAGS -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64" datadir=%{_docdir} +make %{?_smp_mflags} CFLAGS="%{optflags} -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64" %install -rm -rf $RPM_BUILD_ROOT -make DESTDIR=$RPM_BUILD_ROOT install +%make_install mkdir -p $RPM_BUILD_ROOT/etc/profile.d -install -p -c -m 755 %{SOURCE1} $RPM_BUILD_ROOT/%{_bindir} -install -p -c -m 644 %{SOURCE2} $RPM_BUILD_ROOT/etc/profile.d -install -p -c -m 644 %{SOURCE3} $RPM_BUILD_ROOT/etc/profile.d -ls -la $RPM_BUILD_ROOT/etc/profile.d +install -p %{SOURCE1} $RPM_BUILD_ROOT/%{_bindir} +install -p -m 644 %{SOURCE2} $RPM_BUILD_ROOT/etc/profile.d +install -p -m 644 %{SOURCE3} $RPM_BUILD_ROOT/etc/profile.d %files -%defattr(-,root,root,-) -%{!?_licensedir:%global license %%doc} +%doc README NEWS INSTALL COPYING %license LICENSE /etc/profile.d/* %{_bindir}/* %{_mandir}/man1/* -%clean -rm -rf $RPM_BUILD_ROOT - %changelog +* Mon Aug 03 2015 Viktor Jancik - 471-5 +- Updated spec file to comply with current Fedora Packaging Guidelines + Added missing documentation files + * Mon Jun 01 2015 Jozef Mlich - 471-4 - update of previous patch From 3f003aa67c5a9c1deccc3a0835cc8d6ee9bb14d9 Mon Sep 17 00:00:00 2001 From: Viktor Jancik Date: Fri, 21 Aug 2015 22:16:14 +0200 Subject: [PATCH 08/78] Fixed profile.d less init scripts --- less.csh | 6 +++++- less.sh | 9 ++++++++- less.spec | 5 ++++- less.zsh | 11 +++++++++++ 4 files changed, 28 insertions(+), 3 deletions(-) create mode 100755 less.zsh diff --git a/less.csh b/less.csh index ba2b82b..c3dae53 100755 --- a/less.csh +++ b/less.csh @@ -1,4 +1,8 @@ # less initialization script (csh) if ( -x /usr/bin/lesspipe.sh ) then - setenv LESSOPEN "||/usr/bin/lesspipe.sh %s" + if ( $?LESSOPEN && { eval 'test ! -z $LESSOPEN' }) then + setenv LESSOPEN "$LESSOPEN | /usr/bin/lesspipe.sh %s" + else + setenv LESSOPEN "/usr/bin/lesspipe.sh %s" + endif endif diff --git a/less.sh b/less.sh index 14f6fde..c8066ec 100755 --- a/less.sh +++ b/less.sh @@ -1,2 +1,9 @@ +#!/bin/sh # less initialization script (sh) -[ -x /usr/bin/lesspipe.sh ] && export LESSOPEN="${LESSOPEN-||/usr/bin/lesspipe.sh %s}" +if [ -x /usr/bin/lesspipe.sh ]; then + if [ -z "$LESSOPEN" ]; then + export LESSOPEN="/usr/bin/lesspipe.sh %s" + else + export LESSOPEN="$LESSOPEN | /usr/bin/lesspipe.sh %s" + fi +fi diff --git a/less.spec b/less.spec index 3c4acd2..eb34fb2 100644 --- a/less.spec +++ b/less.spec @@ -8,6 +8,7 @@ Source: http://www.greenwoodsoftware.com/less/%{name}-%{version}.tar.gz Source1: lesspipe.sh Source2: less.sh Source3: less.csh +Source4: less.zsh Patch1: less-444-Foption.v2.patch Patch2: less-394-search.patch Patch4: less-394-time.patch @@ -59,6 +60,7 @@ mkdir -p $RPM_BUILD_ROOT/etc/profile.d install -p %{SOURCE1} $RPM_BUILD_ROOT/%{_bindir} install -p -m 644 %{SOURCE2} $RPM_BUILD_ROOT/etc/profile.d install -p -m 644 %{SOURCE3} $RPM_BUILD_ROOT/etc/profile.d +install -p -m 644 %{SOURCE4} $RPM_BUILD_ROOT/etc/profile.d %files %doc README NEWS INSTALL COPYING @@ -68,9 +70,10 @@ install -p -m 644 %{SOURCE3} $RPM_BUILD_ROOT/etc/profile.d %{_mandir}/man1/* %changelog -* Mon Aug 03 2015 Viktor Jancik - 479-2 +* Mon Aug 21 2015 Viktor Jancik - 479-2 - Updated spec file to comply with current Fedora Packaging Guidelines Added missing documentation files +- Fixed less profile.d scripts * Tue Jul 07 2015 Fedora Release Monitoring - 479-1 - Update to 479 (#1240456) diff --git a/less.zsh b/less.zsh new file mode 100755 index 0000000..7949583 --- /dev/null +++ b/less.zsh @@ -0,0 +1,11 @@ +#!/bin/zsh +# less initialization script (sh) +if [[ -x /usr/bin/lesspipe.sh ]] ; then + if [[ -z "$LESSOPEN" ]] ; then + export LESSOPEN="/usr/bin/lesspipe.sh %s" + else + export LESSOPEN="$LESSOPEN | /usr/bin/lesspipe.sh %s" + fi +fi + +echo $LESSOPEN From b539f87ad6f4f7a4875d774ae208bb60f4bfe642 Mon Sep 17 00:00:00 2001 From: Viktor Jancik Date: Sat, 22 Aug 2015 00:45:30 +0200 Subject: [PATCH 09/78] Modification to previous profile.d script changes --- less.csh | 7 ++++--- less.sh | 9 ++------- less.zsh | 10 ++-------- 3 files changed, 8 insertions(+), 18 deletions(-) diff --git a/less.csh b/less.csh index c3dae53..d58763d 100755 --- a/less.csh +++ b/less.csh @@ -1,8 +1,9 @@ +#!/bin/csh # less initialization script (csh) if ( -x /usr/bin/lesspipe.sh ) then - if ( $?LESSOPEN && { eval 'test ! -z $LESSOPEN' }) then - setenv LESSOPEN "$LESSOPEN | /usr/bin/lesspipe.sh %s" + if ( $?LESSOPEN && { eval 'test ! -z $LESSOPEN' } ) then + : else - setenv LESSOPEN "/usr/bin/lesspipe.sh %s" + setenv LESSOPEN "|/usr/bin/lesspipe.sh %s" endif endif diff --git a/less.sh b/less.sh index c8066ec..eeade55 100755 --- a/less.sh +++ b/less.sh @@ -1,9 +1,4 @@ -#!/bin/sh # less initialization script (sh) -if [ -x /usr/bin/lesspipe.sh ]; then - if [ -z "$LESSOPEN" ]; then - export LESSOPEN="/usr/bin/lesspipe.sh %s" - else - export LESSOPEN="$LESSOPEN | /usr/bin/lesspipe.sh %s" - fi +if [ -x /usr/bin/lesspipe.sh ] && [ -z $LESSOPEN ]; then + export LESSOPEN="|/usr/bin/lesspipe.sh %s" fi diff --git a/less.zsh b/less.zsh index 7949583..b5d4175 100755 --- a/less.zsh +++ b/less.zsh @@ -1,11 +1,5 @@ #!/bin/zsh # less initialization script (sh) -if [[ -x /usr/bin/lesspipe.sh ]] ; then - if [[ -z "$LESSOPEN" ]] ; then - export LESSOPEN="/usr/bin/lesspipe.sh %s" - else - export LESSOPEN="$LESSOPEN | /usr/bin/lesspipe.sh %s" - fi +if [[ -x /usr/bin/lesspipe.sh && -z "$LESSOPEN" ]] ; then + export LESSOPEN="|/usr/bin/lesspipe.sh %s" fi - -echo $LESSOPEN From 6d7e9d23705d958cea94e73d076ed3dc89a49f79 Mon Sep 17 00:00:00 2001 From: Viktor Jancik Date: Sat, 22 Aug 2015 02:52:22 +0200 Subject: [PATCH 10/78] Fixed displaying of nonascii characters #1241543 --- less.spec | 4 +++- lesspipe.sh | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/less.spec b/less.spec index eb34fb2..bcbfb90 100644 --- a/less.spec +++ b/less.spec @@ -21,6 +21,7 @@ Patch10: less-458-lesskey-usage.patch Patch11: less-458-old-bot-in-help.patch URL: http://www.greenwoodsoftware.com/less/ Requires: groff-base +Requires: man-db BuildRequires: ncurses-devel BuildRequires: autoconf automake libtool @@ -70,10 +71,11 @@ install -p -m 644 %{SOURCE4} $RPM_BUILD_ROOT/etc/profile.d %{_mandir}/man1/* %changelog -* Mon Aug 21 2015 Viktor Jancik - 479-2 +* Mon Aug 22 2015 Viktor Jancik - 479-2 - Updated spec file to comply with current Fedora Packaging Guidelines Added missing documentation files - Fixed less profile.d scripts +- Fixed preprocessing of man pages with special characters (#1241543) * Tue Jul 07 2015 Fedora Release Monitoring - 479-1 - Update to 479 (#1240456) diff --git a/lesspipe.sh b/lesspipe.sh index a2c319a..295ed2a 100755 --- a/lesspipe.sh +++ b/lesspipe.sh @@ -38,12 +38,12 @@ case "$1" in *.xz|*.lzma) DECOMPRESSOR="xz -dc" ;; esac if [ -n "$DECOMPRESSOR" ] && $DECOMPRESSOR -- "$1" | file - | grep -q troff; then - $DECOMPRESSOR -- "$1" | groff -Tascii -mandoc - + $DECOMPRESSOR -- "$1" | man -P cat -l - exit $? fi ;;& *.[1-9n]|*.[1-9]x|*.man) if file "$1" | grep -q troff; then - groff -Tascii -mandoc "$1" | cat -s + man -P cat -l "$1" exit $? fi ;;& *.tar) tar tvvf "$1"; exit $? ;; From 09eadae3be5b1b584759afc6ac34f46461f4963f Mon Sep 17 00:00:00 2001 From: Viktor Jancik Date: Sat, 22 Aug 2015 17:37:14 +0200 Subject: [PATCH 11/78] Fixed man page text highlighting --- lesspipe.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lesspipe.sh b/lesspipe.sh index 295ed2a..682f09e 100755 --- a/lesspipe.sh +++ b/lesspipe.sh @@ -30,6 +30,8 @@ if [ -x ~/.lessfilter ]; then fi fi +export MAN_KEEP_FORMATTING=1 + case "$1" in *.[1-9n].bz2|*.[1-9]x.bz2|*.man.bz2|*.[1-9n].[gx]z|*.[1-9]x.[gx]z|*.man.[gx]z|*.[1-9n].lzma|*.[1-9]x.lzma|*.man.lzma) case "$1" in From 00941dc5664e9d99ba4ed6bcaa1af937ec3e989d Mon Sep 17 00:00:00 2001 From: Viktor Jancik Date: Wed, 2 Sep 2015 13:41:23 +0200 Subject: [PATCH 12/78] Fixed licensing and missing double quotes in profile.d scripts #1257516 #1258808 #1259030 --- less.csh | 2 +- less.sh | 2 +- less.spec | 16 ++++++++++------ 3 files changed, 12 insertions(+), 8 deletions(-) diff --git a/less.csh b/less.csh index d58763d..13e4f3a 100755 --- a/less.csh +++ b/less.csh @@ -1,7 +1,7 @@ #!/bin/csh # less initialization script (csh) if ( -x /usr/bin/lesspipe.sh ) then - if ( $?LESSOPEN && { eval 'test ! -z $LESSOPEN' } ) then + if ( $?LESSOPEN && { eval 'test ! -z "$LESSOPEN"' } ) then : else setenv LESSOPEN "|/usr/bin/lesspipe.sh %s" diff --git a/less.sh b/less.sh index eeade55..9a6d64e 100755 --- a/less.sh +++ b/less.sh @@ -1,4 +1,4 @@ # less initialization script (sh) -if [ -x /usr/bin/lesspipe.sh ] && [ -z $LESSOPEN ]; then +if [ -x /usr/bin/lesspipe.sh ] && [ -z "$LESSOPEN" ]; then export LESSOPEN="|/usr/bin/lesspipe.sh %s" fi diff --git a/less.spec b/less.spec index bcbfb90..8ee454f 100644 --- a/less.spec +++ b/less.spec @@ -1,15 +1,15 @@ Summary: A text file browser similar to more, but better Name: less Version: 479 -Release: 2%{?dist} -License: GPLv3+ +Release: 3%{?dist} +License: GPLv3+ or BSD Group: Applications/Text Source: http://www.greenwoodsoftware.com/less/%{name}-%{version}.tar.gz Source1: lesspipe.sh Source2: less.sh Source3: less.csh Source4: less.zsh -Patch1: less-444-Foption.v2.patch +Patch1: less-444-Foption.v2.patch Patch2: less-394-search.patch Patch4: less-394-time.patch Patch5: less-418-fsync.patch @@ -64,14 +64,18 @@ install -p -m 644 %{SOURCE3} $RPM_BUILD_ROOT/etc/profile.d install -p -m 644 %{SOURCE4} $RPM_BUILD_ROOT/etc/profile.d %files -%doc README NEWS INSTALL COPYING -%license LICENSE +%doc README NEWS INSTALL +%license LICENSE COPYING /etc/profile.d/* %{_bindir}/* %{_mandir}/man1/* %changelog -* Mon Aug 22 2015 Viktor Jancik - 479-2 +* Wed Sep 2 2015 Viktor Jancik - 479-3 +- Added missing double quotes in profile.d scripts +- Corrected license information + +* Mon Aug 24 2015 Viktor Jancik - 479-2 - Updated spec file to comply with current Fedora Packaging Guidelines Added missing documentation files - Fixed less profile.d scripts From 81a5028f51ab80173c47897aa29d69ecbc56ef38 Mon Sep 17 00:00:00 2001 From: Viktor Jancik Date: Fri, 2 Oct 2015 12:57:18 +0200 Subject: [PATCH 13/78] Update to 481, fixes (#1231493) --- .gitignore | 1 + less-394-search.patch | 32 ---------------------------- less-458-outdated-unicode-data.patch | 12 ----------- less.spec | 11 +++++----- less.zsh | 5 ----- sources | 2 +- 6 files changed, 7 insertions(+), 56 deletions(-) delete mode 100644 less-394-search.patch delete mode 100644 less-458-outdated-unicode-data.patch delete mode 100755 less.zsh diff --git a/.gitignore b/.gitignore index 0e8ce99..563e44e 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,4 @@ /less-471.tar.gz /less-478.tar.gz /less-479.tar.gz +/less-481.tar.gz diff --git a/less-394-search.patch b/less-394-search.patch deleted file mode 100644 index 909d1b4..0000000 --- a/less-394-search.patch +++ /dev/null @@ -1,32 +0,0 @@ ---- less-394/line.c.search 2005-12-03 21:20:32.000000000 +0100 -+++ less-394/line.c 2006-02-15 11:23:25.308694376 +0100 -@@ -1125,6 +1125,14 @@ - break; - } - } -+ if (c == '\0') -+ { -+ /* -+ * Pretend the line ended here -+ */ -+ new_pos = ch_tell(); -+ break; -+ } - linebuf[n++] = c; - c = ch_forw_get(); - } -@@ -1198,6 +1206,14 @@ - *to = *fm; - n = size_linebuf - old_size_linebuf; - } -+ if (c == '\0') -+ { -+ /* -+ * Pretend the line ended here -+ */ -+ new_pos = ch_tell() + 1; -+ break; -+ } - linebuf[--n] = c; - } - if (linep != NULL) diff --git a/less-458-outdated-unicode-data.patch b/less-458-outdated-unicode-data.patch deleted file mode 100644 index b0697fa..0000000 --- a/less-458-outdated-unicode-data.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -pruN less-458.orig/charset.c less-458/charset.c ---- less-458.orig/charset.c 2013-04-05 01:55:05.000000000 +0900 -+++ less-458/charset.c 2014-03-10 19:47:09.850026052 +0900 -@@ -970,7 +970,7 @@ static struct wchar_range ubin_table[] = - { 0x2064, 0x2069} /* Cn */, - { 0x206A, 0x206F} /* Cf */, - { 0x2072, 0x2073} /* Cn */, { 0x208F, 0x208F} /* Cn */, -- { 0x2095, 0x209F} /* Cn */, { 0x20B6, 0x20CF} /* Cn */, -+ { 0x2095, 0x209F} /* Cn */, { 0x20BB, 0x20CF} /* Cn */, - { 0x20F0, 0x20FF} /* Cn */, { 0x214F, 0x2152} /* Cn */, - { 0x2185, 0x218F} /* Cn */, { 0x23E8, 0x23FF} /* Cn */, - { 0x2427, 0x243F} /* Cn */, { 0x244B, 0x245F} /* Cn */, diff --git a/less.spec b/less.spec index 8ee454f..08e4f6e 100644 --- a/less.spec +++ b/less.spec @@ -1,16 +1,14 @@ Summary: A text file browser similar to more, but better Name: less -Version: 479 -Release: 3%{?dist} +Version: 481 +Release: 1%{?dist} License: GPLv3+ or BSD Group: Applications/Text Source: http://www.greenwoodsoftware.com/less/%{name}-%{version}.tar.gz Source1: lesspipe.sh Source2: less.sh Source3: less.csh -Source4: less.zsh Patch1: less-444-Foption.v2.patch -Patch2: less-394-search.patch Patch4: less-394-time.patch Patch5: less-418-fsync.patch Patch6: less-436-manpage-add-old-bot-option.patch @@ -38,7 +36,6 @@ files, and you'll use it frequently. %prep %setup -q %patch1 -p2 -b .Foption -%patch2 -p1 -b .search %patch4 -p1 -b .time %patch5 -p1 -b .fsync %patch6 -p1 -b .manpage-add-old-bot-option @@ -61,7 +58,6 @@ mkdir -p $RPM_BUILD_ROOT/etc/profile.d install -p %{SOURCE1} $RPM_BUILD_ROOT/%{_bindir} install -p -m 644 %{SOURCE2} $RPM_BUILD_ROOT/etc/profile.d install -p -m 644 %{SOURCE3} $RPM_BUILD_ROOT/etc/profile.d -install -p -m 644 %{SOURCE4} $RPM_BUILD_ROOT/etc/profile.d %files %doc README NEWS INSTALL @@ -71,6 +67,9 @@ install -p -m 644 %{SOURCE4} $RPM_BUILD_ROOT/etc/profile.d %{_mandir}/man1/* %changelog +* Fri Oct 2 2015 Viktor Jancik - 481-1 +- Update to version 481, fixes #1231493 + * Wed Sep 2 2015 Viktor Jancik - 479-3 - Added missing double quotes in profile.d scripts - Corrected license information diff --git a/less.zsh b/less.zsh deleted file mode 100755 index b5d4175..0000000 --- a/less.zsh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/zsh -# less initialization script (sh) -if [[ -x /usr/bin/lesspipe.sh && -z "$LESSOPEN" ]] ; then - export LESSOPEN="|/usr/bin/lesspipe.sh %s" -fi diff --git a/sources b/sources index da68519..b9f3fe7 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -049f51ccfe2686009c6ce943eeb4bbaf less-479.tar.gz +50ef46065c65257141a7340123527767 less-481.tar.gz From 3628f016feb0e8c78872b1b1185cd1e13fe0157d Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Thu, 4 Feb 2016 02:46:08 +0000 Subject: [PATCH 14/78] - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild --- less.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/less.spec b/less.spec index 08e4f6e..cccb445 100644 --- a/less.spec +++ b/less.spec @@ -1,7 +1,7 @@ Summary: A text file browser similar to more, but better Name: less Version: 481 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv3+ or BSD Group: Applications/Text Source: http://www.greenwoodsoftware.com/less/%{name}-%{version}.tar.gz @@ -67,6 +67,9 @@ install -p -m 644 %{SOURCE3} $RPM_BUILD_ROOT/etc/profile.d %{_mandir}/man1/* %changelog +* Thu Feb 04 2016 Fedora Release Engineering - 481-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + * Fri Oct 2 2015 Viktor Jancik - 481-1 - Update to version 481, fixes #1231493 From 11bfc57bdff570304aa2a4dae466532a6b03c949 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ville=20Skytt=C3=A4?= Date: Mon, 28 Mar 2016 17:30:40 +0300 Subject: [PATCH 15/78] less.sh: Avoid unnecessary stat call While at it, remove unnecessary executable bits (in git) and shebang from less.*sh. --- less.csh | 1 - less.sh | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) mode change 100755 => 100644 less.csh mode change 100755 => 100644 less.sh diff --git a/less.csh b/less.csh old mode 100755 new mode 100644 index 13e4f3a..838fbe8 --- a/less.csh +++ b/less.csh @@ -1,4 +1,3 @@ -#!/bin/csh # less initialization script (csh) if ( -x /usr/bin/lesspipe.sh ) then if ( $?LESSOPEN && { eval 'test ! -z "$LESSOPEN"' } ) then diff --git a/less.sh b/less.sh old mode 100755 new mode 100644 index 9a6d64e..663489a --- a/less.sh +++ b/less.sh @@ -1,4 +1,4 @@ # less initialization script (sh) -if [ -x /usr/bin/lesspipe.sh ] && [ -z "$LESSOPEN" ]; then +if [ -z "$LESSOPEN" ] && [ -x /usr/bin/lesspipe.sh ]; then export LESSOPEN="|/usr/bin/lesspipe.sh %s" fi From 32b553bce3ffdd22fff5acbb151939c3e5a45113 Mon Sep 17 00:00:00 2001 From: Pavel Raiskup Date: Tue, 29 Mar 2016 09:39:48 +0200 Subject: [PATCH 16/78] less.csh: avoid unnecessary stat() call Resolves: #1321591 Version: 481-3 --- less.csh | 14 ++++++++++---- less.sh | 3 +++ less.spec | 6 +++++- 3 files changed, 18 insertions(+), 5 deletions(-) diff --git a/less.csh b/less.csh index 838fbe8..1e6a485 100644 --- a/less.csh +++ b/less.csh @@ -1,8 +1,14 @@ # less initialization script (csh) -if ( -x /usr/bin/lesspipe.sh ) then - if ( $?LESSOPEN && { eval 'test ! -z "$LESSOPEN"' } ) then - : - else + +# All less.*sh files should have the same semantics! + +# In case you are curious, the test for non-emptiness is not as easy as in +# Bourne shell. This "eval" construct is probably inspired by Stack +# Overflow question 13343392. +if ( $?LESSOPEN && { eval 'test ! -z "$LESSOPEN"' } ) then + : +else + if ( -x /usr/bin/lesspipe.sh ) then setenv LESSOPEN "|/usr/bin/lesspipe.sh %s" endif endif diff --git a/less.sh b/less.sh index 663489a..cdba043 100644 --- a/less.sh +++ b/less.sh @@ -1,4 +1,7 @@ # less initialization script (sh) + +# All less.*sh files should have the same semantics! + if [ -z "$LESSOPEN" ] && [ -x /usr/bin/lesspipe.sh ]; then export LESSOPEN="|/usr/bin/lesspipe.sh %s" fi diff --git a/less.spec b/less.spec index cccb445..3b6aeea 100644 --- a/less.spec +++ b/less.spec @@ -1,7 +1,7 @@ Summary: A text file browser similar to more, but better Name: less Version: 481 -Release: 2%{?dist} +Release: 3%{?dist} License: GPLv3+ or BSD Group: Applications/Text Source: http://www.greenwoodsoftware.com/less/%{name}-%{version}.tar.gz @@ -67,6 +67,10 @@ install -p -m 644 %{SOURCE3} $RPM_BUILD_ROOT/etc/profile.d %{_mandir}/man1/* %changelog +* Tue Mar 29 2016 Pavel Raiskup - 481-3 +- avoid one ubiquitous stat() call in less.sh and less.csh if possible + (rhbz#1321591) + * Thu Feb 04 2016 Fedora Release Engineering - 481-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild From 6dde17a8465c3f7c75d18d612946a8bf6fb9b1bb Mon Sep 17 00:00:00 2001 From: Pavel Raiskup Date: Wed, 20 Apr 2016 09:55:52 +0200 Subject: [PATCH 17/78] requires: don't require man-db Resolves: rhbz#1278857 Version: 481-4 --- less.spec | 7 ++++--- lesspipe.sh | 22 ++++++++++++++++++++-- 2 files changed, 24 insertions(+), 5 deletions(-) diff --git a/less.spec b/less.spec index 3b6aeea..5274b73 100644 --- a/less.spec +++ b/less.spec @@ -1,7 +1,7 @@ Summary: A text file browser similar to more, but better Name: less Version: 481 -Release: 3%{?dist} +Release: 4%{?dist} License: GPLv3+ or BSD Group: Applications/Text Source: http://www.greenwoodsoftware.com/less/%{name}-%{version}.tar.gz @@ -18,8 +18,6 @@ Patch9: less-458-less-filters-man.patch Patch10: less-458-lesskey-usage.patch Patch11: less-458-old-bot-in-help.patch URL: http://www.greenwoodsoftware.com/less/ -Requires: groff-base -Requires: man-db BuildRequires: ncurses-devel BuildRequires: autoconf automake libtool @@ -67,6 +65,9 @@ install -p -m 644 %{SOURCE3} $RPM_BUILD_ROOT/etc/profile.d %{_mandir}/man1/* %changelog +* Wed Apr 20 2016 Pavel Raiskup - 481-4 +- don't strictly require man-db or groff-base (rhbz#1278857) + * Tue Mar 29 2016 Pavel Raiskup - 481-3 - avoid one ubiquitous stat() call in less.sh and less.csh if possible (rhbz#1321591) diff --git a/lesspipe.sh b/lesspipe.sh index 682f09e..d61dc4c 100755 --- a/lesspipe.sh +++ b/lesspipe.sh @@ -30,6 +30,24 @@ if [ -x ~/.lessfilter ]; then fi fi +manfilter () +{ + if test -x /usr/bin/man ; then + # See rhbz#1241543 for more info. Well, actually we firstly + # used 'man -l', then we switched to groff, and then we again + # switched back to 'man -l'. + /usr/bin/man -P /usr/bin/cat -l "$1" + elif test -x /usr/bin/groff; then + # This is from pre-rhbz#1241543-time. + groff -Tascii -mandoc "$1" | cat -s + else + echo "WARNING:" + echo "WARNING: to better show manual pages, install 'man-db' package" + echo "WARNING:" + cat "$1" + fi +} + export MAN_KEEP_FORMATTING=1 case "$1" in @@ -40,12 +58,12 @@ case "$1" in *.xz|*.lzma) DECOMPRESSOR="xz -dc" ;; esac if [ -n "$DECOMPRESSOR" ] && $DECOMPRESSOR -- "$1" | file - | grep -q troff; then - $DECOMPRESSOR -- "$1" | man -P cat -l - + $DECOMPRESSOR -- "$1" | manfilter - exit $? fi ;;& *.[1-9n]|*.[1-9]x|*.man) if file "$1" | grep -q troff; then - man -P cat -l "$1" + manfilter "$1" exit $? fi ;;& *.tar) tar tvvf "$1"; exit $? ;; From 8e7f15f2e1beda4e5e05810927b79c2aba6efec0 Mon Sep 17 00:00:00 2001 From: Pavel Raiskup Date: Mon, 25 Apr 2016 06:50:50 +0200 Subject: [PATCH 18/78] LESSOPEN: use '||' syntax again Related: rhbz#1254837 Version: 481-5 --- less.csh | 3 ++- less.sh | 3 ++- less.spec | 5 ++++- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/less.csh b/less.csh index 1e6a485..d3c1f8e 100644 --- a/less.csh +++ b/less.csh @@ -9,6 +9,7 @@ if ( $?LESSOPEN && { eval 'test ! -z "$LESSOPEN"' } ) then : else if ( -x /usr/bin/lesspipe.sh ) then - setenv LESSOPEN "|/usr/bin/lesspipe.sh %s" + # The '||' here is intentional, see rhbz#1254837. + setenv LESSOPEN "||/usr/bin/lesspipe.sh %s" endif endif diff --git a/less.sh b/less.sh index cdba043..189bbd2 100644 --- a/less.sh +++ b/less.sh @@ -3,5 +3,6 @@ # All less.*sh files should have the same semantics! if [ -z "$LESSOPEN" ] && [ -x /usr/bin/lesspipe.sh ]; then - export LESSOPEN="|/usr/bin/lesspipe.sh %s" + # The '||' here is intentional, see rhbz#1254837. + export LESSOPEN="||/usr/bin/lesspipe.sh %s" fi diff --git a/less.spec b/less.spec index 5274b73..d7dddf8 100644 --- a/less.spec +++ b/less.spec @@ -1,7 +1,7 @@ Summary: A text file browser similar to more, but better Name: less Version: 481 -Release: 4%{?dist} +Release: 5%{?dist} License: GPLv3+ or BSD Group: Applications/Text Source: http://www.greenwoodsoftware.com/less/%{name}-%{version}.tar.gz @@ -65,6 +65,9 @@ install -p -m 644 %{SOURCE3} $RPM_BUILD_ROOT/etc/profile.d %{_mandir}/man1/* %changelog +* Mon Apr 25 2016 Pavel Raiskup - 481-5 +- again use the correct '||' syntax in LESSOPEN variable (rhbz#1254837) + * Wed Apr 20 2016 Pavel Raiskup - 481-4 - don't strictly require man-db or groff-base (rhbz#1278857) From 6502b093ba9459375ebc463a7d256fa9e6718d00 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ville=20Skytt=C3=A4?= Date: Tue, 11 Oct 2016 10:13:42 +0300 Subject: [PATCH 19/78] Prefer gpg2 over gpg for *.gpg Resolves: rhbz#1383284 Version: 481-6 --- less.spec | 5 ++++- lesspipe.sh | 13 ++++++++++++- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/less.spec b/less.spec index d7dddf8..afc67be 100644 --- a/less.spec +++ b/less.spec @@ -1,7 +1,7 @@ Summary: A text file browser similar to more, but better Name: less Version: 481 -Release: 5%{?dist} +Release: 6%{?dist} License: GPLv3+ or BSD Group: Applications/Text Source: http://www.greenwoodsoftware.com/less/%{name}-%{version}.tar.gz @@ -65,6 +65,9 @@ install -p -m 644 %{SOURCE3} $RPM_BUILD_ROOT/etc/profile.d %{_mandir}/man1/* %changelog +* Tue Oct 11 2016 Ville Skyttä - 481-6 +- Prefer gpg2 over gpg for *.gpg (rhbz#1383284) + * Mon Apr 25 2016 Pavel Raiskup - 481-5 - again use the correct '||' syntax in LESSOPEN variable (rhbz#1254837) diff --git a/lesspipe.sh b/lesspipe.sh index d61dc4c..017fe2d 100755 --- a/lesspipe.sh +++ b/lesspipe.sh @@ -76,7 +76,18 @@ case "$1" in *.zip|*.jar|*.nbm) zipinfo -- "$1"; exit $? ;; *.rpm) rpm -qpivl --changelog -- "$1"; exit $? ;; *.cpi|*.cpio) cpio -itv < "$1"; exit $? ;; -*.gpg) gpg -d "$1"; exit $? ;; +*.gpg) + if [ -x /usr/bin/gpg2 ]; then + gpg2 -d "$1" + exit $? + elif [ -x /usr/bin/gpg ]; then + gpg -d "$1" + exit $? + else + echo "No GnuPG available." + echo "Install gnupg2 or gnupg to show encrypted files." + exit 1 + fi ;; *.gif|*.jpeg|*.jpg|*.pcd|*.png|*.tga|*.tiff|*.tif) if [ -x /usr/bin/identify ]; then identify "$1" From 9f27a92b2f2166cd61bd9af8d0abe0cf1b2b9f7c Mon Sep 17 00:00:00 2001 From: Jozef Mlich Date: Fri, 28 Oct 2016 08:27:05 +0200 Subject: [PATCH 20/78] rebase to less 487 Resolves: #1389577 --- .gitignore | 1 + less.spec | 8 ++++++-- sources | 2 +- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 563e44e..8f837db 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,4 @@ /less-478.tar.gz /less-479.tar.gz /less-481.tar.gz +/less-487.tar.gz diff --git a/less.spec b/less.spec index afc67be..c20a919 100644 --- a/less.spec +++ b/less.spec @@ -1,7 +1,7 @@ Summary: A text file browser similar to more, but better Name: less -Version: 481 -Release: 6%{?dist} +Version: 487 +Release: 1%{?dist} License: GPLv3+ or BSD Group: Applications/Text Source: http://www.greenwoodsoftware.com/less/%{name}-%{version}.tar.gz @@ -65,6 +65,10 @@ install -p -m 644 %{SOURCE3} $RPM_BUILD_ROOT/etc/profile.d %{_mandir}/man1/* %changelog +* Fri Oct 28 2016 Jozef Mlich - 487-1 +- Resolves: rhbz#1389577 + Update to new upstream release + * Tue Oct 11 2016 Ville Skyttä - 481-6 - Prefer gpg2 over gpg for *.gpg (rhbz#1383284) diff --git a/sources b/sources index b9f3fe7..e15507b 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -50ef46065c65257141a7340123527767 less-481.tar.gz +dcc8bf183a83b362d37fe9ef8df1fb60 less-487.tar.gz From 8ba41a80f5de4605cb614c265eedf79ebfa44d22 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 10 Feb 2017 18:15:05 +0000 Subject: [PATCH 21/78] - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild --- less.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/less.spec b/less.spec index c20a919..fa03f82 100644 --- a/less.spec +++ b/less.spec @@ -1,7 +1,7 @@ Summary: A text file browser similar to more, but better Name: less Version: 487 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv3+ or BSD Group: Applications/Text Source: http://www.greenwoodsoftware.com/less/%{name}-%{version}.tar.gz @@ -65,6 +65,9 @@ install -p -m 644 %{SOURCE3} $RPM_BUILD_ROOT/etc/profile.d %{_mandir}/man1/* %changelog +* Fri Feb 10 2017 Fedora Release Engineering - 487-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + * Fri Oct 28 2016 Jozef Mlich - 487-1 - Resolves: rhbz#1389577 Update to new upstream release From f32e1da3d76fa34a53cd746285b59c116eedb092 Mon Sep 17 00:00:00 2001 From: Pavel Raiskup Date: Tue, 16 May 2017 16:43:36 +0200 Subject: [PATCH 22/78] lesspipe.sh: read *.rpm text files Resolves: rhbz#1449790 Version: 487-3 --- less.spec | 5 ++++- lesspipe.sh | 3 ++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/less.spec b/less.spec index fa03f82..3162648 100644 --- a/less.spec +++ b/less.spec @@ -1,7 +1,7 @@ Summary: A text file browser similar to more, but better Name: less Version: 487 -Release: 2%{?dist} +Release: 3%{?dist} License: GPLv3+ or BSD Group: Applications/Text Source: http://www.greenwoodsoftware.com/less/%{name}-%{version}.tar.gz @@ -65,6 +65,9 @@ install -p -m 644 %{SOURCE3} $RPM_BUILD_ROOT/etc/profile.d %{_mandir}/man1/* %changelog +* Tue May 16 2017 Pavel Raiskup - 487-3 +- read correctly text files named accidentally '*.rpm' (rhbz#1449790) + * Fri Feb 10 2017 Fedora Release Engineering - 487-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild diff --git a/lesspipe.sh b/lesspipe.sh index 017fe2d..58f1ac1 100755 --- a/lesspipe.sh +++ b/lesspipe.sh @@ -74,7 +74,8 @@ case "$1" in *.[zZ]|*.gz) gzip -dc -- "$1"; exit $? ;; *.bz2) bzip2 -dc -- "$1"; exit $? ;; *.zip|*.jar|*.nbm) zipinfo -- "$1"; exit $? ;; -*.rpm) rpm -qpivl --changelog -- "$1"; exit $? ;; +# --nomanifest -> rhbz#1450277 +*.rpm) rpm -qpivl --changelog --nomanifest -- "$1"; exit $? ;; *.cpi|*.cpio) cpio -itv < "$1"; exit $? ;; *.gpg) if [ -x /usr/bin/gpg2 ]; then From f90e9de91443691f1b5b22fec19e107ab6f3b0dd Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 26 Jul 2017 18:23:24 +0000 Subject: [PATCH 23/78] - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild --- less.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/less.spec b/less.spec index 3162648..1bf68cd 100644 --- a/less.spec +++ b/less.spec @@ -1,7 +1,7 @@ Summary: A text file browser similar to more, but better Name: less Version: 487 -Release: 3%{?dist} +Release: 4%{?dist} License: GPLv3+ or BSD Group: Applications/Text Source: http://www.greenwoodsoftware.com/less/%{name}-%{version}.tar.gz @@ -65,6 +65,9 @@ install -p -m 644 %{SOURCE3} $RPM_BUILD_ROOT/etc/profile.d %{_mandir}/man1/* %changelog +* Wed Jul 26 2017 Fedora Release Engineering - 487-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + * Tue May 16 2017 Pavel Raiskup - 487-3 - read correctly text files named accidentally '*.rpm' (rhbz#1449790) From b1a2bf9089f80804d01597af45465e3aef2a36d9 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 3 Aug 2017 01:04:10 +0000 Subject: [PATCH 24/78] - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild --- less.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/less.spec b/less.spec index 1bf68cd..69d9005 100644 --- a/less.spec +++ b/less.spec @@ -1,7 +1,7 @@ Summary: A text file browser similar to more, but better Name: less Version: 487 -Release: 4%{?dist} +Release: 5%{?dist} License: GPLv3+ or BSD Group: Applications/Text Source: http://www.greenwoodsoftware.com/less/%{name}-%{version}.tar.gz @@ -65,6 +65,9 @@ install -p -m 644 %{SOURCE3} $RPM_BUILD_ROOT/etc/profile.d %{_mandir}/man1/* %changelog +* Thu Aug 03 2017 Fedora Release Engineering - 487-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild + * Wed Jul 26 2017 Fedora Release Engineering - 487-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild From 1d41c18e550d93b8725c396e4204917f94712cde Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 7 Feb 2018 21:00:59 +0000 Subject: [PATCH 25/78] - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- less.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/less.spec b/less.spec index 69d9005..45afe0a 100644 --- a/less.spec +++ b/less.spec @@ -1,7 +1,7 @@ Summary: A text file browser similar to more, but better Name: less Version: 487 -Release: 5%{?dist} +Release: 6%{?dist} License: GPLv3+ or BSD Group: Applications/Text Source: http://www.greenwoodsoftware.com/less/%{name}-%{version}.tar.gz @@ -65,6 +65,9 @@ install -p -m 644 %{SOURCE3} $RPM_BUILD_ROOT/etc/profile.d %{_mandir}/man1/* %changelog +* Wed Feb 07 2018 Fedora Release Engineering - 487-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + * Thu Aug 03 2017 Fedora Release Engineering - 487-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild From 584367a469074c72f5fbb6ca9de7abc08f8c6057 Mon Sep 17 00:00:00 2001 From: Pavel Raiskup Date: Tue, 26 Sep 2017 07:03:10 +0200 Subject: [PATCH 26/78] rebase: beta test release Version: 520-1 --- less-444-Foption.v2.patch | 131 -------------------------------------- less.spec | 9 +-- 2 files changed, 5 insertions(+), 135 deletions(-) delete mode 100644 less-444-Foption.v2.patch diff --git a/less-444-Foption.v2.patch b/less-444-Foption.v2.patch deleted file mode 100644 index d996a5c..0000000 --- a/less-444-Foption.v2.patch +++ /dev/null @@ -1,131 +0,0 @@ -From 21d56469fd4b4558d640ad82c78f2b9748341c11 Mon Sep 17 00:00:00 2001 -From: "Vojtech Vitek (V-Teq)" -Date: Mon, 14 May 2012 17:31:20 +0200 -Subject: [PATCH] Fix -F option behavior - -Original patch written by Jindrich Novy . - -Changes and improvements by Zdenek Prikryl , -Vojtech Vitek and Colin Guthrie . -Jozef Mlich ---- -diff -up ./less-466/forwback.c.Foption ./less-466/forwback.c ---- ./less-466/forwback.c.Foption 2014-08-24 02:46:52.000000000 +0200 -+++ ./less-466/forwback.c 2014-09-18 13:54:28.804626580 +0200 -@@ -440,3 +440,24 @@ get_back_scroll() - return (sc_height - 2); - return (10000); /* infinity */ - } -+ -+ -+/* -+ * Get line count of file up to the screen height + 1 char -+ */ -+ public int -+get_line_count() -+{ -+ int nlines = 0; -+ POSITION pos; -+ -+ pos = ch_zero(); -+ -+ while (pos != NULL_POSITION && nlines <= sc_height) -+ { -+ pos = forw_line(pos); -+ nlines++; -+ } -+ -+ return nlines; -+} -diff -up ./less-466/funcs.h.Foption ./less-466/funcs.h ---- ./less-466/funcs.h.Foption 2014-08-24 02:46:54.000000000 +0200 -+++ ./less-466/funcs.h 2014-09-18 13:55:12.140010010 +0200 -@@ -139,6 +139,7 @@ - public void forward (); - public void backward (); - public int get_back_scroll (); -+ public int get_line_count (); - public void del_ifile (); - public IFILE next_ifile (); - public IFILE prev_ifile (); -diff -up ./less-466/main.c.Foption ./less-466/main.c ---- ./less-466/main.c.Foption 2014-08-24 02:46:51.000000000 +0200 -+++ ./less-466/main.c 2014-09-18 14:03:12.868331522 +0200 -@@ -54,8 +54,10 @@ static char consoleTitle[256]; - #endif - - extern int less_is_more; -+public int line_count; - extern int missing_cap; - extern int know_dumb; -+extern int quit_if_one_screen; - extern int pr_type; - - -@@ -273,10 +275,27 @@ main(argc, argv) - { - if (edit_stdin()) /* Edit standard input */ - quit(QUIT_ERROR); -+ if (quit_if_one_screen) -+ line_count = get_line_count(); -+ - } else - { - if (edit_first()) /* Edit first valid file in cmd line */ - quit(QUIT_ERROR); -+ /* -+ * In case that we have only one file and -F, have to get a line -+ * count fot init(). If the line count is less then a height of a term, -+ * the content of the file is printed out and then less quits. Otherwise -+ * -F can not be used -+ */ -+ if (quit_if_one_screen) -+ { -+ if (nifile() == 1) -+ line_count = get_line_count(); -+ else /* In case more than one file, -F can not be used */ -+ quit_if_one_screen = FALSE; -+ } -+ - } - - init(); -diff -up ./less-466/screen.c.Foption ./less-466/screen.c ---- ./less-466/screen.c.Foption 2014-08-24 02:46:51.000000000 +0200 -+++ ./less-466/screen.c 2014-09-18 13:58:52.772962165 +0200 -@@ -203,6 +203,7 @@ public int missing_cap = 0; /* Some capa - - static int attrmode = AT_NORMAL; - extern int binattr; -+extern int line_count; - - #if !MSDOS_COMPILER - static char *cheaper(); -@@ -232,6 +233,7 @@ extern int wscroll; - extern int screen_trashed; - extern int tty; - extern int top_scroll; -+extern int quit_if_one_screen; - extern int oldbot; - #if HILITE_SEARCH - extern int hilite_search; -@@ -1533,7 +1535,9 @@ win32_deinit_term() - init() - { - #if !MSDOS_COMPILER -- if (!no_init) -+ if (quit_if_one_screen && line_count >= sc_height) -+ quit_if_one_screen = FALSE; -+ if (!no_init && !quit_if_one_screen) - tputs(sc_init, sc_height, putchr); - if (!no_keypad) - tputs(sc_s_keypad, sc_height, putchr); -@@ -1573,7 +1577,7 @@ deinit() - #if !MSDOS_COMPILER - if (!no_keypad) - tputs(sc_e_keypad, sc_height, putchr); -- if (!no_init) -+ if (!no_init && !quit_if_one_screen) - tputs(sc_deinit, sc_height, putchr); - #else - /* Restore system colors. */ diff --git a/less.spec b/less.spec index 45afe0a..4e161ed 100644 --- a/less.spec +++ b/less.spec @@ -1,14 +1,13 @@ Summary: A text file browser similar to more, but better Name: less -Version: 487 -Release: 6%{?dist} +Version: 520 +Release: 1%{?dist} License: GPLv3+ or BSD Group: Applications/Text Source: http://www.greenwoodsoftware.com/less/%{name}-%{version}.tar.gz Source1: lesspipe.sh Source2: less.sh Source3: less.csh -Patch1: less-444-Foption.v2.patch Patch4: less-394-time.patch Patch5: less-418-fsync.patch Patch6: less-436-manpage-add-old-bot-option.patch @@ -33,7 +32,6 @@ files, and you'll use it frequently. %prep %setup -q -%patch1 -p2 -b .Foption %patch4 -p1 -b .time %patch5 -p1 -b .fsync %patch6 -p1 -b .manpage-add-old-bot-option @@ -65,6 +63,9 @@ install -p -m 644 %{SOURCE3} $RPM_BUILD_ROOT/etc/profile.d %{_mandir}/man1/* %changelog +* Sat Feb 17 2018 Pavel Raiskup - 520-1 +- beta testing release + * Wed Feb 07 2018 Fedora Release Engineering - 487-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild From 24940f06e5e438e22c2db7ea296fd15f5da853f6 Mon Sep 17 00:00:00 2001 From: Pavel Raiskup Date: Fri, 3 Nov 2017 09:19:43 +0100 Subject: [PATCH 27/78] rebase: new (at this time only beta) upstream release Version: 527-1 --- .gitignore | 11 +---------- less.spec | 5 +++-- sources | 2 +- 3 files changed, 5 insertions(+), 13 deletions(-) diff --git a/.gitignore b/.gitignore index 8f837db..6852e6f 100644 --- a/.gitignore +++ b/.gitignore @@ -1,10 +1 @@ -/less-436.tar.gz -/less-443.tar.gz -/less-444.tar.gz -/less-451.tar.gz -/less-458.tar.gz -/less-471.tar.gz -/less-478.tar.gz -/less-479.tar.gz -/less-481.tar.gz -/less-487.tar.gz +/less-527.tar.gz diff --git a/less.spec b/less.spec index 4e161ed..ccb066c 100644 --- a/less.spec +++ b/less.spec @@ -1,6 +1,6 @@ Summary: A text file browser similar to more, but better Name: less -Version: 520 +Version: 527 Release: 1%{?dist} License: GPLv3+ or BSD Group: Applications/Text @@ -63,8 +63,9 @@ install -p -m 644 %{SOURCE3} $RPM_BUILD_ROOT/etc/profile.d %{_mandir}/man1/* %changelog -* Sat Feb 17 2018 Pavel Raiskup - 520-1 +* Sat Feb 17 2018 Pavel Raiskup - 527-1 - beta testing release +- new beta release * Wed Feb 07 2018 Fedora Release Engineering - 487-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild diff --git a/sources b/sources index e15507b..376443d 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -dcc8bf183a83b362d37fe9ef8df1fb60 less-487.tar.gz +SHA512 (less-527.tar.gz) = 169817ad6f427257c5ce347a13b89fabc4c7012d204ba260ee381645ad439ab6df1ad841ff209d9679eb2d436bf781c3d484b7bc93ed594e62538dbadcbc264e From 3a269d779c4afe57e4eceb59acdaa06628f88c70 Mon Sep 17 00:00:00 2001 From: Pavel Raiskup Date: Wed, 15 Nov 2017 06:14:59 +0100 Subject: [PATCH 28/78] rebase: new (at this time only beta) upstream release Version: 529-1 --- .gitignore | 2 +- less.spec | 5 ++--- sources | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index 6852e6f..1766718 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -/less-527.tar.gz +/less-529.tar.gz diff --git a/less.spec b/less.spec index ccb066c..199e9ec 100644 --- a/less.spec +++ b/less.spec @@ -1,6 +1,6 @@ Summary: A text file browser similar to more, but better Name: less -Version: 527 +Version: 529 Release: 1%{?dist} License: GPLv3+ or BSD Group: Applications/Text @@ -63,9 +63,8 @@ install -p -m 644 %{SOURCE3} $RPM_BUILD_ROOT/etc/profile.d %{_mandir}/man1/* %changelog -* Sat Feb 17 2018 Pavel Raiskup - 527-1 +* Sat Feb 17 2018 Pavel Raiskup - 529-1 - beta testing release -- new beta release * Wed Feb 07 2018 Fedora Release Engineering - 487-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild diff --git a/sources b/sources index 376443d..5a818f0 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (less-527.tar.gz) = 169817ad6f427257c5ce347a13b89fabc4c7012d204ba260ee381645ad439ab6df1ad841ff209d9679eb2d436bf781c3d484b7bc93ed594e62538dbadcbc264e +SHA512 (less-529.tar.gz) = 902e3ed86161c5a9eb3c08567b6b702371b5c88a85ef0b21beada223eaa47e0abf4d4d166a4a7a195caef67509fa683d07d0b6a40b529d703ee26aa8910c360a From 42417cf532e876e353e5d05d02d3b9292631615c Mon Sep 17 00:00:00 2001 From: Pavel Raiskup Date: Sat, 17 Feb 2018 06:21:12 +0100 Subject: [PATCH 29/78] new upstream stable release Version: 530-1 --- .gitignore | 2 +- less.spec | 7 ++++--- sources | 2 +- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index 1766718..1d8f23b 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -/less-529.tar.gz +/less-530.tar.gz diff --git a/less.spec b/less.spec index 199e9ec..a4d484a 100644 --- a/less.spec +++ b/less.spec @@ -1,6 +1,6 @@ Summary: A text file browser similar to more, but better Name: less -Version: 529 +Version: 530 Release: 1%{?dist} License: GPLv3+ or BSD Group: Applications/Text @@ -63,8 +63,9 @@ install -p -m 644 %{SOURCE3} $RPM_BUILD_ROOT/etc/profile.d %{_mandir}/man1/* %changelog -* Sat Feb 17 2018 Pavel Raiskup - 529-1 -- beta testing release +* Sat Feb 17 2018 Pavel Raiskup - 530-1 +- new release, per upstream release notes: + http://greenwoodsoftware.com/less/news.530.html * Wed Feb 07 2018 Fedora Release Engineering - 487-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild diff --git a/sources b/sources index 5a818f0..b754c36 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (less-529.tar.gz) = 902e3ed86161c5a9eb3c08567b6b702371b5c88a85ef0b21beada223eaa47e0abf4d4d166a4a7a195caef67509fa683d07d0b6a40b529d703ee26aa8910c360a +SHA512 (less-530.tar.gz) = 8d83a18b5648c4fe85921a563aa2c40bcf495aeb611098c83cd167b1e2f706649846cdf457c8506ae2683ab362ad970a0b261747349673020894bccdb9acbc10 From 92933f680d575c3ec506ffafd95ea26786df4466 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 13 Jul 2018 07:41:28 +0000 Subject: [PATCH 30/78] - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- less.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/less.spec b/less.spec index a4d484a..928af2b 100644 --- a/less.spec +++ b/less.spec @@ -1,7 +1,7 @@ Summary: A text file browser similar to more, but better Name: less Version: 530 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv3+ or BSD Group: Applications/Text Source: http://www.greenwoodsoftware.com/less/%{name}-%{version}.tar.gz @@ -63,6 +63,9 @@ install -p -m 644 %{SOURCE3} $RPM_BUILD_ROOT/etc/profile.d %{_mandir}/man1/* %changelog +* Fri Jul 13 2018 Fedora Release Engineering - 530-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + * Sat Feb 17 2018 Pavel Raiskup - 530-1 - new release, per upstream release notes: http://greenwoodsoftware.com/less/news.530.html From 02d1df97a01f60815fcafc34d686a175d9972bd2 Mon Sep 17 00:00:00 2001 From: Pavel Raiskup Date: Wed, 9 Jan 2019 09:57:26 +0100 Subject: [PATCH 31/78] add lzip compression support into lesspipe.sh script Thanks for the patch to Andrew Schorr. Version: 530-3 --- less.spec | 5 ++++- lesspipe.sh | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/less.spec b/less.spec index 928af2b..32e7997 100644 --- a/less.spec +++ b/less.spec @@ -1,7 +1,7 @@ Summary: A text file browser similar to more, but better Name: less Version: 530 -Release: 2%{?dist} +Release: 3%{?dist} License: GPLv3+ or BSD Group: Applications/Text Source: http://www.greenwoodsoftware.com/less/%{name}-%{version}.tar.gz @@ -63,6 +63,9 @@ install -p -m 644 %{SOURCE3} $RPM_BUILD_ROOT/etc/profile.d %{_mandir}/man1/* %changelog +* Wed Jan 09 2019 Pavel Raiskup - 530-3 +- add lzip compression support into lesspipe.sh (rhbz#1664383) + * Fri Jul 13 2018 Fedora Release Engineering - 530-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild diff --git a/lesspipe.sh b/lesspipe.sh index 58f1ac1..ddd9480 100755 --- a/lesspipe.sh +++ b/lesspipe.sh @@ -51,10 +51,11 @@ manfilter () export MAN_KEEP_FORMATTING=1 case "$1" in -*.[1-9n].bz2|*.[1-9]x.bz2|*.man.bz2|*.[1-9n].[gx]z|*.[1-9]x.[gx]z|*.man.[gx]z|*.[1-9n].lzma|*.[1-9]x.lzma|*.man.lzma) +*.[1-9n].bz2|*.[1-9]x.bz2|*.man.bz2|*.[1-9n].[glx]z|*.[1-9]x.[glx]z|*.man.[glx]z|*.[1-9n].lzma|*.[1-9]x.lzma|*.man.lzma) case "$1" in *.gz) DECOMPRESSOR="gzip -dc" ;; *.bz2) DECOMPRESSOR="bzip2 -dc" ;; + *.lz) DECOMPRESSOR="lzip -dc" ;; *.xz|*.lzma) DECOMPRESSOR="xz -dc" ;; esac if [ -n "$DECOMPRESSOR" ] && $DECOMPRESSOR -- "$1" | file - | grep -q troff; then @@ -70,6 +71,8 @@ case "$1" in *.tgz|*.tar.gz|*.tar.[zZ]) tar tzvvf "$1"; exit $? ;; *.tar.xz) tar Jtvvf "$1"; exit $? ;; *.xz|*.lzma) xz -dc -- "$1"; exit $? ;; +*.tar.lz) tar --lzip -tvvf "$1"; exit $? ;; +*.lz) lzip -dc -- "$1"; exit $? ;; *.tar.bz2|*.tbz2) bzip2 -dc -- "$1" | tar tvvf -; exit $? ;; *.[zZ]|*.gz) gzip -dc -- "$1"; exit $? ;; *.bz2) bzip2 -dc -- "$1"; exit $? ;; From 115e05d7e46f168863b3735bae9c261b3ff4859b Mon Sep 17 00:00:00 2001 From: Igor Gnatenko Date: Mon, 28 Jan 2019 20:17:51 +0100 Subject: [PATCH 32/78] Remove obsolete Group tag References: https://fedoraproject.org/wiki/Changes/Remove_Group_Tag --- less.spec | 1 - 1 file changed, 1 deletion(-) diff --git a/less.spec b/less.spec index 32e7997..6c959e0 100644 --- a/less.spec +++ b/less.spec @@ -3,7 +3,6 @@ Name: less Version: 530 Release: 3%{?dist} License: GPLv3+ or BSD -Group: Applications/Text Source: http://www.greenwoodsoftware.com/less/%{name}-%{version}.tar.gz Source1: lesspipe.sh Source2: less.sh From dfb1edb94ce69a77f7c821e89c26556bf1318e73 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 1 Feb 2019 06:30:04 +0000 Subject: [PATCH 33/78] - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- less.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/less.spec b/less.spec index 6c959e0..c895f19 100644 --- a/less.spec +++ b/less.spec @@ -1,7 +1,7 @@ Summary: A text file browser similar to more, but better Name: less Version: 530 -Release: 3%{?dist} +Release: 4%{?dist} License: GPLv3+ or BSD Source: http://www.greenwoodsoftware.com/less/%{name}-%{version}.tar.gz Source1: lesspipe.sh @@ -62,6 +62,9 @@ install -p -m 644 %{SOURCE3} $RPM_BUILD_ROOT/etc/profile.d %{_mandir}/man1/* %changelog +* Fri Feb 01 2019 Fedora Release Engineering - 530-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + * Wed Jan 09 2019 Pavel Raiskup - 530-3 - add lzip compression support into lesspipe.sh (rhbz#1664383) From 4a46a54bc30705e1b2a466b0e0a6049dce6853b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matej=20Mu=C5=BEila?= Date: Tue, 4 Jun 2019 15:22:03 +0200 Subject: [PATCH 34/78] Update to new upstream release Resolves: #1674080 --- .gitignore | 1 + less-418-fsync.patch | 4 ++-- less-458-lessecho-usage.patch | 2 +- less-458-lesskey-usage.patch | 2 +- less.spec | 10 +++++++--- sources | 2 +- 6 files changed, 13 insertions(+), 8 deletions(-) diff --git a/.gitignore b/.gitignore index 1d8f23b..08d3f3f 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ /less-530.tar.gz +/less-550.tar.gz diff --git a/less-418-fsync.patch b/less-418-fsync.patch index 5774bb2..5288fb2 100644 --- a/less-418-fsync.patch +++ b/less-418-fsync.patch @@ -14,8 +14,8 @@ diff -ur less-418.orig/configure.ac less-418/configure.ac # Checks for library functions. AC_TYPE_SIGNAL --AC_CHECK_FUNCS([fsync popen _setjmp sigprocmask sigsetmask snprintf stat system fchmod]) -+AC_CHECK_FUNCS([popen _setjmp sigprocmask sigsetmask snprintf stat system fchmod]) +-AC_CHECK_FUNCS([fsync popen _setjmp sigprocmask sigsetmask snprintf stat system fchmod realpath]) ++AC_CHECK_FUNCS([popen _setjmp sigprocmask sigsetmask snprintf stat system fchmod realpath]) # AC_CHECK_FUNCS may not work for inline functions, so test these separately. AC_MSG_CHECKING(for memcpy) diff --git a/less-458-lessecho-usage.patch b/less-458-lessecho-usage.patch index 40a05b7..14a7f37 100644 --- a/less-458-lessecho-usage.patch +++ b/less-458-lessecho-usage.patch @@ -2,7 +2,7 @@ diff -upr less-458_orig/lessecho.c less-458_work/lessecho.c --- less-458_orig/lessecho.c 2013-05-07 14:03:52.091104655 +0200 +++ less-458_work/lessecho.c 2013-05-07 11:21:10.883991862 +0200 @@ -41,7 +41,27 @@ static int num_metachars = 0; - pr_usage() + pr_usage(VOID_PARAM) { fprintf(stderr, - "usage: lessecho [-ox] [-cx] [-pn] [-dn] [-mx] [-nn] [-ex] [-fn] [-a] file ...\n"); diff --git a/less-458-lesskey-usage.patch b/less-458-lesskey-usage.patch index dbef8a0..4015354 100644 --- a/less-458-lesskey-usage.patch +++ b/less-458-lesskey-usage.patch @@ -3,7 +3,7 @@ diff -upr less-458_orig/lesskey.c less-458_work/lesskey.c +++ less-458_work/lesskey.c 2013-05-07 11:21:10.881991855 +0200 @@ -217,7 +217,15 @@ extern char version[]; void - usage() + usage(VOID_PARAM) { - fprintf(stderr, "usage: lesskey [-o output] [input]\n"); + fprintf(stderr, "usage: lesskey [-o output] [input]\n\n"); diff --git a/less.spec b/less.spec index c895f19..2455be5 100644 --- a/less.spec +++ b/less.spec @@ -1,7 +1,7 @@ Summary: A text file browser similar to more, but better Name: less -Version: 530 -Release: 4%{?dist} +Version: 550 +Release: 1%{?dist} License: GPLv3+ or BSD Source: http://www.greenwoodsoftware.com/less/%{name}-%{version}.tar.gz Source1: lesspipe.sh @@ -24,7 +24,7 @@ The less utility is a text file browser that resembles more, but has more capabilities. Less allows you to move backwards in the file as well as forwards. Since less doesn't have to read the entire input file before it starts, less starts up more quickly than text editors (for -example, vi). +example, vi). You should install less because it is a basic utility for viewing text files, and you'll use it frequently. @@ -62,6 +62,10 @@ install -p -m 644 %{SOURCE3} $RPM_BUILD_ROOT/etc/profile.d %{_mandir}/man1/* %changelog +* Tue Jun 04 2019 Matej Mužila - 550-1 +- Update to new upstream release +- Resolves: #1674080 + * Fri Feb 01 2019 Fedora Release Engineering - 530-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild diff --git a/sources b/sources index b754c36..9981d61 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (less-530.tar.gz) = 8d83a18b5648c4fe85921a563aa2c40bcf495aeb611098c83cd167b1e2f706649846cdf457c8506ae2683ab362ad970a0b261747349673020894bccdb9acbc10 +SHA512 (less-550.tar.gz) = a3d2769d90589a8e6afbfc9ac10cd1b544e0b0bbe28884e5ad980a71c541a37545c11d3450984b346b516fe082dfc0cf89d246c5a2d6002a7a2b4a4296a15494 From fbf1954bf41b2174029c38a395c7b629920eb705 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matej=20Mu=C5=BEila?= Date: Wed, 17 Jul 2019 12:59:17 +0200 Subject: [PATCH 35/78] Update to new upstream release Resolves: #1719419 --- less.spec | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/less.spec b/less.spec index 2455be5..9fcf804 100644 --- a/less.spec +++ b/less.spec @@ -1,6 +1,6 @@ Summary: A text file browser similar to more, but better Name: less -Version: 550 +Version: 551 Release: 1%{?dist} License: GPLv3+ or BSD Source: http://www.greenwoodsoftware.com/less/%{name}-%{version}.tar.gz @@ -62,6 +62,10 @@ install -p -m 644 %{SOURCE3} $RPM_BUILD_ROOT/etc/profile.d %{_mandir}/man1/* %changelog +* Wed Jul 17 2019 Matej Mužila - 551-1 +- Update to new upstream release +- Resolves: #1719419 + * Tue Jun 04 2019 Matej Mužila - 550-1 - Update to new upstream release - Resolves: #1674080 From 88a2d30d098d0f556b680f0f1a4491c875afd504 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matej=20Mu=C5=BEila?= Date: Wed, 17 Jul 2019 13:05:43 +0200 Subject: [PATCH 36/78] Add new source tarball (forgotten in previous commit) --- .gitignore | 1 + sources | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 08d3f3f..b7b6341 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ /less-530.tar.gz /less-550.tar.gz +/less-551.tar.gz diff --git a/sources b/sources index 9981d61..d5a231c 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (less-550.tar.gz) = a3d2769d90589a8e6afbfc9ac10cd1b544e0b0bbe28884e5ad980a71c541a37545c11d3450984b346b516fe082dfc0cf89d246c5a2d6002a7a2b4a4296a15494 +SHA512 (less-551.tar.gz) = ef5296b9ebd72f83c05cad8a0f7a5eec2290e9b358ee725e09e8541bd95f94c0e14ea22aa04b287a0654079338eaeae813f2235b8e9f819fbbc9040dd65a9585 From 5bb61822f189f7a646788b028099560eebdaf40b Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 25 Jul 2019 12:36:51 +0000 Subject: [PATCH 37/78] - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- less.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/less.spec b/less.spec index 9fcf804..542bca7 100644 --- a/less.spec +++ b/less.spec @@ -1,7 +1,7 @@ Summary: A text file browser similar to more, but better Name: less Version: 551 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv3+ or BSD Source: http://www.greenwoodsoftware.com/less/%{name}-%{version}.tar.gz Source1: lesspipe.sh @@ -62,6 +62,9 @@ install -p -m 644 %{SOURCE3} $RPM_BUILD_ROOT/etc/profile.d %{_mandir}/man1/* %changelog +* Thu Jul 25 2019 Fedora Release Engineering - 551-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + * Wed Jul 17 2019 Matej Mužila - 551-1 - Update to new upstream release - Resolves: #1719419 From 43a9950191ce863955f36a7f8a0c262a93614aaf Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 29 Jan 2020 08:22:09 +0000 Subject: [PATCH 38/78] - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- less.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/less.spec b/less.spec index 542bca7..d7274d8 100644 --- a/less.spec +++ b/less.spec @@ -1,7 +1,7 @@ Summary: A text file browser similar to more, but better Name: less Version: 551 -Release: 2%{?dist} +Release: 3%{?dist} License: GPLv3+ or BSD Source: http://www.greenwoodsoftware.com/less/%{name}-%{version}.tar.gz Source1: lesspipe.sh @@ -62,6 +62,9 @@ install -p -m 644 %{SOURCE3} $RPM_BUILD_ROOT/etc/profile.d %{_mandir}/man1/* %changelog +* Wed Jan 29 2020 Fedora Release Engineering - 551-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + * Thu Jul 25 2019 Fedora Release Engineering - 551-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild From 1fa02baeaaae4b63a14e2533f7f7959504f8ca8f Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Tue, 28 Jul 2020 04:04:46 +0000 Subject: [PATCH 39/78] - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- less.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/less.spec b/less.spec index d7274d8..3268051 100644 --- a/less.spec +++ b/less.spec @@ -1,7 +1,7 @@ Summary: A text file browser similar to more, but better Name: less Version: 551 -Release: 3%{?dist} +Release: 4%{?dist} License: GPLv3+ or BSD Source: http://www.greenwoodsoftware.com/less/%{name}-%{version}.tar.gz Source1: lesspipe.sh @@ -62,6 +62,9 @@ install -p -m 644 %{SOURCE3} $RPM_BUILD_ROOT/etc/profile.d %{_mandir}/man1/* %changelog +* Tue Jul 28 2020 Fedora Release Engineering - 551-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + * Wed Jan 29 2020 Fedora Release Engineering - 551-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild From 60cea3f1b6badc1070546051618a5b214aebc2be Mon Sep 17 00:00:00 2001 From: Michal Schorm Date: Tue, 18 Aug 2020 22:24:27 +0000 Subject: [PATCH 40/78] Use %make_build macro --- less.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/less.spec b/less.spec index 3268051..d9c8e8d 100644 --- a/less.spec +++ b/less.spec @@ -45,7 +45,7 @@ files, and you'll use it frequently. rm -f ./configure autoreconf -fiv %configure -make %{?_smp_mflags} CFLAGS="%{optflags} -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64" +%make_build CFLAGS="%{optflags} -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64" %install %make_install From 272509e536116b12c1fcc1135e6c5890ec5f64cc Mon Sep 17 00:00:00 2001 From: Jozef Mlich Date: Thu, 20 Aug 2020 07:59:52 +0200 Subject: [PATCH 41/78] #1 add zstd and brotli support to lesspipe.sh --- less.spec | 5 ++++- lesspipe.sh | 8 +++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/less.spec b/less.spec index d9c8e8d..7f40572 100644 --- a/less.spec +++ b/less.spec @@ -1,7 +1,7 @@ Summary: A text file browser similar to more, but better Name: less Version: 551 -Release: 4%{?dist} +Release: 5%{?dist} License: GPLv3+ or BSD Source: http://www.greenwoodsoftware.com/less/%{name}-%{version}.tar.gz Source1: lesspipe.sh @@ -62,6 +62,9 @@ install -p -m 644 %{SOURCE3} $RPM_BUILD_ROOT/etc/profile.d %{_mandir}/man1/* %changelog +* Thu Aug 20 2020 Andrew Schorr - 551-5 +- Add zstd and brotli support to lesspipe.sh + * Tue Jul 28 2020 Fedora Release Engineering - 551-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild diff --git a/lesspipe.sh b/lesspipe.sh index ddd9480..f2df6a1 100755 --- a/lesspipe.sh +++ b/lesspipe.sh @@ -51,11 +51,13 @@ manfilter () export MAN_KEEP_FORMATTING=1 case "$1" in -*.[1-9n].bz2|*.[1-9]x.bz2|*.man.bz2|*.[1-9n].[glx]z|*.[1-9]x.[glx]z|*.man.[glx]z|*.[1-9n].lzma|*.[1-9]x.lzma|*.man.lzma) +*.[1-9n].bz2|*.[1-9]x.bz2|*.man.bz2|*.[1-9n].[glx]z|*.[1-9]x.[glx]z|*.man.[glx]z|*.[1-9n].lzma|*.[1-9]x.lzma|*.man.lzma|*.[1-9n].zst|*.[1-9]x.zst|*.man.zst|*.[1-9n].br|*.[1-9]x.br|*.man.br) case "$1" in *.gz) DECOMPRESSOR="gzip -dc" ;; *.bz2) DECOMPRESSOR="bzip2 -dc" ;; *.lz) DECOMPRESSOR="lzip -dc" ;; + *.zst) DECOMPRESSOR="zstd -dcq" ;; + *.br) DECOMPRESSOR="brotli -dc" ;; *.xz|*.lzma) DECOMPRESSOR="xz -dc" ;; esac if [ -n "$DECOMPRESSOR" ] && $DECOMPRESSOR -- "$1" | file - | grep -q troff; then @@ -73,6 +75,10 @@ case "$1" in *.xz|*.lzma) xz -dc -- "$1"; exit $? ;; *.tar.lz) tar --lzip -tvvf "$1"; exit $? ;; *.lz) lzip -dc -- "$1"; exit $? ;; +*.tar.zst) tar --zstd -tvvf "$1"; exit $? ;; +*.zst) zstd -dcq -- "$1"; exit $? ;; +*.tar.br) brotli -dc -- "$1" | tar tvvf -; exit $? ;; +*.br) brotli -dc -- "$1"; exit $? ;; *.tar.bz2|*.tbz2) bzip2 -dc -- "$1" | tar tvvf -; exit $? ;; *.[zZ]|*.gz) gzip -dc -- "$1"; exit $? ;; *.bz2) bzip2 -dc -- "$1"; exit $? ;; From b711d2d7fb35eeb252d78f5395f729625069e8e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Mon, 30 Nov 2020 09:42:51 +0100 Subject: [PATCH 42/78] Version 568 --- .gitignore | 1 + less-458-less-filters-man.patch | 10 ++++++---- less.spec | 7 +++++-- sources | 2 +- 4 files changed, 13 insertions(+), 7 deletions(-) diff --git a/.gitignore b/.gitignore index b7b6341..b90505d 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ /less-530.tar.gz /less-550.tar.gz /less-551.tar.gz +/less-568.tar.gz diff --git a/less-458-less-filters-man.patch b/less-458-less-filters-man.patch index a3ee61c..7de4415 100644 --- a/less-458-less-filters-man.patch +++ b/less-458-less-filters-man.patch @@ -1,22 +1,24 @@ diff -up less-466/less.nro.filters-man less-466/less.nro --- less-466/less.nro.filters-man 2014-09-18 14:32:32.124111631 +0200 +++ less-466/less.nro 2014-09-18 14:32:39.548177152 +0200 -@@ -1234,6 +1234,18 @@ Similarly, if the first two characters o +@@ -1323,7 +1323,19 @@ Similarly, if the first two characters of LESSOPEN are vertical bar and dash the input pipe is used on standard input as well as other files. Again, in this case the dash is not considered to be part of the input pipe command. +-. +.PP +There are used following files to set up default preprocessor: +.br -+ /etc/profile.d/less.sh ++ /etc/profile.d/less.sh +.br -+ /etc/profile.d/less.csh ++ /etc/profile.d/less.csh +.br +These files set up /usr/bin/lesspipe.sh as a default filter. An user defined +filter can be specified in ~/.lessfilter. This file should have an execute bit +set and accept only one parameter, which represents a filename. If +the user defined filter process the file, zero should be returned. Otherwise +~/.lessfilter tries to handle the file. - ++ .SH "NATIONAL CHARACTER SETS" There are three types of characters in the input file: + .IP "normal characters" diff --git a/less.spec b/less.spec index 7f40572..fa1a27c 100644 --- a/less.spec +++ b/less.spec @@ -1,7 +1,7 @@ Summary: A text file browser similar to more, but better Name: less -Version: 551 -Release: 5%{?dist} +Version: 568 +Release: 1%{?dist} License: GPLv3+ or BSD Source: http://www.greenwoodsoftware.com/less/%{name}-%{version}.tar.gz Source1: lesspipe.sh @@ -62,6 +62,9 @@ install -p -m 644 %{SOURCE3} $RPM_BUILD_ROOT/etc/profile.d %{_mandir}/man1/* %changelog +* Mon Nov 30 2020 Zbigniew Jędrzejewski-Szmek - 568-1 +- Update to latest version (#1818534) + * Thu Aug 20 2020 Andrew Schorr - 551-5 - Add zstd and brotli support to lesspipe.sh diff --git a/sources b/sources index d5a231c..fc6d8bb 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (less-551.tar.gz) = ef5296b9ebd72f83c05cad8a0f7a5eec2290e9b358ee725e09e8541bd95f94c0e14ea22aa04b287a0654079338eaeae813f2235b8e9f819fbbc9040dd65a9585 +SHA512 (less-568.tar.gz) = 0b2094cf5a8b58037eeb9efc1d456cf8a8b97157b247b3d5295d77dc2430d91fd2b9116787a021cea72d27f8a3c92c82cad114a435d322a4c5314820dcdc99e3 From c12dc379fdd20c40bdd9e87f084417ea75a22d14 Mon Sep 17 00:00:00 2001 From: Tom Stellard Date: Tue, 5 Jan 2021 01:22:07 +0000 Subject: [PATCH 43/78] Add BuildRequires: make https://fedoraproject.org/wiki/Changes/Remove_make_from_BuildRoot --- less.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/less.spec b/less.spec index fa1a27c..cf2bbfa 100644 --- a/less.spec +++ b/less.spec @@ -18,6 +18,7 @@ Patch11: less-458-old-bot-in-help.patch URL: http://www.greenwoodsoftware.com/less/ BuildRequires: ncurses-devel BuildRequires: autoconf automake libtool +BuildRequires: make %description The less utility is a text file browser that resembles more, but has From 2183298a1748f250036dac6f9759946841d04204 Mon Sep 17 00:00:00 2001 From: Robert Scheck Date: Mon, 18 Jan 2021 01:09:06 +0000 Subject: [PATCH 44/78] Update URLs to HTTPS --- less.spec | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/less.spec b/less.spec index cf2bbfa..6a7e922 100644 --- a/less.spec +++ b/less.spec @@ -3,7 +3,7 @@ Name: less Version: 568 Release: 1%{?dist} License: GPLv3+ or BSD -Source: http://www.greenwoodsoftware.com/less/%{name}-%{version}.tar.gz +Source0: https://www.greenwoodsoftware.com/less/%{name}-%{version}.tar.gz Source1: lesspipe.sh Source2: less.sh Source3: less.csh @@ -15,7 +15,7 @@ Patch8: less-458-lessecho-usage.patch Patch9: less-458-less-filters-man.patch Patch10: less-458-lesskey-usage.patch Patch11: less-458-old-bot-in-help.patch -URL: http://www.greenwoodsoftware.com/less/ +URL: https://www.greenwoodsoftware.com/less/ BuildRequires: ncurses-devel BuildRequires: autoconf automake libtool BuildRequires: make @@ -51,7 +51,7 @@ autoreconf -fiv %install %make_install mkdir -p $RPM_BUILD_ROOT/etc/profile.d -install -p %{SOURCE1} $RPM_BUILD_ROOT/%{_bindir} +install -p %{SOURCE1} $RPM_BUILD_ROOT%{_bindir} install -p -m 644 %{SOURCE2} $RPM_BUILD_ROOT/etc/profile.d install -p -m 644 %{SOURCE3} $RPM_BUILD_ROOT/etc/profile.d From f8ee9b5849fa7e1cf20ef62177c7febb68670cd5 Mon Sep 17 00:00:00 2001 From: Stephen Gallagher Date: Fri, 22 Jan 2021 09:53:58 -0500 Subject: [PATCH 45/78] Update to latest version (#1919119) Signed-off-by: Stephen Gallagher --- less-418-fsync.patch | 38 -------------------------- less-475-fsync.patch | 64 ++++++++++++++++++++++++++++++++++++++++++++ less.spec | 7 +++-- 3 files changed, 69 insertions(+), 40 deletions(-) delete mode 100644 less-418-fsync.patch create mode 100644 less-475-fsync.patch diff --git a/less-418-fsync.patch b/less-418-fsync.patch deleted file mode 100644 index 5288fb2..0000000 --- a/less-418-fsync.patch +++ /dev/null @@ -1,38 +0,0 @@ -diff -ur less-418.orig/configure.ac less-418/configure.ac ---- less-418.orig/configure.ac 2008-12-22 07:10:44.000000000 -0500 -+++ less-418/configure.ac 2008-12-22 07:28:58.000000000 -0500 -@@ -203,6 +203,8 @@ - [Define HAVE_TIME_T if your system supports the "time_t" type.]) - AH_TEMPLATE([HAVE_STRERROR], - [Define HAVE_STRERROR if you have the strerror() function.]) -+AH_TEMPLATE([HAVE_FSYNC], -+ [Define HAVE_FSYNC if fsync() on a tty works.]) - AH_TEMPLATE([HAVE_FILENO], - [Define HAVE_FILENO if you have the fileno() macro.]) - AH_TEMPLATE([HAVE_ERRNO], -@@ -251,7 +253,7 @@ - - # Checks for library functions. - AC_TYPE_SIGNAL --AC_CHECK_FUNCS([fsync popen _setjmp sigprocmask sigsetmask snprintf stat system fchmod realpath]) -+AC_CHECK_FUNCS([popen _setjmp sigprocmask sigsetmask snprintf stat system fchmod realpath]) - - # AC_CHECK_FUNCS may not work for inline functions, so test these separately. - AC_MSG_CHECKING(for memcpy) -@@ -298,6 +300,16 @@ - #endif], [static char *x; x = strerror(0);], - [AC_MSG_RESULT(yes); AC_DEFINE(HAVE_STRERROR)], [AC_MSG_RESULT(no)]) - -+AC_MSG_CHECKING(for fsync) -+AC_TRY_RUN([ -+#include -+#include -+int main(void) -+{ -+ int fd = open("/dev/tty", O_RDWR); -+ return fsync(fd); -+}], [AC_MSG_RESULT(yes); AC_DEFINE(HAVE_FSYNC)], [AC_MSG_RESULT(no)]) -+ - AC_MSG_CHECKING(for sys_errlist) - AC_TRY_LINK(, [extern char *sys_errlist[]; static char **x; x = sys_errlist;], - [AC_MSG_RESULT(yes); AC_DEFINE(HAVE_SYS_ERRLIST)], [AC_MSG_RESULT(no)]) diff --git a/less-475-fsync.patch b/less-475-fsync.patch new file mode 100644 index 0000000..61dd45c --- /dev/null +++ b/less-475-fsync.patch @@ -0,0 +1,64 @@ +From 5396b6b77d0248678f716038dc747d6898acb0b3 Mon Sep 17 00:00:00 2001 +From: Stephen Gallagher +Date: Fri, 22 Jan 2021 09:49:13 -0500 +Subject: [PATCH] Test for fsync on tty + +Signed-off-by: Stephen Gallagher +--- + configure.ac | 14 +++++++++++++- + 1 file changed, 13 insertions(+), 1 deletion(-) + +diff --git a/configure.ac b/configure.ac +index 918807967473e01af6c5d78b1737c2d06f96b426..ce478adc1ea2d37c2b22eb46fc2b55d2ba49244e 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -219,10 +219,12 @@ AH_TEMPLATE([HAVE_STAT_INO], + [Define HAVE_STAT_INO if your struct stat has st_ino and st_dev.]) + AH_TEMPLATE([HAVE_TIME_T], + [Define HAVE_TIME_T if your system supports the "time_t" type.]) + AH_TEMPLATE([HAVE_STRERROR], + [Define HAVE_STRERROR if you have the strerror() function.]) ++AH_TEMPLATE([HAVE_FSYNC], ++ [Define HAVE_FSYNC if fsync() on a tty works.]) + AH_TEMPLATE([HAVE_FILENO], + [Define HAVE_FILENO if you have the fileno() macro.]) + AH_TEMPLATE([HAVE_ERRNO], + [Define HAVE_ERRNO if you have the errno variable.]) + AH_TEMPLATE([MUST_DEFINE_ERRNO], +@@ -272,11 +274,11 @@ AC_MSG_CHECKING(for ANSI function prototypes) + AC_TRY_COMPILE([], [int f(int a) { return a; }], + [AC_MSG_RESULT(yes); AC_DEFINE(HAVE_ANSI_PROTOS)], [AC_MSG_RESULT(no)]) + + # Checks for library functions. + AC_TYPE_SIGNAL +-AC_CHECK_FUNCS([fchmod fsync nanosleep poll popen realpath _setjmp sigprocmask sigsetmask snprintf stat system usleep]) ++AC_CHECK_FUNCS([fchmod nanosleep poll popen realpath _setjmp sigprocmask sigsetmask snprintf stat system usleep]) + + # AC_CHECK_FUNCS may not work for inline functions, so test these separately. + AC_MSG_CHECKING(for memcpy) + AC_TRY_LINK([ + #if HAVE_STRING_H +@@ -319,10 +321,20 @@ AC_TRY_LINK([ + #if HAVE_ERRNO_H + #include + #endif], [static char *x; x = strerror(0);], + [AC_MSG_RESULT(yes); AC_DEFINE(HAVE_STRERROR)], [AC_MSG_RESULT(no)]) + ++AC_MSG_CHECKING(for fsync) ++AC_TRY_RUN([ ++#include ++#include ++int main(void) ++{ ++ int fd = open("/dev/tty", O_RDWR); ++ return fsync(fd); ++}], [AC_MSG_RESULT(yes); AC_DEFINE(HAVE_FSYNC)], [AC_MSG_RESULT(no)]) ++ + AC_MSG_CHECKING(for sys_errlist) + AC_TRY_LINK(, [extern char *sys_errlist[]; static char **x; x = sys_errlist;], + [AC_MSG_RESULT(yes); AC_DEFINE(HAVE_SYS_ERRLIST)], [AC_MSG_RESULT(no)]) + + AC_CHECK_TYPES([sigset_t],,,[#include ]) +-- +2.29.2 + diff --git a/less.spec b/less.spec index 6a7e922..5df9b23 100644 --- a/less.spec +++ b/less.spec @@ -1,6 +1,6 @@ Summary: A text file browser similar to more, but better Name: less -Version: 568 +Version: 575 Release: 1%{?dist} License: GPLv3+ or BSD Source0: https://www.greenwoodsoftware.com/less/%{name}-%{version}.tar.gz @@ -8,7 +8,7 @@ Source1: lesspipe.sh Source2: less.sh Source3: less.csh Patch4: less-394-time.patch -Patch5: less-418-fsync.patch +Patch5: less-475-fsync.patch Patch6: less-436-manpage-add-old-bot-option.patch Patch7: less-436-help.patch Patch8: less-458-lessecho-usage.patch @@ -63,6 +63,9 @@ install -p -m 644 %{SOURCE3} $RPM_BUILD_ROOT/etc/profile.d %{_mandir}/man1/* %changelog +* Fri Jan 22 2021 Stephen Gallagher - 575-1 +- Update to latest version (#1919119) + * Mon Nov 30 2020 Zbigniew Jędrzejewski-Szmek - 568-1 - Update to latest version (#1818534) From 03c47f1316ca9c4fffcadeb3103d4e9c98915f9e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Mon, 25 Jan 2021 12:00:37 +0100 Subject: [PATCH 46/78] Upload sources --- .gitignore | 1 + sources | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index b90505d..ac664b5 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ /less-550.tar.gz /less-551.tar.gz /less-568.tar.gz +/less-575.tar.gz diff --git a/sources b/sources index fc6d8bb..ad20490 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (less-568.tar.gz) = 0b2094cf5a8b58037eeb9efc1d456cf8a8b97157b247b3d5295d77dc2430d91fd2b9116787a021cea72d27f8a3c92c82cad114a435d322a4c5314820dcdc99e3 +SHA512 (less-575.tar.gz) = 04f4526a2d5286ade7321f46c9cd1584e44d75ad5275b5623d346930c6f78d933e29edaca6ccf86b5d8422102c830f2ae097a295a914a8da9fd6260f131c78bc From cfe05cef254627485202014d878ba7f5a4f394c2 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Tue, 26 Jan 2021 16:29:55 +0000 Subject: [PATCH 47/78] - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- less.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/less.spec b/less.spec index 5df9b23..2c94b81 100644 --- a/less.spec +++ b/less.spec @@ -1,7 +1,7 @@ Summary: A text file browser similar to more, but better Name: less Version: 575 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv3+ or BSD Source0: https://www.greenwoodsoftware.com/less/%{name}-%{version}.tar.gz Source1: lesspipe.sh @@ -63,6 +63,9 @@ install -p -m 644 %{SOURCE3} $RPM_BUILD_ROOT/etc/profile.d %{_mandir}/man1/* %changelog +* Tue Jan 26 2021 Fedora Release Engineering - 575-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + * Fri Jan 22 2021 Stephen Gallagher - 575-1 - Update to latest version (#1919119) From a99f1f96fdeada621eb871866abbf83437036994 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Filip=20Janu=C5=A1?= Date: Thu, 6 May 2021 11:22:04 +0200 Subject: [PATCH 48/78] Rebase to 581.2 Resolves:#1954859 --- .gitignore | 1 + less-475-fsync.patch | 36 +++++++++--------------------------- less.spec | 4 ++-- sources | 2 +- 4 files changed, 13 insertions(+), 30 deletions(-) diff --git a/.gitignore b/.gitignore index ac664b5..d1563a7 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ /less-551.tar.gz /less-568.tar.gz /less-575.tar.gz +/less-581.2.tar.gz diff --git a/less-475-fsync.patch b/less-475-fsync.patch index 61dd45c..ce81b48 100644 --- a/less-475-fsync.patch +++ b/less-475-fsync.patch @@ -4,17 +4,12 @@ Date: Fri, 22 Jan 2021 09:49:13 -0500 Subject: [PATCH] Test for fsync on tty Signed-off-by: Stephen Gallagher ---- - configure.ac | 14 +++++++++++++- - 1 file changed, 13 insertions(+), 1 deletion(-) -diff --git a/configure.ac b/configure.ac -index 918807967473e01af6c5d78b1737c2d06f96b426..ce478adc1ea2d37c2b22eb46fc2b55d2ba49244e 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -219,10 +219,12 @@ AH_TEMPLATE([HAVE_STAT_INO], - [Define HAVE_STAT_INO if your struct stat has st_ino and st_dev.]) - AH_TEMPLATE([HAVE_TIME_T], +Modified for less 581.2 Filip Januš +diff -ur less-581.2/configure.ac less_fsync/configure.ac +--- less-581.2/configure.ac 2021-04-28 17:00:08.000000000 +0200 ++++ less_fsync/configure.ac 2021-05-06 10:59:07.560062397 +0200 +@@ -221,6 +221,8 @@ [Define HAVE_TIME_T if your system supports the "time_t" type.]) AH_TEMPLATE([HAVE_STRERROR], [Define HAVE_STRERROR if you have the strerror() function.]) @@ -23,24 +18,16 @@ index 918807967473e01af6c5d78b1737c2d06f96b426..ce478adc1ea2d37c2b22eb46fc2b55d2 AH_TEMPLATE([HAVE_FILENO], [Define HAVE_FILENO if you have the fileno() macro.]) AH_TEMPLATE([HAVE_ERRNO], - [Define HAVE_ERRNO if you have the errno variable.]) - AH_TEMPLATE([MUST_DEFINE_ERRNO], -@@ -272,11 +274,11 @@ AC_MSG_CHECKING(for ANSI function prototypes) - AC_TRY_COMPILE([], [int f(int a) { return a; }], - [AC_MSG_RESULT(yes); AC_DEFINE(HAVE_ANSI_PROTOS)], [AC_MSG_RESULT(no)]) +@@ -274,7 +276,7 @@ # Checks for library functions. AC_TYPE_SIGNAL --AC_CHECK_FUNCS([fchmod fsync nanosleep poll popen realpath _setjmp sigprocmask sigsetmask snprintf stat system usleep]) -+AC_CHECK_FUNCS([fchmod nanosleep poll popen realpath _setjmp sigprocmask sigsetmask snprintf stat system usleep]) +-AC_CHECK_FUNCS([fchmod fsync nanosleep poll popen realpath _setjmp sigprocmask sigsetmask snprintf stat system ttyname usleep]) ++AC_CHECK_FUNCS([fchmod nanosleep poll popen realpath _setjmp sigprocmask sigsetmask snprintf stat system ttyname usleep]) # AC_CHECK_FUNCS may not work for inline functions, so test these separately. AC_MSG_CHECKING(for memcpy) - AC_TRY_LINK([ - #if HAVE_STRING_H -@@ -319,10 +321,20 @@ AC_TRY_LINK([ - #if HAVE_ERRNO_H - #include +@@ -321,6 +323,16 @@ #endif], [static char *x; x = strerror(0);], [AC_MSG_RESULT(yes); AC_DEFINE(HAVE_STRERROR)], [AC_MSG_RESULT(no)]) @@ -57,8 +44,3 @@ index 918807967473e01af6c5d78b1737c2d06f96b426..ce478adc1ea2d37c2b22eb46fc2b55d2 AC_MSG_CHECKING(for sys_errlist) AC_TRY_LINK(, [extern char *sys_errlist[]; static char **x; x = sys_errlist;], [AC_MSG_RESULT(yes); AC_DEFINE(HAVE_SYS_ERRLIST)], [AC_MSG_RESULT(no)]) - - AC_CHECK_TYPES([sigset_t],,,[#include ]) --- -2.29.2 - diff --git a/less.spec b/less.spec index 2c94b81..f249a45 100644 --- a/less.spec +++ b/less.spec @@ -1,7 +1,7 @@ Summary: A text file browser similar to more, but better Name: less -Version: 575 -Release: 2%{?dist} +Version: 581.2 +Release: 1%{?dist} License: GPLv3+ or BSD Source0: https://www.greenwoodsoftware.com/less/%{name}-%{version}.tar.gz Source1: lesspipe.sh diff --git a/sources b/sources index ad20490..ce232c7 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (less-575.tar.gz) = 04f4526a2d5286ade7321f46c9cd1584e44d75ad5275b5623d346930c6f78d933e29edaca6ccf86b5d8422102c830f2ae097a295a914a8da9fd6260f131c78bc +SHA512 (less-581.2.tar.gz) = b1189396c798d7cb8655175f31b1af6163dcf8e8d7a72531161cc8396e72e0cf5858ce7b39173be603f9f16eda498f2805cf42c2b92ec6970fd9d2b603fb7b92 From 6e8fa96224f64d3edaa9091933b6b497b7555c70 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Filip=20Janu=C5=A1?= Date: Thu, 6 May 2021 11:29:00 +0200 Subject: [PATCH 49/78] Update changelog --- less.spec | 3 +++ 1 file changed, 3 insertions(+) diff --git a/less.spec b/less.spec index f249a45..eb9da2b 100644 --- a/less.spec +++ b/less.spec @@ -63,6 +63,9 @@ install -p -m 644 %{SOURCE3} $RPM_BUILD_ROOT/etc/profile.d %{_mandir}/man1/* %changelog +* Thu May 6 2021 Filip Januš - 581.2-1 +- Rebase to 581.2-1 + * Tue Jan 26 2021 Fedora Release Engineering - 575-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild From d53d800196a68f787a7459688e986302fc8782ce Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 22 Jul 2021 10:47:30 +0000 Subject: [PATCH 50/78] - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- less.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/less.spec b/less.spec index eb9da2b..db96f65 100644 --- a/less.spec +++ b/less.spec @@ -1,7 +1,7 @@ Summary: A text file browser similar to more, but better Name: less Version: 581.2 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv3+ or BSD Source0: https://www.greenwoodsoftware.com/less/%{name}-%{version}.tar.gz Source1: lesspipe.sh @@ -63,6 +63,9 @@ install -p -m 644 %{SOURCE3} $RPM_BUILD_ROOT/etc/profile.d %{_mandir}/man1/* %changelog +* Thu Jul 22 2021 Fedora Release Engineering - 581.2-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + * Thu May 6 2021 Filip Januš - 581.2-1 - Rebase to 581.2-1 From 1b0fdaa6e0f94b3b736974afefac262befe6c650 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matej=20Mu=C5=BEila?= Date: Tue, 10 Aug 2021 13:11:43 +0200 Subject: [PATCH 51/78] Update to new upstream release --- .gitignore | 1 + less-458-lesskey-usage.patch | 4 ++-- less.spec | 7 +++++-- sources | 2 +- 4 files changed, 9 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index d1563a7..ab1d9fe 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ /less-568.tar.gz /less-575.tar.gz /less-581.2.tar.gz +/less-590.tar.gz diff --git a/less-458-lesskey-usage.patch b/less-458-lesskey-usage.patch index 4015354..1ebf55f 100644 --- a/less-458-lesskey-usage.patch +++ b/less-458-lesskey-usage.patch @@ -2,8 +2,8 @@ diff -upr less-458_orig/lesskey.c less-458_work/lesskey.c --- less-458_orig/lesskey.c 2013-05-07 14:03:52.062104533 +0200 +++ less-458_work/lesskey.c 2013-05-07 11:21:10.881991855 +0200 @@ -217,7 +217,15 @@ extern char version[]; - void - usage(VOID_PARAM) + static void + usage(void) { - fprintf(stderr, "usage: lesskey [-o output] [input]\n"); + fprintf(stderr, "usage: lesskey [-o output] [input]\n\n"); diff --git a/less.spec b/less.spec index db96f65..208b57d 100644 --- a/less.spec +++ b/less.spec @@ -1,7 +1,7 @@ Summary: A text file browser similar to more, but better Name: less -Version: 581.2 -Release: 2%{?dist} +Version: 590 +Release: 1%{?dist} License: GPLv3+ or BSD Source0: https://www.greenwoodsoftware.com/less/%{name}-%{version}.tar.gz Source1: lesspipe.sh @@ -63,6 +63,9 @@ install -p -m 644 %{SOURCE3} $RPM_BUILD_ROOT/etc/profile.d %{_mandir}/man1/* %changelog +* Tue Aug 10 2021 Matej Mužila - 590-1 +- Update to new upstream release + * Thu Jul 22 2021 Fedora Release Engineering - 581.2-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild diff --git a/sources b/sources index ce232c7..39e4ba0 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (less-581.2.tar.gz) = b1189396c798d7cb8655175f31b1af6163dcf8e8d7a72531161cc8396e72e0cf5858ce7b39173be603f9f16eda498f2805cf42c2b92ec6970fd9d2b603fb7b92 +SHA512 (less-590.tar.gz) = 426fa5840fd43c17bd5a452ad35ad24f2d6684623c6914403fd0059af62266bf2138e6828c7d73a1cef26a736c0d2b8ed4ab180eea8297281dae79a4228eb903 From e8839c9645d31e699ab434117cbdde15ab2700cf Mon Sep 17 00:00:00 2001 From: "FeRD (Frank Dana)" Date: Sat, 2 Oct 2021 14:29:52 -0400 Subject: [PATCH 52/78] Apply upstream patch for hyperlink bug --- less-590-hyperlink-bleed.patch | 77 ++++++++++++++++++++++++++++++++++ less.spec | 9 +++- 2 files changed, 85 insertions(+), 1 deletion(-) create mode 100644 less-590-hyperlink-bleed.patch diff --git a/less-590-hyperlink-bleed.patch b/less-590-hyperlink-bleed.patch new file mode 100644 index 0000000..96a6b34 --- /dev/null +++ b/less-590-hyperlink-bleed.patch @@ -0,0 +1,77 @@ +From a99bf3bf475057a2562bf89860c60b0c2a000d4a Mon Sep 17 00:00:00 2001 +From: "FeRD (Frank Dana)" +Date: Fri, 22 Oct 2021 14:22:23 -0400 +Subject: [PATCH] Backport of 089d6651 to less 590 + +--- + line.c | 24 ++++++++++++++++++++---- + 1 file changed, 20 insertions(+), 4 deletions(-) + +diff --git a/line.c b/line.c +index b8f609e..a587f71 100644 +--- a/line.c ++++ b/line.c +@@ -38,6 +38,7 @@ struct xbuffer last_ansi; + + public int size_linebuf = 0; /* Size of line buffer (and attr buffer) */ + static struct ansi_state *line_ansi = NULL; ++static int hlink_in_line; + static int cshift; /* Current left-shift of output line buffer */ + public int hshift; /* Desired left-shift of output line buffer */ + public int tabstops[TABSTOP_MAX] = { 0 }; /* Custom tabstops */ +@@ -221,6 +222,7 @@ prewind(VOID_PARAM) + is_null_line = 0; + pendc = '\0'; + in_hilite = 0; ++ hlink_in_line = 0; + xbuf_reset(&shifted_ansi); + xbuf_reset(&last_ansi); + } +@@ -251,6 +253,19 @@ add_linebuf(ch, attr, w) + inc_end_column(w); + } + ++/* ++ * Append a string to the line buffer. ++ */ ++ static void ++addstr_linebuf(s, attr, cw) ++ char *s; ++ int attr; ++ int cw; ++{ ++ for ( ; *s != '\0'; s++) ++ add_linebuf(*s, attr, cw); ++} ++ + /* + * Set a character in the line prefix buffer. + */ +@@ -958,6 +973,8 @@ store_ansi(ch, rep, pos) + case ANSI_MID: + if (!in_hilite) + STORE_CHAR(ch, AT_ANSI, rep, pos); ++ if (line_ansi->hlink) ++ hlink_in_line = 1; + break; + case ANSI_END: + if (!in_hilite) +@@ -1138,12 +1155,11 @@ pflushmbc(VOID_PARAM) + static void + add_attr_normal(VOID_PARAM) + { +- char *p = "\033[m"; +- + if (ctldisp != OPT_ONPLUS || !is_ansi_end('m')) + return; +- for ( ; *p != '\0'; p++) +- add_linebuf(*p, AT_ANSI, 0); ++ addstr_linebuf("\033[m", AT_ANSI, 0); ++ if (hlink_in_line) /* Don't send hyperlink clear if we know we don't need to. */ ++ addstr_linebuf("\033]8;;\033\\", AT_ANSI, 0); + } + + /* +-- +2.31.1 + diff --git a/less.spec b/less.spec index 208b57d..fa54369 100644 --- a/less.spec +++ b/less.spec @@ -1,7 +1,7 @@ Summary: A text file browser similar to more, but better Name: less Version: 590 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv3+ or BSD Source0: https://www.greenwoodsoftware.com/less/%{name}-%{version}.tar.gz Source1: lesspipe.sh @@ -15,6 +15,9 @@ Patch8: less-458-lessecho-usage.patch Patch9: less-458-less-filters-man.patch Patch10: less-458-lesskey-usage.patch Patch11: less-458-old-bot-in-help.patch +# Backported version of upstream commit d21820c +# https://github.com/gwsw/less/commit/d21820c9d8501b5814d33d4fb8a621c6c563e102 +Patch12: less-590-hyperlink-bleed.patch URL: https://www.greenwoodsoftware.com/less/ BuildRequires: ncurses-devel BuildRequires: autoconf automake libtool @@ -40,6 +43,7 @@ files, and you'll use it frequently. %patch9 -p1 -b .less-filters-man %patch10 -p1 -b .lesskey-usage %patch11 -p1 -b .old-bot +%patch12 -p1 -b .hyperlinks %build @@ -63,6 +67,9 @@ install -p -m 644 %{SOURCE3} $RPM_BUILD_ROOT/etc/profile.d %{_mandir}/man1/* %changelog +* Sat Oct 02 2021 FeRD (Frank Dana) - 590-2 +- Backport patch from upstream to fix hyperlinked text bug + * Tue Aug 10 2021 Matej Mužila - 590-1 - Update to new upstream release From c0064da5688702373ae6eccbaa32ca8c6a2683ce Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 20 Jan 2022 15:34:59 +0000 Subject: [PATCH 53/78] - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- less.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/less.spec b/less.spec index fa54369..f656b7a 100644 --- a/less.spec +++ b/less.spec @@ -1,7 +1,7 @@ Summary: A text file browser similar to more, but better Name: less Version: 590 -Release: 2%{?dist} +Release: 3%{?dist} License: GPLv3+ or BSD Source0: https://www.greenwoodsoftware.com/less/%{name}-%{version}.tar.gz Source1: lesspipe.sh @@ -67,6 +67,9 @@ install -p -m 644 %{SOURCE3} $RPM_BUILD_ROOT/etc/profile.d %{_mandir}/man1/* %changelog +* Thu Jan 20 2022 Fedora Release Engineering - 590-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + * Sat Oct 02 2021 FeRD (Frank Dana) - 590-2 - Backport patch from upstream to fix hyperlinked text bug From c37c43e39ce45a32e6bcb3664e835e1b6763d09b Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 21 Jul 2022 17:07:28 +0000 Subject: [PATCH 54/78] Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- less.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/less.spec b/less.spec index f656b7a..776ccc1 100644 --- a/less.spec +++ b/less.spec @@ -1,7 +1,7 @@ Summary: A text file browser similar to more, but better Name: less Version: 590 -Release: 3%{?dist} +Release: 4%{?dist} License: GPLv3+ or BSD Source0: https://www.greenwoodsoftware.com/less/%{name}-%{version}.tar.gz Source1: lesspipe.sh @@ -67,6 +67,9 @@ install -p -m 644 %{SOURCE3} $RPM_BUILD_ROOT/etc/profile.d %{_mandir}/man1/* %changelog +* Thu Jul 21 2022 Fedora Release Engineering - 590-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + * Thu Jan 20 2022 Fedora Release Engineering - 590-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild From e9205c15848412cdef31c4c191b0f1c2be7c337d Mon Sep 17 00:00:00 2001 From: Daan De Meyer Date: Sun, 17 Jul 2022 23:00:06 +0200 Subject: [PATCH 55/78] Apply upstream patch for memory leak --- less-590-memory-leak.patch | 25 +++++++++++++++++++++++++ less.spec | 9 ++++++++- 2 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 less-590-memory-leak.patch diff --git a/less-590-memory-leak.patch b/less-590-memory-leak.patch new file mode 100644 index 0000000..1de6b34 --- /dev/null +++ b/less-590-memory-leak.patch @@ -0,0 +1,25 @@ +From 31a14b8124e551f9028c5a2785fbbcb5839c491d Mon Sep 17 00:00:00 2001 +From: Mark Nudelman +Date: Fri, 8 Oct 2021 15:25:30 -0700 +Subject: [PATCH] Remove unnecessary memory allocation. + +--- + main.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/main.c b/main.c +index 190ca6c..5934eb9 100644 +--- a/main.c ++++ b/main.c +@@ -140,7 +140,7 @@ main(argc, argv) + + s = lgetenv(less_is_more ? "MORE" : "LESS"); + if (s != NULL) +- scan_option(save(s)); ++ scan_option(s); + + #define isoptstring(s) (((s)[0] == '-' || (s)[0] == '+') && (s)[1] != '\0') + while (argc > 0 && (isoptstring(*argv) || isoptpending())) +-- +2.36.1 + diff --git a/less.spec b/less.spec index 776ccc1..efcb411 100644 --- a/less.spec +++ b/less.spec @@ -1,7 +1,7 @@ Summary: A text file browser similar to more, but better Name: less Version: 590 -Release: 4%{?dist} +Release: 5%{?dist} License: GPLv3+ or BSD Source0: https://www.greenwoodsoftware.com/less/%{name}-%{version}.tar.gz Source1: lesspipe.sh @@ -18,6 +18,9 @@ Patch11: less-458-old-bot-in-help.patch # Backported version of upstream commit d21820c # https://github.com/gwsw/less/commit/d21820c9d8501b5814d33d4fb8a621c6c563e102 Patch12: less-590-hyperlink-bleed.patch +# Backported version of upstream commit 31a14b8 +# https://github.com/gwsw/less/commit/31a14b8124e551f9028c5a2785fbbcb5839c491d +Patch13: less-590-memory-leak.patch URL: https://www.greenwoodsoftware.com/less/ BuildRequires: ncurses-devel BuildRequires: autoconf automake libtool @@ -44,6 +47,7 @@ files, and you'll use it frequently. %patch10 -p1 -b .lesskey-usage %patch11 -p1 -b .old-bot %patch12 -p1 -b .hyperlinks +%patch13 -p1 -b .memory-leak %build @@ -67,6 +71,9 @@ install -p -m 644 %{SOURCE3} $RPM_BUILD_ROOT/etc/profile.d %{_mandir}/man1/* %changelog +* Mon Jul 25 2022 Daan De Meyer - 590-5 +- Backport patch from upstream to fix memory leak + * Thu Jul 21 2022 Fedora Release Engineering - 590-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild From b334dd7640428e9fdd0a92e05bc374ecc82f726e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matej=20Mu=C5=BEila?= Date: Wed, 30 Nov 2022 09:35:31 +0100 Subject: [PATCH 56/78] Update to new upstream release --- .gitignore | 1 + less-436-help.patch | 50 ---------------------- less-590-hyperlink-bleed.patch | 77 ---------------------------------- less-590-memory-leak.patch | 25 ----------- less.spec | 17 +++----- sources | 2 +- 6 files changed, 7 insertions(+), 165 deletions(-) delete mode 100644 less-436-help.patch delete mode 100644 less-590-hyperlink-bleed.patch delete mode 100644 less-590-memory-leak.patch diff --git a/.gitignore b/.gitignore index ab1d9fe..34ad566 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,4 @@ /less-575.tar.gz /less-581.2.tar.gz /less-590.tar.gz +/less-608.tar.gz diff --git a/less-436-help.patch b/less-436-help.patch deleted file mode 100644 index 09821c3..0000000 --- a/less-436-help.patch +++ /dev/null @@ -1,50 +0,0 @@ -diff --git a/help.c b/help.c -index 531aa16..0de6f0f 100644 ---- a/help.c -+++ b/help.c -@@ -119,7 +119,7 @@ constant char helpdata[] = { - ' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ','N','u','m','b','e','r',' ','o','f',' ','b','u','f','f','e','r','s','.','\n', - ' ',' ','-','B',' ',' ','.','.','.','.','.','.','.','.',' ',' ','-','-','a','u','t','o','-','b','u','f','f','e','r','s','\n', - ' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ','D','o','n','\'','t',' ','a','u','t','o','m','a','t','i','c','a','l','l','y',' ','a','l','l','o','c','a','t','e',' ','b','u','f','f','e','r','s',' ','f','o','r',' ','p','i','p','e','s','.','\n', --' ',' ','-','c',' ',' ','.','.','.','.','.','.','.','.',' ',' ','-','-','c','l','e','a','r','-','s','c','r','e','e','n','\n', -+' ',' ','-','c',' ',' ','-','C',' ',' ','.','.','.','.',' ',' ','-','-','c','l','e','a','r','-','s','c','r','e','e','n',' ','-','-','C','L','E','A','R','-','S','C','R','E','E','N','\n', - ' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ','R','e','p','a','i','n','t',' ','b','y',' ','c','l','e','a','r','i','n','g',' ','r','a','t','h','e','r',' ','t','h','a','n',' ','s','c','r','o','l','l','i','n','g','.','\n', - ' ',' ','-','d',' ',' ','.','.','.','.','.','.','.','.',' ',' ','-','-','d','u','m','b','\n', - ' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ','D','u','m','b',' ','t','e','r','m','i','n','a','l','.','\n', -@@ -151,8 +151,10 @@ constant char helpdata[] = { - ' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ','I','g','n','o','r','e',' ','t','h','e',' ','L','E','S','S','O','P','E','N',' ','e','n','v','i','r','o','n','m','e','n','t',' ','v','a','r','i','a','b','l','e','.','\n', - ' ',' ','-','m',' ',' ','-','M',' ',' ','.','.','.','.',' ',' ','-','-','l','o','n','g','-','p','r','o','m','p','t',' ',' ','-','-','L','O','N','G','-','P','R','O','M','P','T','\n', - ' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ','S','e','t',' ','p','r','o','m','p','t',' ','s','t','y','l','e','.','\n', --' ',' ','-','n',' ',' ','-','N',' ',' ','.','.','.','.',' ',' ','-','-','l','i','n','e','-','n','u','m','b','e','r','s',' ',' ','-','-','L','I','N','E','-','N','U','M','B','E','R','S','\n', -+' ',' ','-','n',' ',' ','.','.','.','.','.','.','.','.',' ',' ','-','-','l','i','n','e','-','n','u','m','b','e','r','s','\n', - ' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ','D','o','n','\'','t',' ','u','s','e',' ','l','i','n','e',' ','n','u','m','b','e','r','s','.','\n', -+' ',' ','-','N',' ',' ','.','.','.','.','.','.','.','.',' ',' ','-','-','L','I','N','E','-','N','U','M','B','E','R','S','\n', -+' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ','U','s','e',' ','l','i','n','e',' ','n','u','m','b','e','r','s','.','\n', - ' ',' ','-','o',' ','[','_','\b','f','_','\b','i','_','\b','l','_','\b','e',']',' ',' ','.',' ',' ','-','-','l','o','g','-','f','i','l','e','=','[','_','\b','f','_','\b','i','_','\b','l','_','\b','e',']','\n', - ' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ','C','o','p','y',' ','t','o',' ','l','o','g',' ','f','i','l','e',' ','(','s','t','a','n','d','a','r','d',' ','i','n','p','u','t',' ','o','n','l','y',')','.','\n', - ' ',' ','-','O',' ','[','_','\b','f','_','\b','i','_','\b','l','_','\b','e',']',' ',' ','.',' ',' ','-','-','L','O','G','-','F','I','L','E','=','[','_','\b','f','_','\b','i','_','\b','l','_','\b','e',']','\n', -diff --git a/less.hlp b/less.hlp -index 15ece5a..186e409 100644 ---- a/less.hlp -+++ b/less.hlp -@@ -116,7 +116,7 @@ - Number of buffers. - -B ........ --auto-buffers - Don't automatically allocate buffers for pipes. -- -c ........ --clear-screen -+ -c -C .... --clear-screen --CLEAR-SCREEN - Repaint by clearing rather than scrolling. - -d ........ --dumb - Dumb terminal. -@@ -148,8 +148,10 @@ - Ignore the LESSOPEN environment variable. - -m -M .... --long-prompt --LONG-PROMPT - Set prompt style. -- -n -N .... --line-numbers --LINE-NUMBERS -+ -n ........ --line-numbers - Don't use line numbers. -+ -N ........ --LINE-NUMBERS -+ Use line numbers. - -o [_f_i_l_e] . --log-file=[_f_i_l_e] - Copy to log file (standard input only). - -O [_f_i_l_e] . --LOG-FILE=[_f_i_l_e] diff --git a/less-590-hyperlink-bleed.patch b/less-590-hyperlink-bleed.patch deleted file mode 100644 index 96a6b34..0000000 --- a/less-590-hyperlink-bleed.patch +++ /dev/null @@ -1,77 +0,0 @@ -From a99bf3bf475057a2562bf89860c60b0c2a000d4a Mon Sep 17 00:00:00 2001 -From: "FeRD (Frank Dana)" -Date: Fri, 22 Oct 2021 14:22:23 -0400 -Subject: [PATCH] Backport of 089d6651 to less 590 - ---- - line.c | 24 ++++++++++++++++++++---- - 1 file changed, 20 insertions(+), 4 deletions(-) - -diff --git a/line.c b/line.c -index b8f609e..a587f71 100644 ---- a/line.c -+++ b/line.c -@@ -38,6 +38,7 @@ struct xbuffer last_ansi; - - public int size_linebuf = 0; /* Size of line buffer (and attr buffer) */ - static struct ansi_state *line_ansi = NULL; -+static int hlink_in_line; - static int cshift; /* Current left-shift of output line buffer */ - public int hshift; /* Desired left-shift of output line buffer */ - public int tabstops[TABSTOP_MAX] = { 0 }; /* Custom tabstops */ -@@ -221,6 +222,7 @@ prewind(VOID_PARAM) - is_null_line = 0; - pendc = '\0'; - in_hilite = 0; -+ hlink_in_line = 0; - xbuf_reset(&shifted_ansi); - xbuf_reset(&last_ansi); - } -@@ -251,6 +253,19 @@ add_linebuf(ch, attr, w) - inc_end_column(w); - } - -+/* -+ * Append a string to the line buffer. -+ */ -+ static void -+addstr_linebuf(s, attr, cw) -+ char *s; -+ int attr; -+ int cw; -+{ -+ for ( ; *s != '\0'; s++) -+ add_linebuf(*s, attr, cw); -+} -+ - /* - * Set a character in the line prefix buffer. - */ -@@ -958,6 +973,8 @@ store_ansi(ch, rep, pos) - case ANSI_MID: - if (!in_hilite) - STORE_CHAR(ch, AT_ANSI, rep, pos); -+ if (line_ansi->hlink) -+ hlink_in_line = 1; - break; - case ANSI_END: - if (!in_hilite) -@@ -1138,12 +1155,11 @@ pflushmbc(VOID_PARAM) - static void - add_attr_normal(VOID_PARAM) - { -- char *p = "\033[m"; -- - if (ctldisp != OPT_ONPLUS || !is_ansi_end('m')) - return; -- for ( ; *p != '\0'; p++) -- add_linebuf(*p, AT_ANSI, 0); -+ addstr_linebuf("\033[m", AT_ANSI, 0); -+ if (hlink_in_line) /* Don't send hyperlink clear if we know we don't need to. */ -+ addstr_linebuf("\033]8;;\033\\", AT_ANSI, 0); - } - - /* --- -2.31.1 - diff --git a/less-590-memory-leak.patch b/less-590-memory-leak.patch deleted file mode 100644 index 1de6b34..0000000 --- a/less-590-memory-leak.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 31a14b8124e551f9028c5a2785fbbcb5839c491d Mon Sep 17 00:00:00 2001 -From: Mark Nudelman -Date: Fri, 8 Oct 2021 15:25:30 -0700 -Subject: [PATCH] Remove unnecessary memory allocation. - ---- - main.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/main.c b/main.c -index 190ca6c..5934eb9 100644 ---- a/main.c -+++ b/main.c -@@ -140,7 +140,7 @@ main(argc, argv) - - s = lgetenv(less_is_more ? "MORE" : "LESS"); - if (s != NULL) -- scan_option(save(s)); -+ scan_option(s); - - #define isoptstring(s) (((s)[0] == '-' || (s)[0] == '+') && (s)[1] != '\0') - while (argc > 0 && (isoptstring(*argv) || isoptpending())) --- -2.36.1 - diff --git a/less.spec b/less.spec index efcb411..888668d 100644 --- a/less.spec +++ b/less.spec @@ -1,7 +1,7 @@ Summary: A text file browser similar to more, but better Name: less -Version: 590 -Release: 5%{?dist} +Version: 608 +Release: 1%{?dist} License: GPLv3+ or BSD Source0: https://www.greenwoodsoftware.com/less/%{name}-%{version}.tar.gz Source1: lesspipe.sh @@ -10,17 +10,10 @@ Source3: less.csh Patch4: less-394-time.patch Patch5: less-475-fsync.patch Patch6: less-436-manpage-add-old-bot-option.patch -Patch7: less-436-help.patch Patch8: less-458-lessecho-usage.patch Patch9: less-458-less-filters-man.patch Patch10: less-458-lesskey-usage.patch Patch11: less-458-old-bot-in-help.patch -# Backported version of upstream commit d21820c -# https://github.com/gwsw/less/commit/d21820c9d8501b5814d33d4fb8a621c6c563e102 -Patch12: less-590-hyperlink-bleed.patch -# Backported version of upstream commit 31a14b8 -# https://github.com/gwsw/less/commit/31a14b8124e551f9028c5a2785fbbcb5839c491d -Patch13: less-590-memory-leak.patch URL: https://www.greenwoodsoftware.com/less/ BuildRequires: ncurses-devel BuildRequires: autoconf automake libtool @@ -41,13 +34,10 @@ files, and you'll use it frequently. %patch4 -p1 -b .time %patch5 -p1 -b .fsync %patch6 -p1 -b .manpage-add-old-bot-option -%patch7 -p1 -b .help %patch8 -p1 -b .lessecho-usage %patch9 -p1 -b .less-filters-man %patch10 -p1 -b .lesskey-usage %patch11 -p1 -b .old-bot -%patch12 -p1 -b .hyperlinks -%patch13 -p1 -b .memory-leak %build @@ -71,6 +61,9 @@ install -p -m 644 %{SOURCE3} $RPM_BUILD_ROOT/etc/profile.d %{_mandir}/man1/* %changelog +* Thu Nov 24 2022 Matej Mužila - 608-1 +- Update to new upstream release + * Mon Jul 25 2022 Daan De Meyer - 590-5 - Backport patch from upstream to fix memory leak diff --git a/sources b/sources index 39e4ba0..e602b21 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (less-590.tar.gz) = 426fa5840fd43c17bd5a452ad35ad24f2d6684623c6914403fd0059af62266bf2138e6828c7d73a1cef26a736c0d2b8ed4ab180eea8297281dae79a4228eb903 +SHA512 (less-608.tar.gz) = 7945b7f88921832ebb1b45fba8cbb449ee0133342796b654a52c146dfff3d84db18724ee84e53349eeea6017a0ebe2d8eb5366210275981dde7bb7190118fa66 From c55b1b3d4ec64efb9a9e48442dbfea845cc8747c Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 19 Jan 2023 15:38:13 +0000 Subject: [PATCH 57/78] Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- less.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/less.spec b/less.spec index 888668d..c150b24 100644 --- a/less.spec +++ b/less.spec @@ -1,7 +1,7 @@ Summary: A text file browser similar to more, but better Name: less Version: 608 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv3+ or BSD Source0: https://www.greenwoodsoftware.com/less/%{name}-%{version}.tar.gz Source1: lesspipe.sh @@ -61,6 +61,9 @@ install -p -m 644 %{SOURCE3} $RPM_BUILD_ROOT/etc/profile.d %{_mandir}/man1/* %changelog +* Thu Jan 19 2023 Fedora Release Engineering - 608-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + * Thu Nov 24 2022 Matej Mužila - 608-1 - Update to new upstream release From c5733106535c56bb665467d28ec140b86a26fe68 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matej=20Mu=C5=BEila?= Date: Fri, 5 May 2023 15:56:30 +0200 Subject: [PATCH 58/78] Update to new upstream release Resolves: CVE-2022-46663 --- .gitignore | 1 + less-458-lessecho-usage.patch | 4 ++-- less-458-lesskey-usage.patch | 4 ++-- less-475-fsync.patch | 14 +++++++------- less.spec | 8 ++++++-- sources | 2 +- 6 files changed, 19 insertions(+), 14 deletions(-) diff --git a/.gitignore b/.gitignore index 34ad566..de5c14c 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,4 @@ /less-581.2.tar.gz /less-590.tar.gz /less-608.tar.gz +/less-633.tar.gz diff --git a/less-458-lessecho-usage.patch b/less-458-lessecho-usage.patch index 14a7f37..b16369b 100644 --- a/less-458-lessecho-usage.patch +++ b/less-458-lessecho-usage.patch @@ -2,7 +2,7 @@ diff -upr less-458_orig/lessecho.c less-458_work/lessecho.c --- less-458_orig/lessecho.c 2013-05-07 14:03:52.091104655 +0200 +++ less-458_work/lessecho.c 2013-05-07 11:21:10.883991862 +0200 @@ -41,7 +41,27 @@ static int num_metachars = 0; - pr_usage(VOID_PARAM) + static void pr_usage(void) { fprintf(stderr, - "usage: lessecho [-ox] [-cx] [-pn] [-dn] [-mx] [-nn] [-ex] [-fn] [-a] file ...\n"); @@ -29,5 +29,5 @@ diff -upr less-458_orig/lessecho.c less-458_work/lessecho.c + " -?\t- prints this help\n"); } - static void + static void pr_version(void) diff --git a/less-458-lesskey-usage.patch b/less-458-lesskey-usage.patch index 1ebf55f..e9c5cc3 100644 --- a/less-458-lesskey-usage.patch +++ b/less-458-lesskey-usage.patch @@ -2,8 +2,8 @@ diff -upr less-458_orig/lesskey.c less-458_work/lesskey.c --- less-458_orig/lesskey.c 2013-05-07 14:03:52.062104533 +0200 +++ less-458_work/lesskey.c 2013-05-07 11:21:10.881991855 +0200 @@ -217,7 +217,15 @@ extern char version[]; - static void - usage(void) + + static void usage(void) { - fprintf(stderr, "usage: lesskey [-o output] [input]\n"); + fprintf(stderr, "usage: lesskey [-o output] [input]\n\n"); diff --git a/less-475-fsync.patch b/less-475-fsync.patch index ce81b48..c964b31 100644 --- a/less-475-fsync.patch +++ b/less-475-fsync.patch @@ -19,17 +19,17 @@ diff -ur less-581.2/configure.ac less_fsync/configure.ac [Define HAVE_FILENO if you have the fileno() macro.]) AH_TEMPLATE([HAVE_ERRNO], @@ -274,7 +276,7 @@ + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[int f(int a) { return a; }]])],[AC_MSG_RESULT(yes); AC_DEFINE(HAVE_ANSI_PROTOS)],[AC_MSG_RESULT(no)]) # Checks for library functions. - AC_TYPE_SIGNAL --AC_CHECK_FUNCS([fchmod fsync nanosleep poll popen realpath _setjmp sigprocmask sigsetmask snprintf stat system ttyname usleep]) -+AC_CHECK_FUNCS([fchmod nanosleep poll popen realpath _setjmp sigprocmask sigsetmask snprintf stat system ttyname usleep]) +-AC_CHECK_FUNCS([fchmod fsync nanosleep poll popen realpath _setjmp sigprocmask sigsetmask snprintf stat strsignal system ttyname usleep]) ++AC_CHECK_FUNCS([fchmod nanosleep poll popen realpath _setjmp sigprocmask sigsetmask snprintf stat strsignal system ttyname usleep]) # AC_CHECK_FUNCS may not work for inline functions, so test these separately. AC_MSG_CHECKING(for memcpy) @@ -321,6 +323,16 @@ - #endif], [static char *x; x = strerror(0);], - [AC_MSG_RESULT(yes); AC_DEFINE(HAVE_STRERROR)], [AC_MSG_RESULT(no)]) + #include + #endif]], [[static char *x; x = strerror(0);]])],[AC_MSG_RESULT(yes); AC_DEFINE(HAVE_STRERROR)],[AC_MSG_RESULT(no)]) +AC_MSG_CHECKING(for fsync) +AC_TRY_RUN([ @@ -42,5 +42,5 @@ diff -ur less-581.2/configure.ac less_fsync/configure.ac +}], [AC_MSG_RESULT(yes); AC_DEFINE(HAVE_FSYNC)], [AC_MSG_RESULT(no)]) + AC_MSG_CHECKING(for sys_errlist) - AC_TRY_LINK(, [extern char *sys_errlist[]; static char **x; x = sys_errlist;], - [AC_MSG_RESULT(yes); AC_DEFINE(HAVE_SYS_ERRLIST)], [AC_MSG_RESULT(no)]) + AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[extern char *sys_errlist[]; static char **x; x = sys_errlist;]])],[AC_MSG_RESULT(yes); AC_DEFINE(HAVE_SYS_ERRLIST)],[AC_MSG_RESULT(no)]) + diff --git a/less.spec b/less.spec index c150b24..07797fd 100644 --- a/less.spec +++ b/less.spec @@ -1,7 +1,7 @@ Summary: A text file browser similar to more, but better Name: less -Version: 608 -Release: 2%{?dist} +Version: 633 +Release: 1%{?dist} License: GPLv3+ or BSD Source0: https://www.greenwoodsoftware.com/less/%{name}-%{version}.tar.gz Source1: lesspipe.sh @@ -61,6 +61,10 @@ install -p -m 644 %{SOURCE3} $RPM_BUILD_ROOT/etc/profile.d %{_mandir}/man1/* %changelog +* Fri May 05 2023 Matej Mužila - 633-1 +- Update to new upstream release +- Resolves: CVE-2022-46663 + * Thu Jan 19 2023 Fedora Release Engineering - 608-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild diff --git a/sources b/sources index e602b21..eb34862 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (less-608.tar.gz) = 7945b7f88921832ebb1b45fba8cbb449ee0133342796b654a52c146dfff3d84db18724ee84e53349eeea6017a0ebe2d8eb5366210275981dde7bb7190118fa66 +SHA512 (less-633.tar.gz) = a29aaf72abca07fb29d12f218bbd422a39e3898b3d53e8dbd5265ae47ecf68b88c3381aa3a9bf7caa8db1e2d8e2c138b333f0d69fddd4cf014e39118c53f7fb1 From 0df6b51a25aa6724f7937f07bd8876c77a6b7007 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 20 Jul 2023 10:04:42 +0000 Subject: [PATCH 59/78] Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- less.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/less.spec b/less.spec index 07797fd..f664226 100644 --- a/less.spec +++ b/less.spec @@ -1,7 +1,7 @@ Summary: A text file browser similar to more, but better Name: less Version: 633 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv3+ or BSD Source0: https://www.greenwoodsoftware.com/less/%{name}-%{version}.tar.gz Source1: lesspipe.sh @@ -61,6 +61,9 @@ install -p -m 644 %{SOURCE3} $RPM_BUILD_ROOT/etc/profile.d %{_mandir}/man1/* %changelog +* Thu Jul 20 2023 Fedora Release Engineering - 633-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + * Fri May 05 2023 Matej Mužila - 633-1 - Update to new upstream release - Resolves: CVE-2022-46663 From 3fdb6d6ce7f8a98806faf9243e5d5bbcd885a5af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matej=20Mu=C5=BEila?= Date: Tue, 5 Sep 2023 13:15:40 +0200 Subject: [PATCH 60/78] Update to new upstream release Resolves: #2231663 --- .gitignore | 1 + less.spec | 8 ++++++-- sources | 2 +- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index de5c14c..75b23d7 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,4 @@ /less-590.tar.gz /less-608.tar.gz /less-633.tar.gz +/less-643.tar.gz diff --git a/less.spec b/less.spec index f664226..e54ae5c 100644 --- a/less.spec +++ b/less.spec @@ -1,7 +1,7 @@ Summary: A text file browser similar to more, but better Name: less -Version: 633 -Release: 2%{?dist} +Version: 643 +Release: 1%{?dist} License: GPLv3+ or BSD Source0: https://www.greenwoodsoftware.com/less/%{name}-%{version}.tar.gz Source1: lesspipe.sh @@ -61,6 +61,10 @@ install -p -m 644 %{SOURCE3} $RPM_BUILD_ROOT/etc/profile.d %{_mandir}/man1/* %changelog +* Tue Sep 05 2023 Matej Mužila - 643-1 +- Update to new upstream release +- Resolves: #2231663 + * Thu Jul 20 2023 Fedora Release Engineering - 633-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild diff --git a/sources b/sources index eb34862..28fa119 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (less-633.tar.gz) = a29aaf72abca07fb29d12f218bbd422a39e3898b3d53e8dbd5265ae47ecf68b88c3381aa3a9bf7caa8db1e2d8e2c138b333f0d69fddd4cf014e39118c53f7fb1 +SHA512 (less-643.tar.gz) = 6a324ac54e22429ac652dc303bc1fe48933555d1cbf8ad7ecf345940910c014fef9551a3219743cfb7115e356b5841ae97d6ce62e7a1ba1e3300d243efca34d9 From e48998a8581b0eb43a2e30dd5a4a540565f101d1 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sun, 21 Jan 2024 03:23:36 +0000 Subject: [PATCH 61/78] Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild --- less.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/less.spec b/less.spec index e54ae5c..dba07e6 100644 --- a/less.spec +++ b/less.spec @@ -1,7 +1,7 @@ Summary: A text file browser similar to more, but better Name: less Version: 643 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv3+ or BSD Source0: https://www.greenwoodsoftware.com/less/%{name}-%{version}.tar.gz Source1: lesspipe.sh @@ -61,6 +61,9 @@ install -p -m 644 %{SOURCE3} $RPM_BUILD_ROOT/etc/profile.d %{_mandir}/man1/* %changelog +* Sun Jan 21 2024 Fedora Release Engineering - 643-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + * Tue Sep 05 2023 Matej Mužila - 643-1 - Update to new upstream release - Resolves: #2231663 From a93b01df0c8a72435ba80bf34b54bfcfccc8e019 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 25 Jan 2024 01:21:08 +0000 Subject: [PATCH 62/78] Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild --- less.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/less.spec b/less.spec index dba07e6..a57928c 100644 --- a/less.spec +++ b/less.spec @@ -1,7 +1,7 @@ Summary: A text file browser similar to more, but better Name: less Version: 643 -Release: 2%{?dist} +Release: 3%{?dist} License: GPLv3+ or BSD Source0: https://www.greenwoodsoftware.com/less/%{name}-%{version}.tar.gz Source1: lesspipe.sh @@ -61,6 +61,9 @@ install -p -m 644 %{SOURCE3} $RPM_BUILD_ROOT/etc/profile.d %{_mandir}/man1/* %changelog +* Thu Jan 25 2024 Fedora Release Engineering - 643-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + * Sun Jan 21 2024 Fedora Release Engineering - 643-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild From 49993f9ad0826abbd79272181070978ffb54c52b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matej=20Mu=C5=BEila?= Date: Tue, 6 Feb 2024 13:26:02 +0100 Subject: [PATCH 63/78] migrated to SPDX license --- less.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/less.spec b/less.spec index a57928c..8a564df 100644 --- a/less.spec +++ b/less.spec @@ -1,8 +1,8 @@ Summary: A text file browser similar to more, but better Name: less Version: 643 -Release: 3%{?dist} -License: GPLv3+ or BSD +Release: 4%{?dist} +License: GPL-3.0-only and BSD-2-Clause Source0: https://www.greenwoodsoftware.com/less/%{name}-%{version}.tar.gz Source1: lesspipe.sh Source2: less.sh @@ -61,6 +61,9 @@ install -p -m 644 %{SOURCE3} $RPM_BUILD_ROOT/etc/profile.d %{_mandir}/man1/* %changelog +* Tue Feb 06 2024 Matej Mužila - 643-4 +- migrated to SPDX license + * Thu Jan 25 2024 Fedora Release Engineering - 643-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild From 5a32833f079cb3842b82501dd78c50423aa310c0 Mon Sep 17 00:00:00 2001 From: Software Management Team Date: Thu, 30 May 2024 12:46:47 +0200 Subject: [PATCH 64/78] Eliminate use of obsolete %patchN syntax (#2283636) --- less.spec | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/less.spec b/less.spec index 8a564df..4998430 100644 --- a/less.spec +++ b/less.spec @@ -31,13 +31,13 @@ files, and you'll use it frequently. %prep %setup -q -%patch4 -p1 -b .time -%patch5 -p1 -b .fsync -%patch6 -p1 -b .manpage-add-old-bot-option -%patch8 -p1 -b .lessecho-usage -%patch9 -p1 -b .less-filters-man -%patch10 -p1 -b .lesskey-usage -%patch11 -p1 -b .old-bot +%patch -P4 -p1 -b .time +%patch -P5 -p1 -b .fsync +%patch -P6 -p1 -b .manpage-add-old-bot-option +%patch -P8 -p1 -b .lessecho-usage +%patch -P9 -p1 -b .less-filters-man +%patch -P10 -p1 -b .lesskey-usage +%patch -P11 -p1 -b .old-bot %build From 7ad5b17f792de419b469c3425a518f4003d2958a Mon Sep 17 00:00:00 2001 From: Michal Hlavinka Date: Mon, 15 Jul 2024 23:32:29 +0200 Subject: [PATCH 65/78] do not use bashisms in lesspipe.sh --- lesspipe.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lesspipe.sh b/lesspipe.sh index f2df6a1..71b75c7 100755 --- a/lesspipe.sh +++ b/lesspipe.sh @@ -63,12 +63,16 @@ case "$1" in if [ -n "$DECOMPRESSOR" ] && $DECOMPRESSOR -- "$1" | file - | grep -q troff; then $DECOMPRESSOR -- "$1" | manfilter - exit $? - fi ;;& + fi +esac +case "$1" in *.[1-9n]|*.[1-9]x|*.man) if file "$1" | grep -q troff; then manfilter "$1" exit $? - fi ;;& + fi +esac +case "$1" in *.tar) tar tvvf "$1"; exit $? ;; *.tgz|*.tar.gz|*.tar.[zZ]) tar tzvvf "$1"; exit $? ;; *.tar.xz) tar Jtvvf "$1"; exit $? ;; From b6fa70c48517d9c1a57a140db3103fd009709c93 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 18 Jul 2024 13:07:58 +0000 Subject: [PATCH 66/78] Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild --- less.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/less.spec b/less.spec index 4998430..b0f8b8d 100644 --- a/less.spec +++ b/less.spec @@ -1,7 +1,7 @@ Summary: A text file browser similar to more, but better Name: less Version: 643 -Release: 4%{?dist} +Release: 5%{?dist} License: GPL-3.0-only and BSD-2-Clause Source0: https://www.greenwoodsoftware.com/less/%{name}-%{version}.tar.gz Source1: lesspipe.sh @@ -61,6 +61,9 @@ install -p -m 644 %{SOURCE3} $RPM_BUILD_ROOT/etc/profile.d %{_mandir}/man1/* %changelog +* Thu Jul 18 2024 Fedora Release Engineering - 643-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild + * Tue Feb 06 2024 Matej Mužila - 643-4 - migrated to SPDX license From 06e3b4dae1f44479254e9bcad123e6e60f0ed94c Mon Sep 17 00:00:00 2001 From: Michal Hlavinka Date: Fri, 26 Jul 2024 22:45:46 +0200 Subject: [PATCH 67/78] updated to 661(2294840) --- .gitignore | 1 + less.spec | 7 +++++-- sources | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 75b23d7..d98e5ac 100644 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,4 @@ /less-608.tar.gz /less-633.tar.gz /less-643.tar.gz +/less-661.tar.gz diff --git a/less.spec b/less.spec index b0f8b8d..ac992f7 100644 --- a/less.spec +++ b/less.spec @@ -1,7 +1,7 @@ Summary: A text file browser similar to more, but better Name: less -Version: 643 -Release: 5%{?dist} +Version: 661 +Release: 1%{?dist} License: GPL-3.0-only and BSD-2-Clause Source0: https://www.greenwoodsoftware.com/less/%{name}-%{version}.tar.gz Source1: lesspipe.sh @@ -61,6 +61,9 @@ install -p -m 644 %{SOURCE3} $RPM_BUILD_ROOT/etc/profile.d %{_mandir}/man1/* %changelog +* Fri Jul 26 2024 Michal Hlavinka - 661-1 +- updated to 661(2294840) + * Thu Jul 18 2024 Fedora Release Engineering - 643-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild diff --git a/sources b/sources index 28fa119..b958d5f 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (less-643.tar.gz) = 6a324ac54e22429ac652dc303bc1fe48933555d1cbf8ad7ecf345940910c014fef9551a3219743cfb7115e356b5841ae97d6ce62e7a1ba1e3300d243efca34d9 +SHA512 (less-661.tar.gz) = 49d81ff9e79d43ce0271490e3bffd590b4aed5fcb387bc8eb3128de99e5b5a5ede2e2818b546f6e3a140fa6261f1de3dfba1231f7ff7ef18502bb7030eaea1b5 From 1bd33326d9dc2802401df2acb0ea106249e0a84e Mon Sep 17 00:00:00 2001 From: Michal Hlavinka Date: Mon, 12 Aug 2024 17:27:16 +0200 Subject: [PATCH 68/78] fix post-v590 regression causing reading only part of pipe when stdin is null (upstream#558) --- less-436-help.patch | 24 ++++++++++++++++++++++++ less-661-pipefix.patch | 20 ++++++++++++++++++++ less.spec | 25 +++++++++++++++++-------- 3 files changed, 61 insertions(+), 8 deletions(-) create mode 100644 less-436-help.patch create mode 100644 less-661-pipefix.patch diff --git a/less-436-help.patch b/less-436-help.patch new file mode 100644 index 0000000..d58498b --- /dev/null +++ b/less-436-help.patch @@ -0,0 +1,24 @@ +diff -up less-661/help.c.help less-661/help.c +--- less-661/help.c.help 2024-08-05 21:40:34.531327397 +0200 ++++ less-661/help.c 2024-08-05 21:40:34.533327418 +0200 +@@ -137,7 +137,7 @@ constant char helpdata[] = { + ' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ','N','u','m','b','e','r',' ','o','f',' ','b','u','f','f','e','r','s','.','\n', + ' ',' ','-','B',' ',' ','.','.','.','.','.','.','.','.',' ',' ','-','-','a','u','t','o','-','b','u','f','f','e','r','s','\n', + ' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ','D','o','n','\'','t',' ','a','u','t','o','m','a','t','i','c','a','l','l','y',' ','a','l','l','o','c','a','t','e',' ','b','u','f','f','e','r','s',' ','f','o','r',' ','p','i','p','e','s','.','\n', +-' ',' ','-','c',' ',' ','.','.','.','.','.','.','.','.',' ',' ','-','-','c','l','e','a','r','-','s','c','r','e','e','n','\n', ++' ',' ','-','c',' ',' ','-','C',' ',' ','.','.','.','.',' ',' ','-','-','c','l','e','a','r','-','s','c','r','e','e','n',' ','-','-','C','L','E','A','R','-','S','C','R','E','E','N','\n', + ' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ','R','e','p','a','i','n','t',' ','b','y',' ','c','l','e','a','r','i','n','g',' ','r','a','t','h','e','r',' ','t','h','a','n',' ','s','c','r','o','l','l','i','n','g','.','\n', + ' ',' ','-','d',' ',' ','.','.','.','.','.','.','.','.',' ',' ','-','-','d','u','m','b','\n', + ' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ','D','u','m','b',' ','t','e','r','m','i','n','a','l','.','\n', +diff -up less-661/less.hlp.help less-661/less.hlp +--- less-661/less.hlp.help 2024-08-05 21:40:34.532327408 +0200 ++++ less-661/less.hlp 2024-08-05 21:40:34.533327418 +0200 +@@ -134,7 +134,7 @@ + Number of buffers. + -B ........ --auto-buffers + Don't automatically allocate buffers for pipes. +- -c ........ --clear-screen ++ -c -C .... --clear-screen --CLEAR-SCREEN + Repaint by clearing rather than scrolling. + -d ........ --dumb + Dumb terminal. diff --git a/less-661-pipefix.patch b/less-661-pipefix.patch new file mode 100644 index 0000000..e82d2e1 --- /dev/null +++ b/less-661-pipefix.patch @@ -0,0 +1,20 @@ +diff -up less-661/os.c.pipefix less-661/os.c +--- less-661/os.c.pipefix 2024-06-29 19:16:08.000000000 +0200 ++++ less-661/os.c 2024-08-10 08:06:14.762224766 +0200 +@@ -80,6 +80,7 @@ extern int exit_F_on_close; + extern int follow_mode; + extern int scanning_eof; + extern char intr_char; ++extern int is_tty; + #if !MSDOS_COMPILER + extern int tty; + #endif +@@ -237,7 +238,7 @@ start: + } + #endif + #if USE_POLL +- if (fd != tty && use_poll) ++ if (is_tty && fd != tty && use_poll) + { + int ret = check_poll(fd, tty); + if (ret != 0) diff --git a/less.spec b/less.spec index ac992f7..7e39c87 100644 --- a/less.spec +++ b/less.spec @@ -1,7 +1,7 @@ Summary: A text file browser similar to more, but better Name: less Version: 661 -Release: 1%{?dist} +Release: 2%{?dist} License: GPL-3.0-only and BSD-2-Clause Source0: https://www.greenwoodsoftware.com/less/%{name}-%{version}.tar.gz Source1: lesspipe.sh @@ -14,6 +14,10 @@ Patch8: less-458-lessecho-usage.patch Patch9: less-458-less-filters-man.patch Patch10: less-458-lesskey-usage.patch Patch11: less-458-old-bot-in-help.patch +# from upstream, for <=661, fixes regression in file-types sanity chack post v590 +# https://github.com/gwsw/less/commit/ed454a217da417dc052723ea70da8efde0f2e66c +Patch12: less-661-pipefix.patch +Patch13: less-436-help.patch URL: https://www.greenwoodsoftware.com/less/ BuildRequires: ncurses-devel BuildRequires: autoconf automake libtool @@ -31,13 +35,15 @@ files, and you'll use it frequently. %prep %setup -q -%patch -P4 -p1 -b .time -%patch -P5 -p1 -b .fsync -%patch -P6 -p1 -b .manpage-add-old-bot-option -%patch -P8 -p1 -b .lessecho-usage -%patch -P9 -p1 -b .less-filters-man -%patch -P10 -p1 -b .lesskey-usage -%patch -P11 -p1 -b .old-bot +%patch -P 4 -p1 -b .time +%patch -P 5 -p1 -b .fsync +%patch -P 6 -p1 -b .manpage-add-old-bot-option +%patch -P 8 -p1 -b .lessecho-usage +%patch -P 9 -p1 -b .less-filters-man +%patch -P 10 -p1 -b .lesskey-usage +%patch -P 11 -p1 -b .old-bot +%patch -P 12 -p1 -b .pipefix +%patch -P 13 -p1 -b .help %build @@ -61,6 +67,9 @@ install -p -m 644 %{SOURCE3} $RPM_BUILD_ROOT/etc/profile.d %{_mandir}/man1/* %changelog +* Mon Aug 12 2024 Michal Hlavinka - 661-2 +- fix post-v590 regression causing reading only part of pipe when stdin is null (upstream#558) + * Fri Jul 26 2024 Michal Hlavinka - 661-1 - updated to 661(2294840) From 7d8844fa52297ce6bcdd934e232c1a135bf79d19 Mon Sep 17 00:00:00 2001 From: Michal Hlavinka Date: Fri, 18 Oct 2024 11:19:24 +0200 Subject: [PATCH 69/78] updated to 668 (#2319532) --- .gitignore | 1 + less-661-pipefix.patch | 20 -------------------- less.spec | 11 +++++------ sources | 2 +- 4 files changed, 7 insertions(+), 27 deletions(-) delete mode 100644 less-661-pipefix.patch diff --git a/.gitignore b/.gitignore index d98e5ac..6fe5e3c 100644 --- a/.gitignore +++ b/.gitignore @@ -9,3 +9,4 @@ /less-633.tar.gz /less-643.tar.gz /less-661.tar.gz +/less-668.tar.gz diff --git a/less-661-pipefix.patch b/less-661-pipefix.patch deleted file mode 100644 index e82d2e1..0000000 --- a/less-661-pipefix.patch +++ /dev/null @@ -1,20 +0,0 @@ -diff -up less-661/os.c.pipefix less-661/os.c ---- less-661/os.c.pipefix 2024-06-29 19:16:08.000000000 +0200 -+++ less-661/os.c 2024-08-10 08:06:14.762224766 +0200 -@@ -80,6 +80,7 @@ extern int exit_F_on_close; - extern int follow_mode; - extern int scanning_eof; - extern char intr_char; -+extern int is_tty; - #if !MSDOS_COMPILER - extern int tty; - #endif -@@ -237,7 +238,7 @@ start: - } - #endif - #if USE_POLL -- if (fd != tty && use_poll) -+ if (is_tty && fd != tty && use_poll) - { - int ret = check_poll(fd, tty); - if (ret != 0) diff --git a/less.spec b/less.spec index 7e39c87..561ef67 100644 --- a/less.spec +++ b/less.spec @@ -1,7 +1,7 @@ Summary: A text file browser similar to more, but better Name: less -Version: 661 -Release: 2%{?dist} +Version: 668 +Release: 1%{?dist} License: GPL-3.0-only and BSD-2-Clause Source0: https://www.greenwoodsoftware.com/less/%{name}-%{version}.tar.gz Source1: lesspipe.sh @@ -14,9 +14,6 @@ Patch8: less-458-lessecho-usage.patch Patch9: less-458-less-filters-man.patch Patch10: less-458-lesskey-usage.patch Patch11: less-458-old-bot-in-help.patch -# from upstream, for <=661, fixes regression in file-types sanity chack post v590 -# https://github.com/gwsw/less/commit/ed454a217da417dc052723ea70da8efde0f2e66c -Patch12: less-661-pipefix.patch Patch13: less-436-help.patch URL: https://www.greenwoodsoftware.com/less/ BuildRequires: ncurses-devel @@ -42,7 +39,6 @@ files, and you'll use it frequently. %patch -P 9 -p1 -b .less-filters-man %patch -P 10 -p1 -b .lesskey-usage %patch -P 11 -p1 -b .old-bot -%patch -P 12 -p1 -b .pipefix %patch -P 13 -p1 -b .help @@ -67,6 +63,9 @@ install -p -m 644 %{SOURCE3} $RPM_BUILD_ROOT/etc/profile.d %{_mandir}/man1/* %changelog +* Fri Oct 18 2024 Michal Hlavinka - 668-1 +- updated to 668 (#2319532) + * Mon Aug 12 2024 Michal Hlavinka - 661-2 - fix post-v590 regression causing reading only part of pipe when stdin is null (upstream#558) diff --git a/sources b/sources index b958d5f..55219e6 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (less-661.tar.gz) = 49d81ff9e79d43ce0271490e3bffd590b4aed5fcb387bc8eb3128de99e5b5a5ede2e2818b546f6e3a140fa6261f1de3dfba1231f7ff7ef18502bb7030eaea1b5 +SHA512 (less-668.tar.gz) = 6527741a609849ec27b6ab35de46f2c5c2b2771391e3efe263207bee28915946f44331a42f832a7cb42231a19b135cbadc15ae02cd997b83a13cdfbc7213fc27 From a40e1355e533cc4e56f5be4218e8b98aec8ca31c Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 17 Jan 2025 10:21:57 +0000 Subject: [PATCH 70/78] Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild --- less.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/less.spec b/less.spec index 561ef67..e337f1b 100644 --- a/less.spec +++ b/less.spec @@ -1,7 +1,7 @@ Summary: A text file browser similar to more, but better Name: less Version: 668 -Release: 1%{?dist} +Release: 2%{?dist} License: GPL-3.0-only and BSD-2-Clause Source0: https://www.greenwoodsoftware.com/less/%{name}-%{version}.tar.gz Source1: lesspipe.sh @@ -63,6 +63,9 @@ install -p -m 644 %{SOURCE3} $RPM_BUILD_ROOT/etc/profile.d %{_mandir}/man1/* %changelog +* Fri Jan 17 2025 Fedora Release Engineering - 668-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild + * Fri Oct 18 2024 Michal Hlavinka - 668-1 - updated to 668 (#2319532) From cb1e3aa69899156be7220d76c1833faed673561e Mon Sep 17 00:00:00 2001 From: Michal Hlavinka Date: Thu, 22 May 2025 18:15:58 +0200 Subject: [PATCH 71/78] updated to 678 (#2367012) --- .gitignore | 1 + less-475-fsync.patch | 22 +++++++--------------- less.spec | 9 ++++++--- sources | 2 +- 4 files changed, 15 insertions(+), 19 deletions(-) diff --git a/.gitignore b/.gitignore index 6fe5e3c..7f41a6a 100644 --- a/.gitignore +++ b/.gitignore @@ -10,3 +10,4 @@ /less-643.tar.gz /less-661.tar.gz /less-668.tar.gz +/less-678.tar.gz diff --git a/less-475-fsync.patch b/less-475-fsync.patch index c964b31..7f7a189 100644 --- a/less-475-fsync.patch +++ b/less-475-fsync.patch @@ -1,15 +1,7 @@ -From 5396b6b77d0248678f716038dc747d6898acb0b3 Mon Sep 17 00:00:00 2001 -From: Stephen Gallagher -Date: Fri, 22 Jan 2021 09:49:13 -0500 -Subject: [PATCH] Test for fsync on tty - -Signed-off-by: Stephen Gallagher - -Modified for less 581.2 Filip Januš -diff -ur less-581.2/configure.ac less_fsync/configure.ac ---- less-581.2/configure.ac 2021-04-28 17:00:08.000000000 +0200 -+++ less_fsync/configure.ac 2021-05-06 10:59:07.560062397 +0200 -@@ -221,6 +221,8 @@ +diff -up less-678-build/less-678/configure.ac.fsync less-678-build/less-678/configure.ac +--- less-678-build/less-678/configure.ac.fsync 2025-05-01 22:42:03.000000000 +0200 ++++ less-678-build/less-678/configure.ac 2025-05-22 18:10:23.572796329 +0200 +@@ -210,6 +210,8 @@ AH_TEMPLATE([HAVE_TIME_T], [Define HAVE_TIME_T if your system supports the "time_t" type.]) AH_TEMPLATE([HAVE_STRERROR], [Define HAVE_STRERROR if you have the strerror() function.]) @@ -18,16 +10,16 @@ diff -ur less-581.2/configure.ac less_fsync/configure.ac AH_TEMPLATE([HAVE_FILENO], [Define HAVE_FILENO if you have the fileno() macro.]) AH_TEMPLATE([HAVE_ERRNO], -@@ -274,7 +276,7 @@ +@@ -259,7 +261,7 @@ AC_MSG_CHECKING(for ANSI function protot AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[int f(int a) { return a; }]])],[AC_MSG_RESULT(yes); AC_DEFINE(HAVE_ANSI_PROTOS)],[AC_MSG_RESULT(no)]) # Checks for library functions. -AC_CHECK_FUNCS([fchmod fsync nanosleep poll popen realpath _setjmp sigprocmask sigsetmask snprintf stat strsignal system ttyname usleep]) +AC_CHECK_FUNCS([fchmod nanosleep poll popen realpath _setjmp sigprocmask sigsetmask snprintf stat strsignal system ttyname usleep]) + AC_CHECK_DECL(sigsetjmp, [AC_DEFINE(HAVE_SIGSETJMP)], [], [#include ]) # AC_CHECK_FUNCS may not work for inline functions, so test these separately. - AC_MSG_CHECKING(for memcpy) -@@ -321,6 +323,16 @@ +@@ -302,6 +304,16 @@ AC_LINK_IFELSE([AC_LANG_PROGRAM([[ #include #endif]], [[static char *x; x = strerror(0);]])],[AC_MSG_RESULT(yes); AC_DEFINE(HAVE_STRERROR)],[AC_MSG_RESULT(no)]) diff --git a/less.spec b/less.spec index e337f1b..6fe66f3 100644 --- a/less.spec +++ b/less.spec @@ -1,7 +1,7 @@ Summary: A text file browser similar to more, but better Name: less -Version: 668 -Release: 2%{?dist} +Version: 678 +Release: 1%{?dist} License: GPL-3.0-only and BSD-2-Clause Source0: https://www.greenwoodsoftware.com/less/%{name}-%{version}.tar.gz Source1: lesspipe.sh @@ -33,7 +33,7 @@ files, and you'll use it frequently. %prep %setup -q %patch -P 4 -p1 -b .time -%patch -P 5 -p1 -b .fsync +%patch -P 5 -p2 -b .fsync %patch -P 6 -p1 -b .manpage-add-old-bot-option %patch -P 8 -p1 -b .lessecho-usage %patch -P 9 -p1 -b .less-filters-man @@ -63,6 +63,9 @@ install -p -m 644 %{SOURCE3} $RPM_BUILD_ROOT/etc/profile.d %{_mandir}/man1/* %changelog +* Thu May 22 2025 Michal Hlavinka - 678-1 +- updated to 678 (#2367012) + * Fri Jan 17 2025 Fedora Release Engineering - 668-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild diff --git a/sources b/sources index 55219e6..67d953c 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (less-668.tar.gz) = 6527741a609849ec27b6ab35de46f2c5c2b2771391e3efe263207bee28915946f44331a42f832a7cb42231a19b135cbadc15ae02cd997b83a13cdfbc7213fc27 +SHA512 (less-678.tar.gz) = ad1983229bfb5a30c6139db60012d3a12b613011f044acb4c0ec5c0fc809b8dc9be40255bf420f65d51425152c4cfc943076ccd2ee63b196165d6ab1426ea187 From e17c98717a328cc34e77da0065b9da7b7a14a8c1 Mon Sep 17 00:00:00 2001 From: Michal Hlavinka Date: Mon, 23 Jun 2025 23:54:38 +0200 Subject: [PATCH 72/78] updated to 679 --- .gitignore | 1 + less.spec | 5 ++++- sources | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 7f41a6a..0a5a605 100644 --- a/.gitignore +++ b/.gitignore @@ -11,3 +11,4 @@ /less-661.tar.gz /less-668.tar.gz /less-678.tar.gz +/less-679.tar.gz diff --git a/less.spec b/less.spec index 6fe66f3..1d24c43 100644 --- a/less.spec +++ b/less.spec @@ -1,6 +1,6 @@ Summary: A text file browser similar to more, but better Name: less -Version: 678 +Version: 679 Release: 1%{?dist} License: GPL-3.0-only and BSD-2-Clause Source0: https://www.greenwoodsoftware.com/less/%{name}-%{version}.tar.gz @@ -63,6 +63,9 @@ install -p -m 644 %{SOURCE3} $RPM_BUILD_ROOT/etc/profile.d %{_mandir}/man1/* %changelog +* Mon Jun 23 2025 Michal Hlavinka - 679-1 +- updated to 679 + * Thu May 22 2025 Michal Hlavinka - 678-1 - updated to 678 (#2367012) diff --git a/sources b/sources index 67d953c..a8e25fa 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (less-678.tar.gz) = ad1983229bfb5a30c6139db60012d3a12b613011f044acb4c0ec5c0fc809b8dc9be40255bf420f65d51425152c4cfc943076ccd2ee63b196165d6ab1426ea187 +SHA512 (less-679.tar.gz) = f04e37dc4b2839b416a195e107d21328800e75080054788002c109b3b113a6a898b953391912e7538fb9843ef530b1991efc76dbf6fb5960e5530f3ff83421f6 From bc38a316fce82d8798d83c6b2d54de9a34aae176 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 24 Jul 2025 19:14:12 +0000 Subject: [PATCH 73/78] Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild --- less.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/less.spec b/less.spec index 1d24c43..82c9fc8 100644 --- a/less.spec +++ b/less.spec @@ -1,7 +1,7 @@ Summary: A text file browser similar to more, but better Name: less Version: 679 -Release: 1%{?dist} +Release: 2%{?dist} License: GPL-3.0-only and BSD-2-Clause Source0: https://www.greenwoodsoftware.com/less/%{name}-%{version}.tar.gz Source1: lesspipe.sh @@ -63,6 +63,9 @@ install -p -m 644 %{SOURCE3} $RPM_BUILD_ROOT/etc/profile.d %{_mandir}/man1/* %changelog +* Thu Jul 24 2025 Fedora Release Engineering - 679-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild + * Mon Jun 23 2025 Michal Hlavinka - 679-1 - updated to 679 From ce4a4f56bc68737ba9d954ca027a835bc3cfed96 Mon Sep 17 00:00:00 2001 From: Michal Hlavinka Date: Tue, 2 Sep 2025 11:30:08 +0200 Subject: [PATCH 74/78] add man page for lesspipe.sh (rhbz#2376159) --- less.spec | 7 +++++- lesspipe.sh.1 | 60 +++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 66 insertions(+), 1 deletion(-) create mode 100644 lesspipe.sh.1 diff --git a/less.spec b/less.spec index 82c9fc8..9e50a68 100644 --- a/less.spec +++ b/less.spec @@ -1,12 +1,13 @@ Summary: A text file browser similar to more, but better Name: less Version: 679 -Release: 2%{?dist} +Release: 4%{?dist} License: GPL-3.0-only and BSD-2-Clause Source0: https://www.greenwoodsoftware.com/less/%{name}-%{version}.tar.gz Source1: lesspipe.sh Source2: less.sh Source3: less.csh +Source4: lesspipe.sh.1 Patch4: less-394-time.patch Patch5: less-475-fsync.patch Patch6: less-436-manpage-add-old-bot-option.patch @@ -54,6 +55,7 @@ mkdir -p $RPM_BUILD_ROOT/etc/profile.d install -p %{SOURCE1} $RPM_BUILD_ROOT%{_bindir} install -p -m 644 %{SOURCE2} $RPM_BUILD_ROOT/etc/profile.d install -p -m 644 %{SOURCE3} $RPM_BUILD_ROOT/etc/profile.d +install -p -m 644 %{SOURCE4} $RPM_BUILD_ROOT/%{_mandir}/man1/lesspipe.sh.1 %files %doc README NEWS INSTALL @@ -63,6 +65,9 @@ install -p -m 644 %{SOURCE3} $RPM_BUILD_ROOT/etc/profile.d %{_mandir}/man1/* %changelog +* Tue Sep 02 2025 Michal Hlavinka - 679-4 +- add man page for lesspipe.sh (rhbz#2376159) + * Thu Jul 24 2025 Fedora Release Engineering - 679-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild diff --git a/lesspipe.sh.1 b/lesspipe.sh.1 new file mode 100644 index 0000000..b79e329 --- /dev/null +++ b/lesspipe.sh.1 @@ -0,0 +1,60 @@ +.TH LESSPIPE.SH "1" "August 2025" "lesspipe.sh" "User Commands" +.SH NAME +lesspipe.sh \- a preprocessor for less +.SH SYNOPSIS +.B lesspipe.sh +[\fIFILE\fR] +.SH DESCRIPTION +.PP +The purpose of \fBlesspipe.sh\fP is to enhance the output of \fBless\fP. +.PP +With this preprocessor filter \fBless\fP +will be able to display contents of compressed files. For files +containing archives and directories, a table of contents will be displayed. +These filters can be applied recursively. +.SH FILTER ACTIVATION +For \fBlesspipe.sh\fP to be used by \fBless\fP the environment variable +\fBLESSOPEN\fP must be set properly. For bash like shells the command is: + +.EX +.I LESSOPEN="||lesspipe.sh %s"; export LESSOPEN +.EE + +Use absolute path, if \fBlesspipe.sh\fP is not in the search path. +.PP +Having set the environment variable as described above, \fBless\fP +will then display textual information for a wide range of file formats. +.SH USER DEFINED FILTERING +The \fBlesspipe.sh\fP preprocessing can be replaced or enhanced by a user defined +filter specified in \fB~/.lessfilter\fP This file should have an execute bit +set and accept only one parameter, which represents a filename. If the +user defined filter processes the file, zero should be returned. Otherwise +\fBlesspipe.sh\fP will try to handle the file. +.PP +This can be used not only to add filtering for new formats, but also to block +filtering for certain files types or files. An example ~/.lessfilter + +.RS +.EX +#!/usr/bin/sh + +if [[ "$1" = *.raw ]]; then + # do not process 'raw' files + cat "$1" + exit 0 +elif [[ "$1" = *.txt ]]; then + if [ $(wc -l <"$1") = 1 ]; then + # decorate oneliners with cowsay + cowsay <"$1" + exit 0; + fi +fi +# default, not handled by .lessfilter +exit 1 +.EE +.RE +.SH AUTHOR +Michal Hlavinka +.SH "SEE ALSO" +less(1) + From af51b9c7dd46e13b62400626d4a9e4682aef9bf0 Mon Sep 17 00:00:00 2001 From: Michal Hlavinka Date: Wed, 22 Oct 2025 11:09:28 +0200 Subject: [PATCH 75/78] updated to 685 (#2404089) --- .gitignore | 1 + less-458-less-filters-man.patch | 2 +- less.spec | 7 +++++-- sources | 2 +- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 0a5a605..911cf13 100644 --- a/.gitignore +++ b/.gitignore @@ -12,3 +12,4 @@ /less-668.tar.gz /less-678.tar.gz /less-679.tar.gz +/less-685.tar.gz diff --git a/less-458-less-filters-man.patch b/less-458-less-filters-man.patch index 7de4415..90e7207 100644 --- a/less-458-less-filters-man.patch +++ b/less-458-less-filters-man.patch @@ -20,5 +20,5 @@ diff -up less-466/less.nro.filters-man less-466/less.nro +~/.lessfilter tries to handle the file. + .SH "NATIONAL CHARACTER SETS" - There are three types of characters in the input file: + There are five types of characters in the input file: .IP "normal characters" diff --git a/less.spec b/less.spec index 9e50a68..84d8ba6 100644 --- a/less.spec +++ b/less.spec @@ -1,7 +1,7 @@ Summary: A text file browser similar to more, but better Name: less -Version: 679 -Release: 4%{?dist} +Version: 685 +Release: 1%{?dist} License: GPL-3.0-only and BSD-2-Clause Source0: https://www.greenwoodsoftware.com/less/%{name}-%{version}.tar.gz Source1: lesspipe.sh @@ -65,6 +65,9 @@ install -p -m 644 %{SOURCE4} $RPM_BUILD_ROOT/%{_mandir}/man1/lesspipe.sh.1 %{_mandir}/man1/* %changelog +* Wed Oct 22 2025 Michal Hlavinka - 685-1 +- updated to 685 (#2404089) + * Tue Sep 02 2025 Michal Hlavinka - 679-4 - add man page for lesspipe.sh (rhbz#2376159) diff --git a/sources b/sources index a8e25fa..fd21d4b 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (less-679.tar.gz) = f04e37dc4b2839b416a195e107d21328800e75080054788002c109b3b113a6a898b953391912e7538fb9843ef530b1991efc76dbf6fb5960e5530f3ff83421f6 +SHA512 (less-685.tar.gz) = aff745f1816e0f996fbdbc33ecae0726cf0d842efc227937ff8c32e734c8b5be4c611ffbb27e5e038b4d95280c95ca60c53af1a47cf419cb06e5fab543c231f3 From 7063e7b7725595fb7269d8d477ac246ac4d0453b Mon Sep 17 00:00:00 2001 From: Michal Hlavinka Date: Wed, 12 Nov 2025 12:10:33 +0100 Subject: [PATCH 76/78] use more feature rich lesspipe filter (#2308285) --- .gitignore | 1 + less.spec | 36 +++++++++++++++++++++++++++++++----- sources | 1 + 3 files changed, 33 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index 911cf13..f6cddbb 100644 --- a/.gitignore +++ b/.gitignore @@ -13,3 +13,4 @@ /less-678.tar.gz /less-679.tar.gz /less-685.tar.gz +/lesspipe-2.20.tar.gz diff --git a/less.spec b/less.spec index 84d8ba6..9f92f35 100644 --- a/less.spec +++ b/less.spec @@ -1,10 +1,11 @@ Summary: A text file browser similar to more, but better Name: less Version: 685 -Release: 1%{?dist} +Release: 4%{?dist} License: GPL-3.0-only and BSD-2-Clause Source0: https://www.greenwoodsoftware.com/less/%{name}-%{version}.tar.gz -Source1: lesspipe.sh +%global lesspipe_version 2.20 +Source1: https://github.com/wofr06/lesspipe/archive/refs/tags/v%{lesspipe_version}.tar.gz#/lesspipe-%{lesspipe_version}.tar.gz Source2: less.sh Source3: less.csh Source4: lesspipe.sh.1 @@ -20,6 +21,12 @@ URL: https://www.greenwoodsoftware.com/less/ BuildRequires: ncurses-devel BuildRequires: autoconf automake libtool BuildRequires: make +# for lesspipe make test +BuildRequires: perl-Archive-Tar +# for lesspipe +Recommends: unzip +Recommends: html2text +Recommends: 7zip %description The less utility is a text file browser that resembles more, but has @@ -32,7 +39,7 @@ You should install less because it is a basic utility for viewing text files, and you'll use it frequently. %prep -%setup -q +%setup -q -a 1 %patch -P 4 -p1 -b .time %patch -P 5 -p2 -b .fsync %patch -P 6 -p1 -b .manpage-add-old-bot-option @@ -49,13 +56,29 @@ autoreconf -fiv %configure %make_build CFLAGS="%{optflags} -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64" +pushd lesspipe-%{lesspipe_version} +#fix shebangs +sed -i "s|^#!/usr/bin/env bash|^#!/usr/bin/bash|" lesspipe.sh + +./configure --prefix=%{_prefix} +%make_build +popd + %install %make_install mkdir -p $RPM_BUILD_ROOT/etc/profile.d -install -p %{SOURCE1} $RPM_BUILD_ROOT%{_bindir} install -p -m 644 %{SOURCE2} $RPM_BUILD_ROOT/etc/profile.d install -p -m 644 %{SOURCE3} $RPM_BUILD_ROOT/etc/profile.d -install -p -m 644 %{SOURCE4} $RPM_BUILD_ROOT/%{_mandir}/man1/lesspipe.sh.1 + +pushd lesspipe-%{lesspipe_version} +%make_install +rm -f $RPM_BUILD_ROOT/usr/share/bash-completion/less_completion +popd + +%check +pushd lesspipe-%{lesspipe_version} +make test ||: +popd %files %doc README NEWS INSTALL @@ -65,6 +88,9 @@ install -p -m 644 %{SOURCE4} $RPM_BUILD_ROOT/%{_mandir}/man1/lesspipe.sh.1 %{_mandir}/man1/* %changelog +* Wed Nov 12 2025 Michal Hlavinka - 685-4 +- use more feature rich lesspipe filter (#2308285) + * Wed Oct 22 2025 Michal Hlavinka - 685-1 - updated to 685 (#2404089) diff --git a/sources b/sources index fd21d4b..703a9df 100644 --- a/sources +++ b/sources @@ -1 +1,2 @@ SHA512 (less-685.tar.gz) = aff745f1816e0f996fbdbc33ecae0726cf0d842efc227937ff8c32e734c8b5be4c611ffbb27e5e038b4d95280c95ca60c53af1a47cf419cb06e5fab543c231f3 +SHA512 (lesspipe-2.20.tar.gz) = bfeba1b921959e8cde8ce8bcc75765598cefd2cc705aa5b6417592fdbdb0c43bd3efb0d4379a0514f0da86806988ee95219539974c7af3319595d9b03aac550e From d54f2ef570e0a50af22448705bd006e5d762b015 Mon Sep 17 00:00:00 2001 From: Adam Williamson Date: Fri, 14 Nov 2025 08:21:06 -0800 Subject: [PATCH 77/78] Revert "use more feature rich lesspipe filter (#2308285)" This reverts commit 7063e7b7725595fb7269d8d477ac246ac4d0453b. It causes less to have a hard dependency on perl, which is not at all desirable and breaks all atomic desktop builds. See: https://bugzilla.redhat.com/show_bug.cgi?id=2308285#c3 --- .gitignore | 1 - less.spec | 36 ++++++++---------------------------- sources | 1 - 3 files changed, 8 insertions(+), 30 deletions(-) diff --git a/.gitignore b/.gitignore index f6cddbb..911cf13 100644 --- a/.gitignore +++ b/.gitignore @@ -13,4 +13,3 @@ /less-678.tar.gz /less-679.tar.gz /less-685.tar.gz -/lesspipe-2.20.tar.gz diff --git a/less.spec b/less.spec index 9f92f35..20e127b 100644 --- a/less.spec +++ b/less.spec @@ -1,11 +1,10 @@ Summary: A text file browser similar to more, but better Name: less Version: 685 -Release: 4%{?dist} +Release: 5%{?dist} License: GPL-3.0-only and BSD-2-Clause Source0: https://www.greenwoodsoftware.com/less/%{name}-%{version}.tar.gz -%global lesspipe_version 2.20 -Source1: https://github.com/wofr06/lesspipe/archive/refs/tags/v%{lesspipe_version}.tar.gz#/lesspipe-%{lesspipe_version}.tar.gz +Source1: lesspipe.sh Source2: less.sh Source3: less.csh Source4: lesspipe.sh.1 @@ -21,12 +20,6 @@ URL: https://www.greenwoodsoftware.com/less/ BuildRequires: ncurses-devel BuildRequires: autoconf automake libtool BuildRequires: make -# for lesspipe make test -BuildRequires: perl-Archive-Tar -# for lesspipe -Recommends: unzip -Recommends: html2text -Recommends: 7zip %description The less utility is a text file browser that resembles more, but has @@ -39,7 +32,7 @@ You should install less because it is a basic utility for viewing text files, and you'll use it frequently. %prep -%setup -q -a 1 +%setup -q %patch -P 4 -p1 -b .time %patch -P 5 -p2 -b .fsync %patch -P 6 -p1 -b .manpage-add-old-bot-option @@ -56,29 +49,13 @@ autoreconf -fiv %configure %make_build CFLAGS="%{optflags} -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64" -pushd lesspipe-%{lesspipe_version} -#fix shebangs -sed -i "s|^#!/usr/bin/env bash|^#!/usr/bin/bash|" lesspipe.sh - -./configure --prefix=%{_prefix} -%make_build -popd - %install %make_install mkdir -p $RPM_BUILD_ROOT/etc/profile.d +install -p %{SOURCE1} $RPM_BUILD_ROOT%{_bindir} install -p -m 644 %{SOURCE2} $RPM_BUILD_ROOT/etc/profile.d install -p -m 644 %{SOURCE3} $RPM_BUILD_ROOT/etc/profile.d - -pushd lesspipe-%{lesspipe_version} -%make_install -rm -f $RPM_BUILD_ROOT/usr/share/bash-completion/less_completion -popd - -%check -pushd lesspipe-%{lesspipe_version} -make test ||: -popd +install -p -m 644 %{SOURCE4} $RPM_BUILD_ROOT/%{_mandir}/man1/lesspipe.sh.1 %files %doc README NEWS INSTALL @@ -88,6 +65,9 @@ popd %{_mandir}/man1/* %changelog +* Fri Nov 14 2025 Adam Williamson - 685-5 +- Revert new lesspipe filter due to hard perl dependency + * Wed Nov 12 2025 Michal Hlavinka - 685-4 - use more feature rich lesspipe filter (#2308285) diff --git a/sources b/sources index 703a9df..fd21d4b 100644 --- a/sources +++ b/sources @@ -1,2 +1 @@ SHA512 (less-685.tar.gz) = aff745f1816e0f996fbdbc33ecae0726cf0d842efc227937ff8c32e734c8b5be4c611ffbb27e5e038b4d95280c95ca60c53af1a47cf419cb06e5fab543c231f3 -SHA512 (lesspipe-2.20.tar.gz) = bfeba1b921959e8cde8ce8bcc75765598cefd2cc705aa5b6417592fdbdb0c43bd3efb0d4379a0514f0da86806988ee95219539974c7af3319595d9b03aac550e From e113e6d59a455fef631b97baec4d0a9d6745e273 Mon Sep 17 00:00:00 2001 From: Michal Hlavinka Date: Mon, 24 Nov 2025 21:41:52 +0100 Subject: [PATCH 78/78] reintroduce use more feature rich lesspipe filter, but separate perl dependent colorizer into subpackage, credits Yaakov Selkowitz --- .gitignore | 1 + less.spec | 62 +++++++++++++++++++++--- lesspipe.sh | 132 -------------------------------------------------- lesspipe.sh.1 | 60 ----------------------- sources | 1 + 5 files changed, 57 insertions(+), 199 deletions(-) delete mode 100755 lesspipe.sh delete mode 100644 lesspipe.sh.1 diff --git a/.gitignore b/.gitignore index 911cf13..f6cddbb 100644 --- a/.gitignore +++ b/.gitignore @@ -13,3 +13,4 @@ /less-678.tar.gz /less-679.tar.gz /less-685.tar.gz +/lesspipe-2.20.tar.gz diff --git a/less.spec b/less.spec index 20e127b..51d2494 100644 --- a/less.spec +++ b/less.spec @@ -1,13 +1,13 @@ Summary: A text file browser similar to more, but better Name: less Version: 685 -Release: 5%{?dist} +Release: 6%{?dist} License: GPL-3.0-only and BSD-2-Clause Source0: https://www.greenwoodsoftware.com/less/%{name}-%{version}.tar.gz -Source1: lesspipe.sh +%global lesspipe_version 2.20 +Source1: https://github.com/wofr06/lesspipe/archive/refs/tags/v%{lesspipe_version}.tar.gz#/lesspipe-%{lesspipe_version}.tar.gz Source2: less.sh Source3: less.csh -Source4: lesspipe.sh.1 Patch4: less-394-time.patch Patch5: less-475-fsync.patch Patch6: less-436-manpage-add-old-bot-option.patch @@ -20,6 +20,13 @@ URL: https://www.greenwoodsoftware.com/less/ BuildRequires: ncurses-devel BuildRequires: autoconf automake libtool BuildRequires: make +# for lesspipe make test +BuildRequires: perl-Archive-Tar +# for lesspipe +Recommends: (less-color = %{version}-%{release} if perl-interpreter) +Recommends: unzip +Recommends: html2text +Recommends: 7zip %description The less utility is a text file browser that resembles more, but has @@ -31,8 +38,17 @@ example, vi). You should install less because it is a basic utility for viewing text files, and you'll use it frequently. +%package color +Summary: Colorizers for less +Requires: %{name} = %{version}-%{release} +Conflicts: less < 685-5 + +%description color +Syntax highlighting modes for the less pager. + + %prep -%setup -q +%setup -q -a 1 %patch -P 4 -p1 -b .time %patch -P 5 -p2 -b .fsync %patch -P 6 -p1 -b .manpage-add-old-bot-option @@ -49,22 +65,54 @@ autoreconf -fiv %configure %make_build CFLAGS="%{optflags} -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64" +pushd lesspipe-%{lesspipe_version} +#fix shebangs +sed -i "s|^#!/usr/bin/env bash|^#!/usr/bin/bash|" lesspipe.sh + +./configure --prefix=%{_prefix} +%make_build +popd + %install %make_install mkdir -p $RPM_BUILD_ROOT/etc/profile.d -install -p %{SOURCE1} $RPM_BUILD_ROOT%{_bindir} install -p -m 644 %{SOURCE2} $RPM_BUILD_ROOT/etc/profile.d install -p -m 644 %{SOURCE3} $RPM_BUILD_ROOT/etc/profile.d -install -p -m 644 %{SOURCE4} $RPM_BUILD_ROOT/%{_mandir}/man1/lesspipe.sh.1 + +pushd lesspipe-%{lesspipe_version} +%make_install +rm -f $RPM_BUILD_ROOT/usr/share/bash-completion/less_completion +popd + +%check +pushd lesspipe-%{lesspipe_version} +# we dont have all required components to pass full test, but it is still +# useful to run for debug purposes +make test ||: +popd %files %doc README NEWS INSTALL %license LICENSE COPYING /etc/profile.d/* -%{_bindir}/* +%{_bindir}/less +%{_bindir}/lesscomplete +%{_bindir}/lessecho +%{_bindir}/lesskey +%{_bindir}/lesspipe.sh %{_mandir}/man1/* +%files color +%{_bindir}/archive_color +%{_bindir}/code2color +%{_bindir}/sxw2txt +%{_bindir}/vimcolor + %changelog +* Mon Nov 24 2025 Michal Hlavinka - 685-6 +- reintroduce use more feature rich lesspipe filter, but separate + perl dependent colorizer into subpackage, credits Yaakov Selkowitz + * Fri Nov 14 2025 Adam Williamson - 685-5 - Revert new lesspipe filter due to hard perl dependency diff --git a/lesspipe.sh b/lesspipe.sh deleted file mode 100755 index 71b75c7..0000000 --- a/lesspipe.sh +++ /dev/null @@ -1,132 +0,0 @@ -#!/bin/sh -# -# To use this filter with less, define LESSOPEN: -# export LESSOPEN="|/usr/bin/lesspipe.sh %s" -# -# The script should return zero if the output was valid and non-zero -# otherwise, so less could detect even a valid empty output -# (for example while uncompressing gzipped empty file). -# For backward-compatibility, this is not required by default. To turn -# this functionality there should be another vertical bar (|) straight -# after the first one in the LESSOPEN environment variable: -# export LESSOPEN="||/usr/bin/lesspipe.sh %s" - -if [ ! -e "$1" ] ; then - exit 1 -fi - -if [ -d "$1" ] ; then - ls -alF -- "$1" - exit $? -fi - -exec 2>/dev/null - -# Allow for user defined filters -if [ -x ~/.lessfilter ]; then - ~/.lessfilter "$1" - if [ $? -eq 0 ]; then - exit 0 - fi -fi - -manfilter () -{ - if test -x /usr/bin/man ; then - # See rhbz#1241543 for more info. Well, actually we firstly - # used 'man -l', then we switched to groff, and then we again - # switched back to 'man -l'. - /usr/bin/man -P /usr/bin/cat -l "$1" - elif test -x /usr/bin/groff; then - # This is from pre-rhbz#1241543-time. - groff -Tascii -mandoc "$1" | cat -s - else - echo "WARNING:" - echo "WARNING: to better show manual pages, install 'man-db' package" - echo "WARNING:" - cat "$1" - fi -} - -export MAN_KEEP_FORMATTING=1 - -case "$1" in -*.[1-9n].bz2|*.[1-9]x.bz2|*.man.bz2|*.[1-9n].[glx]z|*.[1-9]x.[glx]z|*.man.[glx]z|*.[1-9n].lzma|*.[1-9]x.lzma|*.man.lzma|*.[1-9n].zst|*.[1-9]x.zst|*.man.zst|*.[1-9n].br|*.[1-9]x.br|*.man.br) - case "$1" in - *.gz) DECOMPRESSOR="gzip -dc" ;; - *.bz2) DECOMPRESSOR="bzip2 -dc" ;; - *.lz) DECOMPRESSOR="lzip -dc" ;; - *.zst) DECOMPRESSOR="zstd -dcq" ;; - *.br) DECOMPRESSOR="brotli -dc" ;; - *.xz|*.lzma) DECOMPRESSOR="xz -dc" ;; - esac - if [ -n "$DECOMPRESSOR" ] && $DECOMPRESSOR -- "$1" | file - | grep -q troff; then - $DECOMPRESSOR -- "$1" | manfilter - - exit $? - fi -esac -case "$1" in -*.[1-9n]|*.[1-9]x|*.man) - if file "$1" | grep -q troff; then - manfilter "$1" - exit $? - fi -esac -case "$1" in -*.tar) tar tvvf "$1"; exit $? ;; -*.tgz|*.tar.gz|*.tar.[zZ]) tar tzvvf "$1"; exit $? ;; -*.tar.xz) tar Jtvvf "$1"; exit $? ;; -*.xz|*.lzma) xz -dc -- "$1"; exit $? ;; -*.tar.lz) tar --lzip -tvvf "$1"; exit $? ;; -*.lz) lzip -dc -- "$1"; exit $? ;; -*.tar.zst) tar --zstd -tvvf "$1"; exit $? ;; -*.zst) zstd -dcq -- "$1"; exit $? ;; -*.tar.br) brotli -dc -- "$1" | tar tvvf -; exit $? ;; -*.br) brotli -dc -- "$1"; exit $? ;; -*.tar.bz2|*.tbz2) bzip2 -dc -- "$1" | tar tvvf -; exit $? ;; -*.[zZ]|*.gz) gzip -dc -- "$1"; exit $? ;; -*.bz2) bzip2 -dc -- "$1"; exit $? ;; -*.zip|*.jar|*.nbm) zipinfo -- "$1"; exit $? ;; -# --nomanifest -> rhbz#1450277 -*.rpm) rpm -qpivl --changelog --nomanifest -- "$1"; exit $? ;; -*.cpi|*.cpio) cpio -itv < "$1"; exit $? ;; -*.gpg) - if [ -x /usr/bin/gpg2 ]; then - gpg2 -d "$1" - exit $? - elif [ -x /usr/bin/gpg ]; then - gpg -d "$1" - exit $? - else - echo "No GnuPG available." - echo "Install gnupg2 or gnupg to show encrypted files." - exit 1 - fi ;; -*.gif|*.jpeg|*.jpg|*.pcd|*.png|*.tga|*.tiff|*.tif) - if [ -x /usr/bin/identify ]; then - identify "$1" - exit $? - elif [ -x /usr/bin/gm ]; then - gm identify "$1" - exit $? - else - echo "No identify available" - echo "Install ImageMagick or GraphicsMagick to browse images" - exit 1 - fi ;; -*) - if [ -x /usr/bin/file ] && [ -x /usr/bin/iconv ] && [ -x /usr/bin/cut ]; then - case `file -b "$1"` in - *UTF-16*) conv='UTF-16' ;; - *UTF-32*) conv='UTF-32' ;; - esac - if [ -n "$conv" ]; then - env=`echo $LANG | cut -d. -f2` - if [ -n "$env" -a "$conv" != "$env" ]; then - iconv -f $conv -t $env "$1" - exit $? - fi - fi - fi - exit 1 -esac diff --git a/lesspipe.sh.1 b/lesspipe.sh.1 deleted file mode 100644 index b79e329..0000000 --- a/lesspipe.sh.1 +++ /dev/null @@ -1,60 +0,0 @@ -.TH LESSPIPE.SH "1" "August 2025" "lesspipe.sh" "User Commands" -.SH NAME -lesspipe.sh \- a preprocessor for less -.SH SYNOPSIS -.B lesspipe.sh -[\fIFILE\fR] -.SH DESCRIPTION -.PP -The purpose of \fBlesspipe.sh\fP is to enhance the output of \fBless\fP. -.PP -With this preprocessor filter \fBless\fP -will be able to display contents of compressed files. For files -containing archives and directories, a table of contents will be displayed. -These filters can be applied recursively. -.SH FILTER ACTIVATION -For \fBlesspipe.sh\fP to be used by \fBless\fP the environment variable -\fBLESSOPEN\fP must be set properly. For bash like shells the command is: - -.EX -.I LESSOPEN="||lesspipe.sh %s"; export LESSOPEN -.EE - -Use absolute path, if \fBlesspipe.sh\fP is not in the search path. -.PP -Having set the environment variable as described above, \fBless\fP -will then display textual information for a wide range of file formats. -.SH USER DEFINED FILTERING -The \fBlesspipe.sh\fP preprocessing can be replaced or enhanced by a user defined -filter specified in \fB~/.lessfilter\fP This file should have an execute bit -set and accept only one parameter, which represents a filename. If the -user defined filter processes the file, zero should be returned. Otherwise -\fBlesspipe.sh\fP will try to handle the file. -.PP -This can be used not only to add filtering for new formats, but also to block -filtering for certain files types or files. An example ~/.lessfilter - -.RS -.EX -#!/usr/bin/sh - -if [[ "$1" = *.raw ]]; then - # do not process 'raw' files - cat "$1" - exit 0 -elif [[ "$1" = *.txt ]]; then - if [ $(wc -l <"$1") = 1 ]; then - # decorate oneliners with cowsay - cowsay <"$1" - exit 0; - fi -fi -# default, not handled by .lessfilter -exit 1 -.EE -.RE -.SH AUTHOR -Michal Hlavinka -.SH "SEE ALSO" -less(1) - diff --git a/sources b/sources index fd21d4b..703a9df 100644 --- a/sources +++ b/sources @@ -1 +1,2 @@ SHA512 (less-685.tar.gz) = aff745f1816e0f996fbdbc33ecae0726cf0d842efc227937ff8c32e734c8b5be4c611ffbb27e5e038b4d95280c95ca60c53af1a47cf419cb06e5fab543c231f3 +SHA512 (lesspipe-2.20.tar.gz) = bfeba1b921959e8cde8ce8bcc75765598cefd2cc705aa5b6417592fdbdb0c43bd3efb0d4379a0514f0da86806988ee95219539974c7af3319595d9b03aac550e