[arch-commits] Commit in cups/trunk (PKGBUILD cups-systemd-socket.patch)
Andreas Radke
andyrtr at archlinux.org
Fri Aug 5 16:08:57 UTC 2016
Date: Friday, August 5, 2016 @ 16:08:56
Author: andyrtr
Revision: 273130
upgpkg: cups 2.1.4-2
add patch to make sure the network is up and notify systemd
Added:
cups/trunk/cups-systemd-socket.patch
Modified:
cups/trunk/PKGBUILD
---------------------------+
PKGBUILD | 12 +++++++----
cups-systemd-socket.patch | 48 ++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 56 insertions(+), 4 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2016-08-05 16:02:23 UTC (rev 273129)
+++ PKGBUILD 2016-08-05 16:08:56 UTC (rev 273130)
@@ -4,7 +4,7 @@
pkgbase="cups"
pkgname=('libcups' 'cups')
pkgver=2.1.4
-pkgrel=1
+pkgrel=2
arch=('i686' 'x86_64')
license=('GPL')
url="http://www.cups.org/"
@@ -20,6 +20,7 @@
cups-1.6.2-statedir.patch
cups-1.6.0-fix-install-perms.patch
# bugfixes
+ cups-systemd-socket.patch
)
md5sums=('9f9bf6e3b9c20a3519b4dc409666d6e7'
'fc8286f185e2cc5f7e1f6843bf193e2b'
@@ -28,7 +29,8 @@
'1beb4896f217bc241bc08a422274ec0c'
'90c30380d4c8cd48a908cfdadae1ea24'
'451609db34f95209d64c38474de27ce1'
- '5117f65342fcc69c6a506529e4daca9e')
+ '5117f65342fcc69c6a506529e4daca9e'
+ '25a618201dd4bbc73ba800da425000f1')
validpgpkeys=('3737FD0D0E63B30172440D2DDBA3A7AB08D76223') # CUPS.org (CUPS.org PGP key) <security at cups.org>
prepare() {
@@ -47,8 +49,10 @@
# fix permissions on some files (by Gentoo) - alternative: cups-0755.patch by FC
patch -Np0 -i ${srcdir}/cups-1.6.0-fix-install-perms.patch
- # bug fixes
-
+ # bug fixes
+ # make sure network is up when starting and notify systemd - FC
+ patch -Np1 -i ${srcdir}/cups-systemd-socket.patch
+
# set MaxLogSize to 0 to prevent using cups internal log rotation
sed -i -e '5i\ ' conf/cupsd.conf.in
sed -i -e '6i# Disable cups internal logging - use logrotate instead' conf/cupsd.conf.in
Added: cups-systemd-socket.patch
===================================================================
--- cups-systemd-socket.patch (rev 0)
+++ cups-systemd-socket.patch 2016-08-05 16:08:56 UTC (rev 273130)
@@ -0,0 +1,48 @@
+diff -up cups-2.0.2/scheduler/main.c.ustTJg cups-2.0.2/scheduler/main.c
+--- cups-2.0.2/scheduler/main.c.ustTJg 2015-02-10 13:40:24.121547526 +0100
++++ cups-2.0.2/scheduler/main.c 2015-02-10 13:40:24.295545063 +0100
+@@ -658,8 +658,15 @@ main(int argc, /* I - Number of comm
+
+ #if defined(HAVE_LAUNCHD) || defined(HAVE_SYSTEMD)
+ if (OnDemand)
++ {
+ cupsdAddEvent(CUPSD_EVENT_SERVER_STARTED, NULL, NULL, "Scheduler started on demand.");
+- else
++# ifdef HAVE_SYSTEMD
++ sd_notifyf(0, "READY=1\n"
++ "STATUS=Scheduler is running...\n"
++ "MAINPID=%lu",
++ (unsigned long) getpid());
++# endif /* HAVE_SYSTEMD */
++ } else
+ #endif /* HAVE_LAUNCHD || HAVE_SYSTEMD */
+ if (fg)
+ cupsdAddEvent(CUPSD_EVENT_SERVER_STARTED, NULL, NULL, "Scheduler started in foreground.");
+diff -up cups-2.0.2/scheduler/org.cups.cupsd.path.in.ustTJg cups-2.0.2/scheduler/org.cups.cupsd.path.in
+--- cups-2.0.2/scheduler/org.cups.cupsd.path.in.ustTJg 2014-03-21 15:50:24.000000000 +0100
++++ cups-2.0.2/scheduler/org.cups.cupsd.path.in 2015-02-10 13:40:24.295545063 +0100
+@@ -2,7 +2,7 @@
+ Description=CUPS Scheduler
+
+ [Path]
+-PathExists=@CUPS_CACHEDIR@/org.cups.cupsd
++PathExistsGlob=@CUPS_REQUESTS@/d*
+
+ [Install]
+ WantedBy=multi-user.target
+diff -up cups-2.0.2/scheduler/org.cups.cupsd.service.in.ustTJg cups-2.0.2/scheduler/org.cups.cupsd.service.in
+--- cups-2.0.2/scheduler/org.cups.cupsd.service.in.ustTJg 2014-10-21 13:55:01.000000000 +0200
++++ cups-2.0.2/scheduler/org.cups.cupsd.service.in 2015-02-10 13:40:24.296545049 +0100
+@@ -1,10 +1,11 @@
+ [Unit]
+ Description=CUPS Scheduler
+ Documentation=man:cupsd(8)
++After=network.target
+
+ [Service]
+ ExecStart=@sbindir@/cupsd -l
+-Type=simple
++Type=notify
+
+ [Install]
+ Also=org.cups.cupsd.socket org.cups.cupsd.path
More information about the arch-commits
mailing list