Browse Source

updated vbuilder.sh.in: supported --unionfs for RPM_Sign()

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

+ 5 - 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.36
+%define version 0.0.37
 
 Summary: bootstrap scripts to create a basic Vine Linux system
 Summary(ja): Vine Linux の基本システムを作成するためのスクリプト
@@ -80,6 +80,10 @@ vbuilder は vbootstrap を利用して chroot 環境の構築し、
 
 
 %changelog
+* Wed Feb 09 2011 Munehiro Yamamoto <munepi@vinelinux.org> 0.0.37-1
+- fixed a little mistake of vbuilder.sh.in
+- supported --unionfs for RPM_Sign()
+
 * Wed Feb 09 2011 Munehiro Yamamoto <munepi@vinelinux.org> 0.0.36-1
 - updated vbuilder.sh.in
   - improved RPM_Sign() to sign rpms under usermode

+ 9 - 1
vbuilder.sh.in

@@ -5,7 +5,6 @@ TEXTDOMAIN=vbootstrap
 TEXTDOMAINDIR=/usr/share/locale
 
 Usage(){
-    set
     cat<<EOF
 Usage:	$(basename $0) {--version [version]} {--arch [arch]} {--category [categories]} {--dist-upgrade} {--target [target]} {--with-compat32} {--rpmbuild-define [macro_expr]} {--rpmbuild-with [bcond_with]} {--rpmbuild-without [bcond_with]} {--sign} {--no-install} {--bootstrap-dir [directory]} {--cache-dir [directory]} {--built-rpms-dir [directory]} {clean|build|build-rpm [src.rpm]|install-rpm [arch.rpm|package]|remove-rpm [package]|show-info}
 
@@ -705,6 +704,7 @@ RPM_Build(){
 RPM_Sign(){
     [ $with_sign -eq 1 ] || return 1
 
+    ## check $SUDO_USER and $USERHELPER_UID
     local RPM_SIGN_USER=$SUDO_USER
     if [ -z "${RPM_SIGN_USER}" ]; then
 	RPM_SIGN_USER=$(user_from_uid $USERHELPER_UID)
@@ -714,9 +714,17 @@ RPM_Sign(){
 	fi
     fi
 
+    setup-vbootstrap || return 1
+
+    [ -d ${BUILD_ROOT} ] || Build
+
+    mount-chroot unionfs_dir
+
     echo $"Signing built rpms using ${RPM_SIGN_USER}'s key: "
     su $RPM_SIGN_USER -c "rpm --addsign $(for i in $RPM_PKG_ARCH_LIST; do find $BUILD_ROOT${BUILD_DIR}/${i} -type f -regex '.*\.rpm' 2>/dev/null; done | sed -e s,$BUILD_ROOT${BUILD_DIR},${BUILT_RPMS_DIR}/${MAJOR_VERSION},g -e 's/$/ \\/g')"
 
+    mount-chroot --umount unionfs_dir
+
     return 0
 }