]> git.proxmox.com Git - ceph.git/blame - ceph/src/seastar/install-dependencies.sh
import quincy beta 17.1.0
[ceph.git] / ceph / src / seastar / install-dependencies.sh
CommitLineData
11fdf7f2
TL
1#!/bin/bash
2#
3# This file is open source software, licensed to you under the terms
4# of the Apache License, Version 2.0 (the "License"). See the NOTICE file
5# distributed with this work for additional information regarding copyright
6# ownership. You may not use this file except in compliance with the License.
7#
8# You may obtain a copy of the License at
9#
10# http://www.apache.org/licenses/LICENSE-2.0
11#
12# Unless required by applicable law or agreed to in writing,
13# software distributed under the License is distributed on an
14# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15# KIND, either express or implied. See the License for the
16# specific language governing permissions and limitations
17# under the License.
18#
19
9f95a23c
TL
20# os-release may be missing in container environment by default.
21if [ -f "/etc/os-release" ]; then
22 . /etc/os-release
23elif [ -f "/etc/arch-release" ]; then
24 export ID=arch
25else
26 echo "/etc/os-release missing."
27 exit 1
28fi
11fdf7f2 29
9f95a23c
TL
30debian_packages=(
31 ninja-build
32 ragel
33 libhwloc-dev
34 libnuma-dev
35 libpciaccess-dev
36 libcrypto++-dev
37 libboost-all-dev
38 libxml2-dev
39 xfslibs-dev
40 libgnutls28-dev
41 liblz4-dev
42 libsctp-dev
43 gcc
44 make
9f95a23c
TL
45 python3
46 systemtap-sdt-dev
47 libtool
48 cmake
49 libyaml-cpp-dev
50 libc-ares-dev
51 stow
52 g++
53 libfmt-dev
54 diffutils
f67539c2
TL
55 valgrind
56 doxygen
57 openssl
20effc67 58 pkg-config
9f95a23c 59)
11fdf7f2 60
9f95a23c
TL
61# seastar doesn't directly depend on these packages. They are
62# needed because we want to link seastar statically and pkg-config
63# has no way of saying "static seastar, but dynamic transitive
64# dependencies". They provide the various .so -> .so.ver symbolic
65# links.
66transitive=(libtool-ltdl-devel trousers-devel libidn2-devel libunistring-devel)
67
68redhat_packages=(
69 hwloc-devel
70 numactl-devel
71 libpciaccess-devel
72 cryptopp-devel
73 libxml2-devel
74 xfsprogs-devel
75 gnutls-devel
76 lksctp-tools-devel
77 lz4-devel
78 gcc
79 make
f67539c2 80 python3
9f95a23c
TL
81 systemtap-sdt-devel
82 libtool
83 cmake
84 yaml-cpp-devel
85 c-ares-devel
86 stow
87 diffutils
f67539c2
TL
88 doxygen
89 openssl
20effc67
TL
90 fmt-devel
91 boost-devel
92 valgrind-devel
9f95a23c
TL
93 "${transitive[@]}"
94)
95
96fedora_packages=(
97 "${redhat_packages[@]}"
98 gcc-c++
99 ninja-build
100 ragel
101 boost-devel
102 fmt-devel
103 libubsan
104 libasan
105 libatomic
f67539c2 106 valgrind-devel
9f95a23c
TL
107)
108
f67539c2 109centos7_packages=(
9f95a23c
TL
110 "${redhat_packages[@]}"
111 ninja-build
112 ragel
f67539c2 113 cmake3
9f95a23c 114 rh-mongodb36-boost-devel
f67539c2
TL
115 devtoolset-9-gcc-c++
116 devtoolset-9-libubsan
117 devtoolset-9-libasan
118 devtoolset-9-libatomic
119)
120
121centos8_packages=(
122 "${redhat_packages[@]}"
123 ninja-build
124 ragel
125 gcc-toolset-9-gcc
126 gcc-toolset-9-gcc-c++
127 gcc-toolset-9-libubsan-devel
128 gcc-toolset-9-libasan-devel
129 gcc-toolset-9-libatomic-devel
9f95a23c
TL
130)
131
132# 1) glibc 2.30-3 has sys/sdt.h (systemtap include)
133# some old containers may contain glibc older,
134# so enforce update on that one.
135# 2) if problems with signatures, ensure having fresh
136# archlinux-keyring: pacman -Sy archlinux-keyring && pacman -Syyu
137# 3) aur installations require having sudo and being
138# a sudoer. makepkg does not work otherwise.
139arch_packages=(
140 gcc
141 ninja
142 ragel
143 boost
144 boost-libs
145 hwloc
146 numactl
147 libpciaccess
148 crypto++
149 libxml2
150 xfsprogs
151 gnutls
152 lksctp-tools
153 lz4
154 make
9f95a23c
TL
155 libtool
156 cmake
157 yaml-cpp
158 stow
159 c-ares
160 pkgconf
161 fmt
162 python3
163 glibc
164 filesystem
f67539c2
TL
165 valgrind
166 openssl
9f95a23c
TL
167)
168
169opensuse_packages=(
170 c-ares-devel
171 cmake
172 hwloc-devel
173 libboost_filesystem1_66_0
174 libboost_filesystem1_66_0-devel
175 libboost_program_options1_66_0
176 libboost_program_options1_66_0-devel
177 libboost_system1_66_0
178 libboost_system1_66_0-devel
179 libboost_test1_66_0
180 libboost_test1_66_0-devel
181 libboost_thread1_66_0
182 libboost_thread1_66_0-devel
183 libcryptopp-devel
184 libboost_atomic1_66_0
185 libboost_atomic1_66_0-devel
186 libboost_date_time1_66_0
187 libboost_date_time1_66_0-devel
188 libboost_chrono1_66_0
189 libboost_chrono1_66_0-devel
190 libgnutls-devel
191 libgnutlsxx28
192 liblz4-devel
193 libnuma-devel
194 lksctp-tools-devel
20effc67 195 ninja
9f95a23c
TL
196 ragel
197 xfsprogs-devel
198 yaml-cpp-devel
199 libtool
200 stow
f67539c2 201 openssl
9f95a23c
TL
202)
203
f67539c2 204case "$ID" in
20effc67 205 ubuntu|debian|pop)
f67539c2
TL
206 apt-get install -y "${debian_packages[@]}"
207 ;;
208 fedora)
9f95a23c 209 dnf install -y "${fedora_packages[@]}"
f67539c2 210 ;;
20effc67 211 rhel|centos)
f67539c2
TL
212 if [ "$VERSION_ID" = "7" ]; then
213 yum install -y epel-release centos-release-scl scl-utils
214 yum install -y "${centos7_packages[@]}"
20effc67 215 elif [ "${VERSION_ID%%.*}" = "8" ]; then
f67539c2
TL
216 dnf install -y epel-release
217 dnf install -y "${centos8_packages[@]}"
218 fi
219 ;;
220 opensuse-leap)
221 zypper install -y "${opensuse_packages[@]}"
222 ;;
20effc67 223 arch|manjaro)
f67539c2
TL
224 if [ "$EUID" -eq "0" ]; then
225 pacman -Sy --needed --noconfirm "${arch_packages[@]}"
226 else
227 echo "seastar: running without root. Skipping main dependencies (pacman)." 1>&2
228 fi
229 ;;
230 *)
231 echo "Your system ($ID) is not supported by this script. Please install dependencies manually."
232 exit 1
233 ;;
234esac