Commit d29781b2 authored by Thomas Gambier's avatar Thomas Gambier 🚴🏼

software/nayuos: several improvements

 * use python3 (newest builds requires python3)
 * correctly exclude release directories during rsync so that resiliency
works
 * use correct names for project/software/instances
parent 46ed2afe
......@@ -14,4 +14,4 @@
# not need these here).
[template-instance]
filename = instance.cfg
md5sum = aa91245be4b946d0537f6e007f0d72ea
md5sum = 0974248c0b0ad5da45670386a5301e47
# Jinja2 template of a buildout file to create runnable scripts
#
# Received variables
# - software_dir: location where this repository was cloned to
# - instance_dir: location where this 'instance.cfg' is gettin rendered (same as ${buildout:directory})
# - project_dir: location where this repository was cloned to
# - software_dir: location where this 'instance.cfg' is gettin rendered (same as ${buildout:directory})
[buildout]
parts =
......@@ -12,6 +12,7 @@ parts =
template-full-build-script
template-sudo-wrapper
template-cros-sdk-wrapper
resiliency-exclude-file
extends = {{ monitor_template }}
# standard declaration of eggs directories
......@@ -30,7 +31,7 @@ git-executable = {{ git_path }}/bin/git
[customize-path]
# add depot tools directory (for cros_sdk binary among others) and git directory to the path
command =
export PATH="${directory:wrapper_dir}":"{{ git_path }}/bin":"{{ curl_path }}/bin":"${depot-tools:location}":"{{thin_provisioning_tools}}/sbin":"$PATH";
export PATH="${directory:wrapper_dir}":"{{ software_dir }}/bin":"{{ git_path }}/bin":"{{ curl_path }}/bin":"${depot-tools:location}":"{{thin_provisioning_tools}}/sbin":"$PATH";
[nayuos-ebuilds]
recipe = slapos.recipe.build:gitclone
......@@ -56,8 +57,10 @@ cert = ${slap_connection:cert_file}
recipe = slapos.cookbook:mkdirectory
log = ${buildout:directory}/var/log
run = ${buildout:directory}/etc/run
backup = ${buildout:directory}/srv/backup
wrapper_dir = ${buildout:directory}/wrapper_bin
cros_location = ${buildout:directory}/parts/chromiumos
images = ${:cros_location}/images
[bin]
# dummy section to hold references to frequently used binaries
......@@ -79,7 +82,7 @@ config-command = ${promise-sudo-on-host-bin:wrapper-path}
[template-sudo-wrapper]
recipe = slapos.recipe.template:jinja2
template = {{ software_dir }}/scripts/wrapper_sudo.in
template = {{ project_dir }}/scripts/wrapper_sudo.in
rendered = ${directory:wrapper_dir}/sudo
md5sum = ded5a92be4e37ec32eb9d3087d3e19bd
mode = 0700
......@@ -90,7 +93,7 @@ context =
[template-cros-sdk-wrapper]
recipe = slapos.recipe.template:jinja2
template = {{ software_dir }}/scripts/wrapper_cros_sdk.in
template = {{ project_dir }}/scripts/wrapper_cros_sdk.in
rendered = ${bin:wrapper_cros_sdk}
md5sum = 7159fe3d5b85a283733cf686c4ee0a74
mode = 0700
......@@ -104,25 +107,32 @@ context =
# create the rendered script in the buildout-directory/etc/run
# (use jinja for templating)
recipe = slapos.recipe.template:jinja2
template = {{ software_dir }}/scripts/cros_full_build.in
template = {{ project_dir }}/scripts/cros_full_build.in
rendered = ${directory:run}/cros_full_build
md5sum = f3b3b5408b69f752f2221d3965caf590
#md5sum = f3b3b5408b69f752f2221d3965caf590
mode = 0700
context =
key bash_path bin:bash
key instance_log_dir directory:log
key instance_dir buildout:directory
key cros_location directory:cros_location
key export_path_cmd customize-path:command
key branch parameters:configuration.branch
key boards_list parameters:configuration.boards
key keep_cache parameters:configuration.keep_cache
key ebuilds_dir nayuos-ebuilds:location
raw scripts_dir {{ software_dir }}/scripts
raw logo_dir {{ software_dir }}/logo
raw wallpaper_dir {{ software_dir }}/wallpaper
raw patch_dir {{ software_dir }}/patch
raw scripts_dir {{ project_dir }}/scripts
raw logo_dir {{ project_dir }}/logo
raw wallpaper_dir {{ project_dir }}/wallpaper
raw patch_dir {{ project_dir }}/patch
# packages to be copied from our overlay into ChromiuOS' overlay
# those packages will be marked as dependency of root filesystem
raw nayu_dev_rootfs_packages app-misc/nayuos-chromium-policy
# those packages will be marked as dependency of the chromium build itself
raw nayu_dev_packages dev-vcs/git dev-python/flask dev-python/virtualenv sys-fs/cryptsetup
[resiliency-exclude-file]
# Generate rdiff exclude file for resiliency
recipe = collective.recipe.template
input = inline: parts/chromiumos/release*
output = ${directory:srv}/exporter.exclude
......@@ -8,19 +8,29 @@ extends =
../../component/libexpat/buildout.cfg
../../component/libaio/buildout.cfg
../../component/boost-lib/buildout.cfg
../../component/rsync/buildout.cfg
parts +=
eggs
slapos-cookbook
template-instance
git
curl
thin-provisioning-tools
versions = versions
[gcc]
min_version = 0
[versions]
slapos.recipe.template = 4.4
[python]
# we need python3 for repo/cros_sdk command
part = python3
[eggs]
# name is python3 so that cros_sdk uses it automatically through "/usr/bin/env python3"
recipe = zc.recipe.egg
interpreter = python3
eggs =
setuptools
[template-instance]
# jinja2 render instance.cfg file in the buildout directory
......@@ -29,10 +39,11 @@ template = ${:_profile_base_location_}/${:filename}
rendered = ${buildout:directory}/${:filename}
mode = 0644
context =
key software_dir :_profile_base_location_
key instance_dir buildout:directory
key project_dir :_profile_base_location_
key software_dir buildout:directory
key curl_path curl:location
key git_path git:location
key rsync_path rsync:location
key eggs_directory buildout:eggs-directory
key develop_eggs_directory buildout:develop-eggs-directory
key thin_provisioning_tools thin-provisioning-tools:location
......@@ -56,3 +67,6 @@ dependencies =
libexpat
libaio
boost-lib
[versions]
slapos.recipe.template = 4.4
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