Commit 78d9b44a authored by iv's avatar iv

nayuos: add a promise to verify that sudo exists

on the SlapOS's host, as required to chroot in the build
environment cros_sdk
parent 3a5bea35
[buildout] [buildout]
parts = parts =
parameters parameters
promise-sudo-on-host
template-full-build-script template-full-build-script
template-sudo-wrapper template-sudo-wrapper
template-cros-sdk-wrapper template-cros-sdk-wrapper
...@@ -47,6 +48,7 @@ cert = ${slap_connection:cert_file} ...@@ -47,6 +48,7 @@ cert = ${slap_connection:cert_file}
recipe = slapos.cookbook:mkdirectory recipe = slapos.cookbook:mkdirectory
log = ${buildout:directory}/var/log log = ${buildout:directory}/var/log
run = ${buildout:directory}/etc/run run = ${buildout:directory}/etc/run
promise = ${buildout:directory}/etc/promise
wrapper_dir = ${buildout:directory}/wrapper_bin wrapper_dir = ${buildout:directory}/wrapper_bin
cros_location = ${buildout:directory}/parts/chromiumos cros_location = ${buildout:directory}/parts/chromiumos
ebuilds_dir = ${nayuos-ebuilds:location} ebuilds_dir = ${nayuos-ebuilds:location}
...@@ -58,6 +60,13 @@ wrapper_cros_sdk=${directory:wrapper_dir}/wrapper_cros_sdk ...@@ -58,6 +60,13 @@ wrapper_cros_sdk=${directory:wrapper_dir}/wrapper_cros_sdk
bash=/bin/bash bash=/bin/bash
sudo=/usr/bin/sudo sudo=/usr/bin/sudo
[promise-sudo-on-host]
# assert sudo is installed on the slapos host, as it is required to enter the
# chroot 'cros_sdk'
recipe = slapos.cookbook:wrapper
wrapper-path = !py! '${directory:promise}/' + '${:_buildout_section_name_}'[8:]
command-line = sudo -V
[template-sudo-wrapper] [template-sudo-wrapper]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
template = {{ scripts_dir }}/wrapper_sudo.in template = {{ scripts_dir }}/wrapper_sudo.in
......
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