]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
Add systemd support for cups-lpd (STR #4493)
authormsweet <msweet@a1ca3aef-8c08-0410-bb20-df032aa958be>
Tue, 21 Oct 2014 11:54:05 +0000 (11:54 +0000)
committermsweet <msweet@a1ca3aef-8c08-0410-bb20-df032aa958be>
Tue, 21 Oct 2014 11:54:05 +0000 (11:54 +0000)
git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@12221 a1ca3aef-8c08-0410-bb20-df032aa958be

CHANGES-2.0.txt
configure.ac
packaging/cups.spec.in
scheduler/Makefile
scheduler/org.cups.cups-lpd.socket [new file with mode: 0644]
scheduler/org.cups.cups-lpdAT.service.in [new file with mode: 0644]
scheduler/org.cups.cupsd.service.in

index 721007b5e4901961ef02ceb91e80d78298653111..157be2ae2cbb3f22ae55ec8fa689114f45af7586 100644 (file)
@@ -11,6 +11,7 @@ CHANGES IN CUPS V2.0.1
        - The web interface now protects against frame "click-jacking" attacks
          (STR #4492)
        - Fixed a crash in ippAttributeString (<rdar://problem/17903871>)
+       - Added systemd support for cups-lpd (STR #4493)
        - RPMs did not build (STR #4490)
 
 
index 944a105ec046023e556e5ad083f4336928ab037d..c0817b9c8a5461554c82e091b426dba023ff28d3 100644 (file)
@@ -81,6 +81,7 @@ AC_OUTPUT(Makedefs
          scheduler/cups.sh
          scheduler/cups.xml
          scheduler/org.cups.cups-lpd.plist
+         scheduler/org.cups.cups-lpdAT.service
          scheduler/org.cups.cupsd.path
          scheduler/org.cups.cupsd.service
          scheduler/org.cups.cupsd.socket
index c4c547fc3ce621d4ac536eb3f306fe0d4a667f97..07d7f895aef772e66ca4dd968ec3c541fe18a1ee 100644 (file)
@@ -180,7 +180,7 @@ rm -rf $RPM_BUILD_ROOT
 
 %if %{?_with_systemd:1}%{!?_with_systemd:0}
 # SystemD
-/usr/lib/systemd/system/*
+/usr/lib/systemd/system/org.cups.cupsd.*
 
 %else
 # Legacy init support on Linux
@@ -379,7 +379,14 @@ rm -rf $RPM_BUILD_ROOT
 
 %files lpd
 %defattr(-,root,root)
+%if %{?_with_systemd:1}%{!?_with_systemd:0}
+# SystemD
+/usr/lib/systemd/system/org.cups.cups-lpd*
+%else
+# Legacy xinetd
 /etc/xinetd.d/cups-lpd
+%endif
+
 %dir /usr/lib/cups
 %dir /usr/lib/cups/daemon
 /usr/lib/cups/daemon/cups-lpd
index ce1606b1e2d3ac0c5152636b527953aa64494126..9086a3d405f01cb4a8f7ac1829834bddf6403136 100644 (file)
@@ -3,7 +3,7 @@
 #
 # Scheduler Makefile for CUPS.
 #
-# Copyright 2007-2013 by Apple Inc.
+# Copyright 2007-2014 by Apple Inc.
 # Copyright 1997-2007 by Easy Software Products, all rights reserved.
 #
 # These coded instructions, statements, and computer programs are the
@@ -206,8 +206,9 @@ install-data:
                $(INSTALL_DATA) org.cups.cupsd.path $(BUILDROOT)$(SYSTEMD_DIR); \
                $(INSTALL_DATA) org.cups.cupsd.service $(BUILDROOT)$(SYSTEMD_DIR); \
                $(INSTALL_DATA) org.cups.cupsd.socket $(BUILDROOT)$(SYSTEMD_DIR); \
-       fi
-       if test "x$(XINETD)" != x; then \
+               $(INSTALL_DATA) org.cups.cups-lpdAT.service $(BUILDROOT)$(SYSTEMD_DIR)/org.cups.cups-lpd@.service; \
+               $(INSTALL_DATA) org.cups.cups-lpd.socket $(BUILDROOT)$(SYSTEMD_DIR); \
+       elif test "x$(XINETD)" != x; then \
                echo Installing xinetd configuration file for cups-lpd...; \
                $(INSTALL_DIR) -m 755 $(BUILDROOT)$(XINETD); \
                $(INSTALL_DATA) cups-lpd.xinetd $(BUILDROOT)$(XINETD)/cups-lpd; \
diff --git a/scheduler/org.cups.cups-lpd.socket b/scheduler/org.cups.cups-lpd.socket
new file mode 100644 (file)
index 0000000..dd5288c
--- /dev/null
@@ -0,0 +1,9 @@
+[Unit]
+Description=CUPS LPD Server Socket
+
+[Socket]
+ListenStream=515
+Accept=yes
+
+[Install]
+WantedBy=sockets.target
diff --git a/scheduler/org.cups.cups-lpdAT.service.in b/scheduler/org.cups.cups-lpdAT.service.in
new file mode 100644 (file)
index 0000000..5c78273
--- /dev/null
@@ -0,0 +1,9 @@
+[Unit]
+Description=CUPS LPD server
+Documentation=man:cups-lpd(8)
+
+[Service]
+ExecStart=-@CUPS_SERVERBIN@/daemon/cups-lpd
+StandardInput=socket
+User=@CUPS_USER@
+
index 43900167bec6de8d9d159a7da64e77578ac63070..0a27c769f2f3f0cbcf499f5e4118c4ea32312ad2 100644 (file)
@@ -1,5 +1,6 @@
 [Unit]
 Description=CUPS Scheduler
+Documentation=man:cupsd(8)
 
 [Service]
 ExecStart=@sbindir@/cupsd -l