Revision: 6989
http://ipcop.svn.sourceforge.net/ipcop/?rev=6989&view=rev
Author: gespinasse
Date: 2013-03-30 21:03:16 +0000 (Sat, 30 Mar 2013)
Log Message:
-----------
As devtmps does not support mount --move, create dev/{console,null} outside of
chroot.
This will require you to update the list of allowed sudo commands
Modified Paths:
--------------
ipcop/trunk/lfs/stage2
ipcop/trunk/make.sh
Modified: ipcop/trunk/lfs/stage2
===================================================================
--- ipcop/trunk/lfs/stage2 2013-03-28 13:17:28 UTC (rev 6988)
+++ ipcop/trunk/lfs/stage2 2013-03-30 21:03:16 UTC (rev 6989)
@@ -141,25 +141,10 @@
# tar remove setuid bit
chmod u-s /$(TOOLS_DIR)/bin/{u,}mount
- # This trick is necessary in order to create two devices in the target
/dev, rather than in the host /dev
- mkdir -p /dev1
- # Avoid writing our /dev move to mtab to look more like a ordinary mtab.
- # When this line was alone in mtab, it caused some 'df' issue.
- mount --no-mtab --move /dev /dev1
-
- # Make /dev/null and /dev/console
- cd /dev && rm -f null console
- cd /dev && mknod -m 0666 null c 1 3
- cd /dev && mknod -m 0600 console c 5 1
-
# mknod one /dev/loop allow losetup (from inside) to mount loop module
(from running kernel outside the chroot)
# That will allow some tests using loop to run
rm -f /dev/loop0 && mknod /dev/loop0 b 7 0
- # Now move the target /dev to point back to the host /dev
- mount --no-mtab --move /dev1 /dev
- rm -fr /dev1
-
# Our diff helper is needed before POSTBUILD
cp $(DIR_SRC)/src/scripts/install-diff.pl /usr/local/bin
Modified: ipcop/trunk/make.sh
===================================================================
--- ipcop/trunk/make.sh 2013-03-28 13:17:28 UTC (rev 6988)
+++ ipcop/trunk/make.sh 2013-03-30 21:03:16 UTC (rev 6989)
@@ -404,6 +404,7 @@
LN="`bash +h -c "type ln" | cut -d" " -f3` -sf"
LOSETUP=`bash +h -c "type losetup" | cut -d" " -f3`
MKDIR="`bash +h -c "type mkdir" | cut -d" " -f3` -p"
+MKNOD="`bash +h -c "type mknod" | cut -d" " -f3`"
MOUNT=`bash +h -c "type mount" | cut -d" " -f3` > /dev/null 2>&1
BIND="${MOUNT} --bind"
MV=`bash +h -c "type mv" | cut -d" " -f3`
@@ -875,7 +876,7 @@
echo -ne "Checking if sudo is configured ${BOLD}"
SUDO_ERROR=0
SUDO_NICE_CONFIGURED=0
- SUDO_NUMBER=10 # number of Cmnd_Alias defined, need to be
adjusted in case of change
+ SUDO_NUMBER=11 # number of Cmnd_Alias defined, need to be
adjusted in case of change
# Check if the user is configured in sudoers
# Ask the configuration with password send from closed standard
input (0>&-)
# so no password is asked for an unconfigured user
@@ -913,6 +914,7 @@
echo -ne "Cmnd_Alias LOSETUP = ${LOSETUP} -d
/dev/loop*\n"
echo -ne "Cmnd_Alias MKDIR = ${MKDIR} ${LFS}/*, \\ \n"
echo -ne "\t\t${MKDIR}
${BASEDIR}/build_${MACHINE}/${INSTALLER_DIR}\n"
+ echo -ne "Cmnd_Alias MKNOD = ${MKNOD} ${LFS}/dev/*\n"
echo -ne "Cmnd_Alias MV = ${MV} ${LFS}/tmp/* \\ \n"
echo -ne "\t\t\t\t${LFS}/tmp/*, \\ \n"
echo -ne "\t\t${MV}
${BASEDIR}/build_${MACHINE}/${INSTALLER_DIR}/images/ipcop-* \\ \n"
@@ -922,7 +924,7 @@
echo -ne "\t\t${RM} /${TOOLS_DIR}\n"
echo -ne "Cmnd_Alias UMOUNT = ${UMOUNT} ${LFS}/*, \\ \n"
echo -ne "\t\t${UMOUNT} /dev/loop*\n\n"
- echo -ne "IPCOP_BUILDER ALL = NOPASSWD:
BIND,CHMOD,DU,LN,LOSETUP,MKDIR,MV,NICECMD,RM,UMOUNT\n"
+ echo -ne "IPCOP_BUILDER ALL = NOPASSWD:
BIND,CHMOD,DU,LN,LOSETUP,MKDIR,MKNOD,MV,NICECMD,RM,UMOUNT\n"
echo -ne "# *** End of IPCop configuration ***\n"
echo -ne "${NORMAL}"
@@ -1053,6 +1055,10 @@
#################################################################################
# Make all sources and proc available under lfs build
#
#################################################################################
+ ${SUDO} ${RM} ${LFS}/dev/console
+ ${SUDO} ${RM} ${LFS}/dev/null
+ ${SUDO} ${MKNOD} ${LFS}/dev/console -m 0600 c 5 1
+ ${SUDO} ${MKNOD} ${LFS}/dev/null -m 0666 c 1 3
${SUDO} ${BIND} /dev
${LFS}/dev
${SUDO} ${BIND} /dev/pts
${LFS}/dev/pts
${SUDO} ${BIND} /dev/shm
${LFS}/dev/shm
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Own the Future-Intel(R) Level Up Game Demo Contest 2013
Rise to greatness in Intel's independent game demo contest. Compete
for recognition, cash, and the chance to get your game on Steam.
$5K grand prize plus 10 genre and skill prizes. Submit your demo
by 6/6/13. http://altfarm.mediaplex.com/ad/ck/12124-176961-30367-2
_______________________________________________
Ipcop-svn mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ipcop-svn