From 52d9041d9feb39fcdc7151ed9b76e27c699e2658 Mon Sep 17 00:00:00 2001 From: Chris Sharp Date: Wed, 9 Sep 2015 08:49:03 -0400 Subject: [PATCH] LP#1493824 - Add PostgreSQL 9.4 Support to Ubuntu Trusty PostgreSQL 9.4 brings a number of desirable features for Evergreen system administrators (release notes: http://www.postgresql.org/docs/9.4/static/release-9-4.html). This adds the PostgreSQL APT repository to your Ubuntu 14.04 system and installs 9.4 instead of the default packaged 9.3. Signed-off-by: Chris Sharp --- Open-ILS/src/extras/Makefile.install | 2 ++ Open-ILS/src/extras/install/Makefile.debian | 9 +++++++++ Open-ILS/src/extras/install/Makefile.ubuntu-trusty | 16 ++++++++++++++++ docs/installation/server_installation.txt | 2 ++ 4 files changed, 29 insertions(+) diff --git a/Open-ILS/src/extras/Makefile.install b/Open-ILS/src/extras/Makefile.install index 3356b9f2c4..7dbf23d01c 100644 --- a/Open-ILS/src/extras/Makefile.install +++ b/Open-ILS/src/extras/Makefile.install @@ -82,6 +82,8 @@ postgres-server-debian-squeeze: @make -f $(DIR)/Makefile.debian-squeeze install_postgres_server postgres-server-ubuntu-trusty: @make -f $(DIR)/Makefile.ubuntu-trusty install_postgres_server +postgres-server-94-ubuntu-trusty: + @make -f $(DIR)/Makefile.ubuntu-trusty install_postgres_94_server postgres-server-ubuntu-precise: @make -f $(DIR)/Makefile.ubuntu-precise install_postgres_server postgres-server-fedora: diff --git a/Open-ILS/src/extras/install/Makefile.debian b/Open-ILS/src/extras/install/Makefile.debian index 495cdb2b34..5a22d8f599 100644 --- a/Open-ILS/src/extras/install/Makefile.debian +++ b/Open-ILS/src/extras/install/Makefile.debian @@ -1,6 +1,7 @@ # actions required by all debian-based OSs APT_TOOL=apt-get -yq +RELEASE_CODENAME=$(shell lsb_release -cs) install_debs: $(APT_TOOL) install $(DEBS) @@ -30,6 +31,14 @@ debian_sys_config: # refresh the dynamic library cache ldconfig +# Adding this for installing non-distro-specific versions of PostgreSQL. +# Initially only called by the ubuntu-trusty makefile.install for installing +# PostgreSQL 9.4, but adding to the common Debian file for future usage +debian_postgresql_repo: + echo "deb http://apt.postgresql.org/pub/repos/apt/ $(RELEASE_CODENAME)-pgdg main" > /etc/apt/sources.list.d/pgdg.list + wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add - + $(APT_TOOL) update + clean: echo "cleaning" diff --git a/Open-ILS/src/extras/install/Makefile.ubuntu-trusty b/Open-ILS/src/extras/install/Makefile.ubuntu-trusty index 49e0e77d91..0eaf23a9f6 100644 --- a/Open-ILS/src/extras/install/Makefile.ubuntu-trusty +++ b/Open-ILS/src/extras/install/Makefile.ubuntu-trusty @@ -101,6 +101,17 @@ PGSQL_SERVER_DEBS_93 = \ postgresql-plperl-9.3 \ postgresql-server-dev-9.3 +PGSQL_APT_REPO_DEBS = \ + wget \ + ca-certificates + +PGSQL_SERVER_DEBS_94 = \ + $(DEB_PGSQL_COMMON_MODS) \ + postgresql-9.4 \ + postgresql-contrib-9.4 \ + postgresql-plperl-9.4 \ + postgresql-server-dev-9.4 + # note: some prereqs are repeated in the developer/packager # sections to support building Evergreen packages on servers # where Evergreen and its prereqs are not installed. @@ -141,6 +152,11 @@ all: install_postgres_server: make -f $(DIR)/Makefile.debian DEBS="$(PGSQL_SERVER_DEBS_93)" +install_postgres_94_server: + make -f $(DIR)/Makefile.debian DEBS="$(PGSQL_APT_REPO_DEBS)" + make -f $(DIR)/Makefile.debian debian_postgresql_repo + make -f $(DIR)/Makefile.debian DEBS="$(PGSQL_SERVER_DEBS_94)" + # note: if/when grunt-cli and bower are available as # packages, use the packaged versions instead. install_developer: diff --git a/docs/installation/server_installation.txt b/docs/installation/server_installation.txt index d6a78d27fa..f25692e3f3 100644 --- a/docs/installation/server_installation.txt +++ b/docs/installation/server_installation.txt @@ -403,6 +403,8 @@ make -f Open-ILS/src/extras/Makefile.install postgres-server-debian-wheezy make -f Open-ILS/src/extras/Makefile.install postgres-server-debian-squeeze make -f Open-ILS/src/extras/Makefile.install postgres-server-ubuntu-precise make -f Open-ILS/src/extras/Makefile.install postgres-server-ubuntu-trusty +# to install PostgreSQL 9.4 on Ubuntu Trusty: +make -f Open-ILS/src/extras/Makefile.install postgres-server-94-ubuntu-trusty make -f Open-ILS/src/extras/Makefile.install postgres-server-fedora ------------------------------------------------------------------------------ -- 2.11.0