cupsys 1.2.1-0ubuntu1 doesn't support 11.22.33.* network masks

Bug #52390 reported by Peter Garrett
4
Affects Status Importance Assigned to Milestone
cupsys (Ubuntu)
Fix Released
High
Martin Pitt
Dapper
Fix Released
High
Martin Pitt

Bug Description

Binary package hint: cupsys

Dapper 6.06 LTS - upgrade from cupsys 1.2.0* breaks with a previously successful /etc/cups/cupsd.conf

Printer: HP LaserJet6L printer.
Fully updated 6.06 system.

After today's upgrades, including the upgrade to cupsys:

1. System - Admin - Printing reports "unable to contact cups server".

2. sudo /etc/init.d/cupsys restart ( or stop --> start ) fails

3. "sudo dpkg-reconfigure cupsys" reports the package as broken

4. Output of

$ tail /var/log/cups/error_log
E [09/Jul/2006:10:38:09 +1000] Unknown directive RunAsUser on line 390.
I [09/Jul/2006:10:38:09 +1000] Listening to :::631 (IPv6)
I [09/Jul/2006:10:38:09 +1000] Listening to 0.0.0.0:631 (IPv4)
E [09/Jul/2006:10:38:09 +1000] Bad netmask value 10.1.1.* on line 800.
E [09/Jul/2006:10:38:09 +1000] Unknown Location directive Allow on line 800.
E [09/Jul/2006:10:38:20 +1000] Unknown directive RunAsUser on line 390.
I [09/Jul/2006:10:38:20 +1000] Listening to :::631 (IPv6)
I [09/Jul/2006:10:38:20 +1000] Listening to 0.0.0.0:631 (IPv4)
E [09/Jul/2006:10:38:20 +1000] Bad netmask value 10.1.1.* on line 800.
E [09/Jul/2006:10:38:20 +1000] Unknown Location directive Allow on line 800.

and changing line 800 from "Allow From 10.1.1.* " to "Allow From 10.1.1.0/24" , followed by

sudo /etc/init.d/cupsys restart

rectifies the problem, and the printer successfully prints a test page both from the local machine at 10.1.1.4 and from the network ( 10.1.1.2 )

Revision history for this message
Ante Karamatić (ivoks) wrote :

You have configuration from Breezy. On upgrade to Dapper you were asked if you want to keep old config or get a new one. Since you choosed old one, new cups package didn't overwrite it. And since new minor CUPS release didn't have any changes in config, it didn't ask you same question again.

CUPS 1.2 doesn't support RunAsUser, but you have a valid bug here:

Address masks with * are broken in CUPS.

Revision history for this message
Ante Karamatić (ivoks) wrote :

On losts of installations this causes non funcional CUPS.

Changed in cupsys:
importance: Untriaged → High
status: Unconfirmed → Confirmed
Revision history for this message
Ante Karamatić (ivoks) wrote :
Ante Karamatić (ivoks)
Changed in cupsys:
status: Confirmed → In Progress
description: updated
Revision history for this message
Ante Karamatić (ivoks) wrote : Solution

This debdiff fixes this issue.

As a bonus, it fixes some errors in other patch and debian/rules (and that makes cups rebuildable from same deb source :).

Revision history for this message
Peter Garrett (peter-garrett) wrote : Re: [Bug 52390] Re: cupsys 1.2.1-0ubuntu1 Configuration Error

On Sun, 09 Jul 2006 05:40:51 -0000
Ante Karamatić <email address hidden> wrote:

> You have configuration from Breezy. On upgrade to Dapper you were asked
> if you want to keep old config or get a new one. Since you choosed old
> one, new cups package didn't overwrite it. And since new minor CUPS
> release didn't have any changes in config, it didn't ask you same
> question again.

OK - quite likely that I chose the old config when I did the dist-upgrade,
because I had worked hard to get network printing to actually *work*! But
that was in May, and my "old" configuration has worked in Dapper, until
this "minor" upgrade.
>
> CUPS 1.2 doesn't support RunAsUser,

The 1.2.0 worked fine with my config, as reported - it was the 1.2.1 that
broke.
(General comment on cups configuration: needs a simple GUI for setting
up network printing, or some buttons to say somehing like "allow
machines on your local network to use this printer".)

 . but you have a valid bug here:
>
> Address masks with * are broken in CUPS.

OK - glad that one is of some use, at least :-)

>
> --
> cupsys 1.2.1-0ubuntu1 Configuration Error
> https://launchpad.net/bugs/52390
>

Revision history for this message
TTL (supernova-2149) wrote :

