Cups 1.7.2 + Avahi Workaround -- Was: svn portdowngrade

Christopher Hilton chris at vindaloo.com
Fri Jun 13 19:49:09 UTC 2014


On Jun 11, 2014, at 8:05 PM, Erich Dollansky <erichsfreebsdlist at alogt.com> wrote:

> Hi,
> 
> On Wed, 11 Jun 2014 19:59:33 +0200
> Willy Offermans <Willy at Offermans.Rompen.nl> wrote:
> 
>> On Wed, Jun 11, 2014 at 04:56:51PM +0200, Andrea Venturoli wrote:
>>> On 06/11/14 16:13, Willy Offermans wrote:
>>>> Dear FreeBSD friends,
>>>> 
>>>> I use svn update /usr/ports to keep my ports collection up to date.
>>>> 
>>>> Now, I have an issue with cups 1.7.2 and I like to downgrade to
>>>> version 1.5.4. There is a port called portdowngrade.  Shall I use
>>>> this to downgrade cups to 1.5.4, or is there another (advisable)
>>>> way?
>>> 


Thats a four year old bug. The upshot is that Cups 1.7.2 cannot _automatically_ advertise printers with Avahi. I cannot infer much from the bug ticket but if I had to guess I'd say that the problem is lodged in the Political rather than the Software Engineering levels. 

One option here is to downgrade cups back to 1.5.x. Another is to workaround the issue with a manual service file for each your printers. In my case this was easy solution since I'm only advertising a pair of printers. If you have to do this for 1000 printers my solution doesn't scale.

I basically put this into:

     /usr/local/etc/avahi/services/hp-4000.service

*** Contents ***

<?xml version="1.0" standalone='no'?>
 <!DOCTYPE service-group SYSTEM "avahi-service.dtd">
 <service-group>
   <name replace-wildcards="yes">Hewlett Packard LaserJet 4000 (%h)</name>
   <service>
     <type>_ipp._tcp</type>
     <subtype>_universal._sub._ipp._tcp</subtype>
     <port>631</port>
     <txt-record>txtver=1</txt-record>
     <txt-record>qtotal=1</txt-record>
     <txt-record>rp=printers/hp-4000</txt-record>
     <txt-record>ty=hp-4000</txt-record>
     <txt-record>adminurl=http://10.0.x.1:631/printers/hp-4000</txt-record>
     <txt-record>note=Second Floor Printer Closet</txt-record>
     <txt-record>priority=0</txt-record>
     <txt-record>product=virtual Printer</txt-record>
     <txt-record>printer-state=3</txt-record>
     <txt-record>printer-type=0x801046</txt-record>
     <txt-record>Transparent=T</txt-record>
     <txt-record>Binary=T</txt-record>
     <txt-record>Fax=F</txt-record>
     <txt-record>Color=F</txt-record>
     <txt-record>Duplex=T</txt-record>
     <txt-record>Staple=F</txt-record>
     <txt-record>Copies=T</txt-record>
     <txt-record>Collate=F</txt-record>
     <txt-record>Punch=F</txt-record>
     <txt-record>Bind=F</txt-record>
     <txt-record>Sort=F</txt-record>
     <txt-record>Scan=F</txt-record>
     <txt-record>pdl=application/octet-stream,application/pdf,application/postscript,image/jpeg,image/png,image/urf</txt-record>
     <txt-record>URF=W8,SRGB24,CP1,RS600</txt-record>
   </service>
 </service-group>

To advertise my HP LaserJet 4000TN cups attached printer via Bonjour. My Mac's can all print to the devices.

Hope this is helpful.

-- Chris


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 841 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.freebsd.org/pipermail/freebsd-stable/attachments/20140613/efc37620/attachment.sig>


More information about the freebsd-stable mailing list