Commit 382a23ca authored by iv's avatar iv

nayuos: On the way to re6stnet.

parent eb49fb8e
...@@ -48,7 +48,7 @@ scripts_dir = {{ scripts_dir }} ...@@ -48,7 +48,7 @@ scripts_dir = {{ scripts_dir }}
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
template = {{ scripts_dir }}/cros_full_build.sh.in template = {{ scripts_dir }}/cros_full_build.sh.in
rendered = ${directory:run}/cros_full_build.sh rendered = ${directory:run}/cros_full_build.sh
md5sum = a698b56b99492b22f76d402d3def5774 md5sum = 0e10850c8f9272272ed1a4cabce66529
mode = 0770 mode = 0770
context = context =
# for access to the eggs from the instance # for access to the eggs from the instance
......
...@@ -17,10 +17,19 @@ cd {{ cros_location }} ...@@ -17,10 +17,19 @@ cd {{ cros_location }}
# create chroot environment (exit on failure) # create chroot environment (exit on failure)
cros_sdk --download || exit 1 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
PACKAGE_USE_FILE={{ cros_location }}/src/third_party/chromiumos-overlay/profiles/targets/chromeos/package.use
line_number=$(sed -n '/dev-lang\/python/=' ${PACKAGE_USE_FILE})
if [ $line ] ; then
sed -i "${line_number}s/-sqlite/sqlite/" ${PACKAGE_USE_FILE}
fi
# add custom script for modifying the final image after building # add custom script for modifying the final image after building
# that is useful for custumizing Chromium OS and produce Nayu images for now # that is useful for custumizing Chromium OS and producing Nayu images for now
cp {{ scripts_dir }}/modify_image.sh {{ cros_location }}/src/scripts/modify_image.sh \ #cp {{ scripts_dir }}/modify_image.sh {{ cros_location }}/src/scripts/modify_image.sh \
&& chmod 770 {{ cros_location }}/src/scripts/modify_image.sh || exit 1 # && chmod 770 {{ cros_location }}/src/scripts/modify_image.sh || exit 1
# add custom ebuilds # add custom ebuilds
for category in $( ls {{ ebuilds_dir }} ); do for category in $( ls {{ ebuilds_dir }} ); do
...@@ -78,18 +87,19 @@ done ...@@ -78,18 +87,19 @@ done
####################################### Post build ########################################## ####################################### Post build ##########################################
# keep only the substring between - as current release # keep only the substring between - as current release
RELEASE=$(sed 's/.*-\(.*\)-.*//' <<< "$BRANCH") RELEASE=$(echo ${BRANCH} | cut -d- -f2)
DIR_IMAGE_LOCATION={{ cros_location }}/images/${RELEASE}/$(date +'%F') DIR_IMAGE_LOCATION={{ cros_location }}/images/${RELEASE}/$(date +'%F')
install ${DIR_IMAGE_LOCATION} -d install ${DIR_IMAGE_LOCATION} -d
mv {{ cros_location }}/src/scripts/*.img ${DIR_IMAGE_LOCATION} mv {{ cros_location }}/src/scripts/*.img ${DIR_IMAGE_LOCATION}
cd ${DIR_IMAGE_LOCATION} cd ${DIR_IMAGE_LOCATION}
for hashfunction in md5sum sha1 sha256 sh512; do for hashfunction in md5sum sha1sum sha256sum sha512sum; do
${hashfunction} *.img >> hashes.txt ${hashfunction} *.img >> hashes.txt
done done
for file in $(ls *.img); do for file in $(ls *.img); do
tar cfz ${file}.tar ${file} tar cfz ${file}.tar ${file}
rm ${file}
done done
exit 0 exit 0
\ No newline at end of file
...@@ -35,7 +35,7 @@ command = sudo -V ...@@ -35,7 +35,7 @@ command = sudo -V
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
template = ${:_profile_base_location_}/instance.cfg template = ${:_profile_base_location_}/instance.cfg
rendered = ${buildout:directory}/instance.cfg rendered = ${buildout:directory}/instance.cfg
md5sum = fd1efcf9ad466694bde651ab52fd31c9 md5sum = 78f4aa77239313bdc9de3907fe332bd7
mode = 0644 mode = 0644
scripts_dir = ${:_profile_base_location_}/scripts scripts_dir = ${:_profile_base_location_}/scripts
ebuilds_dir = ${:_profile_base_location_}/custom_ebuilds ebuilds_dir = ${:_profile_base_location_}/custom_ebuilds
......
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