Browse Source

Improved the build system to make it possible to build ROCK on non-DevFS

systems! DevFS is now never used inside the Build "sandbox" and so also
improved security on DevFS systems since a havoc script can not destroy
host system data that easily ;-)


git-svn-id: http://www.rocklinux.org/svn/rock-linux/trunk@2084 c5f82cb5-29bc-0310-9cd0-bff59a50e3bc
rocklinux
Rene Rebe 21 years ago
parent
commit
570f2d2ed5
2 changed files with 7 additions and 3 deletions
  1. +6
    -2
      scripts/Build-Pkg
  2. +1
    -1
      scripts/Cleanup

+ 6
- 2
scripts/Build-Pkg

@ -147,8 +147,13 @@ if [ "$chroot" = 1 ] ; then
ln -s ../R.build R.work/build
mkdir -p dev proc tmp mnt
[ -d dev/shm ] || mount -t devfs none $builddir/dev
[ -f proc/mounts ] || mount -t proc none $builddir/proc
mknod $builddir/dev/null c 1 3
mknod $builddir/dev/zero c 1 5
mknod $builddir/dev/random c 1 8
mknod $builddir/dev/uramdom c 1 9
# mknod $builddir/dev/tty c 5 0
ln -s /proc/self/fd $builddir/dev/fd
realbase=$(dirname $(cd $base/scripts ; pwd -P))
mount --bind $realbase $builddir/R.orig
@ -169,7 +174,6 @@ if [ "$chroot" = 1 ] ; then
EOT
cat <<- EOT > $builddir/R_mount.sh
mount -t devfs none $builddir/dev
mount -t proc none $builddir/proc
mount --bind $realbase $builddir/R.orig
mount --bind $realbase/download $builddir/R.orig/download

+ 1
- 1
scripts/Cleanup

@ -60,7 +60,7 @@ for x in src* ; do
fi
fi
done
for y in dev proc R.orig/download R.orig R.build R.src/mnt* mnt* ; do
for y in proc R.orig/download R.orig R.build R.src/mnt* mnt* ; do
if [ $delme = 1 -a -d "$x/$y" ] ; then
umount -d -f "$x/$y" > /dev/null 2>&1
umount -d -f -l "$x/$y" > /dev/null 2>&1

Loading…
Cancel
Save