On Fri, Sep 05, 2014 at 04:18:13PM +0200, Raphael Hertzog wrote: > On Fri, 05 Sep 2014, Colin Watson wrote: > > Doesn't seem entirely terrible. That said, this is all hopelessly > > delicate. I wonder if instead it would be better for base-files to > > hardcode the various IDs it uses in the postinst (UIDs: root, GIDs: > > root, mail, utmp, staff), and thus sidestep this requirement entirely? > > I thought about that too, but I went for the dependency because > this approach will defer the problem to the next package relying > on /etc/passwd in its postinst.
Well, there's no reason we can't do both if you feel that way, but I disagree; I think that base-files and base-passwd are necessarily special, and I think that if we find ourselves adding dependencies on Essential packages then there's something wrong. > OTOH, looking at the log we have many packages that are configured before > base-passwd (starting with libc6) and it's a wonder that none of those > fail without /etc/passwd... maybe it's not a good design decision to rely > on base-passwd's postinst to setup the initial /etc/passwd and we should > create some sort of /usr/lib/cdebootstrap/second-stage/pre-configure.d/ > that packages can use to provide some scripts that would be run in > the second stage of debootstrap before trying to configure everything. cdebootstrap already forces base-passwd to be configured early (#737939). I would disagree with requiring base-passwd to have special knowledge of cdebootstrap, or with moving the setup of /etc/passwd out of base-passwd. We can fiddle with base-* to make the constraints as easy to satisfy as possible, but ultimately it's up to the bootstrapping tools to do the initial setup in the right order, and debootstrap demonstrates that there's no technical obstacle to doing so. -- Colin Watson [[email protected]] -- To UNSUBSCRIBE, email to [email protected] with a subject of "unsubscribe". Trouble? Contact [email protected]

