%define lpadmin_uid 65032 %define lpadmin_gid 65032 %define lp_uid 9 %define lp_gid 9 %define libname libcups Name: cups Version: 2.2.5 Release: 1mamba Summary: Common UNIX Printing System Group: System/Spooling Vendor: openmamba Distribution: openmamba Packager: Silvan Calarco URL: http://www.cups.org Source0: https://github.com/apple/cups/releases/download/v%{version}/cups-%{version}-source.tar.gz #Source0: http://www.cups.org/software/%{version}/cups-%{version}-source.tar.bz2 Source1: cups-pamd Source2: cups-initscript Source3: cups.service Source4: cups.socket Source5: cups.path Source6: cups-lpd.socket Source7: cups-lpd@.service Patch0: %{name}-1.4.4-str3461-1.4.patch Patch1: %{name}-1.5.0-set_retry_job_default_ErrorPolicy.patch Patch2: cups-1.6.1-usb-backend-reset-after-job-only-for-specific-devices-3.patch Patch3: cups-1.7.0-statedir.patch License: GPL ## AUTOBUILDREQ-BEGIN BuildRequires: glibc-devel BuildRequires: libacl-devel BuildRequires: libavahi-devel BuildRequires: libdbus-devel BuildRequires: libe2fs-devel BuildRequires: libgcc BuildRequires: libgnutls-devel BuildRequires: libkrb5-devel BuildRequires: libpam-devel BuildRequires: libstdc++6-devel BuildRequires: libsystemd-devel BuildRequires: libusb-devel BuildRequires: libz-devel ## AUTOBUILDREQ-END Requires: ghostscript >= 8.57 Requires: openssl Requires(post):%{libname} = %{version}-%{release} Requires: cups-filters Requires: colord %systemd_requires BuildRoot: %{_tmppath}/%{name}-%{version}-root %description The Common UNIX Printing System provides a portable printing layer for UNIX operating systems. It has been developed by Easy Software Products to promote a standard printing solution for all UNIX vendors and users. CUPS provides the System V and Berkeley command-line interfaces. %package -n %{libname}-devel Summary: Devel package for CUPS Group: Development/Libraries Requires: %{name} = %{version}-%{release} Requires: %{libname} = %{version}-%{release} %description -n %{libname}-devel The Common UNIX Printing System ("CUPS") is a cross-platform printing solution for all UNIX environments. It is based on the "Internet Printing Protocol" and provides complete printing services to most PostScript and raster printers. This is the development package. %package -n %{libname} Summary: Libraries for CUPS Group: System/Libraries %description -n %{libname} The Common UNIX Printing System ("CUPS") is a cross-platform printing solution for all UNIX environments. It is based on the "Internet Printing Protocol" and provides complete printing services to most PostScript and raster printers. %prep %setup -q #%patch0 -p1 %patch1 -p1 #%patch2 -p0 %patch3 -p1 %build autoconf %configure \ --enable-ssl \ --enable-static \ --with-icondir=%{_datadir}/icons \ --without-xinetd # --with-cups-user=lpadmin \ # --with-cups-group=lpadmin %make %install [ "%{buildroot}" != / ] && rm -rf %{buildroot} %makeinstall BUILDROOT=%{buildroot} CUPS_USER=root CUPS_GROUP=root install -D %{SOURCE1} %{buildroot}%{_sysconfdir}/pam.d/cups install -d %{buildroot}/var/log/cups install -d %{buildroot}/var/spool/cups/tmp # fake printers.conf, allows %config(noreplace) update from olter rpm releases touch %{buildroot}%{_sysconfdir}/cups/printers.conf # remove unneeded files #rm -rf %{buildroot}%{_mandir}/{cat1,cat3,cat5,cat8} \ # %{buildroot}%{_mandir}/es/{cat1,cat3,cat5,cat8} \ # %{buildroot}%{_mandir}/fr/{cat1,cat3,cat5,cat8} \ # cups installs .po files instead of .mo, so the find_lang macro won't work > %{name}.lang #for i in da de es eu fi fr hu id it ja ko nl no pl pt pt_BR ru sv zh zh_TW; do for i in ca cs de es fr it ja ru; do echo "%lang($i) %{_datadir}/locale/$i/cups_$i.po" >> %{name}.lang done # required by php in cups-filter, although php in cups-filter does not currently build install -m0644 cups/string-private.h %{buildroot}%{_includedir}/cups/string-private.h install -m0644 cups/debug-private.h %{buildroot}%{_includedir}/cups/debug-private.h # systemd install -D -m0644 %{SOURCE3} %{buildroot}%{_unitdir}/cups.service install -D -m0644 %{SOURCE4} %{buildroot}%{_unitdir}/cups.socket install -D -m0644 %{SOURCE5} %{buildroot}%{_unitdir}/cups.path install -D -m0644 %{SOURCE6} %{buildroot}%{_unitdir}/cups-lpd.socket install -D -m0644 %{SOURCE7} %{buildroot}%{_unitdir}/cups-lpd@.service # basic cups client configuration file echo "ServerName /run/cups/cups.sock" > %{buildroot}%{_sysconfdir}/cups/client.conf # remove files provides by cups-filters rm -f %{buildroot}%{_datadir}/cups/banners/{classified,confidential,secret,standard,topsecret,unclassified} rm -f %{buildroot}%{_datadir}/cups/data/testprint rm -rf %{buildroot}%{_sysconfdir}/rc*.d/K36cups rm -rf %{buildroot}%{_sysconfdir}/rc*.d/S81cups install -d %{buildroot}%{_presetdir} cat > %{buildroot}%{_presetdir}/50-cups.preset << _EOF enable cups _EOF %clean [ "%{buildroot}" != / ] && rm -rf %{buildroot} %post -n %{libname} -p /sbin/ldconfig %postun -n %{libname} -p /sbin/ldconfig %pre /usr/sbin/groupadd lp -g %{lp_gid} &>/dev/null /usr/sbin/useradd lp -d /var/spool/cups -s /bin/false \ -u %{lp_uid} -g %{lp_gid} &>/dev/null /usr/sbin/groupadd lpadmin -g %{lpadmin_gid} &>/dev/null /usr/sbin/useradd lpadmin -c "Cups printing daemon" -d /dev/null \ -s /bin/false -u %{lpadmin_uid} -g %{lpadmin_gid} &>/dev/null exit 0 %post # new install /sbin/ldconfig if [ $1 -gt 1 ]; then if [ ! "`grep ErrorPolicy %{_sysconfdir}/cups/cupsd.conf`" ]; then echo "ErrorPolicy retry-job" >> %{_sysconfdir}/cups/cupsd.conf [ -e %{_sysconfdir}/cups/printers.conf ] && \ sed -i "s|ErrorPolicy stop-printer|ErrorPolicy retry-job|" %{_sysconfdir}/cups/printers.conf fi fi %systemd_post cups if [ $1 -ge 1 ]; then systemctl -q daemon-reload systemctl -q enable cups fi : %preun # erase %systemd_preun cups if [ $1 -eq 0 ]; then /usr/sbin/groupdel lp &>/dev/null /usr/sbin/userdel lp &>/dev/null /usr/sbin/groupdel lpadmin &>/dev/null /usr/sbin/userdel lpadmin &>/dev/null fi /sbin/ldconfig : %postun %systemd_postun_with_restart cups : %posttrans if [ $1 -eq 1 ]; then [ -e %{_sysconfdir}/cups/printers.conf.rpmsave -a \ ! -e %{_sysconfdir}/cups/printers.conf ] && \ mv %{_sysconfdir}/cups/printers.conf.rpmsave %{_sysconfdir}/cups/printers.conf sed -i "s|/var/run|/run|" %{_sysconfdir}/cups/cupsd.conf fi : %files -f %{name}.lang %defattr(-,root,root) %{_sysconfdir}/dbus-1/system.d/cups.conf #%{_sysconfdir}/xinetd.d/cups-lpd #%{_sysconfdir}/init.d/cups %attr(0775,root,lpadmin) %dir %{_sysconfdir}/cups %config(noreplace) %attr(-,root,lpadmin) %{_sysconfdir}/cups/* %config(noreplace) %attr(0644,root,root) %{_sysconfdir}/pam.d/cups %{_bindir}/cancel %{_bindir}/cupstestppd %{_bindir}/cupstestdsc %{_bindir}/ippfind %{_bindir}/ipptool %{_bindir}/lp %{_bindir}/lpoptions #%attr(4755,lp,lp) %{_bindir}/lppasswd %{_bindir}/lpq %{_bindir}/lpr %{_bindir}/lprm %{_bindir}/lpstat %{_bindir}/ppdc %{_bindir}/ppdhtml %{_bindir}/ppdi %{_bindir}/ppdmerge %{_bindir}/ppdpo %{_sbindir}/accept %{_sbindir}/cupsaccept %{_sbindir}/cupsaddsmb %{_sbindir}/cupsctl %{_sbindir}/cupsd %{_sbindir}/cupsdisable %{_sbindir}/cupsenable %{_sbindir}/cupsfilter %{_sbindir}/cupsreject %{_sbindir}/lpadmin %{_sbindir}/lpc %{_sbindir}/lpinfo %{_sbindir}/lpmove %{_sbindir}/reject %{_presetdir}/50-cups.preset %{_unitdir}/org.cups.cupsd.path %{_unitdir}/org.cups.cupsd.service %{_unitdir}/org.cups.cupsd.socket %{_unitdir}/org.cups.cups-lpd.socket %{_unitdir}/org.cups.cups-lpd@.service %{_unitdir}/cups.path %{_unitdir}/cups.service %{_unitdir}/cups.socket %{_unitdir}/cups-lpd.socket %{_unitdir}/cups-lpd@.service %{_datadir}/applications/cups.desktop %{_datadir}/icons/hicolor/*/apps/cups.png %dir %{_datadir}/cups %{_datadir}/cups/* %dir %{_prefix}/lib/cups %{_prefix}/lib/cups/* %dir /var/log/cups %attr(0700,lp,root) %dir /var/spool/cups %attr(1700,lp,root) %dir /var/spool/cups/tmp %{_mandir}/man1/* %{_mandir}/man5/* %{_mandir}/man7/backend.7* %{_mandir}/man7/filter.7* %{_mandir}/man7/notifier.7* %{_mandir}/man8/* %dir %{_datadir}/doc/cups %{_datadir}/doc/cups/* %lang(pt_BR) %{_datadir}/locale/pt_BR/cups_pt_BR.po %lang(zh_CN) %{_datadir}/locale/zh_CN/cups_zh_CN.po %files -n libcups %defattr(-,root,root) %{_libdir}/libcups.so.* %{_libdir}/libcupscgi.so.* %{_libdir}/libcupsimage.so.* %{_libdir}/libcupsmime.so.* %{_libdir}/libcupsppdc.so.* %doc LICENSE.txt %files -n libcups-devel %defattr(-,root,root) %{_bindir}/cups-config %dir %{_includedir}/cups %{_includedir}/cups/*.h %{_libdir}/libcups.a %{_libdir}/libcups.so %{_libdir}/libcupscgi.a %{_libdir}/libcupscgi.so %{_libdir}/libcupsimage.a %{_libdir}/libcupsimage.so %{_libdir}/libcupsmime.a %{_libdir}/libcupsmime.so %{_libdir}/libcupsppdc.a %{_libdir}/libcupsppdc.so #%doc CHANGES.txt README.txt %changelog * Sun Oct 22 2017 Automatic Build System 2.2.5-1mamba - automatic version update by autodist * Tue Jul 04 2017 Automatic Build System 2.2.4-1mamba - automatic version update by autodist * Sat Apr 01 2017 Automatic Build System 2.2.3-1mamba - automatic version update by autodist * Wed Jan 18 2017 Automatic Build System 2.2.2-1mamba - automatic version update by autodist * Tue Oct 04 2016 Automatic Build System 2.2.1-1mamba - automatic version update by autodist * Fri Sep 16 2016 Silvan Calarco 2.2.0-1mamba - update to 2.2.0 * Sat Jul 23 2016 Silvan Calarco 2.1.4-2mamba - cups.service: added Before=cups-browsed.service to fix shutdown delay * Tue Jul 19 2016 Silvan Calarco 2.1.4-1mamba - update to 2.1.4 * Fri Feb 12 2016 Silvan Calarco 2.1.3-2mamba - libcups-devel: require cups * Fri Feb 05 2016 Automatic Build System 2.1.3-1mamba - automatic version update by autodist * Wed Dec 02 2015 Automatic Build System 2.1.2-1mamba - automatic version update by autodist * Mon Nov 30 2015 Automatic Build System 2.1.1-1mamba - automatic version update by autodist * Mon Aug 31 2015 Automatic Build System 2.1.0-1mamba - automatic version update by autodist * Fri Jul 31 2015 Automatic Build System 2.0.4-1mamba - automatic version update by autodist * Thu Jun 18 2015 Automatic Build System 2.0.3-1mamba - automatic version update by autodist * Tue Feb 10 2015 Automatic Build System 2.0.2-1mamba - automatic version update by autodist * Fri Dec 26 2014 Silvan Calarco 2.0.1-3mamba - require colord * Wed Nov 26 2014 Silvan Calarco 2.0.1-2mamba - add preset file and force enabling daemon on install and upgrade * Sat Nov 15 2014 Automatic Build System 2.0.1-1mamba - automatic version update by autodist * Thu Nov 06 2014 Silvan Calarco 2.0.0-2mamba - fix systemd installation macros * Thu Oct 02 2014 Automatic Build System 2.0.0-1mamba - automatic version update by autodist * Thu Jul 31 2014 Automatic Build System 1.7.5-1mamba - automatic version update by autodist * Tue Jul 15 2014 Automatic Build System 1.7.4-1mamba - automatic version update by autodist * Sat Jun 07 2014 Automatic Build System 1.7.3-1mamba - automatic version update by autodist * Sun Apr 13 2014 Automatic Build System 1.7.2-1mamba - automatic version update by autodist * Thu Jan 09 2014 Automatic Build System 1.7.1-1mamba - automatic version update by autodist * Tue Oct 29 2013 Automatic Build System 1.7.0-1mamba - automatic version update by autodist * Sun Sep 29 2013 Silvan Calarco 1.6.4-2mamba - add systemd sockets for cups-lpd and cups-lpd@ and remove xinetd dependency * Fri Sep 27 2013 Automatic Build System 1.6.4-1mamba - automatic version update by autodist * Fri Aug 23 2013 Silvan Calarco 1.6.3-4mamba - fixed cups.socket to allow connection to http://localhost:631 * Fri Aug 02 2013 Silvan Calarco 1.6.3-3mamba - add systemd file cups.path - patched to set statedir to /run instead of /var/run - lp user: set home to /var/spool/cups - create a basic client configuration file /etc/cups/client.conf (see LFS) * Fri Jul 19 2013 Silvan Calarco 1.6.3-2mamba - systemd support * Sun Jul 14 2013 Automatic Build System 1.6.3-1mamba - update to 1.6.3 * Thu Mar 21 2013 Automatic Build System 1.6.2-1mamba - automatic version update by autodist * Sat Sep 29 2012 Silvan Calarco 1.6.1-3mamba - added patch to fix libusb related last page half-printing (http://cups.org/str.php?L4155) * Sun Aug 05 2012 Silvan Calarco 1.6.1-2mamba - require cups-filters * Sat Aug 04 2012 Automatic Build System 1.6.1-1mamba - automatic version update by autodist * Tue Jul 31 2012 Automatic Build System 1.5.4-1mamba - update to 1.5.4 * Tue May 15 2012 Automatic Build System 1.5.3-1mamba - automatic version update by autodist * Sun Feb 12 2012 Automatic Build System 1.5.2-1mamba - automatic version update by autodist * Thu Oct 27 2011 Silvan Calarco 1.5.0-3mamba - added requirement for openssl (required by https urls in web interface) - update pam file not to use obsolete pam_stack module, so web authentication works now * Mon Oct 03 2011 Silvan Calarco 1.5.0-2mamba - set retry-job as the default ErrorPolicy instead of stop-printer * Thu Jul 28 2011 Automatic Build System 1.5.0-1mamba - automatic update by autodist * Tue Jun 28 2011 Automatic Build System 1.4.7-1mamba - automatic update by autodist * Sat Mar 26 2011 Silvan Calarco 1.4.6-2mamba - cups-config moved to libcups-devel package * Fri Jan 07 2011 Automatic Build System 1.4.6-1mamba - automatic update by autodist * Fri Nov 12 2010 Automatic Build System 1.4.5-1mamba - automatic update to 1.4.5 by autodist - fixed posttrans script syntax * Tue Jul 01 2010 Ercole 'ercolinux' Carpanetto 1.4.4-3mamba - rebuilt with a patch to avoid crash in firefox and thunderbird * Wed Jun 30 2010 Silvan Calarco 1.4.4-2mamba - rebuilt against libpng 1.4 * Fri Jun 18 2010 Automatic Build System 1.4.4-1mamba - automatic update to 1.4.4 by autodist * Wed Mar 31 2010 Automatic Build System 1.4.3-1mamba - automatic update to 1.4.3 by autodist * Fri Nov 20 2009 Automatic Build System 1.4.2-1mamba - automatic update by autodist * Sat Sep 12 2009 Automatic Build System 1.4.1-1mamba - automatic update to 1.4.1 by autodist * Sat Aug 29 2009 Automatic Build System 1.4.0-1mamba - automatic update to 1.4.0 by autodist * Fri Jul 03 2009 Automatic Build System 1.3.11-1mamba - automatic update to 1.3.11 by autodist * Fri Apr 17 2009 Silvan Calarco 1.3.10-1mamba - update to 1.3.10 * Thu Apr 02 2009 Silvan Calarco 1.3.9-2mamba - rebuilt * Thu Oct 16 2008 Tiziana Ferro 1.3.9-1mamba - automatic update to 1.3.9 by autodist - old patch removed * Sun Aug 31 2008 Silvan Calarco 1.3.8-1mamba - update to 1.3.8 * Tue Jun 03 2008 Silvan Calarco 1.3.7-1mamba - update to 1.3.7 * Tue Mar 25 2008 Silvan Calarco 1.3.6-1mamba - update to 1.3.6 * Fri Jan 18 2008 Silvan Calarco 1.2.12-1mamba - update to 1.2.12 - set lp as the default cups user, replacing lpadmin - added php-cups subpackage * Sun Jun 10 2007 Silvan Calarco 1.2.11-1mamba - update to 1.2.11 * Tue Sep 05 2006 Davide Madrisan 1.1.23-5qilnx - security fixes: p4 CVE-2005-319[1,2,3], p5 CVE-2005-362[45,6,7,8]; QiLinux bugtraq#118 * Mon Sep 26 2005 Silvan Calarco 1.1.23-4qilnx - use service script to start/stop service * Wed Aug 24 2005 Davide Madrisan 1.1.23-3qilnx - fixed security issue QSA-2005-090 (CAN-2005-2097) * Mon May 02 2005 Silvan Calarco 1.1.23-2qilnx - work on permissions: added user/group cups, fixed lp uid number assignment - documentation back to main package because it's needed for the web interface * Fri Jan 14 2005 Davide Madrisan 1.1.23-1qilnx - update to version 1.1.23 by autospec - this version fix the secutity flaws reported in QSA-2005-001 (CAN-2004-1125, CAN-2004-12[67-70]) * Fri Dec 24 2004 Davide Madrisan 1.1.22-3qilnx - rebuild with new libe2fs-devel, libkrb5-devel packages * Fri Dec 10 2004 Silvan Calarco 1.1.22-2qilnx - documentation moved to libcups-devel * Thu Nov 18 2004 Davide Madrisan 1.1.22-1qilnx - update to version 1.1.22 by autospec - also fixes security issues QSA-2004-057 (CAN-2004-0888, CAN-2004-0923) * Mon Sep 20 2004 Silvan Calarco 1.1.21-1qilnx - update to version 1.1.21 by autospec - also fix a security issue (QSA-2004-040): CAN-2004-0558 * Wed Dec 10 2003 Davide Madrisan 1.1.20-1qilnx - rebuilt with version 1.1.20 * Wed Nov 19 2003 Davide Madrisan 1.1.19-8qilnx - fixed %%pre script; modified rpm groups * Thu Oct 02 2003 Silvan Calarco 1.1.19-7qilnx - made QiLinux compliant initscript * Thu Jul 02 2003 Silvan Calarco 1.1.19-6qilnx - fixed localstatedir location * Thu Jun 25 2003 Silvan Calarco 1.1.19-5qilnx - added libcups and libcups-devel for dependency reasons * Thu Jun 19 2003 Silvan Calarco 1.1.19-3qilnx - reduced to just main and devel packages * Thu Jun 19 2003 Silvan Calarco 1.1.19-2qilnx - added cups pam configuration * Wed Jun 18 2003 Silvan Calarco 1.1.19-1qilnx - first build of cups