Sophie

Sophie

distrib > Mageia > 5 > x86_64 > by-pkgid > 1f93505dc591ccc57f1def8beaf6adef > files > 16

file-5.19-10.mga5.src.rpm

%define major 1
%define libname %mklibname magic %{major}
%define develname %mklibname -d magic
%define staticname %mklibname -d -s magic


Summary:	A utility for determining file types
Name:		file
Version:	5.19
Release:	%mkrel 10
License:	BSD
Group:		File tools
URL:		http://www.darwinsys.com/file/
Source0:	ftp://ftp.astron.com/pub/file/%{name}-%{version}.tar.gz
Patch3:		file-4.24-selinux.patch
Patch4:		file-5.04-oracle.patch
Patch7:		file-5.05-dump.patch
Patch8:		file-5.15-berkeleydb.patch
Patch9:		file-4.20-xen.patch
Patch13:	file-5.15-images.patch
Patch14:	file-4.20-apple.patch
Patch17:	file-5.19-image-fmt-widths.patch
Patch18:	file-5.19-CVE-2014-3587.patch
Patch19:	file-5.20-CVE-2014-3710.patch
Patch20:	file-5.19-CVE-2014-8116.patch
Patch21:	file-5.19-CVE-2014-8117.patch
Patch22:	file-5.20-pascal-oob-read.patch
Patch23:	file-5.19-CVE-2014-9620-CVE-2014-9621.patch
BuildRequires:	zlib-devel
BuildRequires:	python-devel
# Need a version dependency since the magic data file provided in the main
# package will only work with a specific version of the library
Requires:	%{libname} = %{version}

%description
The file command is used to identify a particular file according to the
type of data contained by the file.  File can identify many different
file types, including ELF binaries, system libraries, RPM packages, and
different graphics formats.

You should install the file package, since the file command is such a
useful utility.

%package -n	%{libname}
Group:		System/Libraries
Summary:	Shared library for handling magic files

%description -n	%{libname}
The file command is used to identify a particular file according to the
type of data contained by the file.  File can identify many different
file types, including ELF binaries, system libraries, RPM packages, and
different graphics formats.

Libmagic is a library for handling the so called magic files the 'file'
command is based on.

%package -n	%{develname}
Summary:	Development files to build applications that handle magic files
Group:		Development/C
Requires:	%{libname} = %{version}
Requires:	%{name} >= %{version}-%{release}
Provides:	libmagic-devel = %{version}-%{release}
Provides:	%{name}-devel = %{version}-%{release}
Provides:	magic-devel = %{version}-%{release}
%define olddev %mklibname -d magic 1
%rename		%{olddev}

%description -n	%{develname}
The file command is used to identify a particular file according to the
type of data contained by the file.  File can identify many different
file types, including ELF binaries, system libraries, RPM packages, and
different graphics formats.

Libmagic is a library for handling the so called magic files the 'file'
command is based on. 

%package -n	%{staticname}
Summary:	Static library to build applications that handle magic files
Group:		Development/C
Requires:	%{develname} = %{version}
Provides:	libmagic-static-devel = %{version}-%{release}
Provides:	magic-static-devel = %{version}-%{release}
%define oldstat %mklibname -s -d magic 1
%rename		%{oldstat}

%description -n	%{staticname}
The file command is used to identify a particular file according to the
type of data contained by the file.  File can identify many different
file types, including ELF binaries, system libraries, RPM packages, and
different graphics formats.

Libmagic is a library for handling the so called magic files the 'file'
command is based on. 

%package -n	python-magic
Summary:	Python module to use libmagic
Group:		Development/Python
BuildArch:	noarch
Requires:	%{name} >= %{version}-%{release}

%description -n	python-magic
Libmagic is a library for handling the so called magic files the 'file'
command is based on. 

This package contains the python binding for libmagic.

%prep
%setup -q
%patch3 -p1 -b .selinux~
%patch4 -p1 -b .oracle~
%patch7 -p1 -b .dump~
%patch8 -p1 -b .berkeley~
%patch9 -p1 -b .xen~
%patch13 -p1 -b .images~
%patch14 -p0 -b .apple~
%patch17 -p1 -b .hd~
%patch18 -p1 -b .CVE-2014-3587
%patch19 -p1 -b .CVE-2014-3710
%patch20 -p1 -b .CVE-2014-8116
%patch21 -p1 -b .CVE-2014-8117
%patch22 -p1 -b .pascal-oob-read
%patch23 -p1 -b .CVE-2014-9620-CVE-2014-9621

