3c9f4d
Summary: Command-line tools and library for transforming PDF files
3c9f4d
Name:    qpdf
3c9f4d
Version: 7.1.1
404264
Release: 10%{?dist}
3c9f4d
# MIT: e.g. libqpdf/sha2.c
3c9f4d
# upstream uses ASL 2.0 now, but he allowed others to distribute qpdf under
3c9f4d
# old license (see README)
3c9f4d
License: (Artistic 2.0 or ASL 2.0) and MIT
3c9f4d
URL:     http://qpdf.sourceforge.net/
3c9f4d
Source0: http://downloads.sourceforge.net/sourceforge/qpdf/qpdf-%{version}.tar.gz
3c9f4d
3c9f4d
Patch0:  qpdf-doc.patch
3c9f4d
Patch1:  qpdf-CVE-2018-9918.patch
404264
Patch2:  qpdf-gnutls-crypto.patch
404264
Patch3:  qpdf-relax.patch
3c9f4d
3c9f4d
# gcc and gcc-c++ are no longer in buildroot by default
3c9f4d
# gcc is needed for qpdf-ctest.c
3c9f4d
BuildRequires: gcc
3c9f4d
# gcc-c++ is need for everything except for qpdf-ctest
3c9f4d
BuildRequires: gcc-c++
3c9f4d
3c9f4d
BuildRequires: zlib-devel
3c9f4d
BuildRequires: libjpeg-turbo-devel
3c9f4d
BuildRequires: pcre-devel
3c9f4d
3c9f4d
# for fix-qdf and test suite
3c9f4d
BuildRequires: perl-interpreter
3c9f4d
BuildRequires: perl-generators
3c9f4d
BuildRequires: perl(Digest::MD5)
3c9f4d
3c9f4d
# for autoreconf
3c9f4d
BuildRequires: autoconf
3c9f4d
BuildRequires: automake
3c9f4d
BuildRequires: libtool
3c9f4d
404264
# for crypto by gnutls
404264
BuildRequires: gnutls-devel
404264
BuildRequires: pkgconf-pkg-config
404264
3c9f4d
Requires: qpdf-libs%{?_isa} = %{version}-%{release}
3c9f4d
3c9f4d
%package libs
3c9f4d
Summary: QPDF library for transforming PDF files
3c9f4d
3c9f4d
%package devel
3c9f4d
Summary: Development files for QPDF library
3c9f4d
Requires: qpdf-libs%{?_isa} = %{version}-%{release}
3c9f4d
3c9f4d
%package doc
3c9f4d
Summary: QPDF Manual
3c9f4d
BuildArch: noarch
3c9f4d
Requires: qpdf-libs = %{version}-%{release}
3c9f4d
3c9f4d
%description
3c9f4d
QPDF is a command-line program that does structural, content-preserving
3c9f4d
transformations on PDF files. It could have been called something
3c9f4d
like pdf-to-pdf. It includes support for merging and splitting PDFs
3c9f4d
and to manipulate the list of pages in a PDF file. It is not a PDF viewer
3c9f4d
or a program capable of converting PDF into other formats.
3c9f4d
3c9f4d
%description libs
3c9f4d
QPDF is a C++ library that inspect and manipulate the structure of PDF files.
3c9f4d
It can encrypt and linearize files, expose the internals of a PDF file,
3c9f4d
and do many other operations useful to PDF developers.
3c9f4d
3c9f4d
%description devel
3c9f4d
Header files and libraries necessary
3c9f4d
for developing programs using the QPDF library.
3c9f4d
3c9f4d
%description doc
3c9f4d
QPDF Manual
3c9f4d
3c9f4d
%prep
3c9f4d
%setup -q
3c9f4d
3c9f4d
# fix 'complete manual location' note in man pages
3c9f4d
%patch0 -p1 -b .doc
3c9f4d
#  CVE-2018-9918 qpdf: stack exhaustion in QPDFObjectHandle and QPDF_Dictionary classes in libqpdf.a [fedora-all]
3c9f4d
%patch1 -p1 -b .CVE-2018-9918
404264
# 1605101 - qpdf: should not re-implement crypto
404264
%patch2 -p1 -b .gnutls-crypto
404264
# 1605101 - downstream patch for relaxing crypto for deterministic id and decrypt
404264
%patch3 -p1 -b .relax
3c9f4d
3c9f4d
sed -i -e '1s,^#!/usr/bin/env perl,#!/usr/bin/perl,' qpdf/fix-qdf
3c9f4d
3c9f4d
%build
3c9f4d
# work-around check-rpaths errors
3c9f4d
autoreconf --verbose --force --install
3c9f4d
3c9f4d
%configure --disable-static \
404264
           --enable-show-failed-test-output \
404264
           --enable-gnutls
