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

Re: base-passwd marked as Essential: yes but other packages depend on it being configured.



On Sun, 21 Feb 2021, Johannes Schauer Marin Rodrigues wrote:

Hi,

Quoting Tim Woodall (2021-02-21 18:22:19)
base-passwd is marked as Essential: yes

However, it actually creates the initial passwd and group files in the preinst
script.

this reminds me of:

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=963788

Would this problem not also be solved by dpkg taking care of managing
/etc/passwd and /etc/group? If it could do that, we could solve the
reproducibility issue in the bug above *and* base-passwd would not anymore have
to do anything in its preinst script but could rely on dpkg doing the right
thing, maybe helped by some new declarative statements in the package?

Since dpkg 1.20.0, software like debootstrap or mmdebstrap do not anymore need
to create /var/lib/dpkg/* or /etc/dpkg/dpkg.cfg.d/ because dpkg will take care
of it. So maybe another approach would be to also let dpkg take care of the
initial bootstrapping stuff like making sure /etc/passwd has some sensible
content so that software like debootstrap and mmdebstrap can rely on it?


Many thanks to both of you for pointers to those bugs. I will take a
look.

What I'm trying to do is build in a fakechroot. My idea was to unpack
the core packages, fakeroot fakechroot chroot image apt-get install apt
and have a base system to install build-deps etc.

However, apt does not configure packages in the needed order due to this
passwd/group issue.

(debootstrap does not support fakechroot minimal system and I thought
debootstrap was perl so I didn't want to try to modify it)


FYI, I have to manually touch /var/lib/dpkg/status before this as dpkg
cannot bootstrap unless this file exists. I'll have to check if I'm
using 1.20.0.


Tim.


Reply to: