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

Makefile: Add a target no-obs and its clean_no-obs counterpart.

build-scripts/*: Simplify the scripts and add a variable for the path of the current tarball.
build-scripts/obs.sh: Delete .install.cfg in the directory where builtout is run.
parent 8ee981c0
all: build_tree template_stage bootstrap_buildout obs
clean: clean_build_tree clean_template_stage clean_bootstrap_buildout clean_obs
all: no_obs obs
clean: clean_no_obs clean_obs
no_obs: build_tree template_stage bootstrap_buildout
clean_no_obs: clean_build_tree clean_template_stage clean_bootstrap_buildout
build_tree:
build-scripts/build_tree.sh
......@@ -22,4 +25,4 @@ obs:
clean_obs:
build-scripts/clean_obs.sh
.PHONY: all clean build_tree clean_build_tree template_stage clean_template_stage bootstrap_buildout clean_bootstrap_buildout obs clean_obs
.PHONY: all clean no_obs clean_no_obs build_tree clean_build_tree template_stage clean_template_stage bootstrap_buildout clean_bootstrap_buildout obs clean_obs
......@@ -4,13 +4,12 @@ set -e
source build-scripts/configuration_information.sh
cd $INITIAL_DIR
mkdir -p tarballs/$SOFTWARE/
mkdir -p $TARBALL_DIR
# Re-downloading the software release to pack
cd tarballs/$SOFTWARE/
git clone https://lab.nexedi.com/Francois/slapos
mv slapos software_release
cd software_release
git checkout fluent-bit
#cp -r /home/test/other-projects/model/1wip_simplify-fluentbit_my-slapos .
cp -r /home/test/other-projects/new_slapos.package/sid.fluentbit.my-slapos $TARBALL_DIR
#mv 1wip_simplify-fluentbit_my-slapos software_release
mv $TARBALL_DIR/sid.fluentbit.my-slapos $TARBALL_DIR/software_release
cd $INITIAL_DIR
# Peparing the build directories
......
......@@ -5,17 +5,8 @@ source build-scripts/configuration_information.sh
cd $INITIAL_DIR
# Remove the bootstrap script and associated files
if [[ -d $RUN_BUILDOUT_DIR ]]; then
cd $RUN_BUILDOUT_DIR
rm -f bootstrap.py # LEGACY
rm -f bootstrap-buildout.py*
rm -f buildout.cfg
fi
rm -f $RUN_BUILDOUT_DIR/{bootstrap.py,bootstrap-buildout.py,buildout.cfg}
cd $INITIAL_DIR
# Clean the material created by the bootstrap script
if [[ -d $RUN_BUILDOUT_DIR ]]; then
cd $RUN_BUILDOUT_DIR
rm -rf bin/
rm -rf eggs/
fi
rm -rf $RUN_BUILDOUT_DIR/{bin/,egg/}
......@@ -5,5 +5,4 @@ source build-scripts/configuration_information.sh
cd $INITIAL_DIR
# Clean temporary directory for templates
cd $TEMPLATE_DIR
rm -rf tmp/
rm -rf $TEMPLATE_DIR/tmp/
......@@ -9,30 +9,32 @@ INITIAL_DIR="$(pwd)"/
VERSION=1
RECIPE_VERSION=1
RELEASE=1
SOFTWARE=mca
SOFTWARE=fluent-bit
# INSTALL INFORMATION
TARGET_DIR=/opt/${SOFTWARE}_software_release
# OBS AND DISTRIBUTIONS INFORMATION
OBS_DIR=$INITIAL_DIR/home:oph.nxd/$SOFTWARE/
DIST_DIR=$INITIAL_DIR/distribution-specifics/$SOFTWARE/
TARBALL_DIR=$INITIAL_DIR/tarballs/$SOFTWARE/
# BUILD INFORMATION
TEMPLATE_DIR=$INITIAL_DIR/templates
BUILD_DIR=$INITIAL_DIR/tarballs/$SOFTWARE/build/ # former BUILD_ROOT_DIRECTORY
BUILD_DIR=$TARBALL_DIR/build/ # former BUILD_ROOT_DIRECTORY
# this is where the parts/ directory will be
RUN_BUILDOUT_DIR=$BUILD_DIR/$TARGET_DIR # former BUILD_DIRECTORY
# OBS AND DISTRIBUTIONS INFORMATION
OBS_DIR=$INITIAL_DIR/home:oph.nxd/$SOFTWARE/
DIST_DIR=$INITIAL_DIR/distribution-specifics/$SOFTWARE/
# Path normalization
INITIAL_DIR=`realpath -m $INITIAL_DIR`
TARGET_DIR=`realpath -m $TARGET_DIR`
OBS_DIR=`realpath -m $OBS_DIR`
DIST_DIR=`realpath -m $DIST_DIR`
TARBALL_DIR=`realpath -m $TARBALL_DIR`
TEMPLATE_DIR=`realpath -m $TEMPLATE_DIR`
BUILD_DIR=`realpath -m $BUILD_DIR`
RUN_BUILDOUT_DIR=`realpath -m $RUN_BUILDOUT_DIR`
OBS_DIR=`realpath -m $OBS_DIR`
DIST_DIR=`realpath -m $DIST_DIR`
# Regular expressions for templates
VERSION_REGEX="s/\%RECIPE_VERSION\%/$RECIPE_VERSION/g;s/\%VERSION\%/$VERSION/g;s/\%RELEASE\%/$RELEASE/g"
......
......@@ -9,12 +9,12 @@ TMP_DIR=`realpath -m $TMP_DIR`
echo TMP_DIR = $TMP_DIR
# copy the Makefile at the root of the tarball
cp $TEMPLATE_DIR/Makefile tarballs/$SOFTWARE/Makefile
cp $TEMPLATE_DIR/tmp/Makefile tarballs/$SOFTWARE/Makefile
# save the local BUILD_DIR to replace it with the BUILD_DIR of OBS' VM
echo $BUILDIR > tarball/$SOFTWARE/cache_creation_build_directory
echo $BUILD_DIR > tarballs/$SOFTWARE/cache_creation_build_directory
# clean the parts directory
rm -rf $RUN_BUILDOUT_DIR/parts/
rm -rf $RUN_BUILDOUT_DIR/{.installed.cfg,parts/}
## prepare the files for OBS
mkdir -p $TMP_DIR
......
......@@ -5,8 +5,7 @@ source build-scripts/configuration_information.sh
cd $INITIAL_DIR
# Prepare the templates in $TEMPLATE_DIR/tmp/
cd $TEMPLATE_DIR
mkdir -p tmp/
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 Makefile.in > tmp/Makefile
mkdir -p $TEMPLATE_DIR/tmp/
sed $ALL_REGEX $TEMPLATE_DIR/buildout_with_gcc.cfg.in > $TEMPLATE_DIR/tmp/buildout_with_gcc.cfg
sed $ALL_REGEX $TEMPLATE_DIR/buildout_without_gcc.cfg.in > $TEMPLATE_DIR/tmp/buildout_without_gcc.cfg
sed $ALL_REGEX $TEMPLATE_DIR/Makefile.in > $TEMPLATE_DIR/tmp/Makefile
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