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