Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
slapos
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
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Dmitry Blinov
slapos
Commits
2fbbd251
Commit
2fbbd251
authored
Jun 23, 2016
by
iv
Committed by
Tomáš Peterka
Aug 04, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
NayuOS: add Chromium policies
parent
b99d23f5
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
31 additions
and
5 deletions
+31
-5
software/nayuos/instance.cfg
software/nayuos/instance.cfg
+3
-1
software/nayuos/scripts/cros_full_build.in
software/nayuos/scripts/cros_full_build.in
+16
-3
software/nayuos/scripts/test_nayuos_image
software/nayuos/scripts/test_nayuos_image
+11
-0
software/nayuos/software.cfg
software/nayuos/software.cfg
+1
-1
No files found.
software/nayuos/instance.cfg
View file @
2fbbd251
...
@@ -25,6 +25,7 @@ command =
...
@@ -25,6 +25,7 @@ command =
[nayuos-ebuilds]
[nayuos-ebuilds]
recipe = slapos.recipe.build:gitclone
recipe = slapos.recipe.build:gitclone
repository = https://lab.nexedi.com/nexedi/nayuos-ebuilds.git
repository = https://lab.nexedi.com/nexedi/nayuos-ebuilds.git
branch = master
############################################################################################
############################################################################################
...
@@ -84,7 +85,7 @@ context =
...
@@ -84,7 +85,7 @@ context =
recipe = slapos.recipe.template:jinja2
recipe = slapos.recipe.template:jinja2
template = {{ scripts_dir }}/cros_full_build.in
template = {{ scripts_dir }}/cros_full_build.in
rendered = ${directory:run}/cros_full_build
rendered = ${directory:run}/cros_full_build
md5sum =
ffec0279ec4a3e13bb151e2a0796c29b
md5sum =
a0f66cd1eb525d0873670cfb81424968
mode = 0700
mode = 0700
context =
context =
key bash_path bin:bash
key bash_path bin:bash
...
@@ -97,4 +98,5 @@ context =
...
@@ -97,4 +98,5 @@ context =
key ebuilds_dir directory:ebuilds_dir
key ebuilds_dir directory:ebuilds_dir
key scripts_dir directory:scripts_dir
key scripts_dir directory:scripts_dir
key logo_dir directory:logo_dir
key logo_dir directory:logo_dir
raw nayu_dev_rootfs_packages app-misc/nayuos-chromium-policy
raw nayu_dev_packages net-libs/nodejs net-misc/re6stnet dev-vcs/git dev-python/flask dev-python/virtualenv sys-fs/cryptsetup
raw nayu_dev_packages net-libs/nodejs net-misc/re6stnet dev-vcs/git dev-python/flask dev-python/virtualenv sys-fs/cryptsetup
software/nayuos/scripts/cros_full_build.in
View file @
2fbbd251
...
@@ -93,6 +93,7 @@ install -m 770 "{{ scripts_dir }}/test_nayuos_image" "{{ cros_location }}/{{ bra
...
@@ -93,6 +93,7 @@ install -m 770 "{{ scripts_dir }}/test_nayuos_image" "{{ cros_location }}/{{ bra
### packages management ###
### packages management ###
VIRTUAL_CHROMEOS_OS_DEV_EBUILD=${CHROMIUM_OVERLAY}/virtual/target-chromium-os-dev/target-chromium-os-dev-1.ebuild
VIRTUAL_CHROMEOS_OS_DEV_EBUILD=${CHROMIUM_OVERLAY}/virtual/target-chromium-os-dev/target-chromium-os-dev-1.ebuild
VIRTUAL_CHROMEOS_DEV_ROOTFS_EBUILD=${CHROMIUM_OVERLAY}/chromeos-base/chromeos-dev-root/chromeos-dev-root-0.0.1.ebuild
# change the virtual ebuild responsible for installing all packages to add the ones
# change the virtual ebuild responsible for installing all packages to add the ones
# needed for NayuOS
# needed for NayuOS
...
@@ -105,7 +106,18 @@ for package in {{ nayu_dev_packages }} ; do
...
@@ -105,7 +106,18 @@ for package in {{ nayu_dev_packages }} ; do
fi
fi
done
done
# XXX: create a function for this
for package in {{ nayu_dev_rootfs_packages }} ; do
echo $package
if [[ $( grep "${package}" "${VIRTUAL_CHROMEOS_DEV_ROOTFS_EBUILD}" ) ]] ; then
echo "no need to change ${VIRTUAL_CHROMEOS_DEV_ROOTFS_EBUILD} file to add ${package}..." >> "${BUILD_LOG}"
else
printf "\n\nRDEPEND=\"\${RDEPEND}\n ${package}\"\n">> ${VIRTUAL_CHROMEOS_DEV_ROOTFS_EBUILD}
fi
done
increase_revision_number ${CHROMIUM_OVERLAY}/virtual/target-chromium-os-dev
increase_revision_number ${CHROMIUM_OVERLAY}/virtual/target-chromium-os-dev
increase_revision_number ${CHROMIUM_OVERLAY}/chromeos-base/chromeos-dev-root
# do not install the Upstart init script that starts ssh daemon at boot time
# do not install the Upstart init script that starts ssh daemon at boot time
rm ${CHROMIUM_OVERLAY}/chromeos-base/chromeos-sshd-init/files/openssh-server.conf
rm ${CHROMIUM_OVERLAY}/chromeos-base/chromeos-sshd-init/files/openssh-server.conf
...
@@ -132,7 +144,6 @@ if [ "\${less_path}" ] ; then
...
@@ -132,7 +144,6 @@ if [ "\${less_path}" ] ; then
fi" >> ${BASH_EBUILD_DIR}/files/dot-bashrc
fi" >> ${BASH_EBUILD_DIR}/files/dot-bashrc
fi
fi
# XXX: hardcoded revision numbers...
increase_revision_number ${BASH_EBUILD_DIR}
increase_revision_number ${BASH_EBUILD_DIR}
######################################## Build ##############################################
######################################## Build ##############################################
...
@@ -174,9 +185,11 @@ for board in ${BOARDS} ; do
...
@@ -174,9 +185,11 @@ for board in ${BOARDS} ; do
&& cros_sdk -- ./test_nayuos_image ${board} > "${TEST_LOG}" \
&& cros_sdk -- ./test_nayuos_image ${board} > "${TEST_LOG}" \
|| { echo "An error occured while building ${board} NayuOS image. Exiting." ; exit 1 ;}
|| { echo "An error occured while building ${board} NayuOS image. Exiting." ; exit 1 ;}
# save ~15Go/device but delete cache (next build will be as long)
# save a lot of space on the server but delete cache and build files
# (it means that the next build will be as long and use as much resources as this one)
if [ ${KEEP_CACHE,,} == "no" ] ; then
if [ ${KEEP_CACHE,,} == "no" ] ; then
cros_sdk -- sudo rm -R /var/cache/chromeos-chrome/chrome-src/src/out_${board}
cros_sdk -- sudo rm -R "/var/cache/chromeos-chrome/chrome-src/src/out_${board}"
cros_sdk -- sudo rm -R "/build/${board}"
fi
fi
if [ ${board} == daisy ]; then
if [ ${board} == daisy ]; then
...
...
software/nayuos/scripts/test_nayuos_image
View file @
2fbbd251
...
@@ -17,6 +17,7 @@ BASHRC="etc/skel/.bashrc"
...
@@ -17,6 +17,7 @@ BASHRC="etc/skel/.bashrc"
GIT_CORE
=
"usr/local/libexec/git-core/"
GIT_CORE
=
"usr/local/libexec/git-core/"
EXPECTED_ALIAS
=
"alias git='git --exec-path=/usr/local/libexec/git-core/'"
EXPECTED_ALIAS
=
"alias git='git --exec-path=/usr/local/libexec/git-core/'"
VIRTUALENV_BIN
=
"usr/local/bin/virtualenv"
VIRTUALENV_BIN
=
"usr/local/bin/virtualenv"
CHROMIUM_POLICY
=
"etc/chromium/policies/recommended/nayuos_policy.json"
HAS_FAILED
=
0
HAS_FAILED
=
0
...
@@ -42,6 +43,8 @@ if [[ $(ls "${MOUNTPOINT}/usr/local") ]] ; then
...
@@ -42,6 +43,8 @@ if [[ $(ls "${MOUNTPOINT}/usr/local") ]] ; then
gitcore
=
$(
ls
"
${
MOUNTPOINT
}
/
${
GIT_CORE
}
"
)
gitcore
=
$(
ls
"
${
MOUNTPOINT
}
/
${
GIT_CORE
}
"
)
gitalias
=
$(
grep
"
${
EXPECTED_ALIAS
}
"
"
${
MOUNTPOINT
}
/
${
BASHRC
}
"
)
gitalias
=
$(
grep
"
${
EXPECTED_ALIAS
}
"
"
${
MOUNTPOINT
}
/
${
BASHRC
}
"
)
virtualenvbin
=
$(
ls
"
${
MOUNTPOINT
}
/
${
VIRTUALENV_BIN
}
"
)
virtualenvbin
=
$(
ls
"
${
MOUNTPOINT
}
/
${
VIRTUALENV_BIN
}
"
)
chromium_policy
=
$(
ls
"
${
MOUNTPOINT
}
/
${
CHROMIUM_POLICY
}
"
)
else
else
is_empty
=
1
is_empty
=
1
fi
fi
...
@@ -96,6 +99,14 @@ else
...
@@ -96,6 +99,14 @@ else
else
else
print_result
${
FAILURE
}
"Expected virtualenv binary not in
${
MOUNTPOINT
}
/
${
VIRTUALENV_BIN
}
."
print_result
${
FAILURE
}
"Expected virtualenv binary not in
${
MOUNTPOINT
}
/
${
VIRTUALENV_BIN
}
."
fi
fi
echo
"* test if Chromium policies are installed"
if
[[
${
chromium_policy
}
]]
;
then
print_result
${
SUCCESS
}
"Chromium policies are installed."
else
print_result
${
FAILURE
}
"Expected Chromium policies file not in
${
MOUNTPOINT
}
/
${
CHROMIUM_POLICY
}
."
fi
fi
fi
exit
${
HAS_FAILED
}
exit
${
HAS_FAILED
}
software/nayuos/software.cfg
View file @
2fbbd251
...
@@ -26,7 +26,7 @@ command = sudo -V
...
@@ -26,7 +26,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 =
6761ff454e186548ed9dc16e4410840a
md5sum =
fe8ce63b2d2f872427a52854c5cb5167
mode = 0644
mode = 0644
scripts_dir = ${:_profile_base_location_}/scripts
scripts_dir = ${:_profile_base_location_}/scripts
logo_dir = ${:_profile_base_location_}/logo
logo_dir = ${:_profile_base_location_}/logo
...
...
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