You are not logged in.

#1 2009-05-30 21:55:43

whoops
Member
Registered: 2009-03-19
Posts: 891

[SOLVED]CUPS & Avahi - why depend?

Hi!

I think I'm usually not running avahi (at least I don't start it) and printing works fine. I had avahi removed for a whíle (forced with pacman, which should mean, after a restart it's gone... right?) and have been able to print. Is Avahi only needed for network printing? If so - why is it a hard dependency instead of an optional one?

thx!

Last edited by whoops (2009-06-01 08:53:20)

Offline

#2 2009-05-30 22:09:00

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [SOLVED]CUPS & Avahi - why depend?

Some think it's a common issue (me included) http://bbs.archlinux.org/viewtopic.php? … 00#p561500

Offline

#3 2009-05-31 20:25:53

whoops
Member
Registered: 2009-03-19
Posts: 891

Re: [SOLVED]CUPS & Avahi - why depend?

So...

- Can someone else confirm that basic cups works fine without avahi? (I'm never sure if it isn't hiding somewhere, even if I THINK I purged it)
- Is there another reason for cups needing avahi (like p.e. "there's an update planned that will make cups definitely need avahi")?
- Would that mean, it IS an opt-depend (as cups works without it - it only offers extra functionality) or is that more or less decided on a per-package basis / other reasons?
- Is this worth an entry in the bugtracker?

I'm going to purge avahi once again and test printing stuff... somehow I just don't like that thing. Makes me paranoid (like those gnomes... always snooping around possibly doing strange stuff because I don't know how to configure everything right;)).

Last edited by whoops (2009-05-31 20:26:30)

Offline

#4 2009-05-31 20:39:15

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [SOLVED]CUPS & Avahi - why depend?

I don't use CUPS so I can't help you w/ it, but I may provide a "bigger picture".

Is this worth an entry in the bugtracker?

I believe that apps are compiled w/ what devs think is a sensible set of features. If the vanilla programs cover the needs of 50% of the users then I'd call it a big success - Archers tend to be quite picky ;-)
I think that you can't call it a bug, since the extra dep provides extra functionality - like smbclient wrt mplayer. If you don't like it, compile it w/o the unneeded options - that's what ABS/AUR is for.

There's an ongoing discussion about needs / wants, depends / opt-depends etc. Different people have different views on this issue and it boils down to semantics of "the Arch way". Maybe we'll see some changes, trimming down the default features, maybe not. Time will tell.

Last edited by karol (2009-05-31 20:40:50)

Offline

#5 2009-05-31 21:14:40

wonder
Developer
From: Bucharest, Romania
Registered: 2006-07-05
Posts: 5,941
Website

Re: [SOLVED]CUPS & Avahi - why depend?

cups+avahi = love
you can share your printer with one click. every linux machine that have avahi will discover the printer. the same thing for a mac or a windows(with bonjour)


Give what you have. To someone, it may be better than you dare to think.

Offline

#6 2009-05-31 21:23:24

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [SOLVED]CUPS & Avahi - why depend?

cups+avahi = love

LOL

Yes, I know what's Avahi for, just as I know that many people have their multimedia on a samba share - but I don't and thus I don't need smbclient as a depend for mplayer.

Offline

#7 2009-05-31 21:35:17

broch
Banned
From: L.A. California
Registered: 2006-11-13
Posts: 975

Re: [SOLVED]CUPS & Avahi - why depend?

on the laptop I did not find any use for avahi.
I compiled sane and cups without avahi dependency and got rid of avahi altogether. I don't see any point to make cups depend on samba either: at work all printers are networked so no use for sambaprinting, at home I also have lpd which is way easier and more universal than smbaprinting.

zeroconf is not that popular so making it default dependency seems a little too much

Last edited by broch (2009-06-01 01:37:30)

Offline

#8 2009-05-31 22:17:57

whoops
Member
Registered: 2009-03-19
Posts: 891

Re: [SOLVED]CUPS & Avahi - why depend?

So you have to recompile cups to have it work without avahi? I thought it already worked without it - only the package's depend-entry forces avahi. That (if true) would mean it still would work for everyone as opt-dep: people who use avahi have avahi installed. And as I understood, an opt-dep is just that: package still providing basic functionality but gets more when opt-dep installed. When removing a dependency, I somehow would expect some errors or at least basic functionality not working. Like if I removed pacman-dep "libarchive" (Well, actually I don't know what exactly "happens" and don't want to try that, but I imagine it would be one of those things where I should have a backup/archlive available).

So my theory would have been: At some point, cups didn't print without avahi at all and that's why it is like it is. So is this "still" intentionally a "hard dependency"?

Well, it was a while ago since I last tried, so I just did "pacman -Rd avahi" again, to try if I got it right... "avahi-daemon -c" does not say "0", killing it "cant find file/folder". ATM printing with cups is still working, I'll try again after reboot (can't reboot until tomorrow or something).

Last edited by whoops (2009-05-31 22:18:28)

Offline

#9 2009-06-01 00:01:19

broch
Banned
From: L.A. California
Registered: 2006-11-13
Posts: 975

Re: [SOLVED]CUPS & Avahi - why depend?

keep in mind that avahi provides libdns required by cups

Offline

#10 2009-06-01 00:18:16

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [SOLVED]CUPS & Avahi - why depend?

keep in mind that avahi provides libdns required by cups

But is it a depend or a make depend?

Offline

#11 2009-06-01 01:36:26

broch
Banned
From: L.A. California
Registered: 2006-11-13
Posts: 975

Re: [SOLVED]CUPS & Avahi - why depend?

before compiling "avahi free" cups, remove avahi, otherwise you will be stuck with missing libdns dependency which is provided by avahi.

But is it a depend or a make depend?

simply check out
/var/abs/extra/cups/PKGBUILD

then remove from... line
avahi
I also removed other useless (for me) stuff
That is all

Offline

#12 2009-06-01 08:50:37

whoops
Member
Registered: 2009-03-19
Posts: 891

Re: [SOLVED]CUPS & Avahi - why depend?

broch wrote:

keep in mind that avahi provides libdns required by cups

Thanks, that explains it! So avahi WAS sort of like "still hiding somewhere" after I removed it with pacman.

# pacman -Qo $(find /usr | grep libdns) | grep avahi
/usr/lib/libdns_sd.so is owned by avahi 0.6.25-1
/usr/lib/pkgconfig/avahi-compat-libdns_sd.pc is owned by avahi 0.6.25-1
/usr/lib/libdns_sd.so.1.0.0 is owned by avahi 0.6.25-1
/usr/lib/libdns_sd.a is owned by avahi 0.6.25-1
/usr/lib/libdns_sd.so.1 is owned by avahi 0.6.25-1
/usr/include/avahi-compat-libdns_sd/dns_sd.h is owned by avahi 0.6.25-1

after manually removing those files, CUPS stopped working, so everything is fine: Now it DOES make sense to either reinstall avahi or rebuild cups.

Offline

#13 2009-06-01 10:20:01

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [SOLVED]CUPS & Avahi - why depend?

>> But is it a depend or a make depend?
> simply check out /var/abs/extra/cups/PKGBUILD

What I meant was: could it be moved to makedepends and provide libdns another way? I'm not personally affected so I'm not volunteering for tearing libdns from Avahi, but maybe there's a quick fix for people like whoops (static linking? don't know how big those libs are).

