aboutsummaryrefslogtreecommitdiffstats
path: root/setup.d
diff options
context:
space:
mode:
authorStephane Desneux <stephane.desneux@iot.bzh>2016-11-30 23:53:02 +0100
committerStephane Desneux <stephane.desneux@iot.bzh>2016-11-30 23:53:02 +0100
commit19828c52e5b50de79739e2c206382be74e596847 (patch)
tree1a29e87054648ae49ebd36aaf68737e8dcef0be7 /setup.d
parent5e50ec8d65705b41140d06ec13611f0b3108f7b9 (diff)
group build files into folder INSTALL
Change-Id: Ib76d53f9ff0aed21f12ebd7aac66c1e877bea4a5 Signed-off-by: Stephane Desneux <stephane.desneux@iot.bzh>
Diffstat (limited to 'setup.d')
-rw-r--r--setup.d/10_base64
-rw-r--r--setup.d/20_worker_base63
-rwxr-xr-xsetup.d/30_tools12
-rw-r--r--setup.d/99_cleanup18
4 files changed, 0 insertions, 157 deletions
diff --git a/setup.d/10_base b/setup.d/10_base
deleted file mode 100644
index 59dab07..0000000
--- a/setup.d/10_base
+++ /dev/null
@@ -1,64 +0,0 @@
-#!/bin/bash
-
-# add backports and testing repositories
-echo "deb http://http.debian.net/debian jessie-backports main contrib" >>/etc/apt/sources.list
-echo "deb http://http.debian.net/debian testing main contrib" >>/etc/apt/sources.list
-
-# setup network retries for apt
-echo "Acquire::Retries 5;" >/etc/apt/apt.conf.d/99NetRetries
-
-# upgrade distro
-apt-get update -y
-apt-get dist-upgrade -y
-
-apt-get install -y passwd sudo openssh-server openssh-client vim systemd logrotate ifupdown locales
-apt-get remove -y exim4 exim4-base exim4-config exim4-daemon-light
-apt-get autoremove -y
-
-# remove some useless systemd services
-for sysdir in /lib/systemd /etc/systemd; do
- for pattern in tty udev; do
- find $sysdir -name "*${pattern}*" -exec rm -rf {} \; || :
- done
-done
-rm -f /lib/systemd/system/sysinit.target.wants/proc-sys-fs-binfmt_misc.automount
-
-cp $INSTDIR/config/bashrc /etc/skel/.bash_aliases # sourced by .bashrc for new users
-
-# copy files for root account (already created)
-find /etc/skel -type f -exec cp -av {} /root \;
-
-# workaround bug on dbus if host runs selinux
-mkdir -p /etc/selinux/targeted/contexts/
-echo '<busconfig><selinux></selinux></busconfig>' >/etc/selinux/targeted/contexts/dbus_contexts
-
-# remount selinux ro to workaround bug in apt-get
-cat <<EOF >/etc/rc.local
-#!/bin/sh -e
-#
-# rc.local
-#
-# This script is executed at the end of each multiuser runlevel.
-# Make sure that the script will "exit 0" on success or any other
-# value on error.
-#
-# In order to enable or disable this script just change the execution
-# bits.
-#
-# By default this script does nothing.
-
-if [ -d /sys/fs/selinux ]; then
- mount -o remount,ro /sys/fs/selinux
-fi
-
-exit 0
-EOF
-
-# generate locale and set to default
-echo "en_US.UTF-8 UTF-8" >>/etc/locale.gen
-/usr/sbin/locale-gen
-echo "LANG=en_US.UTF-8" >>/etc/default/locale
-
-
-
-
diff --git a/setup.d/20_worker_base b/setup.d/20_worker_base
deleted file mode 100644
index eef5639..0000000
--- a/setup.d/20_worker_base
+++ /dev/null
@@ -1,63 +0,0 @@
-#!/bin/bash
-
-# install prereqs for bitbake plus other pkgs
-apt-get install -y gawk wget git git-core diffstat unzip texinfo gcc-multilib build-essential chrpath socat libsdl1.2-dev cpio libzip2 lsb-release python3
-
-# add some cool base tools
-apt-get install -y vim-gtk man tree xz-utils tar
-
-# for gerrit
-apt-get install -y git-review gitg
-
-# screen, xterm for bitbake devshell
-# libncurses5-dev for kernel 'make menuconfig'
-apt-get install -y ccache curl screen xterm libncurses5-dev
-
-# for toaster
-apt-get install -y python-pip
-pip install "Django==1.6" "South==0.8.4" "argparse==1.2.1" "wsgiref==0.1.2" "beautifulsoup4>=4.4.0"
-
-# for network boot through tftp+nbd
-apt-get install -y tftpd-hpa xnbd-server
-# adjust config file to have the server point to bitbake images deployment dir
-sed -i -e "s#^\(TFTP_DIRECTORY=\).*\$#\1\"$XDT_BUILD/tmp/deploy/images\"#" /etc/default/tftpd-hpa
-
-# update xterm resources to have truetype fonts and utf-8
-cat <<EOF >>/etc/X11/app-defaults/XTerm
-
-!iotbzh: enable truetype fonts and UTF-8 encoding
-*VT100*faceName: mono
-*VT100*faceSize: 13
-*VT100*locale: true
-EOF
-
-# add the build user
-useradd -c "Builder" -d $DEVUSER_HOME -G sudo -m -U -s /bin/bash -u $DEVUSER_UID $DEVUSER
-echo $DEVUSER:$DEVUSER_PASSWORD | chpasswd
-
-# generate an extra environment file sourced by bashrc
-for k in DEVUSER DEVUSER_UID DEVUSER_HOME \
- XDT_DIR \
- XDT_META XDT_DOWNLOADCACHE XDT_SSTATECACHE XDT_CCACHE XDT_BUILD XDT_WORKSPACE XDT_SOURCES XDT_SDK \
- ; do
- v=${!k} # get value
- [[ "${v:0:1}" == "/" ]] && mkdir -p $v # create dir only if value starts with "/"
- echo "export $k=$v" >>/etc/xdtrc
-done
-
-mkdir -p $DEVUSER_HOME/bin
-cat <<'EOF' >>$DEVUSER_HOME/.bashrc
-
-# added by worker image creation script (docker-image-builder)
-export PATH=~/bin:$PATH
-[[ -f /etc/xdtrc ]] && . /etc/xdtrc
-
-EOF
-
-# copy meta init script in ~devel/bin:
-wget -O $DEVUSER_HOME/bin/prepare_meta https://raw.githubusercontent.com/iotbzh/agl-manifest/master/prepare_meta
-chmod +x $DEVUSER_HOME/bin/*
-
-chown -R $DEVUSER:$DEVUSER $XDT_DIR
-chown -R $DEVUSER:$DEVUSER $DEVUSER_HOME
-
diff --git a/setup.d/30_tools b/setup.d/30_tools
deleted file mode 100755
index 486daba..0000000
--- a/setup.d/30_tools
+++ /dev/null
@@ -1,12 +0,0 @@
-#!/bin/bash
-
-apt-get install -y python-lzma python-gpgme pbzip2 pigz lzop
-
-dpkg -i \
- $INSTDIR/tools/bmaptools/bmap-tools*.deb
-
-mkdir -p /usr/local/bin
-for x in $INSTDIR/tools/scripts/*; do
- install --mode=755 $x /usr/local/bin/
-done
-
diff --git a/setup.d/99_cleanup b/setup.d/99_cleanup
deleted file mode 100644
index 3cea352..0000000
--- a/setup.d/99_cleanup
+++ /dev/null
@@ -1,18 +0,0 @@
-#!/bin/bash
-
-apt-get autoremove -y
-
-# remove big useless files
-rm -rf /usr/lib/x86_64-linux-gnu/dri/*.so
-rm -rf /usr/lib/perl/5.*/auto/Encode/JP/JP.so
-rm -rf /usr/lib/perl/5.*/auto/Encode/KR/KR.so
-rm -rf /usr/lib/perl/5.*/auto/Encode/CN/CN.so
-rm -rf /usr/lib/perl/5.*/auto/Encode/TW/TW.so
-
-# keep doc ?
-#rm -rf /usr/share/doc
-#rm -rf /usr/share/man
-#rm -rf /usr/share/locale
-
-
-