From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stefan Schantl To: development@lists.ipfire.org Subject: [PATCH] cups: Update to 2.2.1 Date: Fri, 21 Oct 2016 08:41:29 +0200 Message-ID: <1477032089-8701-1-git-send-email-stefan.schantl@ipfire.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0256978350613970126==" List-Id: --===============0256978350613970126== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable 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 --- 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 @@ ############################################################################= ### =20 name =3D cups -version =3D 2.1.4 -release =3D 2 +version =3D 2.2.1 +release =3D 1 =20 groups =3D Applications/Printing url =3D http://cups.org/software.php @@ -13,11 +13,11 @@ license =3D GPLv2+ summary =3D The common UNIX printing system. =20 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 =20 -source_dl =3D https://github.com/apple/cups/releases/download/release-%{ver= sion}/ +source_dl =3D https://github.com/apple/cups/releases/download/v%{version}/ sources =3D %{thisapp}-source.tar.gz =20 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 =20 + CFLAGS +=3D -DLDAP_DEPRECATED=3D1 + configure_options +=3D \ - --sysconfdir=3D/etc \ - --localstatedir=3D/var \ + --localedir=3D%{datadir}/locale \ + --with-cupsd-file-perm=3D0755 \ --with-log-file-perm=3D0600 \ + --with-docdir=3D%{datadir}/%{name}/www \ + --with-dbusdir=3D%{sysconfdir}/dbus-1 \ --enable-pie \ --enable-relro \ --enable-avahi \ --enable-lspp \ --enable-threads \ - --enable-gnutls + --enable-gnutls \ + --enable-webif \ + --with-xinetd=3Dno =20 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 =20 + # Install default config file. mkdir -pv %{BUILDROOT}/etc/cups cp -vf %{DIR_APP}/conf/cupsd.conf %{BUILDROOT}/etc/cups/ =20 - # 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(a).service \ + %{BUILDROOT}%{unitdir}/cups-lpd(a).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 =20 packages package %{name} - requires =3D 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 =3D 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 =3D %{thisver} + end + + provides +=3D \ + 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 =3D 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} =3D %{thisver} + %{name}-libs =3D %{thisver} + end + + provides +=3D \ + lpd + + files + %{unitdir}/cups-lpd.socket + %{unitdir}/cups-lpd(a).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(a).service >/dev/null 2>&1 || : + systemctl stop cups-lpd.socket >/dev/null 2>&1 || : + systemctl stop cups-lpd(a).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(a).service >/dev/null 2>&1 || : + end end =20 package %{name}-devel @@ -90,6 +206,27 @@ packages template LIBS end =20 + package %{name}-ipptool + summary =3D 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 =3D %{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 --=20 2.7.4 --===============0256978350613970126==--