Compare commits

...

No commits in common. 'c9' and 'c8-stream-13' have entirely different histories.

2
.gitignore vendored

@ -1,4 +1,4 @@
SOURCES/postgresql-12.22.tar.bz2
SOURCES/postgresql-13.18-US.pdf
SOURCES/postgresql-13.18.tar.bz2
SOURCES/postgresql-setup-8.6.tar.gz
SOURCES/postgresql-setup-8.7.tar.gz

@ -1,4 +1,4 @@
4f0a2bfcdaa6b370029353d7a01451d7a8282750 SOURCES/postgresql-12.22.tar.bz2
955d79c1020409995834540260981b95e269b980 SOURCES/postgresql-13.18-US.pdf
e314353cf318ce5e33dfb73a91cd2ac9553c9885 SOURCES/postgresql-13.18.tar.bz2
9e12ee26bf41d3831f83049b51ae5da76de2ce12 SOURCES/postgresql-setup-8.6.tar.gz
fb97095dc9648f9c31d58fcb406831da5e419ddf SOURCES/postgresql-setup-8.7.tar.gz

@ -1,58 +0,0 @@
#! /bin/sh
# This script builds the PDF version of the PostgreSQL documentation.
#
# In principle we could do this as part of the RPM build, but there are
# good reasons not to:
# 1. The build would take longer and have a larger BuildRequires footprint.
# 2. The generated PDF has timestamps in it, which would inevitably result
# in multilib conflicts due to slightly different timestamps.
# So instead, we run this manually when rebasing to a new upstream release,
# and treat the resulting PDF as a separate Source file.
#
# You will need to have the docbook packages installed to run this.
# Expect it to take about 20 minutes and use about 160MB of disk.
set -e
# Pass package version (e.g., 9.1.2) as argument
VERSION=$1
test -z "$VERSION" && VERSION=`awk '/^Version:/ { print $2; }' postgresql.spec`
TARGETFILE=postgresql-$VERSION-US.pdf
test -f "$TARGETFILE" && echo "$TARGETFILE exists" && exit 1
echo Building $TARGETFILE ...
# Unpack postgresql
rm -rf postgresql-$VERSION
tar xfj postgresql-$VERSION.tar.bz2
cd postgresql-$VERSION
# Apply any patches that affect the PDF documentation
# patch -p1 < ../xxx.patch
# Configure ...
./configure >/dev/null
# Build the PDF docs
cd doc/src/sgml
make postgres-US.pdf >make.log
mv -f postgres-US.pdf ../../../../$TARGETFILE
# Clean up
cd ../../../..
rm -rf postgresql-$VERSION
exit 0

@ -18,10 +18,10 @@ index bcdbd95..4bea236 100644
backend/replication/pgoutput \
fe_utils \
diff --git a/src/Makefile.global.in b/src/Makefile.global.in
index b9d86ac..29df69f 100644
index b75bafd..ddd381b 100644
--- a/src/Makefile.global.in
+++ b/src/Makefile.global.in
@@ -549,7 +549,7 @@ endif
@@ -576,7 +576,7 @@ endif
# How to link to libpq. (This macro may be used as-is by backend extensions.
# Client-side code should go through libpq_pgport or libpq_pgport_shlib,
# instead.)
@ -29,8 +29,8 @@ index b9d86ac..29df69f 100644
+libpq = -lpq
# libpq_pgport is for use by client executables (not libraries) that use libpq.
# We force clients to pull symbols from the non-shared libraries libpgport
@@ -579,7 +579,6 @@ endif
# We want clients to pull symbols from the non-shared libraries libpgport
@@ -619,7 +619,6 @@ endif
# Commonly used submake targets
submake-libpq: | submake-generated-headers