I have a similar problem since the last upgrade:
/var/log/cups/error_log:
E [09/Jul/2006:08:35:24 +0200] Filter "rastertoprinter" for printer "Canoni560" not available: No such file or directory
E [09/Jul/2006:08:35:24 +0200] Unable to bind socket for address 127.0.0.1:631 - Cannot assign requested address.
X [09/Jul/2006:08:35:24 +0200] No Listen or Port lines were found to allow access via localhost!
E [09/Jul/2006:08:42:29 +0200] Filter "rastertoprinter" for printer "Canoni560" not available: No such file or directory
E [09/Jul/2006:08:42:29 +0200] Unable to bind socket for address 127.0.0.1:631 - Cannot assign requested address.
X [09/Jul/2006:08:42:29 +0200] No Listen or Port lines were found to allow access via localhost!
E [09/Jul/2006:08:43:54 +0200] Filter "rastertoprinter" for printer "Canoni560" not available: No such file or directory
E [09/Jul/2006:08:43:54 +0200] Unable to bind socket for address 127.0.0.1:631 - Cannot assign requested address.
X [09/Jul/2006:08:43:54 +0200] No Listen or Port lines were found to allow access via localhost!
E [09/Jul/2006:08:44:27 +0200] Filter "rastertoprinter" for printer "Canoni560" not available: No such file or directory
E [09/Jul/2006:08:44:27 +0200] Unable to bind socket for address 127.0.0.1:631 - Cannot assign requested address.
X [09/Jul/2006:08:44:27 +0200] No Listen or Port lines were found to allow access via localhost!

Trying to start cupsys I get:
cupsd: Child exited on signal 15!

Hope this bug will be fixed soon.

Revision history for this message
Ante Karamatić (ivoks) wrote : Re: [Bug 52390] Re: [Bug 52390] Re: cupsys 1.2.1-0ubuntu1 Configuration Error

On Sun, 09 Jul 2006 06:52:35 -0000
Peter Garrett <email address hidden> wrote:

> (General comment on cups configuration: needs a simple GUI for setting
> up network printing, or some buttons to say somehing like "allow
> machines on your local network to use this printer".)

On Dapper, this is trivial; if you want to browse for IPP shared
printers on network, only thing needed is:

sudo /usr/share/cups/enable_browsing 1

(this will enable browsing of printers on your local network)

If you want to share your local printers, only thing needed is:

sudo /usr/share/cups/enable_sharing 1

(this will allow printing on all of your printers from your local
network; for finer settings, you should manually edit cupsd.conf; but
read CUPS documentation first)

And GUI... Well, we are working on it :)

--
Ante Karamatic | 0xD3BDA225 | 0x0A4A0161
<email address hidden> | <email address hidden> | ivoks.blogspot.com
"Tomorrow is my day off, so please stay off the powder!"

Revision history for this message
Ante Karamatić (ivoks) wrote : Re: [Bug 52390] Re: cupsys 1.2.1-0ubuntu1 doesn't support 11.22.33.* network masks

@TTL

At first glance, this doesn't look like problem related to this bug,
but as configuration issue. Please attach your /etc/cups/cupsd.conf
and /etc/cups/cups.d/browse.conf

Thanks.

--
Ante Karamatic | 0xD3BDA225 | 0x0A4A0161
<email address hidden> | <email address hidden> | ivoks.blogspot.com
"Tomorrow is my day off, so please stay off the powder!"

Revision history for this message
TTL (supernova-2149) wrote :

@Karamatić:
Sorry, you are right. It was really a completely other bug. Running "sudo ifconfig lo 127.0.0.1" before, solved my problem with the cupsys configuration.

Revision history for this message
Peter Garrett (peter-garrett) wrote : Re: [Bug 52390] Re: [Bug 52390] Re: [Bug 52390] Re: cupsys 1.2.1-0ubuntu1 Configuration Error

On Sun, 09 Jul 2006 07:27:24 -0000
Ante Karamatić <email address hidden> wrote:

> On Sun, 09 Jul 2006 06:52:35 -0000
> Peter Garrett <email address hidden> wrote:
>
> > (General comment on cups configuration: needs a simple GUI for setting
> > up network printing, or some buttons to say somehing like "allow
> > machines on your local network to use this printer".)
>
> On Dapper, this is trivial; if you want to browse for IPP shared
> printers on network, only thing needed is:

[snip]
>
> And GUI... Well, we are working on it :)
>

If it is as trivial as that, surely these commands could be coupled to a
few well-named buttons almost as trivially as the commands
themselves?

The solution you give is indeed trivial for those accustomed to using the
CLI for configuration - thanks for the hints - but that would look pretty
scary to Aunt Tilly ;-) I'm sure you've read ESR's rant about CUPS, so I
won't labour the point !

Peter

