Compare commits

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

4 commits

Author SHA1 Message Date
Viktor Jancik
358d0f412d Removed obsolete patch 2015-10-02 14:08:07 +02:00
Viktor Jancik
eee427a11d Update to 481, fixes (#1231493) 2015-10-02 13:51:31 +02:00
Viktor Jancik
12956e7bcd Fixed licensing and displaying of nonascii characters #1257516 #1241543 2015-09-02 14:50:36 +02:00
Viktor Jancik
5964d13d89 Updated spec file 2015-08-03 15:54:33 +02:00
8 changed files with 40 additions and 74 deletions

3
.gitignore vendored
View file

@ -4,3 +4,6 @@
/less-451.tar.gz /less-451.tar.gz
/less-458.tar.gz /less-458.tar.gz
/less-471.tar.gz /less-471.tar.gz
/less-478.tar.gz
/less-479.tar.gz
/less-481.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,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,4 +1,9 @@
#!/bin/csh
# less initialization script (csh) # less initialization script (csh)
if ( -x /usr/bin/lesspipe.sh ) then 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 endif

View file

@ -1,2 +1,4 @@
# less initialization script (sh) # 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

View file

@ -1,15 +1,14 @@
Summary: A text file browser similar to more, but better Summary: A text file browser similar to more, but better
Name: less Name: less
Version: 471 Version: 481
Release: 4%{?dist} Release: 1%{?dist}
License: GPLv3+ License: GPLv3+ or BSD
Group: Applications/Text Group: Applications/Text
Source: http://www.greenwoodsoftware.com/less/%{name}-%{version}.tar.gz Source: http://www.greenwoodsoftware.com/less/%{name}-%{version}.tar.gz
Source1: lesspipe.sh Source1: lesspipe.sh
Source2: less.sh Source2: less.sh
Source3: less.csh Source3: less.csh
Patch1: less-444-Foption.v2.patch Patch1: less-444-Foption.v2.patch
Patch2: less-394-search.patch
Patch4: less-394-time.patch Patch4: less-394-time.patch
Patch5: less-418-fsync.patch Patch5: less-418-fsync.patch
Patch6: less-436-manpage-add-old-bot-option.patch Patch6: less-436-manpage-add-old-bot-option.patch
@ -18,9 +17,9 @@ Patch8: less-458-lessecho-usage.patch
Patch9: less-458-less-filters-man.patch Patch9: less-458-less-filters-man.patch
Patch10: less-458-lesskey-usage.patch Patch10: less-458-lesskey-usage.patch
Patch11: less-458-old-bot-in-help.patch Patch11: less-458-old-bot-in-help.patch
Patch12: less-471-out_of_bounds_read.patch
URL: http://www.greenwoodsoftware.com/less/ URL: http://www.greenwoodsoftware.com/less/
Requires: groff-base Requires: groff-base
Requires: man-db
BuildRequires: ncurses-devel BuildRequires: ncurses-devel
BuildRequires: autoconf automake libtool BuildRequires: autoconf automake libtool
@ -37,7 +36,6 @@ files, and you'll use it frequently.
%prep %prep
%setup -q %setup -q
%patch1 -p2 -b .Foption %patch1 -p2 -b .Foption
%patch2 -p1 -b .search
%patch4 -p1 -b .time %patch4 -p1 -b .time
%patch5 -p1 -b .fsync %patch5 -p1 -b .fsync
%patch6 -p1 -b .manpage-add-old-bot-option %patch6 -p1 -b .manpage-add-old-bot-option
@ -46,37 +44,37 @@ files, and you'll use it frequently.
%patch9 -p1 -b .less-filters-man %patch9 -p1 -b .less-filters-man
%patch10 -p1 -b .lesskey-usage %patch10 -p1 -b .lesskey-usage
%patch11 -p1 -b .old-bot %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 %build
rm -f ./configure
autoreconf -fiv
%configure %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 %install
rm -rf $RPM_BUILD_ROOT %make_install
make DESTDIR=$RPM_BUILD_ROOT install
mkdir -p $RPM_BUILD_ROOT/etc/profile.d mkdir -p $RPM_BUILD_ROOT/etc/profile.d
install -p -c -m 755 %{SOURCE1} $RPM_BUILD_ROOT/%{_bindir} install -p %{SOURCE1} $RPM_BUILD_ROOT/%{_bindir}
install -p -c -m 644 %{SOURCE2} $RPM_BUILD_ROOT/etc/profile.d install -p -m 644 %{SOURCE2} $RPM_BUILD_ROOT/etc/profile.d
install -p -c -m 644 %{SOURCE3} $RPM_BUILD_ROOT/etc/profile.d install -p -m 644 %{SOURCE3} $RPM_BUILD_ROOT/etc/profile.d
ls -la $RPM_BUILD_ROOT/etc/profile.d
%files %files
%defattr(-,root,root,-) %doc README NEWS INSTALL
%{!?_licensedir:%global license %%doc} %license LICENSE COPYING
%license LICENSE
/etc/profile.d/* /etc/profile.d/*
%{_bindir}/* %{_bindir}/*
%{_mandir}/man1/* %{_mandir}/man1/*
%clean
rm -rf $RPM_BUILD_ROOT
%changelog %changelog
* Fri Oct 02 2015 Viktor Jancik <vjancik@redhat.com> - 481-1
- Update to version 481, fixes #1231493
* Wed Sep 02 2015 Viktor Jancik <vjancik@redhat.com> - 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 <jmlich@redhat.com> - 471-4 * Mon Jun 01 2015 Jozef Mlich <jmlich@redhat.com> - 471-4
- update of previous patch - update of previous patch

View file

@ -30,6 +30,8 @@ if [ -x ~/.lessfilter ]; then
fi fi
fi fi
export MAN_KEEP_FORMATTING=1
case "$1" in 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].[gx]z|*.[1-9]x.[gx]z|*.man.[gx]z|*.[1-9n].lzma|*.[1-9]x.lzma|*.man.lzma)
case "$1" in case "$1" in
@ -38,12 +40,12 @@ case "$1" in
*.xz|*.lzma) DECOMPRESSOR="xz -dc" ;; *.xz|*.lzma) DECOMPRESSOR="xz -dc" ;;
esac esac
if [ -n "$DECOMPRESSOR" ] && $DECOMPRESSOR -- "$1" | file - | grep -q troff; then if [ -n "$DECOMPRESSOR" ] && $DECOMPRESSOR -- "$1" | file - | grep -q troff; then
$DECOMPRESSOR -- "$1" | groff -Tascii -mandoc - $DECOMPRESSOR -- "$1" | man -P cat -l -
exit $? exit $?
fi ;;& fi ;;&
*.[1-9n]|*.[1-9]x|*.man) *.[1-9n]|*.[1-9]x|*.man)
if file "$1" | grep -q troff; then if file "$1" | grep -q troff; then
groff -Tascii -mandoc "$1" | cat -s man -P cat -l "$1"
exit $? exit $?
fi ;;& fi ;;&
*.tar) tar tvvf "$1"; exit $? ;; *.tar) tar tvvf "$1"; exit $? ;;

View file

@ -1 +1 @@
9a40d29a2d84b41f9f36d7dd90b4f950 less-471.tar.gz 50ef46065c65257141a7340123527767 less-481.tar.gz