mirror of https://github.com/zulip/zulip.git
scripts: Stop using apt-add-repository.
Unfortunately, apt-add-repository is highly unreliable and was causing problems both in Travis CI and with developers provisioning their environment.
This commit is contained in:
parent
e2810ca1be
commit
14f6e4c740
|
@ -1,15 +1,19 @@
|
|||
#!/bin/bash
|
||||
set -x
|
||||
set -x
|
||||
|
||||
apt-get install -y lsb-release software-properties-common
|
||||
apt-get install -y lsb-release
|
||||
|
||||
SCRIPTS_PATH="$(dirname $(dirname $0))"
|
||||
# Add the apt keys
|
||||
apt-key add "$SCRIPTS_PATH"/setup/zulip-ppa.asc
|
||||
apt-key add "$SCRIPTS_PATH"/setup/pgroonga-ppa.asc
|
||||
|
||||
# First, install any updates from the apt repo that may be needed
|
||||
wget -qO - https://zulip.com/dist/keys/zulip-ppa.asc | apt-key add -
|
||||
release=$(lsb_release -sc)
|
||||
if [ "$release" = "trusty" ] || [ "$release" = "xenial" ]; then
|
||||
cat >/etc/apt/sources.list.d/zulip.list <<EOF
|
||||
deb http://ppa.launchpad.net/groonga/ppa/ubuntu $release main
|
||||
deb http://ppa.launchpad.net/tabbott/zulip/ubuntu $release main
|
||||
deb-src http://ppa.launchpad.net/groonga/ppa/ubuntu $release main
|
||||
deb-src http://ppa.launchpad.net/tabbott/zulip/ubuntu $release main
|
||||
EOF
|
||||
else
|
||||
|
|
|
@ -0,0 +1,27 @@
|
|||
-----BEGIN PGP PUBLIC KEY BLOCK-----
|
||||
Version: SKS 1.1.5
|
||||
Comment: Hostname: keyserver.ubuntu.com
|
||||
|
||||
mQINBFMyaEABEADEeUoP5AmhJZLHujySJaLKd1EXpIxkope3l4f/3tkbPTvV+jkyYvOSX/ii
|
||||
NAHyVGPrg4UjJI+kDLru1glFoabBs+J4xk2Lql9DcHW0x7YPgBXKCuj2sg84Teb0KTnAkAFI
|
||||
gd8w2kzs6l9itQbtCWei0wH+pGpp9YJqEqJhqc3U51LqUoMmYjTd2WTaN+BNVZOE3ws4Pa4+
|
||||
JyikyVOkuj/8q+jRF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kkrkKBal8Rq/EJaoaoBG6SFx2cSAD4GMxPEL7G3qJeNJPSLVSOP9j9nGIZ4SETeGIKCNVgVF
|
||||
16iXIxwflvgJP+/1qX3/Qin2YDYCeGvFmJiy5s0VFM1IdK+znrUu0apoCSYVia1D9NJGEdKf
|
||||
l7m/Odtxycq9VP1DKD/k4spWqsdpiBkJMch7XWfa7KF12bwV/tHP4KqJ02/xqhSqk+Ru4A9R
|
||||
LjQFWXs4o/Qwf5qF7FlGhpFridr0xdxtLVmK7bV4Hogldx1bKbkOpCL29BY8GA==
|
||||
=NjhU
|
||||
-----END PGP PUBLIC KEY BLOCK-----
|
|
@ -0,0 +1,27 @@
|
|||
-----BEGIN PGP PUBLIC KEY BLOCK-----
|
||||
Version: SKS 1.1.5
|
||||
Comment: Hostname: keyserver.ubuntu.com
|
||||
|
||||
mQINBFYFDSEBEAC3VnqG3OCOjL3wQ41taBnmrRZoTW6kBBZXY7Ts3o4/vWvleW0QOxUP5u2n
|
||||
qZ5qKL4e63e46M/6iroCI0c/M72lv8atCn8gyrGL3lLGB+pvfBeDAhMUFWQ0Rwkm0vxBceGS
|
||||
FwusblXgiTo7oa1ShTBwLG59Ej2MeTGYQnS5DqoppJZonJ6DSOMKf7Qf4m/9uiYu7LVSYeHQ
|
||||
l89o/0CR1fQtRRwwkoHHLvpUV18ZYllJxEPjbkKVjoXJHylXrYxhuKs+H5iIDmaDpwgvuVnd
|
||||
+BnXXfylN7lbrDq7nMyx5tU1sSQwfKqyoWXxvIMSwUUWaNuc5Vkh0O0AMYh5YykcB1PEXmxy
|
||||
UUK9yOkvl5XIziBvZBSXRd4WLkYEE6+3Ipj2RqWCM9maHV5AgxrxJYv3VhzYRN1/WNGJ7bHD
|
||||
IV2/3qYUOSSFrG8JyHyf2+JllEkYKbLve+f7mOnDiCNn7AyUK0jEJh7ZavDg2wICIr8gJgqD
|
||||
YUBOCYQS4wWCBAJWYxAzn0yWSc0MbWTsm/3uAkmC//inF1T75s6buThphq3sQJU9S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,7 +60,7 @@ else:
|
|||
# Ideally we wouldn't need to install a dependency here, before we
|
||||
# know the codename.
|
||||
subprocess.check_call(["sudo", "apt-get", "update"])
|
||||
subprocess.check_call(["sudo", "apt-get", "install", "-y", "lsb-release", "software-properties-common"])
|
||||
subprocess.check_call(["sudo", "apt-get", "install", "-y", "lsb-release"])
|
||||
vendor = subprocess_text_output(["lsb_release", "-is"])
|
||||
codename = subprocess_text_output(["lsb_release", "-cs"])
|
||||
if not (vendor in SUPPORTED_PLATFORMS and codename in SUPPORTED_PLATFORMS[vendor]):
|
||||
|
@ -125,14 +125,6 @@ def main():
|
|||
os.chdir(ZULIP_PATH)
|
||||
|
||||
run(["sudo", "./scripts/lib/setup-apt-repo"])
|
||||
|
||||
# Add groonga repository to get the pgroonga packages; retry if it fails :/
|
||||
try:
|
||||
run(["sudo", "add-apt-repository", "-y", "ppa:groonga/ppa"])
|
||||
except subprocess.CalledProcessError:
|
||||
print(WARNING + "`Could not add groonga; retrying..." + ENDC)
|
||||
run(["sudo", "add-apt-repository", "-y", "ppa:groonga/ppa"])
|
||||
|
||||
run(["sudo", "apt-get", "update"])
|
||||
run(["sudo", "apt-get", "-y", "install", "--no-install-recommends"] + APT_DEPENDENCIES[codename])
|
||||
|
||||
|
|
Loading…
Reference in New Issue