Skip to content

Commit

Permalink
Try to fix Opensuse certificate errors. (#4075)
Browse files Browse the repository at this point in the history
* Try to fix certificate errors.

* Try recommended version.

* Also update README

* lsb-release instead of os-release.
  • Loading branch information
fruffy-bfn authored Jul 19, 2023
1 parent bf6efdd commit 09c82cf
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,9 +110,9 @@ p4c has package support for several Ubuntu and Debian distributions.
A p4c package is available in the following repositories for Ubuntu 20.04 and newer.

```bash
. /etc/os-release
echo "deb https://download.opensuse.org/repositories/home:/p4lang/xUbuntu_${VERSION_ID}/ /" | sudo tee /etc/apt/sources.list.d/home:p4lang.list
curl -L "https://download.opensuse.org/repositories/home:/p4lang/xUbuntu_${VERSION_ID}/Release.key" | sudo apt-key add -
source /etc/lsb-release
echo "deb http://download.opensuse.org/repositories/home:/p4lang/xUbuntu_${DISTRIB_RELEASE}/ /" | sudo tee /etc/apt/sources.list.d/home:p4lang.list
curl -fsSL https://download.opensuse.org/repositories/home:p4lang/xUbuntu_${DISTRIB_RELEASE}/Release.key | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/home_p4lang.gpg > /dev/null
sudo apt-get update
sudo apt install p4lang-p4c
```
Expand Down
9 changes: 4 additions & 5 deletions tools/ci-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -100,11 +100,10 @@ if [[ "${DISTRIB_RELEASE}" == "18.04" ]] || [[ "$(which simple_switch 2> /dev/nu
export CC=gcc-9
export CXX=g++-9
else
sudo apt-get update && sudo apt-get install -y curl gnupg
echo "deb https://download.opensuse.org/repositories/home:/p4lang/xUbuntu_${DISTRIB_RELEASE}/ /" | sudo tee /etc/apt/sources.list.d/home:p4lang.list
curl -L "https://download.opensuse.org/repositories/home:/p4lang/xUbuntu_${DISTRIB_RELEASE}/Release.key" | sudo apt-key add -
# Try to avoid certificate errors.
sudo apt install ca-certificates
sudo apt-get update && sudo apt-get install -y wget ca-certificates
# Add the p4lang opensuse repository.
echo "deb http://download.opensuse.org/repositories/home:/p4lang/xUbuntu_${DISTRIB_RELEASE}/ /" | sudo tee /etc/apt/sources.list.d/home:p4lang.list
curl -fsSL https://download.opensuse.org/repositories/home:p4lang/xUbuntu_${DISTRIB_RELEASE}/Release.key | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/home_p4lang.gpg > /dev/null
P4C_DEPS+=" p4lang-bmv2"
fi

Expand Down

0 comments on commit 09c82cf

Please sign in to comment.