Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

convert cups-lpd xinetd service to systemd #4493

Closed
michaelrsweet opened this issue Oct 3, 2014 · 3 comments
Closed

convert cups-lpd xinetd service to systemd #4493

michaelrsweet opened this issue Oct 3, 2014 · 3 comments
Milestone

Comments

@michaelrsweet
Copy link
Collaborator

Version: 2.0.0
CUPS.org User: jpopelka

cups-lpd.xinetd config file should be migrated to systemd service.
http:https://0pointer.de/blog/projects/inetd.html

This is how it looks like in Fedora:
http:https://pkgs.fedoraproject.org/cgit/cups.git/tree/cups-lpd.socket
http:https://pkgs.fedoraproject.org/cgit/cups.git/tree/[email protected]

How to test:
https://bugzilla.redhat.com/show_bug.cgi?id=884641#c1

@michaelrsweet
Copy link
Collaborator Author

CUPS.org User: mike

Unfortunate that "@" is used in these filenames...

@michaelrsweet
Copy link
Collaborator Author

CUPS.org User: mike

Fixed in Subversion repository.

@michaelrsweet
Copy link
Collaborator Author

"str4493.patch":

Index: configure.ac

--- configure.ac (revision 12220)
+++ configure.ac (working copy)
@@ -81,6 +81,7 @@
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: packaging/cups.spec.in

    --- packaging/cups.spec.in (revision 12220)
    +++ packaging/cups.spec.in (working copy)
    @@ -180,7 +180,7 @@

    %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 @@

    %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: scheduler

    --- scheduler (revision 12220)
    +++ scheduler (working copy)

Property changes on: scheduler


Modified: svn:ignore

-15,6 +15,7

libcupsmime.so
libcupsmime.so.1
org.cups.cups-lpd.plist
+org.cups.cups-lpdAT.service
org.cups.cupsd.path
org.cups.cupsd.service
org.cups.cupsd.socket

Index: scheduler/Makefile

--- scheduler/Makefile (revision 12220)
+++ scheduler/Makefile (working copy)
@@ -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) 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)/[email protected]; \
    
  •   $(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;
    Index: scheduler/org.cups.cups-lpd.socket
    ===================================================================
    --- scheduler/org.cups.cups-lpd.socket (revision 0)
    +++ scheduler/org.cups.cups-lpd.socket (working copy)
    @@ -0,0 +1,9 @@
    +[Unit]
    +Description=CUPS LPD Server Socket

+[Socket]
+ListenStream=515
+Accept=yes
+
+[Install]
+WantedBy=sockets.target
Index: scheduler/org.cups.cups-lpdAT.service.in

--- scheduler/org.cups.cups-lpdAT.service.in (revision 0)
+++ scheduler/org.cups.cups-lpdAT.service.in (working copy)
@@ -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@
+

Property changes on: scheduler/org.cups.cups-lpdAT.service.in


Added: svn:eol-style

-0,0 +1

+native
\ No newline at end of property
Added: svn:keywords

-0,0 +1

+Id
\ No newline at end of property

Index: scheduler/org.cups.cupsd.service.in

--- scheduler/org.cups.cupsd.service.in (revision 12220)
+++ scheduler/org.cups.cupsd.service.in (working copy)
@@ -1,5 +1,6 @@
[Unit]
Description=CUPS Scheduler
+Documentation=man:cupsd(8)

[Service]
ExecStart=@sbindir@/cupsd -l

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant