This is a minor update to the latest stable version of cups.
* Enable the web administration interface. * Add support for systemd. * Splitt into more sub-pakages. * Drop SELinux support.
Fixes #11202.
Signed-off-by: Stefan Schantl stefan.schantl@ipfire.org --- cups/cups.logrotate | 5 -- cups/cups.nm | 167 +++++++++++++++++++++++++++++++++++++++++++++++----- 2 files changed, 152 insertions(+), 20 deletions(-) delete mode 100644 cups/cups.logrotate
diff --git a/cups/cups.logrotate b/cups/cups.logrotate deleted file mode 100644 index 773c70f..0000000 --- a/cups/cups.logrotate +++ /dev/null @@ -1,5 +0,0 @@ -/var/log/cups/*_log { - missingok - notifempty - sharedscripts -} diff --git a/cups/cups.nm b/cups/cups.nm index a58ec49..1a2c127 100644 --- a/cups/cups.nm +++ b/cups/cups.nm @@ -4,8 +4,8 @@ ###############################################################################
name = cups -version = 2.1.4 -release = 2 +version = 2.2.1 +release = 1
groups = Applications/Printing url = http://cups.org/software.php @@ -13,11 +13,11 @@ license = GPLv2+ summary = The common UNIX printing system.
description - CUPS is the standards-based, open source printing system developed \ + CUPS is the standards-based, open source printing system developed by Apple Inc. for Mac OS(R) X and other UNIX(R)-like operating systems. end
-source_dl = https://github.com/apple/cups/releases/download/release-%%7Bversion%7D/ +source_dl = https://github.com/apple/cups/releases/download/v%%7Bversion%7D/ sources = %{thisapp}-source.tar.gz
build @@ -28,32 +28,37 @@ build avahi-devel cyrus-sasl-devel gcc-c++ - ghostscript gnutls-devel + libacl-devel libgcrypt-devel libjpeg-devel libpng-devel - libselinux-devel libtasn1-devel libtiff-devel + libusb-devel openldap-devel openssl-devel pam-devel - perl - python + systemd-devel zlib-devel end
+ CFLAGS += -DLDAP_DEPRECATED=1 + configure_options += \ - --sysconfdir=/etc \ - --localstatedir=/var \ + --localedir=%{datadir}/locale \ + --with-cupsd-file-perm=0755 \ --with-log-file-perm=0600 \ + --with-docdir=%{datadir}/%{name}/www \ + --with-dbusdir=%{sysconfdir}/dbus-1 \ --enable-pie \ --enable-relro \ --enable-avahi \ --enable-lspp \ --enable-threads \ - --enable-gnutls + --enable-gnutls \ + --enable-webif \ + --with-xinetd=no
prepare_cmds aclocal -I config-scripts @@ -66,18 +71,129 @@ build # Remove sysvinit scripts rm -vfr %{BUILDROOT}/etc/init.d/cups %{BUILDROOT}/etc/rc*.d
+ # Install default config file. mkdir -pv %{BUILDROOT}/etc/cups cp -vf %{DIR_APP}/conf/cupsd.conf %{BUILDROOT}/etc/cups/
- # Logrotate - mkdir -pv %{BUILDROOT}/etc/logrotate.d/ - cp -vf %{DIR_SOURCE}/cups.logrotate %{BUILDROOT}/etc/logrotate.d/cups + # Rename systemd service files. + mv %{BUILDROOT}%{unitdir}/org.cups.cupsd.path \ + %{BUILDROOT}%{unitdir}/cups.path + mv %{BUILDROOT}%{unitdir}/org.cups.cupsd.service \ + %{BUILDROOT}%{unitdir}/cups.service + mv %{BUILDROOT}%{unitdir}/org.cups.cupsd.socket \ + %{BUILDROOT}%{unitdir}/cups.socket + mv %{BUILDROOT}%{unitdir}/org.cups.cups-lpd.socket \ + %{BUILDROOT}%{unitdir}/cups-lpd.socket + mv %{BUILDROOT}%{unitdir}/org.cups.cups-lpd@.service \ + %{BUILDROOT}%{unitdir}/cups-lpd@.service + + sed -i -e "s,org.cups.cupsd,cups,g" \ + %{BUILDROOT}%{unitdir}/cups.service + + # Fix permissions + chown root:lp %{BUILDROOT}%{localstatedir}/run/cups + chmod 0755 %{BUILDROOT}%{localstatedir}/run/cups end end
packages package %{name} - requires = ghostscript + recomends + ghostscript + end + + script postin + systemctl daemon-reload >/dev/null 2>&1 || : + systemctl --no-reload enable cups.path >/dev/null 2>&1 || : + end + + script preun + systemctl --no-reload disable cups.path >/dev/null 2>&1 || : + systemctl --no-reload disable cupsd.socket >/dev/null 2>&1 || : + systemctl --no-reload disable cupsd.service >/dev/null 2>&1 || : + systemctl stop cupsd.socket >/dev/null 2>&1 || : + systemctl stop cupsd.service >/dev/null 2>&1 || : + systemctl stop cups.path >/dev/null 2>&1 || : + end + + script postun + systemctl daemon-reload >/dev/null 2>&1 || : + end + + script postup + systemctl daemon-reload >/dev/null 2>&1 || : + systemctl try-restart cups.path >/dev/null 2>&1 || : + systemctl try-restart cupsd.service >/dev/null 2>&1 || : + end + end + + package %{name}-client + summary = CUPS printing system - client programs. + description + CUPS printing system provides a portable printing layer for + UNIX operating systems. This package contains command-line client + programs. + end + + requires + %{name}-libs = %{thisver} + end + + provides += \ + lpr + + files + %{sbindir}/lpc.cups + %{bindir}/cancel* + %{bindir}/lp* + %{mandir}/man1/lp*.1.gz + %{mandir}/man1/cancel-cups.1.gz + %{mandir}/man8/lpc-cups.8.gz + end + end + + package %{name}-lpd + summary = CUPS printing system - lpd emulation. + description + CUPS printing system provides a portable printing layer for + UNIX operating systems. This is the package that provides standard + lpd emulation. + end + + requires + %{name} = %{thisver} + %{name}-libs = %{thisver} + end + + provides += \ + lpd + + files + %{unitdir}/cups-lpd.socket + %{unitdir}/cups-lpd@.service + %{prefix}/lib/daemon/cups-lpd + %{mandir}/man8/cups-lpd.8.gz + end + + script postin + systemctl daemon-reload >/dev/null 2>&1 || : + end + + script preun + systemctl --no-reload disable cups-lpd.socket >/dev/null 2>&1 || : + systemctl --no-reload disable cups-lpd@.service >/dev/null 2>&1 || : + systemctl stop cups-lpd.socket >/dev/null 2>&1 || : + systemctl stop cups-lpd@.service >/dev/null 2>&1 || : + end + + script postun + systemctl daemon-reload >/dev/null 2>&1 || : + end + + script postup + systemctl daemon-reload >/dev/null 2>&1 || : + systemctl try-restart cups-lpd@.service >/dev/null 2>&1 || : + end end
package %{name}-devel @@ -90,6 +206,27 @@ packages template LIBS end
+ package %{name}-ipptool + summary = CUPS printing system - tool for performing IPP requests. + description + Sends IPP requests to the specified URI and tests and/or displays \ + the results. + end + + requires + %{name}-libs = %{thisver} + end + + files + %{bindir}/ipptool + %{bindir}/ippfind + %{datadir}/cups/ipptool + %{datadir}/cups/ipptool/* + %{mandir}/man1/ipptool.1.gz + %{mandir}/man5/ipptoolfile.5.gz + end + end + package %{name}-debuginfo template DEBUGINFO end