diff options
-rw-r--r-- | ChangeLog | 3 | ||||
-rw-r--r-- | debian/changelog | 7 | ||||
-rwxr-xr-x | pbuilder-user-mode-linux | 9 |
3 files changed, 16 insertions, 3 deletions
@@ -1,5 +1,8 @@ 2003-08-20 Junichi Uekawa <dancer@debian.org> + * pbuilder-user-mode-linux: give a more helpful message when /dev/ubd/1 is not mountable. + Give a warning message that running as uid=0 is not supported. + * pbuilder-buildpackage (BUILD_PID): Use chown "userid:" instead of "userid" diff --git a/debian/changelog b/debian/changelog index fc2624c..7bee4c7 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,8 +1,11 @@ -pbuilder (0.82) UNRELEASED; urgency=low +pbuilder (0.82) unstable; urgency=low * Change use of chown. + * pbuilder-user-mode-linux: Give warning when ran as root. + * Give more meaningful message when there is problem accessing the root + filesystem from inside user-mode-linux. (closes: #206292) - -- Junichi Uekawa <dancer@debian.org> Wed, 20 Aug 2003 23:23:49 +0900 + -- Junichi Uekawa <dancer@debian.org> Wed, 20 Aug 2003 23:43:06 +0900 pbuilder (0.81) unstable; urgency=low diff --git a/pbuilder-user-mode-linux b/pbuilder-user-mode-linux index 616ab85..5e80149 100755 --- a/pbuilder-user-mode-linux +++ b/pbuilder-user-mode-linux @@ -60,7 +60,10 @@ ${UML_DEBUGMODE} mount -t proc /proc /proc mount -t tmpfs /tmp /tmp -mount -t ext2 /dev/ubd/1 ${UML_CHROOT_MOUNTPOINT} +if ! mount -t ext2 /dev/ubd/1 ${UML_CHROOT_MOUNTPOINT}; then + echo "E: Cannot mount /dev/ubd/1, is UML root image accessible as current user?" + exit 1 +fi export LOGNAME="${LOGNAME}" export HOME="${HOME}" hostname "${UML_HOSTNAME}" @@ -121,6 +124,10 @@ EOF chmod a+x ${INSIDE_PBUILDER} + if [ $( id -u ) = 0 ]; then + echo "W: You are uid=0. Don't run UML as uid=0, it's not supported." + fi + echo Invoking: "linux mem=${UML_MEM} eth0=${MY_ETH0} con0=fd:0,fd:1 con=pty root=/dev/root rootflags=/ rootfstype=hostfs ubd1=${PBUILDER_COW}${PBUILDER_UML_IMAGE} devfs=mount init=${INSIDE_PBUILDER} rw" if linux mem=${UML_MEM} eth0=${MY_ETH0} con0=fd:0,fd:1 con=pty root=/dev/root rootflags=/ rootfstype=hostfs ubd1="${PBUILDER_COW}${PBUILDER_UML_IMAGE}" devfs=mount init=${INSIDE_PBUILDER} rw ; then UML_EXITCODE=$? |