Bug#887176: resolvconf should depend on e2fsprogs explicitly

2021-01-10 Thread Faidon Liambotis
On Sat, Jan 20, 2018 at 01:41:56AM +0100, Andreas Henriksson wrote:
> On Sun, Jan 14, 2018 at 08:10:44PM +0100, Helmut Grohne wrote:
> > /usr/share/resolvconf/dump-debug-info contains lsattr. According to
> > file it is a POSIX shell script, ASCII text executable
> 
> This one uses lsattr, but guards the execution with checking if it
> exists first, so no strict dependency needed for this. Basing my
> assumption on the file name a Suggests would likely be more warranted
> than a Recommends.

Confirmed!

> The postinst maintainerscript does indeed use both chattr and lsattr.
> Both of them are guarded with the debconf variable
> resolvconf/linkify-resolvconf having to be TRUE, which is the default.
> A dependency is thus currently needed here!

Looking into that postinst a little bit closer...
* chattr is called only in one place, guarded by a call to is_immutable_file()
* lsattr is called only in one place, in is_immutable_file()
* is_immutable_file() has this:
 local ATTR="$(lsattr "$1" 2>/dev/null || :)"
 [ "$ATTR" ] || return 1
* Therefore is_immutable_file() fails gracefully if lsattr doesn't
  exist. In turn, it returns false, and chattr is never called.

All in all, it looks like to me like resolvconf doesn't strictly require
lsattr/chattr and therefore e2fsprogs. It has appropriate provisions in
place to be able to work without these two binaries, and therefore I
don't think it needs a dependency.

Leaving this open for now in case the maintainer disagrees. Happy to
look into things further if that's the case.

Regards,
Faidon



Bug#887176: [Resolvconf-devel] Bug#887176: resolvconf should depend on e2fsprogs explicitly

2018-02-03 Thread Andreas Henriksson
Hi Thomas,

On Fri, Jan 26, 2018 at 03:14:01PM +, Thomas Hood wrote:
> Hi there,
> 
> Is there any special reason not to add e2fsprogs as a dependency?

Not really. If you need it you should definitely add a dependency.

If you're refering to my previous comments, then I was just trying
to explore all possible theoretical possibilities.

I don't think it's useful to complicate things just to be able to avoid
a dependency on e2fsprogs, unless you have any particular reason for
doing it.

Hope to see this issue resolved soon.

Regards,
Andreas Henriksson



Bug#887176: [Resolvconf-devel] Bug#887176: resolvconf should depend on e2fsprogs explicitly

2018-01-26 Thread Thomas Hood
Hi there,

Is there any special reason not to add e2fsprogs as a dependency?

Cheers,
Thomas

On Sat, 20 Jan 2018 at 01:45 Andreas Henriksson  wrote:

> Hello,
>
> On Sun, Jan 14, 2018 at 08:10:44PM +0100, Helmut Grohne wrote:
> > Package: resolvconf
> [...]
> > /usr/share/resolvconf/dump-debug-info contains lsattr. According to file
> it is a POSIX shell script, ASCII text executable
>
> This one uses lsattr, but guards the execution with checking if it
> exists first, so no strict dependency needed for this. Basing my
> assumption on the file name a Suggests would likely be more warranted
> than a Recommends.
>
> > DEBIAN/postinst contains chattr and lsattr. According to file it is a
> POSIX shell script, ASCII text executable
> [...]
>
> The postinst maintainerscript does indeed use both chattr and lsattr.
> Both of them are guarded with the debconf variable
> resolvconf/linkify-resolvconf having to be TRUE, which is the default.
> A dependency is thus currently needed here!
>
> An alternative approach if there's a reason to consider avoiding adding
> a strict dependency would be to refactor the debian/config to check
> for chattr/lsattr existance and if they're not available force the
> debconf variable resolvconf/linkify-resolvconf to false (likely together
> with a debconf prompt stating that). I'm not sure if the extra
> complexity is worth it and it would be great if maintainer(s) could
> comment on this.
>
> My conclusion is that a e2fsprogs dependency is likely the best
> solution.
>
> Regards,
> Andreas Henriksson
>
> ___
> Resolvconf-devel mailing list
> resolvconf-de...@lists.alioth.debian.org
> http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/resolvconf-devel
>


Bug#887176: resolvconf should depend on e2fsprogs explicitly

2018-01-19 Thread Andreas Henriksson
Hello,

On Sun, Jan 14, 2018 at 08:10:44PM +0100, Helmut Grohne wrote:
> Package: resolvconf
[...]
> /usr/share/resolvconf/dump-debug-info contains lsattr. According to file it 
> is a POSIX shell script, ASCII text executable

This one uses lsattr, but guards the execution with checking if it
exists first, so no strict dependency needed for this. Basing my
assumption on the file name a Suggests would likely be more warranted
than a Recommends.

> DEBIAN/postinst contains chattr and lsattr. According to file it is a POSIX 
> shell script, ASCII text executable
[...]

The postinst maintainerscript does indeed use both chattr and lsattr.
Both of them are guarded with the debconf variable
resolvconf/linkify-resolvconf having to be TRUE, which is the default.
A dependency is thus currently needed here!

An alternative approach if there's a reason to consider avoiding adding
a strict dependency would be to refactor the debian/config to check
for chattr/lsattr existance and if they're not available force the
debconf variable resolvconf/linkify-resolvconf to false (likely together
with a debconf prompt stating that). I'm not sure if the extra
complexity is worth it and it would be great if maintainer(s) could
comment on this.

My conclusion is that a e2fsprogs dependency is likely the best
solution.

Regards,
Andreas Henriksson