Compare commits
34 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
5bb61822f1 | ||
|
88a2d30d09 | ||
|
fbf1954bf4 | ||
|
4a46a54bc3 | ||
|
dfb1edb94c | ||
|
115e05d7e4 | ||
|
02d1df97a0 | ||
|
92933f680d | ||
|
42417cf532 | ||
|
3a269d779c | ||
|
24940f06e5 | ||
|
584367a469 | ||
|
1d41c18e55 | ||
|
b1a2bf9089 | ||
|
f90e9de914 | ||
|
f32e1da3d7 | ||
|
8ba41a80f5 | ||
|
9f27a92b2f | ||
|
6502b093ba | ||
|
8e7f15f2e1 | ||
|
6dde17a846 | ||
|
32b553bce3 | ||
|
11bfc57bdf | ||
|
3628f016fe | ||
|
81a5028f51 | ||
|
00941dc566 | ||
|
09eadae3be | ||
|
6d7e9d2370 | ||
|
b539f87ad6 | ||
|
3f003aa67c | ||
|
396e286dd3 | ||
|
9820dc236c | ||
|
9c78a12749 | ||
|
a24f11f952 |
9
.gitignore
vendored
9
.gitignore
vendored
@ -1,6 +1,3 @@
|
||||
/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
|
||||
|
@ -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)
|
@ -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)
|
||||
|
@ -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. */
|
@ -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");
|
||||
|
@ -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");
|
||||
|
@ -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 */,
|
@ -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. */
|
15
less.csh
Executable file → Normal file
15
less.csh
Executable file → Normal 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
8
less.sh
Executable file → Normal 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
|
||||
|
123
less.spec
123
less.spec
@ -1,15 +1,12 @@
|
||||
Summary: A text file browser similar to more, but better
|
||||
Name: less
|
||||
Version: 471
|
||||
Release: 4%{?dist}
|
||||
License: GPLv3+
|
||||
Group: Applications/Text
|
||||
Version: 551
|
||||
Release: 2%{?dist}
|
||||
License: GPLv3+ or BSD
|
||||
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
|
||||
Patch2: less-394-search.patch
|
||||
Patch4: less-394-time.patch
|
||||
Patch5: less-418-fsync.patch
|
||||
Patch6: less-436-manpage-add-old-bot-option.patch
|
||||
@ -18,9 +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
|
||||
Patch12: less-471-out_of_bounds_read.patch
|
||||
URL: http://www.greenwoodsoftware.com/less/
|
||||
Requires: groff-base
|
||||
BuildRequires: ncurses-devel
|
||||
BuildRequires: autoconf automake libtool
|
||||
|
||||
@ -29,15 +24,13 @@ 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
|
||||
@ -46,37 +39,111 @@ 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
|
||||
|
||||
%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}
|
||||
%license LICENSE
|
||||
%doc README NEWS INSTALL
|
||||
%license LICENSE COPYING
|
||||
/etc/profile.d/*
|
||||
%{_bindir}/*
|
||||
%{_mandir}/man1/*
|
||||
|
||||
%clean
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
|
||||
%changelog
|
||||
* 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
|
||||
|
||||
|
45
lesspipe.sh
45
lesspipe.sh
@ -30,33 +30,68 @@ 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
|
||||
*.[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
|
||||
$DECOMPRESSOR -- "$1" | groff -Tascii -mandoc -
|
||||
$DECOMPRESSOR -- "$1" | manfilter -
|
||||
exit $?
|
||||
fi ;;&
|
||||
*.[1-9n]|*.[1-9]x|*.man)
|
||||
if file "$1" | grep -q troff; then
|
||||
groff -Tascii -mandoc "$1" | cat -s
|
||||
manfilter "$1"
|
||||
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.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 $? ;;
|
||||
*.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) 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"
|
||||
|
Loading…
Reference in New Issue
Block a user