|
@@ -7,14 +7,16 @@ TEXTDOMAINDIR=/usr/share/locale
|
|
|
Usage(){
|
|
|
cat<<EOF
|
|
|
$(basename $0) @@VBUILDER_VERSION@@ $(echo $([ -z "@@VBUILDER_REVISION@@" ] || echo "(r@@VBUILDER_REVISION@@)"))
|
|
|
-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} {--debug} {--help} {--bootstrap-dir [directory]} {--unionfs-dir [directory]} {--cache-dir [directory]} {--built-rpms-dir [directory]} {clean|build|build-rpm [src.rpm]|install-rpm [arch.rpm|package]|remove-rpm [package]}
|
|
|
+Usage: $(basename $0) {--profile [profile]} {--version [version]} {--arch [arch]} {--category [categories]} {--fetch-url [fetch_url]} {--dist-upgrade} {--target [target]} {--with-compat32} {--rpmbuild-define [macro_expr]} {--rpmbuild-with [bcond_with]} {--rpmbuild-without [bcond_with]} {--sign} {--no-install} {--debug} {--help} {--bootstrap-dir [directory]} {--unionfs-dir [directory]} {--cache-dir [directory]} {--built-rpms-dir [directory]} {clean|build|build-rpm [src.rpm|spec]|install-rpm [arch.rpm|package]|remove-rpm [package]}
|
|
|
EOF
|
|
|
|
|
|
echo $"
|
|
|
Options:
|
|
|
+ --profile: set a profile
|
|
|
--version: set [version] (default: ${DEFAULT_VERSION})
|
|
|
--arch: set [arch] (default: ${UARCH})
|
|
|
--category: set [categories] (default: ${CATEGORIES})
|
|
|
+ --fetch-url: set [fetch_url] to fetch packages (default: ${VBOOTSTRAP_FETCH_URL})
|
|
|
--dist-upgrade: make VineSeed bootstrap via ${STABLE_VERSION}
|
|
|
--unionfs: cover a bootstrap with unionfs
|
|
|
--target: build rpms with [target]
|
|
@@ -37,7 +39,7 @@ Options:
|
|
|
Actions:
|
|
|
clean: clean the bootstrap of [version]
|
|
|
build: build a bootstrap of [version]
|
|
|
- build-rpm: build [src.rpm] on a bootstrap
|
|
|
+ build-rpm: build [src.rpm|spec] on a bootstrap
|
|
|
install-rpm: install [arch.rpm|package] on a bootstrap
|
|
|
remove-rpm: remove [package] on a bootstrap
|
|
|
"
|
|
@@ -58,10 +60,33 @@ $(basename $0) --target i686 build-rpm [kernel src.rpm]
|
|
|
$(basename $0) --arch i386 --with-compat32 build-rpm [src.rpm]
|
|
|
"
|
|
|
/usr/sbin/vbootstrap | sed -e s/^Usage:.*// -e s/^E:.*//
|
|
|
+## TODO: output supported profiles and their names/comments
|
|
|
}
|
|
|
|
|
|
##############################################################################
|
|
|
|
|
|
+initialize-variables(){
|
|
|
+ ## set boolian variables
|
|
|
+ with_profile=0
|
|
|
+ with_setup_vbootstrap=0
|
|
|
+ with_dist_upgrade=0
|
|
|
+ with_unionfs=0
|
|
|
+ with_sign=0
|
|
|
+ with_no_install=0
|
|
|
+ with_login=0
|
|
|
+ with_debug=0
|
|
|
+ with_actions=0
|
|
|
+ with_ix86_on_x86_64=0
|
|
|
+ with_category_main=0
|
|
|
+ with_category_plus=0
|
|
|
+ with_category_nonfree=0
|
|
|
+ with_category_test=0
|
|
|
+ with_category_proposed_updates=0
|
|
|
+ with_category_security=0
|
|
|
+
|
|
|
+ return 0
|
|
|
+}
|
|
|
+
|
|
|
check-parameter(){
|
|
|
[ -z "$*" ] && Usage && return 1
|
|
|
|
|
@@ -71,7 +96,13 @@ check-parameter(){
|
|
|
Usage
|
|
|
return 1
|
|
|
;;
|
|
|
- --version|--arch|--category|--target|--rpmbuild-define|--rpmbuild-with|--rpmbuild-without|--bootstrap-dir|--unionfs-dir|--cache-dir|--built-rpms-dir)
|
|
|
+ --profile)
|
|
|
+ shift
|
|
|
+ with_profile=1
|
|
|
+ PROFILE=$1
|
|
|
+ check-next-parameter $1 || return 1
|
|
|
+ ;;
|
|
|
+ --version|--arch|--category|--fetch-url|--target|--rpmbuild-define|--rpmbuild-with|--rpmbuild-without|--bootstrap-dir|--unionfs-dir|--cache-dir|--built-rpms-dir)
|
|
|
[ $with_actions -eq 1 ] && \
|
|
|
echo $"E: You can give no more options after actions" && \
|
|
|
return 1
|
|
@@ -114,6 +145,14 @@ check-next-parameter(){
|
|
|
return 0
|
|
|
}
|
|
|
|
|
|
+## NOTE: setup-vbuilder() loads
|
|
|
+## - system wide configurations (from /etc/vbootstrap/vbuilder.conf)
|
|
|
+## - given profile (from /etc/vbootstrap/profile.d/*.conf)
|
|
|
+## - given command-line parameters
|
|
|
+## where given command-line parameters override the settings given profile,
|
|
|
+## and the settings given profile override system wide settings.
|
|
|
+## If you use a profile of vbuilder, you may not override the settings
|
|
|
+## given profile.
|
|
|
setup-vbuilder(){
|
|
|
## check $SUDO_USER and $USERHELPER_UID
|
|
|
RPM_SIGN_USER=$SUDO_USER
|
|
@@ -137,6 +176,8 @@ setup-vbuilder(){
|
|
|
DEFAULT_VERSION=@@VBUILDER_DEFAULT_VERSION@@
|
|
|
[ -z "${CATEGORIES}" ] && \
|
|
|
CATEGORIES=@@VBUILDER_CATEGORIES@@
|
|
|
+ [ -z "${VBOOTSTRAP_FETCH_URL}" ] && \
|
|
|
+ VBOOTSTRAP_FETCH_URL=@@VBUILDER_VBOOTSTRAP_FETCH_URL@@
|
|
|
[ -z "${VBOOTSTRAP_DIR}" ] && \
|
|
|
VBOOTSTRAP_DIR=@@VBUILDER_VBOOTSTRAP_DIR@@
|
|
|
[ -z "${UNIONFS_DIR}" ] && \
|
|
@@ -146,8 +187,21 @@ setup-vbuilder(){
|
|
|
[ -z "${BUILT_RPMS_DIR}" ] && \
|
|
|
BUILT_RPMS_DIR=@@VBUILDER_BUILT_RPMS_DIR@@
|
|
|
|
|
|
+ ## load profile
|
|
|
+ if [ ${with_profile} -eq 1 ]; then
|
|
|
+ [ ! -r /etc/vbootstrap/profile.d/${PROFILE}.conf ] && \
|
|
|
+ echo $"E: No such profile found: ${PROFILE}" && return 1
|
|
|
+
|
|
|
+ . /etc/vbootstrap/profile.d/${PROFILE}.conf
|
|
|
+ [ $? -eq 1 ] && return 1
|
|
|
+ fi
|
|
|
+
|
|
|
## set default version for vbootstrap
|
|
|
- VERSION=$DEFAULT_VERSION
|
|
|
+ if [ ${with_profile} -eq 1 ]; then
|
|
|
+ [ -z ${VERSION} ] && VERSION=$DEFAULT_VERSION
|
|
|
+ else
|
|
|
+ VERSION=$DEFAULT_VERSION
|
|
|
+ fi
|
|
|
|
|
|
## set current stable relase version
|
|
|
STABLE_VERSION=@@VBUILDER_STABLE_VERSION@@
|
|
@@ -160,23 +214,6 @@ setup-vbuilder(){
|
|
|
;;
|
|
|
esac
|
|
|
|
|
|
- ## set boolian variables
|
|
|
- with_setup_vbootstrap=0
|
|
|
- with_dist_upgrade=0
|
|
|
- with_unionfs=0
|
|
|
- with_sign=0
|
|
|
- with_no_install=0
|
|
|
- with_login=0
|
|
|
- with_debug=0
|
|
|
- with_actions=0
|
|
|
- with_ix86_on_x86_64=0
|
|
|
- with_category_main=0
|
|
|
- with_category_plus=0
|
|
|
- with_category_nonfree=0
|
|
|
- with_category_test=0
|
|
|
- with_category_proposed_updates=0
|
|
|
- with_category_security=0
|
|
|
-
|
|
|
return 0
|
|
|
}
|
|
|
|
|
@@ -238,12 +275,12 @@ setup-vbootstrap(){
|
|
|
fi
|
|
|
fi
|
|
|
|
|
|
- ## set the profile <version>_<arch>
|
|
|
- PROFILE=${VERSION}_${VARCH}
|
|
|
+ ## set base profile <version>_<arch>
|
|
|
+ BASE_PROFILE=${VERSION}_${VARCH}
|
|
|
|
|
|
- ## check support ${PROFILE}
|
|
|
- if [ -z "$(/usr/sbin/vbootstrap | sed -e s/^Usage:.*// -e s/^E:.*// | grep -m 1 ${PROFILE})" ]; then
|
|
|
- echo $"E: ${PROFILE} is NOT supported"
|
|
|
+ ## check support ${BASE_PROFILE}
|
|
|
+ if [ -z "$(/usr/sbin/vbootstrap | sed -e s/^Usage:.*// -e s/^E:.*// | grep -m 1 ${BASE_PROFILE})" ]; then
|
|
|
+ echo $"E: ${BASE_PROFILE} is NOT supported"
|
|
|
return 1
|
|
|
fi
|
|
|
|
|
@@ -309,19 +346,29 @@ setup-vbootstrap(){
|
|
|
fi
|
|
|
|
|
|
## set ${RPM_PKG_ARCH_LIST}
|
|
|
- RPM_PKG_ARCH_LIST="RPMS/i386 RPMS/i686 RPMS/x86_64 RPMS/ppc RPMS/noarch RPMS/armv3l RPMS/armv4l RPMS/armv4tl RPMS/armv5tejl RPMS/armv5tel RPMS/armv6l RPMS/armv7l SRPMS"
|
|
|
+ RPM_PKG_ARCH_LIST=" \
|
|
|
+ RPMS/i386 RPMS/i486 RPMS/i586 RPMS/i686 RPMS/x86_64 RPMS/ppc \
|
|
|
+ RPMS/noarch \
|
|
|
+ RPMS/armv3l RPMS/armv4l RPMS/armv4tl \
|
|
|
+ RPMS/armv5tejl RPMS/armv5tel RPMS/armv6l RPMS/armv7l \
|
|
|
+ SRPMS"
|
|
|
[ -z "${TARGET}" ] || \
|
|
|
RPM_PKG_ARCH_LIST="RPMS/${TARGET} ${RPM_PKG_ARCH_LIST}"
|
|
|
|
|
|
fi
|
|
|
|
|
|
## set global variables
|
|
|
- BUILD_ROOT=${VBOOTSTRAP_DIR}/${PROFILE}
|
|
|
BUILD_USER=vbuilder
|
|
|
BUILD_DIR=/home/${BUILD_USER}/rpm
|
|
|
- UNIONFS_ROOT=${UNIONFS_DIR}/${PROFILE}
|
|
|
+ if [ ${with_profile} -eq 1 ]; then
|
|
|
+ BUILD_ROOT=${VBOOTSTRAP_DIR}/${PROFILE}
|
|
|
+ UNIONFS_ROOT=${UNIONFS_DIR}/${PROFILE}
|
|
|
+ else
|
|
|
+ BUILD_ROOT=${VBOOTSTRAP_DIR}/${BASE_PROFILE}
|
|
|
+ UNIONFS_ROOT=${UNIONFS_DIR}/${BASE_PROFILE}
|
|
|
+ fi
|
|
|
ARCHIVES_DIR=${BUILD_ROOT}/var/cache/apt/archives
|
|
|
- EXTERNAL_ARCHIVES_DIR=${CACHE_DIR}/${PROFILE}/apt/archives
|
|
|
+ EXTERNAL_ARCHIVES_DIR=${CACHE_DIR}/${BASE_PROFILE}/apt/archives
|
|
|
|
|
|
__chroot_sh="/usr/sbin/chroot ${BUILD_ROOT} /bin/sh -c -l"
|
|
|
|
|
@@ -492,6 +539,13 @@ mount-chroot-mount(){
|
|
|
return 0
|
|
|
}
|
|
|
|
|
|
+## TODO: support spec-validator
|
|
|
+## spec-validator [spec file]
|
|
|
+spec-validator(){
|
|
|
+ echo
|
|
|
+ return 0
|
|
|
+}
|
|
|
+
|
|
|
|
|
|
##############################################################################
|
|
|
|
|
@@ -526,7 +580,7 @@ Clean(){
|
|
|
fi
|
|
|
fi
|
|
|
|
|
|
- echo $"Cleanup a build farm for ${PROFILE} done."
|
|
|
+ echo $"Cleanup a build farm for ${BUILD_ROOT} done."
|
|
|
return 0
|
|
|
}
|
|
|
|
|
@@ -536,14 +590,14 @@ Build(){
|
|
|
if [ $with_dist_upgrade -eq 1 ]; then
|
|
|
## make bootstrap of ${STABLE_VERSION}
|
|
|
/usr/sbin/vbootstrap \
|
|
|
- $(echo ${PROFILE} | sed -e "s/VineSeed/${STABLE_VERSION}/") \
|
|
|
- ${BUILD_ROOT}
|
|
|
+ $(echo ${BASE_PROFILE} | sed -e "s/VineSeed/${STABLE_VERSION}/") \
|
|
|
+ ${VBOOTSTRAP_FETCH_URL} ${BUILD_ROOT}
|
|
|
|
|
|
## aim apt-line to VineSeed
|
|
|
sed -i "s/apt ${STABLE_VERSION}/apt VineSeed/g" \
|
|
|
${BUILD_ROOT}/etc/apt/sources.list.d/main.list
|
|
|
else
|
|
|
- /usr/sbin/vbootstrap ${PROFILE} ${BUILD_ROOT}
|
|
|
+ /usr/sbin/vbootstrap ${BASE_PROFILE} ${VBOOTSTRAP_FETCH_URL} ${BUILD_ROOT}
|
|
|
fi
|
|
|
|
|
|
mount-chroot /proc
|
|
@@ -553,32 +607,42 @@ Build(){
|
|
|
# mount-chroot /tmp
|
|
|
# mount-chroot /home
|
|
|
|
|
|
- $__chroot_sh 'apt-get -qq update && apt-get -qq -y dist-upgrade'
|
|
|
-
|
|
|
##!! 4.2 has no apt-sourceslist-{plus,nonfree,proposed-updates} packages
|
|
|
case ${VERSION} in
|
|
|
4.2)
|
|
|
- $__chroot_sh "sed -i -e 's/main plus updates nonfree *$/$(echo ${CATEGORIES} | sed -e "s/,/ /"g) updates/g' /etc/apt/sources.list"
|
|
|
+ sed -i -e "s|@@VBUILDER_VBOOTSTRAP_FETCH_URL@@|${VBOOTSTRAP_FETCH_URL}|g" ${BUILD_ROOT}/etc/apt/sources.list
|
|
|
+ sed -i -e 's/main plus updates nonfree *$/$(echo ${CATEGORIES} | sed -e "s/,/ /"g) updates/g' ${BUILD_ROOT}/etc/apt/sources.list
|
|
|
+ $__chroot_sh 'apt-get -qq update && apt-get -qq -y dist-upgrade'
|
|
|
# [ $with_category_security -eq 1 ] && \
|
|
|
# echo
|
|
|
;;
|
|
|
5.2|@@VBUILDER_STABLE_VERSION@@)
|
|
|
+ sed -i -e "s|@@VBUILDER_VBOOTSTRAP_FETCH_URL@@|${VBOOTSTRAP_FETCH_URL}|g" ${BUILD_ROOT}/etc/apt/sources.list.d/main.list
|
|
|
+ $__chroot_sh 'apt-get -qq update && apt-get -qq -y dist-upgrade'
|
|
|
[ $with_category_plus -eq 1 ] && \
|
|
|
- $__chroot_sh 'apt-get -qq update && apt-get -qq -y install apt-sourceslist-plus'
|
|
|
+ $__chroot_sh 'apt-get -qq update && apt-get -qq -y install apt-sourceslist-plus' && \
|
|
|
+ sed -i -e "s|@@VBUILDER_VBOOTSTRAP_FETCH_URL@@|${VBOOTSTRAP_FETCH_URL}|g" ${BUILD_ROOT}/etc/apt/sources.list.d/plus.list
|
|
|
[ $with_category_nonfree -eq 1 ] && \
|
|
|
- $__chroot_sh 'apt-get -qq update && apt-get -qq -y install apt-sourceslist-nonfree'
|
|
|
+ $__chroot_sh 'apt-get -qq update && apt-get -qq -y install apt-sourceslist-nonfree' && \
|
|
|
+ sed -i -e "s|@@VBUILDER_VBOOTSTRAP_FETCH_URL@@|${VBOOTSTRAP_FETCH_URL}|g" ${BUILD_ROOT}/etc/apt/sources.list.d/nonfree.list
|
|
|
[ $with_category_proposed_updates -eq 1 ] && \
|
|
|
- $__chroot_sh 'apt-get -qq update && apt-get -qq -y install apt-sourceslist-proposed-updates'
|
|
|
+ $__chroot_sh 'apt-get -qq update && apt-get -qq -y install apt-sourceslist-proposed-updates' && \
|
|
|
+ sed -i -e "s|@@VBUILDER_VBOOTSTRAP_FETCH_URL@@|${VBOOTSTRAP_FETCH_URL}|g" ${BUILD_ROOT}/etc/apt/sources.list.d/proposed-updates.list
|
|
|
# [ $with_category_security -eq 1 ] && \
|
|
|
# echo
|
|
|
;;
|
|
|
VineSeed)
|
|
|
+ sed -i -e "s|@@VBUILDER_VBOOTSTRAP_FETCH_URL@@|${VBOOTSTRAP_FETCH_URL}|g" ${BUILD_ROOT}/etc/apt/sources.list.d/main.list
|
|
|
+ $__chroot_sh 'apt-get -qq update && apt-get -qq -y dist-upgrade'
|
|
|
[ $with_category_plus -eq 1 ] && \
|
|
|
- $__chroot_sh 'apt-get -qq update && apt-get -qq -y install apt-sourceslist-plus'
|
|
|
+ $__chroot_sh 'apt-get -qq update && apt-get -qq -y install apt-sourceslist-plus' && \
|
|
|
+ sed -i -e "s|@@VBUILDER_VBOOTSTRAP_FETCH_URL@@|${VBOOTSTRAP_FETCH_URL}|g" ${BUILD_ROOT}/etc/apt/sources.list.d/plus.list
|
|
|
[ $with_category_nonfree -eq 1 ] && \
|
|
|
- $__chroot_sh 'apt-get -qq update && apt-get -qq -y install apt-sourceslist-nonfree'
|
|
|
+ $__chroot_sh 'apt-get -qq update && apt-get -qq -y install apt-sourceslist-nonfree' && \
|
|
|
+ sed -i -e "s|@@VBUILDER_VBOOTSTRAP_FETCH_URL@@|${VBOOTSTRAP_FETCH_URL}|g" ${BUILD_ROOT}/etc/apt/sources.list.d/nonfree.list
|
|
|
[ $with_category_test -eq 1 ] && \
|
|
|
- $__chroot_sh 'apt-get -qq update && apt-get -qq -y install apt-sourceslist-test'
|
|
|
+ $__chroot_sh 'apt-get -qq update && apt-get -qq -y install apt-sourceslist-test' && \
|
|
|
+ sed -i -e "s|@@VBUILDER_VBOOTSTRAP_FETCH_URL@@|${VBOOTSTRAP_FETCH_URL}|g" ${BUILD_ROOT}/etc/apt/sources.list.d/test.list
|
|
|
;;
|
|
|
esac
|
|
|
|
|
@@ -606,6 +670,21 @@ Build(){
|
|
|
$__chroot_sh "sed -i -e 's/^%_topdir/#%_topdir/' /home/${BUILD_USER}/.rpmmacros"
|
|
|
fi
|
|
|
|
|
|
+ ## set local repositories (profile only)
|
|
|
+ if [ ${with_profile} -eq 1 ]; then
|
|
|
+ if [ ! -z "${LOCAL_REPOS}" ]; then
|
|
|
+ cat >${BUILD_ROOT}/etc/apt/sources.list.d/local.list<<EOF
|
|
|
+${LOCAL_REPOS}
|
|
|
+EOF
|
|
|
+ fi
|
|
|
+
|
|
|
+ $__chroot_sh "apt-get update"
|
|
|
+
|
|
|
+ ## additional base packages
|
|
|
+ [ ! -z "${ADD_BASE_PKGS}" ] && \
|
|
|
+ $__chroot_sh "apt-get -y install ${ADD_BASE_PKGS}"
|
|
|
+ fi
|
|
|
+
|
|
|
# mount-chroot --umount /home
|
|
|
# mount-chroot --umount /tmp
|
|
|
mount-chroot --umount /dev/shm
|
|
@@ -614,7 +693,7 @@ Build(){
|
|
|
mount-chroot --umount /proc
|
|
|
apt-get-update --host
|
|
|
|
|
|
- echo $"Making a build farm for ${PROFILE} done."
|
|
|
+ echo $"Making a build farm for ${BUILD_ROOT} done."
|
|
|
return 0
|
|
|
}
|
|
|
|
|
@@ -668,6 +747,33 @@ RPM_Install(){
|
|
|
}
|
|
|
|
|
|
RPM_Build(){
|
|
|
+ [ ! -f ${RPM_PKG} ] && \
|
|
|
+ echo $"E: No such file found: ${RPM_PKG}" && return 1
|
|
|
+
|
|
|
+ ## check the extension of given $RPM_PKG
|
|
|
+ local RPM_PKG_EXT=${RPM_PKG##*.}
|
|
|
+ case ${RPM_PKG_EXT} in
|
|
|
+ spec)
|
|
|
+ ## In this case,
|
|
|
+ ## the file ${RPM_PKG} is a spec file!
|
|
|
+ # spec-validator ${RPM_PKG} || return 1
|
|
|
+ # return 1
|
|
|
+
|
|
|
+ ## We assign the variable ${RPM_PKG}
|
|
|
+ ## the src.rpm generated by the spec file ${RPM_PKG}.
|
|
|
+ RPM_PKG=$(rpm -E "%{_srcrpmdir}")/$(rpm -q --qf "%{name}-%{version}-%{release}\n" --specfile ${RPM_PKG} | head -n 1).src.rpm
|
|
|
+ ;;
|
|
|
+ rpm)
|
|
|
+ RPM_PKG_EXT=$(echo ${RPM_PKG} | sed -e "s|.*\.\(src\.rpm\)$|\1|")
|
|
|
+ [ "${RPM_PKG_EXT}" != "src.rpm" ] && \
|
|
|
+ echo $"E: $RPM_PKG is NOT a source RPM package" && return 1
|
|
|
+ ;;
|
|
|
+ *)
|
|
|
+ echo $"The action build-rpm cannot work such extension: ${RPM_PKG_EXT}"
|
|
|
+ return 1
|
|
|
+ ;;
|
|
|
+ esac
|
|
|
+
|
|
|
setup-vbootstrap-rpm || return 1
|
|
|
mount-chroot unionfs_dir
|
|
|
mount-chroot archives_dir
|
|
@@ -675,10 +781,10 @@ RPM_Build(){
|
|
|
mount-chroot /dev/pts
|
|
|
mount-chroot /dev/shm
|
|
|
apt-get-update --chroot
|
|
|
-
|
|
|
- [ ! -f $RPM_PKG ] && \
|
|
|
- echo $"E: $RPM_PKG is not a source RPM package" && return 1
|
|
|
|
|
|
+ [ ! -f ${RPM_PKG} ] && \
|
|
|
+ echo $"E: No such file found: ${RPM_PKG}" && return 1
|
|
|
+
|
|
|
RPM_PKG_USER=$(stat -c %U $RPM_PKG)
|
|
|
RPM_PKG_GROUP=$(stat -c %G $RPM_PKG)
|
|
|
[ ! -z "${SUDO_UID}" ] && RPM_PKG_USER=${SUDO_UID}
|
|
@@ -739,7 +845,7 @@ RPM_Sign(){
|
|
|
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}/${VERSION},g -e 's/$/ \\/g')"
|
|
|
+ su $RPM_SIGN_USER -c "rpmsign --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}/${VERSION},g -e 's/$/ \\/g')"
|
|
|
|
|
|
mount-chroot --umount unionfs_dir
|
|
|
|
|
@@ -790,14 +896,19 @@ Login_Chroot(){
|
|
|
|
|
|
##############################################################################
|
|
|
|
|
|
-setup-vbuilder || exit 1
|
|
|
+initialize-variables || exit 1
|
|
|
|
|
|
check-parameter $* || exit 1
|
|
|
|
|
|
+setup-vbuilder || exit 1
|
|
|
+
|
|
|
while [ $# -gt 0 ]; do
|
|
|
tmpARG=$1
|
|
|
case $tmpARG in
|
|
|
- --version|--arch|--category|--target|--rpmbuild-define|--rpmbuild-with|--rpmbuild-without|--bootstrap-dir|--unionfs-dir|--cache-dir|--built-rpms-dir)
|
|
|
+ --profile)
|
|
|
+ shift
|
|
|
+ ;;
|
|
|
+ --version|--arch|--category|--fetch-url|--target|--rpmbuild-define|--rpmbuild-with|--rpmbuild-without|--bootstrap-dir|--unionfs-dir|--cache-dir|--built-rpms-dir)
|
|
|
shift
|
|
|
;;
|
|
|
--dist-upgrade|--unionfs|--with-compat32|--sign|--no-install|--login|--debug)
|
|
@@ -814,6 +925,8 @@ while [ $# -gt 0 ]; do
|
|
|
esac
|
|
|
|
|
|
case $tmpARG in
|
|
|
+ --profile)
|
|
|
+ ;;
|
|
|
--version)
|
|
|
VERSION=$1
|
|
|
;;
|
|
@@ -823,6 +936,9 @@ while [ $# -gt 0 ]; do
|
|
|
--category)
|
|
|
CATEGORIES=$1
|
|
|
;;
|
|
|
+ --fetch-url)
|
|
|
+ VBOOTSTRAP_FETCH_URL=$1
|
|
|
+ ;;
|
|
|
--dist-upgrade)
|
|
|
with_dist_upgrade=1
|
|
|
;;
|