Blame SPECS/cups-filters.spec

d35507
# we build CUPS also with relro
d35507
%global _hardened_build 1
d35507
d35507
Summary: OpenPrinting CUPS filters and backends
d35507
Name:    cups-filters
d35507
Version: 1.0.35
d35507
Release: 26%{?dist}
d35507
d35507
# For a breakdown of the licensing, see COPYING file
d35507
# GPLv2:   filters: commandto*, imagetoraster, pdftops, rasterto*,
d35507
#                   imagetopdf, pstopdf, texttopdf
d35507
#         backends: parallel, serial
d35507
# GPLv2+:  filters: textonly, texttops, imagetops
d35507
# GPLv3:   filters: bannertopdf
d35507
# GPLv3+:  filters: urftopdf
d35507
# LGPLv2+:   utils: cups-browsed
d35507
# MIT:     filters: pdftoijs, pdftoopvp, pdftopdf, pdftoraster
d35507
License: GPLv2 and GPLv2+ and GPLv3 and GPLv3+ and LGPLv2+ and MIT
d35507
d35507
Group:   System Environment/Base
d35507
Url:     http://www.linuxfoundation.org/collaborate/workgroups/openprinting/cups-filters
d35507
Source0: http://www.openprinting.org/download/cups-filters/cups-filters-%{version}.tar.xz
d35507
d35507
# source files from cups-filters-1.13.4 for partial rebase of cups-browsed and introducing
d35507
# implicitclass backend for high availability and load balancing
d35507
Source1: backend.tar.gz
d35507
Source2: m4.tar.gz
d35507
Source3: utils.tar.gz
d35507
Source4: configure.ac
d35507
Source5: Makefile.am
d35507
d35507
Patch1:  cups-filters-page-label.patch
d35507
Patch2:  cups-filters-filter-costs.patch
d35507
Patch3:  cups-filters-urftopdf.patch
d35507
Patch4:  cups-filters-format-mismatch.patch
d35507
Patch5:  cups-filters-pdf-landscape.patch
d35507
Patch6:  cups-filters-pdftoopvp.patch
d35507
Patch7:  cups-filters-CVE-2013-6475.patch
d35507
Patch8:  cups-filters-poppler023.patch
d35507
Patch9:  cups-filters-CVE-2015-3258-3279.patch
d35507
# fixed covscan issues from upstream
d35507
Patch10: 0001-Fixing-covscan-issues.patch
d35507
# badly fixed coverity issue (bug #1700333)
d35507
Patch11: 0001-cups-browsed-Fixed-freeing-of-literal-string-caused-.patch
d35507
# bad paths in manpages (bug #1508018)
d35507
Patch12: cups-filters-manpages.patch
d35507
d35507
Requires: cups-filters-libs%{?_isa} = %{version}-%{release}
d35507
d35507
# Obsolete cups-php (bug #971741)
d35507
Obsoletes: cups-php < 1:1.6.0-1
d35507
# Don't Provide it because we don't build the php module
d35507
#Provides: cups-php = 1:1.6.0-1
d35507
d35507
BuildRequires: cups-devel
d35507
# pdftopdf
d35507
BuildRequires: qpdf-devel
d35507
# pdftops
d35507
BuildRequires: poppler-utils
d35507
# pdftoijs, pdftoopvp, pdftoraster
d35507
BuildRequires: poppler-devel poppler-cpp-devel
d35507
BuildRequires: libjpeg-devel
d35507
BuildRequires: libpng-devel
d35507
BuildRequires: libtiff-devel
d35507
BuildRequires: zlib-devel
d35507
# libijs
d35507
BuildRequires: ghostscript-devel
d35507
BuildRequires: freetype-devel
d35507
BuildRequires: fontconfig-devel
d35507
BuildRequires: lcms2-devel
d35507
# cups-browsed
d35507
BuildRequires: avahi-devel avahi-glib-devel
d35507
BuildRequires: systemd
d35507
d35507
# Make sure we get postscriptdriver tags.
d35507
BuildRequires: python-cups
d35507
d35507
# autogen.sh
d35507
BuildRequires: autoconf
d35507
BuildRequires: automake
d35507
BuildRequires: libtool
d35507
d35507
# gdbus-codegen is used in Makefile.am for generating cups-notifier code,
d35507
# so we need glib2-devel
d35507
BuildRequires: glib2-devel
d35507
d35507
# dbus-devel is needed for new dbus CMS functionality
d35507
BuildRequires: dbus-devel
d35507
d35507
Requires: cups-filesystem
d35507
Requires: poppler-utils
d35507
d35507
# texttopdf
d35507
Requires: liberation-mono-fonts
d35507
d35507
# pstopdf
d35507
Requires: bc grep sed which
d35507
d35507
# cups-browsed
d35507
Requires(post): systemd
d35507
Requires(preun): systemd
d35507
Requires(postun): systemd
d35507
d35507
%package libs
d35507
Summary: OpenPrinting CUPS filters and backends - cupsfilters and fontembed libraries
d35507
Group:   System Environment/Libraries
d35507
# LGPLv2: libcupsfilters
d35507
# MIT:    libfontembed
d35507
License: LGPLv2 and MIT
d35507
d35507
%package devel
d35507
Summary: OpenPrinting CUPS filters and backends - development environment
d35507
Group:   Development/Libraries
d35507
License: LGPLv2 and MIT
d35507
Requires: cups-filters-libs%{?_isa} = %{version}-%{release}
d35507
d35507
%description
d35507
Contains backends, filters, and other software that was
d35507
once part of the core CUPS distribution but is no longer maintained by
d35507
Apple Inc. In addition it contains additional filters developed
d35507
independently of Apple, especially filters for the PDF-centric printing
d35507
workflow introduced by OpenPrinting.
d35507
d35507
%description libs
d35507
This package provides cupsfilters and fontembed libraries.
d35507
d35507
%description devel
d35507
This is the development package for OpenPrinting CUPS filters and backends.
d35507
d35507
%prep
d35507
# untar m4.tar.gz, backend.tar.gz and utils.tar.gz after untaring main source
d35507
# tarball and going into the it
d35507
%setup -q -a 1 -a 2 -a 3
d35507
d35507
# copy configure.ac and Makefile.am into untared directory
d35507
cp %{SOURCE4} .
d35507
cp %{SOURCE5} .
d35507
d35507
# Added support for page-label (bug #987515).
d35507
%patch1 -p1 -b .page-label
d35507
d35507
# Upstream patch to re-work filter costs (bug #998981).
d35507
%patch2 -p1 -b .filter-costs
d35507
d35507
# Don't ship urftopdf for now (bug #1002947).
d35507
%patch3 -p1 -b .urftopdf
d35507
d35507
# Fixes for some printf-type format mismatches (bug #1003035).
d35507
%patch4 -p1 -b .format-mismatch
d35507
d35507
# Fix PDF landscape printing (bug #1018313).
d35507
%patch5 -p1 -b .pdf-landscape
d35507
d35507
# Don't ship pdftoopvp for now (bug #1027557).
d35507
%patch6 -p1 -b .pdftoopvp
d35507
d35507
# Apply CVE-2013-6475 to pdftoopvp even though we don't ship it
d35507
# (bug #1052741).
d35507
%patch7 -p1 -b .CVE-2013-6475
d35507
d35507
# Build against newer poppler (bug #1217552).
d35507
%patch8 -p1 -b .poppler023
d35507
d35507
# Fix heap-based buffer overflow in texttopdf filter (bug #1194263,
d35507
# CVE-2015-3258, CVE-2015-3279).
d35507
%patch9 -p1 -b .CVE-2015-3258-3279
d35507
d35507
# fixed covscan issues from upstream
d35507
%patch10 -p1 -b .covscan
d35507
d35507
# 1700333 - [abrt] [faf] cups-filters: raise(): /usr/sbin/cups-browsed killed by 6
d35507
%patch11 -p1 -b .abrt-during-restart
d35507
d35507
# 1508018 - man pages: wrong links in man cups-browsed
d35507
%patch12 -p1 -b .manpages
d35507
d35507
%build
d35507
# work-around Rpath
d35507
./autogen.sh
d35507
d35507
# --with-pdftops=pdftops - use Poppler instead of Ghostscript (see README)
d35507
# --with-rcdir=no - don't install SysV init script
d35507
%configure --disable-static \
d35507
           --disable-silent-rules \
