Bug 480668

Summary: start cups on demand using systemd
Product: [Fedora] Fedora Reporter: Bill Nottingham <notting>
Component: cupsAssignee: Tim Waugh <twaugh>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: rawhideCC: adel.gadllah, harald, j.kopkova, jpazdziora, k.georgiou, michael.monreal, pachoramos1, rdieter, rvokal, tuju, twaugh, ykopkova
Target Milestone: ---Keywords: FutureFeature
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-06-07 08:29:24 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
cups changes required
none
xinetd service file
none
SELinux policy module none

Description Bill Nottingham 2009-01-19 18:59:35 UTC
Created attachment 329383 [details]
cups changes required

Description of problem:

(Filing for completeness sake - have already talked a bit with Tim about this over e-mail)

Looking at cups, it has code to start on demand via launchd when a connection attempt is made to the cups socket address. It's possible to use a similar mechanism to start cups on demand via xinetd, so it can be started on demand instead of always running.

Open issues:
- you trade starting cups always for starting xinetd always
- you need to do 'something' for when you share printers
- the xinetd file requires lockstep agreement with any 'Listen' statements in cupsd.conf

Version-Release number of selected component (if applicable):

cups-1.4-0.b2.2

Comment 1 Bill Nottingham 2009-01-19 19:00:27 UTC
Created attachment 329384 [details]
xinetd service file

Comment 2 Bill Nottingham 2009-01-19 19:01:19 UTC
Created attachment 329385 [details]
SELinux policy module

SELinux policy requires changes for cups to work when it's launched from xinetd so that it can properly handle the socket it's passed.

Comment 3 Harald Hoyer 2009-01-28 13:11:15 UTC
ping?

Comment 4 Tim Waugh 2009-01-28 14:03:25 UTC
Busy with more pressing stuff at the moment...

Comment 5 Tim Waugh 2009-05-15 11:49:02 UTC
Too risky a change until 1.4 has settled down a lot more.

Comment 6 Bug Zapper 2009-06-09 10:47:44 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 11 development cycle.
Changing version to '11'.

More information and reason for this action is here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 7 Adel Gadllah 2009-12-29 12:17:27 UTC
(In reply to comment #5)
> Too risky a change until 1.4 has settled down a lot more.  

ping?

Comment 8 Tim Waugh 2010-04-21 11:18:50 UTC
This will be a *lot* easier to do once mDNS is the default discovery and browse mechanism in CUPS.  That won't be until CUPS 1.5 though.

The basic problem is that if cupsd is not around to hear CUPS Browse packets it might be a long time (minutes) after cupsd is started before they are re-sent.  So the user might be sat in front of a print dialog for several minutes before they can get on with printing.

With mDNS this would not be a problem as avahi would be already be doing the listening.

Comment 9 Bill Nottingham 2011-05-09 14:46:36 UTC
Tim - given systemd, should this bug be closed in favor of a systemd implementation, or at least retitled/retargeted?

Comment 10 Tim Waugh 2011-05-13 10:43:41 UTC
Yes, retitling.  We are fairly close to full Bonjour support now, and Lennart has told me he has patches for systemd integration in cupsd.

Comment 11 Juha Tuomala 2011-06-06 18:09:15 UTC
possible duplicate bug 690766

Comment 12 Tim Waugh 2011-06-07 08:29:24 UTC

*** This bug has been marked as a duplicate of bug 690766 ***