summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarkus Heiser <markus.heiser@darmarit.de>2020-03-23 18:05:46 +0100
committerMarkus Heiser <markus.heiser@darmarit.de>2020-03-23 18:05:46 +0100
commitbaf1ffd1fa4923f3bd105f0d8daac4a9527bdc50 (patch)
treedb8a5429a0d8c915a73a2221b590fb78e22384d3
parent103c542b374041c8b19e5867fbb32666bf23317b (diff)
downloadsearxng-baf1ffd1fa4923f3bd105f0d8daac4a9527bdc50.tar.gz
searxng-baf1ffd1fa4923f3bd105f0d8daac4a9527bdc50.zip
LXC: set LXC_ENV_FOLDER=lxc/$(shell hostname)/
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
-rwxr-xr-xutils/lib.sh5
-rw-r--r--utils/makefile.lxc2
-rw-r--r--utils/makefile.python6
-rw-r--r--utils/makefile.sphinx10
4 files changed, 14 insertions, 9 deletions
diff --git a/utils/lib.sh b/utils/lib.sh
index 50f15a690..dfa1e9cda 100755
--- a/utils/lib.sh
+++ b/utils/lib.sh
@@ -1077,6 +1077,11 @@ in_container() {
[[ -f /.lxcenv ]]
}
+LXC_ENV_FOLDER=
+if in_container; then
+ LXC_ENV_FOLDER="lxc/$(hostname)/"
+fi
+
lxc_init_container() {
# Create a /.lxcenv file in the root folder. Call this once after container
diff --git a/utils/makefile.lxc b/utils/makefile.lxc
index 8b79994ee..fd999e40d 100644
--- a/utils/makefile.lxc
+++ b/utils/makefile.lxc
@@ -9,7 +9,7 @@
# sudo make ./utils/makefile.lxc lxc-activate
# sudo make ./utils/makefile.lxc lxc-deactivate
-LXC_ENV_FOLDER=/lxc-$(shell hostname)
+LXC_ENV_FOLDER=lxc/$(shell hostname)/
lxc-help::
@echo 'LXC: running in container LXC_ENV_FOLDER=$(LXC_ENV_FOLDER)'
diff --git a/utils/makefile.python b/utils/makefile.python
index bd7d0d14e..1660468f5 100644
--- a/utils/makefile.python
+++ b/utils/makefile.python
@@ -8,9 +8,9 @@ export PYTHONPATH := $(SITE_PYTHON):$$PYTHONPATH
export PY_ENV PYDIST PYBUILD
# 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
-PYBUILD = ./build$(LXC_ENV_FOLDER)
+PYBUILD = ./$(LXC_ENV_FOLDER)build
# python version to use
PY ?=3
PYTHON ?= python$(PY)
@@ -28,7 +28,7 @@ TEST_FOLDER ?= ./tests
TEST ?= .
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_ACT = . $(PY_ENV_BIN)/activate
diff --git a/utils/makefile.sphinx b/utils/makefile.sphinx
index 8a1f6b76b..fd4c3a6f1 100644
--- a/utils/makefile.sphinx
+++ b/utils/makefile.sphinx
@@ -7,13 +7,13 @@ SPHINXOPTS ?=
SPHINXBUILD ?= $(PY_ENV_BIN)/sphinx-build
SPHINX_CONF ?= conf.py
-DOCS_FOLDER = docs$(LXC_ENV_FOLDER)
-DOCS_BUILD = build/docs$(LXC_ENV_FOLDER)
-DOCS_DIST = dist/docs$(LXC_ENV_FOLDER)
+DOCS_FOLDER = ./$(LXC_ENV_FOLDER)docs
+DOCS_BUILD = ./$(LXC_ENV_FOLDER)build/docs
+DOCS_DIST = ./$(LXC_ENV_FOLDER)dist/docs
GH_PAGES ?= gh-pages
-BOOKS_FOLDER = docs$(LXC_ENV_FOLDER)
-BOOKS_DIST = dist/books$(LXC_ENV_FOLDER)
+BOOKS_FOLDER = ./$(LXC_ENV_FOLDER)docs
+BOOKS_DIST = ./$(LXC_ENV_FOLDER)dist/books
ifeq ($(KBUILD_VERBOSE),1)
SPHINX_VERBOSE = "-v"