@ -0,0 +1,49 @@
PostgreSQL ecpg/initdb manual page fixes
This was generated based on automatic Red Hat manual page scan (private
RHBZ#948933).
diff -up postgresql-13.1/doc/src/sgml/man1/ecpg.1.patch6 postgresql-13.1/doc/src/sgml/man1/ecpg.1
--- postgresql-13.1/doc/src/sgml/man1/ecpg.1.patch6 2020-11-09 23:38:03.000000000 +0100
+++ postgresql-13.1/doc/src/sgml/man1/ecpg.1 2020-11-18 09:26:40.547324791 +0100
@@ -81,6 +81,11 @@ ORACLE\&.
1\&.
.RE
.PP
+\fB\-h \fR
+.RS 4
+Parse a header file, this option includes option \fB\-c\fR\&.
+.RE
+.PP
\fB\-h\fR
.RS 4
Process header files\&. When this option is specified, the output file extension becomes
@@ -144,6 +149,11 @@ Allow question mark as placeholder for c
.RE
.RE
.PP
+\fB\-\-regression\fR
+.RS 4
+Run in regression testing mode\&.
+.RE
+.PP
\fB\-t\fR
.RS 4
Turn on autocommit of transactions\&. In this mode, each SQL command is automatically committed unless it is inside an explicit transaction block\&. In the default mode, commands are committed only when
diff -up postgresql-13.1/doc/src/sgml/man1/initdb.1.patch6 postgresql-13.1/doc/src/sgml/man1/initdb.1
--- postgresql-13.1/doc/src/sgml/man1/initdb.1.patch6 2020-11-09 23:38:05.000000000 +0100
+++ postgresql-13.1/doc/src/sgml/man1/initdb.1 2020-11-18 09:25:05.082348424 +0100
@@ -311,6 +311,13 @@ determines that an error prevented it fr
.PP
Other options:
.PP
+\fB\-s\fR
+.br
+\fB\-\-show\fR
+.RS 4
+Print the internal settings, then exit\&.
+.RE
+.PP
\fB\-V\fR
.br
\fB\-\-version\fR

@ -1,12 +0,0 @@
diff -up postgresql-13.1/src/interfaces/Makefile.patch10 postgresql-13.1/src/interfaces/Makefile
--- postgresql-13.1/src/interfaces/Makefile.patch10 2021-02-02 21:33:23.235292305 +0100
+++ postgresql-13.1/src/interfaces/Makefile 2021-02-02 21:33:30.281365440 +0100
@@ -12,7 +12,7 @@ subdir = src/interfaces
top_builddir = ../..
include $(top_builddir)/src/Makefile.global
-SUBDIRS = libpq ecpg
+SUBDIRS = libpq
$(recurse)

@ -1,102 +0,0 @@
diff -ur postgresql-13.4/contrib/pgcrypto/expected/pgp-decrypt.out postgresql-13.4.patched/contrib/pgcrypto/expected/pgp-decrypt.out
--- postgresql-13.4/contrib/pgcrypto/expected/pgp-decrypt.out 2021-08-09 16:49:05.000000000 -0400
+++ postgresql-13.4.patched/contrib/pgcrypto/expected/pgp-decrypt.out 2021-09-01 08:16:48.138600886 -0400
@@ -4,20 +4,6 @@
-- Checking ciphers
select pgp_sym_decrypt(dearmor('
-----BEGIN PGP MESSAGE-----
-Comment: dat1.blowfish.sha1.mdc.s2k3.z0
-
-jA0EBAMCfFNwxnvodX9g0jwB4n4s26/g5VmKzVab1bX1SmwY7gvgvlWdF3jKisvS
-yA6Ce1QTMK3KdL2MPfamsTUSAML8huCJMwYQFfE=
-=JcP+
------END PGP MESSAGE-----
-'), 'foobar');
- pgp_sym_decrypt
------------------
- Secret message.
-(1 row)
-
-select pgp_sym_decrypt(dearmor('
------BEGIN PGP MESSAGE-----
Comment: dat1.aes.sha1.mdc.s2k3.z0
jA0EBwMCci97v0Q6Z0Zg0kQBsVf5Oe3iC+FBzUmuMV9KxmAyOMyjCc/5i8f1Eest
diff -ur postgresql-13.4/contrib/pgcrypto/expected/pgp-pubkey-decrypt.out postgresql-13.4.patched/contrib/pgcrypto/expected/pgp-pubkey-decrypt.out
--- postgresql-13.4/contrib/pgcrypto/expected/pgp-pubkey-decrypt.out 2021-08-09 16:49:05.000000000 -0400
+++ postgresql-13.4.patched/contrib/pgcrypto/expected/pgp-pubkey-decrypt.out 2021-09-01 08:05:27.750172653 -0400
@@ -594,13 +594,6 @@
(1 row)
select pgp_pub_decrypt(dearmor(data), dearmor(seckey))
-from keytbl, encdata where keytbl.id=2 and encdata.id=2;
- pgp_pub_decrypt
------------------
- Secret msg
-(1 row)
-
-select pgp_pub_decrypt(dearmor(data), dearmor(seckey))
from keytbl, encdata where keytbl.id=3 and encdata.id=3;
pgp_pub_decrypt
-----------------
diff -ur postgresql-13.4/contrib/pgcrypto/Makefile postgresql-13.4.patched/contrib/pgcrypto/Makefile
--- postgresql-13.4/contrib/pgcrypto/Makefile 2021-08-09 16:49:05.000000000 -0400
+++ postgresql-13.4.patched/contrib/pgcrypto/Makefile 2021-09-01 08:26:47.207164873 -0400
@@ -5,7 +5,7 @@
INT_TESTS = sha2
OSSL_SRCS = openssl.c pgp-mpi-openssl.c
-OSSL_TESTS = sha2 des 3des cast5
+OSSL_TESTS = sha2
ZLIB_TST = pgp-compression
ZLIB_OFF_TST = pgp-zlib-DISABLED
@@ -49,12 +49,13 @@
pgcrypto--1.0--1.1.sql
PGFILEDESC = "pgcrypto - cryptographic functions"
-REGRESS = init md5 sha1 hmac-md5 hmac-sha1 blowfish rijndael \
+REGRESS = init md5 sha1 hmac-md5 hmac-sha1 rijndael \
$(CF_TESTS) \
- crypt-des crypt-md5 crypt-blowfish crypt-xdes \
+ crypt-md5 \
pgp-armor pgp-decrypt pgp-encrypt $(CF_PGP_TESTS) \
pgp-pubkey-decrypt pgp-pubkey-encrypt pgp-info
+#REGRESS = init pgp-pubkey-decrypt pgp-decrypt \
EXTRA_CLEAN = gen-rtab
ifdef USE_PGXS
diff -ur postgresql-13.4/contrib/pgcrypto/sql/pgp-decrypt.sql postgresql-13.4.patched/contrib/pgcrypto/sql/pgp-decrypt.sql
--- postgresql-13.4/contrib/pgcrypto/sql/pgp-decrypt.sql 2021-08-09 16:49:05.000000000 -0400
+++ postgresql-13.4.patched/contrib/pgcrypto/sql/pgp-decrypt.sql 2021-09-01 08:16:12.525212175 -0400
@@ -5,16 +5,6 @@
-- Checking ciphers
select pgp_sym_decrypt(dearmor('
-----BEGIN PGP MESSAGE-----
-Comment: dat1.blowfish.sha1.mdc.s2k3.z0
-
-jA0EBAMCfFNwxnvodX9g0jwB4n4s26/g5VmKzVab1bX1SmwY7gvgvlWdF3jKisvS
-yA6Ce1QTMK3KdL2MPfamsTUSAML8huCJMwYQFfE=
-=JcP+
------END PGP MESSAGE-----
-'), 'foobar');
-
-select pgp_sym_decrypt(dearmor('
------BEGIN PGP MESSAGE-----
Comment: dat1.aes.sha1.mdc.s2k3.z0
jA0EBwMCci97v0Q6Z0Zg0kQBsVf5Oe3iC+FBzUmuMV9KxmAyOMyjCc/5i8f1Eest
diff -ur postgresql-13.4/contrib/pgcrypto/sql/pgp-pubkey-decrypt.sql postgresql-13.4.patched/contrib/pgcrypto/sql/pgp-pubkey-decrypt.sql
--- postgresql-13.4/contrib/pgcrypto/sql/pgp-pubkey-decrypt.sql 2021-08-09 16:49:05.000000000 -0400
+++ postgresql-13.4.patched/contrib/pgcrypto/sql/pgp-pubkey-decrypt.sql 2021-09-01 08:06:18.963732342 -0400
@@ -606,9 +606,6 @@
from keytbl, encdata where keytbl.id=1 and encdata.id=1;
select pgp_pub_decrypt(dearmor(data), dearmor(seckey))
-from keytbl, encdata where keytbl.id=2 and encdata.id=2;
-
-select pgp_pub_decrypt(dearmor(data), dearmor(seckey))
from keytbl, encdata where keytbl.id=3 and encdata.id=3;
select pgp_pub_decrypt(dearmor(data), dearmor(seckey))

@ -32,11 +32,8 @@
%{!?beta:%global beta 0}
%{!?test:%global test 1}
# Disable temporarily to be able to build the package
# tracked in RHBZ#1940964
%{!?llvmjit:%global llvmjit 0}
%{!?external_libpq:%global external_libpq 0}
%{!?upgrade:%global upgrade 1}
%{!?plpython:%global plpython 0}
%{!?plpython3:%global plpython3 1}
%{!?pltcl:%global pltcl 1}
%{!?plperl:%global plperl 1}
@ -79,15 +76,14 @@ Url: http://www.postgresql.org/
%global prev_prefix %{_libdir}/pgsql/postgresql-%{prevmajorversion}
%global precise_version %{?epoch:%epoch:}%version-%release
%global setup_version 8.6
%global setup_version 8.7
%global service_name postgresql.service
Source0: https://ftp.postgresql.org/pub/source/v%{version}/postgresql-%{version}.tar.bz2
# The PDF file is generated by generate-pdf.sh, which see for comments
# PDF can be downloaded from the upstream
# Don't forget to rename the PDF file with the full version prefix (e.g. postgresql-13.18-US.pdf)
Source1: postgresql-%{version}-US.pdf
# generate-pdf.sh is not used during RPM build, but include for documentation
Source2: generate-pdf.sh
Source3: https://ftp.postgresql.org/pub/source/v%{prevversion}/postgresql-%{prevversion}.tar.bz2
Source4: Makefile.regress
Source9: postgresql.tmpfiles.d
@ -108,30 +104,28 @@ Source17: https://ftp.postgresql.org/pub/source/v%{prevversion}/postgresql-%{pre
Patch1: rpm-pgsql.patch
Patch2: postgresql-logging.patch
Patch5: postgresql-var-run-socket.patch
Patch6: postgresql-man.patch
Patch8: postgresql-external-libpq.patch
Patch9: postgresql-server-pg_config.patch
Patch12: postgresql-no-libecpg.patch
Patch14: postgresql-pgcrypto-openssl3-tests.patch
BuildRequires: make
BuildRequires: gcc
BuildRequires: perl(ExtUtils::MakeMaker) glibc-devel bison flex gawk
BuildRequires: perl(ExtUtils::Embed), perl-devel
BuildRequires: perl(Opcode)
%if 0%{?fedora} || 0%{?rhel} > 7
BuildRequires: perl-generators
%endif
BuildRequires: readline-devel zlib-devel
BuildRequires: systemd systemd-devel util-linux
BuildRequires: multilib-rpm-config
%if %external_libpq
BuildRequires: libpq-devel >= %version
%endif
BuildRequires: docbook-style-xsl
BuildRequires: libpq-devel
# postgresql-setup build requires
BuildRequires: m4 elinks docbook-utils help2man
%if %plpython
BuildRequires: python2-devel
%endif
%if %plpython3
BuildRequires: python3-devel
%endif
@ -181,8 +175,7 @@ BuildRequires: libicu-devel
%endif
# https://bugzilla.redhat.com/1464368
# and do not provide pkgconfig RPM provides (RHBZ#1980992)
%global __provides_exclude_from %{_libdir}/(pgsql|pkgconfig)
%global __provides_exclude_from %{_libdir}/pgsql
%description
PostgreSQL is an advanced Object-Relational database management system (DBMS).
@ -194,37 +187,6 @@ over a network connection. The PostgreSQL server can be found in the
postgresql-server sub-package.
%if ! %external_libpq
%package private-libs
Summary: The shared libraries required only for this build of PostgreSQL server
Group: Applications/Databases
# for /sbin/ldconfig
Requires(post): glibc
Requires(postun): glibc
%description private-libs
The postgresql-private-libs package provides the shared libraries for this
build of PostgreSQL server and plugins build with this version of server.
For shared libraries used by client packages that need to connect to a
PostgreSQL server, install libpq package instead.
%package private-devel
Summary: PostgreSQL development header files for this build of PostgreSQL server
Group: Development/Libraries
Requires: %{name}-private-libs%{?_isa} = %precise_version
# Conflict is desired here, a user must pick one or another
Conflicts: libpq-devel
%description private-devel
The postgresql-private-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.
You need to install this package if you want to develop applications which
will interact with a PostgreSQL server.
%endif
%package server
Summary: The programs needed to create and run a PostgreSQL server
Requires: %{name}%{?_isa} = %precise_version
@ -275,18 +237,7 @@ Summary: PostgreSQL development header files and libraries
Requires: libicu-devel
%endif
%if %kerberos
Requires: krb5-devel
%endif
%if %llvmjit
Requires: clang-devel llvm-devel
%endif
%if %external_libpq
# Some extensions require libpq
# Do not make them care about whether server uses private or system-wide
# libpq, simply let the server pull the correct one
Requires: libpq-devel
%else
Requires: %{name}-private-devel
Requires: krb5-devel
%endif
%description server-devel
@ -341,7 +292,6 @@ Summary: The Perl procedural language for PostgreSQL
Requires: %{name}-server%{?_isa} = %precise_version
Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
%if %runselftest
BuildRequires: perl(Opcode)
BuildRequires: perl(Data::Dumper)
%endif
@ -352,6 +302,19 @@ Install this if you want to write database functions in Perl.
%endif
%if %plpython
%package plpython
Summary: The Python2 procedural language for PostgreSQL
Requires: %{name}-server%{?_isa} = %precise_version
Provides: %{name}-plpython2 = %precise_version
%description plpython
The postgresql-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 2.
%endif
%if %plpython3
%package plpython3
Summary: The Python3 procedural language for PostgreSQL
@ -388,25 +351,6 @@ PostgreSQL database management system, including regression tests and
benchmarks.
%endif
%if %llvmjit
%package llvmjit
Summary: Just-in-time compilation support for PostgreSQL
Requires: %{name}-server%{?_isa} = %{version}-%{release}
%if 0%{?rhel} && 0%{?rhel} == 7
Requires: llvm5.0 >= 5.0
%else
Requires: llvm => 5.0
%endif
Provides: postgresql-llvmjit >= %{version}-%{release}
BuildRequires: llvm-devel >= 5.0 clang-devel >= 5.0
%description llvmjit
The postgresql-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
%prep
(
@ -420,33 +364,18 @@ goal of accelerating analytics queries.
%patch1 -p1
%patch2 -p1
%patch5 -p1
%if %external_libpq
%patch6 -p1
%patch8 -p1
%else
%patch12 -p1
%endif
%patch9 -p1
%patch14 -p1
# We used to run autoconf here, but there's no longer any real need to,
# since Postgres ships with a reasonably modern configure script.
cp -p %{SOURCE1} .
%if ! %external_libpq
%global private_soname private%{majorversion}
find . -type f -name Makefile -exec sed -i -e "s/SO_MAJOR_VERSION=\s\?\([0-9]\+\)/SO_MAJOR_VERSION= %{private_soname}-\1/" {} \;
%endif
%if %upgrade
tar xfj %{SOURCE3}
# libpq from this upgrade-only build is dropped and the libpq from the main
# version is used. Use the same major hack therefore.
%if ! %external_libpq
find . -type f -name Makefile -exec sed -i -e "s/SO_MAJOR_VERSION=\s\?\([0-9]\+\)/SO_MAJOR_VERSION= %{private_soname}-\1/" {} \;
%endif
# apply once SOURCE3 is extracted
%endif
@ -455,10 +384,6 @@ find . -type f -name .gitignore | xargs rm
%build
# Avoid LTO on armv7hl as it runs out of memory
%ifarch armv7hl s390x
%define _lto_cflags %{nil}
%endif
# fail quickly and obviously if user tries to build as root
%if %runselftest
if [ x"`id -u`" = x0 ]; then
@ -485,10 +410,19 @@ cd ..
# Fiddling with CFLAGS.
CFLAGS="${CFLAGS:-%optflags}"
%ifarch %{power64}
# See the bug #1051075, ppc64 should benefit from -O3
CFLAGS=`echo $CFLAGS | xargs -n 1 | sed 's|-O2|-O3|g' | xargs -n 100`
%endif
# Strip out -ffast-math from CFLAGS....
CFLAGS=`echo $CFLAGS|xargs -n 1|grep -v ffast-math|xargs -n 100`
export CFLAGS
# 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.
common_configure_options='
--disable-rpath
%if %beta
@ -536,18 +470,49 @@ common_configure_options='
%if %icu
--with-icu
%endif
%if %llvmjit
--with-llvm
%endif
%if %plpython3
--with-python
%endif
'
%if %plpython3
export PYTHON=/usr/bin/python3
# These configure options must match main build
%configure $common_configure_options
%configure $common_configure_options \
--with-python
# Fortunately we don't need to build much except plpython itself.
%global python_subdirs \\\
src/pl/plpython \\\
contrib/hstore_plpython \\\
contrib/jsonb_plpython \\\
contrib/ltree_plpython
for dir in %python_subdirs; do
%make_build -C "$dir" all
done
# save built form in a directory that "make distclean" won't touch
for dir in %python_subdirs; do
rm -rf "${dir}3" # shouldn't exist, unless --short-circuit
cp -a "$dir" "${dir}3"
done
# must also save this version of Makefile.global for later
cp src/Makefile.global src/Makefile.global.python3
make distclean
%endif # %%plpython3
PYTHON=/usr/bin/python2
# Normal (python2) build begins here
%configure $common_configure_options \
%if %plpython
--with-python
%endif
unset PYTHON
%make_build world
@ -584,6 +549,32 @@ test_failure=0
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.python3 src/Makefile.global
touch -r src/Makefile.global.save src/Makefile.global
for dir in %python_subdirs; do
# because "make check" does "make install" on the whole tree,
# we must temporarily install *plpython3 dir as *plpython,
# since that is the subdirectory src/pl/Makefile knows about
mv "$dir" "${dir}2"
mv "${dir}3" "$dir"
done
for dir in %python_subdirs; do
run_testsuite "$dir"
done
for dir in %python_subdirs; do
# and clean up our mess
mv "$dir" "${dir}3"
mv "${dir}2" "${dir}"
done
mv -f src/Makefile.global.save src/Makefile.global
%endif
run_testsuite "contrib"
%endif
@ -614,6 +605,7 @@ upgrade_configure ()
# its ideas about installation paths.
# The -fno-aggressive-loop-optimizations is hack for #993532
PYTHON="${PYTHON-/usr/bin/python2}" \
CFLAGS="$CFLAGS -fno-aggressive-loop-optimizations" ./configure \
--build=%{_build} \
--host=%{_host} \
@ -634,22 +626,36 @@ upgrade_configure ()
%endif
%if %ssl
--with-openssl \
%endif
%if %plpython3
--with-python \
%endif
--with-tclconfig=%_libdir \
--with-system-tzdata=/usr/share/zoneinfo \
"$@"
}
%if %plpython3
export PYTHON=/usr/bin/python3
upgrade_configure --with-python
for dir in %python_subdirs; do
# Previous version doesn't necessarily have this.
test -d "$dir" || continue
%make_build -C "$dir" all
# save aside the only one file which we are interested here
cp "$dir"/*plpython3.so ./
done
unset PYTHON
make distclean
%endif
upgrade_configure \
%if %plpython
--with-python
%endif
make %{?_smp_mflags} all
make -C contrib %{?_smp_mflags} all
popd
# endif upgrade
%endif
%endif # %%upgrade
%install
@ -675,14 +681,19 @@ make DESTDIR=$RPM_BUILD_ROOT install-world
# We ship pg_config through libpq-devel
mv $RPM_BUILD_ROOT/%_mandir/man1/pg_{,server_}config.1
%if %external_libpq
rm $RPM_BUILD_ROOT/%_includedir/pg_config*.h
rm $RPM_BUILD_ROOT/%_includedir/libpq/libpq-fs.h
rm $RPM_BUILD_ROOT/%_includedir/postgres_ext.h
rm -r $RPM_BUILD_ROOT/%_includedir/pgsql/internal/
%else
ln -s pg_server_config $RPM_BUILD_ROOT/%_bindir/pg_config
rm $RPM_BUILD_ROOT/%{_libdir}/libpq.a
%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
for dir in %python_subdirs; do
%make_install -C "${dir}3"
done
mv -f src/Makefile.global.save src/Makefile.global
%endif
# make sure these directories exist even if we suppressed all contrib modules
@ -691,8 +702,8 @@ install -d -m 755 $RPM_BUILD_ROOT%{_datadir}/pgsql/extension
# multilib header hack
for header in \
%{_includedir}/pg_config.h \
%{_includedir}/pg_config_ext.h
%{_includedir}/pgsql/server/pg_config.h \
%{_includedir}/pgsql/server/pg_config_ext.h
do
%multilib_fix_c_header --file "$header"
done
@ -705,6 +716,10 @@ install -d $RPM_BUILD_ROOT/etc/pam.d
install -m 644 %{SOURCE10} $RPM_BUILD_ROOT/etc/pam.d/postgresql
%endif
# Create the directory for sockets.
install -d -m 755 $RPM_BUILD_ROOT%{?_localstatedir}/run/postgresql
# ... and make a tmpfiles script to recreate it at reboot.
mkdir -p $RPM_BUILD_ROOT%{_tmpfilesdir}
install -m 0644 %{SOURCE9} $RPM_BUILD_ROOT%{_tmpfilesdir}/postgresql.conf
@ -723,6 +738,12 @@ rm $RPM_BUILD_ROOT/%{_datadir}/man/man1/ecpg.1
pushd postgresql-%{prevversion}
make DESTDIR=$RPM_BUILD_ROOT install
make -C contrib DESTDIR=$RPM_BUILD_ROOT install
%if %plpython3
for file in *plpython3.so; do
install -m 755 "$file" \
$RPM_BUILD_ROOT/%_libdir/pgsql/postgresql-%prevmajorversion/lib
done
%endif
popd
# remove stuff we don't actually need for upgrade purposes
@ -764,10 +785,6 @@ rm $RPM_BUILD_ROOT/%{_datadir}/man/man1/ecpg.1
EOF
%endif
# Let plugins use the same llvmjit settings as server has
cat <<EOF >> $RPM_BUILD_ROOT%macrosdir/macros.%name
%%postgresql_server_llvmjit %llvmjit
EOF
%if %test
# tests. There are many files included here that are unnecessary,
@ -800,9 +817,9 @@ rm $RPM_BUILD_ROOT%{_libdir}/libpgfeutils.a
rm -f $RPM_BUILD_ROOT%{_bindir}/pgsql/hstore_plperl.so
%endif
# no python2, yet installed, remove
rm -f $RPM_BUILD_ROOT%{_datadir}/pgsql/extension/*_plpythonu*
rm -f $RPM_BUILD_ROOT%{_datadir}/pgsql/extension/*_plpython2u*
%if !%plpython
rm -f $RPM_BUILD_ROOT%{_bindir}/pgsql/hstore_plpython2.so
%endif
%if %nls
find_lang_bins ()
@ -821,15 +838,15 @@ find_lang_bins server.lst \
find_lang_bins contrib.lst \
pg_archivecleanup pg_test_fsync pg_test_timing pg_waldump
find_lang_bins main.lst \
pg_dump pg_upgrade pgscripts psql \
%if ! %external_libpq
libpq%{private_soname}-5
%endif
pg_dump pg_upgrade pgscripts psql
%if %plperl
find_lang_bins plperl.lst plperl
%endif
%if %plpython
find_lang_bins plpython.lst plpython
%endif
%if %plpython3
# plpython3 shares message files with plpython
find_lang_bins plpython3.lst plpython
%endif
%if %pltcl
@ -891,17 +908,6 @@ make -C postgresql-setup-%{setup_version} check
%{_mandir}/man1/reindexdb.*
%{_mandir}/man1/vacuumdb.*
%{_mandir}/man7/*
%if %llvmjit
# Install bitcode directory along with the main package,
# so that extensions can use this dir.
%dir %{_libdir}/pgsql/bitcode
%endif
%if ! %external_libpq
%files private-libs
%{_libdir}/libpq.so.*
%endif
%files docs
@ -920,6 +926,8 @@ make -C postgresql-setup-%{setup_version} check
%{_bindir}/pg_waldump
%{_bindir}/pgbench
%{_bindir}/vacuumlo
%dir %{_datadir}/pgsql/contrib
%dir %{_datadir}/pgsql/extension
%{_datadir}/pgsql/extension/adminpack*
%{_datadir}/pgsql/extension/amcheck*
%{_datadir}/pgsql/extension/autoinc*
@ -942,7 +950,13 @@ make -C postgresql-setup-%{setup_version} check
%if %{plperl}
%{_datadir}/pgsql/extension/jsonb_plperl*
%endif
%if %{plpython}
%{_datadir}/pgsql/extension/jsonb_plpythonu*
%{_datadir}/pgsql/extension/jsonb_plpython2u*
%endif
%if %{plpython3}
%{_datadir}/pgsql/extension/jsonb_plpythonu*
%{_datadir}/pgsql/extension/jsonb_plpython2u*
%{_datadir}/pgsql/extension/jsonb_plpython3u*
%endif
%{_datadir}/pgsql/extension/lo*
@ -987,6 +1001,9 @@ make -C postgresql-setup-%{setup_version} check
%if %plperl
%{_libdir}/pgsql/hstore_plperl.so
%endif
%if %plpython
%{_libdir}/pgsql/hstore_plpython2.so
%endif
%if %plpython3
%{_libdir}/pgsql/hstore_plpython3.so
%endif
@ -995,11 +1012,17 @@ make -C postgresql-setup-%{setup_version} check
%if %plperl
%{_libdir}/pgsql/jsonb_plperl.so
%endif
%if %plpython
%{_libdir}/pgsql/jsonb_plpython2.so
%endif
%if %plpython3
%{_libdir}/pgsql/jsonb_plpython3.so
%endif
%{_libdir}/pgsql/lo.so
%{_libdir}/pgsql/ltree.so
%if %plpython
%{_libdir}/pgsql/ltree_plpython2.so
%endif
%if %plpython3
%{_libdir}/pgsql/ltree_plpython3.so
%endif
@ -1114,7 +1137,7 @@ make -C postgresql-setup-%{setup_version} check
%attr(644,postgres,postgres) %config(noreplace) %{?_localstatedir}/lib/pgsql/.bash_profile
%attr(700,postgres,postgres) %dir %{?_localstatedir}/lib/pgsql/backups
%attr(700,postgres,postgres) %dir %{?_localstatedir}/lib/pgsql/data
%ghost %attr(755,postgres,postgres) %dir %{?_rundir}/postgresql
%attr(755,postgres,postgres) %dir %{?_localstatedir}/run/postgresql
%if %pam
%config(noreplace) /etc/pam.d/postgresql
%endif
@ -1132,21 +1155,6 @@ make -C postgresql-setup-%{setup_version} check
%{macrosdir}/macros.%name
%if ! %external_libpq
%files private-devel
%{_bindir}/pg_config
%{_includedir}/libpq-events.h
%{_includedir}/libpq-fe.h
%{_includedir}/postgres_ext.h
%{_includedir}/pgsql/internal/*.h
%{_includedir}/pgsql/internal/libpq/pqcomm.h
%{_includedir}/libpq/*.h
%{_libdir}/pkgconfig/*.pc
%{_libdir}/libpq.so
%{_includedir}/pg_config*.h
%endif
%files test-rpm-macros
%{_datadir}/postgresql-setup/postgresql_pkg_tests.sh
%{macrosdir}/macros.%name-test
@ -1177,13 +1185,6 @@ make -C postgresql-setup-%{setup_version} check
%{macrosdir}/macros.%name-upgrade
%endif
%if %llvmjit
%files llvmjit
%defattr(-,root,root)
%{_libdir}/pgsql/bitcode/*
%{_libdir}/pgsql/llvmjit.so
%{_libdir}/pgsql/llvmjit_types.bc
%endif
%if %plperl
%files plperl -f plperl.lst
@ -1201,6 +1202,14 @@ make -C postgresql-setup-%{setup_version} check
%endif
%if %plpython
%files plpython -f plpython.lst
%{_datadir}/pgsql/extension/plpython2*
%{_datadir}/pgsql/extension/plpythonu*
%{_libdir}/pgsql/plpython2.so
%endif
%if %plpython3
%files plpython3 -f plpython3.lst
%{_datadir}/pgsql/extension/plpython3*
@ -1215,215 +1224,88 @@ make -C postgresql-setup-%{setup_version} check
%changelog
* Thu Nov 21 2024 Filip Janus <fjanus@redhat.com> - 13.18-1
* Thu Nov 21 2024 Lukas Javorsky <ljavorsk@redhat.com> - 13.18-1
- Update to 13.18
- Fixes: CVE-2024-10976 CVE-2024-10978 CVE-2024-10979
* Tue Aug 06 2024 Filip Janus <fjanus@redhat.com> - 13.16-1
* Mon Aug 12 2024 Ales Nezbeda <anezbeda@redhat.com> - 13.16-1
- Update to 13.16
* Tue Jul 30 2024 Filip Janus <fjanus@redhat.com> - 13.14-2
- Remove /var/run/postgresql
- Related: RHEL-25756
- Fix CVE-2024-7348
* Fri Feb 9 2024 Filip Janus <fjanus@redhat.com> - 13.14-1
- Update to 13.14
- Fix CVE-2024-0985
* Mon Nov 13 2023 Masahiro Matsuya <mmatsuya@redhat.com> - 13.13-1
* Mon Nov 13 2023 Jorge San Emeterio <jsanemet@redhat.com> - 13.13-1
- Update to 13.13
- Fixes CVE-2023-5868, CVE-2023-5869, CVE-2023-5870, and CVE-2023-39417
- Resolves: RHEL-5567
- Fixes: CVE-2023-5868 CVE-2023-5869 CVE-2023-5870 CVE-2023-39417
* Fri May 19 2023 Jorge San Emeterio <jsanemet@redhat.com> - 13.11-1
* Thu Jun 22 2023 Jorge San Emeterio <jsanemet@redhat.com> - 13.11-2
- Update postgresql-setup to 8.7 (https://github.com/devexp-db/postgresql-setup/pull/35)
- Resolves: #2207933
* Tue Jun 13 2023 Jorge San Emeterio <jsanemet@redhat.com> - 13.11-1
- Update to 13.11
- Resolves: #2207935
- Resolves: #2212815
* Tue Feb 28 2023 Filip Janus <fjanus@redhat.com> - 13.10-1
* Mon Feb 27 2023 Filip Janus <fjanus@redhat.com> - 13.10-1
- Resolves: #2114733
- Update to 13.10
- Resolves: #2114734
* Tue May 17 2022 Filip Januš <fjanus@redhat.com> - 13.7-1
- Update to 13.7
* Mon May 16 2022 Filip Januš <fjanus@redhat.com> - 13.7-1
- Resolves: CVE-2022-1552
- Update to 13.7
- Release notes: https://www.postgresql.org/docs/release/13.7/
* Tue Nov 30 2021 Marek Kulik <mkulik@redhat.com> - 13.5-1
- Update to 13.5 (#2023301)
Remove patch postgresql-pgcrypto-openssl3-init.patch - Already in upstream
* Mon Nov 29 2021 Marek Kulik <mkulik@redhat.com> - 13.3-11
- Update postgresql-setup to 8.6 (#2027278)
* Wed Oct 13 2021 Ondrej Dubaj <odubaj@redhat.com> - 13.3-10
- Release bum due to gating configuration
* Tue Sep 21 2021 Filip Januš <fjanus@redhat.com> - 13.3-9
- Remove tests failing with openssl3, now pgp is tested only with
supported ciphers
Add postgresql-pgcrypto-openssl3-init.patch - Correctly init ciphers
Add postgresql-pgcrypto-openssl3-tests.patch - disable unsupported
ciphers in the test suite
Related discussion: #2008773
Resolves: #1964848
* Tue Aug 10 2021 Mohan Boddu <mboddu@redhat.com>
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
Related: rhbz#1991688
* Fri Aug 6 2021 Florian Weimer <fweimer@redhat.com> - 13.3-7
- Rebuild to pick up new build flags from redhat-rpm-config (#1984652)
* Thu Jul 22 2021 Honza Horak <hhorak@redhat.com> - 13.3-6
- Do not provide pkgconfig(libpq) to not trick packages that actually require
libpq-devel
Resolves: #1980992
* Thu Jul 22 2021 Filip Januš <fjanus@redhat.com> - 13.3-5
- Add explicit conflict between private-devel and libpq-devel
* Mon Nov 29 2021 Marek Kulik <mkulik@redhat.com> - 13.5-2
- Update postgresql-setup to 8.6 (#2024567)
* Wed Jul 21 2021 Filip Januš <fjanus@redhat.com> - 13.3-4
- Fix multilib header files path
Resolves: #1984374
* Mon Nov 15 2021 Filip Januš <fjanus@redhat.com> - 13.5-1
- Update to 13.5
- Resolves: #2007214
* Wed Jul 21 2021 Honza Horak <hhorak@redhat.com> - 13.3-3
- Turn off tests that expectedly fail with OpenSSL 3.0.0
Related: #1964848
* Mon Nov 08 2021 Filip Januš <fjansu@redhat.com> - 13.3-3
- Correct path to tmpfiles
Resolves: #2016996
* Mon Jul 19 2021 Filip Januš <fjanus@redhat.com> - 13.3-2
- Enable SSL for upgrade server
Resolves: #1983632
* Wed Jul 14 2021 Filip Januš <fjanus@redhat.com> - 13.3-2
- Enable ssl for upgrade server
Resolves: #1982697
* Wed Jun 16 2021 Honza Horak <hhorak@redhat.com> - 13.3-1
* Mon May 31 2021 Filip Januš <fjanus@redhat.com> - 13.3-1
- Update to 13.3
Resolves: #1964497
- Build with a private libpq
Resolves: #1967918
(also discussed in Fedora #1905584)
- Introduce postgresql_server_llvmjit macro to follow jit config of a server in
plugins
Related: #1951268
* Wed Jun 16 2021 Mohan Boddu <mboddu@redhat.com> - 13.2-7
- Rebuilt for RHEL 9 BETA for openssl 3.0
Related: rhbz#1971065
* Fri Jun 04 2021 Honza Horak <hhorak@redhat.com> - 13.2-6
- Ignore test failures in contrib tests
Related: #1964848
* Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com>
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
* Wed Mar 17 2021 Honza Horak <hhorak@redhat.com> - 13.2-4
- Remove plpython2 entirely, same as upstream did
Resolves: #1913681
- Disable llvmjit in order to build at all
Related: #1940964
* Tue Mar 02 2021 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 13.2-3
- Rebuilt for updated systemd-rpm-macros
See https://pagure.io/fesco/issue/2583.
* Wed Feb 17 2021 Honza Horak <hhorak@redhat.com> - 13.2-2
- Do not build plpython on RHEL > 8
Related: #1913681
Resolves: #1966339
Fix: CVE-2021-32027,CVE-2021-32028,CVE-2021-32029
* Tue Feb 16 2021 Honza Horak <hhorak@redhat.com> - 13.2-1
- Update to 13.2
Related: #1855776
* Fri Feb 12 2021 Michal Schorm <mschorm@redhat.com> - 13.1-2
- Remove ancient PPC64 hack
* Wed Jan 13 2021 Honza Horak <hhorak@redhat.com> - 13.1-1
- Rebase to usptream release 13.1
* Wed Jan 13 2021 Patrik Novotný <panovotn@redhat.com> - 12.5-1
- Rebase to upstream release 12.5
Patch for libpq 13.x build time compatibility
Fixes CVE-2020-25694
Fixes CVE-2020-25695
Fixes CVE-2020-25696
* Wed Jan 13 2021 Fedora Release Engineering <releng@fedoraproject.org> - 12.4-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Mon Nov 16 2020 Honza Horak <hhorak@redhat.com> - 12.4-4
- Update postgresql-setup to v8.5
* Fri Oct 09 2020 Honza Horak <hhorak@redhat.com> - 12.4-3
- Removing problematic requirements on ppc64 arch
Resolves: #1882642
* Fri Aug 21 2020 Jeff Law <law@redhat.com> - 12.4-2
- Re-enable LTO
* Wed Nov 18 2020 Honza Horak <hhorak@redhat.com> - 13.1-1
- Rebase to upstream release 13.1
Resolves: #1855776
* Tue Aug 18 2020 Patrik Novotný <panovotn@redhat.com> - 12.4-1
- Rebase to upstream release 12.4
* Tue Nov 26 2019 Patrik Novotný <panovotn@redhat.com> - 12.1-3
- Release bump for 8.2.0 BZ#1776805
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 12.3-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Tue Nov 19 2019 Patrik Novotný <panovotn@redhat.com> - 12.1-2
- Release bump for rebuild against libpq-12.1-3
* Fri Jul 24 2020 Jeff Law <law@redhat.com> - 12.3-5
- Disable LTO
* Tue Jun 23 2020 Jitka Plesnikova <jplesnik@redhat.com> - 12.3-4
- Perl 5.32 rebuild
* Sat Jun 06 2020 Pavel Raiskup <praiskup@redhat.com> - 12.3-3
- add docbook-style-xsl to BuildRequires
* Tue May 26 2020 Miro Hrončok <mhroncok@redhat.com> - 12.3-2
- Rebuilt for Python 3.9
* Tue May 19 2020 Patrik Novotný <panovotn@redhat.com> - 12.3-2
- Drop postgresql-man.patch
* Mon May 18 2020 Patrik Novotný <panovotn@redhat.com> - 12.3-1
- Rebase to upstream release 12.3
* Fri May 15 2020 Pete Walter <pwalter@fedoraproject.org> - 12.2-3
- Rebuild for ICU 67
* Thu Mar 12 2020 Patrik Novotný <panovotn@redhat.com> - 12.2-2
- Fix requirements for JIT in postgresql-server-devel
- Fix build issues regarding new perl update
* Fri Feb 14 2020 Patrik Novotný <panovotn@redhat.com> - 12.2-1
- Rebase to upstream release 12.2
* Tue Feb 11 2020 Patrik Novotný <panovotn@redhat.com> - 12.1-1
* Tue Nov 12 2019 Patrik Novotný <panovotn@redhat.com> - 12.1-1
- Rebase to upstream release 12.1
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 11.6-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
* Mon Nov 25 2019 Patrik Novotný <panovotn@redhat.com> - 11.6-1
- Rebase to upstream version 11.6
* Thu Oct 03 2019 Patrik Novotný <panovotn@redhat.com> - 12.0-1
- Rebase to upstream release 12.0
* Fri Nov 01 2019 Pete Walter <pwalter@fedoraproject.org> - 11.5-6
- Rebuild for ICU 65
* Thu Sep 05 2019 Patrik Novotný <panovotn@redhat.com> - 11.5-5
* Thu Sep 12 2019 Patrik Novotný <panovotn@redhat.com> - 12.0-0.3
- Rebase to upstream beta release 12beta4
- postgresql-server-devel requires krb5-devel
* Tue Sep 03 2019 Patrik Novotný <panovotn@redhat.com> - 11.5-4
- Add explicit obsoletes to plpython2 package
* Mon Sep 02 2019 Patrik Novotný <panovotn@redhat.com> - 11.5-3
- Rename plpython to plpython2 and provide plpython virtually.
* Mon Aug 19 2019 Miro Hrončok <mhroncok@redhat.com> - 11.5-2
- Rebuilt for Python 3.8
* Wed Aug 07 2019 Petr Kubat <pkubat@redhat.com> - 11.5-1
- New upstream version 11.5
https://www.postgresql.org/docs/11/release-11-5.html
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 11.4-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
* Thu Aug 08 2019 Petr Kubat <pkubat@redhat.com> - 12.0-0.2
- Rebase to upstream beta release 12beta3
* Tue Jul 09 2019 Petr Kubat <pkubat@redhat.com> - 11.4-1
- New upstream version 11.4
https://www.postgresql.org/docs/11/release-11-4.html
* Wed Jul 03 2019 Patrik Novotný <panovotn@redhat.com> - 12.0-0.1
- Rebase to upstream beta release 12beta2
* Fri May 31 2019 Jitka Plesnikova <jplesnik@redhat.com> - 11.3-2
- Perl 5.30 rebuild

Loading…
Cancel
Save