webbuild: support for special 'autodist' user path in chroot mode
This commit is contained in:
parent
f43a210165
commit
ccf4cda924
@ -241,7 +241,9 @@ function google_search() {
|
||||
function print_environment_descr() {
|
||||
local i=$1
|
||||
|
||||
if [ "${AUTOPORT_CHROOT_USER[$i]}" ]; then
|
||||
if [ "${AUTOPORT_CHROOT[$i]}" ]; then
|
||||
echo -n "${AUTOPORT_CHROOT[$i]} - "
|
||||
elif [ "${AUTOPORT_CHROOT_USER[$i]}" ]; then
|
||||
echo -n "${AUTOPORT_CHROOT_USER[$i]} - "
|
||||
else
|
||||
echo -n "autodist - "
|
||||
@ -264,12 +266,7 @@ function print_environment_descr() {
|
||||
function environment_autoport_logdir() {
|
||||
local env=$1
|
||||
if [ "${AUTOPORT_CHROOT[$env]}" ]; then
|
||||
# FIXME: be able to detect real home without using chroot
|
||||
if [ "${AUTOPORT_CHROOT_USER[$env]}" = "autodist" ]; then
|
||||
echo "/var/autoport/${AUTOPORT_CHROOT[$env]}/var/autodist/.autoport/"
|
||||
else
|
||||
echo "/var/autoport/${AUTOPORT_CHROOT[$env]}/home/${AUTOPORT_CHROOT_USER[$env]}/.autoport/"
|
||||
fi
|
||||
elif [ "${AUTOPORT_NATIVE[$env]}" ]; then
|
||||
local envhome=`eval echo ~${AUTOPORT_CHROOT_USER[$env]}`
|
||||
echo "$envhome/.autoport"
|
||||
@ -279,12 +276,7 @@ function environment_autoport_logdir() {
|
||||
function environment_logdir() {
|
||||
local env=$1
|
||||
if [ "${AUTOPORT_CHROOT[$env]}" ]; then
|
||||
# FIXME: be able to detect real home without using chroot
|
||||
if [ "${AUTOPORT_CHROOT_USER[$env]}" = "autodist" ]; then
|
||||
echo "/var/autoport/${AUTOPORT_CHROOT[$env]}/var/autodist/log/"
|
||||
else
|
||||
echo "/var/autoport/${AUTOPORT_CHROOT[$env]}/home/${AUTOPORT_CHROOT_USER[$env]}/.autodist/log/"
|
||||
fi
|
||||
elif [ "${AUTOPORT_NATIVE[$env]}" ]; then
|
||||
local envhome=`eval echo ~${AUTOPORT_CHROOT_USER[$env]}`
|
||||
if [ "${AUTOPORT_CHROOT_USER[$env]}" = "autodist" ]; then
|
||||
|
@ -42,9 +42,14 @@ if [ "$ENVIRONMENT" = "local" ]; then
|
||||
elif [ "${AUTOPORT_CHROOT[$ENVIRONMENT]}" ]; then
|
||||
ENVPREFIX="/var/autoport/${AUTOPORT_CHROOT[$ENVIRONMENT]}"
|
||||
ENVUSER=${AUTOPORT_CHROOT_USER[$ENVIRONMENT]}
|
||||
if [ "${AUTOPORT_CHROOT_USER[$ENVIRONMENT]}" = "autodist" ]; then
|
||||
WORKINGHOME="/var/autodist/"
|
||||
RPMBUILDROOT="/var/tmp/autodist/"
|
||||
else
|
||||
WORKINGHOME="/usr/src/"
|
||||
SUCMDPREFIX="chroot $ENVPREFIX su -l ${AUTOPORT_CHROOT_USER[$ENVIRONMENT]} -c"
|
||||
RPMBUILDROOT="/var/tmp/"
|
||||
fi
|
||||
SUCMDPREFIX="chroot $ENVPREFIX su -l ${AUTOPORT_CHROOT_USER[$ENVIRONMENT]} -c"
|
||||
[ "$TMPFILE" ] && {
|
||||
cp $TMPFILE /var/autoport/${AUTOPORT_CHROOT[$ENVIRONMENT]}/$TMPFILE
|
||||
chmod 755 /var/autoport/${AUTOPORT_CHROOT[$ENVIRONMENT]}/$TMPFILE
|
||||
|
Loading…
Reference in New Issue
Block a user