3c9f4d
3c9f4d
make %{?_smp_mflags}
3c9f4d
3c9f4d
%install
3c9f4d
make install DESTDIR=%{buildroot}
3c9f4d
3c9f4d
rm -f %{buildroot}%{_libdir}/libqpdf.la
3c9f4d
3c9f4d
%check
3c9f4d
make check
3c9f4d
3c9f4d
%post libs -p /sbin/ldconfig
3c9f4d
3c9f4d
%postun libs -p /sbin/ldconfig
3c9f4d
3c9f4d
%files
3c9f4d
%{_bindir}/fix-qdf
3c9f4d
%{_bindir}/qpdf
3c9f4d
%{_bindir}/zlib-flate
3c9f4d
%{_mandir}/man1/*
3c9f4d
3c9f4d
%files libs
3c9f4d
%doc README.md TODO ChangeLog
3c9f4d
%license Artistic-2.0
3c9f4d
%{_libdir}/libqpdf*.so.*
3c9f4d
3c9f4d
%files devel
3c9f4d
%doc examples/*.cc examples/*.c
3c9f4d
%{_includedir}/*
3c9f4d
%{_libdir}/libqpdf*.so
3c9f4d
%{_libdir}/pkgconfig/libqpdf.pc
3c9f4d
3c9f4d
%files doc
3c9f4d
%{_pkgdocdir}
3c9f4d
3c9f4d
3c9f4d
%changelog
404264
* Tue Sep 10 2019 Zdenek Dohnal <zdohnal@redhat.com> - 7.1.1-10
404264
- used bad define in previous commit
404264
404264
* Tue Sep 10 2019 Zdenek Dohnal <zdohnal@redhat.com> - 7.1.1-9
404264
- 1605101 - qpdf: should not re-implement crypto - episode II - relaxing crypto for decrypt
404264
404264
* Thu Sep 05 2019 Zdenek Dohnal <zdohnal@redhat.com> - 7.1.1-8
404264
- 1605101 - qpdf: should not re-implement crypto
404264
3c9f4d
* Tue Jul 24 2018 Zdenek Dohnal <zdohnal@redhat.com> - 7.1.1-7
3c9f4d
- correcting license
3c9f4d
3c9f4d
* Wed Jul 11 2018 Zdenek Dohnal <zdohnal@redhat.com> - 7.1.1-6
3c9f4d
- ship license in correct tag, mention optional change of license
3c9f4d
3c9f4d
* Mon Apr 16 2018 Zdenek Dohnal <zdohnal@redhat.com> - 7.1.1-5
3c9f4d
- CVE-2018-9918 qpdf: stack exhaustion in QPDFObjectHandle and QPDF_Dictionary classes in libqpdf.a [fedora-all] 
3c9f4d
3c9f4d
* Mon Feb 19 2018 Zdenek Dohnal <zdohnal@redhat.com> - 7.1.1-4
3c9f4d
- gcc and gcc-c++ are no longer in buildroot by default
3c9f4d
3c9f4d
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 7.1.1-3
3c9f4d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
3c9f4d
3c9f4d
* Thu Feb 08 2018 Zdenek Dohnal <zdohnal@redhat.com> - 7.1.1-2
3c9f4d
- remove old stuff
3c9f4d
3c9f4d
* Mon Feb 05 2018 Zdenek Dohnal <zdohnal@redhat.com> - 7.1.1-1
3c9f4d
- rebase to 7.1.1
3c9f4d
3c9f4d
* Tue Sep 19 2017 Zdenek Dohnal <zdohnal@redhat.com> - 7.0.0-1
3c9f4d
- rebase to 7.0.0
3c9f4d
3c9f4d
* Fri Aug 11 2017 Zdenek Dohnal <zdohnal@redhat.com> - 6.0.0-10
3c9f4d
- adding patches for CVE back (cups-filters needed to rebuild)
3c9f4d
3c9f4d
* Mon Aug 07 2017 Zdenek Dohnal <zdohnal@redhat.com> - 6.0.0-9
3c9f4d
- removing patches for CVEs, because they break other things now
3c9f4d
3c9f4d
* Thu Aug 03 2017 Zdenek Dohnal <zdohnal@redhat.com> - 6.0.0-8
3c9f4d
- 1477213 - Detect recursions loop resolving objects
3c9f4d
- 1454820 - CVE-2017-9208
3c9f4d
- 1454820 - CVE-2017-9209
3c9f4d
- 1454820 - CVE-2017-9210
3c9f4d
3c9f4d
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 6.0.0-7
3c9f4d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
3c9f4d
3c9f4d
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 6.0.0-6
3c9f4d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
3c9f4d
3c9f4d
* Mon May 15 2017 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 6.0.0-5
3c9f4d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_27_Mass_Rebuild
3c9f4d
3c9f4d
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 6.0.0-4
3c9f4d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
3c9f4d
3c9f4d
* Wed Aug 03 2016 Jiri Popelka <jpopelka@redhat.com> - 6.0.0-3
3c9f4d
- %%{_defaultdocdir}/qpdf/ -> %%{_pkgdocdir}
3c9f4d
3c9f4d
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 6.0.0-2
3c9f4d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
3c9f4d
3c9f4d
* Wed Nov 11 2015 Jiri Popelka <jpopelka@redhat.com> - 6.0.0-1
3c9f4d
- 6.0.0
3c9f4d
3c9f4d
* Mon Nov 09 2015 Jiri Popelka <jpopelka@redhat.com> - 5.2.0-1
3c9f4d
- 5.2.0
3c9f4d
3c9f4d
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 5.1.3-2
3c9f4d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
3c9f4d
3c9f4d
* Mon May 25 2015 Jiri Popelka <jpopelka@redhat.com> - 5.1.3
3c9f4d
- New upstream release 5.1.3
3c9f4d
3c9f4d
* Tue Apr 14 2015 Jiri Popelka <jpopelka@redhat.com> - 5.1.2-5
3c9f4d
- rebuilt
3c9f4d
3c9f4d
* Mon Feb 16 2015 Jiri Popelka <jpopelka@redhat.com> - 5.1.2-4
3c9f4d
- rebuilt
3c9f4d
3c9f4d
* Sun Aug 17 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 5.1.2-3
3c9f4d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
3c9f4d
3c9f4d
* Fri Aug 15 2014 Jiri Popelka <jpopelka@redhat.com> - 5.1.2-2
3c9f4d
- Use %%_defaultdocdir instead of %%doc
3c9f4d
3c9f4d
* Mon Jun 09 2014 Jiri Popelka <jpopelka@redhat.com> - 5.1.2-1
3c9f4d
- 5.1.2
3c9f4d
3c9f4d
* Sun Jun 08 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 5.1.1-2
3c9f4d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
3c9f4d
3c9f4d
* Wed Jan 15 2014 Jiri Popelka <jpopelka@redhat.com> - 5.1.1-1
3c9f4d
- 5.1.1
3c9f4d
3c9f4d
* Wed Dec 18 2013 Jiri Popelka <jpopelka@redhat.com> - 5.1.0-1
3c9f4d
- 5.1.0
3c9f4d
3c9f4d
* Mon Oct 21 2013 Jiri Popelka <jpopelka@redhat.com> - 5.0.1-1
3c9f4d
- 5.0.1
3c9f4d
3c9f4d
* Sat Aug 03 2013 Petr Pisar <ppisar@redhat.com> - 5.0.0-4
3c9f4d
- Perl 5.18 rebuild
3c9f4d
3c9f4d
* Mon Jul 22 2013 Jiri Popelka <jpopelka@redhat.com> - 5.0.0-3
3c9f4d
- change shebang to absolute path (#987040)
3c9f4d
3c9f4d
* Wed Jul 17 2013 Petr Pisar <ppisar@redhat.com> - 5.0.0-2
3c9f4d
- Perl 5.18 rebuild
3c9f4d
3c9f4d
* Thu Jul 11 2013 Jiri Popelka <jpopelka@redhat.com> - 5.0.0-1
3c9f4d
- 5.0.0
3c9f4d
3c9f4d
* Mon Jul 08 2013 Jiri Popelka <jpopelka@redhat.com> - 4.2.0-1
3c9f4d
- 4.2.0
3c9f4d
3c9f4d
* Thu May 23 2013 Jiri Popelka <jpopelka@redhat.com> - 4.1.0-3
3c9f4d
- fix 'complete manual location' note in man pages (#966534)
3c9f4d
3c9f4d
* Tue May 07 2013 Jiri Popelka <jpopelka@redhat.com> - 4.1.0-2
3c9f4d
- some source files are under MIT license
3c9f4d
3c9f4d
* Mon Apr 15 2013 Jiri Popelka <jpopelka@redhat.com> - 4.1.0-1
3c9f4d
- 4.1.0
3c9f4d
3c9f4d
* Tue Mar 05 2013 Jiri Popelka <jpopelka@redhat.com> - 4.0.1-3
3c9f4d
- work around gcc 4.8.0 issue on ppc64 (#915321)
3c9f4d
- properly handle overridden compressed objects
3c9f4d
3c9f4d
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.0.1-2
3c9f4d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
3c9f4d
3c9f4d
* Fri Jan 18 2013 Jiri Popelka <jpopelka@redhat.com> 4.0.1-1
3c9f4d
- 4.0.1
3c9f4d
3c9f4d
* Wed Jan 02 2013 Jiri Popelka <jpopelka@redhat.com> 4.0.0-1
3c9f4d
- 4.0.0
3c9f4d
3c9f4d
* Fri Sep 07 2012 Jiri Popelka <jpopelka@redhat.com> 3.0.2-1
3c9f4d
- 3.0.2
3c9f4d
3c9f4d
* Thu Aug 16 2012 Jiri Popelka <jpopelka@redhat.com> 3.0.1-3
3c9f4d
- the previously added requirement doesn't need to be arch-specific
3c9f4d
3c9f4d
* Thu Aug 16 2012 Jiri Popelka <jpopelka@redhat.com> 3.0.1-2
3c9f4d
- doc subpackage requires libs subpackage due to license file (#848466)
3c9f4d
3c9f4d
* Wed Aug 15 2012 Jiri Popelka <jpopelka@redhat.com> 3.0.1-1
3c9f4d
- initial spec file