From 5af8c345beaa6e398f5277cbf4077516752e915c Mon Sep 17 00:00:00 2001 From: Ben Gras Date: Mon, 1 Mar 2010 15:53:57 +0000 Subject: [PATCH] slight tuning of /etc/mk situation when making release. - Make the bootstrap /etc/mk be populated from the newly checked out source - Don't chmod 755 all of /etc - For the 'real' /etc/mk installing, let the /etc/mk ownership and permission come from the mtree file, delete the contents of /etc/mk, then copy the .mk files over and set reasonable permissions and ownership. (So that the .mk get updated from the real usr/src/ copies, and no other junk if anything, after the bootstrap phase, whatever happened there.) --- etc/Makefile | 6 +++++- etc/mtree/minix.tree | 1 + tools/release.sh | 11 ++++++++--- 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/etc/Makefile b/etc/Makefile index 5cdd2d0ec..f900393b2 100644 --- a/etc/Makefile +++ b/etc/Makefile @@ -18,10 +18,14 @@ install:: mkdir -p $(ETC) @for f in $(FILES1); do if [ -f $(ETC)/$$f ]; then :; else cp $$f $(ETC)/$$f; chmod 755 $(ETC)/$$f; fi; done @for f in $(FILES2); do if [ -f $(ETC)/$$f ]; then :; else cp $$f $(ETC)/$$f; chmod 600 $(ETC)/$$f; fi; done - @for d in $(DIR1); do if [ -d $(ETC)/$$d ]; then :; else cp -r $$d $(ETC)/; chmod -r 755 $(ETC)/$$d; fi; done @echo "Making hierarchy.." sh mtree.sh mtree/minix.tree @for f in $(FILES3); do if [ -f $(USRETC)/$$f ]; then :; else cp usr/$$f $(USRETC); chmod 755 $(USRETC)/$$f; fi; done + @echo "Installing /etc/mk.." + rm $(ETC)/$(DIR1)/* + cp $(DIR1)/*.mk $(ETC)/$(DIR1) + chmod 644 $(ETC)/$(DIR1)/* + chown bin $(ETC)/$(DIR1)/* @echo "Making devices.." p=`pwd` && cd /dev && sh $$p/../commands/scripts/MAKEDEV.sh null p=`pwd` && cd /dev && sh $$p/../commands/scripts/MAKEDEV.sh std 2>/dev/null diff --git a/etc/mtree/minix.tree b/etc/mtree/minix.tree index 5c96c1626..888dbe594 100644 --- a/etc/mtree/minix.tree +++ b/etc/mtree/minix.tree @@ -4,6 +4,7 @@ 755 root operator /dev /dev/mouse -> /dev/kbdaux 755 root operator /etc +755 root bin /etc/mk 755 root operator /lib 755 root operator /lib/i386 755 root operator /boot diff --git a/tools/release.sh b/tools/release.sh index ba7dc87d7..639a8475d 100755 --- a/tools/release.sh +++ b/tools/release.sh @@ -318,11 +318,16 @@ rm -rf $RELEASEDIR/usr/$SRC/doc/bugs if [ "$USB" -eq 0 ] then date >$RELEASEDIR/CD fi +echo " * Bootstrap /etc/mk files" +# Need /etc/mk in the new system to invoke make. Real ownerships +# and permissions will be set by its own src/etc/Makefile. +# They have to be owned by bin so that the new make can do its work. +mkdir -p $RELEASEDIR/etc/mk +chmod 755 $RELEASEDIR/etc/mk +cp $RELEASEDIR/usr/src/etc/mk/* $RELEASEDIR/etc/mk/ +chown -R bin $RELEASEDIR/etc/mk echo " * Chroot build" cp chrootmake.sh $RELEASEDIR/usr/$SRC/tools/chrootmake.sh -mkdir -p $RELEASEDIR/etc/mk -chmod -R 755 $RELEASEDIR/etc/ -cp ../etc/mk/* $RELEASEDIR/etc/mk/ chroot $RELEASEDIR "PATH=/$XBIN sh -x /usr/$SRC/tools/chrootmake.sh" || exit 1 # Copy built images for cd booting cp $RELEASEDIR/boot/image_big image -- 2.44.0