forked from redpanda-data/redpanda
-
Notifications
You must be signed in to change notification settings - Fork 0
/
install-dependencies.sh
executable file
·159 lines (155 loc) · 2.81 KB
/
install-dependencies.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
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
#!/bin/bash
# Copyright 2020 Redpanda Data, Inc.
#
# Use of this software is governed by the Business Source License
# included in the file licenses/BSL.md
#
# As of the Change Date specified in that file, in accordance with
# the Business Source License, use of this software will be governed
# by the Apache License, Version 2.0
set -e
echo "installing redpanda toolchain"
if [[ $EUID -ne 0 ]]; then
echo "This script should be run as root."
exit 1
fi
if [ -f "/etc/os-release" ]; then
. /etc/os-release
elif [ -f "/etc/arch-release" ]; then
export ID=arch
else
echo "/etc/os-release missing."
exit 1
fi
deb_deps=(
cargo
ccache
clang
clang-tidy
cmake
git
golang
libarrow-dev
libboost-all-dev
libc-ares-dev
libgssapi-krb5-2
libkrb5-dev
liblz4-dev
libparquet-dev
libprotobuf-dev
libprotoc-dev
libre2-dev
libsctp-dev
libsnappy-dev
libssl-dev
libxxhash-dev
libyaml-cpp-dev
libzstd-dev
lld
ninja-build
openssl
protobuf-compiler
python3
python3-jinja2
python3-jsonschema
ragel
systemtap-sdt-dev
valgrind
xfslibs-dev
)
fedora_deps=(
boost-devel
c-ares-devel
cargo
ccache
clang
clang-tools-extra
cmake
compiler-rt
git
golang
hwloc-devel
krb5-devel
libarrow-devel
libxml2-devel
libzstd-devel
lksctp-tools-devel
lld
llvm
lz4-devel
lz4-static
ninja-build
numactl-devel
openssl
openssl-devel
parquet-libs-devel
procps
protobuf-devel
python3
python3-jinja2
python3-jsonschema
ragel
re2-devel
rust
snappy-devel
systemtap-sdt-devel
valgrind-devel
xfsprogs-devel
xxhash-devel
yaml-cpp-devel
zlib-devel
)
arch_deps=(
ccache
clang
curl
git
go
lld
llvm
openssl
pkg-config
procps
python-jinja
python-virtualenv
rapidjson
rust
snappy
unzip
which
xxhash
xz
zip
zstd
)
case "$ID" in
ubuntu | debian | pop)
export DEBIAN_FRONTEND=noninteractive
apt update
apt install -y -V ca-certificates lsb-release wget
wget https://apache.jfrog.io/artifactory/arrow/$(lsb_release --id --short | tr 'A-Z' 'a-z')/apache-arrow-apt-source-latest-$(lsb_release --codename --short).deb
apt install -y -V ./apache-arrow-apt-source-latest-$(lsb_release --codename --short).deb
rm apache-arrow-apt-source-latest-$(lsb_release --codename --short).deb
apt update
apt-get install -y "${deb_deps[@]}"
if [[ $CLEAN_PKG_CACHE == true ]]; then
rm -rf /var/lib/apt/lists/*
fi
;;
fedora)
dnf install -y "${fedora_deps[@]}"
if [[ $CLEAN_PKG_CACHE == true ]]; then
dnf clean all
fi
;;
arch | manjaro)
pacman -Sy --needed --noconfirm "${arch_deps[@]}"
if [[ $CLEAN_PKG_CACHE == true ]]; then
pacman -Sc
fi
;;
*)
echo "Please help us make the script better by sending patches with your OS $ID"
exit 1
;;
esac