bugutil-vserver - Bugs: bug #14589, Build with Deboostrap fails :...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #14589: Build with Deboostrap fails : "ARCH" not set.

Submitter:  Nicolas Costes <nayco>
Submitted:  Mon 19 Sep 2005 07:02:18 PM UTC
   
 
Category:  None Severity:  3 - Normal
Item Group:  VServer build Status:  Fixed
Privacy:  Public Assigned to:  ensc
Open/Closed:  Closed Component Version:  alpha
Release:  0.30.208

Sat 29 Oct 2005 02:45:11 PM UTC, comment #2: 

thx; fixed in CVS and should be in .209+

Enrico Scholz <ensc>
Group administrator
Mon 19 Sep 2005 09:43:09 PM UTC, comment #1: 

I forgot : I use Mandrake 10.1 !

Nicolas Costes <nayco>
Mon 19 Sep 2005 07:02:18 PM UTC, original submission:  

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"


Nicolas Costes <nayco>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

 

Follow 3 latest changes.

Date Changed by Updated Field Previous Value => Replaced by
2005-10-29 ensc StatusNone Fixed
    Assigned toNone ensc
    Open/ClosedOpen Closed

Back to the top

Powered by Savane 3.13-d3ae.
Corresponding source code