Hello, all !
This is a bug report I posted on Savannah : 
(http://savannah.nongnu.org/bugs/?func=detailitem&item_id=14589)

Oh, this happens on Mandrake 10.1.

<------------>

I tried to build a new vserver with debootstrap, and it failed :

# vserver test1 build -m debootstrap -- -d sarge
Could not find local version of 'debootstrap'; downloading it from
http://ftp.debian.org/debian/pool/main/d/debootstrap/debootstrap_0.3.1.4_all.deb...
20:50:06 
URL:http://ftp.debian.org/debian/pool/main/d/debootstrap/debootstrap_0.3.1.4_all.deb
 
[42,054/42,054] -> "/var/tmp/debootstrap.3uCcUZ/debootstrap.deb" [1]
E: Couldn't work out current architecture

The last message comes from the debootstrap executable, and I tracked it down 
to the following piece of code :

------/var/tmp/debootstrap.3uCcUZ/usr/sbin/debootstrap:243------
if [ "$ARCH" != "" ]; then
true
elif [ -x /usr/bin/dpkg ] && /usr/bin/dpkg --print-installation-architecture 
>/dev/null 2>&1
then
ARCH=`/usr/bin/dpkg --print-installation-architecture`
elif [ -e $DEBOOTSTRAP_DIR/arch ]; then
ARCH=`cat $DEBOOTSTRAP_DIR/arch`
else
error 1 WHATARCH "Couldn't work out current architecture"
fi
----------------------------------------------------------------

I had to modify vserver-build.debootstrap, by adding "echo i386 > 
$DEBOOTSTRAP_DIR/arch" at line 141. After that, the installation of the new 
vserver goes fine !

Is it a debootstrap bug/change ?

For info, same goes for Ubuntu :

# vserver test1 build -m debootstrap -- -d hoary -m 
http://mir1.ovh.net/ubuntu/ubuntu/
Could not find local version of 'debootstrap'; downloading it from
http://ftp.debian.org/debian/pool/main/d/debootstrap/debootstrap_0.3.1.4_all.deb...
20:55:32 
URL:http://ftp.debian.org/debian/pool/main/d/debootstrap/debootstrap_0.3.1.4_all.deb
 
[42,054/42,054] -> "/var/tmp/debootstrap.I8Paib/debootstrap.deb" [1]
E: Couldn't work out current architecture


Here is a patch, althoug it is a nasty hack :

# diff 
-u /usr/lib/util-vserver/vserver-build.debootstrap 
/usr/lib/util-vserver/vserver-build.debootstrap.patched

--- /usr/lib/util-vserver/vserver-build.debootstrap 2005-09-19 
20:57:39.784659157 +0200
+++ /usr/lib/util-vserver/vserver-build.debootstrap.patched 2005-09-19 
20:57:31.977204182 +0200
@@ -138,6 +138,8 @@
test -z "$BUILD_INITPRE" || "$BUILD_INITPRE" "$SETUP_CONFDIR" 
"$UTIL_VSERVER_VARS"
mv "$VDIR"/dev "$VDIR"/dev.X

+echo "i386" > $DEBOOTSTRAP_DIR/arch
+
"$DEBOOTSTRAP" "$@" "$DISTRIBUTION" "$VDIR" "$mirror" || : ## HACK: ignore all 
errors...
fixupDebian "$VDIR"
test -z "$BUILD_INITPOST" || "$BUILD_INITPOST" "$SETUP_CONFDIR" 
"$UTIL_VSERVER_VARS"

-- 
Le vieux marin frottait le fond de la quille avec un fer d'herminette.

Attachment: pgpp2dxQmIm8U.pgp
Description: PGP signature

_______________________________________________
Vserver mailing list
[email protected]
http://list.linux-vserver.org/mailman/listinfo/vserver

Reply via email to