On Thu, Mar 14, 2019 at 07:50:27AM +0100, Johannes Schauer wrote:
> > I would certainly consider a lot cleaner to add a new field to base-files in
> > the form "Bootstrap-Depends: base-passwd" than converting all chowns in
> > postinst to use integer numbers.
> 
> I agree that we should not expect maintainers to write numeric user and group
> ids into their maintainer scripts. This is not only hard to write but also 
> hard
> to read and maintain. In my opinion, using numeric ids should only be a
> temporary measure until we have a declarative method or other helper that does
> the correct translation instead. But since no such helper exists right now,
> numeric ids are probably the best way to fix this bug for buster.

I object to this view. It was never suggested to have anyone write
numeric ids. What Simon suggested was writing symbolic names and have
the package build use static allocations to translate these symbolic
names to numeric ids at build time. This is a whole different story than
having to write them.

If we agree that this would be the best fix for buster, I volunteer to
write a patch for base-files to implement that. Doing so would be easier
if using a more featureful template interpolation language than sed. Do
you (Santiago) have any preference here? I could think of
m4/sh/perl/python. sed will work, but might be ugly.

On Thu, 14 Mar 2019 10:21:30 +0100, Santiago Vila wrote:
> The way I see it, if base-files fails during bootstrapping it's not
> because it does not "help" the bootstrapping tool, but because the
> bootstrapping tool didn't bootstrap base-passwd in the first place.

I think this view is difficult. How is a bootstrap tool supposed to know
that it must configure base-passwd before base-files? Where should we
document that? Basically everyone in this thread except you argued that
requiring such out-of-band knowledge is bad. And if that really is
required, I think policy should be a little explicit about that. Even
though Guillem found a paragraph that supports this view, it is quite
implicit at present.

> Now the question would be if we really need to add a paragraph to
> Debian Policy, "Recommendations/guidelines for bootstrapping tools",
> clearly stating that bootstrapping tools should bootstrap base-passwd
> before trying to configure base-files. I think that would be quite
> clear by now, but I could be wrong.

I actually don't think that policy should document this dependency,
because it really should be an implementation detail. From my
perspective, making it explicit that policy only applies post-bootstrap
is sufficient (e.g. copying the "configured at least once" language from
section 6.5).

If on the other hand, we require the literal interpretation that
base-files must be able to configure while other essential packages are
only unpacked and never configured, it all becomes a lot easier to
reason about. Simon's proposal implements that easily and is a
maintainable solution.

Helmut

Reply via email to