Prev · NextSTR #3917: Please introduce support for installing systemd units

Duplicate Bugs:STR #3366: launch cupsd via xinetd
Status:4 - Pending
Priority:1 - Request for Enhancement, e.g. asking for a feature
Scope:2 - Specific to an operating system
Subsystem:Multiple
Summary:Please introduce support for installing systemd units
Version: -feature
Created By:mgorny
Assigned To:mike
Fix Version:Unassigned
Update Notification:

Receive EMails Don't Receive EMails


Trouble Report Files:

Name/Time/Date/Filename/Size
mgorny: 05:54 Aug 09, 2011
 
cups-systemd.patch (36k)
 
twaugh.redhat: 09:01 Oct 18, 2011
 
cups-systemd-socket.patch (13k)
 

Trouble Report Dialog:

Name/Time/Date/Text
mgorny: 05:54 Aug 09, 2011
 
Modern Linux distros start using systemd [1] as their init system. One of the key points of systemd is to move service unit files upstream instead of supplying it on per-distro basis.

That's why we'd like to request that CUPS would (optionally) be able to install those units. These are a few small files without additional deps.

The systemd author has prepared a patch for it and described it well [2] but I don't see the systemd support mentioned anywhere on bugzie, so I'm attaching it here.

[1]:http://www.freedesktop.org/wiki/Software/systemd
[2]:http://0pointer.de/blog/projects/socket-activation2.html

 
mike: 11:02 Aug 09, 2011
 
OK, before we can accept this large of a patch, I'll need you to print, sign, and mail two copies of the CUPS Contributor Agreement, available here:

    http://www.cups.org/AppleContributorAgreement_2011-03-10.pdf

Once we get the agreement in place I'll work on integrating the changes into the next feature release, and probably revamp the existing launchd support so that both launchd and systemd share a common set of entry points in cupsd.

Thanks!

 
mike: 13:21 Aug 29, 2011
 
*Ping*

Are you planning on/looking into signing the CUPS Contributor Agreement, or should I close this bug?

 
mgorny: 14:20 Aug 29, 2011
 
I am trying to reach the patch author. I don't think there's really a point in me signing this if I'm just the one reporting the request.
 
mike: 14:25 Aug 29, 2011
 
Agreed, and thanks for getting back to me.
 
mike: 08:32 Oct 10, 2011
 
See STR #3955 concerning an IPv6 regression with this change; need to add the BindIPv6Only keyword for the IPv6 listener...
 
twaugh.redhat: 04:14 Oct 12, 2011
 
There were several other problems with this patch, which I now believe are ironed out. (The previous lack of any substantial testing, as well as issues involving the contributor agreement, were the reasons I had not submitted this patch before...)

I'll attach the current revision of this patch, which now seems to be working well.

 
twaugh.redhat: 04:21 Oct 12, 2011
 
Oh, I think I'm still waiting for a reply from Lennart about the license.  I'll prod him again.
 
twaugh.redhat: 09:05 Oct 18, 2011
 
Patch attached.  This patch does not introduce any source files, just data files, one function and some calls to it.

As a result it's hard to know where to put license information concerning the patch.  I've spoken to Lennart and he is happy for the code to be licensed for CUPS as follows:

  Redistribution and use in source and binary forms, with or without
  modification, are permitted provided that the following conditions
  are met:

  Redistributions of source code must retain the above copyright
  notice, this list of conditions and the following disclaimer.

  Redistributions in binary form must reproduce the above copyright
  notice, this list of conditions and the following disclaimer in the
  documentation and/or other materials provided with the distribution.

  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
  FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
  COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
  (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
  SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
  STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
  OF THE POSSIBILITY OF SUCH DAMAGE.

 
mgorny: 09:32 Dec 09, 2011
 
I think it'd be a good idea to add cups-lpd@.service there as well.
 
mgorny: 05:58 Apr 20, 2012
 
Tim, please note that the attached patch has a little bug. When you pass --with-systemdsystemunitdir= yet libsystemd-daemon check fails to find libsystemd-daemon, SYSTEMD_UNITS is set but systemdsystemunitdir is not substituted. Thus, the unit files are installed into the root directory.