From 5964d13d8998f1e59222b61693026484228fb319 Mon Sep 17 00:00:00 2001 From: Viktor Jancik Date: Mon, 3 Aug 2015 15:44:43 +0200 Subject: [PATCH 1/4] 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 12956e7bcd23072fa08a0caf67458b8401a1eae7 Mon Sep 17 00:00:00 2001 From: Viktor Jancik Date: Wed, 2 Sep 2015 14:50:36 +0200 Subject: [PATCH 2/4] Fixed licensing and displaying of nonascii characters #1257516 #1241543 --- less.csh | 7 ++++++- less.sh | 4 +++- less.spec | 7 +++++-- lesspipe.sh | 6 ++++-- 4 files changed, 18 insertions(+), 6 deletions(-) diff --git a/less.csh b/less.csh index ba2b82b..13e4f3a 100755 --- a/less.csh +++ b/less.csh @@ -1,4 +1,9 @@ +#!/bin/csh # 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 + : + else + setenv LESSOPEN "|/usr/bin/lesspipe.sh %s" + endif endif diff --git a/less.sh b/less.sh index 14f6fde..9a6d64e 100755 --- a/less.sh +++ b/less.sh @@ -1,2 +1,4 @@ # less initialization script (sh) -[ -x /usr/bin/lesspipe.sh ] && export LESSOPEN="${LESSOPEN-||/usr/bin/lesspipe.sh %s}" +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 413f090..dd7a025 100644 --- a/less.spec +++ b/less.spec @@ -21,6 +21,7 @@ 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 +Requires: man-db BuildRequires: ncurses-devel BuildRequires: autoconf automake libtool @@ -62,8 +63,8 @@ install -p -m 644 %{SOURCE2} $RPM_BUILD_ROOT/etc/profile.d install -p -m 644 %{SOURCE3} $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/* @@ -72,6 +73,8 @@ install -p -m 644 %{SOURCE3} $RPM_BUILD_ROOT/etc/profile.d * Mon Aug 03 2015 Viktor Jancik - 471-5 - Updated spec file to comply with current Fedora Packaging Guidelines Added missing documentation files +- Corrected license information #1257516 +- Fixed preprocessing of man pages with special characters #1241543 * Mon Jun 01 2015 Jozef Mlich - 471-4 - update of previous patch diff --git a/lesspipe.sh b/lesspipe.sh index a2c319a..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 @@ -38,12 +40,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 eee427a11d6d57249c0ea70931ea2190ceb1ec55 Mon Sep 17 00:00:00 2001 From: Viktor Jancik Date: Fri, 2 Oct 2015 13:51:31 +0200 Subject: [PATCH 3/4] Update to 481, fixes (#1231493) --- .gitignore | 3 +++ less-394-search.patch | 32 ---------------------------- less-458-outdated-unicode-data.patch | 12 ----------- less.spec | 15 +++++++------ sources | 2 +- 5 files changed, 12 insertions(+), 52 deletions(-) delete mode 100644 less-394-search.patch delete mode 100644 less-458-outdated-unicode-data.patch diff --git a/.gitignore b/.gitignore index d2f3de1..563e44e 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,6 @@ /less-451.tar.gz /less-458.tar.gz /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 dd7a025..c219d66 100644 --- a/less.spec +++ b/less.spec @@ -1,15 +1,14 @@ Summary: A text file browser similar to more, but better Name: less -Version: 471 -Release: 5%{?dist} -License: GPLv3+ +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 -Patch1: less-444-Foption.v2.patch -Patch2: less-394-search.patch +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 @@ -38,7 +37,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 @@ -70,7 +68,10 @@ install -p -m 644 %{SOURCE3} $RPM_BUILD_ROOT/etc/profile.d %{_mandir}/man1/* %changelog -* Mon Aug 03 2015 Viktor Jancik - 471-5 +* Fri Oct 02 2015 Viktor Jancik - 481-1 +- Update to version 481, fixes #1231493 + +* Wed Sep 02 2015 Viktor Jancik - 471-5 - Updated spec file to comply with current Fedora Packaging Guidelines Added missing documentation files - Corrected license information #1257516 diff --git a/sources b/sources index b42ca60..b9f3fe7 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -9a40d29a2d84b41f9f36d7dd90b4f950 less-471.tar.gz +50ef46065c65257141a7340123527767 less-481.tar.gz From 358d0f412d90f1eaaa37db8bdfbfcab8b026ca80 Mon Sep 17 00:00:00 2001 From: Viktor Jancik Date: Fri, 2 Oct 2015 14:08:07 +0200 Subject: [PATCH 4/4] Removed obsolete patch --- less.spec | 2 -- 1 file changed, 2 deletions(-) diff --git a/less.spec b/less.spec index c219d66..cd7273a 100644 --- a/less.spec +++ b/less.spec @@ -17,7 +17,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 Requires: man-db @@ -45,7 +44,6 @@ 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 %build rm -f ./configure