LXC: set LXC_ENV_FOLDER=lxc/$(shell hostname)/

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
This commit is contained in:
Markus Heiser 2020-03-23 18:05:46 +01:00
parent 103c542b37
commit baf1ffd1fa
4 changed files with 14 additions and 9 deletions

View file

@ -1077,6 +1077,11 @@ in_container() {
[[ -f /.lxcenv ]] [[ -f /.lxcenv ]]
} }
LXC_ENV_FOLDER=
if in_container; then
LXC_ENV_FOLDER="lxc/$(hostname)/"
fi
lxc_init_container() { lxc_init_container() {
# Create a /.lxcenv file in the root folder. Call this once after container # Create a /.lxcenv file in the root folder. Call this once after container

View file

@ -9,7 +9,7 @@
# sudo make ./utils/makefile.lxc lxc-activate # sudo make ./utils/makefile.lxc lxc-activate
# sudo make ./utils/makefile.lxc lxc-deactivate # sudo make ./utils/makefile.lxc lxc-deactivate
LXC_ENV_FOLDER=/lxc-$(shell hostname) LXC_ENV_FOLDER=lxc/$(shell hostname)/
lxc-help:: lxc-help::
@echo 'LXC: running in container LXC_ENV_FOLDER=$(LXC_ENV_FOLDER)' @echo 'LXC: running in container LXC_ENV_FOLDER=$(LXC_ENV_FOLDER)'

View file

@ -8,9 +8,9 @@ export PYTHONPATH := $(SITE_PYTHON):$$PYTHONPATH
export PY_ENV PYDIST PYBUILD export PY_ENV PYDIST PYBUILD
# folder where the python distribution takes place # folder where the python distribution takes place
PYDIST = ./dist$(LXC_ENV_FOLDER) PYDIST = ./$(LXC_ENV_FOLDER)dist
# folder where the python intermediate build files take place # folder where the python intermediate build files take place
PYBUILD = ./build$(LXC_ENV_FOLDER) PYBUILD = ./$(LXC_ENV_FOLDER)build
# python version to use # python version to use
PY ?=3 PY ?=3
PYTHON ?= python$(PY) PYTHON ?= python$(PY)
@ -28,7 +28,7 @@ TEST_FOLDER ?= ./tests
TEST ?= . TEST ?= .
VTENV_OPTS ?= VTENV_OPTS ?=
PY_ENV = ./local$(LXC_ENV_FOLDER)/py$(PY) PY_ENV = ./$(LXC_ENV_FOLDER)local/py$(PY)
PY_ENV_BIN = $(PY_ENV)/bin PY_ENV_BIN = $(PY_ENV)/bin
PY_ENV_ACT = . $(PY_ENV_BIN)/activate PY_ENV_ACT = . $(PY_ENV_BIN)/activate

View file

@ -7,13 +7,13 @@ SPHINXOPTS ?=
SPHINXBUILD ?= $(PY_ENV_BIN)/sphinx-build SPHINXBUILD ?= $(PY_ENV_BIN)/sphinx-build
SPHINX_CONF ?= conf.py SPHINX_CONF ?= conf.py
DOCS_FOLDER = docs$(LXC_ENV_FOLDER) DOCS_FOLDER = ./$(LXC_ENV_FOLDER)docs
DOCS_BUILD = build/docs$(LXC_ENV_FOLDER) DOCS_BUILD = ./$(LXC_ENV_FOLDER)build/docs
DOCS_DIST = dist/docs$(LXC_ENV_FOLDER) DOCS_DIST = ./$(LXC_ENV_FOLDER)dist/docs
GH_PAGES ?= gh-pages GH_PAGES ?= gh-pages
BOOKS_FOLDER = docs$(LXC_ENV_FOLDER) BOOKS_FOLDER = ./$(LXC_ENV_FOLDER)docs
BOOKS_DIST = dist/books$(LXC_ENV_FOLDER) BOOKS_DIST = ./$(LXC_ENV_FOLDER)dist/books
ifeq ($(KBUILD_VERBOSE),1) ifeq ($(KBUILD_VERBOSE),1)
SPHINX_VERBOSE = "-v" SPHINX_VERBOSE = "-v"