mirror of
https://github.com/certbot/certbot.git
synced 2026-06-04 22:33:00 -04:00
source bootstrap script and call sudo as needed
This commit is contained in:
parent
49f1f3aa62
commit
358c5e174d
2 changed files with 17 additions and 16 deletions
|
|
@ -34,19 +34,9 @@ DeterminePythonVersion() {
|
|||
}
|
||||
|
||||
BootstrapDebCommon() {
|
||||
apt-get update || error apt-get update hit problems but continuing anyway...
|
||||
sudo apt-get update || error apt-get update hit problems but continuing anyway...
|
||||
|
||||
# make sure rust isn't installed by the package manager
|
||||
if ! apt-get remove -y rustc; then
|
||||
error "Could not remove existing rust. Aborting bootstrap!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Install rust for cryptography (needed on Debian)
|
||||
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
|
||||
. $HOME/.cargo/env
|
||||
|
||||
apt-get install -y --no-install-recommends \
|
||||
sudo apt-get install -y --no-install-recommends \
|
||||
python3 \
|
||||
python3-dev \
|
||||
python3-venv \
|
||||
|
|
@ -57,7 +47,18 @@ BootstrapDebCommon() {
|
|||
libffi-dev \
|
||||
ca-certificates \
|
||||
build-essential \
|
||||
curl \
|
||||
make # needed on debian 9 arm64 which doesn't have a python3 pynacl wheel
|
||||
|
||||
# make sure rust isn't installed by the package manager
|
||||
if ! sudo apt-get remove -y rustc; then
|
||||
error "Could not remove existing rust. Aborting bootstrap!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Install rust for cryptography (needed on Debian)
|
||||
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
|
||||
. $HOME/.cargo/env
|
||||
}
|
||||
|
||||
# Sets TOOL to the name of the package manager
|
||||
|
|
@ -103,7 +104,7 @@ BootstrapRpmCommonBase() {
|
|||
"
|
||||
fi
|
||||
|
||||
if ! $TOOL install -y $pkgs; then
|
||||
if ! sudo $TOOL install -y $pkgs; then
|
||||
error "Could not install OS dependencies. Aborting bootstrap!"
|
||||
exit 1
|
||||
fi
|
||||
|
|
@ -116,8 +117,8 @@ BootstrapRpmPython3() {
|
|||
python3-devel
|
||||
"
|
||||
|
||||
if ! $TOOL list 'python3*-devel' >/dev/null 2>&1; then
|
||||
yum-config-manager --enable rhui-REGION-rhel-server-extras rhui-REGION-rhel-server-optional
|
||||
if ! sudo $TOOL list 'python3*-devel' >/dev/null 2>&1; then
|
||||
sudo yum-config-manager --enable rhui-REGION-rhel-server-extras rhui-REGION-rhel-server-optional
|
||||
fi
|
||||
|
||||
BootstrapRpmCommonBase "$python_pkgs"
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ BOOTSTRAP_SCRIPT="tests/letstest/scripts/bootstrap_os_packages.sh"
|
|||
VENV_PATH=venv
|
||||
|
||||
# install OS packages
|
||||
sudo $BOOTSTRAP_SCRIPT
|
||||
. $BOOTSTRAP_SCRIPT
|
||||
|
||||
# setup venv
|
||||
# We strip the hashes because the venv creation script includes unhashed
|
||||
|
|
|
|||
Loading…
Reference in a new issue