source: projects/specs/trunk/f/file/file-vl.spec @ 9019

Revision 9019, 12.8 KB checked in by inagaki, 10 years ago (diff)

2014-10-24 Ryoichi INAGAKI <ryo1@…>

  • file, nas: updated


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