How you doing Till,

On Mon, Mar 31, 2014 at 3:59 AM, Till Kamppeter
<till.kamppe...@gmail.com> wrote:
 Cameron, first, thank you for your patch.

 Here my remarks:

1. I have modified the CUPS daemon to have working avahi-daemon support
 even if avahi-daemon is started after cupsd or if avahi-daemon is
 restarted while cupsd stays running. cupsd simply stops broadcasting
when avahi-daemon disappears and carries on broadcasting when it appears again. So no interaction with avahi-daemon is needed in the Upstart scripts.

Ok, cool. I will remove that then.


2. Why does CUPS under Debian need other Upstart scripts than CUPS under Ubuntu. Why should we not simply drop all the "$(derives_from_ubuntu)" conditionals and let the Upstart script which was developed for Ubuntu
 also be installed under Debian?

It does not, I just made some changes that seemed to not cause
problems and made the job simpler. First, I changed the job to use
cups without -F, and expect fork. That way the waiting for the job to
create a unix socket (in the post-start), which would actually be
broken I think with the socket activation changes you+Dimitri made,
can be removed. I also removed the "coldplug printer support" section
in the post-start, since when I commented it out and tried to coldplug
my printer, everything went well. Also, As odyx said, the modprobe
section should be removed from the pre-start. I attached what the job would look like.


3. Do not let debian/rules remove a file shipped with the source package (in this case debian./*.upstart), as the build tree cannot be reset by
 "debian/rules clean" any more. This can cause major problems when
 building this package.

Can you post a link to the Launchpad bug which you are talking about in
 your last comment?

Sorry, I was talking about the socket activation bug. It looks like
the best way to go about this is to move the Upstart socket activation
patches out of the ubuntu specific patches, then move the Upstart job
(hopefully with some of the changes mentioned above) out of
debian/local. It looks like the only ubuntu conditional needed then is
the `dh_installinit --upstart-only`, since that can hang rc when the
cups job { stop; exit 0; } 's when the binary is not executable and
present (package is removed but not purged). See BTS 713135 for more
specific info on that, if needed.


    Till


Cameron

description "CUPS - Common Unix Printing Service"

start on socket PROTO=inet ADDR=127.0.0.1 PORT=631
stop on runlevel [016]

expect fork
respawn

pre-start script
    [ -x /usr/sbin/cupsd ] || { stop; exit 0; }

    mkdir -p /var/run/cups/certs

    if [ -x /lib/init/apparmor-profile-load ]; then 
        /lib/init/apparmor-profile-load usr.sbin.cupsd
    fi
end script

exec /usr/sbin/cupsd

Reply via email to