Sophie

Sophie

distrib > Mageia > 7 > armv7hl > by-pkgid > 25dd11408a3f23ec6c6747c05eaa0020 > files > 13

file-5.37-1.1.mga7.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.37
%define		subrel 1
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
Patch1:		0001-Set-buffer-to-NULL-to-prevent-double-free-Kamil-Dudk.patch
Patch3:		file-5.32-selinux.patch
Patch4:		file-5.04-oracle.patch
Patch7:		file-5.37-dump.patch
Patch8:		file-5.35-berkeleydb.patch
Patch9:		file-5.32-xen.patch
Patch13:	file-5.15-images.patch
Patch14:	file-5.37-apple.patch
Patch17:	file-5.19-image-fmt-widths.patch
# From Fedora
Patch100:	file-5.32-awk-perl.patch
Patch101:	file-5.24-varied.patch

BuildRequires:	pkgconfig(zlib)
BuildRequires:	pkgconfig(python2)
BuildRequires:	pythonegg(2)(setuptools)
BuildRequires:	pkgconfig(python3)
BuildRequires:	pythonegg(3)(setuptools)
# 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	python2-magic
Summary:	Python module to use libmagic
Group:		Development/Python
BuildArch:	noarch
Requires:	%{name} >= %{version}-%{release}
Provides:       python2dist(magic) = %{version}-%{release}
%{?python_provide:%python_provide python2-magic}

%description -n	python2-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.

%package -n	python3-magic
Summary:	Python 3 module to use libmagic
Group:		Development/Python
BuildArch:	noarch
Requires:	%{name} >= %{version}-%{release}
Provides:       python3dist(magic) = %{version}-%{release}
%{?python_provide:%python_provide python3-magic}

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

This package contains the python 3 binding for libmagic.

%prep

# Don't use -b -- it will lead to poblems when compiling magic file!
%setup -q
%patch1 -p1
%patch3 -p1
%patch4 -p1
%patch7 -p1
%patch8 -p1
%patch9 -p1
%patch13 -p1
%patch14 -p1
%patch17 -p1
%patch100 -p1
%patch101 -p1

%build
#patch 3
autoreconf -vfi

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

pushd python
%py2_build
%py3_build
popd

%install
%make_install

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

