Sophie

Sophie

distrib > Mageia > 4 > x86_64 > by-pkgid > 42475f006d4789a3e56565f9becbe3f3 > files > 19

file-5.16-1.6.mga4.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.16
%define subrel	6
Release:	%mkrel 1
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
# from https://github.com/glensc/file/commit/3c081560c23f20b2985c285338b52c7aae9fdb0f
Patch15:	file-5.16-prevent-infinite-recursion.patch
# from https://github.com/glensc/file/commit/cc9e74dfeca5265ad725acc926ef0b8d2a18ee70
Patch16:	file-5.16-count-indirect-recursion.patch
# from https://github.com/file/file/commit/447558595a3650db2886cd2f416ad0beba965801
Patch17:	file-5.16-CVE-2014-2270-1.patch
# from https://github.com/file/file/commit/c0c0032b9e9eb57b91fefef905a3b018bab492d9
Patch18:	file-5.16-leak_fix.patch
# from https://github.com/file/file/commit/70c65d2e1841491f59168db1f905e8b14083fb1c
Patch19:	file-5.17-CVE-2014-2270-2.patch
Patch20:	file-5.18-cdf.patch
Patch21:	file-5.16-cdf2.patch
Patch22:	file-5.16-pascal.patch
Patch23:	file-5.16-CVE-2014-3538.diff
Patch24:	file-5.19-CVE-2014-3587.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}
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~
%patch15 -p1 -b .infinite-recursion~
%patch16 -p1 -b .indirect-recursion~
%patch17 -p1 -b .CVE-2014-2270-1
%patch18 -p1 -b .leak_fix
%patch19 -p1 -b .CVE-2014-2270-2
%patch20 -p1 -b .cdf
%patch21 -p1 -b .cdf2
%patch22 -p1 -b .pascal
%patch23 -p1 -b .CVE-2014-3538
%patch24 -p1 -b .CVE-2014-3587

#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
* Mon Aug 25 2014 luigiwalser <luigiwalser> 5.16-1.6.mga4
+ Revision: 667378
- add patch from fedora to fix CVE-2014-3587
- rediff upstream patches to fix more buffer issues with CDF parsing
  (CVE-2014-3479, CVE-2014-3480, CVE-2014-3487)
- add upstream patch to correctly compute truncated pascal string size
  (CVE-2014-3478)
- add upstream changes to CDF parser to fix CVE-2014-023[78] and other issues
- rediff upstream patch to fix a memory leak
- rediff upstream patches to fix CVE-2014-2270
- rediff upstream patches to fix CVE-2014-1943

  + oden <oden>
    - P23: security fix for CVE-2014-3538 (ubuntu)

* 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