/
deps-apt.sh
executable file
·120 lines (91 loc) · 2.18 KB
/
deps-apt.sh
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
#!/usr/bin/env bash
#
# Usage:
# ./deps-apt.sh <function name>
set -o nounset
set -o pipefail
set -o errexit
layer-python-symlink() {
### A special layer for building CPython; done as root
ln -s -f -v /usr/bin/python2 /usr/bin/python
}
layer-for-soil() {
# gcc: time-helper is needed
# git: for checking out code
# python2: for various tools
apt-get install -y gcc git python2
}
layer-locales() {
apt-get install -y locales
# uncomment in a file
sed -i 's/# en_US.UTF-8/en_US.UTF-8/' /etc/locale.gen
locale-gen --purge en_US.UTF-8
}
dev-minimal() {
local -a packages=(
libreadline-dev
procps # pgrep used by test/interactive
gawk
python2-dev # for building Python extensions
python-pip # flake8 typing
python3-setuptools # mypy
python3-pip
# Note: osh-minimal task needs shells; not using spec-bin for now
busybox-static mksh zsh
)
apt-get install -y "${packages[@]}"
}
pea() {
apt-get install -y python3-pip
}
other-tests() {
local -a packages=(
libreadline-dev
python2-dev # osh2oil needs build/dev.sh minimal
python3 # for py3-parse
r-base-core # for r-libs
)
apt-get install -y "${packages[@]}"
}
cpp() {
local -a packages=(
# retrieving deps -- TODO: move to build time
wget
# line_input.so needs this
libreadline-dev
python2-dev
python3-pip
# for MyPy virtualenv for requirements.txt -- TODO: move to build time.
python3-venv
ninja-build
# to create mycpp/_ninja/index.html
gawk
# for stable benchmarks
valgrind
# the shell benchmarks compare shells
busybox-static mksh zsh
)
apt-get install -y "${packages[@]}"
}
ovm-tarball() {
local -a packages=(
# spec tests need the 'time' command, not the shell builtin
time
# This is a separate package needed for re2c. TODO: remove when we've
# built it into the image.
g++
# line_input.so needs this
libreadline-dev
python2-dev
# retrieving deps -- TODO: move to build time
wget
# for syscall measurements
strace
# for cmark and yajl
cmake
# test/spec-runner.sh needs this
gawk
)
apt-get install -y "${packages[@]}"
}
"$@"