packaging: Eliminate TTY_OPT and NO_TTY variables in kata-deploy

NO_TTY configured whether to add the -t option to docker run.  It makes no
sense for the caller to configure this, since whether you need it depends
on the commands you're running.  Since the point here is to run
non-interactive build scripts, we don't need -t, or -i either.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Greg Kurz <groug@kaod.org>
(cherry picked from commit 1ed7da8fc7)
Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
This commit is contained in:
David Gibson 2022-03-02 16:26:22 +11:00 committed by Fabiano Fidêncio
parent 8f67f9e384
commit 8fa64e011d
2 changed files with 2 additions and 6 deletions

View File

@ -16,7 +16,7 @@ endef
kata-tarball: | all-parallel merge-builds
all-parallel:
${MAKE} -f $(MK_PATH) all -j$$(( $$(nproc) - 1 )) NO_TTY="true" V=
${MAKE} -f $(MK_PATH) all -j$$(( $$(nproc) - 1 )) V=
all: cloud-hypervisor-tarball \
firecracker-tarball \

View File

@ -16,10 +16,6 @@ kata_deploy_create="${script_dir}/kata-deploy-binaries.sh"
uid=$(id -u ${USER})
gid=$(id -g ${USER})
TTY_OPT="-i"
NO_TTY="${NO_TTY:-false}"
[ -t 1 ] && [ "${NO_TTY}" == "false" ] && TTY_OPT="-it"
if [ "${script_dir}" != "${PWD}" ]; then
ln -sf "${script_dir}/build" "${PWD}/build"
fi
@ -34,7 +30,7 @@ docker build -q -t build-kata-deploy \
--build-arg GID=${gid} \
"${script_dir}/dockerbuild/"
docker run ${TTY_OPT} \
docker run \
-v /var/run/docker.sock:/var/run/docker.sock \
--user ${uid}:${gid} \
--env USER=${USER} -v "${kata_dir}:${kata_dir}" \