remove useless files
This commit is contained in:
parent
8cccd13ac6
commit
70e6a6b1db
@ -1,72 +0,0 @@
|
|||||||
For the RPMs, we want the custom installation directories to end in
|
|
||||||
/pgsql not /postgresql. This is historical but not worth changing.
|
|
||||||
|
|
||||||
Notice that this patch also makes the appending of /pgsql unconditional.
|
|
||||||
This is to avoid unexpected behavior if the RPM is built in a working
|
|
||||||
directory whose path happens to include "postgres" or "pgsql" already.
|
|
||||||
However, datadir and sysconfdir are already set up in the specfile's
|
|
||||||
configure call, so we do not have to append anything to them.
|
|
||||||
|
|
||||||
|
|
||||||
diff -Naur postgresql-9.0.1.orig/src/Makefile.global.in postgresql-9.0.1/src/Makefile.global.in
|
|
||||||
--- postgresql-9.0.1.orig/src/Makefile.global.in 2010-10-01 10:25:44.000000000 -0400
|
|
||||||
+++ postgresql-9.0.1/src/Makefile.global.in 2010-10-11 11:52:05.224975308 -0400
|
|
||||||
@@ -55,8 +55,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
|
|
||||||
-# contain "pgsql" or "postgres", in order to avoid directory clutter.
|
|
||||||
+# append "pgsql" to some of them, in order to avoid directory clutter.
|
|
||||||
#
|
|
||||||
# In a PGXS build, we cannot use the values inserted into Makefile.global
|
|
||||||
# by configure, since the installation tree may have been relocated.
|
|
||||||
@@ -74,45 +73,23 @@
|
|
||||||
bindir := @bindir@
|
|
||||||
|
|
||||||
datadir := @datadir@
|
|
||||||
-ifeq "$(findstring pgsql, $(datadir))" ""
|
|
||||||
-ifeq "$(findstring postgres, $(datadir))" ""
|
|
||||||
-override datadir := $(datadir)/postgresql
|
|
||||||
-endif
|
|
||||||
-endif
|
|
||||||
|
|
||||||
sysconfdir := @sysconfdir@
|
|
||||||
-ifeq "$(findstring pgsql, $(sysconfdir))" ""
|
|
||||||
-ifeq "$(findstring postgres, $(sysconfdir))" ""
|
|
||||||
-override sysconfdir := $(sysconfdir)/postgresql
|
|
||||||
-endif
|
|
||||||
-endif
|
|
||||||
|
|
||||||
libdir := @libdir@
|
|
||||||
|
|
||||||
pkglibdir = $(libdir)
|
|
||||||
-ifeq "$(findstring pgsql, $(pkglibdir))" ""
|
|
||||||
-ifeq "$(findstring postgres, $(pkglibdir))" ""
|
|
||||||
-override pkglibdir := $(pkglibdir)/postgresql
|
|
||||||
-endif
|
|
||||||
-endif
|
|
||||||
+override pkglibdir := $(pkglibdir)/pgsql
|
|
||||||
|
|
||||||
includedir := @includedir@
|
|
||||||
|
|
||||||
pkgincludedir = $(includedir)
|
|
||||||
-ifeq "$(findstring pgsql, $(pkgincludedir))" ""
|
|
||||||
-ifeq "$(findstring postgres, $(pkgincludedir))" ""
|
|
||||||
-override pkgincludedir := $(pkgincludedir)/postgresql
|
|
||||||
-endif
|
|
||||||
-endif
|
|
||||||
+override pkgincludedir := $(pkgincludedir)/pgsql
|
|
||||||
|
|
||||||
mandir := @mandir@
|
|
||||||
|
|
||||||
docdir := @docdir@
|
|
||||||
-ifeq "$(findstring pgsql, $(docdir))" ""
|
|
||||||
-ifeq "$(findstring postgres, $(docdir))" ""
|
|
||||||
-override docdir := $(docdir)/postgresql
|
|
||||||
-endif
|
|
||||||
-endif
|
|
||||||
+override docdir := $(docdir)/pgsql
|
|
||||||
|
|
||||||
htmldir := @htmldir@
|
|
||||||
|
|
||||||
@ -1,41 +0,0 @@
|
|||||||
Default to stderr-based logging with a week's worth of daily logfiles.
|
|
||||||
|
|
||||||
|
|
||||||
diff -Naur postgresql-9.1rc1.orig/src/backend/utils/misc/postgresql.conf.sample postgresql-9.1rc1/src/backend/utils/misc/postgresql.conf.sample
|
|
||||||
--- postgresql-9.1rc1.orig/src/backend/utils/misc/postgresql.conf.sample 2011-08-18 17:23:13.000000000 -0400
|
|
||||||
+++ postgresql-9.1rc1/src/backend/utils/misc/postgresql.conf.sample 2011-08-18 18:39:39.697526799 -0400
|
|
||||||
@@ -279,7 +279,7 @@
|
|
||||||
# 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)
|
|
||||||
@@ -355,11 +355,11 @@
|
|
||||||
# These are only used if logging_collector is on:
|
|
||||||
#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
|
|
||||||
@@ -367,9 +367,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.
|
|
||||||
|
|
||||||
@ -1,49 +0,0 @@
|
|||||||
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\&.
|
|
||||||
Define a C preprocessor symbol\&.
|
|
||||||
.RE
|
|
||||||
.PP
|
|
||||||
+\fB\-h \fR
|
|
||||||
+.RS 4
|
|
||||||
+Parse a header file, this option includes option \fB\-c\fR\&.
|
|
||||||
+.RE
|
|
||||||
+.PP
|
|
||||||
\fB\-i\fR
|
|
||||||
.RS 4
|
|
||||||
Parse system include files as well\&.
|
|
||||||
@@ -128,6 +133,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 ./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
|
|
||||||
.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,67 +0,0 @@
|
|||||||
#
|
|
||||||
# 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=@bindir@ $(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)/serial_schedule $(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
|
|
||||||
[ -x /usr/bin/chcon ] && /usr/bin/chcon -u system_u -r object_r -t postgresql_db_t testtablespace results
|
|
||||||
|
|
||||||
# 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
|
|
||||||
@ -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
|
|
||||||
Binary file not shown.
@ -1,4 +0,0 @@
|
|||||||
[ -f /etc/profile ] && source /etc/profile
|
|
||||||
|
|
||||||
PGDATA=/var/lib/pgsql/data
|
|
||||||
export PGDATA
|
|
||||||
@ -1,3 +0,0 @@
|
|||||||
#%PAM-1.0
|
|
||||||
auth include password-auth
|
|
||||||
account include password-auth
|
|
||||||
184
postgresql.spec
184
postgresql.spec
@ -1,29 +1,20 @@
|
|||||||
%global _default_patch_flags --no-backup-if-mismatch
|
%global _default_patch_flags --no-backup-if-mismatch
|
||||||
%global __provides_exclude_from %{_libdir}/pgsql
|
%global __provides_exclude_from %{_libdir}/postgresql
|
||||||
%global macrosdir %(d=%{_rpmconfigdir}/macros.d; [ -d $d ] || d=%{_sysconfdir}/rpm; echo $d)
|
%global macrosdir %(d=%{_rpmconfigdir}/macros.d; [ -d $d ] || d=%{_sysconfdir}/rpm; echo $d)
|
||||||
|
|
||||||
Name: postgresql
|
Name: postgresql
|
||||||
Version: 10.5
|
Version: 10.5
|
||||||
Release: 8
|
Release: 9
|
||||||
Summary: PostgreSQL client programs
|
Summary: PostgreSQL client programs
|
||||||
License: PostgreSQL
|
License: PostgreSQL
|
||||||
Url: http://www.postgresql.org/
|
URL: http://www.postgresql.org/
|
||||||
Source0: https://ftp.postgresql.org/pub/source/v%{version}/postgresql-%{version}.tar.bz2
|
Source0: https://ftp.postgresql.org/pub/source/v%{version}/postgresql-%{version}.tar.bz2
|
||||||
Source1: postgresql-%{version}-US.pdf
|
Source1: https://ftp.postgresql.org/pub/source/v9.6.10/postgresql-9.6.10.tar.bz2
|
||||||
Source2: generate-pdf.sh
|
Source2: https://github.com/devexp-db/postgresql-setup/releases/download/v8.2/postgresql-setup-8.2.tar.gz
|
||||||
Source3: https://ftp.postgresql.org/pub/source/v9.6.10/postgresql-9.6.10.tar.bz2
|
Source3: https://ftp.postgresql.org/pub/source/v%{version}/postgresql-%{version}.tar.bz2.sha256
|
||||||
Source4: Makefile.regress
|
Source4: https://ftp.postgresql.org/pub/source/v9.6.10/postgresql-9.6.10.tar.bz2.sha256
|
||||||
Source5: postgresql.tmpfiles.d
|
|
||||||
Source6: postgresql.pam
|
|
||||||
Source7: postgresql-bashprofile
|
|
||||||
Source8: https://github.com/devexp-db/postgresql-setup/releases/download/v8.2/postgresql-setup-8.2.tar.gz
|
|
||||||
Source9: https://ftp.postgresql.org/pub/source/v%{version}/postgresql-%{version}.tar.bz2.sha256
|
|
||||||
Source10: https://ftp.postgresql.org/pub/source/v9.6.10/postgresql-9.6.10.tar.bz2.sha256
|
|
||||||
|
|
||||||
Patch0000: 0000-rpm-pgsql.patch
|
Patch0000: 0000-postgresql-var-run-socket.patch
|
||||||
Patch0001: 0001-postgresql-logging.patch
|
|
||||||
Patch0002: 0002-postgresql-var-run-socket.patch
|
|
||||||
Patch0003: 0003-postgresql-man.patch
|
|
||||||
|
|
||||||
Patch6000: 6000-CVE-2019-10164-1.patch
|
Patch6000: 6000-CVE-2019-10164-1.patch
|
||||||
Patch6001: 6001-CVE-2019-10164-2.patch
|
Patch6001: 6001-CVE-2019-10164-2.patch
|
||||||
@ -179,22 +170,18 @@ PostgreSQL database management system, including regression tests and benchmarks
|
|||||||
%prep
|
%prep
|
||||||
(
|
(
|
||||||
cd "$(dirname "%{SOURCE0}")"
|
cd "$(dirname "%{SOURCE0}")"
|
||||||
sha256sum -c %{SOURCE9}
|
sha256sum -c %{SOURCE3}
|
||||||
sha256sum -c %{SOURCE10}
|
sha256sum -c %{SOURCE4}
|
||||||
)
|
)
|
||||||
%setup -q -a 8
|
%setup -q -a 2
|
||||||
%patch0000 -p1
|
%patch0000 -p1
|
||||||
%patch0001 -p1
|
|
||||||
%patch0002 -p1
|
|
||||||
%patch0003 -p1
|
|
||||||
|
|
||||||
%patch6000 -p1
|
%patch6000 -p1
|
||||||
%patch6001 -p1
|
%patch6001 -p1
|
||||||
%patch6002 -p1
|
%patch6002 -p1
|
||||||
%patch6003 -p1
|
%patch6003 -p1
|
||||||
|
|
||||||
cp -p %{SOURCE1} .
|
tar xfj %{SOURCE1}
|
||||||
tar xfj %{SOURCE3}
|
|
||||||
find . -type f -name .gitignore | xargs rm
|
find . -type f -name .gitignore | xargs rm
|
||||||
|
|
||||||
%build
|
%build
|
||||||
@ -222,7 +209,7 @@ common_configure_options='
|
|||||||
--with-ldap --with-openssl --with-pam --with-gssapi --with-ossp-uuid
|
--with-ldap --with-openssl --with-pam --with-gssapi --with-ossp-uuid
|
||||||
--with-libxml --with-libxslt --enable-nls --enable-dtrace
|
--with-libxml --with-libxslt --enable-nls --enable-dtrace
|
||||||
--with-selinux --with-system-tzdata=%_datadir/zoneinfo
|
--with-selinux --with-system-tzdata=%_datadir/zoneinfo
|
||||||
--datadir=%_datadir/pgsql --with-systemd
|
--datadir=%_datadir/postgresql --with-systemd
|
||||||
'
|
'
|
||||||
|
|
||||||
export PYTHON=/usr/bin/python3
|
export PYTHON=/usr/bin/python3
|
||||||
@ -244,7 +231,7 @@ unset PYTHON
|
|||||||
|
|
||||||
%make_build world
|
%make_build world
|
||||||
|
|
||||||
sed "s|C=\`pwd\`;|C=%{_libdir}/pgsql/tutorial;|" < src/tutorial/Makefile > src/tutorial/GNUmakefile
|
sed "s|C=\`pwd\`;|C=%{_libdir}/postgresql/tutorial;|" < src/tutorial/Makefile > src/tutorial/GNUmakefile
|
||||||
%make_build -C src/tutorial NO_PGXS=1 all
|
%make_build -C src/tutorial NO_PGXS=1 all
|
||||||
|
|
||||||
rm -f src/tutorial/GNUmakefile src/tutorial/*.o
|
rm -f src/tutorial/GNUmakefile src/tutorial/*.o
|
||||||
@ -290,7 +277,7 @@ upgrade_configure ()
|
|||||||
{
|
{
|
||||||
PYTHON="${PYTHON-/usr/bin/python2}" \
|
PYTHON="${PYTHON-/usr/bin/python2}" \
|
||||||
CFLAGS="$CFLAGS -fno-aggressive-loop-optimizations" ./configure \
|
CFLAGS="$CFLAGS -fno-aggressive-loop-optimizations" ./configure \
|
||||||
--build=%{_build} --host=%{_host} --prefix=%{_libdir}/pgsql/postgresql-9.6 \
|
--build=%{_build} --host=%{_host} --prefix=%{_libdir}/postgresql/postgresql-9.6 \
|
||||||
--disable-rpath --with-perl --with-tcl --with-tclconfig=%_libdir \
|
--disable-rpath --with-perl --with-tcl --with-tclconfig=%_libdir \
|
||||||
--with-system-tzdata=/usr/share/zoneinfo "$@"
|
--with-system-tzdata=/usr/share/zoneinfo "$@"
|
||||||
}
|
}
|
||||||
@ -318,9 +305,9 @@ mv $RPM_BUILD_ROOT/%{_pkgdocdir}/README.rpm-dist ./
|
|||||||
cat > $RPM_BUILD_ROOT%{_sysconfdir}/postgresql-setup/upgrade/postgresql.conf <<EOF
|
cat > $RPM_BUILD_ROOT%{_sysconfdir}/postgresql-setup/upgrade/postgresql.conf <<EOF
|
||||||
id postgresql
|
id postgresql
|
||||||
major 9.6
|
major 9.6
|
||||||
data_default %{_localstatedir}/pgsql/data
|
data_default %{_localstatedir}/postgresql/data
|
||||||
package postgresql-upgrade
|
package postgresql-upgrade
|
||||||
engine %{_libdir}/pgsql/postgresql-9.6/bin
|
engine %{_libdir}/postgresql/postgresql-9.6/bin
|
||||||
description "Upgrade data from system PostgreSQL version (PostgreSQL 9.6)"
|
description "Upgrade data from system PostgreSQL version (PostgreSQL 9.6)"
|
||||||
redhat_sockets_hack no
|
redhat_sockets_hack no
|
||||||
EOF
|
EOF
|
||||||
@ -335,32 +322,24 @@ pushd src/pl/plpython3
|
|||||||
popd
|
popd
|
||||||
mv -f src/Makefile.global.save src/Makefile.global
|
mv -f src/Makefile.global.save src/Makefile.global
|
||||||
|
|
||||||
install -d -m 755 $RPM_BUILD_ROOT%{_datadir}/pgsql/contrib
|
install -d -m 755 $RPM_BUILD_ROOT%{_datadir}/postgresql/contrib
|
||||||
install -d -m 755 $RPM_BUILD_ROOT%{_datadir}/pgsql/extension
|
install -d -m 755 $RPM_BUILD_ROOT%{_datadir}/postgresql/extension
|
||||||
|
|
||||||
install -d -m 755 $RPM_BUILD_ROOT%{_libdir}/pgsql/tutorial
|
install -d -m 755 $RPM_BUILD_ROOT%{_libdir}/postgresql/tutorial
|
||||||
cp -p src/tutorial/* $RPM_BUILD_ROOT%{_libdir}/pgsql/tutorial
|
cp -p src/tutorial/* $RPM_BUILD_ROOT%{_libdir}/postgresql/tutorial
|
||||||
|
|
||||||
install -d $RPM_BUILD_ROOT/etc/pam.d
|
|
||||||
install -m 644 %{SOURCE6} $RPM_BUILD_ROOT/etc/pam.d/postgresql
|
|
||||||
|
|
||||||
install -d -m 755 $RPM_BUILD_ROOT%{?_localstatedir}/run/postgresql
|
install -d -m 755 $RPM_BUILD_ROOT%{?_localstatedir}/run/postgresql
|
||||||
|
|
||||||
install -d $RPM_BUILD_ROOT%{_tmpfilesdir}
|
install -d -m 700 $RPM_BUILD_ROOT%{?_localstatedir}/lib/postgresql/data
|
||||||
install -m 0644 %{SOURCE5} $RPM_BUILD_ROOT%{_tmpfilesdir}/postgresql.conf
|
install -d -m 700 $RPM_BUILD_ROOT%{?_localstatedir}/lib/postgresql/backups
|
||||||
|
|
||||||
install -d -m 700 $RPM_BUILD_ROOT%{?_localstatedir}/lib/pgsql/data
|
|
||||||
install -d -m 700 $RPM_BUILD_ROOT%{?_localstatedir}/lib/pgsql/backups
|
|
||||||
|
|
||||||
install -m 644 %{SOURCE7} $RPM_BUILD_ROOT%{?_localstatedir}/lib/pgsql/.bash_profile
|
|
||||||
|
|
||||||
pushd postgresql-9.6.10
|
pushd postgresql-9.6.10
|
||||||
%make_install
|
%make_install
|
||||||
%make_install -C contrib
|
%make_install -C contrib
|
||||||
install -m 755 plpython3.so $RPM_BUILD_ROOT/%_libdir/pgsql/postgresql-9.6/lib
|
install -m 755 plpython3.so $RPM_BUILD_ROOT/%_libdir/postgresql/postgresql-9.6/lib
|
||||||
popd
|
popd
|
||||||
|
|
||||||
pushd $RPM_BUILD_ROOT%{_libdir}/pgsql/postgresql-9.6
|
pushd $RPM_BUILD_ROOT%{_libdir}/postgresql/postgresql-9.6
|
||||||
rm bin/{clusterdb,createdb,createlang,createuser,dropdb,droplang,dropuser,ecpg}
|
rm bin/{clusterdb,createdb,createlang,createuser,dropdb,droplang,dropuser,ecpg}
|
||||||
rm bin/{initdb,pg_basebackup,pg_dump,pg_dumpall,pg_restore,pgbench,psql,reindexdb,vacuumdb}
|
rm bin/{initdb,pg_basebackup,pg_dump,pg_dumpall,pg_restore,pgbench,psql,reindexdb,vacuumdb}
|
||||||
rm -rf share/{doc,man,tsearch_data}
|
rm -rf share/{doc,man,tsearch_data}
|
||||||
@ -371,24 +350,20 @@ rm share/{*.bki,*description,*.sample,*.sql,*.txt}
|
|||||||
rm share/extension/{*.sql,*.control}
|
rm share/extension/{*.sql,*.control}
|
||||||
popd
|
popd
|
||||||
cat <<EOF > $RPM_BUILD_ROOT%macrosdir/macros.%name-upgrade
|
cat <<EOF > $RPM_BUILD_ROOT%macrosdir/macros.%name-upgrade
|
||||||
%%postgresql_upgrade_prefix %{_libdir}/pgsql/postgresql-9.6
|
%%postgresql_upgrade_prefix %{_libdir}/postgresql/postgresql-9.6
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
|
|
||||||
install -d $RPM_BUILD_ROOT%{_libdir}/pgsql/test
|
install -d $RPM_BUILD_ROOT%{_libdir}/postgresql/test
|
||||||
cp -a src/test/regress $RPM_BUILD_ROOT%{_libdir}/pgsql/test
|
cp -a src/test/regress $RPM_BUILD_ROOT%{_libdir}/postgresql/test
|
||||||
ln -sf ../../pgxs/src/test/regress/pg_regress $RPM_BUILD_ROOT%{_libdir}/pgsql/test/regress/pg_regress
|
ln -sf ../../pgxs/src/test/regress/pg_regress $RPM_BUILD_ROOT%{_libdir}/postgresql/test/regress/pg_regress
|
||||||
pushd $RPM_BUILD_ROOT%{_libdir}/pgsql/test/regress
|
pushd $RPM_BUILD_ROOT%{_libdir}/postgresql/test/regress
|
||||||
rm -f GNUmakefile Makefile *.o
|
rm -f GNUmakefile Makefile *.o
|
||||||
chmod 0755 pg_regress regress.so
|
chmod 0755 pg_regress regress.so
|
||||||
popd
|
popd
|
||||||
sed 's|@bindir@|%{_bindir}|g' \
|
|
||||||
< %{SOURCE4} \
|
|
||||||
> $RPM_BUILD_ROOT%{_libdir}/pgsql/test/regress/Makefile
|
|
||||||
chmod 0644 $RPM_BUILD_ROOT%{_libdir}/pgsql/test/regress/Makefile
|
|
||||||
|
|
||||||
rm -rf doc/html
|
rm -rf doc/html
|
||||||
mv $RPM_BUILD_ROOT%{_docdir}/pgsql/html doc
|
mv $RPM_BUILD_ROOT%{_docdir}/postgresql/html doc
|
||||||
|
|
||||||
find_lang_bins ()
|
find_lang_bins ()
|
||||||
{
|
{
|
||||||
@ -417,7 +392,7 @@ find_lang_bins pltcl.lst pltcl
|
|||||||
|
|
||||||
%pre server
|
%pre server
|
||||||
/usr/sbin/groupadd -g 26 -o -r postgres >/dev/null 2>&1 || :
|
/usr/sbin/groupadd -g 26 -o -r postgres >/dev/null 2>&1 || :
|
||||||
/usr/sbin/useradd -M -N -g postgres -o -r -d /var/lib/pgsql -s /bin/bash \
|
/usr/sbin/useradd -M -N -g postgres -o -r -d /var/lib/postgresql -s /bin/bash \
|
||||||
-c "PostgreSQL Server" -u 26 postgres >/dev/null 2>&1 || :
|
-c "PostgreSQL Server" -u 26 postgres >/dev/null 2>&1 || :
|
||||||
|
|
||||||
%post server
|
%post server
|
||||||
@ -443,13 +418,13 @@ make -C postgresql-setup-8.2 check
|
|||||||
%doc COPYRIGHT README
|
%doc COPYRIGHT README
|
||||||
%{_bindir}/{clusterdb,createdb,createuser,dropdb,dropuser,pg_dump,pg_dumpall}
|
%{_bindir}/{clusterdb,createdb,createuser,dropdb,dropuser,pg_dump,pg_dumpall}
|
||||||
%{_bindir}/{pg_isready,pg_restore,pg_upgrade,psql,reindexdb,vacuumdb}
|
%{_bindir}/{pg_isready,pg_restore,pg_upgrade,psql,reindexdb,vacuumdb}
|
||||||
%exclude %{_docdir}/pgsql
|
%exclude %{_docdir}/postgresql
|
||||||
%exclude %{_libdir}/pgsql/test/regress/pg_regress
|
%exclude %{_libdir}/postgresql/test/regress/pg_regress
|
||||||
%exclude %{_libdir}/lib{ecpg,pq,ecpg_compat,pgfeutils,pgtypes}.a
|
%exclude %{_libdir}/lib{ecpg,pq,ecpg_compat,pgfeutils,pgtypes}.a
|
||||||
|
|
||||||
%files libs -f libs.lst
|
%files libs -f libs.lst
|
||||||
%doc COPYRIGHT
|
%doc COPYRIGHT
|
||||||
%dir %{_libdir}/pgsql
|
%dir %{_libdir}/postgresql
|
||||||
%{_libdir}/libecpg.so.*
|
%{_libdir}/libecpg.so.*
|
||||||
%{_libdir}/libecpg_compat.so.*
|
%{_libdir}/libecpg_compat.so.*
|
||||||
%{_libdir}/libpgtypes.so.*
|
%{_libdir}/libpgtypes.so.*
|
||||||
@ -457,9 +432,9 @@ make -C postgresql-setup-8.2 check
|
|||||||
|
|
||||||
|
|
||||||
%files help
|
%files help
|
||||||
%doc *-US.pdf doc/html doc/KNOWN_BUGS doc/MISSING_FEATURES doc/TODO
|
%doc doc/html doc/KNOWN_BUGS doc/MISSING_FEATURES doc/TODO
|
||||||
%doc HISTORY doc/bug.template README.rpm-dist
|
%doc HISTORY doc/bug.template README.rpm-dist
|
||||||
%{_libdir}/pgsql/tutorial/
|
%{_libdir}/postgresql/tutorial/
|
||||||
%{_mandir}/man1/*
|
%{_mandir}/man1/*
|
||||||
%{_mandir}/man3/*
|
%{_mandir}/man3/*
|
||||||
%{_mandir}/man7/*
|
%{_mandir}/man7/*
|
||||||
@ -468,53 +443,50 @@ make -C postgresql-setup-8.2 check
|
|||||||
%files contrib -f contrib.lst
|
%files contrib -f contrib.lst
|
||||||
%doc contrib/spi/*.example
|
%doc contrib/spi/*.example
|
||||||
%{_bindir}/{oid2name,pg_archivecleanup,pg_standby,pg_test_fsync,pg_test_timing,pg_waldump,pgbench,vacuumlo}
|
%{_bindir}/{oid2name,pg_archivecleanup,pg_standby,pg_test_fsync,pg_test_timing,pg_waldump,pgbench,vacuumlo}
|
||||||
%{_datadir}/pgsql/extension/{adminpack*,amcheck*,autoinc*,bloom*,btree_gin*,btree_gist*,chkpass*}
|
%{_datadir}/postgresql/extension/{adminpack*,amcheck*,autoinc*,bloom*,btree_gin*,btree_gist*,chkpass*}
|
||||||
%{_datadir}/pgsql/extension/{citext*,cube*,dblink*,dict_int*,dict_xsyn*,earthdistance*,file_fdw*,fuzzystrmatch*}
|
%{_datadir}/postgresql/extension/{citext*,cube*,dblink*,dict_int*,dict_xsyn*,earthdistance*,file_fdw*,fuzzystrmatch*}
|
||||||
%{_datadir}/pgsql/extension/{hstore*,insert_username*,intagg*,intarray*,isn*,lo*,ltree*,moddatetime*}
|
%{_datadir}/postgresql/extension/{hstore*,insert_username*,intagg*,intarray*,isn*,lo*,ltree*,moddatetime*}
|
||||||
%{_datadir}/pgsql/extension/{pageinspect*,pg_buffercache*,pg_freespacemap*,pg_prewarm*,pg_stat_statements*}
|
%{_datadir}/postgresql/extension/{pageinspect*,pg_buffercache*,pg_freespacemap*,pg_prewarm*,pg_stat_statements*}
|
||||||
%{_datadir}/pgsql/extension/{pg_trgm*,pg_visibility*,pgcrypto*,pgrowlocks*,pgstattuple*,postgres_fdw*}
|
%{_datadir}/postgresql/extension/{pg_trgm*,pg_visibility*,pgcrypto*,pgrowlocks*,pgstattuple*,postgres_fdw*}
|
||||||
%{_datadir}/pgsql/extension/{refint*,seg*,tablefunc*,tcn*,timetravel*,tsm_system_rows*,tsm_system_time*}
|
%{_datadir}/postgresql/extension/{refint*,seg*,tablefunc*,tcn*,timetravel*,tsm_system_rows*,tsm_system_time*}
|
||||||
%{_datadir}/pgsql/extension/{unaccent*,sslinfo*,uuid-ossp*,xml2*}
|
%{_datadir}/postgresql/extension/{unaccent*,sslinfo*,uuid-ossp*,xml2*}
|
||||||
%{_datadir}/pgsql/contrib/sepgsql.sql
|
%{_datadir}/postgresql/contrib/sepgsql.sql
|
||||||
%{_libdir}/pgsql/{_int,adminpack,amcheck,auth_delay,auto_explain,autoinc,bloom,btree_gin,btree_gist}.so
|
%{_libdir}/postgresql/{_int,adminpack,amcheck,auth_delay,auto_explain,autoinc,bloom,btree_gin,btree_gist}.so
|
||||||
%{_libdir}/pgsql/{chkpass,citext,cube,dblink,dict_int,dict_xsyn,earthdistance,file_fdw,fuzzystrmatch}.so
|
%{_libdir}/postgresql/{chkpass,citext,cube,dblink,dict_int,dict_xsyn,earthdistance,file_fdw,fuzzystrmatch}.so
|
||||||
%{_libdir}/pgsql/{hstore,hstore_plperl,hstore_plpython2,insert_username,isn,lo,ltree,ltree_plpython2}.so
|
%{_libdir}/postgresql/{hstore,hstore_plperl,hstore_plpython2,insert_username,isn,lo,ltree,ltree_plpython2}.so
|
||||||
%{_libdir}/pgsql/{moddatetime,pageinspect,passwordcheck,pg_buffercache,pg_freespacemap,pg_stat_statements}.so
|
%{_libdir}/postgresql/{moddatetime,pageinspect,passwordcheck,pg_buffercache,pg_freespacemap,pg_stat_statements}.so
|
||||||
%{_libdir}/pgsql/{pg_trgm,pg_visibility,pgcrypto,pgrowlocks,pgstattuple,postgres_fdw,refint}.so
|
%{_libdir}/postgresql/{pg_trgm,pg_visibility,pgcrypto,pgrowlocks,pgstattuple,postgres_fdw,refint}.so
|
||||||
%{_libdir}/pgsql/{seg,tablefunc,tcn,test_decoding,timetravel,tsm_system_rows,tsm_system_time,unaccent}.so
|
%{_libdir}/postgresql/{seg,tablefunc,tcn,test_decoding,timetravel,tsm_system_rows,tsm_system_time,unaccent}.so
|
||||||
%{_libdir}/pgsql/{sepgsql,sslinfo,uuid-ossp,pgxml}.so
|
%{_libdir}/postgresql/{sepgsql,sslinfo,uuid-ossp,pgxml}.so
|
||||||
|
|
||||||
|
|
||||||
%files server -f server.lst
|
%files server -f server.lst
|
||||||
%{_bindir}/{initdb,pg_basebackup,pg_controldata,pg_ctl,pg_receivewal,pg_recvlogical}
|
%{_bindir}/{initdb,pg_basebackup,pg_controldata,pg_ctl,pg_receivewal,pg_recvlogical}
|
||||||
%{_bindir}/{pg_resetwal,pg_rewind,postgres,postgresql-setup,postmaster}
|
%{_bindir}/{pg_resetwal,pg_rewind,postgres,postgresql-setup,postmaster}
|
||||||
%{_datadir}/pgsql/{conversion_create.sql,*.sample,extension/plpgsql*,information_schema.sql}
|
%{_datadir}/postgresql/{conversion_create.sql,*.sample,extension/plpgsql*,information_schema.sql}
|
||||||
%{_datadir}/pgsql/postgres.{bki,description,shdescription}
|
%{_datadir}/postgresql/postgres.{bki,description,shdescription}
|
||||||
%{_datadir}/pgsql/{snowball_create.sql,sql_features.txt,system_views.sql,timezonesets/,tsearch_data/}
|
%{_datadir}/postgresql/{snowball_create.sql,sql_features.txt,system_views.sql,timezonesets/,tsearch_data/}
|
||||||
%{_datadir}/postgresql-setup/library.sh
|
%{_datadir}/postgresql-setup/library.sh
|
||||||
%{_libdir}/pgsql/{*_and_*,dict_snowball,euc2004_sjis2004,libpqwalreceiver,pg_prewarm,pgoutput,plpgsql}.so
|
%{_libdir}/postgresql/{*_and_*,dict_snowball,euc2004_sjis2004,libpqwalreceiver,pg_prewarm,pgoutput,plpgsql}.so
|
||||||
%{_libexecdir}/initscripts/legacy-actions/postgresql/*
|
%{_libexecdir}/initscripts/legacy-actions/postgresql/*
|
||||||
%{_libexecdir}/postgresql-check-db-dir
|
%{_libexecdir}/postgresql-check-db-dir
|
||||||
%{_sbindir}/postgresql-new-systemd-unit
|
%{_sbindir}/postgresql-new-systemd-unit
|
||||||
%{_tmpfilesdir}/postgresql.conf
|
|
||||||
%{_unitdir}/*postgresql*.service
|
%{_unitdir}/*postgresql*.service
|
||||||
%dir %{_datadir}/pgsql/{extension,contrib}
|
%dir %{_datadir}/postgresql/{extension,contrib}
|
||||||
%dir %{_datadir}/postgresql-setup
|
%dir %{_datadir}/postgresql-setup
|
||||||
%dir %{_libexecdir}/initscripts/legacy-actions/postgresql
|
%dir %{_libexecdir}/initscripts/legacy-actions/postgresql
|
||||||
%dir %{_sysconfdir}/postgresql-setup/upgrade
|
%dir %{_sysconfdir}/postgresql-setup/upgrade
|
||||||
%attr(644,postgres,postgres) %config(noreplace) %{?_localstatedir}/lib/pgsql/.bash_profile
|
%attr(700,postgres,postgres) %dir %{?_localstatedir}/lib/postgresql
|
||||||
%attr(700,postgres,postgres) %dir %{?_localstatedir}/lib/pgsql
|
%attr(700,postgres,postgres) %dir %{?_localstatedir}/lib/postgresql/backups
|
||||||
%attr(700,postgres,postgres) %dir %{?_localstatedir}/lib/pgsql/backups
|
%attr(700,postgres,postgres) %dir %{?_localstatedir}/lib/postgresql/data
|
||||||
%attr(700,postgres,postgres) %dir %{?_localstatedir}/lib/pgsql/data
|
|
||||||
%attr(755,postgres,postgres) %dir %{?_localstatedir}/run/postgresql
|
%attr(755,postgres,postgres) %dir %{?_localstatedir}/run/postgresql
|
||||||
%config(noreplace) /etc/pam.d/postgresql
|
|
||||||
%config %{_sysconfdir}/postgresql-setup/upgrade/*.conf
|
%config %{_sysconfdir}/postgresql-setup/upgrade/*.conf
|
||||||
|
|
||||||
|
|
||||||
%files devel -f devel.lst
|
%files devel -f devel.lst
|
||||||
%{_includedir}/*
|
%{_includedir}/*
|
||||||
%{_bindir}/{ecpg,pg_config}
|
%{_bindir}/{ecpg,pg_config}
|
||||||
%{_libdir}/{pgsql/pgxs/,pkgconfig/*.pc}
|
%{_libdir}/{postgresql/pgxs/,pkgconfig/*.pc}
|
||||||
%{_libdir}/{libecpg,libecpg_compat,libpgtypes,libpq}.so
|
%{_libdir}/{libecpg,libecpg_compat,libpgtypes,libpq}.so
|
||||||
%{macrosdir}/macros.%name
|
%{macrosdir}/macros.%name
|
||||||
|
|
||||||
@ -528,40 +500,46 @@ make -C postgresql-setup-8.2 check
|
|||||||
|
|
||||||
|
|
||||||
%files upgrade
|
%files upgrade
|
||||||
%{_libdir}/pgsql/postgresql-9.6/{bin,lib,share}
|
%{_libdir}/postgresql/postgresql-9.6/{bin,lib,share}
|
||||||
%exclude %{_libdir}/pgsql/postgresql-9.6/bin/pg_config
|
%exclude %{_libdir}/postgresql/postgresql-9.6/bin/pg_config
|
||||||
%exclude %{_libdir}/pgsql/postgresql-9.6/lib/{pgxs,pkgconfig}
|
%exclude %{_libdir}/postgresql/postgresql-9.6/lib/{pgxs,pkgconfig}
|
||||||
|
|
||||||
|
|
||||||
%files upgrade-devel
|
%files upgrade-devel
|
||||||
%{_libdir}/pgsql/postgresql-9.6/{include,bin/pg_config}
|
%{_libdir}/postgresql/postgresql-9.6/{include,bin/pg_config}
|
||||||
%{_libdir}/pgsql/postgresql-9.6/lib/{pkgconfig,pgxs}
|
%{_libdir}/postgresql/postgresql-9.6/lib/{pkgconfig,pgxs}
|
||||||
%{macrosdir}/macros.%name-upgrade
|
%{macrosdir}/macros.%name-upgrade
|
||||||
|
|
||||||
|
|
||||||
%files plperl -f plperl.lst
|
%files plperl -f plperl.lst
|
||||||
%{_datadir}/pgsql/extension/plperl*
|
%{_datadir}/postgresql/extension/plperl*
|
||||||
%{_libdir}/pgsql/plperl.so
|
%{_libdir}/postgresql/plperl.so
|
||||||
|
|
||||||
|
|
||||||
%files pltcl -f pltcl.lst
|
%files pltcl -f pltcl.lst
|
||||||
%{_datadir}/pgsql/extension/pltcl*
|
%{_datadir}/postgresql/extension/pltcl*
|
||||||
%{_libdir}/pgsql/pltcl.so
|
%{_libdir}/postgresql/pltcl.so
|
||||||
|
|
||||||
|
|
||||||
%files plpython -f plpython.lst
|
%files plpython -f plpython.lst
|
||||||
%{_datadir}/pgsql/extension/{plpython2*,plpythonu*}
|
%{_datadir}/postgresql/extension/{plpython2*,plpythonu*}
|
||||||
%{_libdir}/pgsql/plpython2.so
|
%{_libdir}/postgresql/plpython2.so
|
||||||
|
|
||||||
|
|
||||||
%files plpython3 -f plpython3.lst
|
%files plpython3 -f plpython3.lst
|
||||||
%{_datadir}/pgsql/extension/plpython3*
|
%{_datadir}/postgresql/extension/plpython3*
|
||||||
%{_libdir}/pgsql/plpython3.so
|
%{_libdir}/postgresql/plpython3.so
|
||||||
|
|
||||||
%files test
|
%files test
|
||||||
%attr(-,postgres,postgres) %{_libdir}/pgsql/test
|
%attr(-,postgres,postgres) %{_libdir}/postgresql/test
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Jan 14 2020 openEuler Buildteam <buildteam@openeuler.org> - 10.5-9
|
||||||
|
- Type:enhancement
|
||||||
|
- ID:NA
|
||||||
|
- SUG:restart
|
||||||
|
- DESC: remove useless files
|
||||||
|
|
||||||
* Mon Jan 13 2020 yanzhihua <yanzhihua4@huawei.com> - 10.5-8
|
* Mon Jan 13 2020 yanzhihua <yanzhihua4@huawei.com> - 10.5-8
|
||||||
- Type: enhancement
|
- Type: enhancement
|
||||||
- ID: NA
|
- ID: NA
|
||||||
|
|||||||
@ -1 +0,0 @@
|
|||||||
d /var/run/postgresql 0755 postgres postgres -
|
|
||||||
Loading…
x
Reference in New Issue
Block a user