Blame SOURCES/cups-systemd-socket.patch

ce62dc
diff -up cups-2.2.5/scheduler/main.c.systemd-socket cups-2.2.5/scheduler/main.c
ce62dc
--- cups-2.2.5/scheduler/main.c.systemd-socket	2017-10-17 18:59:53.732431498 +0200
ce62dc
+++ cups-2.2.5/scheduler/main.c	2017-10-17 19:02:13.132275861 +0200
ce62dc
@@ -691,8 +691,16 @@ main(int  argc,				/* I - Number of comm
ce62dc
 
ce62dc
 #ifdef HAVE_ONDEMAND
ce62dc
   if (OnDemand)
ce62dc
+  {
ce62dc
     cupsdAddEvent(CUPSD_EVENT_SERVER_STARTED, NULL, NULL, "Scheduler started on demand.");
ce62dc
-  else
ce62dc
+# ifdef HAVE_SYSTEMD
ce62dc
+    sd_notifyf(0, "READY=1\n"
ce62dc
+               "STATUS=Scheduler is running...\n"
ce62dc
+               "MAINPID=%lu",
ce62dc
+               (unsigned long) getpid());
ce62dc
+# endif /* HAVE_SYSTEMD */
ce62dc
+  } else
ce62dc
+
ce62dc
 #endif /* HAVE_ONDEMAND */
ce62dc
   if (fg)
ce62dc
     cupsdAddEvent(CUPSD_EVENT_SERVER_STARTED, NULL, NULL, "Scheduler started in foreground.");
ce62dc
diff -up cups-2.2.5/scheduler/org.cups.cupsd.path.in.systemd-socket cups-2.2.5/scheduler/org.cups.cupsd.path.in
ce62dc
--- cups-2.2.5/scheduler/org.cups.cupsd.path.in.systemd-socket	2017-10-13 20:22:26.000000000 +0200
ce62dc
+++ cups-2.2.5/scheduler/org.cups.cupsd.path.in	2017-10-17 18:59:53.732431498 +0200
ce62dc
@@ -1,6 +1,6 @@
ce62dc
 [Unit]
ce62dc
 Description=CUPS Scheduler
ce62dc
-PartOf=org.cups.cupsd.service
ce62dc
+PartOf=cups.service
ce62dc
ce62dc
 [Path]
ce62dc
 PathExists=@CUPS_CACHEDIR@/org.cups.cupsd
ce62dc
diff -up cups-2.2.5/scheduler/org.cups.cupsd.service.in.systemd-socket cups-2.2.5/scheduler/org.cups.cupsd.service.in
ce62dc
--- cups-2.2.5/scheduler/org.cups.cupsd.service.in.systemd-socket	2017-10-13 20:22:26.000000000 +0200
ce62dc
+++ cups-2.2.5/scheduler/org.cups.cupsd.service.in	2017-10-17 18:59:53.732431498 +0200
ce62dc
@@ -1,11 +1,13 @@
ce62dc
 [Unit]
ce62dc
 Description=CUPS Scheduler
ce62dc
 Documentation=man:cupsd(8)
ce62dc
+After=network.target
ce62dc
 
ce62dc
 [Service]
ce62dc
 ExecStart=@sbindir@/cupsd -l
ce62dc
-Type=simple
ce62dc
+Type=notify
ce62dc
+Restart=on-failure
ce62dc
 
ce62dc
 [Install]
ce62dc
-Also=org.cups.cupsd.socket org.cups.cupsd.path
ce62dc
+Also=cups.socket cups.path
ce62dc
 WantedBy=printer.target
ce62dc
diff -up cups-2.2.6/scheduler/org.cups.cupsd.socket.in.systemd-socket cups-2.2.6/scheduler/org.cups.cupsd.socket.in
ce62dc
--- cups-2.2.6/scheduler/org.cups.cupsd.socket.in.systemd-socket 2017-11-01 15:57:53.000000000 +0100
ce62dc
+++ cups-2.2.6/scheduler/org.cups.cupsd.socket.in  2018-09-19 12:38:00.630843246 +0200
ce62dc
@@ -1,6 +1,6 @@
ce62dc
 [Unit]
ce62dc
 Description=CUPS Scheduler
ce62dc
-PartOf=org.cups.cupsd.service
ce62dc
+PartOf=cups.service
ce62dc
 
ce62dc
 [Socket]
ce62dc
 ListenStream=@CUPS_DEFAULT_DOMAINSOCKET@
ce62dc
diff -up cups-2.2.6/scheduler/org.cups.cups-lpd.socket.systemd-socket cups-2.2.6/scheduler/org.cups.cups-lpd.socket
ce62dc
--- cups-2.2.6/scheduler/org.cups.cups-lpd.socket.systemd-socket 2017-11-01 15:57:53.000000000 +0100
ce62dc
+++ cups-2.2.6/scheduler/org.cups.cups-lpd.socket  2018-09-19 12:38:00.630843246 +0200
ce62dc
@@ -1,6 +1,6 @@
ce62dc
 [Unit]
ce62dc
 Description=CUPS LPD Server Socket
ce62dc
-PartOf=org.cups.cups-lpd.service
ce62dc
+PartOf=cups-lpd.service
ce62dc
 
ce62dc
 [Socket]
ce62dc
 ListenStream=515