1
0
Fork 0

Fix everything!

master
Ambrose Chua 2018-09-23 23:11:43 +08:00
parent 5dbc2571f5
commit 15d5e36639
4 changed files with 13 additions and 4 deletions

View File

@ -14,14 +14,18 @@ COPY --from=sdk-download /sdk /
# fix COPY permissions
RUN chmod +s /usr/bin/sudo
RUN chown -R chronos:chronos /home/chronos
# fix home directory
RUN usermod -d /home/chronos chronos
COPY fetch-source.sh /usr/local/bin/
COPY setup-root.sh /usr/local/bin/
# setup PATH beforehand
ENV PATH=$PATH:/opt/depot_tools:/home/chronos/trunk/chromite/bin
# enable passwordless sudo
RUN echo "chronos ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers
# perform build as chronos
USER chronos
RUN git config --global user.email "dev@null"
RUN git config --global user.name "/dev/null"

View File

@ -6,7 +6,10 @@ echo "Entering /chromiumos working directory"
mkdir -p /home/chronos/trunk
cd /home/chronos/trunk
echo "Switching to Python 2"
export EPYTHON=python2
echo "Syncing source"
repo init -u https://chromium.googlesource.com/chromiumos/manifest.git --repo-url https://chromium.googlesource.com/external/repo.git
repo sync -j6
repo sync -j8

View File

@ -3,7 +3,7 @@
set -e
echo "Changing directory"
cd /chromiumos/src/scripts
cd /home/chronos/trunk/src/scripts
echo "Setup board"
export BOARD=amd64-generic

View File

@ -1,5 +1,7 @@
#!/bin/bash
set -e
SUDO_USER=chronos
CHROOT_TRUNK_DIR=/home/chronos/trunk
@ -89,7 +91,7 @@ cat << EOF > "${target}/chromiumos-niceties.sh"
PS1='\$(r=\$?; __git_branch_ps1 "(%s) "; exit \$r)'"\${PS1}"
PS1="(cr) \${PS1}"
EOF
local localegen="/etc/locale.gen"
localegen="/etc/locale.gen"
if ! grep -q -v -e '^#' -e '^$' "${localegen}" ; then
cat <<EOF >> "${localegen}"
en_US ISO-8859-1