Skip to content
This repository was archived by the owner on Mar 10, 2026. It is now read-only.
This repository was archived by the owner on Mar 10, 2026. It is now read-only.

convert cups-lpd xinetd service to systemd #4493

Closed

Description

@michaelrsweet

Version: 2.0.0
CUPS.org User: jpopelka

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

This is how it looks like in Fedora:
http://pkgs.fedoraproject.org/cgit/cups.git/tree/cups-lpd.socket
http://pkgs.fedoraproject.org/cgit/cups.git/tree/cups-lpd@.service

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

Activity

  1. michaelrsweet commented on Oct 21, 2014

    @michaelrsweet
    ContributorAuthor

    CUPS.org User: mike

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

  2. michaelrsweet commented on Oct 21, 2014

    @michaelrsweet
    ContributorAuthor

    CUPS.org User: mike

    Fixed in Subversion repository.

  3. michaelrsweet commented on Oct 21, 2014

    @michaelrsweet
    ContributorAuthor

    "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)/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;
      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

  4. added this to the Stable milestone on Mar 17, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions