Compare commits

...

49 Commits
master ... f35

Author SHA1 Message Date
Filip Janus
07cb0f9ae5 Rebase to 13.7 2022-06-14 09:18:46 +02:00
Filip Janus
affce4892e Update postgresql-setup to version 8.7 2022-01-11 15:34:03 +01:00
Marek Kulik
daae4bf50a Update postgresql-setup to 8.6 version
Related: #2024568
2021-11-19 11:15:43 +01:00
Filip Januš
798f7feddf Update to 13.4
Disable postgresql-subtransaction-test.patch no more needed
2021-08-16 09:53:25 +02:00
Fedora Release Engineering
08bdabcf81 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2021-07-23 03:55:35 +00:00
Filip Januš
24c8fefa2a Enable ssl support for upgrade server+ other features(ldap,pam ...) 2021-07-20 12:40:04 +02:00
Honza Horak
d34e80cf95 Add explicit conflicts 2021-07-20 10:45:11 +02:00
Honza Horak
2ed9c8c1b1 Add dependency to libpq-devel to server-devel pkg if external libpq is used 2021-07-20 10:42:47 +02:00
Honza Horak
8b2a0b66d3 Fix date in changelog and add BZ ref 2021-07-20 10:42:47 +02:00
Honza Horak
7fb6fc9e9b Do not try to remove files not installed actually 2021-07-20 10:42:47 +02:00
Honza Horak
d12fb440d2 Add new sub-packages private-libs and private-devel
This keeps the client and server devel packages separated
2021-07-20 10:42:47 +02:00
Honza Horak
9e2fd57bf2 Include also libpq headers when building with a private libpq 2021-07-20 10:42:47 +02:00
Honza Horak
0eaa9ce333 Build with a private libpq
Related: #1905584
2021-07-20 10:42:46 +02:00
Python Maint
3ccb5d848e Rebuilt for Python 3.10 2021-06-04 20:15:44 +02:00
Filip Januš
0bf1efb845 Update to 13.3 2021-05-31 11:09:57 +02:00
Jitka Plesnikova
43201d5e93 Perl 5.34 rebuild 2021-05-21 23:41:47 +02:00
Honza Horak
91d03e378a Fix subtransaction test for Python 3.10
Starting with Python 3.10, the stacktrace looks differently:
  -  PL/Python function "subtransaction_exit_subtransaction_in_with", line 3, in <module>
  -    s.__exit__(None, None, None)
  +  PL/Python function "subtransaction_exit_subtransaction_in_with", line 2, in <module>
  +    with plpy.subtransaction() as s:
Using try/except specifically makes the error look always the same.

Resolves: #1959080
2021-05-20 15:36:29 +02:00
Pete Walter
aa29ed6ba9 Rebuild for ICU 69 2021-05-20 01:14:07 +01:00
Pete Walter
8d886c8b33 Rebuild for ICU 69 2021-05-19 16:57:39 +01:00
Honza Horak
41cd60000b Work-around fix jit failure on s390x
Consulted upstream in
https://www.postgresql.org/message-id/20210420225228.qr4x6zv3hqjorh5t%40alap3.anarazel.de

This problem could in theory happen on any architecture depending on which
specific CPU variant is being used.  We just only see this problem in Fedora
on the s390x builder.

