From 8235cba01107ca7c54abe566ca279eb2fd6ac429 Mon Sep 17 00:00:00 2001 From: Silvan Calarco Date: Mon, 21 Jan 2013 02:37:04 +0100 Subject: [PATCH] webbuild-function, autodist-cgi: also fix buildlogdir for autodist user in chroot mode --- autodist-cgi | 2 +- webbuild/webbuild-functions | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/autodist-cgi b/autodist-cgi index 7504aeb..11ee60f 100755 --- a/autodist-cgi +++ b/autodist-cgi @@ -153,7 +153,7 @@ _EOF # Security check [ "${SHOWLOG/\/\.}" != "${SHOWLOG}" ] && continue if [ "${AUTOPORT_CHROOT[$i]}" ]; then - BUILDLOGDIR="/var/autoport/${AUTOPORT_CHROOT[$i]}/home/${AUTOPORT_CHROOT_USER[$i]}/.autodist/log/" + BUILDLOGDIR="$LOGDIR" elif [ "${AUTOPORT_NATIVE[$i]}" -o "${AUTOPORT_UPDATE[$i]}" ]; then BUILDLOGDIR="/var/autodist/log/" fi diff --git a/webbuild/webbuild-functions b/webbuild/webbuild-functions index ac8129b..939bfe4 100644 --- a/webbuild/webbuild-functions +++ b/webbuild/webbuild-functions @@ -279,7 +279,12 @@ function environment_autoport_logdir() { function environment_logdir() { local env=$1 if [ "${AUTOPORT_CHROOT[$env]}" ]; then - echo "/var/autoport/${AUTOPORT_CHROOT[$env]}/home/${AUTOPORT_CHROOT_USER[$env]}/.autodist/log/" + # 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