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

Fix a bug in the path to replace in OBS.

parent 294c0b76
......@@ -6,10 +6,10 @@ INITIAL_DIR="$(pwd)"/
# RELEASE INFORMATION
# Modify the following variables accordingly
VERSION=0
VERSION=1
#RECIPE_VERSION=1
RELEASE=1
SOFTWARE_NAME=fluent-bit
SOFTWARE_NAME=lunzip
COMPOUND_VERSION=${VERSION}-${RELEASE}
VERSION_NAME=${SOFTWARE_NAME}_${COMPOUND_VERSION}
......@@ -25,7 +25,7 @@ TARBALL_DIR=$INITIAL_DIR/tarballs/$VERSION_NAME
# BUILD INFORMATION
# Modify the following variables accordingly
SR_PATH=$TARBALL_DIR/software_release/component/fluent-bit/buildout.cfg
SR_PATH=$TARBALL_DIR/software_release/component/lunzip/buildout.cfg
TEMPLATE_DIR=$INITIAL_DIR/templates
BUILD_DIR=$TARBALL_DIR/build/ # former BUILD_ROOT_DIRECTORY
......@@ -39,6 +39,7 @@ TARGET_DIR=`realpath -m $TARGET_DIR`
OBS_DIR=`realpath -m $OBS_DIR`
DIST_DIR=`realpath -m $DIST_DIR`
TARBALL_DIR=`realpath -m $TARBALL_DIR`
SR_PATH=`realpath -m $SR_PATH`
TEMPLATE_DIR=`realpath -m $TEMPLATE_DIR`
BUILD_DIR=`realpath -m $BUILD_DIR`
RUN_BUILDOUT_DIR=`realpath -m $RUN_BUILDOUT_DIR`
......
......@@ -10,8 +10,8 @@ echo TMP_DIR = $TMP_DIR
# copy the Makefile at the root of the tarball
cp $TEMPLATE_DIR/tmp/Makefile $TARBALL_DIR/Makefile
# save the local BUILD_DIR to replace it with the BUILD_DIR of OBS' VM
echo $BUILD_DIR > $TARBALL_DIR/cache_creation_build_directory
# save the local TARBALL_DIR to replace it with the TARBALL_DIR of OBS' VM
echo $TARBALL_DIR > $TARBALL_DIR/cache_creation_build_directory
# clean the parts directory
rm -rf $RUN_BUILDOUT_DIR/{.installed.cfg,parts/}
......
......@@ -5,8 +5,10 @@ PY = $(PYTHON)
# This templates are replaced by build-scripts/template_stage.sh
# according to the values and regular expressions defined in
# build-scripts/configuration_information.sh
TARGET_DIR = %TARGET_DIR% # this variable is pretty useless atm
BUILD_DIR = $(shell pwd)/build
# The variable TARGET_DIR is pretty useless atm
TARGET_DIR = %TARGET_DIR%
TARBALL_DIR = $(shell pwd)
BUILD_DIR = $(TARBALL_DIR)/build
INSTALL_DIR = $(BUILD_DIR)$(TARGET_DIR)
RUN_BUILDOUT_DIR = $(BUILD_DIR)$(TARGET_DIR)
#PATCHES_DIR := $(shell pwd)/patches
......@@ -20,13 +22,13 @@ all: build
build: build-stamp
build-stamp:
@echo "Fixing buildout path to $(BUILD_DIR) rather than $(OLD_BUILD_DIR) for buildout"
@echo "Fixing buildout path to $(TARBALL_DIR) rather than $(OLD_BUILD_DIR) for buildout"
################################################################################
# grep -rIl '$(OLD_DIRECTORY)' $(BUILD_DIR) 2> /dev/null | \
# xargs sed -i 's#$(OLD_DIRECTORY)#$(BUILD_DIR)#g' || \
# echo "No path to fix."
################################################################################
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)#$(TARBALL_DIR)#g' buildout.cfg bin/*
echo RUN_BUILDOUT_DIR = $(RUN_BUILDOUT_DIR) \; PY = $(PY)
cd $(RUN_BUILDOUT_DIR) && \
$(PY) ./bin/buildout -v
......
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