From 57f390e0b2c4e8e6927c131331e2209870315de8 Mon Sep 17 00:00:00 2001 From: Dan Scott Date: Mon, 25 Aug 2014 14:16:35 -0400 Subject: [PATCH] LP#1362210: Install PostgreSQL packages where we can Rather than relying on purely manual installation, carve out a common set of packages that are needed by both the Evergreen server and the standalone PostgreSQL server and add them as dependencies to both scenarios. In the worst case, the package manager will see a package that it has already installed and skip it (if the database server is on the same OS instance as the Evergreen server). It sure beats upgrading your database server and wondering why things like the addition of call numbers fails with database query errors when it turns out that you're missing the Library::CallNumber::LC Perl module :) It also makes the README shorter and requires fewer steps for users to follow to install successfully. Win win win? Signed-off-by: Dan Scott Signed-off-by: Ben Shum --- .../src/extras/install/Makefile.debian-jessie | 20 +++++++++++++------ .../src/extras/install/Makefile.debian-wheezy | 20 +++++++++++++------ Open-ILS/src/extras/install/Makefile.fedora | 17 +++++++++++----- .../extras/install/Makefile.ubuntu-precise | 18 ++++++++++++----- .../src/extras/install/Makefile.ubuntu-trusty | 20 +++++++++++++------ docs/installation/server_installation.txt | 15 ++------------ 6 files changed, 69 insertions(+), 41 deletions(-) diff --git a/Open-ILS/src/extras/install/Makefile.debian-jessie b/Open-ILS/src/extras/install/Makefile.debian-jessie index 6f550d3a22..56df1f7042 100644 --- a/Open-ILS/src/extras/install/Makefile.debian-jessie +++ b/Open-ILS/src/extras/install/Makefile.debian-jessie @@ -2,13 +2,25 @@ DIR = $(dir $(lastword $(MAKEFILE_LIST))) +export DEB_PGSQL_COMMON_MODS = \ + gcc \ + libbusiness-isbn-perl \ + libjson-xs-perl \ + liblibrary-callnumber-lc-perl \ + libmarc-record-perl \ + libmarc-xml-perl \ + librose-uri-perl \ + libuuid-tiny-perl \ + libxml-libxml-perl \ + libxml-libxslt-perl + export DEBS = \ + $(DEB_PGSQL_COMMON_MODS) \ apache2-prefork-dev\ aspell\ aspell-en\ libbusiness-creditcard-perl\ libbusiness-isbn-data-perl\ - libbusiness-isbn-perl\ libbusiness-issn-perl\ libbusiness-onlinepayment-authorizenet-perl\ libbusiness-onlinepayment-perl\ @@ -22,12 +34,9 @@ export DEBS = \ libemail-send-perl\ libemail-simple-perl\ libgd-graph3d-perl\ - liblibrary-callnumber-lc-perl \ liblocale-maketext-lexicon-perl\ liblog-log4perl-perl\ libmarc-charset-perl \ - libmarc-record-perl\ - libmarc-xml-perl \ libncurses5-dev\ libnet-ip-perl\ libnet-ldap-perl \ @@ -41,7 +50,6 @@ export DEBS = \ libparent-perl\ libpq5\ libpq-dev\ - librose-uri-perl\ librpc-xml-perl\ libspreadsheet-writeexcel-perl\ libsru-perl\ @@ -52,7 +60,6 @@ export DEBS = \ libtext-csv-perl\ libuniversal-require-perl\ libunix-syslog-perl\ - libuuid-tiny-perl\ libyaz-dev\ postgresql-client-9.3\ libsoap-lite-perl\ @@ -80,6 +87,7 @@ export CPAN_MODULES_FORCE = \ Class::DBI::Frozen::301 PGSQL_SERVER_DEBS_93 = \ + $(DEB_PGSQL_COMMON_MODS) \ postgresql-9.3 \ postgresql-contrib-9.3 \ postgresql-plperl-9.3 \ diff --git a/Open-ILS/src/extras/install/Makefile.debian-wheezy b/Open-ILS/src/extras/install/Makefile.debian-wheezy index d86beb61d7..317c8479a2 100644 --- a/Open-ILS/src/extras/install/Makefile.debian-wheezy +++ b/Open-ILS/src/extras/install/Makefile.debian-wheezy @@ -2,13 +2,25 @@ DIR = $(dir $(lastword $(MAKEFILE_LIST))) +export DEB_PGSQL_COMMON_MODS = \ + gcc \ + libbusiness-isbn-perl + libjson-xs-perl \ + liblibrary-callnumber-lc-perl \ + libmarc-record-perl \ + libmarc-xml-perl \ + librose-uri-perl \ + libuuid-tiny-perl + libxml-libxml-perl \ + libxml-libxslt-perl + export DEBS = \ + $(DEB_PGSQL_COMMON_MODS) \ apache2-prefork-dev\ aspell\ aspell-en\ libbusiness-creditcard-perl\ libbusiness-isbn-data-perl\ - libbusiness-isbn-perl\ libbusiness-issn-perl\ libbusiness-onlinepayment-authorizenet-perl\ libbusiness-onlinepayment-perl\ @@ -22,12 +34,9 @@ export DEBS = \ libemail-send-perl\ libemail-simple-perl\ libgd-graph3d-perl\ - liblibrary-callnumber-lc-perl \ liblocale-maketext-lexicon-perl\ liblog-log4perl-perl\ libmarc-charset-perl \ - libmarc-record-perl\ - libmarc-xml-perl \ libncurses5-dev\ libnet-ip-perl\ libnet-ldap-perl \ @@ -41,7 +50,6 @@ export DEBS = \ libparent-perl\ libpq5\ libpq-dev\ - librose-uri-perl\ librpc-xml-perl\ libsru-perl\ libssh2-1-dev\ @@ -51,7 +59,6 @@ export DEBS = \ libtext-csv-perl\ libuniversal-require-perl\ libunix-syslog-perl\ - libuuid-tiny-perl\ libyaz-dev\ postgresql-client-9.1\ libsoap-lite-perl\ @@ -80,6 +87,7 @@ export CPAN_MODULES_FORCE = \ Class::DBI::Frozen::301 PGSQL_SERVER_DEBS_91 = \ + $(DEB_PGSQL_COMMON_MODS) \ postgresql-9.1 \ postgresql-contrib-9.1 \ postgresql-plperl-9.1 \ diff --git a/Open-ILS/src/extras/install/Makefile.fedora b/Open-ILS/src/extras/install/Makefile.fedora index 4ace84215a..61de9df405 100644 --- a/Open-ILS/src/extras/install/Makefile.fedora +++ b/Open-ILS/src/extras/install/Makefile.fedora @@ -7,7 +7,18 @@ FEDORA=$(shell uname -r | grep "\.fc[0-9][0-9]\.") # Fedora 64-bit? FEDORA_64=$(shell uname -r | grep "\.fc[0-9][0-9]\.x86_64") +PGSQL_COMMON_RPMS = \ + gcc \ + perl-Business-ISBN \ + perl-Library-CallNumber-LC \ + perl-MARC-Record \ + perl-MARC-XML \ + perl-UUID-Tiny \ + perl-XML-LibXML \ + perl-XML-LibXSLT + FEDORA_RPMS = \ + $(PGSQL_COMMON_RPMS) \ aspell \ aspell-en \ bzip2-devel \ @@ -25,7 +36,6 @@ FEDORA_RPMS = \ ncurses-libs \ perl-parent \ perl-Business-CreditCard \ - perl-Business-ISBN \ perl-Business-ISBN-Data \ perl-CPAN \ perl-Crypt-SSLeay \ @@ -35,12 +45,9 @@ FEDORA_RPMS = \ perl-GDGraph3d \ perl-JSON-XS \ perl-LDAP \ - perl-Library-CallNumber-LC \ perl-Locale-Codes \ perl-Locale-Maketext-Lexicon \ perl-MARC-Charset \ - perl-MARC-Record \ - perl-MARC-XML \ perl-Module-Pluggable \ perl-Net-IP \ perl-Net-SSH2 \ @@ -53,7 +60,6 @@ FEDORA_RPMS = \ perl-Text-Aspell \ perl-Text-CSV \ perl-Text-CSV_XS \ - perl-UUID-Tiny \ perl-XML-Writer \ postgresql-devel \ readline-devel \ @@ -78,6 +84,7 @@ export CPAN_MODULES_FORCE = \ Business::OnlinePayment::PayPal PGSQL_FEDORA_RPMS = \ + $(PGSQL_COMMON_RPMS) \ postgresql \ postgresql-contrib \ postgresql-libs \ diff --git a/Open-ILS/src/extras/install/Makefile.ubuntu-precise b/Open-ILS/src/extras/install/Makefile.ubuntu-precise index 3e62a0fc1e..d62655f90b 100644 --- a/Open-ILS/src/extras/install/Makefile.ubuntu-precise +++ b/Open-ILS/src/extras/install/Makefile.ubuntu-precise @@ -2,14 +2,25 @@ DIR = $(dir $(lastword $(MAKEFILE_LIST))) +export DEB_PGSQL_COMMON_MODS = \ + gcc \ + libbusiness-isbn-perl \ + libjson-xs-perl \ + liblibrary-callnumber-lc-perl \ + libmarc-record-perl \ + libmarc-xml-perl \ + libuuid-tiny-perl \ + libxml-libxml-perl \ + libxml-libxslt-perl + export DEBS = \ + $(DEB_PGSQL_COMMON_MODS) \ apache2-prefork-dev\ aspell\ aspell-en\ libbusiness-creditcard-perl\ libbusiness-edi-perl \ libbusiness-isbn-data-perl\ - libbusiness-isbn-perl\ libbusiness-issn-perl\ libbusiness-onlinepayment-authorizenet-perl\ libbusiness-onlinepayment-perl\ @@ -25,12 +36,9 @@ export DEBS = \ libemail-send-perl\ libemail-simple-perl\ libgd-graph3d-perl\ - liblibrary-callnumber-lc-perl \ liblocale-maketext-lexicon-perl\ liblog-log4perl-perl\ libmarc-charset-perl \ - libmarc-record-perl\ - libmarc-xml-perl \ libncurses5-dev\ libnet-https-any-perl \ libnet-ip-perl\ @@ -52,7 +60,6 @@ export DEBS = \ libtext-csv-perl\ libuniversal-require-perl\ libunix-syslog-perl\ - libuuid-tiny-perl\ libyaz-dev\ postgresql-client-9.1\ libsoap-lite-perl\ @@ -84,6 +91,7 @@ export CPAN_MODULES_FORCE = \ Class::DBI::Frozen::301 PGSQL_SERVER_DEBS_91 = \ + $(DEB_PGSQL_COMMON_MODS) \ postgresql-9.1 \ postgresql-contrib-9.1 \ postgresql-plperl-9.1 \ diff --git a/Open-ILS/src/extras/install/Makefile.ubuntu-trusty b/Open-ILS/src/extras/install/Makefile.ubuntu-trusty index ea40ca53fb..fb8da3ca0d 100644 --- a/Open-ILS/src/extras/install/Makefile.ubuntu-trusty +++ b/Open-ILS/src/extras/install/Makefile.ubuntu-trusty @@ -2,14 +2,26 @@ DIR = $(dir $(lastword $(MAKEFILE_LIST))) +export DEB_PGSQL_COMMON_MODS = \ + gcc \ + libbusiness-isbn-perl \ + libjson-xs-perl \ + liblibrary-callnumber-lc-perl \ + libmarc-record-perl \ + libmarc-xml-perl \ + librose-uri-perl \ + libuuid-tiny-perl \ + libxml-libxml-perl \ + libxml-libxslt-perl + export DEBS = \ + $(DEB_PGSQL_COMMON_MODS) \ apache2-prefork-dev\ aspell\ aspell-en\ libbusiness-creditcard-perl\ libbusiness-edi-perl \ libbusiness-isbn-data-perl\ - libbusiness-isbn-perl\ libbusiness-issn-perl\ libbusiness-onlinepayment-authorizenet-perl\ libbusiness-onlinepayment-perl\ @@ -26,12 +38,9 @@ export DEBS = \ libemail-simple-perl\ libexcel-writer-xlsx-perl\ libgd-graph3d-perl\ - liblibrary-callnumber-lc-perl \ liblocale-maketext-lexicon-perl\ liblog-log4perl-perl\ libmarc-charset-perl \ - libmarc-record-perl\ - libmarc-xml-perl \ libncurses5-dev\ libnet-https-any-perl \ libnet-ip-perl\ @@ -46,7 +55,6 @@ export DEBS = \ libbz2-dev \ libpq5\ libpq-dev\ - librose-uri-perl\ librpc-xml-perl\ libsru-perl\ libssh2-1-dev\ @@ -56,7 +64,6 @@ export DEBS = \ libtext-csv-perl\ libuniversal-require-perl\ libunix-syslog-perl\ - libuuid-tiny-perl\ libyaz-dev\ postgresql-client-9.3\ libsoap-lite-perl\ @@ -88,6 +95,7 @@ export CPAN_MODULES_FORCE = \ Class::DBI::Frozen::301 PGSQL_SERVER_DEBS_93 = \ + $(DEB_PGSQL_COMMON_MODS) \ postgresql-9.3 \ postgresql-contrib-9.3 \ postgresql-plperl-9.3 \ diff --git a/docs/installation/server_installation.txt b/docs/installation/server_installation.txt index 0502f1da22..ef59df997f 100644 --- a/docs/installation/server_installation.txt +++ b/docs/installation/server_installation.txt @@ -390,27 +390,16 @@ distribution as the *root* Linux account: .(Ubuntu Precise) [source,bash] --------------------------------------------------------------------------------- -apt-get install gcc libxml-libxml-perl libxml-libxslt-perl libbusiness-isbn-perl -apt-get install libjson-xs-perl liblibrary-callnumber-lc-perl libmarc-record-perl -apt-get install libmarc-xml-perl libuuid-tiny-perl cpan Rose::URI --------------------------------------------------------------------------------- .(Debian "wheezy" and Ubuntu Trusty) -standalone PostgreSQL 9 server -[source,bash] ---------------------------------------------------------------------------------- -apt-get install gcc libxml-libxml-perl libxml-libxslt-perl libbusiness-isbn-perl -apt-get install libjson-xs-perl liblibrary-callnumber-lc-perl libmarc-record-perl -apt-get install libmarc-xml-perl libuuid-tiny-perl librose-uri-perl ---------------------------------------------------------------------------------- +No extra modules required for these distributions. .(Fedora) [source, bash] ------------------------------------------------------------------------------ -yum install gcc perl-XML-LibXML perl-XML-LibXSLT perl-Business-ISBN -yum install perl-Library-CallNumber-LC perl-MARC-Record perl-MARC-Charset -yum install perl-MARC-File-XML perl-UUID-Tiny +cpan Rose::URI ------------------------------------------------------------------------------ You need to create a PostgreSQL superuser to create and access the database. -- 2.43.2