aboutsummaryrefslogtreecommitdiff
path: root/Builder
blob: f07938629940307669ecc88fce7fddfee5ae5d7c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/bin/sh -

set -ex

sed -i '/mount -t proc /d; /mount -t sysfs /d' /debootstrap/functions
/debootstrap/debootstrap --second-stage

ls -ld "${XILINX_PKGDIR}"

RAT_PACKAGES='libglib2.0-0 libxrandr2 python-xvfbwrapper ratpoison sudo'

apt-get update

apt-get install -y ${RAT_PACKAGES}

adduser --disabled-password --gecos 'Cryptech Build Bot' --shell /bin/sh builder

echo >/etc/sudoers.d/builder 'builder ALL = (ALL) NOPASSWD: SETENV: ALL'

install -o builder -g builder \
	"/cryptech-builder/${XILINX_LICENSE}" \
	"/home/builder/${XILINX_LICENSE}"

ln -sf /bin/bash /bin/sh

/cryptech-builder/Ratinox

chown -R builder:builder /home/builder

rm -rf "${XILINX_PKGDIR}" "/home/builder/${XILINX_LICENSE}"

apt-get remove -y --purge --autoremove ${RAT_PACKAGES}