[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#838997: lintian: checks/init.d: Check for initscripts that source /lib/lsb/init-functions without declaring the corresponding dependency on lsb-base (>= 3.0-6).



Hello all!

I've today looked at the newly appeared lintian error
"init.d-script-needs-depends-on-lsb-base" which seems odd to me.

First and foremost I've not found a rationale for what the overall plan
is to accomplish here. Simply *why* is this error added?
Secondly I think it seems like the implementation now suggested by
lintian is a bad idea.

On irc I got the following explanation:

16:41 < OdyX> at one point we want to remove lsb-base, so having explicit 
              (rather than implicit) dependencies is good.

... which I completely disagree with. Identifying the packages using the
hook is quite easy via codesearch.debian.net so it's not like
it's hard to know when you could drop the package. Secondly adding
even more dependencies against a package you want to get rid of
seems very counter-productive.

My point is that lsb-base has previously always been available when
needed, eg. via initscripts package dependency. If nowaydays that
package pulling in lsb-base isn't enough maybe some other package
should do it (eg. the 'init' package or maybe further down the line
for particular init implementations).

Reasons for why I think adding this dependency to every package is a
*bad* idea:
 - as already mentioned, lots of churn (for what use?)
 - spreading the problem across the archive rather than centralizing it
   will just cause lots and lots of bugs. (And archive-wide changes
   are something we're notoriously bad at in Debian. It takes decades
   to implement in practise.)
 - Having every package shipping an init script depend on additional
   packages for example bloats up init-less chroots where the init
   script is useless (but previously came with very little extra cost).
 - As we have essential packages shipping init script we're basically
   making lsb-base pseudo-essential this way, why not just add
   Essential: yes to lsb-base instead and save us the work of modifying
   ~600 packages? (But see previous point on why making it essential is
   bad, specially if the long-term goal is getting rid of it.)
 - (... not sure if there's any use in going on about this but I can
    probably think of many more reasons for this being bad.)

I also asked about *how* we could possibly get rid of lsb-base on IRC
which only got a "everyone uses systemd" reply. Even with systemd and
even with a native systemd unit there's still the usefulness of lsb-base
to allow redirecting direct invocations of /etc/init.d/foo towards
a proper systemctl. I can only assume the point was that we should get
rid of init scripts completely. If that's the plan then has that been
approved of by the project now? Maybe that's what lintian should say
instead then....

On IRC there was also discussion about wether this check triggering
when the init script was masked (by a systemd unit) was a bug or not.
(See previous paragraph on why having lsb-base around whenever your
package provides an init script is useful because of redirecting
direct invocations to systemctl though.)

Simply I don't see any usefulness to this plan, whatever the plan might be.
If someone could enlighten me that would be very welcome!

If not, I guess I'll go stick my head in the sand and ignore lintian
while feeling sorry (and frustrated) for all the people blindly following
(the often good) advice given by lintian without questioning why they're
doing so. :/

Regards,
Andreas Henriksson


Reply to: