Skip to content

Commit

Permalink
install-dependencies.sh: fix arch dependencies
Browse files Browse the repository at this point in the history
Some containers may not contain /etc/os-release,
so install filesystem package if needed.

Remove systemtap - there is no stap in std repo.
Add c-ares, fmt, pkgconf, python3, glibc. Some
containers may have glibc version before 2.30-3
which does not contain sys/sdt.h that required
for seastar and is a part of systemtap.

Add --noconfirm to pacman.

Tested on Arch 5.4.2-arch1-1 and docker archlinux.

Signed-off-by: Ivan Prisyazhnyy <ivan@scylladb.com>
Message-Id: <20191210154828.971572-1-ivan@scylladb.com>
  • Loading branch information
Ivan Prisyazhnyy authored and avikivity committed Dec 10, 2019
1 parent 8733f8b commit 5afae38
Showing 1 changed file with 17 additions and 2 deletions.
19 changes: 17 additions & 2 deletions install-dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,14 @@
# under the License.
#

# os-release may be missing in container environment by default.
if [ ! -f "/etc/os-release" ]; then
# if we are on Arch, provide os-release
if [ -x "/usr/sbin/pacman" ]; then
/usr/sbin/pacman -Sy --noconfirm filesystem
fi
fi

. /etc/os-release

debian_packages=(
Expand Down Expand Up @@ -102,6 +110,9 @@ centos_packages=(
devtoolset-8-libatomic
)

# glibc 2.30-3 has sys/sdt.h (systemtap include)
# some old containers may contain glibc older,
# so enforce update on that one.
arch_packages=(
gcc
ninja
Expand All @@ -119,11 +130,15 @@ arch_packages=(
lz4
make
protobuf
systemtap
libtool
cmake
yaml-cpp
stow
c-ares
pkgconf
fmt
python3
glibc
)

opensuse_packages=(
Expand Down Expand Up @@ -170,7 +185,7 @@ elif [ "$ID" = "centos" ] || [ "$ID" = "fedora" ]; then
yum install -y "${centos_packages[@]}"
fi
elif [ "$ID" = "arch" -o "$ID_LIKE" = "arch" ]; then
pacman -Sy --needed "${arch_packages[@]}"
pacman -Sy --noconfirm --needed "${arch_packages[@]}"
elif [ "$ID" = "opensuse-leap" ]; then
zypper install -y "${opensuse_packages[@]}"
else
Expand Down

0 comments on commit 5afae38

Please sign in to comment.