Related: #1940964
2021-04-22 20:37:24 +02:00
Honza Horak
0b7d13d457 Add macro for llvmjit settings 2021-04-21 20:50:40 +02:00
Honza Horak
34a02d67d8 Disable llvmjit in order to build at all
Related: #1940964
2021-03-24 08:29:23 +01:00
Honza Horak
e084551edd Remove plpython2 same as upstream did
Resolves: #1913681
2021-03-18 09:03:06 +01:00
Zbigniew Jędrzejewski-Szmek
e45b75d670 Rebuilt for updated systemd-rpm-macros
See https://pagure.io/fesco/issue/2583.
2021-03-02 16:13:03 +01:00
Honza Horak
bd3d5e9d0d Do not build plpython on RHEL > 8
Related: #1913681
2021-02-17 23:10:18 +01:00
Honza Horak
8784e334e1 Update to 13.2 2021-02-16 22:02:21 +01:00
Michal Schorm
af5a1aa7d2 Remove the ancient PPC64 hack
The package should honor the global build flags
2021-02-12 11:54:19 +01:00
Patrik Novotný
1091bb36d4 [FIXUP] remove dblink test patch 2021-02-08 06:16:30 +01:00
Honza Horak
b081e11492 Update postgresql to 13.1 and postgresql-setup to v8.5 2021-02-08 05:34:34 +01:00
Honza Horak
a9fcc54528 Using correct path to tmpfiles
In order to avoid this error during installation:

  /usr/lib/tmpfiles.d/postgresql.conf:1: Line references path below legacy directory
  /var/run/, updating /var/run/postgresql → /run/postgresql; please update the
  tmpfiles.d/ drop-in file accordingly.
2021-02-05 16:48:55 +01:00
Honza Horak
08867eaa8f Add postgresql-12.5-US.pdf to the sources 2021-01-28 10:52:46 +01:00
Patrik Novotný
fbf05341c7 Rebase to upstream release 12.5
Add patch for libpq 13.1 compatibility.
    Fixes: CVE-2020-25694
    Fixes: CVE-2020-25695
    Fixes: CVE-2020-25696
    Version: 12.5
2021-01-27 09:29:53 +01:00
Fedora Release Engineering
6abbbcd611 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2021-01-27 08:27:44 +00:00
Tom Stellard
b43bea6837 Add BuildRequires: make
https://fedoraproject.org/wiki/Changes/Remove_make_from_BuildRoot
2021-01-08 19:26:21 +00:00
Honza Horak
0ab52b82e9 Update postgresql-setup to v8.5 2020-11-16 19:15:54 +01:00
Honza Horak
dec2de7c0b Update postgresql-setup-8.5.tar.gz source to include correctly generated tarball 2020-11-16 19:00:12 +01:00
Honza Horak
5a34bed68f Update postgresql-setup to 8.5 version 2020-10-26 14:59:56 +01:00
Honza Horak
33d08c0c72 Removing problematic requirements on ppc64le arch
Resolves: #1882642
2020-10-09 23:13:44 +02:00
Jeff Law
d97a199fef Reenable LTO on all but armv7hl (runs out of memory there) 2020-08-21 11:53:33 -06:00
Patrik Novotný
b5c03e5ca6 Rebase to upstream version 12.4 2020-08-18 12:33:13 +02:00
Fedora Release Engineering
d45fe7ac0a - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2020-07-28 22:53:00 +00:00
Jeff Law
86232b0ac4 Disable LTO 2020-07-24 08:16:10 -06:00
Jitka Plesnikova
9d4f3560bd Perl 5.32 rebuild 2020-06-23 13:18:06 +02:00
Pavel Raiskup
db7b88d197 FTBFS: BR docbook-style-xsl
Per discussion in
https://bugzilla.redhat.com/show_bug.cgi?id=1844325

Version: 12.3-3
2020-06-06 19:49:07 +02:00
Pavel Raiskup
df7acb65ee spec: ftbfs fix
extra tokens at the end of %endif directive in line 686:  %endif # %%upgrade

Version: 12.3-2
2020-06-04 23:44:02 +02:00
Miro Hrončok
4611924c2d Rebuilt for Python 3.9 2020-05-26 02:56:42 +02:00
Patrik Novotný
15682dfd51 Drop postgresql-man.patch 2020-05-19 14:45:45 +02:00
Patrik Novotný
8dad51a451 Rebase to upstream release 12.3 2020-05-18 12:09:00 +02:00
Pete Walter
32d2abe945 Rebuild for ICU 67 2020-05-15 14:09:09 +01:00
10 changed files with 431 additions and 208 deletions

0
.gitignore vendored Normal file → Executable file
View File

View File