d35507
           --with-pdftops=pdftops \
d35507
           --with-rcdir=no
d35507
d35507
make %{?_smp_mflags}
d35507
d35507
%install
d35507
make install DESTDIR=%{buildroot}
d35507
d35507
# https://fedoraproject.org/wiki/Packaging_tricks#With_.25doc
d35507
mkdir __doc
d35507
mv  %{buildroot}%{_datadir}/doc/cups-filters/* __doc
d35507
rm -rf %{buildroot}%{_datadir}/doc/cups-filters
d35507
d35507
# Don't ship libtool la files.
d35507
rm -f %{buildroot}%{_libdir}/lib*.la
d35507
d35507
# Not sure what is this good for.
d35507
rm -f %{buildroot}%{_bindir}/ttfread
d35507
d35507
# systemd unit file
d35507
mkdir -p %{buildroot}%{_unitdir}
d35507
install -p -m 644 utils/cups-browsed.service %{buildroot}%{_unitdir}
d35507
d35507
%post
d35507
%systemd_post cups-browsed.service
d35507
d35507
# Initial installation
d35507
if [ $1 -eq 1 ] ; then
d35507
    IN=%{_sysconfdir}/cups/cupsd.conf
d35507
    OUT=%{_sysconfdir}/cups/cups-browsed.conf
d35507
    keyword=BrowsePoll
d35507
d35507
    # We can remove this after few releases, it's just for the introduction of cups-browsed.
d35507
    if [ -f "$OUT" ]; then
d35507
        echo -e "\n# NOTE: This file is not part of CUPS. You need to start & enable cups-browsed service." >> "$OUT"
d35507
    fi
d35507
d35507
    # move BrowsePoll from cupsd.conf to cups-browsed.conf
d35507
    if [ -f "$IN" ] && grep -iq ^$keyword "$IN"; then
d35507
        if ! grep -iq ^$keyword "$OUT"; then
d35507
            (cat >> "$OUT" <
d35507
d35507
# Settings automatically moved from cupsd.conf by RPM package:
d35507
EOF
d35507
            ) || :
d35507
            (grep -i ^$keyword "$IN" >> "$OUT") || :
d35507
            #systemctl enable cups-browsed.service >/dev/null 2>&1 || :
d35507
        fi
d35507
        sed -i -e "s,^$keyword,#$keyword directive moved to cups-browsed.conf\n#$keyword,i" "$IN" || :
d35507
    fi
d35507
fi
d35507
d35507
%preun
d35507
%systemd_preun cups-browsed.service
d35507
d35507
%postun
d35507
%systemd_postun_with_restart cups-browsed.service 
d35507
d35507
%post libs -p /sbin/ldconfig
d35507
d35507
%postun libs -p /sbin/ldconfig
d35507
d35507
d35507
%files
d35507
%doc __doc/README __doc/AUTHORS __doc/NEWS
d35507
%config(noreplace) %{_sysconfdir}/cups/cups-browsed.conf
d35507
%attr(0755,root,root) %{_cups_serverbin}/filter/*
d35507
%attr(0755,root,root) %{_cups_serverbin}/backend/parallel
d35507
%attr(0755,root,root) %{_cups_serverbin}/backend/implicitclass
d35507
# Serial backend needs to run as root (bug #212577#c4).
d35507
%attr(0700,root,root) %{_cups_serverbin}/backend/serial
d35507
%{_datadir}/cups/banners
d35507
%{_datadir}/cups/charsets
d35507
%{_datadir}/cups/data/*
d35507
# this needs to be in the main package because of cupsfilters.drv
d35507
%{_datadir}/cups/ppdc/pcl.h
d35507
%{_datadir}/cups/drv/cupsfilters.drv
d35507
%{_datadir}/cups/mime/cupsfilters.types
d35507
%{_datadir}/cups/mime/cupsfilters.convs
d35507
%{_datadir}/ppd/cupsfilters
d35507
%{_sbindir}/cups-browsed
d35507
%{_unitdir}/cups-browsed.service
d35507
%{_mandir}/man8/cups-browsed.8.gz
d35507
%{_mandir}/man5/cups-browsed.conf.5.gz
d35507
d35507
%files libs
d35507
%doc __doc/COPYING fontembed/README
d35507
%attr(0755,root,root) %{_libdir}/libcupsfilters.so.*
d35507
%attr(0755,root,root) %{_libdir}/libfontembed.so.*
d35507
d35507
%files devel
d35507
%{_includedir}/cupsfilters
d35507
%{_includedir}/fontembed
d35507
%{_libdir}/pkgconfig/libcupsfilters.pc
d35507
%{_libdir}/pkgconfig/libfontembed.pc
d35507
%{_libdir}/libcupsfilters.so
d35507
%{_libdir}/libfontembed.so
d35507
d35507
%changelog
d35507
* Tue May 21 2019 Zdenek Dohnal <zdohnal@redhat.com> - 1.0.35-26
d35507
- 1508018 - man pages: wrong links in man cups-browsed
d35507
d35507
* Wed Apr 17 2019 Zdenek Dohnal <zdohnal@redhat.com> - 1.0.35-25
d35507
- 1700333 - [abrt] [faf] cups-filters: raise(): /usr/sbin/cups-browsed killed by 6
d35507
d35507
* Mon Mar 18 2019 Zdenek Dohnal <zdohnal@redhat.com> - 1.0.35-24
d35507
- fixing covscan issues, backported from upstream - 1485502
d35507
d35507
* Wed Feb 20 2019 Zdenek Dohnal <zdohnal@redhat.com> - 1.0.35-23
d35507
- 1485502 - Rebase cups-browsed to latest version in upstream cups-filters
d35507
d35507
* Thu Mar 02 2017 Zdenek Dohnal <zdohnal@redhat.com> - 1.0.35-22
d35507
- 1427690 - /usr/lib/cups/filter/pstopdf: line 17: which: command not found
d35507
d35507
* Thu Jul  9 2015 Tim Waugh <twaugh@redhat.com> - 1.0.35-21
d35507
- Fix heap-based buffer overflow in texttopdf filter (bug #1241242,
d35507
  CVE-2015-3258, CVE-2015-3279).
d35507
d35507
* Thu Jun 25 2015 Tim Waugh <twaugh@redhat.com> - 1.0.35-20
d35507
- Improvements to cups-browsed efficiency patch (bug #1191691).
d35507
d35507
* Mon Jun 22 2015 Tim Waugh <twaugh@redhat.com> - 1.0.35-18
d35507
- Fix segfault in texttopdf filter (bug #1194263).
d35507
- Improve cups-browsed efficiency (bug #1191691).
d35507
- Fetch printer descriptions with cups-browsed (bug #1223719).
d35507
- Fix cups-browsed "_" handling for printer names (bug #1167408).
d35507
d35507
* Tue Jun 16 2015 Tim Waugh <twaugh@redhat.com> - 1.0.35-17
d35507
- Build against newer poppler (bug #1217552).
d35507
d35507
* Wed Oct  8 2014 Tim Waugh <twaugh@redhat.com> - 1.0.35-16
d35507
- Applied upstream patch to fix BrowseAllow parsing issue
d35507
  (CVE-2014-4338, bug #1091568).
d35507
- Applied upstream patch for cups-browsed DoS via
d35507
  process_browse_data() out-of-bounds read (CVE-2014-4337,
d35507
  bug #1111510).
d35507
d35507
* Fri Mar 28 2014 Tim Waugh <twaugh@redhat.com> - 1.0.35-15
d35507
- The texttopdf filter requires a TrueType monospaced font
d35507
  (bug #1070729).
d35507
d35507
* Fri Jan 24 2014 Daniel Mach <dmach@redhat.com> - 1.0.35-14
d35507
- Mass rebuild 2014-01-24
d35507
d35507
* Mon Jan 20 2014 Tim Waugh <twaugh@redhat.com> - 1.0.35-13
d35507
- Apply CVE-2013-6475 to pdftoopvp even though we don't ship it
d35507
  (bug #1052741).
d35507
d35507
* Fri Dec 27 2013 Daniel Mach <dmach@redhat.com> - 1.0.35-12
d35507
- Mass rebuild 2013-12-27
d35507
d35507
* Fri Nov  8 2013 Tim Waugh <twaugh@redhat.com> - 1.0.35-11
d35507
- Don't ship pdftoopvp for now (bug #1027557).
d35507
d35507
* Wed Oct 16 2013 Tim Waugh <twaugh@redhat.com> - 1.0.35-10
d35507
- Fix PDF landscape printing (bug #1018313).
d35507
d35507
* Tue Oct  1 2013 Tim Waugh <twaugh@redhat.com> - 1.0.35-9
d35507
- Fixes for some printf-type format mismatches (bug #1003035).
d35507
d35507
* Fri Aug 30 2013 Tim Waugh <twaugh@redhat.com> - 1.0.35-8
d35507
- Don't ship urftopdf for now (bug #1002947).
d35507
d35507
* Wed Aug 21 2013 Tim Waugh <twaugh@redhat.com> - 1.0.35-7
d35507
- Upstream patch to re-work filter costs (bug #998981). No longer need
d35507
  text filter costs patch as paps gets used by default now if
d35507
  installed.
d35507
d35507
* Tue Jul 30 2013 Tim Waugh <twaugh@redhat.com> - 1.0.35-6
d35507
- Set cost for text filters to 200 so that the paps filter gets
d35507
  preference for the time being (bug #988909).
d35507
d35507
* Wed Jul 24 2013 Tim Waugh <twaugh@redhat.com> - 1.0.35-5
d35507
- Handle page-label when printing n-up as well.
d35507
d35507
* Tue Jul 23 2013 Tim Waugh <twaugh@redhat.com> - 1.0.35-4
d35507
- Added support for page-label (bug #987515).
d35507
d35507
* Thu Jul 11 2013 Jiri Popelka <jpopelka@redhat.com> - 1.0.35-3
d35507
- Rebuild (qpdf-5.0.0)
d35507
d35507
* Mon Jul 01 2013 Jiri Popelka <jpopelka@redhat.com> - 1.0.35-2
d35507
- add cups-browsed(8) and cups-browsed.conf(5)
d35507
- don't reverse lookup IP address in URI (#975822)
d35507
d35507
* Wed Jun 26 2013 Jiri Popelka <jpopelka@redhat.com> - 1.0.35-1
d35507
- 1.0.35
d35507
d35507
* Mon Jun 24 2013 Marek Kasik <mkasik@redhat.com> - 1.0.34-9
d35507
- Rebuild (poppler-0.22.5)
d35507
d35507
* Wed Jun 19 2013 Jiri Popelka <jpopelka@redhat.com> - 1.0.34-8
d35507
- fix the note we add in cups-browsed.conf
d35507
d35507
* Wed Jun 12 2013 Jiri Popelka <jpopelka@redhat.com> - 1.0.34-7
d35507
- Obsolete cups-php (#971741)
d35507
d35507
* Wed Jun 05 2013 Jiri Popelka <jpopelka@redhat.com> - 1.0.34-6
d35507
- one more cups-browsed leak fixed (#959682)
d35507
d35507
* Wed Jun 05 2013 Jiri Popelka <jpopelka@redhat.com> - 1.0.34-5
d35507
- perl is actually not required by pstopdf, because the calling is in dead code
d35507
d35507
* Mon Jun 03 2013 Jiri Popelka <jpopelka@redhat.com> - 1.0.34-4
d35507
- fix resource leaks and other problems found by Coverity & Valgrind (#959682)
d35507
d35507
* Wed May 15 2013 Jiri Popelka <jpopelka@redhat.com> - 1.0.34-3
d35507
- ship ppdc/pcl.h because of cupsfilters.drv
d35507
d35507
* Tue May 07 2013 Jiri Popelka <jpopelka@redhat.com> - 1.0.34-2
d35507
- pstopdf requires bc (#960315)
d35507
d35507
* Thu Apr 11 2013 Jiri Popelka <jpopelka@redhat.com> - 1.0.34-1
d35507
- 1.0.34
d35507
d35507
* Fri Apr 05 2013 Fridolin Pokorny <fpokorny@redhat.com> - 1.0.33-1
d35507
- 1.0.33
d35507
- removed cups-filters-1.0.32-null-info.patch, accepted by upstream
d35507
d35507
* Thu Apr 04 2013 Fridolin Pokorny <fpokorny@redhat.com> - 1.0.32-2
d35507
- fixed segfault when info is NULL
d35507
d35507
* Thu Apr 04 2013 Fridolin Pokorny <fpokorny@redhat.com> - 1.0.32-1
d35507
- 1.0.32
d35507
d35507
* Fri Mar 29 2013 Jiri Popelka <jpopelka@redhat.com> - 1.0.31-3
d35507
- add note to cups-browsed.conf
d35507
d35507
* Thu Mar 28 2013 Jiri Popelka <jpopelka@redhat.com> - 1.0.31-2
d35507
- check cupsd.conf existence prior to grepping it (#928816)
d35507
d35507
* Fri Mar 22 2013 Jiri Popelka <jpopelka@redhat.com> - 1.0.31-1
d35507
- 1.0.31
d35507
d35507
* Tue Mar 19 2013 Jiri Popelka <jpopelka@redhat.com> - 1.0.30-4
d35507
- revert previous change
d35507
d35507
* Wed Mar 13 2013 Jiri Popelka <jpopelka@redhat.com> - 1.0.30-3
d35507
- don't ship banners for now (#919489)
d35507
d35507
* Tue Mar 12 2013 Jiri Popelka <jpopelka@redhat.com> - 1.0.30-2
d35507
- move BrowsePoll from cupsd.conf to cups-browsed.conf in %%post
d35507
d35507
* Fri Mar 08 2013 Jiri Popelka <jpopelka@redhat.com> - 1.0.30-1
d35507
- 1.0.30: CUPS browsing and broadcasting in cups-browsed
d35507
d35507
* Wed Feb 13 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.29-4
d35507
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
d35507
d35507
* Sat Jan 19 2013 Rex Dieter <rdieter@fedoraproject.org> 1.0.29-3
d35507
- backport upstream buildfix for poppler-0.22.x
d35507
d35507
* Fri Jan 18 2013 Adam Tkac <atkac redhat com> - 1.0.29-2
d35507
- rebuild due to "jpeg8-ABI" feature drop
d35507
d35507
* Thu Jan 03 2013 Jiri Popelka <jpopelka@redhat.com> 1.0.29-1
d35507
- 1.0.29
d35507
d35507
* Wed Jan 02 2013 Jiri Popelka <jpopelka@redhat.com> 1.0.28-1
d35507
- 1.0.28: cups-browsed daemon and service
d35507
d35507
* Thu Nov 29 2012 Jiri Popelka <jpopelka@redhat.com> 1.0.25-1
d35507
- 1.0.25
d35507
d35507
* Fri Sep 07 2012 Jiri Popelka <jpopelka@redhat.com> 1.0.24-1
d35507
- 1.0.24
d35507
d35507
* Wed Aug 22 2012 Jiri Popelka <jpopelka@redhat.com> 1.0.23-1
d35507
- 1.0.23: old pdftopdf removed
d35507
d35507
* Tue Aug 21 2012 Jiri Popelka <jpopelka@redhat.com> 1.0.22-1
d35507
- 1.0.22: new pdftopdf (uses qpdf instead of poppler)
d35507
d35507
* Wed Aug 08 2012 Jiri Popelka <jpopelka@redhat.com> 1.0.20-4
d35507
- rebuild
d35507
d35507
* Thu Aug 02 2012 Jiri Popelka <jpopelka@redhat.com> 1.0.20-3
d35507
- commented multiple licensing breakdown (#832130)
d35507
- verbose build output
d35507
d35507
* Thu Aug 02 2012 Jiri Popelka <jpopelka@redhat.com> 1.0.20-2
d35507
- BuildRequires: poppler-cpp-devel (to build against poppler-0.20)
d35507
d35507
* Mon Jul 23 2012 Jiri Popelka <jpopelka@redhat.com> 1.0.20-1
d35507
- 1.0.20
d35507
d35507
* Tue Jul 17 2012 Jiri Popelka <jpopelka@redhat.com> 1.0.19-1
d35507
- 1.0.19
d35507
d35507
* Wed May 30 2012 Jiri Popelka <jpopelka@redhat.com> 1.0.18-1
d35507
- initial spec file