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.)
This commit is contained in:
Ben Gras 2010-03-01 15:53:57 +00:00
parent 6b867ec05c
commit 5af8c345be
3 changed files with 14 additions and 4 deletions

View file

@ -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

View file

@ -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

View file

@ -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