cat magic/Magdir/* > ${RPM_BUILD_ROOT}%{_datadir}/misc/magic

pushd python
%py2_install
%py3_install
popd

%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 python2-magic
%doc python/README.md python/example.py
%{python2_sitelib}/file_magic-*-py?.?.egg-info
%{python2_sitelib}/magic.py*

%files -n python3-magic
%doc python/README.md python/example.py
%{python3_sitelib}/__pycache__/*
%{python3_sitelib}/file_magic-*-py?.?.egg-info
%{python3_sitelib}/magic.py*



%changelog
* Tue Sep 10 2019 tmb <tmb> 5.37-1.1.mga7
+ Revision: 1439502
- Set buffer to NULL to prevent double free
- update to 5.37

* Wed Feb 20 2019 kekepower <kekepower> 5.36-1.mga7
+ Revision: 1368949
- Update to version 5.36

* Sat Jan 12 2019 wally <wally> 5.35-4.mga7
+ Revision: 1355744
- don't own python3 pycache dir

* Sat Jan 05 2019 wally <wally> 5.35-3.mga7
+ Revision: 1349280
- rebuild for python3.7

* Fri Nov 30 2018 joequant <joequant> 5.35-2.mga7
+ Revision: 1336859
- add python-magic provides

* Fri Oct 19 2018 kekepower <kekepower> 5.35-1.mga7
+ Revision: 1322445
- Update to version 5.35
- Rediffed and renamed patch8
- Removed merged patch
- Renamed python-magic to python2-magic
- Use python_provides

* Sun Sep 23 2018 umeabot <umeabot> 5.33-3.mga7
+ Revision: 1297696
- Mageia 7 Mass Rebuild

* Tue Jun 19 2018 ns80 <ns80> 5.33-2.mga7
+ Revision: 1238042
- add upstream patch for CVE-2018-10360 (mga#23183)

* Mon Apr 16 2018 kekepower <kekepower> 5.33-1.mga7
+ Revision: 1219364
- Update to version 5.33
- Rediffed Patch8
- Use make_build

* Wed Oct 18 2017 mjack <mjack> 5.32-1.mga7
+ Revision: 1172610
- Updated to new version 5.32

* Sat Aug 05 2017 pterjan <pterjan> 5.25-6.mga7
+ Revision: 1135209
- Rebuild for python 3.6

* Fri Oct 21 2016 tv <tv> 5.25-5.mga6
+ Revision: 1062830
- package magic source: it's needed for rpm testsuite
- Don't use -b: it leads to poblems when compiling magic file, which breaks rpm testsuite

* Tue Apr 19 2016 daviddavid <daviddavid> 5.25-4.mga6
+ Revision: 1003571
- rebuild to get a properly upload

* Tue Apr 19 2016 luigiwalser <luigiwalser> 5.25-3.mga6
+ Revision: 1003548
- revert to file 5.25
+ daviddavid <daviddavid>
- add python3-magic package

* Mon Apr 18 2016 luigiwalser <luigiwalser> 5.26-1.mga6
+ Revision: 1003512
- BR python-setuptools
- 5.26
- rediff patches 3 and 8

* Sun Jan 17 2016 wally <wally> 5.25-2.mga6
+ Revision: 925089
- add patches P100 and P101 from Fedora

* Fri Sep 18 2015 fwang <fwang> 5.25-1.mga6
+ Revision: 880298
- 5.25

* Fri Aug 21 2015 tmb <tmb> 5.24-2.mga6
+ Revision: 867453
- rebuild for new gcc

* Sun Jul 26 2015 blino <blino> 5.24-1.mga6
+ Revision: 857774
- 5.24
- drop upstream security patches (already included)

* Sun Jan 18 2015 luigiwalser <luigiwalser> 5.19-10.mga5
+ Revision: 811308
- rediff upstream patches to fix CVE-2014-9620 and CVE-2014-9621
- one of the included upstream patches fixes CVE-2014-9653

* 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 (CVE-2014-9652)

* 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


* Fri Oct 29 2010 Michael Scherer <misc@mandriva.org> 5.04-2mdv2011.0
+ Revision: 590006
- rebuild for python 2.7

* Sat Jan 23 2010 Funda Wang <fwang@mandriva.org> 5.04-1mdv2010.1
+ Revision: 495189
- rediff oracle patch
- New version 5.04
- rediff ooffice patch

* Sun Oct 11 2009 Frederik Himpe <fhimpe@mandriva.org> 5.03-3mdv2010.0
+ Revision: 456632
- Bump release so that it's higher than the one in 2009.1 updates

  + Götz Waschk <waschk@mandriva.org>
    - fix URL

* Wed May 27 2009 Götz Waschk <waschk@mandriva.org> 5.03-2mdv2010.0
+ Revision: 380178
- fix data dir (blino)

* Thu May 07 2009 Frederik Himpe <fhimpe@mandriva.org> 5.03-1mdv2010.0
+ Revision: 373023
- update to new version 5.03

* Tue May 05 2009 Oden Eriksson <oeriksson@mandriva.com> 5.02-1mdv2010.0
+ Revision: 372197
- 5.02 (fixes CVE-2009-1515)

* Sun May 03 2009 Frederik Himpe <fhimpe@mandriva.org> 5.01-1mdv2010.0
+ Revision: 371017
- Update to new version 5.01
- Rediff lzma patch

  + Per Øyvind Karlsen <peroyvind@mandriva.org>
    - add '~' at end of patch suffixes to avoid possible confusions and ensure
      proper 'ls' coloring

* Wed Feb 04 2009 Götz Waschk <waschk@mandriva.org> 5.00-1mdv2009.1
+ Revision: 337343
- new version
- update patch 19

  + Per Øyvind Karlsen <peroyvind@mandriva.org>
    - new lzma format has been renamed to xz, update magic accordingly

* Fri Dec 26 2008 Oden Eriksson <oeriksson@mandriva.com> 4.26-2mdv2009.1
+ Revision: 319173
- rediffed some fuzzy pathes
- fix build with -Werror=format-security (P19)

* Mon Sep 01 2008 Frederik Himpe <fhimpe@mandriva.org> 4.26-1mdv2009.0
+ Revision: 278536
- update to new version 4.26

* Wed Jul 16 2008 Götz Waschk <waschk@mandriva.org> 4.25-1mdv2009.0
+ Revision: 236251
- new version
- drop patch 10

  + Pixel <pixel@mandriva.com>
    - do not call ldconfig in %%post/%%postun, it is now handled by filetriggers

* Wed Apr 09 2008 Götz Waschk <waschk@mandriva.org> 4.24-1mdv2009.0
+ Revision: 192489
- new version
- drop source 1
- update patches 3,6,7,8,10,16
- drop patches 5,15
- update file list

* Wed Jan 16 2008 David Walluck <walluck@mandriva.org> 4.23-2mdv2008.1
+ Revision: 153586
- Provides: magic-devel and magic-static-devel

* Sun Jan 13 2008 Götz Waschk <waschk@mandriva.org> 4.23-1mdv2008.1
+ Revision: 151056
- new version
- new devel name
- update patches 7,15,18
- drop patch 11

  + Thierry Vignaud <tv@mandriva.org>
    - rebuild
    - kill re-definition of %%buildroot on Pixel's request

  + Olivier Blin <oblin@mandriva.com>
    - restore BuildRoot

  + Per Øyvind Karlsen <peroyvind@mandriva.org>
    - update lzma patch with an improved one from Anders F Bj?\195?\182rklund

* Fri Jun 08 2007 Per Øyvind Karlsen <peroyvind@mandriva.org> 4.21-2mdv2008.0
+ Revision: 37591
- fix path in P18 (I suck)
- add support for future LZMA format (P18)

* Sun Jun 03 2007 Götz Waschk <waschk@mandriva.org> 4.21-1mdv2008.0
+ Revision: 34950
- new version
- rediff patches 4,12
- drop patch 2

  + Per Øyvind Karlsen <peroyvind@mandriva.org>
    - add lzma support (P17)


* Sat Mar 10 2007 Giuseppe Ghibò <ghibo@mandriva.com> 4.20-1mdv2007.1
+ Revision: 140963
- Release 4.20.
- Removed Patch1 (merged upstream).
- Added Patch2 (merged from ftp://ftp.astron.com/pub/file/)
- Merged Patch3 (selinux), Patch4 (oracle filesystem), Patch5 (powerpoint), Patch6 (openoffice, RH#223297), Patch7 (dump, RH#149868), Patch8 (cracklib, RH#168917), Patch9 (xen), Patch10 (clamav, RH#192406), Patch11 (bash, RH#202185), Patch12 (svn), Patch13 (images), Patch14 (apple) from Fedora, Patch15 (misc/magic) from Fedora/Debian.
- Partially merged Patch16 (audio) from OpenSUSE.

* Tue Jan 09 2007 Götz Waschk <waschk@mandriva.org> 4.19-1mdv2007.1
+ Revision: 106412
- new version

* Thu Dec 14 2006 Nicolas Lécureuil <neoclust@mandriva.org> 4.17-6mdv2007.1
+ Revision: 96895
- Rebuild against new python

* Wed Dec 13 2006 Gwenole Beauchesne <gbeauchesne@mandriva.com> 4.17-5mdv2007.1
+ Revision: 96413
- Recognize Cell SPU objects. Cosmetics for 64-bit PowerPC.

* Tue Oct 31 2006 Oden Eriksson <oeriksson@mandriva.com> 4.17-4mdv2007.1
+ Revision: 74556
- rebuild
- bzip2 cleanup
- bunzip patches and sources
- Import file

* Mon May 15 2006 Stefan van der Eijk <stefan@eijk.nu> 4.17-2mdk
- rebuild for sparc

* Thu Mar 16 2006 Götz Waschk <waschk@mandriva.org> 4.17-1mdk
- drop patch 2

* Thu Mar 16 2006 Götz Waschk <waschk@mandriva.org> 4.17-1mdk
- New release 4.17

* Fri Feb 10 2006 Götz Waschk <waschk@mandriva.org> 4.16-3mdk
- fix python linkage

* Thu Feb 09 2006 Michael Scherer <misc@mandriva.org> 4.16-2mdk
- mkrel
- create python subpackage

* Wed Oct 19 2005 Götz Waschk <waschk@mandriva.org> 4.16-1mdk
- New release 4.16

* Sun Oct 02 2005 Abel Cheung <deaddog@mandriva.org> 4.15-1mdk
- New release 4.15
- Drop upstream patches

* Sat Jul 09 2005 Götz Waschk <waschk@mandriva.org> 4.14-2mdk
- add patch for bug 16740

* Thu Jul 07 2005 Götz Waschk <waschk@mandriva.org> 4.14-1mdk
- New release 4.14

* Thu Jun 02 2005 Abel Cheung <deaddog@mandriva.org> 4.13-2mdk
- Drop Patch1 (already merged)
- Source2: mup support I submitted upstream
- Remove rpmlint warnings

* Mon Feb 14 2005 Götz Waschk <waschk@linux-mandrake.com> 4.13-1mdk
- New release 4.13

* Thu Nov 25 2004 Goetz Waschk <waschk@linux-mandrake.com> 4.12-1mdk
- New release 4.12

* Wed Nov 24 2004 Goetz Waschk <waschk@linux-mandrake.com> 4.11-1mdk
- New release 4.11

* Tue Sep 21 2004 Gwenole Beauchesne <gbeauchesne@mandrakesoft.com> 4.10-2mdk
- fix broken mklibname introduced in 4.07-1mdk

* Fri Aug 06 2004 Michael Scherer <misc@mandrake.org> 4.10-1mdk
- New release 4.10

* Mon May 17 2004 Oden Eriksson <oeriksson@mandrakesoft.com> 4.09-2mdk
- add one missing header file
- misc spec file fixes

* Sat May 08 2004 Götz Waschk <waschk@linux-mandrake.com> 4.09-1mdk
- add source URL
- New release 4.09

* Sun Apr 04 2004 Götz Waschk <waschk@linux-mandrake.com> 4.08-1mdk
- new version