#patch 3
autoreconf -fi

%build
CFLAGS="%{optflags} -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE" \
%configure2_5x --enable-static
%make

cd python
python setup.py build
cd -

%install
%makeinstall_std

# install one missing header file
install -m644 src/file.h %{buildroot}%{_includedir}/file.h

cd python
python setup.py install --prefix=%{buildroot}%{_prefix}
cd -

%files
%doc README MAINT ChangeLog
%{_bindir}/*
%{_datadir}/misc/*
%{_mandir}/man1/*
%{_mandir}/man4/*

%files -n %{libname}
%{_libdir}/*.so.%{major}*

%files -n %{develname}
%{_libdir}/*.so
%attr(644,root,root) %{_libdir}/*.la
%{_includedir}/*
%{_mandir}/man3/*

%files -n %{staticname}
%{_libdir}/*.a

%files -n python-magic
%doc python/README python/example.py
%{py_puresitedir}/*


%changelog
* Sun Jan 18 2015 luigiwalser <luigiwalser> 5.19-10.mga5
+ Revision: 811308
- rediff upstream patches to fix CVE-2014-9620 and CVE-2014-9621

* Thu Jan 08 2015 oden <oden> 5.19-9.mga5
+ Revision: 809305
- pull in file from this package (avoids problems in the future when the format changes)

* Tue Dec 16 2014 luigiwalser <luigiwalser> 5.19-8.mga5
+ Revision: 803607
- add upstream patch to fix out-of-bounds read with pascal strings

* Tue Dec 16 2014 luigiwalser <luigiwalser> 5.19-7.mga5
+ Revision: 803601
- rediff upstream patches to fix CVE-2014-8116 and CVE-2014-8117

* Wed Oct 29 2014 luigiwalser <luigiwalser> 5.19-6.mga5
+ Revision: 794448
- add upstream patch to fix CVE-2014-3710

* Wed Oct 15 2014 umeabot <umeabot> 5.19-5.mga5
+ Revision: 748266
- Second Mageia 5 Mass Rebuild

* Sat Sep 27 2014 tv <tv> 5.19-4.mga5
+ Revision: 726238
- rebuild for missing pythoneggs deps

* Tue Sep 16 2014 umeabot <umeabot> 5.19-3.mga5
+ Revision: 679183
- Mageia 5 Mass Rebuild

* Mon Aug 25 2014 luigiwalser <luigiwalser> 5.19-2.mga5
+ Revision: 667377
- add patch from fedora to fix CVE-2014-3587

* Fri Jun 13 2014 luigiwalser <luigiwalser> 5.19-1.mga5
+ Revision: 635969
- 5.19
- remove no longer needed patch 15
- remove upstream patch 16
- add patch for one more format width specifier fix in images

* Tue Jun 03 2014 luigiwalser <luigiwalser> 5.18-4.mga5
+ Revision: 632593
- add upstream changes to CDF parser to fix CVE-2014-023[78] and other issues

* Sat May 31 2014 pterjan <pterjan> 5.18-3.mga5
+ Revision: 628181
- Rebuild for new Python

* Sun May 04 2014 luigiwalser <luigiwalser> 5.18-2.mga5
+ Revision: 620081
- revert upstream fmtcheck addition, causes regressions with printing numbers

* Thu Mar 27 2014 luigiwalser <luigiwalser> 5.18-1.mga5
+ Revision: 608963
- 5.18
- remove upstreamed patches

* Wed Mar 05 2014 luigiwalser <luigiwalser> 5.17-3.mga5
+ Revision: 600034
- add upstream patch to fix a memory leak
- add upstream patch to fix an error in the previous CVE-2014-2270 fix

* Fri Feb 21 2014 oden <oden> 5.17-2.mga5
+ Revision: 595223
- P15: leak fix

* Thu Feb 13 2014 fwang <fwang> 5.17-1.mga5
+ Revision: 590106
- 5.17

* Thu Dec 05 2013 luigiwalser <luigiwalser> 5.16-1.mga4
+ Revision: 555409
- 5.16

* Tue Oct 22 2013 umeabot <umeabot> 5.15-4.mga4
+ Revision: 543108
- Mageia 4 Mass Rebuild

* Tue Oct 15 2013 danf <danf> 5.15-3.mga4
+ Revision: 498356
- Added a version dependency on the library, since it expects the specific
  magic file format version provided in the corresponding main package

* Mon Oct 14 2013 pterjan <pterjan> 5.15-2.mga4
+ Revision: 497751
- Rebuild to add different pythonegg provides for python 2 and 3

* Wed Sep 25 2013 luigiwalser <luigiwalser> 5.15-1.mga4
+ Revision: 485759
- 5.15
- rediff patches 8, 9, and 13
- remove upstreamed sticky bit patch

* Fri Mar 22 2013 luigiwalser <luigiwalser> 5.14-1.mga4
+ Revision: 404478
- 5.14
- 5.13
- remove upstream patches

* Fri Jan 11 2013 umeabot <umeabot> 5.12-8.mga3
+ Revision: 350297
- Mass Rebuild - https://wiki.mageia.org/en/Feature:Mageia3MassRebuild

* Fri Jan 11 2013 blino <blino> 5.12-7.mga3
+ Revision: 344908
- add back ELF detection patch, it got detected as reversed because of a modified RCSID

* Thu Jan 10 2013 luigiwalser <luigiwalser> 5.12-6.mga3
+ Revision: 344756
- fix misdetection as assembler text (upstream)

* Wed Jan 09 2013 blino <blino> 5.12-5.mga3
+ Revision: 344311
- drop merged patches
- use updated (!) upstream 5.12 tarball

* Tue Jan 08 2013 blino <blino> 5.12-4.mga3
+ Revision: 341444
- fix elf mime printing (from git)

* Fri Jan 04 2013 luigiwalser <luigiwalser> 5.12-3.mga3
+ Revision: 338516
- re-enable debug package

* Fri Jan 04 2013 luigiwalser <luigiwalser> 5.12-2.mga3
+ Revision: 338511
- temporarily disable debug package
- fix format string patch

* Fri Jan 04 2013 luigiwalser <luigiwalser> 5.12-1.mga3
+ Revision: 338488
- 5.12
- rediff patch 8
- remove upstreamed patches
- fix format string error in softmagic.c

* Sat Mar 03 2012 luigiwalser <luigiwalser> 5.11-2.mga2
+ Revision: 217464
- sync patches with mdv:
  - P20: make php take precedence over c-lang (from mdv)
  - P21: add magic for qemu & vdi images (from fedora)
  - P22: add application/vnd.ms-tnef mimetype (from fedora)
  - P23: add an extra pattern for python matching (from fedora)
  - P24: fix detection of text files with special permission bits (from fedora)
  - P25: decrease strength of newly added "C source" patterns (rh #772651)
- fix rpmlint errors
- remove unneeded explicit requires

* Thu Feb 23 2012 luigiwalser <luigiwalser> 5.11-1.mga2
+ Revision: 212487
- new version 5.11

* Mon Jan 09 2012 shlomif <shlomif> 5.10-1.mga2
+ Revision: 194079
- New version - 5.10

* Sat Sep 17 2011 fwang <fwang> 5.09-1.mga2
+ Revision: 144368
- new version 5.09
- new version 5.08

* Fri Jun 17 2011 tv <tv> 5.07-1.mga2
+ Revision: 109239
- new release

* Sat Apr 16 2011 tv <tv> 5.06-1.mga1
+ Revision: 86155
- new version
- use upstream provided lzma and xz detection

* Wed Apr 13 2011 tv <tv> 5.05-1.mga1
+ Revision: 84616
- new version
- drop patches 0,6,12,16
- rediff patches 7,13,17,18
- make python module noarch

* Mon Feb 21 2011 ahmad <ahmad> 5.04-5.mga1
+ Revision: 55607
- rebuild to make all pythonegg requires/provides lowercase

* Mon Jan 17 2011 misc <misc> 5.04-4.mga1
+ Revision: 21603
- rebuilt for python 2.7 ( but 5.05 was released 1h ago )

* Tue Jan 11 2011 blino <blino> 5.04-3.mga1
+ Revision: 5798
- remove old ldconfig scriptlets
- imported package file