Revision history for this message
Ante Karamatić (ivoks) wrote : Re: [Bug 52390] Re: [Bug 52390] Re: [Bug 52390] Re: [Bug 52390] Re: cupsys 1.2.1-0ubuntu1 Configuration Error

On Sun, 09 Jul 2006 08:54:34 -0000
Peter Garrett <email address hidden> wrote:

> If it is as trivial as that, surely these commands could be coupled
> to a few well-named buttons almost as trivially as the commands
> themselves?

There is already GUI for detecting LAN printers (gnome-cups-manager),
and there is even patch for "sharing local printers" that might get in
for Edgy. But, new GUI is needed since gnome-cups-manager doesn't
support all options that new CUPS 1.2 offers, and probably for edgy+1
there will be new GUI.

Other than that, feel free to send patches or develop new GUI :)

--
Ante Karamatic | 0xD3BDA225 | 0x0A4A0161
<email address hidden> | <email address hidden> | ivoks.blogspot.com
"Tomorrow is my day off, so please stay off the powder!"

Revision history for this message
Peter Garrett (peter-garrett) wrote : Re: [Bug 52390] Re: [Bug 52390] Re: [Bug 52390] Re: [Bug 52390] Re: [Bug 52390] Re: cupsys 1.2.1-0ubuntu1 Configuration Error

On Sun, 09 Jul 2006 09:12:04 -0000
Ante Karamatić <email address hidden> wrote:

> Other than that, feel free to send patches or develop new GUI :)

Heh heh - I was expecting that response :)
I'm not a coder, unfortunately ;)

I would probably make a bash script, with an Xdialog GUI - but that would
be too ugly to live, of course!

(My only GUI project so far is a "Pizza Timer" ( priorities .. ) It's
really just guilding the lily from
 "sleep 14m && echo "Your pizza is ready" )

http://www.boinc.ch/~thoreauputic/Timer_Script.html

Anyway, I am drifting off-topic : thanks for your prompt responses to
the original bug report !

Revision history for this message
Martin Pitt (pitti) wrote :

Ante, thank you for digging this out!

I confirmed that the patch works, and I also confirmed that RunAsUser doesn't stop cupsd from starting, so I won't fiddle with the configuration file in dapper-updates.

Matt, good to upload?

Changed in cupsys:
assignee: nobody → pitti
status: In Progress → Fix Committed
Martin Pitt (pitti)
Changed in cupsys:
assignee: nobody → pitti
importance: Untriaged → High
status: Unconfirmed → Fix Committed
status: Fix Committed → In Progress
Revision history for this message
Matt Zimmerman (mdz) wrote :

OK for dapper-updates

Revision history for this message
Martin Pitt (pitti) wrote :

 cupsys (1.2.1-0ubuntu2) dapper-updates; urgency=low
 .
   * Add debian/patches/00_r5660.dpatch
     - Fix for 11.22.33.* network masks (STR #1769), Closes: LP#52390
   * Fixed debian/patches/05_avoidunknowngroup
     - Don't create .rej files
   * Fixed debian/rules
     - Delete backend/*.o on clean

Changed in cupsys:
status: Fix Committed → Fix Released
Revision history for this message
Martin Pitt (pitti) wrote :

 cupsys (1.2.2-0ubuntu1) edgy; urgency=low
 .
   * Merge to Debian unstable:
     - This gets rid of /etc/cups/conf.d/ again and re-merges the separate
       browsing and ports settings to /etc/cups/cupsd.conf again. Separating
       was nice for preserving an unchanged conffile for the most important
       settings, but it broke KDE and the web interface and generated way too
       many bugs. Closes: LP#37892, LP#50804, LP#53582
    * Update to new upstream version 1.2.2 (UVF exception granted by by Matt
      Zimmerman):
      - Fixes printing to 1.1.x servers. Closes: LP#42513, LP#42802
      - Fixes parsing of some PostScript files which previously generated empty
        pages. Closes: LP#51432
      - Fixes parsing of network masks. Closes: LP#52390
      - Lots of more fixes, see upstream changelog.
   * debian/cupsys.preinst: Drop some obsolete migration bits for
     Breezy->Dapper upgrade.
   * debian/control: Add libdbus-1-dev build dependency to enable dbus support.
   * debian/cupsys.examples: Do not ship .svn files (upstream Makefiles install
     them).
   * cupsys.postinst: Fix permissions of cupsd.conf to be writable by user
     cupsys world-readable.
   * debian/local/enable_{sharing,browsing}, {sharing,browsing}_status: Adapt
     to new single configuration file format.
   * debian/rules: Clean cups/raster.h symlink to unbreak source package build.
   * Add debian/patches/ubuntu-disable-browsing.dpatch: Disable browsing by
     default to avoid open port and stay compatible to previous releases.

Changed in cupsys:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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