Skip to content

Commit 5a3b8dc

Browse files
authored
Merge branch 'master' into rabbitmq-user-setup
2 parents fe05a2f + e45e5d6 commit 5a3b8dc

File tree

2 files changed

+16
-34
lines changed

2 files changed

+16
-34
lines changed

scripts/st2bootstrap-deb.sh

Lines changed: 8 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -126,32 +126,23 @@ setup_args() {
126126
sudo apt-get update > /dev/null 2>/dev/null
127127
# check if python3.6 is available
128128
if (! apt-cache show python3.6 2> /dev/null | grep 'Package:' > /dev/null); then
129-
if [[ "$U16_ADD_INSECURE_PY3_PPA" = "1" ]]; then
130-
choice=y
131-
else
129+
if [[ "$U16_ADD_INSECURE_PY3_PPA" = "0" ]]; then
132130
echo ""
133131
echo "WARNING!"
134132
echo "The python3.6 package is a required dependency for the StackStorm st2 package but that is not installable from any of the default Ubuntu 16.04 repositories."
135133
echo "We recommend switching to Ubuntu 18.04 LTS (Bionic) as a base OS. Support for Ubuntu 16.04 will be removed with future StackStorm versions."
136134
echo ""
137135
echo "Alternatively we'll try to add python3.6 from the 3rd party 'deadsnakes' repository: https://launchpad.net/~deadsnakes/+archive/ubuntu/ppa."
138-
echo "By continuing you are aware of the support and security risks associated with using unofficial 3rd party PPA repository, and you understand that StackStorm does NOT provide ANY support for python3.6 packages on Ubuntu 16.04."
139136
echo ""
140-
echo "To bypass this check in future, you can provide the following flag: --u16-add-insecure-py3-ppa"
137+
echo "You can provide the following flag os use python3.6 from the 'deadsnakes'repository: --u16-add-insecure-py3-ppa"
138+
echo ""
139+
echo "By using the flag you are aware of the support and security risks associated with using unofficial 3rd party PPA repository, and you understand that StackStorm does NOT provide ANY support for python3.6 packages on Ubuntu 16.04."
141140
echo ""
142-
echo "Press [y] to continue or [n] to cancel adding it: "
143-
read choice
141+
exit 1
142+
else
143+
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys F23C5A6CF475977595C89F51BA6932366A755776
144+
echo "deb http://ppa.launchpad.net/deadsnakes/ppa/ubuntu xenial main" | sudo tee /etc/apt/sources.list.d/deadsnakes-ubuntu-ppa-xenial.list
144145
fi
145-
case "$choice" in
146-
y|Y )
147-
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys F23C5A6CF475977595C89F51BA6932366A755776
148-
echo "deb http://ppa.launchpad.net/deadsnakes/ppa/ubuntu xenial main" | sudo tee /etc/apt/sources.list.d/deadsnakes-ubuntu-ppa-xenial.list
149-
;;
150-
* )
151-
echo "python3.6 PPA installation aborted"
152-
exit 1
153-
;;
154-
esac
155146
fi
156147
fi
157148
}

scripts/st2bootstrap-deb.template.sh

Lines changed: 8 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -118,32 +118,23 @@ setup_args() {
118118
sudo apt-get update > /dev/null 2>/dev/null
119119
# check if python3.6 is available
120120
if (! apt-cache show python3.6 2> /dev/null | grep 'Package:' > /dev/null); then
121-
if [[ "$U16_ADD_INSECURE_PY3_PPA" = "1" ]]; then
122-
choice=y
123-
else
121+
if [[ "$U16_ADD_INSECURE_PY3_PPA" = "0" ]]; then
124122
echo ""
125123
echo "WARNING!"
126124
echo "The python3.6 package is a required dependency for the StackStorm st2 package but that is not installable from any of the default Ubuntu 16.04 repositories."
127125
echo "We recommend switching to Ubuntu 18.04 LTS (Bionic) as a base OS. Support for Ubuntu 16.04 will be removed with future StackStorm versions."
128126
echo ""
129127
echo "Alternatively we'll try to add python3.6 from the 3rd party 'deadsnakes' repository: https://launchpad.net/~deadsnakes/+archive/ubuntu/ppa."
130-
echo "By continuing you are aware of the support and security risks associated with using unofficial 3rd party PPA repository, and you understand that StackStorm does NOT provide ANY support for python3.6 packages on Ubuntu 16.04."
131128
echo ""
132-
echo "To bypass this check in future, you can provide the following flag: --u16-add-insecure-py3-ppa"
129+
echo "You can provide the following flag os use python3.6 from the 'deadsnakes'repository: --u16-add-insecure-py3-ppa"
130+
echo ""
131+
echo "By using the flag you are aware of the support and security risks associated with using unofficial 3rd party PPA repository, and you understand that StackStorm does NOT provide ANY support for python3.6 packages on Ubuntu 16.04."
133132
echo ""
134-
echo "Press [y] to continue or [n] to cancel adding it: "
135-
read choice
133+
exit 1
134+
else
135+
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys F23C5A6CF475977595C89F51BA6932366A755776
136+
echo "deb http://ppa.launchpad.net/deadsnakes/ppa/ubuntu xenial main" | sudo tee /etc/apt/sources.list.d/deadsnakes-ubuntu-ppa-xenial.list
136137
fi
137-
case "$choice" in
138-
y|Y )
139-
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys F23C5A6CF475977595C89F51BA6932366A755776
140-
echo "deb http://ppa.launchpad.net/deadsnakes/ppa/ubuntu xenial main" | sudo tee /etc/apt/sources.list.d/deadsnakes-ubuntu-ppa-xenial.list
141-
;;
142-
* )
143-
echo "python3.6 PPA installation aborted"
144-
exit 1
145-
;;
146-
esac
147138
fi
148139
fi
149140
}

0 commit comments

Comments
 (0)