Commit ef5a7942 authored by Ophélie Gagnard's avatar Ophélie Gagnard

templates/Makefile.in:

- Fix a bug:
	Transform templates/Makefile in an actual template Makefile.in leaving less room for path inconsistencies.
- Fix a bug. Remove tmp-networkcached-related commands.

templates/buildout*.in:
- Fix a bug:
	Add the extends-cache and download-cache variables.

build-scripts/template_stage.sh:
	Add support for the new templates/Makefile.in
parent c8cd4bbe
...@@ -9,3 +9,4 @@ cd $TEMPLATE_DIR ...@@ -9,3 +9,4 @@ cd $TEMPLATE_DIR
mkdir -p tmp/ mkdir -p tmp/
sed $ALL_REGEX buildout_with_gcc.cfg.in > tmp/buildout_with_gcc.cfg sed $ALL_REGEX buildout_with_gcc.cfg.in > tmp/buildout_with_gcc.cfg
sed $ALL_REGEX buildout_without_gcc.cfg.in > tmp/buildout_without_gcc.cfg sed $ALL_REGEX buildout_without_gcc.cfg.in > tmp/buildout_without_gcc.cfg
sed $ALL_REGEX Makefile.in > tmp/Makefile
...@@ -5,9 +5,12 @@ RECIPE_VERSION = 1 ...@@ -5,9 +5,12 @@ RECIPE_VERSION = 1
PY = $(PYTHON) PY = $(PYTHON)
#INSTALL_DIRECTORY = $(DESTDIR)/opt/test #INSTALL_DIRECTORY = $(DESTDIR)/opt/test
#TARGET_DIRECTORY = /opt/slapos #TARGET_DIRECTORY = /opt/slapos
TARGET_DIRECTORY = /opt/test # This templates are replaced by build-scripts/template_stage.sh
BUILD_DIR := $(shell pwd)/build # according to the values and regular expressions defined in
RUN_BUILDOUT_DIR := $(BUILD_DIR)$(TARGET_DIRECTORY) # build-scripts/configuration_information.sh
TARGET_DIRECTORY = %TARGET_DIR%
BUILD_DIR = $(shell pwd)/build
RUN_BUILDOUT_DIR = $(BUILD_DIR)$(TARGET_DIRECTORY)
#PATCHES_DIRECTORY := $(shell pwd)/patches #PATCHES_DIRECTORY := $(shell pwd)/patches
# get the path of the BUILD_DIR of the first build (performed to prepare the cache for OBS) # get the path of the BUILD_DIR of the first build (performed to prepare the cache for OBS)
OLD_BUILD_DIR := $(shell cat cache_creation_build_directory) OLD_BUILD_DIR := $(shell cat cache_creation_build_directory)
...@@ -25,8 +28,7 @@ build-stamp: ...@@ -25,8 +28,7 @@ build-stamp:
# xargs sed -i 's#$(OLD_DIRECTORY)#$(BUILD_DIR)#g' || \ # xargs sed -i 's#$(OLD_DIRECTORY)#$(BUILD_DIR)#g' || \
# echo "No path to fix." # echo "No path to fix."
################################################################################ ################################################################################
cd $(RUN_BUILDOUT_DIR); sed -i 's#$(OLD_BUILD_DIR)#$(BUILD_DIR)#g' buildout.cfg bin/* tmp-networkcached/buildout.cfg tmp-networkcached/bin/* cd $(RUN_BUILDOUT_DIR); sed -i 's#$(OLD_BUILD_DIR)#$(BUILD_DIR)#g' buildout.cfg bin/*
cd $(RUN_BUILDOUT_DIR); sed -i 's#$(OLD_BUILD_DIR)#$(BUILD_DIR)#g' tmp-networkcached/bin/*
echo RUN_BUILDOUT_DIR = $(RUN_BUILDOUT_DIR) \; PY = $(PY) echo RUN_BUILDOUT_DIR = $(RUN_BUILDOUT_DIR) \; PY = $(PY)
cd $(RUN_BUILDOUT_DIR) && \ cd $(RUN_BUILDOUT_DIR) && \
$(PY) ./bin/buildout -v $(PY) ./bin/buildout -v
......
...@@ -3,8 +3,11 @@ rootdir = %TARGET_DIR% ...@@ -3,8 +3,11 @@ rootdir = %TARGET_DIR%
destdir = %BUILD_DIR% destdir = %BUILD_DIR%
builddir = %PARTS_DIR% builddir = %PARTS_DIR%
extends = extends =
%BUILD_DIR%/../software_release/software/fluent-bit/software.cfg # %BUILD_DIR%/../software_release/software/fluent-bit/software.cfg
%BUILD_DIR%/../software_release/component/fluent-bit/buildout.cfg
versions = versions versions = versions
extends-cache = extends-cache
download-cache = download-cache
[gcc] [gcc]
# force usage of gcc from slapos to have it in the cache # force usage of gcc from slapos to have it in the cache
......
...@@ -3,8 +3,11 @@ rootdir = %TARGET_DIR% ...@@ -3,8 +3,11 @@ rootdir = %TARGET_DIR%
destdir = %BUILD_DIR% destdir = %BUILD_DIR%
builddir = %PARTS_DIRY% builddir = %PARTS_DIRY%
extends = extends =
%BUILD_DIR%/../software_release/software/fluent-bit/software.cfg # %BUILD_DIR%/../software_release/software/fluent-bit/software.cfg
%BUILD_DIR%/../software_release/component/fluent-bit/buildout.cfg
versions = versions versions = versions
extends-cache = extends-cache
download-cache = download-cache
[versions] [versions]
setuptools = 44.1.1 setuptools = 44.1.1
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment