cupsys in feisty doesn't put any backends into /usr/lib/cups/backend/

Bug #92042 reported by Walter Tautz
18
Affects Status Importance Assigned to Milestone
cupsys (Ubuntu)
Fix Released
Medium
Unassigned

Bug Description

Binary package hint: cupsys

Feisty release
Version: 1.2.8-0ubuntu3
arch: i386

In order to be able to choose backends one presumably needs to put in
links into /usr/lib/cups/backend pointing to backend-available and elsewhere
in order that the web interface and presumably lpadmin can find them......

interestingly running dpkg-reconfigure -plow cupsys does NOT seem to work even
though it asks which backends one wants, i.e., nothing appears in
/usr/lib/cups/backend/ which is what I assume dpkg-reconfigure is suppose
to accomplish. This worked in previous version of cupsys.

interestingly smb link was installed to point to smbspool even though I wasn't
asked.

Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

Fixed in cupsys_1.2.8-0ubuntu4.

Changed in cupsys:
importance: Undecided → Medium
status: Unconfirmed → Fix Released
Revision history for this message
Walter Tautz (wtautz) wrote :

The update to version 1.2.8-0ubuntu4 did not work with respect to
adding more backends albeit I now see beh but it's not a softlink
to anything---part of the foomatic-filters package.

 Perhaps I need to remove and install rather than merely
update?

debconf-show cupsys
* cupsys/raw-print: true
* cupsys/backend: ipp, lpd, parallel, scsi, serial, socket, usb, snmp

which should imply they are getting put in but to no avail....

perhaps someone is confusing backend-available with backend

Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

Can you try cupsys 1.2.8-0ubuntu6? get it from

http://www.linux-foundation.org/~till/tmp/ubuntu/feisty/cupsys/binary/

Changed in cupsys:
status: Fix Released → Fix Committed
Revision history for this message
Walter Tautz (wtautz) wrote : Re: [Bug 92042] Re: cupsys in feisty doesn't put any backends into /usr/lib/cups/backend/

Till Kamppeter wrote:
> Can you try cupsys 1.2.8-0ubuntu6? get it from
>
> http://www.linux-foundation.org/~till/tmp/ubuntu/feisty/cupsys/binary/
>
>
> ** Changed in: cupsys (Ubuntu)
> Status: Fix Released => Fix Committed
>
>

Nope. Does not work. Tried running dpkg-reconfigure no links. Perhaps
there's
a bug in debconf? Note the system I am testing this one was edgy server and
then upgraded via apt-get dist-upgrade (ran it a few times) and then
installed
cups stuff after system was feisty.

/var/lib/dpkg/info/cupsys.postinst
+ . /usr/share/debconf/confmodule
+ [ ! ]
+ PERL_DL_NONLAZY=1
+ export PERL_DL_NONLAZY
+ [ ]
+ exec /usr/share/debconf/frontend /var/lib/dpkg/info/cupsys.postinst
+ . /usr/share/debconf/confmodule
+ [ ! 1 ]
+ [ -z ]
+ exec
+ [ ]
+ exec
+ DEBCONF_REDIR=1
+ export DEBCONF_REDIR
+ [ -e /etc/default/cupsys ]
+ . /etc/default/cupsys
+ LOAD_LP_MODULE=yes
+ echo postinst called with unknown argument `'
postinst called with unknown argument `'
+ exit 0

Not sure running the postinst script like this is meanful so probably
not helpful....

Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

If a simple update does not recreate the files in /usr/lib/cups/backend, do "sudo dpkg-reconfigure cupsys" and change one of the backend choices, then do "sudo dpkg-reconfigure cupsys" again and change this backend choice back. Do you have files in /usr/lib/cups/backend now?

Revision history for this message
Walter Tautz (wtautz) wrote :
Download full text (4.1 KiB)

Till Kamppeter wrote:
> If a simple update does not recreate the files in /usr/lib/cups/backend,
> do "sudo dpkg-reconfigure cupsys" and change one of the backend choices,
> then do "sudo dpkg-reconfigure cupsys" again and change this backend
> choice back. Do you have files in /usr/lib/cups/backend now?
>
>
Already tried dpkg-reconfigure cupsys as root. No go.

I think there may be
a syntax error in the cupsys.postinst script.

 Is there a way to
run the script "properly" i.e., tell dpkg to run it in a verbose
manner?

 If you noticed, (I put the output of set -x in it)
