Commit 298929a1 by iv

nayuos: Automatically clone NayuOS ebuilds set, change comments.

1 parent 6e409307
......@@ -14,7 +14,6 @@ in /etc/sudoers:
<pre><code>
\<slapuser\> ALL= NOPASSWD: /srv/slapgrid/\<part\>/srv/runner/instance/\<inst_part\>/parts/clone-depot-tools/cros_sdk, /srv/slapgrid/\<part\>/srv/runner/instance/\<inst_part\>/parts/chromiumos/\<release\>/chromite/bin/cros_sdk, /srv/slapgrid/\<part\>/srv/runner/instance/\<inst_part\>/parts/chromiumos/\<release\>/chromite/bootstrap/cros_sdk, /srv/slapgrid/\<part\>/srv/runner/instance/\<inst_part\>/parts/chromiumos/\<release\>/chromite/scripts/cros_sdk.py, /srv/slapgrid/\<part\>/srv/runner/instance/\<inst_part\>/parts/chromiumos/\<release\>/chromite/scripts/cros_sdk.pyc, /srv/slapgrid/\<part\>/srv/runner/instance/\<inst_part\>/parts/chromiumos/\<release\>/chromium/tools/depot_tools/cros_sdk
</code></pre>
* the custom ebuilds (such as net-libs/miniupnpc, net-misc/babeld-re6stnet, net-misc/re6stnet) in the nayuos-ebuilds directory. There is a [repo](https://lab.nexedi.com/nexedi/nayuos-ebuilds) for this purpose. It should be located into: <code>/srv/slapgrid/\<part\>/ srv/runner/project/slapos/software/\<nayuos_build_dirname\>/</code>.
## Input
In the vifib parameters (softinst\<nb\>.host.vifib.net \> Services \> Parameters):
......
......@@ -9,15 +9,19 @@ develop-eggs-directory = {{ develop_eggs_directory }}
#################################### Tools, sources getter ##################################
[clone-depot-tools]
[depot-tools]
# needed for the "repo" command (to download many git repositories)
recipe = slapos.recipe.build:gitclone
repository = https://chromium.googlesource.com/chromium/tools/depot_tools.git
branch = master
[depot-tools]
[use-depot-tools]
export-path =
export PATH=${clone-depot-tools:location}:"$PATH";
export PATH=${depot-tools:location}:"$PATH";
[nayuos-ebuilds]
recipe = slapos.recipe.build:gitclone
repository = https://lab.nexedi.com/nexedi/nayuos-ebuilds.git
############################################################################################
......@@ -38,7 +42,7 @@ recipe = slapos.cookbook:mkdirectory
log = ${buildout:directory}/var/log
run = ${buildout:directory}/etc/run
cros_location = ${buildout:directory}/parts/chromiumos
ebuilds_dir = {{ ebuilds_dir }}
ebuilds_dir = ${nayuos-ebuilds:location}
scripts_dir = {{ scripts_dir }}
logo_dir = {{ logo_dir }}
......@@ -48,13 +52,13 @@ logo_dir = {{ logo_dir }}
recipe = slapos.recipe.template:jinja2
template = {{ scripts_dir }}/cros_full_build.in
rendered = ${directory:run}/cros_full_build
md5sum = 0657492802013f6c1a65c886eb59068f
md5sum = 8ffa46a4b8a7cc6fa4f7e61eb20bdcbe
mode = 0770
context =
# for access to the eggs from the instance
key instance_log_dir directory:log
key cros_location directory:cros_location
key depot_tools_export_path_cmd depot-tools:export-path
key depot_tools_export_path_cmd use-depot-tools:export-path
key branch parameters:configuration.branch
key boards_list parameters:configuration.boards
key keep_cache parameters:configuration.keep_cache
......
......@@ -14,7 +14,7 @@ cd "{{ cros_location }}/{{ branch }}"
repo init -u https://chromium.googlesource.com/chromiumos/manifest.git -b {{ branch }} >> $DL_LOG
# in case code was already there, stash changes to be able to pull
# in case changes were already made, stash changes to be able to pull
cd ${CHROMIUM_OVERLAY}
git stash
......@@ -32,6 +32,7 @@ cros_sdk --download || exit 1
# compile Python with sqlite support (-> change USE flag) for dev-lang/python
# it is needed by re6st
# just need to change -sqlite by sqlite on the right line
# same for IPv6 support
PACKAGE_USE_FILE=${CHROMIUM_OVERLAY}/profiles/targets/chromeos/package.use
line_number=$(sed -n '/dev-lang\/python/=' ${PACKAGE_USE_FILE})
if [ $line_number ] ; then
......@@ -42,7 +43,7 @@ if [ $line_number ] ; then
fi
fi
# add custom ebuilds
# add some ebuilds, specific to NayuOS
for category in $( ls {{ ebuilds_dir }} ); do
echo ${category}
cp -R {{ ebuilds_dir }}/${category}/* ${CHROMIUM_OVERLAY}/${category}/
......@@ -71,13 +72,6 @@ rm ${CHROMIUM_OVERLAY}/chromeos-base/chromeos-sshd-init/files/openssh-server.con
sed -i -n '/src_install/q;p' ${CHROMIUM_OVERLAY}/chromeos-base/openssh-server-init/openssh-server-init-0.0.1.ebuild
sed -i -n '/src_install/q;p' ${CHROMIUM_OVERLAY}/chromeos-base/chromeos-sshd-init/chromeos-sshd-init-0.0.1.ebuild
# increase the revision number (XXX: is there a problem with md5-cache otherwise?)
# XXX: remove hardcoded revision numbers
cd ${CHROMIUM_OVERLAY}/chromeos-base/openssh-server-init/
mv openssh-server-init-0.0.1-r24.ebuild openssh-server-init-0.0.1-r25.ebuild
cd ${CHROMIUM_OVERLAY}/chromeos-base/chromeos-sshd-init/
mv chromeos-sshd-init-0.0.1-r5.ebuild chromeos-sshd-init-0.0.1-r6.ebuild
# bashrc modifications
BASH_EBUILD_DIR={{ cros_location }}/{{ branch }}/src/third_party/portage-stable/app-shells/bash
if [[ $(grep "git --exec-path" "${BASH_EBUILD_DIR}/files/dot-bashrc") ]] ; then
......@@ -95,7 +89,12 @@ if [ "\${less_path}" ] ; then
fi" >> ${BASH_EBUILD_DIR}/files/dot-bashrc
fi
# XXX: hardcoded
# increase the revision number
# XXX: remove hardcoded revision numbers
cd ${CHROMIUM_OVERLAY}/chromeos-base/openssh-server-init/
ln -s openssh-server-init-0.0.1-r24.ebuild openssh-server-init-0.0.1-r25.ebuild
cd ${CHROMIUM_OVERLAY}/chromeos-base/chromeos-sshd-init/
ln -s chromeos-sshd-init-0.0.1-r5.ebuild chromeos-sshd-init-0.0.1-r6.ebuild
cd ${BASH_EBUILD_DIR}
ln -s bash-4.2_p48-r1.ebuild bash-4.2_p48-r2.ebuild
......@@ -128,7 +127,7 @@ for board in ${BOARDS} ; do
# rebuild packages with boot pictures
cros_sdk -- ./build_packages --board=${board} >> "${BUILD_LOG}"
# NayuOS
# NayuOS images
date >> "${BUILD_LOG}"
echo "building image" >> "${BUILD_LOG}"
cros_sdk -- ./build_image --board=${board} dev >> "${BUILD_LOG}" \
......@@ -149,7 +148,7 @@ for board in ${BOARDS} ; do
done
####################################### Post build ##########################################
# keep only the substring between - as current release
# keep only the substring between - as current release number
RELEASE=$(echo ${BRANCH} | cut -d- -f2)
DIR_IMAGE_LOCATION={{ cros_location }}/images/${RELEASE}/$(date +'%F')
install ${DIR_IMAGE_LOCATION} -d
......
......@@ -35,17 +35,15 @@ command = sudo -V
recipe = slapos.recipe.template:jinja2
template = ${:_profile_base_location_}/instance.cfg
rendered = ${buildout:directory}/instance.cfg
md5sum = ef241340bf055a65f639a8f2775f52e0
md5sum = 47392f52ff3e2a907c511bf19b821051
mode = 0644
scripts_dir = ${:_profile_base_location_}/scripts
ebuilds_dir = ${:_profile_base_location_}/custom_ebuilds
logo_dir = ${:_profile_base_location_}/logo
context =
# for access to the eggs from the instance
key eggs_directory buildout:eggs-directory
key develop_eggs_directory buildout:develop-eggs-directory
key scripts_dir :scripts_dir
key ebuilds_dir :ebuilds_dir
key logo_dir :logo_dir
[install-eggs-for-the-instance]
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!