forked from kata-containers/tests
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
clang & devmapper libs Fixes: kata-containers#5750 Signed-off-by: Suraj Deshmukh <[email protected]>
- Loading branch information
Showing
2 changed files
with
53 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
#!/bin/bash | ||
# | ||
# Copyright Confidential Containers Contributors | ||
# | ||
# SPDX-License-Identifier: Apache-2.0 | ||
# | ||
|
||
set -o errexit | ||
set -o nounset | ||
set -o pipefail | ||
|
||
# Detect if the OS is Ubuntu or fedora | ||
source "/etc/os-release" || source "/usr/lib/os-release" | ||
|
||
# On Ubuntu or debian, install the dependencies | ||
if [ "$ID" == "ubuntu" ] || [ "$ID" == "debian" ]; then | ||
export DEBIAN_FRONTEND=noninteractive | ||
sudo apt update | ||
sudo apt install -y \ | ||
libdevmapper-dev \ | ||
clang | ||
|
||
exit 0 | ||
fi | ||
|
||
# On Fedora, install the dependencies | ||
if [ "$ID" == "fedora" ]; then | ||
sudo dnf install -y \ | ||
device-mapper-devel \ | ||
clang | ||
|
||
exit 0 | ||
fi | ||
|
||
# On CentOS 8 Stream | ||
if [ "$ID" == "centos" ] && [ "$VERSION_ID" == "8" ]; then | ||
# Enable powertools repo to be able to install the developer library for device-mapper | ||
yum install -y \ | ||
dnf-plugins-core | ||
yum config-manager --set-enabled powertools | ||
|
||
yum install -y \ | ||
device-mapper-devel \ | ||
clang | ||
exit 0 | ||
fi | ||
|
||
echo "Unsupported OS: $PRETTY_NAME" | ||
exit 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters