Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 13 Jun 2014 15:49:05 -0400
From:      Christopher Hilton <chris@vindaloo.com>
To:        Erich Dollansky <erichsfreebsdlist@alogt.com>
Cc:        Andrea Venturoli <ml@netfence.it>, freebsd-stable@freebsd.org
Subject:   Cups 1.7.2 + Avahi Workaround -- Was: svn portdowngrade
Message-ID:  <43E0DF43-F062-4ABA-991C-AD6B769019BF@vindaloo.com>
In-Reply-To: <20140612080504.78dcc72f@X220.alogt.com>
References:  <20140611141324.GC4534@vpn.offrom.nl> <53986E33.4070509@netfence.it> <20140611175933.GE4534@vpn.offrom.nl> <20140612080504.78dcc72f@X220.alogt.com>

next in thread | previous in thread | raw e-mail | index | archive | help

[-- Attachment #1 --]

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

> Hi,
> 
> On Wed, 11 Jun 2014 19:59:33 +0200
> Willy Offermans <Willy@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



[-- Attachment #2 --]
-----BEGIN PGP SIGNATURE-----
Comment: GPGTools - http://gpgtools.org

iQIcBAEBAgAGBQJTm1WxAAoJEE2ar4QHIpj4x8EQAMCfm2INaVRdIi3DPaSz3tHm
NUCK5NUtZ4ZpBq4LfDG4BqdSfZGTzZ9fpi1i3ODmHNwJP8b+BYaZ+0FbYpzZa/KR
JJWVrNnslAb7h5mXV5TD1OmXhtfSnSiOTmkALryjuVR4gQsvjCbryi0rHR2o3WQ9
jra2QvvsdTmG53u0Dh/ZqZ8ascDy7QdK00d4HRpatUfXDxulPALakCsE07KaczMT
ZPs9f/cKMhDrEyhm8mQJdErunogbOmea4CytpZeb9Nl/wWOtQ+NDck8uLS25c/0s
a3046JoYgaF9c1TKlhkGeEYJ873uQIxhyp67cKo+pDyCSMqywtvnyzKNWI0vQt4t
Mx0peFAryBbGXcOoRO9Ff5/VCFlqPF15nHygQ2U8M0Q+YRuKCOy40r8VU63tiU74
MCjXu1FrsOBOgrjrW4pXXTG241dCkEu9AZ+YbbKt2C2/BqSu1RDqKa0wIWF0Ppkx
HVnnbAQlhigCA1Qn1RIUZNf0vZP/VPK8XuuJ8iWVPkHMEtUlP7iW1boo84QlpGbf
HjKEDVjuPV16Fe5VoKe4zj3QDXl+xaLy+fv5VXj7zx7vCgM5pHauk9oocmQ8lB5i
3/akRbRpW5tT6iTlCGWS5f9nvBdiQiN60iM7R0VQ67mlMEkEfjOJHdC12G/cA3c2
bN3qiuD+poqpktCxKnOz
=mg2b
-----END PGP SIGNATURE-----

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?43E0DF43-F062-4ABA-991C-AD6B769019BF>