diff --git a/postgresql-12-A4.pdf b/postgresql-12-A4.pdf new file mode 100644 index 0000000000000000000000000000000000000000..386f8fb4f7f2c45ef4f57bea4306f95dcfb042c5 Binary files /dev/null and b/postgresql-12-A4.pdf differ diff --git a/postgresql-12-Makefile.regress b/postgresql-12-Makefile.regress new file mode 100644 index 0000000000000000000000000000000000000000..09b8811d2ec994d24e96c2f74c05ad7ea6a44673 --- /dev/null +++ b/postgresql-12-Makefile.regress @@ -0,0 +1,69 @@ +# +# Simplified makefile for running the PostgreSQL regression tests +# in an RPM installation +# + +# maximum simultaneous connections for parallel tests +MAXCONNOPT = +ifdef MAX_CONNECTIONS +MAXCONNOPT += --max-connections=$(MAX_CONNECTIONS) +endif + +# locale +NOLOCALE = +ifdef NO_LOCALE +NOLOCALE += --no-locale +endif + +srcdir := . + +REGRESS_OPTS += --dlpath=. + +pg_regress_locale_flags = $(if $(ENCODING),--encoding=$(ENCODING)) $(NOLOCALE) + +pg_regress_installcheck = ./pg_regress --inputdir=$(srcdir) --bindir='/usr/pgsql-12/bin/' $(pg_regress_locale_flags) + +# Test input and expected files. These are created by pg_regress itself, so we +# don't have a rule to create them. We do need rules to clean them however. +ifile_list := $(subst .source,, $(notdir $(wildcard $(srcdir)/input/*.source))) +input_files := $(foreach file, $(ifile_list), sql/$(file).sql) +ofile_list := $(subst .source,, $(notdir $(wildcard $(srcdir)/output/*.source))) +output_files := $(foreach file, $(ofile_list), expected/$(file).out) + +abs_srcdir := $(shell pwd) +abs_builddir := $(shell pwd) + +check: installcheck-parallel + +installcheck: cleandirs + $(pg_regress_installcheck) $(REGRESS_OPTS) --schedule=$(srcdir)/parallel_schedule --max-connections=1 $(EXTRA_TESTS) + +installcheck-parallel: cleandirs + $(pg_regress_installcheck) $(REGRESS_OPTS) --schedule=$(srcdir)/parallel_schedule $(MAXCONNOPT) $(EXTRA_TESTS) + +# The tests command the server to write into testtablespace and results. +# On a SELinux-enabled system this will fail unless we mark those directories +# as writable by the server. +cleandirs: + -rm -rf testtablespace results + mkdir testtablespace results + if test -x /usr/bin/chcon && ! test -f /.dockerenv; then \ + /usr/bin/chcon -u system_u -r object_r -t postgresql_db_t testtablespace results ; \ + fi + +# old interfaces follow... + +runcheck: check +runtest: installcheck +runtest-parallel: installcheck-parallel + + +## +## Clean up +## + +clean distclean maintainer-clean: + rm -f $(output_files) $(input_files) + rm -rf testtablespace + rm -rf results tmp_check log + rm -f regression.diffs regression.out regress.out run_check.out diff --git a/postgresql-12-README-systemd.rpm-dist b/postgresql-12-README-systemd.rpm-dist new file mode 100644 index 0000000000000000000000000000000000000000..c5e3dfc98814feacacb1a01ce2594d7bd3aec3fc --- /dev/null +++ b/postgresql-12-README-systemd.rpm-dist @@ -0,0 +1,356 @@ +README.rpm-dist +----------------------------------------------------------------------------- +Version 12, for the PostgreSQL 12 RPM set. +Devrim Gündüz +----------------------------------------------------------------------------- + +Contents: + 1.) Introduction and QuickStart + 2.) Upgrading an installation + 3.) PostgreSQL RPM packages and rationale + 4.) Starting multiple postmasters + 5.) Regression Testing + 6.) Starting postmaster automatically on startup + 7.) Grand Unified Configuration(GUC) File + 8.) Logging set up + 9.) Rebuilding from the source RPM +10.) Contrib files +11.) Further Information Resource + +INTRODUCTION +----------------------------------------------------------------------------- +This document exists to explain the layout of the RPMs for PostgreSQL, to +describe various RPM specifics, and to document special features found +in the RPMset. + +This document is written to be applicable to version 12 of PostgreSQL, +which is the current version of the RPMs as of this writing. More to the +point, versions prior to 12 are not documented here. + +Official PostgreSQL Global Development Group RPMs carry a 'PGDG after the +release number. Other RPMsets as distributed with Linux distributions may +have a different release number and initials. + +If you want to stay up-to-date on the PostgreSQL core itself, you may +want to use PGDG set, instead of the binaries supplied by distribution. + +These RPMs do not support any sort of major version upgrading process +other than that documented in the regular documentation. That is, you +must dump, upgrade, initdb, and restore your data if you are +performing a major version update. This is not needed for minor version +updates. + +QUICKSTART (note that this requires postgresql12-server installed) +----------------------------------------------------------------------------- +For a fresh installation, you will need to initialize the cluster first. Run: + + /usr/pgsql-12/bin/postgresql-12-setup initdb + +as root, and it will prepare a new database cluster for you. Then you will +need to start PostgreSQL. Again as root, run: + + systemctl start postgresql-12.service + +You will probably also want to do + + systemctl enable postgresql-12.service + +so that the postmaster is automatically started during future reboots. + +These commands will start a postmaster that will listen on localhost and Unix +socket 5432 only. Edit /var/lib/pgsql/12/data/postgresql.conf and pg_hba.conf +if you want to allow remote access -- see the section on Grand Unified +Configuration. + +The file /var/lib/pgsql/12/.bash_profile is packaged to help with the +setting of environment variables. Users should not edit this file, because +it may be overwritten during every new installation. However, you can create +~/.pgsql_profile file, and add your customizations there. + +The user 'postgres' is created during installation of the server subpackage. +This user by default is UID and GID 26. The user has the default shell set to +bash, and the home directory set to /var/lib/pgsql. This user also has no +default password. If you want to be able to su to it from a non-root account +or login as 'postgres' you will need to set a password using passwd. + +In the default installation, only postgres user is allowed to access to +the database server, because initdb in the RPMs pick up "peer" auth +method in the RPMs. + +All the binaries are installed under /usr/pgsql-12/bin. However, the +tools that are compatible with the previous releases are symlinked under +/usr/bin directory. Please note that RPMs are using alternatives method +in here, so whenever a newer major version is installed, symlinks will +point to the new version. Here is the current list of the binaries that +are under $PATH: + +- clusterdb +- createdb +- createuser +- dropdb +- dropuser +- pg_basebackup +- pg_dump +- pg_dumpall +- pg_restore +- psql +- reindexdb +- vacuumdb + +You may want to add /usr/pgsql-12/bin to your $PATH variable in +/etc/profile, if you want to use them easily. However, please note that +this may lead to some unintentional side effects, so be careful. + + +UPGRADING AN INSTALLATION +----------------------------------------------------------------------------- +For a minor-version upgrade (such as 12.1 to 12.2), just install the +new RPMs; there's usually nothing more to it than that. Upgrading +across a major release of PostgreSQL (for example, from 9.2.x to 12.x) +requires more effort. + +If you are upgrading across more than one major release of PostgreSQL +(for example, from 9.1.x to 12.x), you will need to follow the "traditional" +dump and reload process to bring your data into the new version. That is: +*before* upgrading, run pg_dumpall to extract all your data into a SQL file. +Shut down the old postmaster, upgrade to the new version RPMs, initdb, +and run the dump file through psql to restore your data. + +RPMs also support in-place upgrade from the immediately previous major release. +Currently, you can upgrade in-place from 11.x to 12.x. Just run: + +$ /usr/pgsql-12/bin/postgresql-12-setup upgrade + +Please note that 11 and 12 contrib RPMs need to be installed for this feature +to work. You can also upgrade from other major versions either by editing the +setup script, or passing PostgreSQL major version as the 3rd argument to the +setup script. + +POSTGRESQL RPM PACKAGES AND RATIONALE. +----------------------------------------------------------------------------- +PostgreSQL is split up into multiple packages so that users can 'pick and +choose' what pieces are needed, and what dependencies are required. + +The RPMset is packaged in the following subpackages: + +postgresql12: Key clients and libraries, and documentation +postgresql12-server: Server executables and data files +postgresql12-devel: Development libraries and include files +postgresql12-test: The regression tests and associated files +postgresql12-libs: Client shared libraries +postgresql12-docs: Extra documentation, such as the tutorial files +postgresql12-contrib: The contrib source tree, as well as selected binaries +postgresql12-plperl: PL/Perl procedural language +postgresql12-plpython: PL/Python procedural language +postgresql12-pltcl: PL/Tcl procedural language + +postgresql12-jdbc, postgresql12-python, postgresql12-tcl and postgresql12-odbc have +been splitted into seperate (s)rpms. + +You have to install postgresql and postgresql12-libs to do anything. +postgresql12-server is needed unless you only plan to use the clients to work +with a remote PostgreSQL server. The others are optional. + +postgresql12-python package includes PyGreSQL, and Pgtcl is distributed +via postgresql12-tcl package. + +RPM FILE LOCATIONS. +----------------------------------------------------------------------------- +To be in compliance with the Linux FHS, the PostgreSQL RPMs install files in +a manner not consistent with most of the PostgreSQL documentation. According +to the standard PostgreSQL documentation, PostgreSQL is installed under the +directory /usr/local/pgsql, with executables, source, and data existing in +various subdirectories. + +Different distributions have different ideas of some of these file locations. +In particular, the documentation directory can be /usr/doc, /usr/doc/packages, +/usr/share/doc, /usr/share/doc/packages, or some other similar path. + +However, the Red Hat / Scientific Linux ( CentOS / Fedora RPM's install +the files like this: + +Executables: /usr/bin and /usr/pgsql-12/bin +Libraries: /usr/pgsql-12/lib +Documentation: /usr/pgsql-12/doc +Contrib documentation: /usr/pgsql-12/doc +Source: not installed +Data: /var/lib/pgsql/12/data +Backup area: /var/lib/pgsql/12/backups +Templates: /usr/pgsql-12/share +Procedural Languages: /usr/pgsql-12/lib +Development Headers: /usr/pgsql-12/include +Other shared data: /usr/pgsql-12/share +Regression tests: /usr/pgsql-12/lib/test + +While it may seem gratuitous to place these files in different locations, the +FHS requires it -- distributions should not ever touch /usr/local. It may +also seem like more work to keep track of where everything is -- but, that's +the beauty of RPM -- you don't have to keep track of the files, RPM does it +for you. + +These RPMs are designed to be LSB-compliant -- if you find this not to be the +case, please let us know by way of the pgsql-pkg-yum@postgresql.org +mailing list. + +------------------------------------------------------------------------------- +MULTIPLE POSTMASTERS (For the same PostgreSQL version) +------------------------------------------------------------------------------- +The postgresql-server RPM contains a 'unit file' that is used to start the +postmaster. The current version of this script has logic to be able to start +multiple postmasters, with different data areas, listening on different ports, +etc. To use this functionality requires root access. + +Here are the steps: + +1.) First, you will need to create a new unit file for the new cluster. + You can give any name in here. To distinguish the cluster, you can + add the service name or port value to the unit file name: + + cp /lib/systemd/system/postgresql-12.service /etc/systemd/system/postgresql-12-secondary.service + +2.) Edit this file, and change PGDATA. Please note that you can give + any directory name in here that postgres can access. You don't + have to create this directory now, it will be created in the next step: + + Environment=PGDATA=/var/lib/pgsql/12/data-secondary + +3.) Initialize the cluster: + + /usr/pgsql-12/bin/postgresql-12-setup initdb postgresql-12-secondary + +4.) Edit postgresql.conf to change the port, address, tcpip settings, etc. + +5.) Start the postmaster with 'systemctl start postgresql-12-secondary.service' + +When doing a major-version upgrade of a secondary postmaster, mention the +service name in the postgresql-12-setup command, for example 'postgresql-12-setup +upgrade secondary'. This will let postgresql-12-setup find the correct data +directory from the service file. + +REGRESSION TESTING +------------------------------------------------------------------------------- +If you install the postgresql-test RPM then you can run the PostgreSQL +regression tests. These tests stress your database installation and produce +results that give you assurances that the installation is complete, and that +your database machine is up to the task. + +To run the regression tests under the RPM installation, make sure that the +postmaster has been started (if not, su to root and do "systemctl start +postgresql-12.service"), cd to /usr/pgsql-12/lib/test/regress, su to +postgres, and execute "make check". This command will start the +regression tests and will both show the results to the screen and store +the results in the file regress.out. + +If any tests fail, see the file regression.diffs in that directory for details, +and read the "Regression Tests" section of the PostgreSQL documentation to +find out whether the differences are actually significant. If you need help +interpreting the results, contact the pgsql-general list at +postgresql.org. + +After testing, say "make clean" to remove the files generated by the test +script. + +STARTING POSTMASTER AUTOMATICALLY AT SYSTEM STARTUP +------------------------------------------------------------------------------- +Fedora / Red Hat / CentOS use the systemd package to manage server startup. +A systemd unit file for PostgreSQL is provided in the server package, as +/lib/systemd/system/postgresql-12.service. To start the postmaster manually, +as root run + systemctl start postgresql-12.service +To shut the postmaster down, + systemctl stop postgresql-12.service +These two commands only change the postmaster's current status. If you +want the postmaster to be started automatically during future system startups, +run + systemctl enable postgresql-12.service +To undo that again, + systemctl disable postgresql-12.service +See "man systemctl" for other possible subcommands. + +GRAND UNIFIED CONFIGURATION (GUC) FILE +------------------------------------------------------------------------------- +The PostgreSQL server has many tunable parameters -- the file +/var/lib/pgsql/12/data/postgresql.conf is the master configuration file for the +whole system. + +The RPM ships with a mostly-default file -- you will need to tune the +parameters for your installation. In particular, you might want to allow +nonlocal TCP/IP socket connections -- in order to allow these, you will need +to edit the postgresql.conf file. The line in question contains the string +'listen_addresses' -- you need to both uncomment the line and set the value +to '*' to get the postmaster to accept nonlocal connections. You'll also need +to adjust pg_hba.conf appropriately. + +LOGGING SET UP +------------------------------------------------------------------------------- +By default, the postmaster's stderr log is directed into files placed in a +log subdirectory of the data directory (ie, /var/lib/pgsql/12/data/log). +The out-of-the-box configuration rotates among seven files, one for each +day of the week. You can adjust this by changing postgresql.conf settings. + +REBUILDING FROM SOURCE RPM +------------------------------------------------------------------------------- +If your distribution is not supported by the binary RPMs from PostgreSQL.org, +you will need to rebuild from the source RPM. Download the .src.rpm for this +release. You will need to be root to rebuild, unless you have set up +a non-root build environment (which is the recommended method anyway). + +Install the source RPM with rpm -i, then cd to the rpm building area +(which is /usr/src/redhat by default). You will have to have a full +development environment to rebuild the full RPM set. + +This release of the RPMset includes the ability to conditionally build +sets of packages. The parameters, their defaults, and the meanings are: + +beta 0 #build with cassert and do not strip the binaries +llvm 1 #build with llvm support +python 1 #build the postgresql-python package. +tcl 1 #build the postgresql-tcl package. +test 1 #build the postgresql-test package. +plpython 1 #build the PL/Python procedural language package. +pltcl 1 #build the PL/Tcl procedural language package. +plperl 1 #build the PL/Perl procedural language package. +ssl 1 #use OpenSSL support. +kerberos 1 #use Kerberos 5 support. +nls 1 #build with national language support. +ldap 1 #build with LDAP support. +pam 1 #build with PAM support. +runselftest 1 #do "make check" during the build. +sdt 1 #build with SystemTap support. +xml 1 #build with XML support +pgfts 1 #build with --enable-thread-safety +uuid 1 #build contrib/uuid-ossp + +To use these defines, invoke a rebuild like this: +rpmbuild --rebuild --define 'python 0' --define 'tcl 0' \ + --define 'test 0' --define 'runselftest 0' --define 'kerberos 0' \ + postgresql12-12.3-1PGDG.rhel7.src.rpm +This line would disable the python, tcl, and test subpackages, disable +the regression test run during build, and disable kerberos support. + +You might need to disable runselftest if there is an installed version of +PostgreSQL that is a different major version from what you are trying to +build. The self test tends to pick up the installed libpq.so shared library +in place of the one being built :-(, so if that isn't compatible the test will +fail. Also, you can't use runselftest when doing the build as root. + +More of these conditionals will be added in the future. + +CONTRIB FILES +------------------------------------------------------------------------------- +The contents of the contrib tree are packaged into the -contrib subpackage +and are processed with make and make install. Most of the modules are in +/usr/pgsql-12/lib for loadable modules, and binaries are in +/usr/pgsql-12/bin. In the future these files may be split out, +depending upon function and dependencies. + + +MORE INFORMATION +------------------------------------------------------------------------------- +You can get more information at http://www.postgresql.org and +https://yum.postgresql.org + +Please help make this packaging better -- let us know if you find problems, or +better ways of doing things. You can reach us by e-mail at +pgsql-pkg-yum@lists.postgresql.org +------------------------------------------------------------------------------- diff --git a/postgresql-12-check-db-dir b/postgresql-12-check-db-dir new file mode 100644 index 0000000000000000000000000000000000000000..f556fa9618cc600df8f2beb33c0add71f8c3bae7 --- /dev/null +++ b/postgresql-12-check-db-dir @@ -0,0 +1,57 @@ +#!/bin/sh + +# This script verifies that the postgresql data directory has been correctly +# initialized. We do not want to automatically initdb it, because that has +# a risk of catastrophic failure (ie, overwriting a valuable database) in +# corner cases, such as a remotely mounted database on a volume that's a +# bit slow to mount. But we can at least emit a message advising newbies +# what to do. + +PGDATA="$1" + +if [ -z "$PGDATA" ] +then + echo "Usage: $0 database-path" + exit 1 +fi + +# PGVERSION is the full package version, e.g., 12.0 +# Note: the specfile inserts the correct value during package build +PGVERSION=xxxx +# PGMAJORVERSION is major version, e.g., 9.6 (this should match PG_VERSION) +PGMAJORVERSION=`echo "$PGVERSION" | sed 's/^\([0-9]*\.[0-9]*\).*$/\1/'` +# PREVMAJORVERSION is the previous major version, e.g., 9.5, for upgrades +# Note: the specfile inserts the correct value during package build +PREVMAJORVERSION=xxxx +# PGDOCDIR is the directory containing the package's documentation +# Note: the specfile inserts the correct value during package build +PGDOCDIR=xxxx + +# Check for the PGDATA structure +if [ -f "$PGDATA/PG_VERSION" ] && [ -d "$PGDATA/base" ] +then + # Check version of existing PGDATA + if [ x`cat "$PGDATA/PG_VERSION"` = x"$PGMAJORVERSION" ] + then + : A-OK + elif [ x`cat "$PGDATA/PG_VERSION"` = x"$PREVMAJORVERSION" ] + then + echo $"An old version of the database format was found." + echo $"Use \"postgresql-setup upgrade\" to upgrade to version $PGMAJORVERSION." + echo $"See $PGDOCDIR/README.rpm-dist for more information." + exit 1 + else + echo $"An old version of the database format was found." + echo $"You need to dump and reload before using PostgreSQL $PGMAJORVERSION." + echo $"See $PGDOCDIR/README.rpm-dist for more information." + exit 1 + fi +else + # No existing PGDATA! Warn the user to initdb it. + echo $"\"$PGDATA\" is missing or empty." + echo $"Use \"/usr/pgsql-12/bin/postgresql-12-setup initdb\" to initialize the database cluster." + echo $"See $PGDOCDIR/README.rpm-dist for more information." + exit 1 +fi + +exit 0 diff --git a/postgresql-12-ecpg_config.h b/postgresql-12-ecpg_config.h new file mode 100644 index 0000000000000000000000000000000000000000..6fecfcb513ceb990c610157ebef0b0b60f2abbc1 --- /dev/null +++ b/postgresql-12-ecpg_config.h @@ -0,0 +1,29 @@ +/* + * Kluge to support multilib installation of both 32- and 64-bit RPMS: + * we need to arrange that header files that appear in both RPMs are + * identical. Hence, this file is architecture-independent and calls + * in an arch-dependent file that will appear in just one RPM. + * + * To avoid breaking arches not explicitly supported by Red Hat, we + * use this indirection file *only* on known multilib arches. + * + * Note: this may well fail if user tries to use gcc's -I- option. + * But that option is deprecated anyway. + */ +#if defined(__x86_64__) +#include "ecpg_config_x86_64.h" +#elif defined(__i386__) +#include "ecpg_config_i386.h" +#elif defined(__ppc64__) || defined(__powerpc64__) +#include "ecpg_config_ppc64.h" +#elif defined(__ppc__) || defined(__powerpc__) +#include "ecpg_config_ppc.h" +#elif defined(__s390x__) +#include "ecpg_config_s390x.h" +#elif defined(__s390__) +#include "ecpg_config_s390.h" +#elif defined(__sparc__) && defined(__arch64__) +#include "ecpg_config_sparc64.h" +#elif defined(__sparc__) +#include "ecpg_config_sparc.h" +#endif diff --git a/postgresql-12-filter-requires-perl-Pg.sh b/postgresql-12-filter-requires-perl-Pg.sh new file mode 100755 index 0000000000000000000000000000000000000000..f37557f2dcc334ee2039bbc02de1b8895acf720a --- /dev/null +++ b/postgresql-12-filter-requires-perl-Pg.sh @@ -0,0 +1,3 @@ +#!/bin/sh + +/usr/lib/rpm/perl.req $* | grep -v 'perl(Pg' diff --git a/postgresql-12-libs.conf b/postgresql-12-libs.conf new file mode 100644 index 0000000000000000000000000000000000000000..b284f24ec9b744bc32dd66ff42ceb566e14e86a0 --- /dev/null +++ b/postgresql-12-libs.conf @@ -0,0 +1 @@ +/usr/pgsql-12/lib/ diff --git a/postgresql-12-logging.patch b/postgresql-12-logging.patch new file mode 100644 index 0000000000000000000000000000000000000000..1361796da4ddf9c08f9e95176e72bf663d5dee00 --- /dev/null +++ b/postgresql-12-logging.patch @@ -0,0 +1,54 @@ +--- src/backend/utils/misc/postgresql.conf.sample.old 2018-06-27 00:25:50.289570862 +0100 ++++ src/backend/utils/misc/postgresql.conf.sample 2018-06-27 00:26:02.151635283 +0100 +@@ -359,25 +359,25 @@ + + # - Where to Log - + +-#log_destination = 'stderr' # Valid values are combinations of ++log_destination = 'stderr' # Valid values are combinations of + # stderr, csvlog, syslog, and eventlog, + # depending on platform. csvlog + # requires logging_collector to be on. + + # This is used when logging to stderr: +-#logging_collector = off # Enable capturing of stderr and csvlog ++logging_collector = on # Enable capturing of stderr and csvlog + # into log files. Required to be on for + # csvlogs. + # (change requires restart) + + # These are only used if logging_collector is on: +-#log_directory = 'log' # directory where log files are written, ++log_directory = 'log' # directory where log files are written, + # can be absolute or relative to PGDATA +-#log_filename = 'postgresql-%Y-%m-%d_%H%M%S.log' # log file name pattern, ++log_filename = 'postgresql-%a.log' # log file name pattern, + # can include strftime() escapes + #log_file_mode = 0600 # creation mode for log files, + # begin with 0 to use octal notation +-#log_truncate_on_rotation = off # If on, an existing log file with the ++log_truncate_on_rotation = on # If on, an existing log file with the + # same name as the new log file will be + # truncated rather than appended to. + # But such truncation only occurs on +@@ -385,9 +385,9 @@ + # or size-driven rotation. Default is + # off, meaning append to existing files + # in all cases. +-#log_rotation_age = 1d # Automatic rotation of logfiles will ++log_rotation_age = 1d # Automatic rotation of logfiles will + # happen after that time. 0 disables. +-#log_rotation_size = 10MB # Automatic rotation of logfiles will ++log_rotation_size = 0 # Automatic rotation of logfiles will + # happen after that much log output. + # 0 disables. + +@@ -460,7 +460,7 @@ + #log_duration = off + #log_error_verbosity = default # terse, default, or verbose messages + #log_hostname = off +-#log_line_prefix = '%m [%p] ' # special values: ++log_line_prefix = '%m [%p] ' # special values: + # %a = application name + # %u = user name + # %d = database name diff --git a/postgresql-12-perl-rpath.patch b/postgresql-12-perl-rpath.patch new file mode 100644 index 0000000000000000000000000000000000000000..5ca28f5cffef9d4c154f823c7357c2c8a9d5e987 --- /dev/null +++ b/postgresql-12-perl-rpath.patch @@ -0,0 +1,12 @@ +--- src/pl/plperl/GNUmakefile.old 2018-06-27 00:27:01.614958217 +0100 ++++ src/pl/plperl/GNUmakefile 2018-06-27 00:27:15.660034493 +0100 +@@ -54,6 +54,9 @@ + + SHLIB_LINK = $(perl_embed_ldflags) + ++# Force rpath to be used even though we disable it everywhere else ++SHLIB_LINK += $(rpath) ++ + REGRESS_OPTS = --dbname=$(PL_TESTDB) --load-extension=plperl --load-extension=plperlu + REGRESS = plperl plperl_lc plperl_trigger plperl_shared plperl_elog plperl_util plperl_init plperlu plperl_array plperl_call plperl_transaction + # if Perl can support two interpreters in one backend, diff --git a/postgresql-12-pg_config.h b/postgresql-12-pg_config.h new file mode 100644 index 0000000000000000000000000000000000000000..97ef2baa0755b8959689ccf90fcba0910e590fb7 --- /dev/null +++ b/postgresql-12-pg_config.h @@ -0,0 +1,29 @@ +/* + * Kluge to support multilib installation of both 32- and 64-bit RPMS: + * we need to arrange that header files that appear in both RPMs are + * identical. Hence, this file is architecture-independent and calls + * in an arch-dependent file that will appear in just one RPM. + * + * To avoid breaking arches not explicitly supported by Red Hat, we + * use this indirection file *only* on known multilib arches. + * + * Note: this may well fail if user tries to use gcc's -I- option. + * But that option is deprecated anyway. + */ +#if defined(__x86_64__) +#include "pg_config_x86_64.h" +#elif defined(__i386__) +#include "pg_config_i386.h" +#elif defined(__ppc64__) || defined(__powerpc64__) +#include "pg_config_ppc64.h" +#elif defined(__ppc__) || defined(__powerpc__) +#include "pg_config_ppc.h" +#elif defined(__s390x__) +#include "pg_config_s390x.h" +#elif defined(__s390__) +#include "pg_config_s390.h" +#elif defined(__sparc__) && defined(__arch64__) +#include "pg_config_sparc64.h" +#elif defined(__sparc__) +#include "pg_config_sparc.h" +#endif diff --git a/postgresql-12-rpm-pgsql.patch b/postgresql-12-rpm-pgsql.patch new file mode 100644 index 0000000000000000000000000000000000000000..276da8e82d2e1a570d546c8dc26ebb8b7ea31561 --- /dev/null +++ b/postgresql-12-rpm-pgsql.patch @@ -0,0 +1,55 @@ +--- src/Makefile.global.in.old 2018-03-11 21:25:30.148541091 +0000 ++++ src/Makefile.global.in 2018-03-11 21:26:00.365690496 +0000 +@@ -83,7 +83,7 @@ + # Installation directories + # + # These are set by the equivalent --xxxdir configure options. We +-# append "postgresql" to some of them, if the string does not already ++# append "pgsql" to some of them, if the string does not already + # contain "pgsql" or "postgres", in order to avoid directory clutter. + # + # In a PGXS build, we cannot use the values inserted into Makefile.global +@@ -104,14 +104,14 @@ + datadir := @datadir@ + ifeq "$(findstring pgsql, $(datadir))" "" + ifeq "$(findstring postgres, $(datadir))" "" +-override datadir := $(datadir)/postgresql ++override datadir := $(datadir)/pgsql + endif + endif + + sysconfdir := @sysconfdir@ + ifeq "$(findstring pgsql, $(sysconfdir))" "" + ifeq "$(findstring postgres, $(sysconfdir))" "" +-override sysconfdir := $(sysconfdir)/postgresql ++override sysconfdir := $(sysconfdir)/pgsql + endif + endif + +@@ -120,7 +120,7 @@ + pkglibdir = $(libdir) + ifeq "$(findstring pgsql, $(pkglibdir))" "" + ifeq "$(findstring postgres, $(pkglibdir))" "" +-override pkglibdir := $(pkglibdir)/postgresql ++override pkglibdir := $(pkglibdir)/pgsql + endif + endif + +@@ -129,7 +129,7 @@ + pkgincludedir = $(includedir) + ifeq "$(findstring pgsql, $(pkgincludedir))" "" + ifeq "$(findstring postgres, $(pkgincludedir))" "" +-override pkgincludedir := $(pkgincludedir)/postgresql ++override pkgincludedir := $(pkgincludedir)/pgsql + endif + endif + +@@ -138,7 +138,7 @@ + docdir := @docdir@ + ifeq "$(findstring pgsql, $(docdir))" "" + ifeq "$(findstring postgres, $(docdir))" "" +-override docdir := $(docdir)/postgresql ++override docdir := $(docdir)/pgsql + endif + endif + diff --git a/postgresql-12-setup b/postgresql-12-setup new file mode 100644 index 0000000000000000000000000000000000000000..17ac46926c114f34de68230e6e523706b385d651 --- /dev/null +++ b/postgresql-12-setup @@ -0,0 +1,293 @@ +#!/bin/sh +# +# postgresql-setup Initialization and upgrade operations for PostgreSQL + +# PGVERSION is the full package version, e.g., 12.0 +# Note: the specfile inserts the correct value during package build +PGVERSION=xxx +# PGMAJORVERSION is major version, e.g., 12 (this should match PG_VERSION) +PGMAJORVERSION=`echo "$PGVERSION" | sed 's/^\([0-9]*\.[0-9]*\).*$/\1/'` +# PGENGINE is the directory containing the postmaster executable +# Note: the specfile inserts the correct value during package build +PGENGINE=xxxx +# PREVMAJORVERSION is the previous major version, e.g., 10, for upgrades +PREVMAJORVERSION=xxx +# PREVPGENGINE is the directory containing the previous postmaster executable +PREVPGENGINE=/usr/pgsql-$PREVMAJORVERSION/bin +# PREVDATADIR is the directory containing the previous postmaster executable +PREVDATADIR=/var/lib/pgsql/$PREVMAJORVERSION/data + +# TODO: Provide a conf file that can override these settings + +# The second parameter is the new database version, i.e. $PGMAJORVERSION in this case. +# Use "postgresql-$PGMAJORVERSION" service, if not specified. +SERVICE_NAME="$2" +if [ x"$SERVICE_NAME" = x ] +then + SERVICE_NAME=postgresql-$PGMAJORVERSION +fi + +# The third parameter is the old database version, i.e. $PREVMAJORVERSION in this case. +# Use "postgresql-$PREVMAJORVERSION" service, if not specified. +OLD_SERVICE_NAME="$3" +if [ x"$OLD_SERVICE_NAME" = x ] +then + OLD_SERVICE_NAME=postgresql-$PREVMAJORVERSION +fi + +USAGE_STRING=$" +Usage: $0 {initdb|check_upgrade|upgrade} [SERVICE_NAME] + +Script is aimed to help sysadmin with basic database cluster administration. + +The SERVICE_NAME is used for selection of proper unit configuration file; For +more info and howto/when use this script please look at README.rpm-dist file. +The 'postgresql' string is used when no SERVICE_NAME is explicitly passed. + +Available operation mode: + initdb Create a new PostgreSQL database cluster. This is usually the + first action you perform after PostgreSQL server installation. + check_upgrade Checks whether the old cluster can be upgraded to the new version + or not. + upgrade Upgrade PostgreSQL database cluster to be usable with new + server. Use this if you upgraded your PostgreSQL server to + newer major version (currently from $PREVMAJORVERSION \ +to $PGMAJORVERSION). + +Environment: + PGSETUP_INITDB_OPTIONS Options carried by this variable are passed to + subsequent call of \`initdb\` binary (see man + initdb(1)). This variable is used also during + 'upgrade' mode because the new cluster is actually + re-initialized from the old one. + PGSETUP_PGUPGRADE_OPTIONS Options in this variable are passed next to the + subsequent call of \`pg_upgrade\`. For more info + about possible options please look at man + pg_upgrade(1). + PGSETUP_DEBUG Set to '1' if you want to see debugging output." + +# note that these options are useful at least for help2man processing +case "$1" in + --version) + echo "PostgreSQL setup script for version $PGVERSION" + exit 0 + ;; + --help|--usage) + echo "$USAGE_STRING" + exit 0 + ;; +esac + +# this parsing technique fails for PGDATA pathnames containing spaces, +# but there's not much I can do about it given systemctl's output format... +PGDATA=`systemctl show -p Environment "${SERVICE_NAME}.service" | + sed 's/^Environment=//' | tr ' ' '\n' | + sed -n 's/^PGDATA=//p' | tail -n 1` +if [ x"$PGDATA" = x ]; then + echo "failed to find PGDATA setting in ${SERVICE_NAME}.service" + exit 1 +fi + +# Find the unit file for new version. +if [ -f "/etc/systemd/system/${SERVICE_NAME}.service" ] +then + SERVICE_FILE="/etc/systemd/system/${SERVICE_NAME}.service" +elif [ -f "/usr/lib/systemd/system/${SERVICE_NAME}.service" ] +then + SERVICE_FILE="/usr/lib/systemd/system/${SERVICE_NAME}.service" +else + echo "Could not find systemd unit file ${SERVICE_NAME}.service" + exit 1 +fi + +# Log file for pg_upgrade +PGUPLOG=/var/lib/pgsql/$PGMAJORVERSION/pgupgrade.log +# Log file for initdb +PGLOG=/var/lib/pgsql/$PGMAJORVERSION/initdb.log + +export PGDATA + +# For SELinux we need to use 'runuser' not 'su' +if [ -x /sbin/runuser ] +then + SU=/sbin/runuser +else + SU=su +fi + +script_result=0 + +# code shared between initdb and upgrade actions +perform_initdb(){ + if [ ! -e "$PGDATA" ]; then + mkdir -p "$PGDATA" || return 1 + chown postgres:postgres "$PGDATA" + chmod go-rwx "$PGDATA" + fi + # Clean up SELinux tagging for PGDATA + [ -x /sbin/restorecon ] && /sbin/restorecon "$PGDATA" + + # Create the initdb log file if needed + if [ ! -e "$PGLOG" -a ! -h "$PGLOG" ]; then + touch "$PGLOG" || return 1 + chown postgres:postgres "$PGLOG" + chmod go-rwx "$PGLOG" + [ -x /sbin/restorecon ] && /sbin/restorecon "$PGLOG" + fi + + # Initialize the database + initdbcmd="$PGENGINE/initdb --pgdata='$PGDATA' --auth='ident'" + initdbcmd+=" $PGSETUP_INITDB_OPTIONS" + + $SU -l postgres -c "$initdbcmd" >> "$PGLOG" 2>&1 < /dev/null + + # Create directory for postmaster log files + mkdir "$PGDATA/log" + chown postgres:postgres "$PGDATA/log" + chmod go-rwx "$PGDATA/log" + [ -x /sbin/restorecon ] && /sbin/restorecon "$PGDATA/log" + + if [ -f "$PGDATA/PG_VERSION" ]; then + return 0 + fi + return 1 +} + +initdb(){ + if [ -f "$PGDATA/PG_VERSION" ]; then + echo $"Data directory is not empty!" + echo + script_result=1 + else + echo -n $"Initializing database ... " + if perform_initdb; then + echo $"OK" + else + echo $"failed, see $PGLOG" + script_result=1 + fi + echo + fi +} + +check_upgrade(){ + # must see previous version in PG_VERSION + if [ ! -f "$PREVDATADIR/PG_VERSION" -o \ + x`cat "$PREVDATADIR/PG_VERSION"` != x"$PREVMAJORVERSION" ] + then + echo + echo $"Cannot upgrade because the database in $PGDATA is not of" + echo $"compatible previous version $PREVMAJORVERSION." + echo + exit 1 + fi + + # Set up log file for pg_upgrade + rm -f "$PGUPLOG" + touch "$PGUPLOG" || exit 1 + chown postgres:postgres "$PGUPLOG" + chmod go-rwx "$PGUPLOG" + [ -x /sbin/restorecon ] && /sbin/restorecon "$PGUPLOG" + + # Make sure that the user initdb'ed the new cluster: + if [ ! -f "$PGDATA/PG_VERSION" ] + then + echo + echo $"Please initialize the new cluster before upgrading." + echo $"You can run this script with the ''initdb'' parameter:" + echo $"" + echo $"$PGENGINE/postgresql-$PGVERSION-setup initdb" + echo + exit 1 + fi + + # Copy the current pg_hba.conf file to new cluster: + + HBA_CONF_BACKUP_EXISTS=0 + + cp "$PREVDATADIR/pg_hba.conf" "$PGDATA/" + HBA_CONF_BACKUP_EXISTS=1 + + # For fluent upgrade 'postgres' user should be able to connect + # to any database without password. Temporarily, no other type + # of connection is needed. + echo "local all postgres peer" > "$PREVDATADIR/pg_hba.conf" + + echo -n $"Performing upgrade check: " + + # Do the upgrade + $SU -l postgres -c "$PGENGINE/pg_upgrade \ + '--old-bindir=$PREVPGENGINE' \ + '--new-bindir=$PGENGINE' \ + '--old-datadir=$PREVDATADIR' \ + '--new-datadir=$PGDATA' \ + --check \ + --user=postgres \ + $PGSETUP_PGUPGRADE_OPTIONS" \ + >> "$PGUPLOG" 2>&1 < /dev/null + if [ $? -ne 0 ]; then + # pg_upgrade failed + script_result=1 + fi + if [ $script_result -eq 0 ]; then + echo $"OK" + else + # Clean up after failure + echo "Upgrade failed. Removing the new cluster. Please re-initdb the new cluster." + rm -rf "$PGDATA" + echo $"failed" + fi + echo + echo $"See $PGUPLOG for details." +} + + +upgrade(){ +# Perform the upgrade check first: +check_upgrade + echo -n $"Upgrading database: " + + # Do the upgrade + $SU -l postgres -c "$PGENGINE/pg_upgrade \ + '--old-bindir=$PREVPGENGINE' \ + '--new-bindir=$PGENGINE' \ + '--old-datadir=$PREVDATADIR' \ + '--new-datadir=$PGDATA' \ + --link \ + --user=postgres \ + $PGSETUP_PGUPGRADE_OPTIONS" \ + >> "$PGUPLOG" 2>&1 < /dev/null + if [ $? -ne 0 ]; then + # pg_upgrade failed + script_result=1 + fi + if [ $script_result -eq 0 ]; then + echo $"OK" + echo + echo $"pg_hba.conf configuration file of the new cluster was replaced by the one in the old cluster." + else + # Clean up after failure + rm -rf "$PGDATA" + echo $"failed" + fi + echo + echo $"See $PGUPLOG for details." +} + +# See how we were called. +case "$1" in + initdb) + initdb + ;; + upgrade) + upgrade + ;; + check_upgrade) + check_upgrade + ;; + *) + echo >&2 "$USAGE_STRING" + exit 2 +esac + +exit $script_result diff --git a/postgresql-12-tmpfiles.d b/postgresql-12-tmpfiles.d new file mode 100644 index 0000000000000000000000000000000000000000..6c48e34ed1c10c66a651b98acadacb326fb3bacd --- /dev/null +++ b/postgresql-12-tmpfiles.d @@ -0,0 +1 @@ +d /run/postgresql 0755 postgres postgres - diff --git a/postgresql-12-var-run-socket.patch b/postgresql-12-var-run-socket.patch new file mode 100644 index 0000000000000000000000000000000000000000..d0e41f64a1c35d5b4e9e70ebff6ea6f439a96545 --- /dev/null +++ b/postgresql-12-var-run-socket.patch @@ -0,0 +1,47 @@ +Change the built-in default socket directory to be /var/run/postgresql. +For backwards compatibility with (probably non-libpq-based) clients that +might still expect to find the socket in /tmp, also create a socket in +/tmp. This is to resolve communication problems with clients operating +under systemd's PrivateTmp environment, which won't be using the same +global /tmp directory as the server; see bug #825448. + +Note that we apply the socket directory change at the level of the +hard-wired defaults in the C code, not by just twiddling the setting in +postgresql.conf.sample; this is so that the change will take effect on +server package update, without requiring any existing postgresql.conf +to be updated. (Of course, a user who dislikes this behavior can still +override it via postgresql.conf.) + +--- src/backend/utils/misc/guc.c.old 2018-03-11 21:29:26.190708175 +0000 ++++ src/backend/utils/misc/guc.c 2018-03-11 21:29:55.083851034 +0000 +@@ -3465,7 +3465,7 @@ + }, + &Unix_socket_directories, + #ifdef HAVE_UNIX_SOCKETS +- DEFAULT_PGSOCKET_DIR, ++ DEFAULT_PGSOCKET_DIR ", /tmp", + #else + "", + #endif +--- src/bin/initdb/initdb.c.old 2018-03-11 21:30:10.752928508 +0000 ++++ src/bin/initdb/initdb.c 2018-03-11 21:30:30.605026665 +0000 +@@ -1051,7 +1051,7 @@ + + #ifdef HAVE_UNIX_SOCKETS + snprintf(repltok, sizeof(repltok), "#unix_socket_directories = '%s'", +- DEFAULT_PGSOCKET_DIR); ++ DEFAULT_PGSOCKET_DIR ", /tmp"); + #else + snprintf(repltok, sizeof(repltok), "#unix_socket_directories = ''"); + #endif +--- src/include/pg_config_manual.h.old 2018-03-11 21:30:50.401124544 +0000 ++++ src/include/pg_config_manual.h 2018-03-11 21:31:08.775215393 +0000 +@@ -177,7 +177,7 @@ + * here's where to twiddle it. You can also override this at runtime + * with the postmaster's -k switch. + */ +-#define DEFAULT_PGSOCKET_DIR "/tmp" ++#define DEFAULT_PGSOCKET_DIR "/var/run/postgresql" + + /* + * This is the default event source for Windows event log. diff --git a/postgresql-12.14.tar.bz2 b/postgresql-12.14.tar.bz2 new file mode 100644 index 0000000000000000000000000000000000000000..45d5076fb7c44fa0d1b38b98ca55fb566ba9774f Binary files /dev/null and b/postgresql-12.14.tar.bz2 differ diff --git a/postgresql-12.pam b/postgresql-12.pam new file mode 100644 index 0000000000000000000000000000000000000000..1d785946d3fe6a7a77dbd83de624701afe94f06a --- /dev/null +++ b/postgresql-12.pam @@ -0,0 +1,3 @@ +#%PAM-1.0 +auth include password-auth +account include password-auth diff --git a/postgresql-12.service b/postgresql-12.service new file mode 100644 index 0000000000000000000000000000000000000000..50c1994dc760afdebaa4af7bb744083181a7e587 --- /dev/null +++ b/postgresql-12.service @@ -0,0 +1,57 @@ +# It's not recommended to modify this file in-place, because it will be +# overwritten during package upgrades. It is recommended to use systemd +# "dropin" feature; i.e. create file with suffix .conf under +# /etc/systemd/system/postgresql-12.service.d directory overriding the +# unit's defaults. You can also use "systemctl edit postgresql-12" +# Look at systemd.unit(5) manual page for more info. + +# Note: changing PGDATA will typically require adjusting SELinux +# configuration as well. + +# Note: do not use a PGDATA pathname containing spaces, or you will +# break postgresql-setup. +[Unit] +Description=PostgreSQL 12 database server +Documentation=https://www.postgresql.org/docs/12/static/ +After=syslog.target +After=network-online.target + +[Service] +Type=notify + +User=postgres +Group=postgres + +# Note: avoid inserting whitespace in these Environment= lines, or you may +# break postgresql-setup. + +# Location of database directory +Environment=PGDATA=/var/lib/pgsql/12/data/ + +# Where to send early-startup messages from the server (before the logging +# options of postgresql.conf take effect) +# This is normally controlled by the global default set by systemd +# StandardOutput=syslog + +# Disable OOM kill on the postmaster +OOMScoreAdjust=-1000 +Environment=PG_OOM_ADJUST_FILE=/proc/self/oom_score_adj +Environment=PG_OOM_ADJUST_VALUE=0 + +ExecStartPre=/usr/pgsql-12/bin/postgresql-12-check-db-dir ${PGDATA} +ExecStart=/usr/pgsql-12/bin/postmaster -D ${PGDATA} +ExecReload=/bin/kill -HUP $MAINPID +KillMode=mixed +KillSignal=SIGINT + +# Do not set any timeout value, so that systemd will not kill postmaster +# during crash recovery. +TimeoutSec=0 + +# 0 is the same as infinity, but "infinity" needs systemd 229 +TimeoutStartSec=0 + +TimeoutStopSec=1h + +[Install] +WantedBy=multi-user.target diff --git a/postgresql-12.spec b/postgresql-12.spec new file mode 100644 index 0000000000000000000000000000000000000000..c5636165dcd3c8f5dcb490bc6fa83989e7bd6c90 --- /dev/null +++ b/postgresql-12.spec @@ -0,0 +1,1818 @@ +%undefine _package_note_file + +# These are macros to be used with find_lang and other stuff +%global packageversion 120 +%global pgpackageversion 12 +%global pgmajorversion 12 +%global prevmajorversion 11 +%global sname postgresql +%global pgbaseinstdir /usr/pgsql-%{pgmajorversion} + +%global beta 0 +%{?beta:%global __os_install_post /usr/lib/rpm/brp-compress} + +# Macros that define the configure parameters: +%{!?kerbdir:%global kerbdir "/usr"} +%{!?disablepgfts:%global disablepgfts 0} + +%if 0%{?suse_version} >= 1315 +%{!?enabletaptests:%global enabletaptests 0} +%else +%{!?enabletaptests:%global enabletaptests 1} +%endif + +%{!?icu:%global icu 1} +%{!?kerberos:%global kerberos 1} +%{!?ldap:%global ldap 1} +%{!?nls:%global nls 1} +%{!?pam:%global pam 1} + +%if 0%{?fedora} >= 33 || 0%{?rhel} >= 9 || 0%{?suse_version} >= 1500 || 0%{?openEuler} +%{!?plpython2:%global plpython2 0} +%else +%{!?plpython2:%global plpython2 1} +%endif + +%if 0%{?rhel} && 0%{?rhel} < 7 +# RHEL 6 does not have Python 3 +%{!?plpython3:%global plpython3 0} +%else +# All Fedora releases now use Python3 +# Support Python3 on RHEL 7.7+ natively +# RHEL 8 uses Python3 +%{!?plpython3:%global plpython3 1} +%endif + +%if 0%{?suse_version} +%if 0%{?suse_version} <= 1315 +# Disable PL/Python 3 on SLES 12 +%{!?plpython3:%global plpython3 0} +%endif +%endif + +# This is the list of contrib modules that will be compiled with PY3 as well: +%global python3_build_list hstore_plpython jsonb_plpython ltree_plpython + +%{!?pltcl:%global pltcl 1} +%{!?plperl:%global plperl 1} +%{!?ssl:%global ssl 1} +%{!?test:%global test 1} +%{!?runselftest:%global runselftest 0} +%{!?uuid:%global uuid 1} +%{!?xml:%global xml 1} + +%if 0%{?rhel} && 0%{?rhel} <= 6 +%{!?systemd_enabled:%global systemd_enabled 0} +%else +%{!?systemd_enabled:%global systemd_enabled 1} +%endif + +%ifarch ppc64 ppc64le s390 s390x armv7hl + %{!?sdt:%global sdt 0} + %else + %if 0%{?rhel} && 0%{?rhel} <= 6 + %{!?sdt:%global sdt 0} + %else + %{!?sdt:%global sdt 1} + %endif +%endif + +%if 0%{?rhel} && 0%{?rhel} <= 6 + %{!?llvm:%global llvm 0} +%endif + +%ifarch ppc64 ppc64le s390 s390x armv7hl aarch64 + %if 0%{?rhel} && 0%{?rhel} == 7 + %{!?llvm:%global llvm 0} + %else + %{!?llvm:%global llvm 1} + %endif +%else + %{!?llvm:%global llvm 1} +%endif + +%if 0%{?rhel} && 0%{?rhel} <= 6 +%{!?selinux:%global selinux 0} +%else + %{!?selinux:%global selinux 1} +%endif + +%if 0%{?fedora} > 23 +%global _hardened_build 1 +%endif + +Summary: PostgreSQL client programs and libraries +Name: %{sname}%{pgmajorversion} +Version: 12.14 +Release: 1PGDG%{?dist} +License: PostgreSQL +Url: https://www.postgresql.org/ + +Source0: https://download.postgresql.org/pub/source/v%{version}/postgresql-%{version}.tar.bz2 +Source4: %{sname}-%{pgmajorversion}-Makefile.regress +Source5: %{sname}-%{pgmajorversion}-pg_config.h +%if %{systemd_enabled} +Source6: %{sname}-%{pgmajorversion}-README-systemd.rpm-dist +%else +Source6: %{sname}-%{pgmajorversion}-README-init.rpm-dist +%endif +Source7: %{sname}-%{pgmajorversion}-ecpg_config.h +Source9: %{sname}-%{pgmajorversion}-libs.conf +Source12: https://www.postgresql.org/files/documentation/pdf/%{pgpackageversion}/%{sname}-%{pgpackageversion}-A4.pdf +%if 0%{?suse_version} +Source14: %{sname}-%{pgmajorversion}.pam.suse +%else +Source14: %{sname}-%{pgmajorversion}.pam +%endif +Source16: %{sname}-%{pgmajorversion}-filter-requires-perl-Pg.sh +Source17: %{sname}-%{pgmajorversion}-setup +%if %{systemd_enabled} +Source10: %{sname}-%{pgmajorversion}-check-db-dir +Source18: %{sname}-%{pgmajorversion}.service +Source19: %{sname}-%{pgmajorversion}-tmpfiles.d +%else +Source3: %{sname}-%{pgmajorversion}.init +%endif + +Patch1: %{sname}-%{pgmajorversion}-rpm-pgsql.patch +Patch3: %{sname}-%{pgmajorversion}-logging.patch +Patch5: %{sname}-%{pgmajorversion}-var-run-socket.patch +Patch6: %{sname}-%{pgmajorversion}-perl-rpath.patch +%if 0%{?rhel} && 0%{?rhel} == 6 +# Revert aa2215d6b, as RHEL 6 uses Python 2.6. This patch is needed as of +# version 12.10: +Patch7: %{sname}-%{pgmajorversion}-rhel6-revert-aa2215d6b.patch +%endif + +BuildRequires: perl glibc-devel bison flex >= 2.5.31 pgdg-srpm-macros +BuildRequires: gcc-c++ +BuildRequires: perl(ExtUtils::MakeMaker) +BuildRequires: readline-devel zlib-devel >= 1.0.4 + +# This dependency is needed for Source 16: +%if 0%{?fedora} || 0%{?rhel} > 7 || 0%{?openEuler} +BuildRequires: perl-generators +%endif + +Requires: /sbin/ldconfig + +%if %icu +BuildRequires: libicu-devel +Requires: libicu +%endif + +%if %llvm +%if 0%{?rhel} && 0%{?rhel} == 7 +# Packages come from EPEL and SCL: +%ifarch aarch64 +BuildRequires: llvm-toolset-7.0-llvm-devel >= 7.0.1 llvm-toolset-7.0-clang >= 7.0.1 +%else +BuildRequires: llvm5.0-devel >= 5.0 llvm-toolset-7-clang >= 4.0.1 +%endif +%endif +%if 0%{?rhel} && 0%{?rhel} >= 8 || 0%{?openEuler} +# Packages come from Appstream: +BuildRequires: llvm-devel >= 8.0.1 clang-devel >= 8.0.1 +%endif +%if 0%{?fedora} +BuildRequires: llvm-devel >= 5.0 clang-devel >= 5.0 +%endif +%if 0%{?suse_version} >= 1315 && 0%{?suse_version} <= 1499 +BuildRequires: llvm6-devel clang6-devel +%endif +%if 0%{?suse_version} >= 1500 +BuildRequires: llvm13-devel clang13-devel +%endif +%endif + +%if %kerberos +BuildRequires: krb5-devel +BuildRequires: e2fsprogs-devel +%endif + +%if %ldap +%if 0%{?suse_version} +%if 0%{?suse_version} >= 1315 +BuildRequires: openldap2-devel +%endif +%else +BuildRequires: openldap-devel +%endif +%endif + +%if %nls +BuildRequires: gettext >= 0.10.35 +%endif + +%if %pam +BuildRequires: pam-devel +%endif + +%if %plperl +%if 0%{?rhel} && 0%{?rhel} >= 7 +BuildRequires: perl-ExtUtils-Embed +%endif +%if 0%{?fedora} >= 22 +BuildRequires: perl-ExtUtils-Embed +%endif +%endif + +%if %plpython2 +BuildRequires: python2-devel +%endif + +%if %plpython3 +BuildRequires: python3-devel +%endif + +%if %pltcl +BuildRequires: tcl-devel +%endif + +%if %sdt +BuildRequires: systemtap-sdt-devel +%endif + +%if %selinux +# All supported distros have libselinux-devel package: +BuildRequires: libselinux-devel >= 2.0.93 +# SLES: SLES 15 does not have selinux-policy package. Use +# it only on SLES 12: +%if 0%{?suse_version} >= 1315 && 0%{?suse_version} <= 1499 +BuildRequires: selinux-policy >= 3.9.13 +%endif +# RHEL/Fedora has selinux-policy: +%if 0%{?rhel} || 0%{?fedora} +BuildRequires: selinux-policy >= 3.9.13 +%endif +%endif + +%if %ssl +%if 0%{?suse_version} >= 1315 && 0%{?suse_version} <= 1499 +BuildRequires: libopenssl-devel +%else +BuildRequires: openssl-devel +%endif +%endif + +%if %uuid +%if 0%{?suse_version} +%if 0%{?suse_version} >= 1315 +BuildRequires: uuid-devel +%endif +%else +BuildRequires: libuuid-devel +%endif +%endif + +%if %xml +BuildRequires: libxml2-devel libxslt-devel +%endif + +%if %{systemd_enabled} +BuildRequires: systemd, systemd-devel +# We require this to be present for %%{_prefix}/lib/tmpfiles.d +Requires: systemd +%if 0%{?suse_version} +%if 0%{?suse_version} >= 1315 +Requires(post): systemd-sysvinit +%endif +%else +Requires(post): systemd-sysv +Requires(post): systemd +Requires(preun): systemd +Requires(postun): systemd +%endif +%else +Requires(post): chkconfig +Requires(preun): chkconfig +# This is for /sbin/service +Requires(preun): initscripts +Requires(postun): initscripts +%endif + +Requires: %{name}-libs%{?_isa} = %{version}-%{release} + +Requires(post): %{_sbindir}/update-alternatives +Requires(postun): %{_sbindir}/update-alternatives + +Provides: %{sname} >= %{version}-%{release} + +%description +PostgreSQL is an advanced Object-Relational database management system (DBMS). +The base postgresql package contains the client programs that you'll need to +access a PostgreSQL DBMS server, as well as HTML documentation for the whole +system. These client programs can be located on the same machine as the +PostgreSQL server, or on a remote machine that accesses a PostgreSQL server +over a network connection. The PostgreSQL server can be found in the +postgresql%{pgmajorversion}-server sub-package. + +If you want to manipulate a PostgreSQL database on a local or remote PostgreSQL +server, you need this package. You also need to install this package +if you're installing the postgresql%{pgmajorversion}-server package. + +%package libs +Summary: The shared libraries required for any PostgreSQL clients +Provides: postgresql-libs = %{pgmajorversion} libpq5 >= 10.0 + +%if 0%{?rhel} && 0%{?rhel} <= 6 +Requires: openssl +%else +%if 0%{?suse_version} >= 1315 && 0%{?suse_version} <= 1499 +Requires: libopenssl1_0_0 +%else +%if 0%{?suse_version} >= 1500 +Requires: libopenssl1_1 +%else +Requires: openssl-libs >= 1.0.2k +%endif +%endif +%endif + +%description libs +The postgresql%{pgmajorversion}-libs package provides the essential shared libraries for any +PostgreSQL client program or interface. You will need to install this package +to use any other PostgreSQL package or any clients that need to connect to a +PostgreSQL server. + +%package server +Summary: The programs needed to create and run a PostgreSQL server +Requires: %{name}%{?_isa} = %{version}-%{release} +Requires: %{name}-libs%{?_isa} = %{version}-%{release} +Requires(pre): /usr/sbin/useradd /usr/sbin/groupadd +# for /sbin/ldconfig +Requires(post): glibc +Requires(postun): glibc +%if %{systemd_enabled} +# pre/post stuff needs systemd too + +%if 0%{?suse_version} +%if 0%{?suse_version} >= 1315 +Requires(post): systemd +%endif +%else +Requires(post): systemd +Requires(preun): systemd +Requires(postun): systemd +%endif +%else +Requires: /usr/sbin/useradd, /sbin/chkconfig +%endif +Provides: postgresql-server >= %{version}-%{release} + +%description server +PostgreSQL is an advanced Object-Relational database management system (DBMS). +The postgresql%{pgmajorversion}-server package contains the programs needed to create +and run a PostgreSQL server, which will in turn allow you to create +and maintain PostgreSQL databases. + +%package docs +Summary: Extra documentation for PostgreSQL +Provides: postgresql-docs >= %{version}-%{release} + +%description docs +The postgresql%{pgmajorversion}-docs package includes the SGML source for the documentation +as well as the documentation in PDF format and some extra documentation. +Install this package if you want to help with the PostgreSQL documentation +project, or if you want to generate printed documentation. This package also +includes HTML version of the documentation. + +%package contrib +Summary: Contributed source and binaries distributed with PostgreSQL +Requires: %{name}%{?_isa} = %{version}-%{release} +Requires: %{name}-libs%{?_isa} = %{version}-%{release} +Requires: %{name}-server%{?_isa} = %{version}-%{release} +Provides: postgresql-contrib >= %{version}-%{release} + +%description contrib +The postgresql%{pgmajorversion}-contrib package contains various extension modules that are +included in the PostgreSQL distribution. + +%package devel +Summary: PostgreSQL development header files and libraries +Requires: %{name}%{?_isa} = %{version}-%{release} +Requires: %{name}-libs%{?_isa} = %{version}-%{release} +%if %llvm +%if 0%{?rhel} && 0%{?rhel} == 7 +# Packages come from EPEL and SCL: +%ifarch aarch64 +BuildRequires: llvm-toolset-7.0-llvm-devel >= 7.0.1 llvm-toolset-7.0-clang >= 7.0.1 +%else +Requires: llvm5.0-devel >= 5.0 llvm-toolset-7-clang >= 4.0.1 +%endif +%endif +%if 0%{?rhel} && 0%{?rhel} >= 8 || 0%{?openEuler} +# Packages come from Appstream: +Requires: llvm-devel >= 8.0.1 clang-devel >= 8.0.1 +%endif +%if 0%{?fedora} +Requires: llvm-devel >= 5.0 clang-devel >= 5.0 +%endif +%if 0%{?suse_version} >= 1315 && 0%{?suse_version} <= 1499 +Requires: llvm6-devel clang6-devel +%endif +%if 0%{?suse_version} >= 1500 +Requires: llvm13-devel clang13-devel +%endif +%endif +%if %icu +Requires: libicu-devel +%endif + +%if %enabletaptests +%if 0%{?suse_version} && 0%{?suse_version} >= 1315 +Requires: perl-IPC-Run +BuildRequires: perl-IPC-Run +%endif +%if 0%{?rhel} || 0%{?openEuler} +Requires: perl-Test-Simple +BuildRequires: perl-Test-Simple perl-IPC-Run perl-Time-HiRes +%endif +%if 0%{?fedora} +Requires: perl-IPC-Run +BuildRequires: perl-Test-Simple perl-IPC-Run perl-Time-HiRes +%endif +%endif + +Provides: postgresql-devel >= %{version}-%{release} +Obsoletes: libpq-devel <= 42.0 + +%description devel +The postgresql%{pgmajorversion}-devel package contains the header files and libraries +needed to compile C or C++ applications which will directly interact +with a PostgreSQL database management server. It also contains the ecpg +Embedded C Postgres preprocessor. You need to install this package if you want +to develop applications which will interact with a PostgreSQL server. + +%if %llvm +%package llvmjit +Summary: Just-in-time compilation support for PostgreSQL +Requires: %{name}-server%{?_isa} = %{version}-%{release} +%if 0%{?rhel} && 0%{?rhel} == 7 +%ifarch aarch64 +Requires: llvm-toolset-7.0-llvm >= 7.0.1 +%else +Requires: llvm5.0 >= 5.0 +%endif +%endif +%if 0%{?suse_version} == 1315 +Requires: llvm +%endif +%if 0%{?suse_version} >= 1500 +Requires: libLLVM13 +%endif +%if 0%{?fedora} || 0%{?rhel} >= 8 || 0%{?openEuler} +Requires: llvm => 5.0 +%endif + +Provides: postgresql-llvmjit >= %{version}-%{release} + +%description llvmjit +The postgresql%{pgmajorversion}-llvmjit package contains support for +just-in-time compiling parts of PostgreSQL queries. Using LLVM it +compiles e.g. expressions and tuple deforming into native code, with the +goal of accelerating analytics queries. +%endif + +%if %plperl +%package plperl +Summary: The Perl procedural language for PostgreSQL +Requires: %{name}-server%{?_isa} = %{version}-%{release} +Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version)) +%ifarch ppc ppc64 +BuildRequires: perl-devel +%endif +Obsoletes: postgresql%{pgmajorversion}-pl <= %{version}-%{release} +Provides: postgresql-plperl >= %{version}-%{release} + +%description plperl +The postgresql%{pgmajorversion}-plperl package contains the PL/Perl procedural language, +which is an extension to the PostgreSQL database server. +Install this if you want to write database functions in Perl. + +%endif + +%if %plpython2 +%package plpython +Summary: The Python procedural language for PostgreSQL +Requires: %{name}%{?_isa} = %{version}-%{release} +Requires: %{name}-server%{?_isa} = %{version}-%{release} +Obsoletes: %{name}-pl <= %{version}-%{release} +Provides: postgresql-plpython >= %{version}-%{release} +Provides: %{name}-plpython2%{?_isa} = %{version}-%{release} +%if 0%{?rhel} && 0%{?rhel} <= 6 +Requires: python-libs +%endif +%if 0%{?rhel} == 7 || 0%{?rhel} == 8 +Requires: python2-libs +%endif +%if 0%{?fedora} && 0%{?fedora} <= 31 +Requires: python2-libs +%endif +%if 0%{?fedora} >= 32 +Requires: python27 +%endif + +%description plpython +The postgresql%{pgmajorversion}-plpython package contains the PL/Python procedural language, +which is an extension to the PostgreSQL database server. +Install this if you want to write database functions in Python. + +%endif + +%if %plpython3 +%package plpython3 +Summary: The Python3 procedural language for PostgreSQL +Requires: %{name}%{?_isa} = %{version}-%{release} +Requires: %{name}-server%{?_isa} = %{version}-%{release} +Obsoletes: %{name}-pl <= %{version}-%{release} +Provides: postgresql-plpython3 >= %{version}-%{release} +%if 0%{?suse_version} >= 1315 +Requires: python3-base +%else +# We support Python3 natively on RHEL/CentOS 7 as of 7.7. +Requires: python3-libs +%endif + +%description plpython3 +The postgresql%{pgmajorversion}-plpython3 package contains the PL/Python3 procedural language, +which is an extension to the PostgreSQL database server. +Install this if you want to write database functions in Python 3. + +%endif + +%if %pltcl +%package pltcl +Summary: The Tcl procedural language for PostgreSQL +Requires: %{name}%{?_isa} = %{version}-%{release} +Requires: %{name}-server%{?_isa} = %{version}-%{release} +Requires: tcl +Obsoletes: %{name}-pl <= %{version}-%{release} +Provides: postgresql-pltcl >= %{version}-%{release} + +%description pltcl +PostgreSQL is an advanced Object-Relational database management +system. The %{name}-pltcl package contains the PL/Tcl language +for the backend. +%endif + +%if %test +%package test +Summary: The test suite distributed with PostgreSQL +Requires: %{name}-server%{?_isa} = %{version}-%{release} +Requires: %{name}-devel%{?_isa} = %{version}-%{release} +Provides: postgresql-test >= %{version}-%{release} + +%description test +The postgresql%{pgmajorversion}-test package contains files needed for various tests for the +PostgreSQL database management system, including regression tests and +benchmarks. +%endif + +%global __perl_requires %{SOURCE16} + +%prep +%setup -q -n %{sname}-%{version} +%patch1 -p0 +%patch3 -p0 +%patch5 -p0 +%patch6 -p0 +%if 0%{?rhel} && 0%{?rhel} == 6 +%patch7 -p0 +%endif + +%{__cp} -p %{SOURCE12} . + +%build + +# fail quickly and obviously if user tries to build as root +%if %runselftest + if [ x"`id -u`" = x0 ]; then + echo "postgresql's regression tests fail if run as root." + echo "If you really need to build the RPM as root, use" + echo "--define='runselftest 0' to skip the regression tests." + exit 1 + fi +%endif + +CFLAGS="${CFLAGS:-%optflags}" +# Strip out -ffast-math from CFLAGS.... +CFLAGS=`echo $CFLAGS|xargs -n 1|grep -v ffast-math|xargs -n 100` +%if 0%{?rhel} +LDFLAGS="-Wl,--as-needed"; export LDFLAGS +%endif + +export CFLAGS + +%if %icu +# Export ICU flags on RHEL 6: +%if 0%{?rhel} && 0%{?rhel} <= 6 + ICU_CFLAGS='-I%{_includedir}'; export ICU_CFLAGS + ICU_LIBS='-L%{_libdir} -licui18n -licuuc -licudata'; export ICU_LIBS +%endif +%endif + + +# NOTE: PL/Python 3 +# plpython requires separate configure/build runs to build against python 2 +# versus python 3. Our strategy is to do the python 3 run first, then make +# distclean and do it again for the "normal" build. Note that the installed +# Makefile.global will reflect the python 2 build, which seems appropriate +# since that's still considered the default plpython version. + +%if %plpython3 + +export PYTHON=/usr/bin/python3 + +%if 0%{?rhel} && 0%{?rhel} == 7 +%ifarch aarch64 + export CLANG=/opt/rh/llvm-toolset-7.0/root/usr/bin/clang LLVM_CONFIG=/opt/rh/llvm-toolset-7.0/root/usr/bin/llvm-config +%else + export CLANG=/opt/rh/llvm-toolset-7/root/usr/bin/clang LLVM_CONFIG=%{_libdir}/llvm5.0/bin/llvm-config +%endif +%endif +%if 0%{?rhel} && 0%{?rhel} == 8 || 0%{?openEuler} + export CLANG=%{_bindir}/clang LLVM_CONFIG=%{_bindir}/llvm-config-64 +%endif +# These configure options must match main build +./configure --enable-rpath \ + --prefix=%{pgbaseinstdir} \ + --includedir=%{pgbaseinstdir}/include \ + --mandir=%{pgbaseinstdir}/share/man \ + --datadir=%{pgbaseinstdir}/share \ + --libdir=%{pgbaseinstdir}/lib \ +%if %beta + --enable-debug \ + --enable-cassert \ +%endif +%if %enabletaptests + --enable-tap-tests \ +%endif +%if %icu + --with-icu \ +%endif +%if %llvm + --with-llvm \ +%endif +%if %plperl + --with-perl \ +%endif +%if %plpython3 + --with-python \ +%endif +%if %pltcl + --with-tcl \ + --with-tclconfig=%{_libdir} \ +%endif +%if %ssl + --with-openssl \ +%endif +%if %pam + --with-pam \ +%endif +%if %kerberos + --with-gssapi \ + --with-includes=%{kerbdir}/include \ + --with-libraries=%{kerbdir}/%{_lib} \ +%endif +%if %nls + --enable-nls \ +%endif +%if %sdt + --enable-dtrace \ +%endif +%if %disablepgfts + --disable-thread-safety \ +%endif +%if %uuid + --with-uuid=e2fs \ +%endif +%if %xml + --with-libxml \ + --with-libxslt \ +%endif +%if %ldap + --with-ldap \ +%endif +%if %selinux + --with-selinux \ +%endif +%if %{systemd_enabled} + --with-systemd \ +%endif + --with-system-tzdata=%{_datadir}/zoneinfo \ + --sysconfdir=/etc/sysconfig/pgsql \ + --docdir=%{pgbaseinstdir}/doc \ + --htmldir=%{pgbaseinstdir}/doc/html +# We need to build PL/Python 3 and a few extensions: +# Build PL/Python 3 +cd src/backend +MAKELEVEL=0 %{__make} submake-generated-headers +cd ../.. +cd src/pl/plpython +%{__make} all +cd .. +# save built form in a directory that "make distclean" won't touch +%{__cp} -a plpython plpython3 +cd ../.. +# Build some of the extensions with PY3 support +for p3bl in %{python3_build_list} ; do + p3blpy3dir="$p3bl"3 + pushd contrib/$p3bl + MAKELEVEL=0 %{__make} %{?_smp_mflags} all + cd .. + # save built form in a directory that "make distclean" won't touch + %{__cp} -a $p3bl $p3blpy3dir + popd +done +# must also save this version of Makefile.global for later +# on platforms where Python 2 is still available: +%{__cp} src/Makefile.global src/Makefile.global.python3 + +%if %plpython2 +# Clean up the tree. +%{__make} distclean +%endif + +%endif +# NOTE: PL/Python3 (END) + +# NOTE: PL/Python 2 +%if %{?plpython2} + +unset PYTHON +# Explicitly run Python2 here -- in future releases, +# Python3 will be the default. +export PYTHON=/usr/bin/python2 + +%if 0%{?rhel} && 0%{?rhel} == 7 +%ifarch aarch64 + export CLANG=/opt/rh/llvm-toolset-7.0/root/usr/bin/clang LLVM_CONFIG=/opt/rh/llvm-toolset-7.0/root/usr/bin/llvm-config +%else + export CLANG=/opt/rh/llvm-toolset-7/root/usr/bin/clang LLVM_CONFIG=%{_libdir}/llvm5.0/bin/llvm-config +%endif +%endif +%if 0%{?rhel} && 0%{?rhel} == 8 + export CLANG=%{_bindir}/clang LLVM_CONFIG=%{_bindir}/llvm-config-64 +%endif + +# Normal (not python3) build begins here +./configure --enable-rpath \ + --prefix=%{pgbaseinstdir} \ + --includedir=%{pgbaseinstdir}/include \ + --libdir=%{pgbaseinstdir}/lib \ + --mandir=%{pgbaseinstdir}/share/man \ + --datadir=%{pgbaseinstdir}/share \ +%if %beta + --enable-debug \ + --enable-cassert \ +%endif +%if %enabletaptests + --enable-tap-tests \ +%endif +%if %icu + --with-icu \ +%endif +%if %llvm + --with-llvm \ +%endif +%if %plperl + --with-perl \ +%endif +%if %plpython2 + --with-python \ +%endif +%if %pltcl + --with-tcl \ + --with-tclconfig=%{_libdir} \ +%endif +%if %ssl + --with-openssl \ +%endif +%if %pam + --with-pam \ +%endif +%if %kerberos + --with-gssapi \ + --with-includes=%{kerbdir}/include \ + --with-libraries=%{kerbdir}/%{_lib} \ +%endif +%if %nls + --enable-nls \ +%endif +%if %sdt + --enable-dtrace \ +%endif +%if %disablepgfts + --disable-thread-safety \ +%endif +%if %uuid + --with-uuid=e2fs \ +%endif +%if %xml + --with-libxml \ + --with-libxslt \ +%endif +%if %ldap + --with-ldap \ +%endif +%if %selinux + --with-selinux \ +%endif +%if %{systemd_enabled} + --with-systemd \ +%endif + --with-system-tzdata=%{_datadir}/zoneinfo \ + --sysconfdir=/etc/sysconfig/pgsql \ + --docdir=%{pgbaseinstdir}/doc \ + --htmldir=%{pgbaseinstdir}/doc/html + +# We need to build PL/Python 2 and a few extensions: +# Build PL/Python 2 +cd src/backend +MAKELEVEL=0 %{__make} submake-generated-headers +cd ../.. +cd src/pl/plpython +%{__make} all +cd .. +# save built form in a directory that "make distclean" won't touch +%{__cp} -a plpython plpython2 +cd ../.. +# Build some of the extensions with PY2 support as well. +for p2bl in %{python3_build_list} ; do + p2blpy2dir="$p2bl"2 + pushd contrib/$p2bl + MAKELEVEL=0 %{__make} %{?_smp_mflags} all + # save built form in a directory that "make distclean" won't touch + cd .. + %{__cp} -a $p2bl $p2blpy2dir + popd +done +%endif +# NOTE: PL/Python 2 (END) + + +MAKELEVEL=0 %{__make} %{?_smp_mflags} all +%{__make} %{?_smp_mflags} -C contrib all +%if %uuid +%{__make} %{?_smp_mflags} -C contrib/uuid-ossp all +%endif + +# Have to hack makefile to put correct path into tutorial scripts +sed "s|C=\`pwd\`;|C=%{pgbaseinstdir}/lib/tutorial;|" < src/tutorial/Makefile > src/tutorial/GNUmakefile +%{__make} %{?_smp_mflags} -C src/tutorial NO_PGXS=1 all +%{__rm} -f src/tutorial/GNUmakefile + + + +# run_testsuite WHERE +# ------------------- +# Run 'make check' in WHERE path. When that command fails, return the logs +# given by PostgreSQL build system and set 'test_failure=1'. + +run_testsuite() +{ + %{__make} -C "$1" MAX_CONNECTIONS=5 check && return 0 + + test_failure=1 + + ( + set +x + echo "=== trying to find all regression.diffs files in build directory ===" + find -name 'regression.diffs' | \ + while read line; do + echo "=== make failure: $line ===" + cat "$line" + done + ) +} + +%if %runselftest + run_testsuite "src/test/regress" + %{__make} clean -C "src/test/regress" + run_testsuite "src/pl" +%if %plpython3 + # must install Makefile.global that selects python3 + %{__mv} src/Makefile.global src/Makefile.global.save + %{__cp} src/Makefile.global.python2 src/Makefile.global + touch -r src/Makefile.global.save src/Makefile.global + # because "make check" does "make install" on the whole tree, + # we must temporarily install plpython3 as src/pl/plpython, + # since that is the subdirectory src/pl/Makefile knows about + %{__mv} src/pl/plpython src/pl/plpython2 + %{__mv} src/pl/plpython3 src/pl/plpython + + run_testsuite "src/pl/plpython" + + # and clean up our mess + %{__mv} src/pl/plpython src/pl/plpython3 + %{__mv} src/pl/plpython2 src/pl/plpython + %{__mv} -f src/Makefile.global.save src/Makefile.global +%endif + run_testsuite "contrib" +%endif + + +%if %test + pushd src/test/regress + %{__make} all + popd +%endif + +%install +%{__rm} -rf %{buildroot} + +%{__make} DESTDIR=%{buildroot} install + +%if %plpython3 + %{__mv} src/Makefile.global src/Makefile.global.save + %{__cp} src/Makefile.global.python3 src/Makefile.global + touch -r src/Makefile.global.save src/Makefile.global + # Install PL/Python3 + pushd src/pl/plpython3 + %{__make} DESTDIR=%{buildroot} install + popd + for p3bl in %{python3_build_list} ; do + p3blpy3dir="$p3bl"3 + # Install jsonb_plpython3 + pushd contrib/$p3blpy3dir + %{__make} DESTDIR=%{buildroot} install + popd + done + %{__mv} -f src/Makefile.global.save src/Makefile.global +%endif + +%{__mkdir} -p %{buildroot}%{pgbaseinstdir}/share/extensions/ +%{__make} -C contrib DESTDIR=%{buildroot} install +%if %uuid +%{__make} -C contrib/uuid-ossp DESTDIR=%{buildroot} install +%endif + +# multilib header hack; note pg_config.h is installed in two places! +# we only apply this to known Red Hat multilib arches, per bug #177564 +case `uname -i` in + i386 | x86_64 | ppc | ppc64 | s390 | s390x) + %{__mv} %{buildroot}%{pgbaseinstdir}/include/pg_config.h %{buildroot}%{pgbaseinstdir}/include/pg_config_`uname -i`.h + %{__install} -m 644 %{SOURCE5} %{buildroot}%{pgbaseinstdir}/include/pg_config.h + %{__mv} %{buildroot}%{pgbaseinstdir}/include/server/pg_config.h %{buildroot}%{pgbaseinstdir}/include/server/pg_config_`uname -i`.h + %{__install} -m 644 %{SOURCE5} %{buildroot}%{pgbaseinstdir}/include/server/pg_config.h + %{__mv} %{buildroot}%{pgbaseinstdir}/include/ecpg_config.h %{buildroot}%{pgbaseinstdir}/include/ecpg_config_`uname -i`.h + %{__install} -m 644 %{SOURCE7} %{buildroot}%{pgbaseinstdir}/include/ecpg_config.h + ;; + *) + ;; +esac + +# This is only for systemd supported distros: +%if %{systemd_enabled} +# prep the setup script, including insertion of some values it needs +sed -e 's|^PGVERSION=.*$|PGVERSION=%{pgmajorversion}|' \ + -e 's|^PGENGINE=.*$|PGENGINE=%{pgbaseinstdir}/bin|' \ + -e 's|^PREVMAJORVERSION=.*$|PREVMAJORVERSION=%{prevmajorversion}|' \ + <%{SOURCE17} >postgresql-%{pgmajorversion}-setup +%{__install} -m 755 postgresql-%{pgmajorversion}-setup %{buildroot}%{pgbaseinstdir}/bin/postgresql-%{pgmajorversion}-setup +# Create a symlink of the setup script under $PATH +%{__mkdir} -p %{buildroot}%{_bindir} +%{__ln_s} ../../../../../../../../../../../../../../%{pgbaseinstdir}/bin/postgresql-%{pgmajorversion}-setup %{buildroot}%{_bindir}/ + +# prep the startup check script, including insertion of some values it needs +sed -e 's|^PGVERSION=.*$|PGVERSION=%{pgmajorversion}|' \ + -e 's|^PREVMAJORVERSION=.*$|PREVMAJORVERSION=%{prevmajorversion}|' \ + -e 's|^PGDOCDIR=.*$|PGDOCDIR=%{_pkgdocdir}|' \ + <%{SOURCE10} >%{sname}-%{pgmajorversion}-check-db-dir +touch -r %{SOURCE10} %{sname}-%{pgmajorversion}-check-db-dir +%{__install} -m 755 %{sname}-%{pgmajorversion}-check-db-dir %{buildroot}%{pgbaseinstdir}/bin/%{sname}-%{pgmajorversion}-check-db-dir + +%{__install} -d %{buildroot}%{_unitdir} +%{__install} -m 644 %{SOURCE18} %{buildroot}%{_unitdir}/%{sname}-%{pgmajorversion}.service +%else +%{__install} -d %{buildroot}%{_initrddir} +sed 's/^PGVERSION=.*$/PGVERSION=%{version}/' <%{SOURCE3} > %{sname}.init +%{__install} -m 755 %{sname}.init %{buildroot}%{_initrddir}/%{sname}-%{pgmajorversion} +%endif + +%if %pam +%{__install} -d %{buildroot}/etc/pam.d +%{__install} -m 644 %{SOURCE14} %{buildroot}/etc/pam.d/%{sname} +%endif + +# Create the directory for sockets. +%{__install} -d -m 755 %{buildroot}/var/run/%{sname} +%if %{systemd_enabled} +# ... and make a tmpfiles script to recreate it at reboot. +%{__mkdir} -p %{buildroot}/%{_tmpfilesdir} +%{__install} -m 0644 %{SOURCE19} %{buildroot}/%{_tmpfilesdir}/%{sname}-%{pgmajorversion}.conf +%endif + +# PGDATA needs removal of group and world permissions due to pg_pwd hole. +%{__install} -d -m 700 %{buildroot}/var/lib/pgsql/%{pgmajorversion}/data + +# backups of data go here... +%{__install} -d -m 700 %{buildroot}/var/lib/pgsql/%{pgmajorversion}/backups + +# Create the multiple postmaster startup directory +%{__install} -d -m 700 %{buildroot}/etc/sysconfig/pgsql/%{pgmajorversion} + +# Install linker conf file under postgresql installation directory. +# We will install the latest version via alternatives. +%{__install} -d -m 755 %{buildroot}%{pgbaseinstdir}/share/ +%{__install} -m 700 %{SOURCE9} %{buildroot}%{pgbaseinstdir}/share/ + +%if %test + # tests. There are many files included here that are unnecessary, + # but include them anyway for completeness. We replace the original + # Makefiles, however. + %{__mkdir} -p %{buildroot}%{pgbaseinstdir}/lib/test + %{__cp} -a src/test/regress %{buildroot}%{pgbaseinstdir}/lib/test + %{__install} -m 0755 contrib/spi/refint.so %{buildroot}%{pgbaseinstdir}/lib/test/regress + %{__install} -m 0755 contrib/spi/autoinc.so %{buildroot}%{pgbaseinstdir}/lib/test/regress + # pg_regress binary should be only in one subpackage, + # there will be a symlink from -test to -devel + %{__rm} -f %{buildroot}%{pgbaseinstdir}/lib/test/regress/pg_regress + %{__mkdir} -p %{buildroot}%{pgbaseinstdir}/lib/pgsql/test/regress/ + %{__ln_s} -f ../../pgxs/src/test/regress/pg_regress %{buildroot}%{pgbaseinstdir}/lib/test/regress/pg_regress + pushd %{buildroot}%{pgbaseinstdir}/lib/test/regress + strip *.so + %{__rm} -f GNUmakefile Makefile *.o + chmod 0755 pg_regress regress.so + popd + %{__cp} %{SOURCE4} %{buildroot}%{pgbaseinstdir}/lib/test/regress/Makefile + chmod 0644 %{buildroot}%{pgbaseinstdir}/lib/test/regress/Makefile +%endif + +%if ! %plpython2 +# Quick hack for beta1 +%{__rm} -f %{buildroot}/%{pgbaseinstdir}/share/extension/*plpython2u* +%{__rm} -f %{buildroot}/%{pgbaseinstdir}/share/extension/*plpythonu-* +%{__rm} -f %{buildroot}/%{pgbaseinstdir}/share/extension/*_plpythonu.control +%endif + + +# Fix some more documentation +# gzip doc/internals.ps +%{__cp} %{SOURCE6} README.rpm-dist +%{__mkdir} -p %{buildroot}%{pgbaseinstdir}/share/doc/html +%{__mv} doc/src/sgml/html doc +%{__mkdir} -p %{buildroot}%{pgbaseinstdir}/share/man/ +%{__mv} doc/src/sgml/man1 doc/src/sgml/man3 doc/src/sgml/man7 %{buildroot}%{pgbaseinstdir}/share/man/ +%{__rm} -rf %{buildroot}%{_docdir}/pgsql + +# Quick hack for RHEL < 7 and not compiled with PL/Python3 support: +%if 0%{?rhel} < 7 && ! 0%{?plpython3} +%{__rm} -f %{buildroot}/%{pgbaseinstdir}/share/extension/hstore_plpython3u* +%{__rm} -f %{buildroot}/%{pgbaseinstdir}/share/extension/jsonb_plpython3u* +%{__rm} -f %{buildroot}/%{pgbaseinstdir}/share/extension/ltree_plpython3u* +%endif + +# initialize file lists +%{__cp} /dev/null main.lst +%{__cp} /dev/null libs.lst +%{__cp} /dev/null server.lst +%{__cp} /dev/null devel.lst +%{__cp} /dev/null plperl.lst +%{__cp} /dev/null pltcl.lst +%{__cp} /dev/null plpython.lst +%{__cp} /dev/null pg_plpython3.lst +%{__cp} /dev/null pg_checksums.lst + +%if %nls +%find_lang ecpg-%{pgmajorversion} +%find_lang ecpglib6-%{pgmajorversion} +%find_lang initdb-%{pgmajorversion} +%find_lang libpq5-%{pgmajorversion} +%find_lang pg_archivecleanup-%{pgmajorversion} +%find_lang pg_basebackup-%{pgmajorversion} +%find_lang pg_checksums-%{pgmajorversion} +%find_lang pg_config-%{pgmajorversion} +%find_lang pg_controldata-%{pgmajorversion} +%find_lang pg_ctl-%{pgmajorversion} +%find_lang pg_dump-%{pgmajorversion} +%find_lang pg_resetwal-%{pgmajorversion} +%find_lang pg_rewind-%{pgmajorversion} +%find_lang pg_test_fsync-%{pgmajorversion} +%find_lang pg_test_timing-%{pgmajorversion} +%find_lang pg_upgrade-%{pgmajorversion} +%find_lang pg_waldump-%{pgmajorversion} +%find_lang pgscripts-%{pgmajorversion} +%if %plperl +%find_lang plperl-%{pgmajorversion} +cat plperl-%{pgmajorversion}.lang > pg_plperl.lst +%endif +%find_lang plpgsql-%{pgmajorversion} +%if %plpython2 +%find_lang plpython-%{pgmajorversion} +cat plpython-%{pgmajorversion}.lang > pg_plpython.lst +%endif +%if %plpython3 +# plpython3 shares message files with plpython +%find_lang plpython-%{pgmajorversion} +cat plpython-%{pgmajorversion}.lang >> pg_plpython3.lst +%endif + +%if %pltcl +%find_lang pltcl-%{pgmajorversion} +cat pltcl-%{pgmajorversion}.lang > pg_pltcl.lst +%endif +%find_lang postgres-%{pgmajorversion} +%find_lang psql-%{pgmajorversion} + +cat libpq5-%{pgmajorversion}.lang > pg_libpq5.lst +cat pg_config-%{pgmajorversion}.lang ecpg-%{pgmajorversion}.lang ecpglib6-%{pgmajorversion}.lang > pg_devel.lst +cat initdb-%{pgmajorversion}.lang pg_ctl-%{pgmajorversion}.lang psql-%{pgmajorversion}.lang pg_dump-%{pgmajorversion}.lang pg_basebackup-%{pgmajorversion}.lang pg_rewind-%{pgmajorversion}.lang pg_upgrade-%{pgmajorversion}.lang pg_test_timing-%{pgmajorversion}.lang pg_test_fsync-%{pgmajorversion}.lang pg_archivecleanup-%{pgmajorversion}.lang pg_waldump-%{pgmajorversion}.lang pgscripts-%{pgmajorversion}.lang > pg_main.lst +cat postgres-%{pgmajorversion}.lang pg_resetwal-%{pgmajorversion}.lang pg_checksums-%{pgmajorversion}.lang pg_controldata-%{pgmajorversion}.lang plpgsql-%{pgmajorversion}.lang > pg_server.lst +%endif + +%pre server +groupadd -g 26 -o -r postgres >/dev/null 2>&1 || : +useradd -M -g postgres -o -r -d /var/lib/pgsql -s /bin/bash \ + -c "PostgreSQL Server" -u 26 postgres >/dev/null 2>&1 || : + +%post server +/sbin/ldconfig +if [ $1 -eq 1 ] ; then + %if %{systemd_enabled} + /bin/systemctl daemon-reload >/dev/null 2>&1 || : + %if 0%{?suse_version} + %if 0%{?suse_version} >= 1315 + %service_add_pre postgresql-%{pgpackageversion}.service + %endif + %else + %systemd_post %{sname}-%{pgpackageversion}.service + %endif + %else + chkconfig --add %{sname}-%{pgpackageversion} + %endif +fi + +# postgres' .bash_profile. +# We now don't install .bash_profile as we used to in pre 9.0. Instead, use cat, +# so that package manager will be happy during upgrade to new major version. +echo "[ -f /etc/profile ] && source /etc/profile +PGDATA=/var/lib/pgsql/%{pgmajorversion}/data +export PGDATA +# If you want to customize your settings, +# Use the file below. This is not overridden +# by the RPMS. +[ -f /var/lib/pgsql/.pgsql_profile ] && source /var/lib/pgsql/.pgsql_profile" > /var/lib/pgsql/.bash_profile +chown postgres: /var/lib/pgsql/.bash_profile +chmod 700 /var/lib/pgsql/.bash_profile + +%preun server +if [ $1 -eq 0 ] ; then +%if %{systemd_enabled} + # Package removal, not upgrade + /bin/systemctl --no-reload disable %{sname}-%{pgmajorversion}.service >/dev/null 2>&1 || : + /bin/systemctl stop %{sname}-%{pgmajorversion}.service >/dev/null 2>&1 || : +%else + /sbin/service %{sname}-%{pgmajorversion} condstop >/dev/null 2>&1 + chkconfig --del %{sname}-%{pgmajorversion} + +%endif +fi + +%postun server +/sbin/ldconfig +%if %{systemd_enabled} + /bin/systemctl daemon-reload >/dev/null 2>&1 || : +%else + /sbin/service %{sname}-%{pgmajorversion} condrestart >/dev/null 2>&1 +%endif +if [ $1 -ge 1 ] ; then + %if %{systemd_enabled} + # Package upgrade, not uninstall + /bin/systemctl try-restart %{sname}-%{pgmajorversion}.service >/dev/null 2>&1 || : + %else + /sbin/service %{sname}-%{pgmajorversion} condrestart >/dev/null 2>&1 + %endif +fi + +# Create alternatives entries for common binaries and man files +%post +%{_sbindir}/update-alternatives --install %{_bindir}/psql pgsql-psql %{pgbaseinstdir}/bin/psql %{packageversion}0 +%{_sbindir}/update-alternatives --install %{_bindir}/clusterdb pgsql-clusterdb %{pgbaseinstdir}/bin/clusterdb %{packageversion}0 +%{_sbindir}/update-alternatives --install %{_bindir}/createdb pgsql-createdb %{pgbaseinstdir}/bin/createdb %{packageversion}0 +%{_sbindir}/update-alternatives --install %{_bindir}/createuser pgsql-createuser %{pgbaseinstdir}/bin/createuser %{packageversion}0 +%{_sbindir}/update-alternatives --install %{_bindir}/dropdb pgsql-dropdb %{pgbaseinstdir}/bin/dropdb %{packageversion}0 +%{_sbindir}/update-alternatives --install %{_bindir}/dropuser pgsql-dropuser %{pgbaseinstdir}/bin/dropuser %{packageversion}0 +%{_sbindir}/update-alternatives --install %{_bindir}/pg_basebackup pgsql-pg_basebackup %{pgbaseinstdir}/bin/pg_basebackup %{packageversion}0 +%{_sbindir}/update-alternatives --install %{_bindir}/pg_dump pgsql-pg_dump %{pgbaseinstdir}/bin/pg_dump %{packageversion}0 +%{_sbindir}/update-alternatives --install %{_bindir}/pg_dumpall pgsql-pg_dumpall %{pgbaseinstdir}/bin/pg_dumpall %{packageversion}0 +%{_sbindir}/update-alternatives --install %{_bindir}/pg_restore pgsql-pg_restore %{pgbaseinstdir}/bin/pg_restore %{packageversion}0 +%{_sbindir}/update-alternatives --install %{_bindir}/reindexdb pgsql-reindexdb %{pgbaseinstdir}/bin/reindexdb %{packageversion}0 +%{_sbindir}/update-alternatives --install %{_bindir}/vacuumdb pgsql-vacuumdb %{pgbaseinstdir}/bin/vacuumdb %{packageversion}0 +%{_sbindir}/update-alternatives --install %{_mandir}/man1/clusterdb.1 pgsql-clusterdbman %{pgbaseinstdir}/share/man/man1/clusterdb.1 %{packageversion}0 +%{_sbindir}/update-alternatives --install %{_mandir}/man1/createdb.1 pgsql-createdbman %{pgbaseinstdir}/share/man/man1/createdb.1 %{packageversion}0 +%{_sbindir}/update-alternatives --install %{_mandir}/man1/createuser.1 pgsql-createuserman %{pgbaseinstdir}/share/man/man1/createuser.1 %{packageversion}0 +%{_sbindir}/update-alternatives --install %{_mandir}/man1/dropdb.1 pgsql-dropdbman %{pgbaseinstdir}/share/man/man1/dropdb.1 %{packageversion}0 +%{_sbindir}/update-alternatives --install %{_mandir}/man1/dropuser.1 pgsql-dropuserman %{pgbaseinstdir}/share/man/man1/dropuser.1 %{packageversion}0 +%{_sbindir}/update-alternatives --install %{_mandir}/man1/pg_basebackup.1 pgsql-pg_basebackupman %{pgbaseinstdir}/share/man/man1/pg_basebackup.1 %{packageversion}0 +%{_sbindir}/update-alternatives --install %{_mandir}/man1/pg_dump.1 pgsql-pg_dumpman %{pgbaseinstdir}/share/man/man1/pg_dump.1 %{packageversion}0 +%{_sbindir}/update-alternatives --install %{_mandir}/man1/pg_dumpall.1 pgsql-pg_dumpallman %{pgbaseinstdir}/share/man/man1/pg_dumpall.1 %{packageversion}0 +%{_sbindir}/update-alternatives --install %{_mandir}/man1/pg_restore.1 pgsql-pg_restoreman %{pgbaseinstdir}/share/man/man1/pg_restore.1 %{packageversion}0 +%{_sbindir}/update-alternatives --install %{_mandir}/man1/psql.1 pgsql-psqlman %{pgbaseinstdir}/share/man/man1/psql.1 %{packageversion}0 +%{_sbindir}/update-alternatives --install %{_mandir}/man1/reindexdb.1 pgsql-reindexdbman %{pgbaseinstdir}/share/man/man1/reindexdb.1 %{packageversion}0 +%{_sbindir}/update-alternatives --install %{_mandir}/man1/vacuumdb.1 pgsql-vacuumdbman %{pgbaseinstdir}/share/man/man1/vacuumdb.1 %{packageversion}0 + +%post libs +%{_sbindir}/update-alternatives --install /etc/ld.so.conf.d/%{sname}-pgdg-libs.conf pgsql-ld-conf %{pgbaseinstdir}/share/%{sname}-%{pgmajorversion}-libs.conf %{packageversion}0 +/sbin/ldconfig + +# Drop alternatives entries for common binaries and man files +%postun +if [ "$1" -eq 0 ] + then + # Only remove these links if the package is completely removed from the system (vs.just being upgraded) + %{_sbindir}/update-alternatives --remove pgsql-psql %{pgbaseinstdir}/bin/psql + %{_sbindir}/update-alternatives --remove pgsql-clusterdb %{pgbaseinstdir}/bin/clusterdb + %{_sbindir}/update-alternatives --remove pgsql-clusterdbman %{pgbaseinstdir}/share/man/man1/clusterdb.1 + %{_sbindir}/update-alternatives --remove pgsql-createdb %{pgbaseinstdir}/bin/createdb + %{_sbindir}/update-alternatives --remove pgsql-createdbman %{pgbaseinstdir}/share/man/man1/createdb.1 + %{_sbindir}/update-alternatives --remove pgsql-createuser %{pgbaseinstdir}/bin/createuser + %{_sbindir}/update-alternatives --remove pgsql-createuserman %{pgbaseinstdir}/share/man/man1/createuser.1 + %{_sbindir}/update-alternatives --remove pgsql-dropdb %{pgbaseinstdir}/bin/dropdb + %{_sbindir}/update-alternatives --remove pgsql-dropdbman %{pgbaseinstdir}/share/man/man1/dropdb.1 + %{_sbindir}/update-alternatives --remove pgsql-dropuser %{pgbaseinstdir}/bin/dropuser + %{_sbindir}/update-alternatives --remove pgsql-dropuserman %{pgbaseinstdir}/share/man/man1/dropuser.1 + %{_sbindir}/update-alternatives --remove pgsql-pg_basebackup %{pgbaseinstdir}/bin/pg_basebackup + %{_sbindir}/update-alternatives --remove pgsql-pg_dump %{pgbaseinstdir}/bin/pg_dump + %{_sbindir}/update-alternatives --remove pgsql-pg_dumpall %{pgbaseinstdir}/bin/pg_dumpall + %{_sbindir}/update-alternatives --remove pgsql-pg_dumpallman %{pgbaseinstdir}/share/man/man1/pg_dumpall.1 + %{_sbindir}/update-alternatives --remove pgsql-pg_basebackupman %{pgbaseinstdir}/share/man/man1/pg_basebackup.1 + %{_sbindir}/update-alternatives --remove pgsql-pg_dumpman %{pgbaseinstdir}/share/man/man1/pg_dump.1 + %{_sbindir}/update-alternatives --remove pgsql-pg_restore %{pgbaseinstdir}/bin/pg_restore + %{_sbindir}/update-alternatives --remove pgsql-pg_restoreman %{pgbaseinstdir}/share/man/man1/pg_restore.1 + %{_sbindir}/update-alternatives --remove pgsql-psqlman %{pgbaseinstdir}/share/man/man1/psql.1 + %{_sbindir}/update-alternatives --remove pgsql-reindexdb %{pgbaseinstdir}/bin/reindexdb + %{_sbindir}/update-alternatives --remove pgsql-reindexdbman %{pgbaseinstdir}/share/man/man1/reindexdb.1 + %{_sbindir}/update-alternatives --remove pgsql-vacuumdb %{pgbaseinstdir}/bin/vacuumdb + %{_sbindir}/update-alternatives --remove pgsql-vacuumdbman %{pgbaseinstdir}/share/man/man1/vacuumdb.1 + fi + +%postun libs +if [ "$1" -eq 0 ] + then + %{_sbindir}/update-alternatives --remove pgsql-ld-conf %{pgbaseinstdir}/share/%{sname}-%{pgmajorversion}-libs.conf + /sbin/ldconfig +fi + +%clean +%{__rm} -rf %{buildroot} + +# FILES section. + +%files -f pg_main.lst +%defattr(-,root,root) +%if %llvm +# Install bitcode directory along with the main package, +# so that extensions can use this dir. +%dir %{pgbaseinstdir}/lib/bitcode +%endif +%doc doc/KNOWN_BUGS doc/MISSING_FEATURES +%doc COPYRIGHT +%doc README.rpm-dist +%{pgbaseinstdir}/bin/clusterdb +%{pgbaseinstdir}/bin/createdb +%{pgbaseinstdir}/bin/createuser +%{pgbaseinstdir}/bin/dropdb +%{pgbaseinstdir}/bin/dropuser +%{pgbaseinstdir}/bin/pgbench +%{pgbaseinstdir}/bin/pg_archivecleanup +%{pgbaseinstdir}/bin/pg_basebackup +%{pgbaseinstdir}/bin/pg_config +%{pgbaseinstdir}/bin/pg_dump +%{pgbaseinstdir}/bin/pg_dumpall +%{pgbaseinstdir}/bin/pg_isready +%{pgbaseinstdir}/bin/pg_restore +%{pgbaseinstdir}/bin/pg_rewind +%{pgbaseinstdir}/bin/pg_test_fsync +%{pgbaseinstdir}/bin/pg_test_timing +%{pgbaseinstdir}/bin/pg_receivewal +%{pgbaseinstdir}/bin/pg_upgrade +%{pgbaseinstdir}/bin/pg_waldump +%{pgbaseinstdir}/bin/psql +%{pgbaseinstdir}/bin/reindexdb +%{pgbaseinstdir}/bin/vacuumdb +%{pgbaseinstdir}/share/errcodes.txt +%{pgbaseinstdir}/share/man/man1/clusterdb.* +%{pgbaseinstdir}/share/man/man1/createdb.* +%{pgbaseinstdir}/share/man/man1/createuser.* +%{pgbaseinstdir}/share/man/man1/dropdb.* +%{pgbaseinstdir}/share/man/man1/dropuser.* +%{pgbaseinstdir}/share/man/man1/pgbench.1 +%{pgbaseinstdir}/share/man/man1/pg_archivecleanup.1 +%{pgbaseinstdir}/share/man/man1/pg_basebackup.* +%{pgbaseinstdir}/share/man/man1/pg_config.* +%{pgbaseinstdir}/share/man/man1/pg_dump.* +%{pgbaseinstdir}/share/man/man1/pg_dumpall.* +%{pgbaseinstdir}/share/man/man1/pg_isready.* +%{pgbaseinstdir}/share/man/man1/pg_receivewal.* +%{pgbaseinstdir}/share/man/man1/pg_restore.* +%{pgbaseinstdir}/share/man/man1/pg_rewind.1 +%{pgbaseinstdir}/share/man/man1/pg_test_fsync.1 +%{pgbaseinstdir}/share/man/man1/pg_test_timing.1 +%{pgbaseinstdir}/share/man/man1/pg_upgrade.1 +%{pgbaseinstdir}/share/man/man1/pg_waldump.1 +%{pgbaseinstdir}/share/man/man1/psql.* +%{pgbaseinstdir}/share/man/man1/reindexdb.* +%{pgbaseinstdir}/share/man/man1/vacuumdb.* +%{pgbaseinstdir}/share/man/man3/* +%{pgbaseinstdir}/share/man/man7/* + +%files docs +%defattr(-,root,root) +%doc doc/src/* +%doc *-A4.pdf +%doc src/tutorial +%doc doc/html + +%files contrib +%defattr(-,root,root) +%doc %{pgbaseinstdir}/doc/extension/*.example +%{pgbaseinstdir}/lib/_int.so +%{pgbaseinstdir}/lib/adminpack.so +%{pgbaseinstdir}/lib/amcheck.so +%{pgbaseinstdir}/lib/auth_delay.so +%{pgbaseinstdir}/lib/autoinc.so +%{pgbaseinstdir}/lib/auto_explain.so +%{pgbaseinstdir}/lib/bloom.so +%{pgbaseinstdir}/lib/btree_gin.so +%{pgbaseinstdir}/lib/btree_gist.so +%{pgbaseinstdir}/lib/citext.so +%{pgbaseinstdir}/lib/cube.so +%{pgbaseinstdir}/lib/dblink.so +%{pgbaseinstdir}/lib/earthdistance.so +%{pgbaseinstdir}/lib/file_fdw.so* +%{pgbaseinstdir}/lib/fuzzystrmatch.so +%{pgbaseinstdir}/lib/insert_username.so +%{pgbaseinstdir}/lib/isn.so +%{pgbaseinstdir}/lib/hstore.so +%if %plperl +%{pgbaseinstdir}/lib/hstore_plperl.so +%{pgbaseinstdir}/lib/jsonb_plperl.so +%{pgbaseinstdir}/share/extension/jsonb_plperl*.sql +%{pgbaseinstdir}/share/extension/jsonb_plperl*.control +%endif +%{pgbaseinstdir}/lib/lo.so +%{pgbaseinstdir}/lib/ltree.so +%{pgbaseinstdir}/lib/moddatetime.so +%{pgbaseinstdir}/lib/pageinspect.so +%{pgbaseinstdir}/lib/passwordcheck.so +%{pgbaseinstdir}/lib/pgcrypto.so +%{pgbaseinstdir}/lib/pgrowlocks.so +%{pgbaseinstdir}/lib/pgstattuple.so +%{pgbaseinstdir}/lib/pg_buffercache.so +%{pgbaseinstdir}/lib/pg_freespacemap.so +%{pgbaseinstdir}/lib/pg_prewarm.so +%{pgbaseinstdir}/lib/pg_stat_statements.so +%{pgbaseinstdir}/lib/pg_trgm.so +%{pgbaseinstdir}/lib/pg_visibility.so +%{pgbaseinstdir}/lib/postgres_fdw.so +%{pgbaseinstdir}/lib/refint.so +%{pgbaseinstdir}/lib/seg.so +%if %ssl +%{pgbaseinstdir}/lib/sslinfo.so +%endif +%if %selinux +%{pgbaseinstdir}/lib/sepgsql.so +%{pgbaseinstdir}/share/contrib/sepgsql.sql +%endif +%{pgbaseinstdir}/lib/tablefunc.so +%{pgbaseinstdir}/lib/tcn.so +%{pgbaseinstdir}/lib/test_decoding.so +%{pgbaseinstdir}/lib/tsm_system_rows.so +%{pgbaseinstdir}/lib/tsm_system_time.so +%{pgbaseinstdir}/lib/unaccent.so +%if %xml +%{pgbaseinstdir}/lib/pgxml.so +%endif +%if %uuid +%{pgbaseinstdir}/lib/uuid-ossp.so +%endif +%{pgbaseinstdir}/share/extension/adminpack* +%{pgbaseinstdir}/share/extension/amcheck* +%{pgbaseinstdir}/share/extension/autoinc* +%{pgbaseinstdir}/share/extension/bloom* +%{pgbaseinstdir}/share/extension/btree_gin* +%{pgbaseinstdir}/share/extension/btree_gist* +%{pgbaseinstdir}/share/extension/citext* +%{pgbaseinstdir}/share/extension/cube* +%{pgbaseinstdir}/share/extension/dblink* +%{pgbaseinstdir}/share/extension/dict_int* +%{pgbaseinstdir}/share/extension/dict_xsyn* +%{pgbaseinstdir}/share/extension/earthdistance* +%{pgbaseinstdir}/share/extension/file_fdw* +%{pgbaseinstdir}/share/extension/fuzzystrmatch* +%{pgbaseinstdir}/share/extension/hstore.control +%{pgbaseinstdir}/share/extension/hstore--*.sql +%if %plperl +%{pgbaseinstdir}/share/extension/hstore_plperl* +%endif +%{pgbaseinstdir}/share/extension/insert_username* +%{pgbaseinstdir}/share/extension/intagg* +%{pgbaseinstdir}/share/extension/intarray* +%{pgbaseinstdir}/share/extension/isn* +%{pgbaseinstdir}/share/extension/lo* +%{pgbaseinstdir}/share/extension/ltree.control +%{pgbaseinstdir}/share/extension/ltree--*.sql +%{pgbaseinstdir}/share/extension/moddatetime* +%{pgbaseinstdir}/share/extension/pageinspect* +%{pgbaseinstdir}/share/extension/pg_buffercache* +%{pgbaseinstdir}/share/extension/pg_freespacemap* +%{pgbaseinstdir}/share/extension/pg_prewarm* +%{pgbaseinstdir}/share/extension/pg_stat_statements* +%{pgbaseinstdir}/share/extension/pg_trgm* +%{pgbaseinstdir}/share/extension/pg_visibility* +%{pgbaseinstdir}/share/extension/pgcrypto* +%{pgbaseinstdir}/share/extension/pgrowlocks* +%{pgbaseinstdir}/share/extension/pgstattuple* +%{pgbaseinstdir}/share/extension/postgres_fdw* +%{pgbaseinstdir}/share/extension/refint* +%{pgbaseinstdir}/share/extension/seg* +%if %ssl +%{pgbaseinstdir}/share/extension/sslinfo* +%endif +%{pgbaseinstdir}/share/extension/tablefunc* +%{pgbaseinstdir}/share/extension/tcn* +%{pgbaseinstdir}/share/extension/tsm_system_rows* +%{pgbaseinstdir}/share/extension/tsm_system_time* +%{pgbaseinstdir}/share/extension/unaccent* +%if %uuid +%{pgbaseinstdir}/share/extension/uuid-ossp* +%endif +%if %xml +%{pgbaseinstdir}/share/extension/xml2* +%endif +%{pgbaseinstdir}/bin/oid2name +%{pgbaseinstdir}/bin/vacuumlo +%{pgbaseinstdir}/bin/pg_recvlogical +%{pgbaseinstdir}/bin/pg_standby +%{pgbaseinstdir}/share/man/man1/oid2name.1 +%{pgbaseinstdir}/share/man/man1/pg_recvlogical.1 +%{pgbaseinstdir}/share/man/man1/pg_standby.1 +%{pgbaseinstdir}/share/man/man1/vacuumlo.1 + +%files libs -f pg_libpq5.lst +%defattr(-,root,root) +%{pgbaseinstdir}/lib/libpq.so.* +%{pgbaseinstdir}/lib/libecpg.so* +%{pgbaseinstdir}/lib/libpgfeutils.a +%{pgbaseinstdir}/lib/libpgtypes.so.* +%{pgbaseinstdir}/lib/libecpg_compat.so.* +%{pgbaseinstdir}/lib/libpqwalreceiver.so +%config(noreplace) %attr (644,root,root) %{pgbaseinstdir}/share/%{sname}-%{pgmajorversion}-libs.conf + +%files server -f pg_server.lst +%defattr(-,root,root) +%if %{systemd_enabled} +%{pgbaseinstdir}/bin/%{sname}-%{pgmajorversion}-setup +%{_bindir}/%{sname}-%{pgmajorversion}-setup +%{pgbaseinstdir}/bin/%{sname}-%{pgmajorversion}-check-db-dir +%{_tmpfilesdir}/%{sname}-%{pgmajorversion}.conf +%{_unitdir}/%{sname}-%{pgmajorversion}.service +%else +%config(noreplace) %{_initrddir}/%{sname}-%{pgmajorversion} +%endif +%if %pam +%config(noreplace) /etc/pam.d/%{sname} +%endif +%attr (755,root,root) %dir /etc/sysconfig/pgsql +%{pgbaseinstdir}/bin/initdb +%{pgbaseinstdir}/bin/pg_controldata +%{pgbaseinstdir}/bin/pg_ctl +%{pgbaseinstdir}/bin/pg_checksums +%{pgbaseinstdir}/bin/pg_resetwal +%{pgbaseinstdir}/bin/postgres +%{pgbaseinstdir}/bin/postmaster +%{pgbaseinstdir}/share/man/man1/initdb.* +%{pgbaseinstdir}/share/man/man1/pg_controldata.* +%{pgbaseinstdir}/share/man/man1/pg_ctl.* +%{pgbaseinstdir}/share/man/man1/pg_resetwal.* +%{pgbaseinstdir}/share/man/man1/pg_checksums.* +%{pgbaseinstdir}/share/man/man1/postgres.* +%{pgbaseinstdir}/share/man/man1/postmaster.* +%{pgbaseinstdir}/share/postgres.bki +%{pgbaseinstdir}/share/postgres.description +%{pgbaseinstdir}/share/postgres.shdescription +%{pgbaseinstdir}/share/system_views.sql +%{pgbaseinstdir}/share/*.sample +%{pgbaseinstdir}/share/timezonesets/* +%{pgbaseinstdir}/share/tsearch_data/*.affix +%{pgbaseinstdir}/share/tsearch_data/*.dict +%{pgbaseinstdir}/share/tsearch_data/*.ths +%{pgbaseinstdir}/share/tsearch_data/*.rules +%{pgbaseinstdir}/share/tsearch_data/*.stop +%{pgbaseinstdir}/share/tsearch_data/*.syn +%{pgbaseinstdir}/lib/dict_int.so +%{pgbaseinstdir}/lib/dict_snowball.so +%{pgbaseinstdir}/lib/dict_xsyn.so +%{pgbaseinstdir}/lib/euc2004_sjis2004.so +%{pgbaseinstdir}/lib/pgoutput.so +%{pgbaseinstdir}/lib/plpgsql.so +%dir %{pgbaseinstdir}/share/extension +%{pgbaseinstdir}/share/extension/plpgsql* + +%dir %{pgbaseinstdir}/lib +%dir %{pgbaseinstdir}/share +%attr(700,postgres,postgres) %dir /var/lib/pgsql +%attr(700,postgres,postgres) %dir /var/lib/pgsql/%{pgmajorversion} +%attr(700,postgres,postgres) %dir /var/lib/pgsql/%{pgmajorversion}/data +%attr(700,postgres,postgres) %dir /var/lib/pgsql/%{pgmajorversion}/backups +%attr(755,postgres,postgres) %dir /var/run/%{sname} +%{pgbaseinstdir}/lib/*_and_*.so +%{pgbaseinstdir}/share/information_schema.sql +%{pgbaseinstdir}/share/snowball_create.sql +%{pgbaseinstdir}/share/sql_features.txt + +%files devel -f pg_devel.lst +%defattr(-,root,root) +%{pgbaseinstdir}/include/* +%{pgbaseinstdir}/bin/ecpg +%{pgbaseinstdir}/lib/libpq.so +%{pgbaseinstdir}/lib/libecpg.so +%{pgbaseinstdir}/lib/libpq.a +%{pgbaseinstdir}/lib/libecpg.a +%{pgbaseinstdir}/lib/libecpg_compat.so +%{pgbaseinstdir}/lib/libecpg_compat.a +%{pgbaseinstdir}/lib/libpgcommon.a +%{pgbaseinstdir}/lib/libpgcommon_shlib.a +%{pgbaseinstdir}/lib/libpgport.a +%{pgbaseinstdir}/lib/libpgport_shlib.a +%{pgbaseinstdir}/lib/libpgtypes.so +%{pgbaseinstdir}/lib/libpgtypes.a +%{pgbaseinstdir}/lib/pgxs/* +%{pgbaseinstdir}/lib/pkgconfig/* +%{pgbaseinstdir}/share/man/man1/ecpg.* + +%if %llvm +%files llvmjit +%defattr(-,root,root) +%{pgbaseinstdir}/lib/bitcode/* +%{pgbaseinstdir}/lib/llvmjit.so +%{pgbaseinstdir}/lib/llvmjit_types.bc +%endif + +%if %plperl +%files plperl -f pg_plperl.lst +%defattr(-,root,root) +%{pgbaseinstdir}/lib/plperl.so +%{pgbaseinstdir}/share/extension/plperl* +%endif + +%if %pltcl +%files pltcl -f pg_pltcl.lst +%defattr(-,root,root) +%{pgbaseinstdir}/lib/pltcl.so +%{pgbaseinstdir}/share/extension/pltcl* +%endif + +%if %plpython2 +%files plpython -f pg_plpython.lst +%defattr(-,root,root) +%{pgbaseinstdir}/lib/plpython2.so +%{pgbaseinstdir}/share/extension/plpython2u* +%{pgbaseinstdir}/share/extension/plpythonu* +%{pgbaseinstdir}/lib/hstore_plpython2.so +%{pgbaseinstdir}/lib/jsonb_plpython2.so +%{pgbaseinstdir}/lib/ltree_plpython2.so +%{pgbaseinstdir}/share/extension/*_plpythonu* +%{pgbaseinstdir}/share/extension/*_plpython2u* +%endif + +%if %plpython3 +%files plpython3 -f pg_plpython3.lst +%{pgbaseinstdir}/share/extension/plpython3* +%{pgbaseinstdir}/lib/plpython3.so +%{pgbaseinstdir}/lib/hstore_plpython3.so +%{pgbaseinstdir}/lib/jsonb_plpython3.so +%{pgbaseinstdir}/lib/ltree_plpython3.so +%{pgbaseinstdir}/share/extension/*_plpython3u* +%endif + +%if %test +%files test +%defattr(-,postgres,postgres) +%attr(-,postgres,postgres) %{pgbaseinstdir}/lib/test/* +%attr(-,postgres,postgres) %dir %{pgbaseinstdir}/lib/test +%endif + +%changelog +* Tue Feb 7 2023 Devrim Gündüz - 12.14-1PGDG +- Update to 12.14, per changes described at + https://www.postgresql.org/docs/release/12.14/ +- Enable TAP tests on all RHEL versions, per report from Bill Smith. + Commit 4f08cb8d41b8 is now obsolete, it seems. + +* Mon Jan 2 2023 Devrim Gündüz - 12.13-4PGDG +- Use network-online.target instead of network.target in unit file. + Per https://www.postgresql.org/message-id/e6d2c602-db46-0709-6519-ade189fa5203%40comcast.net + +* Mon Dec 05 2022 Devrim Gündüz - 12.13-3PGDG +- Get rid of AT and switch to GCC on RHEL 7 - ppc64le + +* Tue Nov 29 2022 Devrim Gündüz - 12.13-2PGDG +- Rebuild against new LLVM on RHEL 9 - aarch64 + +* Wed Nov 9 2022 Devrim Gündüz - 12.13-1PGDG +- Update to 12.13, per changes described at + https://www.postgresql.org/docs/release/12.13/ +- Remove temp patch added in 12.12-3 + +* Wed Oct 19 2022 Devrim Gündüz - 12.12-3PGDG +- Add a temp patch to build against LLVM 15. Needed for Fedora 37. + +* Fri Aug 12 2022 - John Harvey 12.12-2PGDG +- Fix macro for consistency +- Add trailing slash for consistency with other PGs + +* Tue Aug 9 2022 Devrim Gündüz - 12.12-1PGDG +- Update to 12.12, per changes described at + https://www.postgresql.org/docs/release/12.12/ +- Require LLVM and clang 13 on SLES 15, as SP4 is out and SP2 is already EOLed. +- Fix long standing "absolute symlink" error while building the package +- Create a symlink of pg_regress instead of full copy to fix "duplicate + build-id" warning while building the package. + +* Tue Jul 26 2022 Devrim Gündüz - 12.11-4PGDG +- Add gcc-c++ BR expliclity. + +* Fri Jun 24 2022 Devrim Gündüz - 12.11-3PGDG +- Enable LLVM on ppc64le except on RHEL 7, per report from Chuan Hua Zhao + +* Thu May 19 2022 Devrim Gündüz - 12.11-2PGDG +- Undefine _package_note_file macro. This is needed for Fedora 36+, + but does not hurt to use in all distros. + Per https://fedoraproject.org/wiki/Changes/Package_information_on_ELF_objects + and help from Fedora developers on IRC. + +* Wed May 11 2022 Devrim Gündüz - 12.11-1PGDG +- Update to 12.11, per changes described at + https://www.postgresql.org/docs/release/12.11/ + +* Tue May 10 2022 Devrim Gündüz - 12.10-3PGDG +- Rebuild on RHEL 8 against new LLVM and GCC. + +* Fri Feb 18 2022 Devrim Gündüz - 12.10-2PGDG +- Rebuild on Fedora 34 because of LLVM and GCC updates. + +* Tue Feb 8 2022 Devrim Gündüz - 12.10-1PGDG +- Update to 12.10, per changes described at + https://www.postgresql.org/docs/release/12.10/ +- Add a patch to revert aa2215d6b on RHEL 6. + +* Tue Feb 1 2022 Devrim Gündüz - 12.9-6PGDG +- Rebuild on Fedora 35 and RHEL 9 because of LLVM and GCC updates. + +* Wed Jan 26 2022 John Harvey - 12.9-5PGDG +- Fix PAM support on suse + +* Thu Dec 23 2021 Devrim Gündüz - 12.9-4PGDG +- Require libLLVM11 on SLES 15, not llvm11 (compiler). Per report from + Tiago ANASTACIO: https://redmine.postgresql.org/issues/7007 + +* Tue Nov 30 2021 John Harvey - 12.9-3PGDG +- Convert a few remaining pginstdir's to pgbaseinstdir's for consistency + +* Thu Nov 25 2021 Devrim Gündüz - 12.9-2PGDG +- Rebuild against LLVM 12 on RHEL 8 / aarch64. + +* Mon Nov 8 2021 Devrim Gündüz - 12.9-1PGDG +- Update to 12.9, per changes described at + https://www.postgresql.org/docs/release/12.9/ +- Configure systemd to not sigkill the postmaster, per Justin Pryzby. + +* Mon Nov 8 2021 John Harvey - 12.8-4PGDG +- Ensure that /var/lib/pgsql is postgres-owned on SLES. This fixes + postgres startup on SLES when using the default logfile path. + +* Mon Nov 1 2021 Devrim Gündüz - 12.8-3PGDG +- Fix PL/Python3 dependency on SLES 12 and 15. + +* Tue Oct 19 2021 Devrim Gündüz - 12.8-2PGDG +- Fix Makefile.regress, so that regression tests can actually be run. + Per report from Tomoaki Sato. + +* Wed Aug 11 2021 Devrim Gündüz - 12.8-1PGDG +- Update to 12.8, per changes described at + https://www.postgresql.org/docs/release/12.8/ + +* Tue Jul 13 2021 Devrim Gündüz - 12.7-3PGDG +- Rebuild against clang11 and llvm11 on SLES 15 SP3 + +* Tue May 18 2021 Devrim Gündüz - 12.7-2PGDG +- Rebuild against new CLANG and LLVM on RHEL 8.4 + +* Thu May 13 2021 Devrim Gündüz - 12.7-1PGDG +- Update to 12.7, per changes described at + https://www.postgresql.org/docs/release/12.7/ + +* Thu Feb 11 2021 Devrim Gündüz - 12.6-2PGDG +- A few fixes around llvm, sdt and selinux macros, so that they + work on RHEL 6 as well. + +* Tue Feb 9 2021 Devrim Gündüz - 12.6-1PGDG +- Update to 12.6, per changes described at + https://www.postgresql.org/docs/release/12.6/ + +* Wed Jan 6 2021 Devrim Gündüz - 13.5-2PGDG +- Drop Advance Toolchain on RHEL 8 - ppc64le. +- Enable LLVM support on RHEL 8 - ppc64le + +* Mon Nov 9 2020 Devrim Gündüz - 12.5-1PGDG +- Update to 12.5, per changes described at + https://www.postgresql.org/docs/release/12.5/ + +* Wed Nov 4 2020 Devrim Gündüz - 12.4-4PGDG +- Rebuild against new CLANG and LLVM on RHEL 8.3 + +* Wed Sep 23 2020 Devrim Gündüz - 12.4-3PGDG +- Add setup script under $PATH + +* Tue Aug 25 2020 Devrim Gündüz - 12.4-2PGDG +- Use correct dependencies to enable LLVM build on RHEL 7 and aarch64 + +* Wed Aug 12 2020 Devrim Gündüz - 12.4-1PGDG +- Update to 12.4, per changes described at + https://www.postgresql.org/docs/release/12.4/ + +* Mon Jun 15 2020 Devrim Gündüz - 12.3-6PGDG +- Fix builds if plperl macro is disabled. Per report and patch from + Floris Van Nee. + +* Sun Jun 14 2020 Devrim Gündüz - 12.3-5PGDG +- Oops, disable PY2 on Fedora 33. +- Fix LLVM dependency + +* Thu Jun 11 2020 Devrim Gündüz - 12.3-4PGDG +- Obsolete libpq-devel that comes with the OS. + +* Wed Jun 10 2020 Devrim Gündüz - 12.3-3PGDG +- Fix RHEL 6 builds, where PY3 is not available. Per report from + Aparna Patil. + +* Fri May 29 2020 Devrim Gündüz - 12.3-2PGDG +- Fix spec file breakage when plpython2 macro is disabled. + Disable PL/Python2 builds on platforms that don't have PY2. + This is probably needed for at least Fedora 33, and also will be + useful for SLES 15 as well. + +* Wed May 13 2020 Devrim Gündüz - 12.3-1PGDG +- Update to 12.3, per changes described at + https://www.postgresql.org/docs/release/12.3/ +- Fix RHEL 8 builds: Paths changed in 8.2... + +* Tue Apr 28 2020 2020 Devrim Gündüz - 12.2-3PGDG +- Fix F-32 PL/Python2 dependency. Fedora 32 is the last version which + supports PL/Python2 package. + +* Mon Feb 17 2020 Devrim Gündüz - 12.2-2PGDG +- Re-add debuginfo package + +* Tue Feb 11 2020 Devrim Gündüz - 12.2-1PGDG +- Update to 12.2, per changes described at + https://www.postgresql.org/docs/release/12.2/ + +* Tue Nov 19 2019 Devrim Gündüz - 12.1-2PGDG +- Re-enable llvmjit subpackage on SLES 12 +- Fix PL/Python 3 packaging. + +* Mon Nov 11 2019 Devrim Gündüz - 12.1-1PGDG +- Update to 12.1, per changes described at + https://www.postgresql.org/docs/release/12.1/ +- Fix Python dependency issue in the main package, and move all + plpython* packages into their respective subpackages. + +* Mon Oct 28 2019 Devrim Gündüz - 12.0-2PGDG +- Remove obsoleted tmpfiles_create macro. We don't need it anyway, + already manually install the file. + +* Tue Oct 1 2019 Devrim Gündüz - 12.0-1 +- Please welcome PostgreSQL 12.0! + +* Fri Sep 27 2019 Devrim Gündüz - 12rc1_2 +- Update to PostgreSQL 12 RC1 +- Fix RHEL 6 init script for rc, per patch and report from Justin Pryzby. +- Fix RHEL 6 packaging. Per report from Justin Pryzby. + +* Fri Sep 13 2019 Devrim Gündüz - 12beta4_1PGDG +- Update to PostgreSQL 12 Beta 4. + +* Sun Sep 1 2019 Devrim Gündüz - 12beta3_2PGDG +- Initial attempt to support PL/Python3 on RHEL 7. Python2 is almost + EOL, so this is a sane move now. + Per https://redmine.postgresql.org/issues/2701 + +* Tue Aug 6 2019 Devrim Gündüz - 12beta3_1PGDG +- Update to 12beta3 + +* Wed Jun 19 2019 Devrim Gündüz - 12beta2_1PGDG +- Update to 12beta2 + +* Thu May 23 2019 Devrim Gündüz - 12beta1_1PGDG +- Update to 12beta1 +- Re-arrange changelog (after removing daily build macro) + +* Fri Feb 15 2019 Devrim Gündüz - 12.0-devel +- Disable jit on s390. Patch from Mark Wong. +- Initial attempt for RHEL 8 packaging updates. +- Rename plpython macro to plpython2, to stress that it is for Python 2. +- Initial cut for PostgreSQL 12