when I ran the script directly it does give a syntax error message that
may or may not be due to the fact that I ran it directly which may well
be "incorrect".

Here is the output of dpkg-reconfigure after (by putting in set -x in
the postinst script of cupsys):

# dpkg-reconfigure -plow cupsys
 * Stopping Common Unix Printing System:
cupsd
[ OK ]
+ . /usr/share/debconf/confmodule
+ [ ! 1 ]
+ [ -z ]
+ exec
+ [ ]
+ exec
+ DEBCONF_REDIR=1
+ export DEBCONF_REDIR
+ [ -e /etc/default/cupsys ]
+ . /etc/default/cupsys
+ LOAD_LP_MODULE=yes
+ [ -f /etc/cups/printers.conf.save ]
+ [ -f /etc/cups/classes.conf.save ]
+ getent group lpadmin
+ [ -z lpadmin:x:106:wtautz ]
+ getent group lpadmin
+ awk -F: { print $4 }
+ awk -F, { for (i=1; i <= NF; i++ ) print $i }
+ grep ^root$
+ [ -n ]
+ getent passwd cupsys
+ [ -z cupsys:x:104:106::/home/cupsys:/bin/false ]
+ adduser --quiet cupsys lp
+ adduser --quiet cupsys dialout
+ getent group scanner
+ [ -z scanner:x:107:wtautz,cupsys ]
+ adduser --quiet cupsys scanner
+ [ -d /etc/cups/certs ]
+ [ -d /var/spool/cups/certs ]
+ [ -d /var/lib/cups/certs ]
+ [ -L /usr/share/ppd/cups-transitional-dir ]
+ [ -L /usr/share/cups/model/cups-included ]
+ [ -f /etc/cups/ppds.dat ]
+ [ -x /usr/bin/smbspool -a ! -e /usr/lib/cups/backend/smb ]
+ [ ! -e /etc/cups/raw.types ]
+ [ ! -e /etc/cups/raw.convs ]
+ db_fget cupsys/raw-print changed
+ _db_cmd FGET cupsys/raw-print changed
+ IFS= printf %s\n FGET cupsys/raw-print changed
+ IFS=
 read -r _db_internal_line
+ RET=false
+ return 0
+ [ false = true ]
+ db_fget cupsys/backend changed
+ _db_cmd FGET cupsys/backend changed
+ IFS= printf %s\n FGET cupsys/backend changed
+ IFS=
 read -r _db_internal_line
+ RET=false
+ return 0
+ [ false = true ]
+ [ -z 1.2.8-0ubuntu6 ]
+ [ -e /usr/lib/cups/backend/lpd ]
+ dpkg --compare-versions 1.2.8-0ubuntu6 lt-nl 1.2.8-0ubuntu3
+ [ -f /etc/cups/cups.d/ports.conf -o -f /etc/cups/cups.d/browse.conf ]
+ chown root:lp /etc/cups
+ chmod 3755 /etc/cups
+ chown cupsys:root /etc/cups/cupsd.conf
+ chmod 644 /etc/cups/cupsd.conf
+ chown root:lp /etc/cups/ppd
+ chmod 755 /etc/cups/ppd
+ chown cupsys:shadow /usr/lib/cups/daemon/cups-check-pam-auth
+ chmod 2754 /usr/lib/cups/daemon/cups-check-pam-auth
+ [ ! -d /var/run/cups/certs ]
+ [ -f /etc/cups/classes.conf ]
+ [ -f /etc/cups/printers.conf ]
+ [ -d /var/cache/cups ]
+ chown -R cupsys:lp /var/cache/cups
+ dpkg --compare-versions 1.2.8-0ubuntu6 le 1.2.1-2ubuntu1
+ dpkg --compare-versions 1.2.8-0ubuntu6 lt 1.2.1-2ubuntu3
+ dpkg --compare-v...

Read more...

Revision history for this message
Walter Tautz (wtautz) wrote :
Download full text (5.7 KiB)

Till Kamppeter wrote:
> If a simple update does not recreate the files in /usr/lib/cups/backend,
> do "sudo dpkg-reconfigure cupsys" and change one of the backend choices,
> then do "sudo dpkg-reconfigure cupsys" again and change this backend
> choice back. Do you have files in /usr/lib/cups/backend now?
>
>
Ok. I now made a change in that I removed the "serial" backend as
one of the choices and it now makes all the other links. The problem
appears to the that the RET=true value where as previously if one
makes No changes from the defaults as provided by the package
when first installed it does not put in any links.

