Commit 66b12b40 authored by Ophélie Gagnard's avatar Ophélie Gagnard

[WORKS (with lunzip ; OBS untested)] Remove the networkcached stage when preparing the tarball.

- remove template/networkcached.cfg.in
- remove the networkcached support from build_tree.sh and clean_build_tree.sh
- remove the networkcached support from template_stage.sh bootstrap_buildout.sh
- remove cache_creation.sh and clean_cache_creation.sh
parent 1ff350b3
......@@ -5,13 +5,12 @@ source configuration_information.sh
cd $INITIAL_DIR
# Download the bootstrap script
cd $PARTS_DIR/tmp-networkcached
cd $PARTS_DIR
wget https://bootstrap.pypa.io/bootstrap-buildout.py
cd $INITIAL_DIR
# Create a build/tmp-networkcached/bin/buildout
# Also create a lot of things in build/tmp-networkcached/eggs/
# it uses software_release/ at some point
cd $PARTS_DIR/tmp-networkcached
cp $TEMPLATE_DIR/tmp/networkcached.cfg buildout.cfg
# Create a build/bin/buildout (bootstraping) and run it (actual compilation).
# Note: it creates a lot of things in build/eggs/ and uses software_release/ at some point
cd $PARTS_DIR
cp $TEMPLATE_DIR/tmp/buildout_with_gcc.cfg buildout.cfg
(python2.7 -S bootstrap-buildout.py --buildout-version 2.7.1+slapos016 --setuptools-version 44.1.1 --setuptools-to-dir eggs -f http://www.nexedi.org/static/packages/source/slapos.buildout/ && ./bin/buildout -v)
......@@ -14,4 +14,4 @@ git checkout fluent-bit
cd $INITIAL_DIR
# Peparing the build directories
mkdir -p $PARTS_DIR/{eggs,extends-cache,download-cache/dist,tmp-networkcached/eggs}
mkdir -p $PARTS_DIR/{eggs,extends-cache,download-cache/dist}
#!/bin/bash
set -e
source configuration_information.sh
cd $INITIAL_DIR
# Run bulidout locally to fill download-cache and extends-cache
cd $PARTS_DIR
cp $TEMPLATE_DIR/tmp/buildout_with_gcc.cfg buildout.cfg
# bootstrap again, run buildout if succeeds
# TODO: test if it works in two different lines
(./tmp-networkcached/bin/buildout bootstrap --buildout-version 2.7.1+slapos016 --setuptools-to-dir eggs -f http://www.nexedi.org/static/packages/source/slapos.buildout/ && ./bin/buildout && ./bin/buildout -v)
......@@ -5,8 +5,8 @@ source configuration_information.sh
cd $INITIAL_DIR
# Remove the bootstrap script and associated files
if [[ -d $PARTS_DIR/tmp-networkcached ]]; then
cd $PARTS_DIR/tmp-networkcached
if [[ -d $PARTS_DIR ]]; then
cd $PARTS_DIR
rm -f bootstrap.py # LEGACY
rm -f bootstrap-buildout.py*
rm -f buildout.cfg
......@@ -14,8 +14,8 @@ fi
cd $INITIAL_DIR
# Clean the material created by the bootstrap script
if [[ -d $PARTS_DIR/tmp-networkcached ]]; then
cd $PARTS_DIR/tmp-networkcached
if [[ -d $PARTS_DIR ]]; then
cd $PARTS_DIR
rm -rf bin/
rm -rf eggs/
fi
......@@ -11,4 +11,4 @@ rm -rf software_release
cd $INITIAL_DIR
# Clean the build tree
rm -rf $PARTS_DIR/{eggs,extends-cache,download-cache,tmp-networkcached}
rm -rf $PARTS_DIR/{eggs,extends-cache,download-cache}
#!/bin/bash
set -e
source configuration_information.sh
cd $INITIAL_DIR
# Clean the ouput of the cache creation
cd $PARTS_DIR
rm -f buildout.cfg
rm -rf bin/ develop-eggs/ download-cache/ eggs/* parts/
# TODO:
# + clean the output of the bootstraping
# + clean the output of the cache creation
# (+ clean the files removed for OBS ?)
......@@ -33,8 +33,9 @@ PARTS_DIR=`realpath -m $PARTS_DIR`
# Regular expressions for templates
VERSION_REGEX="s/\%RECIPE_VERSION\%/$RECIPE_VERSION/g;s/\%VERSION\%/$VERSION/g;s/\%RELEASE\%/$RELEASE/g"
# Note: %PATCHES_DIRECTORY% not supported yet
# supporting legacy macros
DIR_REGEX="s|\%TARGET_DIRECTORY\%|$TARGET_DIR|g;s|\%BUILD_ROOT_DIRECTORY\%|$BUILD_DIR|g;s|\%BUILD_DIRECTORY\%|$PARTS_DIR|g"
# supporting new macros
#DIR_REGEX="s|\%TARGET_DIR\%|$TARGET_DIR|g;s|\%BUILD_DIR\%|$BUILD_DIR|g;s|\%PARTS_DIR\%|$PARTS_DIR|g"
DIR_REGEX="s|\%TARGET_DIR\%|$TARGET_DIR|g;s|\%BUILD_DIR\%|$BUILD_DIR|g;s|\%PARTS_DIR\%|$PARTS_DIR|g"
# supporting legacy macros
OLD_DIR_REGEX="s|\%TARGET_DIRECTORY\%|$TARGET_DIR|g;s|\%BUILD_ROOT_DIRECTORY\%|$BUILD_DIR|g;s|\%BUILD_DIRECTORY\%|$PARTS_DIR|g"
# concatenate all regex using ; (quoted, not to end the command)
ALL_REGEX=$VERSION_REGEX";"$DIR_REGEX";"$OLD_DIR_REGEX
[buildout]
rootdir = %TARGET_DIR%
destdir = %BUILD_DIRY%
destdir = %BUILD_DIR%
builddir = %PARTS_DIR%
extends =
%BUILD_DIR%/../software_release/component/lunzip/buildout.cfg
......
[buildout]
rootdir = %TARGET_DIR%
destdir = %BUILD_DIR%
builddir = %PARTS_DIR%
extends =
%BUILD_DIR%/../software_release/component/lunzip/buildout.cfg
extensions =
parts =
networkcached
versions = versions
[networkcached]
recipe = zc.recipe.egg
eggs =
slapos.libnetworkcache
zc.buildout
[versions]
setuptools = 44.1.1
# Use SlapOS patched zc.buildout
zc.buildout = 2.7.1+slapos016
# Use SlapOS patched zc.recipe.egg (zc.recipe.egg 2.x is for Buildout 2)
zc.recipe.egg = 2.0.3+slapos003
......@@ -7,6 +7,5 @@ cd $INITIAL_DIR
# Prepare the templates in $TEMPLATE_DIR/tmp/
cd $TEMPLATE_DIR
mkdir -p tmp/
sed $VERSION_REGEX";"$DIR_REGEX networkcached.cfg.in > tmp/networkcached.cfg
sed $VERSION_REGEX";"$DIR_REGEX buildout_with_gcc.cfg.in > tmp/buildout_with_gcc.cfg
sed $VERSION_REGEX";"$DIR_REGEX buildout_without_gcc.cfg.in > tmp/buildout_without_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
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