Browse Source

update vbuilder.sh.in: setarch ix86 if ix86 chroot on x86_64 host

git-svn-id: http://trac.vinelinux.org/repos/projects/vbootstrap/trunk@2324 ec354946-7b23-47d6-9f5a-488ba84defc7
munepi 13 years ago
parent
commit
e0321f6802
3 changed files with 13 additions and 4 deletions
  1. 1 1
      Makefile
  2. 4 1
      vbootstrap-vl.spec
  3. 8 2
      vbuilder.sh.in

+ 1 - 1
Makefile

@@ -56,4 +56,4 @@ rpm: tarbz2
 
 clean:
 	rm -fr *~ .*???~ vbootstrap.sh vbuilder.sh vbuilder.conf
-	find . -name *~ -exec rm -f {} \;
+	find . -name *~ -exec rm -f {} \;

+ 4 - 1
vbootstrap-vl.spec

@@ -1,7 +1,7 @@
 # This package is maintained on trac svn repository. Please do not change on local.
 # If you find a BUG, please report to Vine@vinelinux.org or mailing list or BTS.
 
-%define version 0.0.31
+%define version 0.0.32
 
 Summary: bootstrap scripts to create a basic Vine Linux system
 Summary(ja): Vine Linux の基本システムを作成するためのスクリプト
@@ -75,6 +75,9 @@ vbuilder は vbootstrap を利用して chroot 環境の構築し、
 
 
 %changelog
+* Fri Dec 10 2010 Munehiro Yamamoto <munepi@vinelinux.org> 0.0.32-1
+- setarch ix86 if ix86 chroot on x86_64 host
+
 * Fri Dec 03 2010 Munehiro Yamamoto <munepi@vinelinux.org> 0.0.31-1
 - supported Vine Linux 5.2
 

+ 8 - 2
vbuilder.sh.in

@@ -77,7 +77,7 @@ E: そのようなカテゴリは存在しません: $para
 EOF
 }
 
-Msg_GiveMoreOptions_C(){
+Msg_GiveNoMoreOptions_C(){
     cat<<EOF
 E: You can give no more options after actions
 EOF
@@ -278,6 +278,7 @@ setup-vbuilder(){
     with_sign=0
     with_no_install=0
     with_actions=0
+    with_ix86_on_x86_64=0
     with_category_main=0
     with_category_plus=0
     with_category_nonfree=0
@@ -319,7 +320,9 @@ setup-vbootstrap(){
 	fi
 
 	## support i386 chroot on x86_64 below: 
-	[ "${VARCH}" != "$(uname -i)" ] && VERSION=${VERSION}_${VARCH}
+	[ "${VARCH}" != "$(uname -i)" ] && \
+	    VERSION=${VERSION}_${VARCH} && \
+	    with_ix86_on_x86_64=1
 
         ## check support ${VERSION}
 	if [ -z "$(/usr/sbin/vbootstrap | sed -e s/^Usage:.*// -e s/^E:.*// | grep -m 1 ${VERSION})" ]; then
@@ -411,6 +414,9 @@ setup-vbootstrap-rpm(){
 
     ## check ${BUILD_ROOT}
     [ -d ${BUILD_ROOT} ] || Build
+    ## setarch ix86 if ix86 chroot on x86_64 host
+    [ $with_ix86_on_x86_64 -eq 1 ] && \
+	__chroot_sh="/usr/sbin/chroot ${BUILD_ROOT} setarch ${VARCH} /bin/sh -c"
 
     DIST_RELEASE=$(cat ${BUILD_ROOT}/etc/vine-release | cut -f3 -d" " | cut -f1 -d.)