Remove libpq package (#2965)
This commit is contained in:
parent
07a07b20b5
commit
2f7aef6385
File diff suppressed because one or more lines are too long
|
@ -647,7 +647,6 @@
|
|||
"libpinyin",
|
||||
"libplist",
|
||||
"libpmemobj-cpp",
|
||||
"libpq",
|
||||
"libproxy",
|
||||
"libpsm2",
|
||||
"libpwquality",
|
||||
|
|
|
@ -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,53 +0,0 @@
|
|||
Change the built-in default socket directory to be /var/run/postgresql.
|
||||
For backwards compatibility with (probably non-libpq-based) clients that
|
||||
might still expect to find the socket in /tmp, also create a socket in
|
||||
/tmp. This is to resolve communication problems with clients operating
|
||||
under systemd's PrivateTmp environment, which won't be using the same
|
||||
global /tmp directory as the server; see bug #825448.
|
||||
|
||||
Note that we apply the socket directory change at the level of the
|
||||
hard-wired defaults in the C code, not by just twiddling the setting in
|
||||
postgresql.conf.sample; this is so that the change will take effect on
|
||||
server package update, without requiring any existing postgresql.conf
|
||||
to be updated. (Of course, a user who dislikes this behavior can still
|
||||
override it via postgresql.conf.)
|
||||
|
||||
diff --git a/src/backend/utils/misc/guc.c b/src/backend/utils/misc/guc.c
|
||||
index 9481f2d..75532c7 100644
|
||||
--- a/src/backend/utils/misc/guc.c
|
||||
+++ b/src/backend/utils/misc/guc.c
|
||||
@@ -3196,7 +3196,7 @@ static struct config_string ConfigureNamesString[] =
|
||||
},
|
||||
&Unix_socket_directories,
|
||||
#ifdef HAVE_UNIX_SOCKETS
|
||||
- DEFAULT_PGSOCKET_DIR,
|
||||
+ DEFAULT_PGSOCKET_DIR ", /tmp",
|
||||
#else
|
||||
"",
|
||||
#endif
|
||||
diff --git a/src/bin/initdb/initdb.c b/src/bin/initdb/initdb.c
|
||||
index feeff9e..3e3d784 100644
|
||||
--- a/src/bin/initdb/initdb.c
|
||||
+++ b/src/bin/initdb/initdb.c
|
||||
@@ -1234,7 +1234,7 @@ setup_config(void)
|
||||
|
||||
#ifdef HAVE_UNIX_SOCKETS
|
||||
snprintf(repltok, sizeof(repltok), "#unix_socket_directories = '%s'",
|
||||
- DEFAULT_PGSOCKET_DIR);
|
||||
+ DEFAULT_PGSOCKET_DIR ", /tmp");
|
||||
#else
|
||||
snprintf(repltok, sizeof(repltok), "#unix_socket_directories = ''");
|
||||
#endif
|
||||
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.
|
||||
*/
|
||||
-#define DEFAULT_PGSOCKET_DIR "/tmp"
|
||||
+#define DEFAULT_PGSOCKET_DIR "/var/run/postgresql"
|
||||
|
||||
/*
|
||||
* This is the default event source for Windows event log.
|
|
@ -1,85 +0,0 @@
|
|||
diff --git a/config/Makefile b/config/Makefile
|
||||
index 67e7998f55..86612a42c3 100644
|
||||
--- a/config/Makefile
|
||||
+++ b/config/Makefile
|
||||
@@ -8,6 +8,7 @@ include $(top_builddir)/src/Makefile.global
|
||||
install: all installdirs
|
||||
$(INSTALL_SCRIPT) $(srcdir)/install-sh '$(DESTDIR)$(pgxsdir)/config/install-sh'
|
||||
$(INSTALL_SCRIPT) $(srcdir)/missing '$(DESTDIR)$(pgxsdir)/config/missing'
|
||||
+ $(INSTALL_SCRIPT) $(srcdir)/build-exports-gnu-ld '$(DESTDIR)$(pgxsdir)/config/build-exports-gnu-ld'
|
||||
|
||||
installdirs:
|
||||
$(MKDIR_P) '$(DESTDIR)$(pgxsdir)/config'
|
||||
diff --git a/config/build-exports-gnu-ld b/config/build-exports-gnu-ld
|
||||
new file mode 100755
|
||||
index 0000000000..84c48e3ade
|
||||
--- /dev/null
|
||||
+++ b/config/build-exports-gnu-ld
|
||||
@@ -0,0 +1,41 @@
|
||||
+#! /bin/sh
|
||||
+
|
||||
+# by default use PG_ prefix
|
||||
+: "${SYMBOL_VERSION_PREFIX=PG_}"
|
||||
+
|
||||
+# we started symbol versioning since v10
|
||||
+: "${SYMBOL_VERSION_START=9.6}"
|
||||
+
|
||||
+version=$SYMBOL_VERSION_START
|
||||
+version_prev=
|
||||
+first=:
|
||||
+
|
||||
+open_block ()
|
||||
+{
|
||||
+ $first || echo
|
||||
+ first=false
|
||||
+ echo "${SYMBOL_VERSION_PREFIX}$version {"
|
||||
+ echo "global:"
|
||||
+}
|
||||
+
|
||||
+close_block ()
|
||||
+{
|
||||
+ echo "}${version_prev:+ $SYMBOL_VERSION_PREFIX$version_prev};"
|
||||
+ version_prev=$version
|
||||
+ version=$1
|
||||
+}
|
||||
+
|
||||
+open_block
|
||||
+while read -r symbol _ new_version
|
||||
+do
|
||||
+ case $symbol in '#'*) continue ;; esac
|
||||
+ if test -n "$new_version" && test "$new_version" != "$version"; then
|
||||
+ close_block "$new_version"
|
||||
+ open_block
|
||||
+ fi
|
||||
+ echo " $symbol;"
|
||||
+done
|
||||
+
|
||||
+echo "local:"
|
||||
+echo " *;"
|
||||
+close_block
|
||||
diff --git a/src/Makefile.shlib b/src/Makefile.shlib
|
||||
index 373d73caef..d5bd5468cd 100644
|
||||
--- a/src/Makefile.shlib
|
||||
+++ b/src/Makefile.shlib
|
||||
@@ -231,7 +231,7 @@ ifeq ($(PORTNAME), linux)
|
||||
ifdef soname
|
||||
LINK.shared += -Wl,-soname,$(soname)
|
||||
endif
|
||||
- BUILD.exports = ( echo '{ global:'; $(AWK) '/^[^\#]/ {printf "%s;\n",$$1}' $<; echo ' local: *; };' ) >$@
|
||||
+ BUILD.exports = $(SHELL) $(top_srcdir)/config/build-exports-gnu-ld < $< > $@
|
||||
exports_file = $(SHLIB_EXPORTS:%.txt=%.list)
|
||||
ifneq (,$(exports_file))
|
||||
LINK.shared += -Wl,--version-script=$(exports_file)
|
||||
diff --git a/src/interfaces/libpq/exports.txt b/src/interfaces/libpq/exports.txt
|
||||
index 7c808e5215..3631340b23 100644
|
||||
--- a/src/interfaces/libpq/exports.txt
|
||||
+++ b/src/interfaces/libpq/exports.txt
|
||||
@@ -171,7 +171,7 @@ PQsslAttributeNames 168
|
||||
PQsslAttribute 169
|
||||
PQsetErrorContextVisibility 170
|
||||
PQresultVerboseErrorMessage 171
|
||||
-PQencryptPasswordConn 172
|
||||
+PQencryptPasswordConn 172 10
|
||||
PQresultMemorySize 173
|
||||
PQhostaddr 174
|
||||
PQgssEncInUse 175
|
|
@ -1,5 +0,0 @@
|
|||
{
|
||||
"Signatures": {
|
||||
"postgresql-12.2.tar.bz2": "ad1dcc4c4fc500786b745635a9e1eba950195ce20b8913f50345bb7d5369b5de"
|
||||
}
|
||||
}
|
|
@ -1,177 +0,0 @@
|
|||
%global majorversion 12
|
||||
%global obsoletes_version %( echo $(( %{majorversion} + 1 )) )
|
||||
Summary: PostgreSQL client library
|
||||
Name: libpq
|
||||
Version: %{majorversion}.2
|
||||
Release: 3%{?dist}
|
||||
License: PostgreSQL
|
||||
Vendor: Microsoft Corporation
|
||||
Distribution: Mariner
|
||||
URL: https://www.postgresql.org/
|
||||
Source0: https://ftp.postgresql.org/pub/source/v%{version}/postgresql-%{version}.tar.bz2
|
||||
# Comments for these patches are in the patch files.
|
||||
Patch1: libpq-10.3-rpm-pgsql.patch
|
||||
Patch2: libpq-10.3-var-run-socket.patch
|
||||
Patch3: libpq-12.1-symbol-versioning.patch
|
||||
BuildRequires: bison
|
||||
BuildRequires: flex
|
||||
BuildRequires: gawk
|
||||
BuildRequires: gcc
|
||||
BuildRequires: gettext
|
||||
BuildRequires: glibc-devel
|
||||
BuildRequires: krb5-devel
|
||||
BuildRequires: multilib-rpm-config
|
||||
BuildRequires: openldap-devel
|
||||
BuildRequires: openssl-devel
|
||||
BuildRequires: zlib-devel
|
||||
Obsoletes: postgresql-libs < %{obsoletes_version}
|
||||
Provides: postgresql-libs = %{version}-%{release}
|
||||
|
||||
%description
|
||||
The libpq package provides the essential shared library for any PostgreSQL
|
||||
client program or interface. You will need to install this package to use any
|
||||
other PostgreSQL package or any clients that need to connect to a PostgreSQL
|
||||
server.
|
||||
|
||||
%package devel
|
||||
Summary: Development files for building PostgreSQL client tools
|
||||
Requires: %{name}%{?_isa} = %{version}-%{release}
|
||||
# Historically we had 'postgresql-devel' package which was used for building
|
||||
# both PG clients and PG server modules; let's have this fake provide to cover
|
||||
# most of the depending packages and the rest (those which want to build server
|
||||
# modules) need to be fixed to require postgresql-server-devel package.
|
||||
Provides: postgresql-devel = %{version}-%{release}
|
||||
Obsoletes: postgresql-devel < %{obsoletes_version}
|
||||
|
||||
%description devel
|
||||
The libpq package provides the essential shared library for any PostgreSQL
|
||||
client program or interface. You will need to install this package to build any
|
||||
package or any clients that need to connect to a PostgreSQL server.
|
||||
|
||||
%prep
|
||||
%autosetup -n postgresql-%{version} -p1
|
||||
|
||||
# remove .gitignore files to ensure none get into the RPMs (bug #642210)
|
||||
find . -type f -name .gitignore | xargs rm
|
||||
|
||||
|
||||
%build
|
||||
# complements symbol-versioning patch
|
||||
export SYMBOL_VERSION_PREFIX=RHPG_
|
||||
|
||||
# We don't build server nor client (e.g. /bin/psql) binaries in this package, so
|
||||
# we can disable some configure options.
|
||||
%configure \
|
||||
--disable-rpath \
|
||||
--with-ldap \
|
||||
--with-openssl \
|
||||
--with-gssapi \
|
||||
--enable-nls \
|
||||
--without-readline \
|
||||
--datadir=%{_datadir}/pgsql
|
||||
|
||||
%global build_subdirs \\\
|
||||
src/include \\\
|
||||
src/common \\\
|
||||
src/port \\\
|
||||
src/interfaces/libpq \\\
|
||||
src/bin/pg_config
|
||||
|
||||
for subdir in %{build_subdirs}; do
|
||||
%make_build -C "$subdir"
|
||||
done
|
||||
|
||||
|
||||
%install
|
||||
for subdir in %{build_subdirs}; do
|
||||
%make_install -C "$subdir"
|
||||
done
|
||||
|
||||
# remove files not to be packaged
|
||||
find %{buildroot} -name '*.a' -delete
|
||||
rm -r %{buildroot}%{_includedir}/pgsql/server
|
||||
|
||||
%{multilib_fix_c_header} --file "%{_includedir}/pg_config.h"
|
||||
%{multilib_fix_c_header} --file "%{_includedir}/pg_config_ext.h"
|
||||
|
||||
find_lang_bins ()
|
||||
{
|
||||
lstfile=$1 ; shift
|
||||
cp /dev/null "$lstfile"
|
||||
for binary; do
|
||||
%find_lang "$binary"-%{majorversion}
|
||||
cat "$binary"-%{majorversion}.lang >>"$lstfile"
|
||||
done
|
||||
}
|
||||
|
||||
find_lang_bins %{name}.lst libpq5
|
||||
find_lang_bins %{name}-devel.lst pg_config
|
||||
|
||||
|
||||
%files -f %{name}.lst
|
||||
%license COPYRIGHT
|
||||
%{_libdir}/libpq.so.5*
|
||||
%dir %{_datadir}/pgsql
|
||||
%doc %{_datadir}/pgsql/pg_service.conf.sample
|
||||
|
||||
%files devel -f %{name}-devel.lst
|
||||
%{_bindir}/pg_config
|
||||
%{_includedir}/*
|
||||
%{_libdir}/libpq.so
|
||||
%{_libdir}/pkgconfig/libpq.pc
|
||||
|
||||
%changelog
|
||||
* Wed Dec 08 2021 Thomas Crain <thcrain@microsoft.com> - 12.2-3
|
||||
- License verified
|
||||
- Lint spec
|
||||
|
||||
* Fri Oct 15 2021 Pawel Winogrodzki <pawelwi@microsoft.com> - 12.2-2
|
||||
- Initial CBL-Mariner import from Fedora 32 (license: MIT).
|
||||
|
||||
* Mon Feb 17 2020 Patrik Novotný <panovotn@redhat.com> - 12.2-1
|
||||
- Rebase to upstream release 12.2
|
||||
|
||||
* Tue Feb 04 2020 Patrik Novotný <panovotn@redhat.com> - 12.1-1
|
||||
- Rebase to upstream release 12.1
|
||||
|
||||
* Wed Jan 29 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
|
||||
|
||||
* Wed Aug 07 2019 Petr Kubat <pkubat@redhat.com> - 11.5-1
|
||||
- New upstream version 11.5
|
||||
|
||||
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 11.4-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
|
||||
|
||||
* Tue Jul 09 2019 Petr Kubat <pkubat@redhat.com> - 11.4-1
|
||||
- New upstream version 11.4
|
||||
|
||||
* Fri May 10 2019 Pavel Raiskup <praiskup@redhat.com> - 11.3-2
|
||||
- obsolete anything < %%majorversion+1
|
||||
|
||||
* Thu May 09 2019 Patrik Novotný <panovotn@redhat.com> - 11.3-1
|
||||
- New upstream version 11.3
|
||||
|
||||
* Mon Feb 18 2019 Pavel Raiskup <praiskup@redhat.com> - 11.2-2
|
||||
- fix dnf system-upgrade from f29 to f29+, rhbz#1677849
|
||||
|
||||
* Thu Feb 14 2019 Pavel Raiskup <praiskup@redhat.com> - 11.2-1
|
||||
- latest upstream release, per release notes:
|
||||
https://www.postgresql.org/docs/11/static/release-11-1.html
|
||||
https://www.postgresql.org/docs/11/static/release-11-2.html
|
||||
|
||||
* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 11.0-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
|
||||
|
||||
* Tue Oct 16 2018 Pavel Raiskup <praiskup@redhat.com> - 11.0-1
|
||||
- latest upstream release, per release notes:
|
||||
https://www.postgresql.org/docs/11/static/release-11-0.html
|
||||
|
||||
* Tue Sep 04 2018 Pavel Raiskup <praiskup@redhat.com> - 10.5-4
|
||||
- fix provides/obsoletes to final state
|
||||
|
||||
* Thu Aug 30 2018 Pavel Raiskup <praiskup@redhat.com> - 10.5-1
|
||||
- libpq packaging for Fedora
|
|
@ -1,7 +1,7 @@
|
|||
Summary: PostgreSQL database engine
|
||||
Name: postgresql
|
||||
Version: 14.2
|
||||
Release: 1%{?dist}
|
||||
Release: 2%{?dist}
|
||||
License: PostgreSQL
|
||||
Vendor: Microsoft Corporation
|
||||
Distribution: Mariner
|
||||
|
@ -38,6 +38,12 @@ PostgreSQL is an object-relational database management system.
|
|||
%package libs
|
||||
Summary: Libraries for use with PostgreSQL
|
||||
Group: Applications/Databases
|
||||
# Mariner used to have libpq and libpq-devel as separate packages, following Fedora's packaging scheme,
|
||||
# but this isn't needed for our use case and overcomplicates our packaging. So, let's ensure that
|
||||
# (a) the names are provided for compatibility, and
|
||||
# (b) we obsolete all versions published in Mariner 2.0's repositories (only libpq{,-devel}-12.2-3.cm2)
|
||||
Provides: libpq = %{version}-%{release}
|
||||
Obsoletes: libpq < 13
|
||||
|
||||
%description libs
|
||||
The postgresql-libs package provides the essential shared libraries for any
|
||||
|
@ -48,8 +54,10 @@ PostgreSQL server.
|
|||
%package devel
|
||||
Summary: Development files for postgresql.
|
||||
Group: Development/Libraries
|
||||
|
||||
Requires: postgresql = %{version}-%{release}
|
||||
# See libs subpackage for explanation of the libpq-devel provides/obsoletes
|
||||
Provides: libpq-devel = %{version}-%{release}
|
||||
Obsoletes: libpq-devel < 13
|
||||
|
||||
%description devel
|
||||
The postgresql-devel package contains libraries and header files for
|
||||
|
@ -75,7 +83,6 @@ make %{?_smp_mflags}
|
|||
cd contrib && make %{?_smp_mflags}
|
||||
|
||||
%install
|
||||
[ %{buildroot} != "/"] && rm -rf %{buildroot}/*
|
||||
make install DESTDIR=%{buildroot}
|
||||
cd contrib && make install DESTDIR=%{buildroot}
|
||||
|
||||
|
@ -91,8 +98,7 @@ sed -i '2219s/",/ ; EXIT_STATUS=$? ; sleep 5 ; exit $EXIT_STATUS",/g' src/test
|
|||
chown -Rv nobody .
|
||||
sudo -u nobody -s /bin/bash -c "PATH=$PATH make -k check"
|
||||
|
||||
%post -p /sbin/ldconfig
|
||||
%postun -p /sbin/ldconfig
|
||||
%ldconfig_scriptlets
|
||||
|
||||
%files
|
||||
%defattr(-,root,root)
|
||||
|
@ -166,6 +172,9 @@ sudo -u nobody -s /bin/bash -c "PATH=$PATH make -k check"
|
|||
%{_libdir}/libpgtypes.a
|
||||
|
||||
%changelog
|
||||
* Fri Apr 29 2022 Olivia Crain <oliviacrain@microsoft.com> - 14.2-2
|
||||
- Add provides, obsoletes for libpq and libpq-devel packages
|
||||
|
||||
* Wed Apr 13 2022 Henry Beberman <henry.beberman@microsoft.com> - 14.2-1
|
||||
- Update package version to resolve CVE-2021-23214 and CVE-2021-23222
|
||||
- Add pg_verifybackup and pg_amcheck, remove pg_standby
|
||||
|
|
|
@ -9296,16 +9296,6 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"component": {
|
||||
"type": "other",
|
||||
"other": {
|
||||
"name": "libpq",
|
||||
"version": "12.2",
|
||||
"downloadUrl": "https://ftp.postgresql.org/pub/source/v12.2/postgresql-12.2.tar.bz2"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"component": {
|
||||
"type": "other",
|
||||
|
|
Loading…
Reference in New Issue