source: projects/specs/branches/6/l/less/less-vl.spec @ 9525

Revision 9525, 7.4 KB checked in by iwamoto, 9 years ago (diff)

less: fix CVE-2014-9488

Line 
1Summary: A text file browser similar to more, but better
2Summary(ja): more よりも高機能な日本語対応ページャ
3Name: less
4Version: 436
5Release: 4%{?_dist_release}
6
7Group: Applications/Text
8License: GPLv3+
9URL: http://www.greenwoodsoftware.com/less/
10
11Source: http://www.greenwoodsoftware.com/less/%{name}-%{version}.tar.gz
12Source1: lesspipe.sh
13Source2: less.sh
14Source3: less.csh
15#Source3: less-354-hlp-ja.tgz
16Patch1: less-406-Foption.patch
17Patch4: less-394-time.patch
18Patch5: less-418-fsync.patch
19Patch6: less-436-manpage.patch
20
21Patch10: less-458-CVE-2014-9488-utf8-overflow.patch
22
23Buildroot: %{_tmppath}/%{name}-%{version}-root
24BuildRequires: ncurses-devel
25BuildRequires: pcre-devel
26BuildRequires: autoconf automake libtool
27Requires(post): alternatives
28Requires(preun): alternatives
29Requires: gzip, bzip2
30Requires: file >= 3.33
31Provides: pager
32
33Vendor: Project Vine
34Distribution: Vine Linux
35
36%description
37The less utility is a text file browser that resembles more, but has
38more capabilities.  Less allows you to move backwards in the file as
39well as forwards.  Since less doesn't have to read the entire input file
40before it starts, less starts up more quickly than text editors (for
41example, vi).
42
43You should install less because it is a basic utility for viewing text
44files, and you'll use it frequently.
45
46%description -l ja
47less は more よりも高機能な日本語対応ページャです.less は起動時にテキスト
48ファイルを完全に読み込む必要がないので,vi などの テキストエディタに比べて
49高速に起動することができます.
50
51環境変数 LESSOPEN を "|lesspipe.sh %s" に設定することによって, gzip や
52compress で圧縮されたファイルを自動的に展開して表示することもできます.
53
54less はテキストファイルを表示するためによく使用する基本的なツールなので,
55インストールしておくべきでしょう.
56
57%prep
58%setup -q
59%patch1 -p1 -b .Foption
60%patch4 -p1 -b .time
61%patch5 -p1 -b .fsync
62%patch6 -p1 -b .manpage
63
64%patch10 -p1 -b .CVE-2014-9488
65
66autoreconf
67
68chmod -R a+w *
69chmod 644 lessecho.c lesskey.c version.c LICENSE
70
71
72%build
73%configure --with-regex=pcre
74make CC="gcc $RPM_OPT_FLAGS -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 `pcre-config --cflags`" datadir=%{_docdir}
75
76
77%install
78rm -rf $RPM_BUILD_ROOT
79%makeinstall
80strip -R .comment $RPM_BUILD_ROOT/%{_bindir}/less
81mkdir -p $RPM_BUILD_ROOT/etc/profile.d
82install -p -c -m 755 %{SOURCE1} $RPM_BUILD_ROOT/%{_bindir}
83install -p -c -m 644 %{SOURCE2} $RPM_BUILD_ROOT/etc/profile.d
84install -p -c -m 644 %{SOURCE3} $RPM_BUILD_ROOT/etc/profile.d
85ls -la $RPM_BUILD_ROOT/etc/profile.d
86
87%clean
88rm -rf $RPM_BUILD_ROOT
89
90%post
91/sbin/update-alternatives --install %{_bindir}/pager pager %{_bindir}/less 50
92
93# fix broken symlink if it's there
94if [ ! -f %{_bindir}/pager ] ; then
95    /sbin/update-alternatives --auto pager
96fi
97
98%preun
99if [ $1 -eq 0 ]; then
100    /sbin/update-alternatives --remove pager %{_bindir}/less
101    /sbin/update-alternatives --auto pager
102fi
103
104%files
105%defattr(-,root,root)
106%doc COPYING LICENSE NEWS README
107%config %{_sysconfdir}/profile.d/*
108%{_bindir}/less
109%{_bindir}/lesskey
110%{_bindir}/lessecho
111%{_bindir}/lesspipe.sh
112%{_mandir}/man1/less.1*
113%{_mandir}/man1/lesskey.1*
114%{_mandir}/man1/lessecho.1*
115
116%changelog
117* Wed Apr 22 2015 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> 436-4
118- add Patch10 for fix CVE-2014-9488(utf8-overflow)
119
120* Sat Mar 19 2011 Daisuke SUZUKI <daisuke@linux.or.jp> 436-3
121- split Requires(post,preun)
122
123* Sun Sep 19 2010 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 436-2
124- updated japanese summary and description
125
126* Thu Jul 29 2010 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 436-1
127- updated to 436
128
129* Fri Aug 15 2008 Shu KONNO <owa@bg.wakwak.com> 382-1vl5
130- applied new versioning policy, spec in utf-8
131
132* Fri Apr 13 2007 KANEKO Seiji <giraffe@m2.pbc.ne.jp> 382-0vl6
133- add Provides: pager
134- add Requires(post,preun): alternatives
135
136* Mon Apr 09 2007 KANEKO Seiji <giraffe@m2.pbc.ne.jp> 382-0vl5
137- add update-alternatives: pager in %%post, %%preun scriptlet
138
139* Thu Nov 09 2006 KAZUKI SHIMURA <kazuki@ma.ccnw.ne.jp> 382-0vl4
140- revert to 382-iso259 ([VineSeed:12552])
141
142* Wed Nov 08 2006 KAZUKI SHIMURA <kazuki@ma.ccnw.ne.jp> 382-0vl3
143- update jless patch to 382-iso262
144- update description (iso254 to iso262)
145
146* Sun Nov 05 2006 Daisuke SUZUKI <daisuke@linux.or.jp> 382-0vl2
147- change log was missing in 382-0vl1
148
149* Sun Nov 05 2006 Daisuke SUZUKI <daisuke@linux.or.jp> 382-0vl1
150- new upstream release
151- update jless patch to 382-iso258
152
153* Tue Dec 14 2004 KOBAYASHI R. Taizo <tkoba@vinelinux.org> 358-0vl10
154- set _FILE_OFFSET_BITS 64
155
156* Sat May 17 2003 KAZUKI SHIMURA <rito@pos.to> 358-0vl9
157- rebuild with new toolchain
158- fix description (iso242 to iso254)
159
160* Thu Apr 25 2002 Kosaku Nagasaka <nagasaka@math.tsukuba.ac.jp>
161- 358-0vl8: temporary fix: consistency of the nls-patch and (J)LESSCHARSET
162
163* Sun Mar 31 2002 NISHIMURA Daisuke <nishi@graco.c.u-tokyo.ac.jp>
164- 358-0vl7: fix lesspipe.sh for file names with spaces
165
166* Wed Aug 22 2001 Toru Sagami <sagami@vinelinux.org>
167- 358-0vl6: rebuild on ncurses-5.2 (as asked to do so)
168
169* Sun Aug 19 2001 Toru Sagami <sagami@vinelinux.org>
170- 358-0vl5: added more documents (COPYING, LICENSE)
171- fix lesspipe.sh again and tweak lesspipe.csh a bit with %%config marked
172
173* Wed Jun 27 2001 Jun Nishii <jun@vinelinux.org> 358-0vl4
174- fix lesspipe.sh
175- do not REset LESSOPEN in profile.d/less.sh
176
177* Sat Jan 13 2001 Lisa Sagami <czs14350@mb.infoweb.ne.jp>
178- 358-0vl3
179- fixed lesspipe.sh
180
181* Fri Jan 12 2001 Lisa Sagami <czs14350@mb.infoweb.ne.jp>
182- 358-0vl2
183- added bzip2/lha support to lesspipe.sh
184- minor spec fixes
185
186* Thu Jan 11 2001 Jun Nishii <jun@vinelinux.org>
187- 358-0vl1
188- more fix of lesspipe.sh
189- requires file >= 3.33
190- more macros in spec
191
192* Thu Jan 11 2001 Jun Nishii <jun@vinelinux.org>
193- 354-0vl5
194- modify lesspipe.sh to adapt to file-3.33 and to view gzipped nroff file
195
196* Tue Dec 26 2000 Tomoya TAKA <tomoya@olive.plala.or.jp> 354-0vl3
197- some fixes to handle man pages correctly
198
199* Sun Nov 12 2000 MACHINO, Satoshi <machino@vinelinux.org> 354-0vl2
200- build on gcc-2.95.3
201- partially used rpmmacros
202
203* Wed Jul  5 2000 Yasuyuki Furukawa <furukawa@vinelinux.org>
204- added Sagam's patch to fix parse ctrl code for Japanese. Very thanks Sagami-san.
205
206* Wed Jun 21 2000 Jun Nishii <jun@vinelinux.org>
207- less-354-0vl1
208
209* Mon Jan 17 2000 Yasuyuki Furukawa  <furukawa@vinelinux.org>
210- updated ja_nls patch for memory leaks.
211
212* Mon Jan 10 2000 Jun Nishii <jun@vinelinux.org>
213- rel.7 (5vl2 makes harm for update from Vine-1.1)
214
215* Fri Jan  7 2000 Yasuyuki Furukawa <furukawa@vinelinux.org>
216- rel 5vl2
217- added ja_nls and bzip2 patches
218- added Requires for bzip2 and gzip.
219
220* Fri Jan  7 2000 Jun Nishii <jun@vinelinux.org>
221- rel.6
222- change group
223
224* Sun Sep 6 1999 Jun NISHII <jun@flatout.org>
225- rel.5
226- remove LESS=-r to avoid somed troubles
227
228* Sat Aug 21 1999 Jun NISHII <jun@flatout.org>
229- rel.4
230- change groff path in lesspipe.sh to adapt groff-1.11
231- added /etc/profile.d/less{.,.csh}
232
233* Thu Jun 24 1999 Norihito Ohmori <ohmori@flatout.org>
234- rebuild for glibc-2.1
235
236* Mon Feb 15 1999 Jun NISHII <jun@flatout.org>
237- rel.2
238- added preprocess for bzip2ed file
239- added Japanese summary
240
241* Wed Dec 2 1998 Jun NISHII <jun@flatout.org>
242- rename from less-332iso242-4 to less-332_jp-1
243- strip bins
244
245* Tue Oct 8 1998 Jun NISHII <jun@flatout.org>
246- release 4
247- modify header of spec file
248
249* Sat Sep 26 1998 Jun NISHII <jun@flatout.org>
250- release 3
251- added lesspipe.sh
Note: See TracBrowser for help on using the repository browser.