Offline

#14 2009-06-01 10:51:46

broch
Banned
From: L.A. California
Registered: 2006-11-13
Posts: 975

Re: [SOLVED]CUPS & Avahi - why depend?

o.k.
question 1)
why do you need libdns
question 2)
do you understand what libdns provides
question 3)
if you need libdns, do you know how to install it

you seem to ask questions for the sake of asking questions

I am afraid that you do not understand that you can't remove ahavi without removing cups (even if you "cheat" and re-install libdns) because dependency is avahi not libdns, whatever you change requires re-compiling cups, this is quick fix, one of the reasons for ABS is to compile packages with custom settings. All this is explained in wiki.

Last edited by broch (2009-06-01 10:57:24)

Offline

#15 2009-06-01 11:19:01

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [SOLVED]CUPS & Avahi - why depend?

First of all, broch, I assume "you're talking to me" ;-) It's marked as [Solved] so I'll try to be brief.

> zeroconf is not that popular so making it default dependency seems a little too much
That's the reason for my questions. Maybe cups should be compiled w/ libdns dep not avahi dep.

> All this is explained in wiki.
Yep, I know. Maybe whoops could use your PKGBUILD for avahi-less cups? If (s)he can pass your three questions, (s)he should be OK.

Offline

#16 2009-06-01 11:33:22

whoops
Member
Registered: 2009-03-19
Posts: 891

Re: [SOLVED]CUPS & Avahi - why depend?

Hi!

I already rebuild cups, but thanks!

The thing that was irritating me was as said, that I haven't been able to figure out why avahi is needed - cups being compiled with "avahi support = needs libdns (which is then still provided by avahi) at runtime somehow" explains that as far as I'm concerned. I first thought, there wouldn't be any need to recompile (as cups seemed still to run when the removed avahi left its lib's behind) which was why I didn't do it and why I thought it should be an opt-depend. But while cups does not have to depend on avahi, the build available in the repo definitely does, so that's why that questions's sort of [SOLVED].

I thought a minute about maybe putting a "cups-noavahi" into aur, but the changes to the original PKBUILD & my system were so easy to figure out that I don't think it makes much sense (stop cups, just remove avahi, look after that it's really gone including the provided libs, add libcap which was a dependancy of avahi and remove avahi dep entry). People who want to get rid of avahi by doing that might mostly want to customize cups further anyway (like enabling dbus or disabling ssl support).

Offline

Board footer

Powered by FluxBB