Browse Source

vbuilder.sh.in: supported 4.2_i386 chroot on x86_64

git-svn-id: http://trac.vinelinux.org/repos/projects/vbootstrap/trunk@423 ec354946-7b23-47d6-9f5a-488ba84defc7
munepi 14 years ago
parent
commit
a52b2a9623
4 changed files with 36 additions and 8 deletions
  1. 6 1
      vbootstrap.spec
  2. 18 0
      vbootstrap/scripts/4.2_i386
  3. 1 0
      vbootstrap/sources.list.d/4.2_i386
  4. 11 7
      vbuilder.sh.in

+ 6 - 1
vbootstrap.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.11
+%define version 0.0.12
 
 Summary: bootstrap scripts to create a basic Vine Linux system
 Summary(ja): Vine Linux の基本システムを作成するためのスクリプト
@@ -59,6 +59,11 @@ make DESTDIR=$RPM_BUILD_ROOT install
 
 
 %changelog
+* Sun Jan 17 2010 Munehiro Yamamoto <munepi@vinelinux.org> 0.0.12-1
+- added 4.2_i386
+- updated vbuilder.sh.in
+  - supported 4.2_i386 chroot on x86_64
+
 * Tue Jan 05 2010 Munehiro Yamamoto <munepi@vinelinux.org> 0.0.11-1
 - updated vbuilder.sh.in
   - added Japanese translations for error messages

+ 18 - 0
vbootstrap/scripts/4.2_i386

@@ -0,0 +1,18 @@
+# Vine Linux 4.2_i386
+
+INSTVER="4.2_i386"
+BASE_PKGS="setup glibc coreutils bash rpm apt rootfiles vine-release"
+APT_LINE="-o Dir::Etc::sourcelist=$VBOOTSTRAPDIR/sources.list.d/$INSTVER"
+
+vbootstrap_post()
+{
+echo "running vbootstrap post install scripts for $INSTVER on $INSTDIR"
+cp -a /etc/resolv.conf $INSTDIR/etc/
+rm -f $INSTDIR/var/lib/rpm/__db.00*
+echo " rebuilding rpm database"
+chroot $INSTDIR rpm --rebuilddb
+echo " updating apt database"
+chroot $INSTDIR apt-get -qq update
+echo " installing vine-keyring"
+chroot $INSTDIR apt-get -qq -y --reinstall install vine-keyring
+}

+ 1 - 0
vbootstrap/sources.list.d/4.2_i386

@@ -0,0 +1 @@
+rpm http://updates.vinelinux.org/apt 4.2/i386 main plus updates

+ 11 - 7
vbuilder.sh.in

@@ -221,13 +221,13 @@ setup-vbootstrap(){
 
 	[ -z ${VARCH} ] && VARCH=$(uname -i)
 
-	##!! IRREGULAR: 4.2 is NO support on x86_64
-	if [ "${VERSION}" = "4.2" -a "$(uname -i)" = "x86_64" ]; then
+        ##!! 4.2 is NO support on VARCH=x86_64
+	if [ "${VERSION}" = "4.2" -a "${VARCH}" = "x86_64" ]; then
 	    Msg_NoSupportVERSION_${LOCALE}
 	    exit 1
 	fi
 
-	## support for i386 chroot on x86_64 below: 
+	## support i386 chroot on x86_64 below: 
 	[ "${VARCH}" != "$(uname -i)" ] && VERSION=${VERSION}_${VARCH}
 
         ## check support ${VERSION}
@@ -402,10 +402,14 @@ Build(){
 
     /usr/sbin/chroot ${BUILD_ROOT} \
 	/bin/sh -c 'apt-get update && apt-get -y dist-upgrade'
-    /usr/sbin/chroot ${BUILD_ROOT} \
-	/bin/sh -c 'apt-get -y install apt-sourceslist-plus && apt-get update'
-    /usr/sbin/chroot ${BUILD_ROOT} \
-	/bin/sh -c 'apt-get -y install apt-sourceslist-nonfree && apt-get update'
+
+    ##!! 4.2 has no apt-sourceslist-{plus,nonfree} packages
+    if [ "$(echo ${VERSION} | sed s/_i386//)" != "4.2" ]; then
+	/usr/sbin/chroot ${BUILD_ROOT} \
+	    /bin/sh -c 'apt-get update && apt-get -y install apt-sourceslist-plus'
+	/usr/sbin/chroot ${BUILD_ROOT} \
+	    /bin/sh -c 'apt-get update && apt-get -y install apt-sourceslist-nonfree'
+    fi
 
     if [ $with_dist_upgrade -eq 1 ]; then
 	/usr/sbin/chroot ${BUILD_ROOT} \