source: projects/specs/branches/6/f/file/file-vl.spec @ 8303

Revision 8303, 11.1 KB checked in by iwamoto, 10 years ago (diff)

file: CVE-2014-2270

Line 
1%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
2%{!?python_sitearch: %define python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
3%define __libtoolize :
4
5Summary: A utility for determining file types.
6Summary(ja): ファイルの種類を判別するユーティリティー
7Name: file
8Version: 5.14
9Release: 3%{?_dist_release}
10License: BSD
11Group: Applications/System
12Obsoletes: file-static
13
14Source0: ftp://ftp.astron.com/pub/file/%{name}-%{version}.tar.gz
15
16# Addtional magic file for Vine
17Source10: magic.printer-j
18
19# Upstream says it's up to distributions to add a way to support local-magic.
20Patch0: file-localmagic.patch
21# sent upstream - should be included in next upstream release
22Patch1: file-5.10-strength.patch
23Patch2: file-5.10-sticky-bit.patch
24Patch3: file-4.17-rpm-name.patch
25Patch4: file-5.04-volume_key.patch
26Patch5: file-5.04-man-return-code.patch
27Patch6: file-5.04-generic-msdos.patch
28Patch7: file-5.14-x86boot.patch
29Patch8: file-5.14-perl.patch
30Patch9: file-5.14-elfspace.patch
31Patch10: file-5.14-bad-fsmagic-space.patch
32Patch11: file-5.14-no-magic.patch
33Patch12: file-5.14-journald.patch
34Patch13: file-5.14-magic_load.patch
35
36#Vine
37Patch100: file-5.14-magicbuild-fix.patch
38
39#Security
40Patch200: file-5.14_CVE-2014-1943.patch
41Patch210: file-5.14_CVE-2014-2270.patch
42
43
44Buildroot: %{_tmppath}/%{name}-%{version}-root
45#BuildRequires: automake
46#BuildRequires: autoconf
47BuildRequires: zlib-devel
48
49Vendor: Project Vine
50Distribution: Vine Linux
51Packager: daisuke
52
53%description
54The file command is used to identify a particular file according to the
55type of data contained by the file.  File can identify many different
56file types, including ELF binaries, system libraries, RPM packages, and
57different graphics formats.
58
59You should install the file package, since the file command is such a
60useful utility.
61
62%description -l ja
63file コマンドは、ファイルに含まれるデータの種類によって各ファイルが
64どのようなファイルかを判定するために使います。file は ELF バイナリ、シ
65ステムライブラリ、RPM パッケージ、そして様々なグラフィックフォーマット
66を含む、多くの異なるファイルの種類を見分けることができます。
67
68
69%package devel
70Summary:  Libraries and header files for file development
71Summary(ja): libmagic の開発用ファイル
72Group:    Development/Libraries
73Requires: %{name} = %{version}-%{release}
74
75%description devel
76The file-devel package contains the header files and libmagic library
77necessary for developing programs using libmagic.
78
79%package -n python-magic
80Summary: Python bindings for the libmagic API
81Group:   Development/Libraries
82BuildRequires: python-devel
83Requires: %{name} = %{version}-%{release}
84
85%description -n python-magic
86This package contains the Python bindings to allow access to the
87libmagic API. The libmagic library is also used by the familiar
88file(1) command.
89
90
91%prep
92%setup -q
93# Don't use -b -- it will lead to poblems when compiling magic file!
94%patch0 -p1
95%patch1 -p1
96%patch2 -p1
97%patch3 -p1
98%patch4 -p1
99%patch5 -p1
100%patch6 -p1
101%patch7 -p1
102%patch8 -p1
103%patch9 -p1
104%patch10 -p1
105%patch11 -p1
106%patch12 -p1
107%patch13 -p1
108
109#Vine
110%patch100 -p1
111
112#Security
113%patch200 -p1 -b .CVE-2014-1943
114%patch210 -p1 -b .CVE-2014-2270
115
116cat %{SOURCE10} >> ./magic/Localstuff
117
118iconv -f iso-8859-1 -t utf-8 < doc/libmagic.man > doc/libmagic.man_
119touch -r doc/libmagic.man doc/libmagic.man_
120mv doc/libmagic.man_ doc/libmagic.man
121
122%build
123autoreconf
124CFLAGS="%{optflags} -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE" \
125%configure --enable-fsect-man5 --disable-rpath
126# remove hardcoded library paths from local libtool
127sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
128sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
129export LD_LIBRARY_PATH=$RPM_BUILD_ROOT/%{name}-%{version}/src/.libs
130make
131
132cd python
133CFLAGS="%{optflags}" %{__python} setup.py build
134
135%install
136rm -rf $RPM_BUILD_ROOT
137mkdir -p $RPM_BUILD_ROOT%{_bindir}
138mkdir -p $RPM_BUILD_ROOT%{_mandir}/man1
139mkdir -p $RPM_BUILD_ROOT%{_mandir}/man3
140mkdir -p $RPM_BUILD_ROOT%{_mandir}/man5
141mkdir -p $RPM_BUILD_ROOT%{_datadir}/misc
142mkdir -p $RPM_BUILD_ROOT%{_datadir}/file
143
144make install DESTDIR=$RPM_BUILD_ROOT
145
146cat magic/Magdir/* > ${RPM_BUILD_ROOT}%{_datadir}/misc/magic
147ln -s misc/magic ${RPM_BUILD_ROOT}%{_datadir}/magic
148##ln -s file/magic.mime ${RPM_BUILD_ROOT}%{_datadir}/magic.mime
149ln -s ../magic ${RPM_BUILD_ROOT}%{_datadir}/file/magic
150
151cd python
152%{__python} setup.py install -O1 --skip-build --root ${RPM_BUILD_ROOT}
153%{__install} -d ${RPM_BUILD_ROOT}%{_datadir}/%{name}
154
155
156# LIBTOOL=/usr/bin/libtool
157#ln -s file/magic ${RPM_BUILD_ROOT}%{_datadir}/magic
158#ln -s file/magic.mime ${RPM_BUILD_ROOT}%{_datadir}/magic.mime
159
160#ln -s ../magic ${RPM_BUILD_ROOT}%{_datadir}/misc/magic
161
162#{ cd ${RPM_BUILD_ROOT}
163#  strip .%{_bindir}/file
164#  cp %SOURCE1 .%{_datadir}/magic.mime
165#}
166
167# remove unuse files
168rm -rf $RPM_BUILD_ROOT%{_libdir}/*.la
169
170%clean
171rm -rf $RPM_BUILD_ROOT
172
173%post -p /sbin/ldconfig
174
175%postun -p /sbin/ldconfig
176
177
178%files
179%defattr(-,root,root)
180%doc COPYING ChangeLog README
181%{_bindir}/*
182%{_libdir}/libmagic.so.*
183%{_datadir}/file/*
184%{_datadir}/magic*
185%{_datadir}/misc/*
186%{_mandir}/man[15]/*
187
188%files devel
189%defattr(-,root,root,-)
190%{_libdir}/*.so
191%{_includedir}/magic.h
192%{_mandir}/man3/*
193
194%files -n python-magic
195%defattr(-, root, root, -)
196%doc python/README COPYING python/example.py
197%{python_sitelib}/magic.py
198%{python_sitelib}/magic.pyc
199%{python_sitelib}/magic.pyo
200%{python_sitelib}/*egg-info
201
202
203%changelog
204* Wed Mar 12 2014 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> 5.14-3
205- add patch210 for fix CVE-2014-2270
206
207* Thu Feb 20 2014 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> 5.14-2
208- add patch200 for fix CVE-2014-1943
209
210* Sun Sep 22 2013 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> 5.14-1
211- new upstream reelase
212- add patch100 to fix build error
213- remove -static subpackage and add Obs: file-static
214- fix old changelog date...
215
216* Thu Nov 29 2012 Daisuke SUZUKI <daisuke@linux.or.jp> 5.11-1
217- new upstream reelase
218- drop all local patches
219- import fedora patches
220
221* Wed Feb 15 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 5.05-3
222- rebuild with python-2.7.2
223
224* Sun Feb 20 2011 Yoji TOYODA <bsyamato@sea.plala.or.jp> 5.05-2
225- rebuild package
226- fix Patch100
227
228* Sat Feb 12 2011 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 5.05-1
229- new upstream release
230- updated Vine patches (but Patch100 has not been ported yet...)
231- split to devel and static subpackcages
232
233* Mon Sep 27 2010 Yoji TOYODA <bsyamato@sea.plala.or.jp> 4.21-3
234- rebuilt with rpm-4.8.1
235- add environment variable LIBTOOL for make command
236
237* Fri Sep 26 2008 Shu KONNO <owa@bg.wakwak.com> 4.21-2
238- spec in utf-8
239- removed *.la
240
241* Mon May 12 2008 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 4.21-1
242- applied new versioning policy
243
244* Tue Dec 11 2007 Daisuke SUZUKI <daisuke@linux.or.jp> 4.21-0vl1
245- new upstream release
246- import debian/fedora patches
247- drop obsolete vine magic.
248
249* Thu Jun 14 2007 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> 4.09-0vl3
250- rebuild for VineSeed with new tool chain
251
252* Thu May 31 2007 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> 4.09-0vl2.2
253- add patch110 for fix CVE-2007-2799
254- add zlib-devel to BuildPreReq tag
255
256* Mon Mar 26 2007 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> 4.09-0vl2.1
257- add patch100 for fix CVE-2007-1536
258
259* Sun Sep 10 2006 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 4.09-0vl2
260- changed Group to Applications/System
261
262* Sun Apr 18 2004 Daisuke SUZUKI <daisuke@linux.or.jp> 4.09-0vl1
263- new upstream release
264- update vine patches
265
266* Wed Sep 10 2003 Tomoya TAKA <taka@vinelinux.org> 4.03-0vl2
267- update Patch10, use 'size_t' in src/jcode.[ch]
268
269* Tue Sep 09 2003 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 4.03-0vl1
270- update to 4.03
271- update Patch0, 1, 10 for 4.03
272- s/Copyright/License/
273
274* Mon May 12 2003 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 4.02-1vl1
275- update to 4.02
276- update Vine patches for 4.02
277
278* Sun Mar  9 2003 Daisuke SUZUKI <daisuke@linux.or.jp> 3.41-0vl1
279- new upstream release
280  - fixed security bug (http://www.idefense.com/advisory/03.04.03.txt)
281- remove unneeded patches.
282- update Vine patches for 3.41
283
284* Mon Apr  1 2002 Jun Nishii <jun@vinelinux.org> 3.37-0vl2
285- added NPDL2 data [Vine:02348]
286
287* Fri Feb 08 2002 Daisuke SUZUKI <daisuke@linux.or.jp> 3.37-0vl1
288- update to 3.37
289
290* Sun Jul 15 2001 MATSUBAYASHI 'Shaolin' Kohji <shaolin@vinelinux.org>
291- 3.35-0vl3
292- disable some entries in elf for problems on big-endian archs
293
294* Wed Jun  6 2001 Jun Nishii <jun@vinelinux.org>
295- file-3.35-0vl1
296- ver.up
297- added %doc
298
299* Thu Jan 11 2001 Jun Nishii <jun@vinelinux.org>
300- file-3.33-1vl4
301- more fix and clean up jtext patch (file-3.33-vinejtext.patch)
302
303* Thu Jan 11 2001 Jun Nishii <jun@vinelinux.org>
304- file-3.33-1vl3
305- fix again jtext patch (file-3.33-vinejtext.patch)
306- added file-3.33-vinenames.patch to avoid miss-judgement
307
308* Wed Jan 10 2001 Jun Nishii <jun@vinelinux.org>
309- file-3.33-1vl2
310- update jtext patch (file-3.33-vinejtext.patch)
311
312* Mon Jan  8 2001 Jun Nishii <jun@vinelinux.org>
313- file-3.33-1vl1
314- modify description-ja and spec
315
316* Sun Jul 09 2000 MATSUBAYASHI 'Shaolin' Kohji <shaolin@rhythmaning.org>
317- file-3.28-2vl2
318- fixed %files section to handle compressed man pages
319
320* Tue Jun 13 2000 Lisa Sagami <czs14350@nifty.ne.jp>
321- marged RH 3.28-2 and Vine 3.27-3vl3
322
323* Wed Feb 16 2000 Cristian Gafton <gafton@redhat.com>
324- add ia64 patch from rth
325
326* Mon Feb  7 2000 Bill Nottingham <notting@redhat.com>
327- handle compressed manpages
328- update to 3.28
329
330* Mon Sep 6 1999 Norihito Ohmori <ohmori@flatout.org>
331- Japanese Text detection bug fix. (by Toru Hoshina <hoshina@best.com>)
332
333* Fri Aug 27 1999 Norihito Ohmori <ohmori@flatout.org>
334- patch  dues not apply bug.
335
336* Thu Aug 26 1999 Norihito Ohmori <ohmori@flatout.org>
337- not need kcc (Thanks for Toru Hoshina <hoshina@best.com>)
338- ASCII data and Shift JIS data detected in Japanese Text Detection bug fix.
339
340* Mon Aug 23 1999 Jeff Johnson <jbj@redhat.com>
341- identify ELF stripped files correctly (#4665).
342- use SPARC (not sparc) consistently throughout (#4665).
343- add entries for MS Office files (#4665).
344
345* Thu Aug 12 1999 Jeff Johnson <jbj@redhat.com>
346- diddle magic so that *.tfm files are identified correctly.
347
348* Tue Jul  6 1999 Jeff Johnson <jbj@redhat.com>
349- update to 3.27.
350
351* Mon Mar 22 1999 Preston Brown <pbrown@redhat.com>
352- experimental support for realmedia files added
353
354* Sun Mar 21 1999 Cristian Gafton <gafton@redhat.com>
355- auto rebuild in the new build environment (release 5)
356
357* Fri Mar 19 1999 Jeff Johnson <jbj@redhat.com>
358- strip binary.
359
360* Fri Nov 27 1998 Jakub Jelinek <jj@ultra.linux.cz>
361- add SPARC V9 magic.
362
363* Tue Nov 10 1998 Jeff Johnson <jbj@redhat.com>
364- update to 3.26.
365
366* Mon Aug 24 1998 Jeff Johnson <jbj@redhat.com>
367- update to 3.25.
368- detect gimp XCF versions.
369
370* Thu May 07 1998 Prospector System <bugs@redhat.com>
371- translations modified for de, fr, tr
372
373* Wed Apr 08 1998 Erik Troan <ewt@redhat.com>
374- updated to 3.24
375- buildrooted
376
377* Mon Jun 02 1997 Erik Troan <ewt@redhat.com>
378- built against glibc
379
380* Mon Mar 31 1997 Erik Troan <ewt@redhat.com>
381- Fixed problems caused by 64 bit time_t.
382
383* Thu Mar 06 1997 Michael K. Johnson <johnsonm@redhat.com>
384- Improved recognition of Linux kernel images.
Note: See TracBrowser for help on using the repository browser.