Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add opensuse support #530

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions scripts/coreboot-sdk.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,20 @@ elif [ "$ID" = "fedora" ] || [[ "$ID_LIKE" =~ "fedora" ]]; then
tar \
xz \
zlib-devel
elif [[ "$ID" =~ "opensuse" ]] || [[ "ID_LIKE" =~ "opensuse" ]]; then
sudo zypper in -y \
bzip2 \
ca-certificates \
flex \
gcc \
gcc-c++ \
gcc-ada \
make \
mozilla-nss-devel \
patch \
tar \
xz \
zlib-devel
elif [ "$ID" = "ubuntu" ] || [[ "$ID_LIKE" =~ "debian" ]]; then
sudo apt-get --quiet update
sudo apt-get --quiet install --no-install-recommends --assume-yes \
Expand Down
18 changes: 18 additions & 0 deletions scripts/install-deps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,24 @@ elif [[ "${ID}" =~ "fedora" ]] || [[ "${ID_LIKE}" =~ "fedora" ]]; then
python3 \
systemd-devel \
zlib-devel
elif [[ "${ID}" =~ "opensuse" ]] || [[ "${ID_LIKE}" =~ "opensuse" ]]; then
sudo zypper in -t pattern devel_C_C++
sudo zypper in \
-y \
ccache \
cmake \
curl \
dosfstools \
flashrom \
libuuid-devel \
mtools \
ncurses-devel \
parted \
patch \
systemd-devel \
zlib-devel \
python3 \
git-lfs
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sort deps

elif [[ "${ID}" =~ "arch" ]] || [[ "${ID_LIKE}" =~ "arch" ]]; then
sudo pacman -S \
--noconfirm \
Expand Down
8 changes: 7 additions & 1 deletion scripts/install-rust.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,17 @@

set -Ee

. /etc/os-release

RUSTUP_NEW_INSTALL=0

# NOTE: rustup is used to allow multiple toolchain installations.
if command -v rustup >/dev/null 2>&1; then
rustup self update
if [[ "$ID" =~ "opensuse" ]] || [[ "$ID_LIKE" =~ "opensuse" ]]; then
sudo zypper up rustup
else
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is expected that rustup is installed from https://rustup.rs/, not by a distro package.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What should it do if rustup has been installed via a distro package?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This case can actually just be removed. It was initially done to ensure users had a version of rustup new enough to support TOML-based toolchain files. I've done it in #531 to preserve the context.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Understood!

rustup self update
fi
else
RUSTUP_NEW_INSTALL=1
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs \
Expand Down