Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.package
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
15
Merge Requests
15
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
slapos.package
Commits
becf8150
Commit
becf8150
authored
Jun 28, 2024
by
Thomas Gambier
🚴🏼
1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adapt build with buildout3
parent
864e80e9
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
41 additions
and
23 deletions
+41
-23
obs/slapos/prepare_download_cache.sh
obs/slapos/prepare_download_cache.sh
+18
-15
obs/slapos/slapos-node/Makefile
obs/slapos/slapos-node/Makefile
+1
-1
obs/slapos/slapos-node/slapos/buildout_without_gcc.cfg.in
obs/slapos/slapos-node/slapos/buildout_without_gcc.cfg.in
+1
-0
obs/slapos/slapos-node/slapos/networkcached.cfg.in
obs/slapos/slapos-node/slapos/networkcached.cfg.in
+12
-3
obs/slapos/slapos-node/slapos/slapos.buildout.cfg.in
obs/slapos/slapos-node/slapos/slapos.buildout.cfg.in
+8
-3
obs/slapos/templates/Makefile.in
obs/slapos/templates/Makefile.in
+1
-1
No files found.
obs/slapos/prepare_download_cache.sh
View file @
becf8150
#!/bin/bash
#!/bin/bash
set
-e
set
-e
set
-o
pipefail
source
release_configuration.sh
source
release_configuration.sh
...
@@ -23,27 +24,29 @@ echo " Buildroot Directory: $BUILD_ROOT_DIRECTORY "
...
@@ -23,27 +24,29 @@ echo " Buildroot Directory: $BUILD_ROOT_DIRECTORY "
# build the package once keeping every source in cache #
# build the package once keeping every source in cache #
########################################################
########################################################
mkdir
-p
$BUILD_DIRECTORY
/
{
eggs,extends-cache,download-cache/dist
}
mkdir
-p
$BUILD_DIRECTORY
/
{
eggs,extends-cache,download-cache/dist,bootstrap-dir
}
cd
$BUILD_DIRECTORY
cd
$BUILD_DIRECTORY
/bootstrap-dir
# 1) boostrap with isolation
echo
"bootsrapping buildout"
sed
"s/
\%
RECIPE_VERSION
\%
/
$RECIPE_VERSION
/g;s|
\%
PATCHES_DIRECTORY
\%
|
$PATCHES_DIRECTORY
|g;s|
\%
TARGET_DIRECTORY
\%
|
$TARGET_DIRECTORY
|g;s|
\%
BUILD_ROOT_DIRECTORY
\%
|
$BUILD_ROOT_DIRECTORY
|g;s|
\%
BUILD_DIRECTORY
\%
|
$BUILD_DIRECTORY
|g"
$BUILD_ROOT_DIRECTORY
/../slapos.buildout.cfg.in
>
buildout.cfg
buildout bootstrap buildout:isolate-from-buildout-and-setuptools-path
=
true
# 1) you need a recent enough version of Nexedi buildout, you can do e.g.:
ls
download-cache/dist/
*
.whl
&&
{
echo
"There shouldn't be any wheel in download-cache"
;
exit
1
;
}
# pip install http://www.nexedi.org/static/packages/source/slapos.buildout/zc.buildout-3.0.1%2Bslapos002.tar.gz
# 2) compile very simple buildout with networkcache
# 2) compile very simple buildout with networkcache
echo
"Preparing networkcached zc.buildout"
echo
"Preparing networkcached zc.buildout"
sed
"s/
\%
RECIPE_VERSION
\%
/
$RECIPE_VERSION
/g;s|
\%
PATCHES_DIRECTORY
\%
|
$PATCHES_DIRECTORY
|g;s|
\%
TARGET_DIRECTORY
\%
|
$TARGET_DIRECTORY
|g;s|
\%
BUILD_ROOT_DIRECTORY
\%
|
$BUILD_ROOT_DIRECTORY
|g;s|
\%
BUILD_DIRECTORY
\%
|
$BUILD_DIRECTORY
|g"
$BUILD_ROOT_DIRECTORY
/../networkcached.cfg.in
>
buildout.cfg
sed
"s/
\%
RECIPE_VERSION
\%
/
$RECIPE_VERSION
/g;s|
\%
PATCHES_DIRECTORY
\%
|
$PATCHES_DIRECTORY
|g;s|
\%
TARGET_DIRECTORY
\%
|
$TARGET_DIRECTORY
|g;s|
\%
BUILD_ROOT_DIRECTORY
\%
|
$BUILD_ROOT_DIRECTORY
|g;s|
\%
BUILD_DIRECTORY
\%
|
$BUILD_DIRECTORY
|g"
$BUILD_ROOT_DIRECTORY
/../networkcached.cfg.in
>
buildout.cfg
sed
-i
'1s/$/ -S/'
bin/buildout
# be careful to let 'extra-paths=' in buildout section for isolation
b
in/buildout buildout:newest
=
true
-v
b
uildout buildout:download-cache
=
../download-cache bootstrap
# 3) build locally everything with gcc to get download-cache and extends-cache ready
# 3) bootstrap the buildout used for full compilation
echo
"Launch the big buildout to compile everything"
echo
"Launch the bootstrap of final buildout"
cd
$BUILD_DIRECTORY
sed
"s/
\%
RECIPE_VERSION
\%
/
$RECIPE_VERSION
/g;s|
\%
PATCHES_DIRECTORY
\%
|
$PATCHES_DIRECTORY
|g;s|
\%
TARGET_DIRECTORY
\%
|
$TARGET_DIRECTORY
|g;s|
\%
BUILD_ROOT_DIRECTORY
\%
|
$BUILD_ROOT_DIRECTORY
|g;s|
\%
BUILD_DIRECTORY
\%
|
$BUILD_DIRECTORY
|g"
$BUILD_ROOT_DIRECTORY
/../buildout_with_gcc.cfg.in
>
buildout.cfg
sed
"s/
\%
RECIPE_VERSION
\%
/
$RECIPE_VERSION
/g;s|
\%
PATCHES_DIRECTORY
\%
|
$PATCHES_DIRECTORY
|g;s|
\%
TARGET_DIRECTORY
\%
|
$TARGET_DIRECTORY
|g;s|
\%
BUILD_ROOT_DIRECTORY
\%
|
$BUILD_ROOT_DIRECTORY
|g;s|
\%
BUILD_DIRECTORY
\%
|
$BUILD_DIRECTORY
|g"
$BUILD_ROOT_DIRECTORY
/../buildout_with_gcc.cfg.in
>
buildout.cfg
bootstrap-dir/bin/buildout bootstrap
# 4) build locally everything with gcc to get download-cache and extends-cache ready
echo
"Launch the big buildout to compile everything"
bin/buildout buildout:newest
=
true
-v
|
tee
buildout-full.log
bin/buildout buildout:newest
=
true
-v
###################################################
###################################################
# remove all files from build keeping only caches #
# remove all files from build keeping only caches #
...
@@ -68,11 +71,10 @@ find . -regextype posix-extended -type f \
...
@@ -68,11 +71,10 @@ find . -regextype posix-extended -type f \
#TODO remove git files
#TODO remove git files
##################################
##################################
# prepare compilation inside OBS #
# prepare compilation inside OBS #
##################################
##################################
# we need the very first bootstrap script
cp
$CURRENT_DIRECTORY
/../_generic/compilation/makefile-scripts/bootstrap
$BUILD_DIRECTORY
# we need the original directory to do a sed inside OBS
# we need the original directory to do a sed inside OBS
# TODO remove this and properly use extends-cache instead
# TODO remove this and properly use extends-cache instead
...
@@ -81,3 +83,4 @@ echo "$BUILD_ROOT_DIRECTORY" > $CURRENT_DIRECTORY/$SLAPOS_DIRECTORY/slapos/origi
...
@@ -81,3 +83,4 @@ echo "$BUILD_ROOT_DIRECTORY" > $CURRENT_DIRECTORY/$SLAPOS_DIRECTORY/slapos/origi
# in OBS build, don't force gcc build
# in OBS build, don't force gcc build
sed
"s/
\%
RECIPE_VERSION
\%
/
$RECIPE_VERSION
/g;s|
\%
PATCHES_DIRECTORY
\%
|
$PATCHES_DIRECTORY
|g;s|
\%
TARGET_DIRECTORY
\%
|
$TARGET_DIRECTORY
|g;s|
\%
BUILD_ROOT_DIRECTORY
\%
|
$BUILD_ROOT_DIRECTORY
|g;s|
\%
BUILD_DIRECTORY
\%
|
$BUILD_DIRECTORY
|g"
$BUILD_ROOT_DIRECTORY
/../buildout_without_gcc.cfg.in
>
$BUILD_DIRECTORY
/buildout.cfg
sed
"s/
\%
RECIPE_VERSION
\%
/
$RECIPE_VERSION
/g;s|
\%
PATCHES_DIRECTORY
\%
|
$PATCHES_DIRECTORY
|g;s|
\%
TARGET_DIRECTORY
\%
|
$TARGET_DIRECTORY
|g;s|
\%
BUILD_ROOT_DIRECTORY
\%
|
$BUILD_ROOT_DIRECTORY
|g;s|
\%
BUILD_DIRECTORY
\%
|
$BUILD_DIRECTORY
|g"
$BUILD_ROOT_DIRECTORY
/../buildout_without_gcc.cfg.in
>
$BUILD_DIRECTORY
/buildout.cfg
obs/slapos/slapos-node/Makefile
View file @
becf8150
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
# -*- makefile -*-
# -*- makefile -*-
build
:
build
:
make
-C
slapos build
SLAPOS_BOOTSTRAP_SYSTEM_PYTHON
=
$(
shell
which python
2.7 2> /dev/null
||
echo
python3
)
make
-C
slapos build
SLAPOS_BOOTSTRAP_SYSTEM_PYTHON
=
$(
shell
which python
3 2> /dev/null
||
echo
python2.7
)
all
:
build
all
:
build
...
...
obs/slapos/slapos-node/slapos/buildout_without_gcc.cfg.in
View file @
becf8150
...
@@ -2,6 +2,7 @@
...
@@ -2,6 +2,7 @@
rootdir = %TARGET_DIRECTORY%
rootdir = %TARGET_DIRECTORY%
destdir = %BUILD_ROOT_DIRECTORY%
destdir = %BUILD_ROOT_DIRECTORY%
builddir = %BUILD_DIRECTORY%
builddir = %BUILD_DIRECTORY%
extra-paths =
extends =
extends =
%BUILD_ROOT_DIRECTORY%/../slapos_repository/component/slapos/obs.cfg
%BUILD_ROOT_DIRECTORY%/../slapos_repository/component/slapos/obs.cfg
download-cache = download-cache
download-cache = download-cache
...
...
obs/slapos/slapos-node/slapos/networkcached.cfg.in
View file @
becf8150
...
@@ -2,6 +2,7 @@
...
@@ -2,6 +2,7 @@
rootdir = %TARGET_DIRECTORY%
rootdir = %TARGET_DIRECTORY%
destdir = %BUILD_ROOT_DIRECTORY%
destdir = %BUILD_ROOT_DIRECTORY%
builddir = %BUILD_DIRECTORY%
builddir = %BUILD_DIRECTORY%
extra-paths =
extensions =
extensions =
extends-cache = extends-cache
extends-cache = extends-cache
download-cache = download-cache
download-cache = download-cache
...
@@ -13,6 +14,8 @@ find-links +=
...
@@ -13,6 +14,8 @@ find-links +=
http://www.nexedi.org/static/packages/source/
http://www.nexedi.org/static/packages/source/
http://www.nexedi.org/static/packages/source/slapos.buildout/
http://www.nexedi.org/static/packages/source/slapos.buildout/
allow-picked-versions = false
[networkcached]
[networkcached]
recipe = zc.recipe.egg
recipe = zc.recipe.egg
eggs =
eggs =
...
@@ -20,7 +23,13 @@ eggs =
...
@@ -20,7 +23,13 @@ eggs =
zc.buildout
zc.buildout
[versions]
[versions]
setuptools = 44.1.1
# The last version of setuptools compatible with Python 3.7
zc.buildout = 2.7.1+slapos020
setuptools = 67.8.0
# Use SlapOS patched zc.buildout
zc.buildout = 3.0.1+slapos002
pip = 23.2.1
# Use SlapOS patched zc.recipe.egg (zc.recipe.egg 2.x is for Buildout 2)
zc.recipe.egg = 2.0.8.dev0+slapos002
wheel = 0.41.2:whl
slapos.libnetworkcache = 0.25
slapos.libnetworkcache = 0.25
zc.recipe.egg = 2.0.3+slapos003
obs/slapos/slapos-node/slapos/slapos.buildout.cfg.in
View file @
becf8150
...
@@ -19,6 +19,11 @@ eggs =
...
@@ -19,6 +19,11 @@ eggs =
zc.buildout
zc.buildout
[versions]
[versions]
setuptools = 44.1.1
# The last version of setuptools compatible with Python 3.7
zc.buildout = 2.7.1+slapos020
setuptools = 67.8.0
zc.recipe.egg = 2.0.3+slapos003
# Use SlapOS patched zc.buildout
zc.buildout = 3.0.1+slapos002
pip = 23.2.1
# Use SlapOS patched zc.recipe.egg (zc.recipe.egg 2.x is for Buildout 2)
zc.recipe.egg = 2.0.8.dev0+slapos002
wheel = 0.41.2
obs/slapos/templates/Makefile.in
View file @
becf8150
...
@@ -23,7 +23,7 @@ build-stamp:
...
@@ -23,7 +23,7 @@ build-stamp:
@echo
"Bootstrapping buildout"
@echo
"Bootstrapping buildout"
cd
$(BUILD_DIRECTORY)
&&
\
cd
$(BUILD_DIRECTORY)
&&
\
$(SLAPOS_BOOTSTRAP_SYSTEM_PYTHON)
./bootstrap
$(SLAPOS_BOOTSTRAP_SYSTEM_PYTHON) ./bootstrap
-dir/bin/buildout buildout
:
install-from-cache=true bootstrap
@echo 'Preparing source tarball (recipe version
:
$(RECIPE_VERSION))'
@echo 'Preparing source tarball (recipe version
:
$(RECIPE_VERSION))'
cd
$(BUILD_DIRECTORY)
&&
\
cd
$(BUILD_DIRECTORY)
&&
\
...
...
Thomas Gambier
🚴🏼
@tomo
mentioned in commit
fac70c41
·
Jul 15, 2024
mentioned in commit
fac70c41
mentioned in commit fac70c415e93c6f20f1fb53430733d4ee4d320c4
Toggle commit list
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment