Browse Source

fixed RPM_Sign(), Login_Chroot() in vbuilder.sh.in; the command "vbuilder clean" returns 0.

git-svn-id: http://trac.vinelinux.org/repos/projects/vbootstrap/trunk@3479 ec354946-7b23-47d6-9f5a-488ba84defc7
munepi 11 years ago
parent
commit
410b14d161
3 changed files with 19 additions and 3 deletions
  1. 12 0
      libvbuilder.sh.in
  2. 5 1
      vbootstrap-vl.spec
  3. 2 2
      vbuilder.sh.in

+ 12 - 0
libvbuilder.sh.in

@@ -1,6 +1,18 @@
 #!/bin/bash
 
 setup-vbuilder(){
+    ## check $SUDO_USER and $USERHELPER_UID
+    RPM_SIGN_USER=$SUDO_USER
+    if [ -z "${RPM_SIGN_USER}" ]; then
+	RPM_SIGN_USER=$(getent passwd $USERHELPER_UID | cut -d":" -f1)
+	if [ -z "${RPM_SIGN_USER}" ]; then
+	    echo $"W: \$SUDO_USER and \$USERHELPER_UID are empty"
+	    return 1
+	fi
+    fi
+    ## get $RPM_SIGN_USER's home directory
+    HOME=$(getent passwd $RPM_SIGN_USER |  cut -d":" -f6)
+
     ## load default settings
     VBUILDER_CONF=/etc/vbootstrap/vbuilder.conf
     if [ -r $VBUILDER_CONF ]; then

+ 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.41
+%define version 0.0.42
 
 Summary: bootstrap scripts to create a basic Vine Linux system
 Summary(ja): Vine Linux の基本システムを作成するためのスクリプト
@@ -80,6 +80,10 @@ vbuilder は vbootstrap を利用して chroot 環境の構築し、
 
 
 %changelog
+* Sat Apr 16 2011 Munehiro Yamamoto <munepi@vinelinux.org> 0.0.42-1
+- fixed RPM_Sign(), Login_Chroot() in vbuilder.sh.in
+  - the command "vbuilder clean" returns 0. 
+
 * Sat Apr 09 2011 Munehiro Yamamoto <munepi@vinelinux.org> 0.0.41-1
 - updated vbuilder.sh.in
   - dropped user_from_uid()

+ 2 - 2
vbuilder.sh.in

@@ -943,8 +943,8 @@ while [ $# -gt 0 ]; do
     shift
 done
 
-RPM_Sign
+RPM_Sign ||:
 
-Login_Chroot
+Login_Chroot ||:
 
 exit