mirror of https://github.com/zulip/zulip.git
provision: Initialize setup-yum-repo.
This commit is contained in:
parent
85b2627191
commit
448303b3f0
|
@ -0,0 +1,18 @@
|
|||
#!/bin/bash
|
||||
set -x
|
||||
set -e
|
||||
|
||||
yum install -y epel-release
|
||||
yum update
|
||||
|
||||
# "Development Tools" is the equivalent of build-essential
|
||||
yum groupinstall -y "Development Tools"
|
||||
|
||||
RHVER="$(rpm -qf --queryformat="%{VERSION}" /etc/redhat-release)"
|
||||
RHARCH="$(rpm -qf --queryformat="%{ARCH}" /etc/redhat-release)"
|
||||
# PostgreSQL 10
|
||||
yum localinstall -y "https://yum.postgresql.org/10/redhat/rhel-$RHVER-$RHARCH/pgdg-centos10-10-2.noarch.rpm"
|
||||
|
||||
# PGroonga
|
||||
# https://pgroonga.github.io/install/centos.html
|
||||
yum localinstall -y https://packages.groonga.org/centos/groonga-release-latest.noarch.rpm
|
|
@ -182,11 +182,10 @@ SYSTEM_DEPENDENCIES = {
|
|||
"postgresql-10-tsearch-extras",
|
||||
],
|
||||
"centos7": COMMON_YUM_DEPENDENCIES + [
|
||||
"postgresql10-server", # TODO add the source
|
||||
"postgresql10-server",
|
||||
"postgresql10",
|
||||
"postgresql10-devel",
|
||||
"postgresql10-pgroonga", # TODO add the source
|
||||
# TODO tsearch-extras must be compiled from scratch
|
||||
"postgresql10-pgroonga",
|
||||
]
|
||||
}
|
||||
|
||||
|
@ -226,17 +225,16 @@ def setup_shell_profile(shell_profile):
|
|||
|
||||
def install_apt_deps():
|
||||
# type: () -> None
|
||||
# setup-apt-repo does an `apt-get update`
|
||||
run(["sudo", "./scripts/lib/setup-apt-repo"])
|
||||
# By doing list -> set -> list conversion we remove duplicates.
|
||||
deps_to_install = list(set(SYSTEM_DEPENDENCIES[codename]))
|
||||
if vendor == 'CentOS':
|
||||
print(WARNING + "CentOS support is still experimental.")
|
||||
run(["sudo", "yum", "install", "-y", "epel-release"])
|
||||
# "Development Tools" is the equivalent of build-essential
|
||||
run(["sudo", "yum", "groupinstall", "-y", "Development Tools"])
|
||||
run(["sudo", "./scripts/lib/setup-yum-repo"])
|
||||
run(["sudo", "yum", "install", "-y"] + deps_to_install)
|
||||
# TODO tsearch-extras must be compiled from scratch
|
||||
else:
|
||||
# setup-apt-repo does an `apt-get update`
|
||||
run(["sudo", "./scripts/lib/setup-apt-repo"])
|
||||
run(["sudo", "apt-get", "-y", "install", "--no-install-recommends"] + deps_to_install)
|
||||
|
||||
def main(options):
|
||||
|
|
Loading…
Reference in New Issue