In short making an actual change from the defaults as provided by
the package when one first installs it NO links are put in....clearly
something is wrong with the RET test being set to false if no change
is made which I suppose is correct but when the package first gets installed
it should check to see if anything was installed....

Here is the successful log of installing links (only happens when I made
a change that I didn't want to.....

# dpkg-reconfigure cupsys
 * Stopping Common Unix Printing System:
cupsd
[ OK ]
+ . /usr/share/debconf/confmodule
+ [ ! 1 ]
+ [ -z ]
+ exec
+ [ ]
+ exec
+ DEBCONF_REDIR=1
+ export DEBCONF_REDIR
+ [ -e /etc/default/cupsys ]
+ . /etc/default/cupsys
+ LOAD_LP_MODULE=yes
+ [ -f /etc/cups/printers.conf.save ]
+ [ -f /etc/cups/classes.conf.save ]
+ getent group lpadmin
+ [ -z lpadmin:x:106:wtautz ]
+ getent group lpadmin
+ awk -F: { print $4 }
+ awk -F, { for (i=1; i <= NF; i++ ) print $i }
+ grep ^root$
+ [ -n ]
+ getent passwd cupsys
+ [ -z cupsys:x:104:106::/home/cupsys:/bin/false ]
+ adduser --quiet cupsys lp
+ adduser --quiet cupsys dialout
+ getent group scanner
+ [ -z scanner:x:107:wtautz,cupsys ]
+ adduser --quiet cupsys scanner
+ [ -d /etc/cups/certs ]
+ [ -d /var/spool/cups/certs ]
+ [ -d /var/lib/cups/certs ]
+ [ -L /usr/share/ppd/cups-transitional-dir ]
+ [ -L /usr/share/cups/model/cups-included ]
+ [ -f /etc/cups/ppds.dat ]
+ [ -x /usr/bin/smbspool -a ! -e /usr/lib/cups/backend/smb ]
+ [ ! -e /etc/cups/raw.types ]
+ [ ! -e /etc/cups/raw.convs ]
+ db_fget cupsys/raw-print changed
+ _db_cmd FGET cupsys/raw-print changed
+ IFS= printf %s\n FGET cupsys/raw-print changed
+ IFS=
 read -r _db_internal_line
+ RET=false
+ return 0
+ [ false = true ]
+ db_fget cupsys/backend changed
+ _db_cmd FGET cupsys/backend changed
+ IFS= printf %s\n FGET cupsys/backend changed
+ IFS=
 read -r _db_internal_line
+ RET=true
+ return 0
+ [ true = true ]
+ db_get cupsys/backend
+ _db_cmd GET cupsys/backend
+ IFS= printf %s\n GET cupsys/backend
+ IFS=
 read -r _db_internal_line
+ RET=ipp, lpd, parallel, scsi, socket, usb, snmp
+ return 0
+ SELECTED=ipp, lpd, parallel, scsi, socket, usb, snmp
+ echo ipp, lpd, parallel, scsi, socket, usb, snmp
+ sed -e s/, /,/g
+ list=ipp,lpd,parallel,scsi,socket,usb,snmp
+ save_IFS=

+ IFS=,
+ cd /usr/lib/cups/backend
+ rm -f http ipp lpd parallel scsi serial socket usb snmp
+ ln /usr/lib/cups/backend-available/ipp /usr/lib/cups/backend/ipp
+ [ ipp = ipp ]
+ ln /usr/lib/cup...

Read more...

Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

Can you try cupsys 1.2.8-0ubuntu6? get it from

http://www.linux-foundation.org/~till/tmp/ubuntu/feisty/cupsys/binary/

now? I hope this one will do it correctly.

Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

Sorry, cupsys 1.2.8-0ubuntu7 from the same place.

Revision history for this message
Walter Tautz (wtautz) wrote :

Till Kamppeter wrote:
> Sorry, cupsys 1.2.8-0ubuntu7 from the same place.
>
>
It works! I purged the older version first....
and installed via dpkg.

Changed in cupsys:
status: Fix Committed → Fix Released
Revision history for this message
Motasim Sakallah (m-sakallah-deactivatedaccount) wrote :

Thank you for fixing this. I still had the problem after today's updates, running version 1.2.8-0ubuntu8 and was manually symlinking the backends from /usr/lib/cups/backend-available --> /usr/lib/cups/backend. I took Walter's advice and purged cupsys then reinstalled it, and can confrim it is fixed.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.