Compare commits

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

76 commits

Author SHA1 Message Date
Michal Hlavinka
e113e6d59a reintroduce use more feature rich lesspipe filter, but separate
perl dependent colorizer into subpackage, credits Yaakov Selkowitz
2025-11-24 21:41:52 +01:00
Adam Williamson
d54f2ef570 Revert "use more feature rich lesspipe filter (#2308285)"
This reverts commit 7063e7b772. 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
2025-11-14 08:22:50 -08:00
Michal Hlavinka
7063e7b772 use more feature rich lesspipe filter (#2308285) 2025-11-12 12:10:33 +01:00
Michal Hlavinka
af51b9c7dd updated to 685 (#2404089) 2025-10-22 11:09:28 +02:00
Michal Hlavinka
ce4a4f56bc add man page for lesspipe.sh (rhbz#2376159) 2025-09-02 11:30:08 +02:00
Fedora Release Engineering
bc38a316fc Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild 2025-07-24 19:14:12 +00:00
Michal Hlavinka
e17c98717a updated to 679 2025-06-23 23:54:38 +02:00
Michal Hlavinka
cb1e3aa698 updated to 678 (#2367012) 2025-05-22 18:15:58 +02:00
Fedora Release Engineering
a40e1355e5 Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild 2025-01-17 10:21:57 +00:00
Michal Hlavinka
7d8844fa52 updated to 668 (#2319532) 2024-10-18 11:19:24 +02:00
Michal Hlavinka
1bd33326d9 fix post-v590 regression causing reading only part of pipe when stdin is null (upstream#558) 2024-08-12 17:27:16 +02:00
Michal Hlavinka
c258b11d3b Merge #12 do not use bashisms in lesspipe.sh 2024-07-26 20:51:24 +00:00
Michal Hlavinka
06e3b4dae1 updated to 661(2294840) 2024-07-26 22:45:46 +02:00
Fedora Release Engineering
b6fa70c485 Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild 2024-07-18 13:07:58 +00:00
Michal Hlavinka
7ad5b17f79 do not use bashisms in lesspipe.sh 2024-07-15 23:32:29 +02:00
Software Management Team
5a32833f07 Eliminate use of obsolete %patchN syntax (#2283636) 2024-05-30 12:46:47 +02:00
Matej Mužila
49993f9ad0 migrated to SPDX license 2024-02-06 13:26:02 +01:00
Fedora Release Engineering
a93b01df0c Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild 2024-01-25 01:21:08 +00:00
Fedora Release Engineering
e48998a858 Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild 2024-01-21 03:23:36 +00:00
Matej Mužila
3fdb6d6ce7 Update to new upstream release
Resolves: #2231663
2023-09-05 13:15:40 +02:00
Fedora Release Engineering
0df6b51a25 Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2023-07-20 10:04:42 +00:00
Matej Mužila
c573310653 Update to new upstream release
Resolves: CVE-2022-46663
2023-05-05 15:56:30 +02:00
Fedora Release Engineering
c55b1b3d4e Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2023-01-19 15:38:13 +00:00
Matej Mužila
b334dd7640 Update to new upstream release 2022-11-30 09:35:31 +01:00
Daan De Meyer
e9205c1584 Apply upstream patch for memory leak 2022-07-25 21:56:59 +02:00
Fedora Release Engineering
c37c43e39c Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2022-07-21 17:07:28 +00:00
Fedora Release Engineering
c0064da568 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2022-01-20 15:34:59 +00:00
FeRD (Frank Dana)
e8839c9645 Apply upstream patch for hyperlink bug 2021-10-22 14:28:34 -04:00
Matej Mužila
1b0fdaa6e0 Update to new upstream release 2021-08-10 13:11:43 +02:00
Fedora Release Engineering
d53d800196 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2021-07-22 10:47:30 +00:00
Filip Januš
6e8fa96224 Update changelog 2021-05-06 11:29:00 +02:00
Filip Januš
a99f1f96fd Rebase to 581.2
Resolves:#1954859
2021-05-06 11:22:04 +02:00
Fedora Release Engineering
cfe05cef25 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2021-01-26 16:29:55 +00:00
Zbigniew Jędrzejewski-Szmek
03c47f1316 Upload sources 2021-01-25 12:00:37 +01:00
Stephen Gallagher
f8ee9b5849
Update to latest version (#1919119)
Signed-off-by: Stephen Gallagher <sgallagh@redhat.com>
2021-01-22 09:53:58 -05:00
Robert Scheck
2183298a17 Update URLs to HTTPS 2021-01-18 01:09:06 +00:00
Tom Stellard
c12dc379fd Add BuildRequires: make
https://fedoraproject.org/wiki/Changes/Remove_make_from_BuildRoot
2021-01-05 01:22:07 +00:00
Zbigniew Jędrzejewski-Szmek
b711d2d7fb Version 568 2020-11-30 09:42:51 +01:00
Jozef Mlich
272509e536 #1 add zstd and brotli support to lesspipe.sh 2020-08-20 07:59:52 +02:00
60cea3f1b6 Use %make_build macro 2020-08-18 22:24:27 +00:00
Fedora Release Engineering
1fa02baeaa - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2020-07-28 04:04:46 +00:00
Fedora Release Engineering
43a9950191 - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2020-01-29 08:22:09 +00:00
Fedora Release Engineering
5bb61822f1 - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2019-07-25 12:36:51 +00:00
Matej Mužila
88a2d30d09 Add new source tarball (forgotten in previous commit) 2019-07-17 13:05:43 +02:00
Matej Mužila
fbf1954bf4 Update to new upstream release
Resolves: #1719419
2019-07-17 12:59:17 +02:00
Matej Mužila
4a46a54bc3 Update to new upstream release
Resolves: #1674080
2019-06-04 15:22:03 +02:00
Fedora Release Engineering
dfb1edb94c - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2019-02-01 06:30:04 +00:00
Igor Gnatenko
115e05d7e4 Remove obsolete Group tag
References: https://fedoraproject.org/wiki/Changes/Remove_Group_Tag
2019-01-28 20:24:11 +01:00
Pavel Raiskup
02d1df97a0 add lzip compression support into lesspipe.sh script
Thanks for the patch to Andrew Schorr.

Version: 530-3
2019-01-09 09:57:26 +01:00
Fedora Release Engineering
92933f680d - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2018-07-13 07:41:28 +00:00
Pavel Raiskup
42417cf532 new upstream stable release
Version: 530-1
2018-02-17 06:21:12 +01:00
Pavel Raiskup
3a269d779c rebase: new (at this time only beta) upstream release
Version: 529-1
2018-02-17 06:16:38 +01:00
Pavel Raiskup
24940f06e5 rebase: new (at this time only beta) upstream release
Version: 527-1
2018-02-17 06:15:53 +01:00
Pavel Raiskup
584367a469 rebase: beta test release
Version: 520-1
2018-02-17 06:14:14 +01:00
Fedora Release Engineering
1d41c18e55 - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2018-02-07 21:00:59 +00:00
Fedora Release Engineering
b1a2bf9089 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild 2017-08-03 01:04:10 +00:00
Fedora Release Engineering
f90e9de914 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild 2017-07-26 18:23:24 +00:00
Pavel Raiskup
f32e1da3d7 lesspipe.sh: read *.rpm text files
Resolves: rhbz#1449790
Version: 487-3
2017-05-16 16:44:03 +02:00
Fedora Release Engineering
8ba41a80f5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild 2017-02-10 18:15:05 +00:00
Jozef Mlich
9f27a92b2f rebase to less 487
Resolves: #1389577
2016-10-28 08:27:05 +02:00
Ville Skyttä
6502b093ba Prefer gpg2 over gpg for *.gpg
Resolves: rhbz#1383284
Version: 481-6
2016-10-11 12:04:13 +02:00
Pavel Raiskup
8e7f15f2e1 LESSOPEN: use '||' syntax again
Related: rhbz#1254837
Version: 481-5
2016-04-25 06:53:44 +02:00
Pavel Raiskup
6dde17a846 requires: don't require man-db
Resolves: rhbz#1278857
Version: 481-4
2016-04-20 09:59:55 +02:00
Pavel Raiskup
32b553bce3 less.csh: avoid unnecessary stat() call
Resolves: #1321591
Version: 481-3
2016-03-29 15:38:13 +02:00
Ville Skyttä
11bfc57bdf less.sh: Avoid unnecessary stat call
While at it, remove unnecessary executable bits (in git) and shebang
from less.*sh.
2016-03-29 08:37:07 +02:00
Dennis Gilmore
3628f016fe - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild 2016-02-04 02:46:08 +00:00
Viktor Jancik
81a5028f51 Update to 481, fixes (#1231493) 2015-10-02 12:57:18 +02:00
Viktor Jancik
00941dc566 Fixed licensing and missing double quotes in profile.d scripts #1257516 #1258808 #1259030 2015-09-02 13:44:57 +02:00
Viktor Jancik
09eadae3be Fixed man page text highlighting 2015-08-22 17:37:14 +02:00
Viktor Jancik
6d7e9d2370 Fixed displaying of nonascii characters #1241543 2015-08-22 02:52:22 +02:00
Viktor Jancik
b539f87ad6 Modification to previous profile.d script changes 2015-08-22 00:45:30 +02:00
Viktor Jancik
3f003aa67c Fixed profile.d less init scripts 2015-08-21 22:16:14 +02:00
Viktor Jancik
396e286dd3 Updated spec file 2015-08-03 15:44:43 +02:00
Jozef Mlich
9820dc236c Update to 479 (#1240456) 2015-07-08 08:40:33 +02:00
Jozef Mlich
9c78a12749 update to 478
http://greenwoodsoftware.com/less/news.478.html
2015-06-24 10:26:21 +02:00
Dennis Gilmore
a24f11f952 - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild 2015-06-17 14:04:23 +00:00
16 changed files with 357 additions and 452 deletions

22
.gitignore vendored
View file

@ -1,6 +1,16 @@
/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-530.tar.gz
/less-550.tar.gz
/less-551.tar.gz
/less-568.tar.gz
/less-575.tar.gz
/less-581.2.tar.gz
/less-590.tar.gz
/less-608.tar.gz
/less-633.tar.gz
/less-643.tar.gz
/less-661.tar.gz
/less-668.tar.gz
/less-678.tar.gz
/less-679.tar.gz
/less-685.tar.gz
/lesspipe-2.20.tar.gz

View file

@ -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)

View file

@ -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])
+AC_CHECK_FUNCS([popen _setjmp sigprocmask sigsetmask snprintf stat system fchmod])
# 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 <fcntl.h>
+#include <unistd.h>
+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)])

View file

@ -1,8 +1,7 @@
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[] = {
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',
@ -11,23 +10,10 @@ index 531aa16..0de6f0f 100644
' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ','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 @@
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.
@ -36,15 +22,3 @@ index 15ece5a..186e409 100644
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]

View file

@ -1,131 +0,0 @@
From 21d56469fd4b4558d640ad82c78f2b9748341c11 Mon Sep 17 00:00:00 2001
From: "Vojtech Vitek (V-Teq)" <vvitek@redhat.com>
Date: Mon, 14 May 2012 17:31:20 +0200
Subject: [PATCH] Fix -F option behavior
Original patch written by Jindrich Novy <jnovy@redhat.com>.
Changes and improvements by Zdenek Prikryl <zprikryl@redhat.com>,
Vojtech Vitek <vvitek@redhat.com> and Colin Guthrie <colin@mageia.org>.
Jozef Mlich <jmlich@redhat.com>
---
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. */

View file

@ -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:
There are five types of characters in the input file:
.IP "normal characters"

View file

@ -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()
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)

View file

@ -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()
static void usage(void)
{
- fprintf(stderr, "usage: lesskey [-o output] [input]\n");
+ fprintf(stderr, "usage: lesskey [-o output] [input]\n\n");

View file

@ -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 */,

View file

@ -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. */

38
less-475-fsync.patch Normal file
View file

@ -0,0 +1,38 @@
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.])
+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],
@@ -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 <setjmp.h>])
# AC_CHECK_FUNCS may not work for inline functions, so test these separately.
@@ -302,6 +304,16 @@ AC_LINK_IFELSE([AC_LANG_PROGRAM([[
#include <errno.h>
#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 <fcntl.h>
+#include <unistd.h>
+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_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)])

15
less.csh Executable file → Normal file
View file

@ -1,4 +1,15 @@
# less initialization script (csh)
if ( -x /usr/bin/lesspipe.sh ) then
setenv LESSOPEN "||/usr/bin/lesspipe.sh %s"
# 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
# The '||' here is intentional, see rhbz#1254837.
setenv LESSOPEN "||/usr/bin/lesspipe.sh %s"
endif
endif

8
less.sh Executable file → Normal file
View file

@ -1,2 +1,8 @@
# less initialization script (sh)
[ -x /usr/bin/lesspipe.sh ] && export LESSOPEN="${LESSOPEN-||/usr/bin/lesspipe.sh %s}"
# All less.*sh files should have the same semantics!
if [ -z "$LESSOPEN" ] && [ -x /usr/bin/lesspipe.sh ]; then
# The '||' here is intentional, see rhbz#1254837.
export LESSOPEN="||/usr/bin/lesspipe.sh %s"
fi

305
less.spec
View file

@ -1,82 +1,301 @@
Summary: A text file browser similar to more, but better
Name: less
Version: 471
Release: 4%{?dist}
License: GPLv3+
Group: Applications/Text
Source: http://www.greenwoodsoftware.com/less/%{name}-%{version}.tar.gz
Source1: lesspipe.sh
Version: 685
Release: 6%{?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
Source2: less.sh
Source3: less.csh
Patch1: less-444-Foption.v2.patch
Patch2: less-394-search.patch
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
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
Patch13: less-436-help.patch
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
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.
%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
%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 -p2 -b .out_of_bounds_read.patch
autoreconf
%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 -a 1
%patch -P 4 -p1 -b .time
%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
%patch -P 10 -p1 -b .lesskey-usage
%patch -P 11 -p1 -b .old-bot
%patch -P 13 -p1 -b .help
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_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
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 -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}
# we dont have all required components to pass full test, but it is still
# useful to run for debug purposes
make test ||:
popd
%files
%defattr(-,root,root,-)
%{!?_licensedir:%global license %%doc}
%license LICENSE
%doc README NEWS INSTALL
%license LICENSE COPYING
/etc/profile.d/*
%{_bindir}/*
%{_bindir}/less
%{_bindir}/lesscomplete
%{_bindir}/lessecho
%{_bindir}/lesskey
%{_bindir}/lesspipe.sh
%{_mandir}/man1/*
%clean
rm -rf $RPM_BUILD_ROOT
%files color
%{_bindir}/archive_color
%{_bindir}/code2color
%{_bindir}/sxw2txt
%{_bindir}/vimcolor
%changelog
* Mon Nov 24 2025 Michal Hlavinka <mhlavink@redhat.com> - 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 <awilliam@redhat.com> - 685-5
- Revert new lesspipe filter due to hard perl dependency
* Wed Nov 12 2025 Michal Hlavinka <mhlavink@redhat.com> - 685-4
- use more feature rich lesspipe filter (#2308285)
* Wed Oct 22 2025 Michal Hlavinka <mhlavink@redhat.com> - 685-1
- updated to 685 (#2404089)
* Tue Sep 02 2025 Michal Hlavinka <mhlavink@redhat.com> - 679-4
- add man page for lesspipe.sh (rhbz#2376159)
* Thu Jul 24 2025 Fedora Release Engineering <releng@fedoraproject.org> - 679-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild
* Mon Jun 23 2025 Michal Hlavinka <mhlavink@redhat.com> - 679-1
- updated to 679
* Thu May 22 2025 Michal Hlavinka <mhlavink@redhat.com> - 678-1
- updated to 678 (#2367012)
* Fri Jan 17 2025 Fedora Release Engineering <releng@fedoraproject.org> - 668-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild
* Fri Oct 18 2024 Michal Hlavinka <mhlavink@redhat.com> - 668-1
- updated to 668 (#2319532)
* Mon Aug 12 2024 Michal Hlavinka <mhlavink@redhat.com> - 661-2
- fix post-v590 regression causing reading only part of pipe when stdin is null (upstream#558)
* Fri Jul 26 2024 Michal Hlavinka <mhlavink@redhat.com> - 661-1
- updated to 661(2294840)
* Thu Jul 18 2024 Fedora Release Engineering <releng@fedoraproject.org> - 643-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild
* Tue Feb 06 2024 Matej Mužila <mmuzila@redhat.com> - 643-4
- migrated to SPDX license
* Thu Jan 25 2024 Fedora Release Engineering <releng@fedoraproject.org> - 643-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Sun Jan 21 2024 Fedora Release Engineering <releng@fedoraproject.org> - 643-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Tue Sep 05 2023 Matej Mužila <mmuzila@redhat.com> - 643-1
- Update to new upstream release
- Resolves: #2231663
* Thu Jul 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 633-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
* Fri May 05 2023 Matej Mužila <mmuzila@redhat.com> - 633-1
- Update to new upstream release
- Resolves: CVE-2022-46663
* Thu Jan 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 608-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
* Thu Nov 24 2022 Matej Mužila <mmuzila@redhat.com> - 608-1
- Update to new upstream release
* Mon Jul 25 2022 Daan De Meyer <daan.j.demeyer@gmail.com> - 590-5
- Backport patch from upstream to fix memory leak
* Thu Jul 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 590-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
* Thu Jan 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 590-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
* Sat Oct 02 2021 FeRD (Frank Dana) <ferdnyc@gmail.com> - 590-2
- Backport patch from upstream to fix hyperlinked text bug
* Tue Aug 10 2021 Matej Mužila <mmuzila@redhat.com> - 590-1
- Update to new upstream release
* Thu Jul 22 2021 Fedora Release Engineering <releng@fedoraproject.org> - 581.2-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
* Thu May 6 2021 Filip Januš <fjanus@redhat.com> - 581.2-1
- Rebase to 581.2-1
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 575-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Fri Jan 22 2021 Stephen Gallagher <sgallagh@redhat.com> - 575-1
- Update to latest version (#1919119)
* Mon Nov 30 2020 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 568-1
- Update to latest version (#1818534)
* Thu Aug 20 2020 Andrew Schorr <ajschorr@fedoraproject.org> - 551-5
- Add zstd and brotli support to lesspipe.sh
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 551-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 551-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 551-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
* Wed Jul 17 2019 Matej Mužila <mmuzila@redhat.com> - 551-1
- Update to new upstream release
- Resolves: #1719419
* Tue Jun 04 2019 Matej Mužila <mmuzila@redhat.com> - 550-1
- Update to new upstream release
- Resolves: #1674080
* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 530-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
* Wed Jan 09 2019 Pavel Raiskup <praiskup@redhat.com> - 530-3
- add lzip compression support into lesspipe.sh (rhbz#1664383)
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 530-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
* Sat Feb 17 2018 Pavel Raiskup <praiskup@redhat.com> - 530-1
- new release, per upstream release notes:
http://greenwoodsoftware.com/less/news.530.html
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 487-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 487-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 487-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
* Tue May 16 2017 Pavel Raiskup <praiskup@redhat.com> - 487-3
- read correctly text files named accidentally '*.rpm' (rhbz#1449790)
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 487-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
* Fri Oct 28 2016 Jozef Mlich <imlich@fit.vutbr.cz> - 487-1
- Resolves: rhbz#1389577
Update to new upstream release
* Tue Oct 11 2016 Ville Skyttä <ville.skytta@iki.fi> - 481-6
- Prefer gpg2 over gpg for *.gpg (rhbz#1383284)
* Mon Apr 25 2016 Pavel Raiskup <praiskup@redhat.com> - 481-5
- again use the correct '||' syntax in LESSOPEN variable (rhbz#1254837)
* Wed Apr 20 2016 Pavel Raiskup <praiskup@redhat.com> - 481-4
- don't strictly require man-db or groff-base (rhbz#1278857)
* Tue Mar 29 2016 Pavel Raiskup <praiskup@redhat.com> - 481-3
- avoid one ubiquitous stat() call in less.sh and less.csh if possible
(rhbz#1321591)
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 481-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
* Fri Oct 2 2015 Viktor Jancik <vjancik@redhat.com> - 481-1
- Update to version 481, fixes #1231493
* Wed Sep 2 2015 Viktor Jancik <vjancik@redhat.com> - 479-3
- Added missing double quotes in profile.d scripts
- Corrected license information
* Mon Aug 24 2015 Viktor Jancik <vjancik@redhat.com> - 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 <release-monitoring@fedoraproject.org> - 479-1
- Update to 479 (#1240456)
* Wed Jun 24 2015 Jozef Mlich <jmlich@redhat.com> - 478-1
- update to 478
http://greenwoodsoftware.com/less/news.478.html
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 471-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
* Mon Jun 01 2015 Jozef Mlich <jmlich@redhat.com> - 471-4
- update of previous patch

View file

@ -1,87 +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
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
*.gz) DECOMPRESSOR="gzip -dc" ;;
*.bz2) DECOMPRESSOR="bzip2 -dc" ;;
*.xz|*.lzma) DECOMPRESSOR="xz -dc" ;;
esac
if [ -n "$DECOMPRESSOR" ] && $DECOMPRESSOR -- "$1" | file - | grep -q troff; then
$DECOMPRESSOR -- "$1" | groff -Tascii -mandoc -
exit $?
fi ;;&
*.[1-9n]|*.[1-9]x|*.man)
if file "$1" | grep -q troff; then
groff -Tascii -mandoc "$1" | cat -s
exit $?
fi ;;&
*.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.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 $? ;;
*.rpm) rpm -qpivl --changelog -- "$1"; exit $? ;;
*.cpi|*.cpio) cpio -itv < "$1"; exit $? ;;
*.gpg) gpg -d "$1"; exit $? ;;
*.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

View file

@ -1 +1,2 @@
9a40d29a2d84b41f9f36d7dd90b4f950 less-471.tar.gz
SHA512 (less-685.tar.gz) = aff745f1816e0f996fbdbc33ecae0726cf0d842efc227937ff8c32e734c8b5be4c611ffbb27e5e038b4d95280c95ca60c53af1a47cf419cb06e5fab543c231f3
SHA512 (lesspipe-2.20.tar.gz) = bfeba1b921959e8cde8ce8bcc75765598cefd2cc705aa5b6417592fdbdb0c43bd3efb0d4379a0514f0da86806988ee95219539974c7af3319595d9b03aac550e