@ -0,0 +1,13 @@
diff --git a/contrib/dblink/expected/dblink.out b/contrib/dblink/expected/dblink.out
index 6ceabb453c..6516d4f131 100644
--- a/contrib/dblink/expected/dblink.out
+++ b/contrib/dblink/expected/dblink.out
@@ -879,7 +879,7 @@ $d$;
CREATE USER MAPPING FOR public SERVER fdtest
OPTIONS (server 'localhost'); -- fail, can't specify server here
ERROR: invalid option "server"
-HINT: Valid options in this context are: user, password
+HINT: Valid options in this context are: user, password, sslpassword
CREATE USER MAPPING FOR public SERVER fdtest OPTIONS (user :'USER');
GRANT USAGE ON FOREIGN SERVER fdtest TO regress_dblink_user;
GRANT EXECUTE ON FUNCTION dblink_connect_u(text, text) TO regress_dblink_user;

View File

@ -0,0 +1,99 @@
From 0edaa982336823d4d7af8f10b91579fe0099ef3d Mon Sep 17 00:00:00 2001
From: Tom Stellard <tstellar@redhat.com>
Date: Tue, 20 Apr 2021 20:14:21 -0700
Subject: [PATCH] jit: Workaround potential datalayout mismatch on s390x
LLVM's s390x target uses a different datalayout for z13 and newer processors.
If llvmjit_types.bc is compiled to target a processor older than z13, and
then the JIT runs on a z13 or newer processor, then there will be a mismatch
in datalayouts between llvmjit_types.bc and the JIT engine. This mismatch
causes the JIT to fail at runtime.
---
src/backend/jit/llvm/llvmjit.c | 46 ++++++++++++++++++++++++++++++++--
1 file changed, 44 insertions(+), 2 deletions(-)
diff --git a/src/backend/jit/llvm/llvmjit.c b/src/backend/jit/llvm/llvmjit.c
index 98a27f08bf..05b6438ba8 100644
--- a/src/backend/jit/llvm/llvmjit.c
+++ b/src/backend/jit/llvm/llvmjit.c
@@ -776,6 +776,35 @@ llvm_compile_module(LLVMJitContext *context)
errhidecontext(true)));
}
+/*
+ * For the systemz target, LLVM uses a different datalayout for z13 and newer
+ * CPUs than it does for older CPUs. This can cause a mismatch in datalayouts
+ * in the case where the llvm_types_module is compiled with a pre-z13 CPU
+ * and the JIT is running on z13 or newer.
+ * See computeDataLayout() function in
+ * llvm/lib/Target/SystemZ/SystemZTargetMachine.cpp for information on the
+ * datalayout differences.
+ */
+static bool
+needs_systemz_workaround(void)
+{
+ bool ret = false;
+ LLVMContextRef llvm_context;
+ LLVMTypeRef vec_type;
+ LLVMTargetDataRef llvm_layoutref;
+ if (strncmp(LLVMGetTargetName(llvm_targetref), "systemz", strlen("systemz")))
+ {
+ return false;
+ }
+
+ llvm_context = LLVMGetModuleContext(llvm_types_module);
+ vec_type = LLVMVectorType(LLVMIntTypeInContext(llvm_context, 32), 4);
+ llvm_layoutref = LLVMCreateTargetData(llvm_layout);
+ ret = (LLVMABIAlignmentOfType(llvm_layoutref, vec_type) == 16);
+ LLVMDisposeTargetData(llvm_layoutref);
+ return ret;
+}
+
/*
* Per session initialization.
*/
@@ -785,6 +814,7 @@ llvm_session_initialize(void)
MemoryContext oldcontext;
char *error = NULL;
char *cpu = NULL;
+ char *host_features = NULL;
char *features = NULL;
LLVMTargetMachineRef opt0_tm;
LLVMTargetMachineRef opt3_tm;
@@ -816,10 +846,17 @@ llvm_session_initialize(void)
* features not all CPUs have (weird, huh).
*/
cpu = LLVMGetHostCPUName();
- features = LLVMGetHostCPUFeatures();
+ features = host_features = LLVMGetHostCPUFeatures();
elog(DEBUG2, "LLVMJIT detected CPU \"%s\", with features \"%s\"",
cpu, features);
+ if (needs_systemz_workaround())
+ {
+ const char *no_vector =",-vector";
+ features = malloc(sizeof(char) * (strlen(host_features) + strlen(no_vector) + 1));
+ sprintf(features, "%s%s", host_features, no_vector);
+ }
+
opt0_tm =
LLVMCreateTargetMachine(llvm_targetref, llvm_triple, cpu, features,
LLVMCodeGenLevelNone,
@@ -833,8 +870,13 @@ llvm_session_initialize(void)
LLVMDisposeMessage(cpu);
cpu = NULL;
- LLVMDisposeMessage(features);
+ if (features != host_features)
+ {
+ free(features);
+ }
features = NULL;
+ LLVMDisposeMessage(host_features);
+ host_features = NULL;
/* force symbols in main binary to be loaded */
LLVMLoadLibraryPermanently(NULL);
--
2.27.0

View File

@ -3,10 +3,10 @@ PostgreSQL ecpg/initdb manual page fixes
This was generated based on automatic Red Hat manual page scan (private
RHBZ#948933).
diff -up ./doc/src/sgml/man1/ecpg.1.man948933 ./doc/src/sgml/man1/ecpg.1
--- ./doc/src/sgml/man1/ecpg.1.man948933 2014-12-16 02:13:15.000000000 +0100
+++ ./doc/src/sgml/man1/ecpg.1 2014-12-23 11:26:37.883644047 +0100
@@ -80,6 +80,11 @@ INFORMIX_SE\&.
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\&.
Define a C preprocessor symbol\&.
.RE
.PP
@ -15,10 +15,10 @@ diff -up ./doc/src/sgml/man1/ecpg.1.man948933 ./doc/src/sgml/man1/ecpg.1
+Parse a header file, this option includes option \fB\-c\fR\&.
+.RE
+.PP
\fB\-i\fR
\fB\-h\fR
.RS 4
Parse system include files as well\&.
@@ -128,6 +133,11 @@ Allow question mark as placeholder for c
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
@ -30,10 +30,10 @@ diff -up ./doc/src/sgml/man1/ecpg.1.man948933 ./doc/src/sgml/man1/ecpg.1
\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 ./doc/src/sgml/man1/initdb.1.man948933 ./doc/src/sgml/man1/initdb.1
--- ./doc/src/sgml/man1/initdb.1.man948933 2014-12-16 02:13:21.000000000 +0100
+++ ./doc/src/sgml/man1/initdb.1 2014-12-23 11:26:37.883644047 +0100
@@ -281,6 +281,13 @@ determines that an error prevented it fr
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

View File

@ -0,0 +1,12 @@
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)

View File

@ -6,11 +6,10 @@ rhbz#1618698 change, rather provide pg_server_config binary, which int urn means
that we'll have to fix only a minimal set of packages which really build
PostgreSQL server modules.
diff --git a/src/bin/pg_config/Makefile b/src/bin/pg_config/Makefile
index 02e6f9d..f7c844f 100644
--- a/src/bin/pg_config/Makefile
+++ b/src/bin/pg_config/Makefile
@@ -11,28 +11,30 @@
diff -up postgresql-13.1/src/bin/pg_config/Makefile.patch9 postgresql-13.1/src/bin/pg_config/Makefile
--- postgresql-13.1/src/bin/pg_config/Makefile.patch9 2020-11-18 09:28:30.885453275 +0100
+++ postgresql-13.1/src/bin/pg_config/Makefile 2020-11-18 09:31:33.926325327 +0100
@@ -11,6 +11,8 @@
PGFILEDESC = "pg_config - report configuration information"
PGAPPICON=win32
@ -19,8 +18,9 @@ index 02e6f9d..f7c844f 100644
subdir = src/bin/pg_config
top_builddir = ../../..
include $(top_builddir)/src/Makefile.global
OBJS= pg_config.o $(WIN32RES)
@@ -19,22 +21,22 @@ OBJS = \
$(WIN32RES) \
pg_config.o
-all: pg_config
+all: $(PG_CONFIG)
@ -43,17 +43,16 @@ index 02e6f9d..f7c844f 100644
clean distclean maintainer-clean:
- rm -f pg_config$(X) $(OBJS)
+ rm -f $(PG_CONFIG) $(OBJS)
+ rm -f $(PG_CONFIG) $(OBJS)
rm -rf tmp_check
check:
diff --git a/src/bin/pg_config/nls.mk b/src/bin/pg_config/nls.mk
index 1d41f90..0f34f37 100644
--- a/src/bin/pg_config/nls.mk
+++ b/src/bin/pg_config/nls.mk
diff -up postgresql-13.1/src/bin/pg_config/nls.mk.patch9 postgresql-13.1/src/bin/pg_config/nls.mk
--- postgresql-13.1/src/bin/pg_config/nls.mk.patch9 2020-11-18 09:28:30.885453275 +0100
+++ postgresql-13.1/src/bin/pg_config/nls.mk 2020-11-18 09:32:00.735599526 +0100
@@ -1,4 +1,4 @@
# src/bin/pg_config/nls.mk
-CATALOG_NAME = pg_config
+CATALOG_NAME = pg_server_config
AVAIL_LANGUAGES = cs de es fr he it ja ko pl pt_BR ro ru sv tr uk vi zh_CN zh_TW
AVAIL_LANGUAGES = cs de es fr he it ja ko pl pt_BR ru sv tr uk vi zh_CN
GETTEXT_FILES = pg_config.c ../../common/config_info.c ../../common/exec.c

View File

@ -42,12 +42,12 @@ diff --git a/src/include/pg_config_manual.h b/src/include/pg_config_manual.h
index e278fa0..9ee15d4 100644
--- a/src/include/pg_config_manual.h
+++ b/src/include/pg_config_manual.h
@@ -169,7 +169,7 @@
* here's where to twiddle it. You can also override this at runtime
* with the postmaster's -k switch.
@@ -201,7 +201,7 @@
* support them yet.
*/
#ifndef WIN32
-#define DEFAULT_PGSOCKET_DIR "/tmp"
+#define DEFAULT_PGSOCKET_DIR "/var/run/postgresql"
/*
* This is the default event source for Windows event log.
#else
#define DEFAULT_PGSOCKET_DIR ""
#endif

View File

@ -33,8 +33,8 @@
%{!?test:%global test 1}
%{!?llvmjit:%global llvmjit 1}
%{!?external_libpq:%global external_libpq 0}
%{!?upgrade:%global upgrade 1}
%{!?plpython:%global plpython 1}
%{!?plpython3:%global plpython3 1}
%{!?pltcl:%global pltcl 1}
%{!?plperl:%global plperl 1}
@ -59,9 +59,9 @@
Summary: PostgreSQL client programs
Name: postgresql
%global majorversion 12
Version: %{majorversion}.2
Release: 2%{?dist}
%global majorversion 13
Version: %{majorversion}.7
Release: 1%{?dist}
# The PostgreSQL license is very similar to other MIT licenses, but the OSI
# recognizes it as an independent license, so we do as well.
@ -72,12 +72,12 @@ Url: http://www.postgresql.org/
# in-place upgrade of an old database. In most cases it will not be critical
# that this be kept up with the latest minor release of the previous series;
# but update when bugs affecting pg_dump output are fixed.
%global prevversion 11.7
%global prevmajorversion 11
%global prevmajorversion 12
%global prevversion %{prevmajorversion}.11
%global prev_prefix %{_libdir}/pgsql/postgresql-%{prevmajorversion}
%global precise_version %{?epoch:%epoch:}%version-%release
%global setup_version 8.4
%global setup_version 8.7
%global service_name postgresql.service
@ -106,10 +106,14 @@ 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
# Upstream bug #16971: https://www.postgresql.org/message-id/16971-5d004d34742a3d35%40postgresql.org
# rhbz#1940964
Patch10: postgresql-datalayout-mismatch-on-s390.patch
Patch12: postgresql-no-libecpg.patch
BuildRequires: make
BuildRequires: gcc
BuildRequires: perl(ExtUtils::MakeMaker) glibc-devel bison flex gawk
BuildRequires: perl(ExtUtils::Embed), perl-devel
@ -120,15 +124,14 @@ BuildRequires: perl-generators
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
# postgresql-setup build requires
BuildRequires: m4 elinks docbook-utils help2man
%if %plpython
BuildRequires: python2-devel
%endif
%if %plpython3
BuildRequires: python3-devel
%endif
@ -190,6 +193,37 @@ 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
@ -245,6 +279,14 @@ Requires: krb5-devel
%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
%endif
%description server-devel
The postgresql-server-devel package contains the header files and configuration
@ -298,6 +340,7 @@ 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
@ -308,19 +351,6 @@ 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
@ -368,11 +398,6 @@ Requires: llvm => 5.0
%endif
Provides: postgresql-llvmjit >= %{version}-%{release}
%ifarch ppc64 ppc64le
AutoReq: 0
Requires: advance-toolchain-%{atstring}-runtime
%endif
BuildRequires: llvm-devel >= 5.0 clang-devel >= 5.0
%description llvmjit
@ -394,18 +419,33 @@ goal of accelerating analytics queries.
%patch1 -p1
%patch2 -p1
%patch5 -p1
%patch6 -p1
%if %external_libpq
%patch8 -p1
%else
%patch12 -p1
%endif
%patch9 -p1
%patch10 -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
@ -414,6 +454,10 @@ 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
@ -440,19 +484,10 @@ 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
@ -503,49 +538,15 @@ common_configure_options='
%if %llvmjit
--with-llvm
%endif
'
%if %plpython3
--with-python
%endif
'
export PYTHON=/usr/bin/python3
# These configure options must match main build
%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
%configure $common_configure_options
%make_build world
@ -582,32 +583,6 @@ 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
@ -638,7 +613,6 @@ 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} \
@ -656,36 +630,47 @@ upgrade_configure ()
%endif
%if %pltcl
--with-tcl \
%endif
%if %ldap
--with-ldap \
%endif
%if %pam
--with-pam \
%endif
%if %kerberos
--with-gssapi \
%endif
%if %uuid
--with-ossp-uuid \
%endif
%if %xml
--with-libxml \
--with-libxslt \
%endif
%if %nls
--enable-nls \
%endif
%if %sdt
--enable-dtrace \
%endif
%if %selinux
--with-selinux \
%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 upgrade
%endif
%install
@ -711,19 +696,14 @@ 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/
%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
%else
ln -s pg_server_config $RPM_BUILD_ROOT/%_bindir/pg_config
rm $RPM_BUILD_ROOT/%{_libdir}/libpq.a
%endif
# make sure these directories exist even if we suppressed all contrib modules
@ -768,12 +748,6 @@ 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
@ -815,6 +789,10 @@ 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,
@ -847,9 +825,9 @@ rm $RPM_BUILD_ROOT%{_libdir}/libpgfeutils.a
rm -f $RPM_BUILD_ROOT%{_bindir}/pgsql/hstore_plperl.so
%endif
%if !%plpython
rm -f $RPM_BUILD_ROOT%{_bindir}/pgsql/hstore_plpython2.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 %nls
find_lang_bins ()
@ -864,19 +842,19 @@ find_lang_bins ()
find_lang_bins devel.lst pg_server_config
find_lang_bins server.lst \
initdb pg_basebackup pg_controldata pg_ctl pg_resetwal pg_rewind plpgsql \
postgres pg_checksums
postgres pg_checksums pg_verifybackup
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
pg_dump pg_upgrade pgscripts psql \
%if ! %external_libpq
libpq%{private_soname}-5
%endif
%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
@ -945,6 +923,12 @@ make -C postgresql-setup-%{setup_version} check
%endif
%if ! %external_libpq
%files private-libs
%{_libdir}/libpq.so.*
%endif
%files docs
%doc *-US.pdf
%doc doc/html
@ -983,10 +967,6 @@ 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_plpython3u*
%endif
@ -1032,9 +1012,6 @@ 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
@ -1043,17 +1020,11 @@ 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,8 +1085,10 @@ make -C postgresql-setup-%{setup_version} check
%{_bindir}/pg_resetwal
%{_bindir}/pg_rewind
%{_bindir}/pg_checksums
%{_bindir}/pg_verifybackup
%{_bindir}/postgres
%{_bindir}/postgresql-setup
%{_bindir}/postgresql-upgrade
%{_bindir}/postmaster
%dir %{_datadir}/pgsql
%{_datadir}/pgsql/*.sample
@ -1124,8 +1097,6 @@ make -C postgresql-setup-%{setup_version} check
%{_datadir}/pgsql/extension/plpgsql*
%{_datadir}/pgsql/information_schema.sql
%{_datadir}/pgsql/postgres.bki
%{_datadir}/pgsql/postgres.description
%{_datadir}/pgsql/postgres.shdescription
%{_datadir}/pgsql/snowball_create.sql
%{_datadir}/pgsql/sql_features.txt
%{_datadir}/pgsql/system_views.sql
@ -1155,9 +1126,11 @@ make -C postgresql-setup-%{setup_version} check
%{_mandir}/man1/pg_resetwal.*
%{_mandir}/man1/pg_rewind.*
%{_mandir}/man1/pg_checksums.*
%{_mandir}/man1/pg_verifybackup.*
%{_mandir}/man1/postgres.*
%{_mandir}/man1/postgresql-new-systemd-unit.*
%{_mandir}/man1/postgresql-setup.*
%{_mandir}/man1/postgresql-upgrade.*
%{_mandir}/man1/postmaster.*
%{_sbindir}/postgresql-new-systemd-unit
%{_tmpfilesdir}/postgresql.conf
@ -1184,6 +1157,21 @@ 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
@ -1224,7 +1212,9 @@ make -C postgresql-setup-%{setup_version} check
%if %plperl
%files plperl -f plperl.lst
%{_datadir}/pgsql/extension/bool_plperl*
%{_datadir}/pgsql/extension/plperl*
%{_libdir}/pgsql/bool_plperl.so
%{_libdir}/pgsql/plperl.so
%endif
@ -1236,14 +1226,6 @@ 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*
@ -1258,6 +1240,124 @@ make -C postgresql-setup-%{setup_version} check
%changelog
* Tue Jun 14 2022 Filip Januš <fjanus@redhat.com> - 13.7-1
- Rebase to 13.7
* Tue Jan 11 2022 Filip Janus <fjanus@redhat.com> - 13.4-3
- Update postgresql-setup to version 8.7
* Thu Nov 18 2021 Marek Kulik <mkulik@redhat.com> - 13.4-2
- Update postgresql-setup to v8.6
* Thu Aug 12 2021 Filip Januš <fjanus@rehdat.com> - 13.4-1
- Update to 13.4
- Disable postgresql-subtransaction-test.patch
now succeeds without patch
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 13.3-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
* Tue Jul 20 2021 Filip Januš <fjanus@redhat.com> - 13.3-4
- Enable ssl and other features for upgrade server
* Fri Jun 04 2021 Honza Horak <hhorak@redhat.com> - 13.3-3
- Build with a private libpq
Resolves: #1905584
* Fri Jun 04 2021 Python Maint <python-maint@redhat.com> - 13.3-2
- Rebuilt for Python 3.10
* Fri May 21 2021 Filip Januš <fjanus@redhat.com> - 13.3-1
- Update to 13.3
* Fri May 21 2021 Jitka Plesnikova <jplesnik@redhat.com> - 13.2-9
- Perl 5.34 rebuild
* Thu May 20 2021 Pete Walter <pwalter@fedoraproject.org> - 13.2-8
- Rebuild for ICU 69
* Tue May 11 2021 Honza Horak <hhorak@redhat.com> - 13.2-7
- Fix subtransaction test for Python 3.10
Resolves: #1959080
* Thu Apr 22 2021 Honza Horak <hhorak@redhat.com> - 13.2-6
- Fix jit failure on s390x
Thanks to Tom Stellard
Related: #1940964
* Tue Apr 20 2021 Honza Horak <hhorak@redhat.com> - 13.2-5
- Add macro for llvmjit settings
* 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
* Tue Feb 16 2021 Honza Horak <hhorak@redhat.com> - 13.2-1
- Update to 13.2
* 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 07 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
* Tue Aug 18 2020 Patrik Novotný <panovotn@redhat.com> - 12.4-1
- Rebase to upstream release 12.4
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 12.3-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* 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

View File

@ -1 +1 @@
d /var/run/postgresql 0755 postgres postgres -
d /run/postgresql 0755 postgres postgres -

12
sources Normal file → Executable file
View File

@ -1,6 +1,6 @@
SHA512 (postgresql-12.2.tar.bz2) = 0e0ce8e21856e8f43e58b840c10c4e3ffae6d5207e0d778e9176e36f8e20e34633cbb06f0030a7c963c3491bb7e941456d91b55444c561cfc6f283fba76f33ee
SHA512 (postgresql-12.2.tar.bz2.sha256) = 8f94163228bb7d854d6fe4924a8a2ded00f90af662dd4a7c39b415be0826d9395e55f9b8e3b472baf7c19550e7c35198a650604a28756ad85d096bcfbaa5d1fd
SHA512 (postgresql-12.2-US.pdf) = f086fead2c094e0f1148bcadaf13e240a84b53be289aa0a323295f65879699e81041b4bbc6cc3ce2744aac3fcb15083fa1cab583cd86fdc8ef626499e3cb3e71
SHA512 (postgresql-11.7.tar.bz2) = 32c7ace228f9895241ce0d925fbfc60c0cd39f4cd35368fb10dc7db046151ffd59a9895b4c30a529627f0103051e84b4992ed60312cccd292489f3037076ca1e
SHA512 (postgresql-11.7.tar.bz2.sha256) = 1c8bc319da6bc49000f14e4636f4410b3eb52ab41b0698e7f3ee945efe8e93b6f1758e3f60d8658b0ea6836ea0f271a61031554a10e64c61d2c670e97c63812c
SHA512 (postgresql-setup-8.4.tar.gz) = eb73767d5c676481598aeb545e15027a29a438aa29480ad414f6af31c9df61138a51f5425999b4b35e776a3dbbb28c887790ea9771abc3328158dd1d34b1dce1
SHA512 (postgresql-12.11.tar.bz2) = 705e9e1ccf8202062cce61069b5ddb7db5f804dd0736c620640ce5622b9e42fdcbc1417771e77d51aa54beb4562a09b4307f2ff7dec135bd0e31f4941ca36ac8
SHA512 (postgresql-12.11.tar.bz2.sha256) = 5c284c2dadfe6149fd34abe36c2a19e109195349c75779e0375185219492e3bdab5c99f655f83adeff0db29e88d4e05c1eafc128ab84780e77e9b146a8a8532a
SHA512 (postgresql-13.7.tar.bz2) = 9254f21519c8d4e926f70082503bb5593c91064a3d2a4ea18ac503dfd9aa94751d6f01ce00fca9fec9b2b7af40caf8d0951b661dd8be4d6aa87c1e35b6fa7a41
SHA512 (postgresql-13.7.tar.bz2.sha256) = a6e3601c6f8370318631820cb0f9858e49ea7d672652fe68ca0c0603e4fd28851fe1966a0825c8dafab11e15a0856486d82406f5b2d033917da0328089ca3f37
SHA512 (postgresql-setup-8.7.tar.gz) = 741f036be517e7d9725e4f146ca7dac8b8a16b6a93d045a64ef268487f48faad6b08317b58e07ad16a31002d2a10de0ac32513a4935c3f22f48ec768a742d1fc
SHA512 (postgresql-13.7-US.pdf) = 7658c76b3f6ebdf7d79bc678ed8d7a2ea0ae72941558dc0c87575ed07ad62c39af078b03c2fee8359c05dd6fa6eae4943f180a61789d1bcf8841774e7e8760cf