provision: Add build-pgroonga and use it for Fedora.

This commit is contained in:
rht 2018-12-17 19:21:49 +00:00 committed by Tim Abbott
parent 80ba105be5
commit 295cbe7b9c
3 changed files with 20 additions and 2 deletions

17
scripts/lib/build-pgroonga Executable file
View File

@ -0,0 +1,17 @@
#!/bin/bash
set -x
set -e
PGROONGA_VERSION="2.1.6"
# Currently only tested for Fedora systems.
yum install -y groonga-devel msgpack-devel
cd "$(mktemp -d)"
wget https://packages.groonga.org/source/pgroonga/pgroonga-"$PGROONGA_VERSION".tar.gz
tar xvf pgroonga-"$PGROONGA_VERSION".tar.gz
cd pgroonga-"$PGROONGA_VERSION"
make HAVE_MSGPACK=1
make install

View File

@ -2,6 +2,8 @@
set -x
set -e
# Has only been tested on Red Hat systems; gmake is wrong for others.
cd "$(mktemp -d)"
git clone https://github.com/zulip/tsearch_extras

View File

@ -279,8 +279,7 @@ def install_yum_deps(deps_to_install, retry=False):
if vendor == "fedora":
# Compile PGroonga from scratch, since pgroonga upstream
# doesn't provide Fedora packages.
print("TODO: compile PGroonga for", codename)
exit(1)
run(["sudo", "./scripts/lib/build-pgroonga"])
run(["sudo", "-H", "/usr/%s/bin/postgresql-%s-setup" % (postgres_dir, POSTGRES_VERSION), "initdb"])
# Use vendored pg_hba.conf instead
pg_hba_conf = "/var/lib/pgsql/%s/data/pg_hba.conf" % (POSTGRES_VERSION,)