From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 5CF28139360 for ; Fri, 13 Aug 2021 16:07:02 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 6BE11E0827; Fri, 13 Aug 2021 16:07:01 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 3AA71E0827 for ; Fri, 13 Aug 2021 16:07:01 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 90CAD33BE93 for ; Fri, 13 Aug 2021 16:06:59 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 302C67D6 for ; Fri, 13 Aug 2021 16:06:58 +0000 (UTC) From: "罗百科" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "罗百科" Message-ID: <1628870815.2860102d42d0816246655a1b5e5066c033dfcfae.patrick@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: dev-db/postgresql/ X-VCS-Repository: repo/gentoo X-VCS-Files: dev-db/postgresql/Manifest dev-db/postgresql/postgresql-10.18.ebuild dev-db/postgresql/postgresql-11.13.ebuild dev-db/postgresql/postgresql-12.8.ebuild dev-db/postgresql/postgresql-13.4.ebuild dev-db/postgresql/postgresql-14_beta2.ebuild dev-db/postgresql/postgresql-14_beta3.ebuild dev-db/postgresql/postgresql-9.6.23.ebuild X-VCS-Directories: dev-db/postgresql/ X-VCS-Committer: patrick X-VCS-Committer-Name: 罗百科 X-VCS-Revision: 2860102d42d0816246655a1b5e5066c033dfcfae X-VCS-Branch: master Date: Fri, 13 Aug 2021 16:06:58 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 540222a1-063d-4a55-8011-ca3305836ac4 X-Archives-Hash: 5a5e80f84625b9b4b9d9c5a4c66af9aa commit: 2860102d42d0816246655a1b5e5066c033dfcfae Author: Patrick Lauer gentoo org> AuthorDate: Fri Aug 13 16:06:39 2021 +0000 Commit: 罗百科 gentoo org> CommitDate: Fri Aug 13 16:06:55 2021 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2860102d dev-db/postgresql: Bump Package-Manager: Portage-3.0.20, Repoman-3.0.3 Signed-off-by: Patrick Lauer gentoo.org> dev-db/postgresql/Manifest | 7 +- ...sql-14_beta2.ebuild => postgresql-10.18.ebuild} | 51 ++++----- ...sql-14_beta2.ebuild => postgresql-11.13.ebuild} | 30 ++--- ...esql-14_beta2.ebuild => postgresql-12.8.ebuild} | 28 ++--- ...esql-14_beta2.ebuild => postgresql-13.4.ebuild} | 6 +- ...-14_beta2.ebuild => postgresql-14_beta3.ebuild} | 0 ...ql-14_beta2.ebuild => postgresql-9.6.23.ebuild} | 122 +++++++++++---------- 7 files changed, 109 insertions(+), 135 deletions(-) diff --git a/dev-db/postgresql/Manifest b/dev-db/postgresql/Manifest index 100db0604af..3b143a16b0e 100644 --- a/dev-db/postgresql/Manifest +++ b/dev-db/postgresql/Manifest @@ -1,7 +1,12 @@ DIST postgresql-10.17.tar.bz2 19153278 BLAKE2B 0f043a9e95a76b5b96572548b82ae35c0b9fb517214ea392e6ba278f78071811ea8942fd50c14508dc3380c797a2196b5c5cfadff299d6a379ee581db18e3489 SHA512 4989abe56cf631b367252c62f15c9f4a22a864a75d607fa29c2116c95e29f95bc3855df6b2fc88dbedcfc7b238d6732d13629fc967f09bbd3ea4d5c328cb925f +DIST postgresql-10.18.tar.bz2 19197042 BLAKE2B 3754df1820d7ffb9b1d82960f2107b2b5a9fede66467254129a478e85f684ce7c2b51a87fa0f048b064a86c8b1eb766fabd5e2029ff1b53f25baef8b7edb3fd2 SHA512 8a564256b0a5f6375a817cc5db14e56f7f7ee831881a2dc78759e7f2cf708d95fb61ad75a01f13fb05517ab165c991794d837bbb93f60d54f4fb33ca0ac45729 DIST postgresql-11.12.tar.bz2 20075485 BLAKE2B 0986a31662a307f76c230d7945495b42c70417835c8d7c7b6781d0ff4317607c736d9278a4b8bb95582799b771011efca256d9507d5bb9db423f3ad43eb220fb SHA512 668914424e1dbe09a66d5272e5b0a17fa24c90d3d099f8161f1420eaa76675ea1c622e4d149bdfcb31f07af19602a500913cb97c49d717df23e374de09dc0274 +DIST postgresql-11.13.tar.bz2 20123787 BLAKE2B 5adededa826c2fac32e76eb097998309bf2f65705b3780433059318dbc65ca1b037049dfc5cd9bd874c27073429ced5cd5aa2178929a8ee59395c6dded0a4166 SHA512 1b2061d505a7460e0aaae53818e77fc99fa7b73eea119033a98a3d7dd3d70d00403998654990b03bbf6eb2df383e2f44791137c8922ea4015715f8bf49c5837f DIST postgresql-12.7.tar.bz2 20819005 BLAKE2B 4939cb314253bb9ca2b14639f730967ce7ad5c5eb135d529b112290e6b351f7b507d6428cc48b4e24f34f664b5f4938029ceb9cc6161c9aff5f60ba0b3f848c7 SHA512 47ca347df63a441e52e52442074e85d0ebd3a89f7eb037022c4690cbe88b21a6a959092a812b79bb30db47b5975a5d7908318c73b2685683d48b4789d4ae6a44 +DIST postgresql-12.8.tar.bz2 20849478 BLAKE2B 20ad970f03665b9c1f24c646096476398c1791c49eb4f34bb6c3b1c7cf3955bb79ef81e178e5d72ffb91625a9ec1cff409fa95d390caa02862fec2599e6d8a9b SHA512 970fe1041e427ac1c8a786c93e2079b0a9c8b3fcaf9d38877894eb02e8a9afc7cd73d7ac28078c455845a922a1b7d9c1e22cb7990d8d523dd6496af9442fba01 DIST postgresql-13.3.tar.bz2 21119109 BLAKE2B 395a3dc5cde8f579a3c35ea70346bdc630a8e8f2f86f310a5e4f4a1f6177dab7e78ba6e41c384ba650eb86813fcd428fea8aa22481f9a494cd80aa94bd7b52dd SHA512 1560cc766982a9ea9d33c77835b20e33e11b03acb77fc75d905c565883935a7dbcd27b9b2ab6a0ecdb815261f7c259865cb3dac85c10a3181c3fcaeb4d28bf60 -DIST postgresql-14beta2.tar.bz2 22555641 BLAKE2B 50d928c26d679789cda82b074150b78707adb8204fcc02392a027d8b71a61a2dc80042d9f9b68eee9a36f7991178e5e24f72ba1a931d16fc5d8e81097e2874f2 SHA512 fdda7b4ea178a1c0990952da2caf07186deb2047b292c49549881e34d2e7ebb09014f914632ef3342ab7184614d47320d280cceb6bd85a93f79dfcfa68137eff +DIST postgresql-13.4.tar.bz2 21157443 BLAKE2B e16684ef59f213d23366e8d18c4bf6f81d6e2eac8e940449fee1ef6b150e7ff7d3dce8831b318d1fd3f72d642110576ebc7bd981185a39f19fea6357c58be170 SHA512 f1faf676ffdcee3e7f2c3b78f4badf44770d6be58090036d119d8fb0688e2b9f9159dd44fe850c179b8e23f256942c05edb8fcc385f0e852d16b37eace785b5a +DIST postgresql-14beta3.tar.bz2 22584314 BLAKE2B f89e5395a2a1f704baea1e864ee1576b6646dabf30d90e5da2c082f6a1d977c9dd7ac2683690e1071f84e062be19b4906895a165b0a4a6c57f57367a21821adb SHA512 a84c81095945d71f9720a2d4e3f0a93887ef06b6d6b2b5bf5c90a4cee9df7990ed081cd90de22ea660bab2e79eb05dfe5da849d175b75037874f069dc28a9cfd DIST postgresql-9.5.25.tar.bz2 17923796 BLAKE2B 432e035e78dacddddfd46fd4d04775b61e2e4db9e61945fa5f7e1c3c5ea3516a5e327489b4e57313b0d6ba4f2e20f52a164f96db01aa22b755ff625039f262eb SHA512 621b36d767d2c7eb2e942cb7b26ca7491450fcfd9606114849f7336b4d8a0bc0196badb44da4918e748145d21b6f72ccf1255a1309dff2427da8b39b63fca427 DIST postgresql-9.6.22.tar.bz2 19003741 BLAKE2B adff6e81ec4b289bd5c51fa44adb38d7cc3936e2e5545ff23fccb0f3f1fe1c881ed70f9a0a5d366319f876eb01a9f675b66c9374b8b41615220f45a70450ad6d SHA512 371f85f2d02a8a3b888396440149e9b432f91e106a7feb8a163b275a0586843683124281a0965abf3c1215cb68e2002976913f88c75e35e52ac5f78d4145fd7b +DIST postgresql-9.6.23.tar.bz2 19013235 BLAKE2B a7bd7a0678c2c58efd71f320f838ee66fa3d75fb37d95e1c070e59ece69d4b66850e676054807848dbccedca7e9a4cc0b244c3cf0f0ff039b88c4f9b221e8819 SHA512 205b47cf1c22519092f840a9b3bf6bdf95f455e5ba02a7e1bc1495f85bb25f8ccfe9f60c83dc2801f1366b88fc35e64c23eb9bdc89a4bb5d233243af4606d59c diff --git a/dev-db/postgresql/postgresql-14_beta2.ebuild b/dev-db/postgresql/postgresql-10.18.ebuild similarity index 92% copy from dev-db/postgresql/postgresql-14_beta2.ebuild copy to dev-db/postgresql/postgresql-10.18.ebuild index 7cf4067cc08..307cad6fd9f 100644 --- a/dev-db/postgresql/postgresql-14_beta2.ebuild +++ b/dev-db/postgresql/postgresql-10.18.ebuild @@ -7,7 +7,7 @@ PYTHON_COMPAT=( python3_{8,9,10} ) inherit flag-o-matic linux-info multilib pam prefix python-single-r1 systemd tmpfiles -KEYWORDS="" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~ppc-macos ~x86-solaris" SLOT=$(ver_cut 1) @@ -20,8 +20,8 @@ LICENSE="POSTGRESQL GPL-2" DESCRIPTION="PostgreSQL RDBMS" HOMEPAGE="https://www.postgresql.org/" -IUSE="debug doc icu kerberos kernel_linux ldap llvm lz4 nls pam - perl python +readline selinux +server systemd ssl static-libs tcl +IUSE="debug doc icu kerberos kernel_linux ldap nls pam perl + python +readline selinux +server systemd ssl static-libs tcl threads uuid xml zlib" REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" @@ -31,15 +31,11 @@ CDEPEND=" acct-group/postgres acct-user/postgres sys-apps/less +virtual/libcrypt:= virtual/libintl icu? ( dev-libs/icu:= ) kerberos? ( virtual/krb5 ) ldap? ( net-nds/openldap ) -llvm? ( - sys-devel/llvm:= - sys-devel/clang:= -) -lz4? ( app-arch/lz4 ) pam? ( sys-libs/pam ) perl? ( >=dev-lang/perl-5.8:= ) python? ( ${PYTHON_DEPS} ) @@ -92,7 +88,8 @@ pkg_setup() { } src_prepare() { - eapply "${FILESDIR}"/${PN}-13.3-riscv-spinlocks.patch + # Work around PPC{,64} compilation bug where bool is already defined + sed '/#ifndef __cplusplus/a #undef bool' -i src/include/c.h || die # Set proper run directory sed "s|\(PGSOCKET_DIR\s\+\)\"/tmp\"|\1\"${EPREFIX}/run/postgresql\"|" \ @@ -103,14 +100,18 @@ src_prepare() { # hardened and non-hardened environments. (Bug #528786) sed 's/@install_bin@/install -c/' -i src/Makefile.global.in || die - use server || eapply "${FILESDIR}/${PN}-13_beta1-no-server.patch" + use server || eapply "${FILESDIR}/${PN}-10.2-no-server.patch" if use pam ; then - sed "s/\(#define PGSQL_PAM_SERVICE \"postgresql\)/\1-${SLOT}/" \ + sed -e "s/\(#define PGSQL_PAM_SERVICE \"postgresql\)/\1-${SLOT}/" \ -i src/backend/libpq/auth.c || \ die 'PGSQL_PAM_SERVICE rename failed.' fi + # https://bugs.gentoo.org/753257 + # https://bugs.gentoo.org/766225 + eapply "${FILESDIR}"/postgresql-10.0-icu68.patch + eapply_user } @@ -137,20 +138,19 @@ src_configure() { [[ -z $uuid_config ]] && uuid_config="--with-uuid=ossp" fi - local myconf="\ + econf \ --prefix="${PO}/usr/$(get_libdir)/postgresql-${SLOT}" \ --datadir="${PO}/usr/share/postgresql-${SLOT}" \ --includedir="${PO}/usr/include/postgresql-${SLOT}" \ --mandir="${PO}/usr/share/postgresql-${SLOT}/man" \ --sysconfdir="${PO}/etc/postgresql-${SLOT}" \ --with-system-tzdata="${PO}/usr/share/zoneinfo" \ + $(use_enable !alpha spinlocks) \ $(use_enable debug) \ $(use_enable threads thread-safety) \ $(use_with icu) \ $(use_with kerberos gssapi) \ $(use_with ldap) \ - $(use_with llvm) \ - $(use_with lz4) \ $(use_with pam) \ $(use_with perl) \ $(use_with python) \ @@ -162,14 +162,7 @@ src_configure() { $(use_with xml libxml) \ $(use_with xml libxslt) \ $(use_with zlib) \ - $(use_enable nls)" - if use alpha; then - myconf+=" --disable-spinlocks" - else - # Should be the default but just in case - myconf+=" --enable-spinlocks" - fi - econf ${myconf} + $(use_enable nls) } src_compile() { @@ -181,7 +174,7 @@ src_install() { emake DESTDIR="${D}" install emake DESTDIR="${D}" install -C contrib - dodoc README HISTORY + dodoc README HISTORY doc/{TODO,bug.template} # man pages are already built, but if we have the target make them, # they'll be generated from source before being installed so we @@ -390,9 +383,9 @@ pkg_config() { einfo "Creating the data directory ..." if [[ ${EUID} == 0 ]] ; then - mkdir -p "$(dirname ${DATA_DIR%/})" || die "Couldn't parent dirs" - mkdir -m 0700 "${DATA_DIR%/}" || die "Couldn't make DATA_DIR" - chown -h postgres:postgres "${DATA_DIR%/}" || die "Couldn't chown" + mkdir -p "${DATA_DIR}" + chown -Rf postgres:postgres "${DATA_DIR}" + chmod 0700 "${DATA_DIR}" fi einfo "Initializing the database ..." @@ -450,12 +443,8 @@ pkg_config() { src_test() { if use server && [[ ${UID} -ne 0 ]] ; then - # Some ICU tests fail if LC_CTYPE and LC_COLLATE aren't the same. We set - # LC_CTYPE to be equal to LC_COLLATE since LC_COLLATE is set by Portage. - local old_ctype=${LC_CTYPE} - export LC_CTYPE=${LC_COLLATE} emake check - export LC_CTYPE=${old_ctype} + einfo "If you think other tests besides the regression tests are necessary, please" einfo "submit a bug including a patch for this ebuild to enable them." else diff --git a/dev-db/postgresql/postgresql-14_beta2.ebuild b/dev-db/postgresql/postgresql-11.13.ebuild similarity index 94% copy from dev-db/postgresql/postgresql-14_beta2.ebuild copy to dev-db/postgresql/postgresql-11.13.ebuild index 7cf4067cc08..ca84f95e4f9 100644 --- a/dev-db/postgresql/postgresql-14_beta2.ebuild +++ b/dev-db/postgresql/postgresql-11.13.ebuild @@ -7,7 +7,7 @@ PYTHON_COMPAT=( python3_{8,9,10} ) inherit flag-o-matic linux-info multilib pam prefix python-single-r1 systemd tmpfiles -KEYWORDS="" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" SLOT=$(ver_cut 1) @@ -20,7 +20,7 @@ LICENSE="POSTGRESQL GPL-2" DESCRIPTION="PostgreSQL RDBMS" HOMEPAGE="https://www.postgresql.org/" -IUSE="debug doc icu kerberos kernel_linux ldap llvm lz4 nls pam +IUSE="debug doc icu kerberos kernel_linux ldap llvm nls pam perl python +readline selinux +server systemd ssl static-libs tcl threads uuid xml zlib" @@ -39,7 +39,6 @@ llvm? ( sys-devel/llvm:= sys-devel/clang:= ) -lz4? ( app-arch/lz4 ) pam? ( sys-libs/pam ) perl? ( >=dev-lang/perl-5.8:= ) python? ( ${PYTHON_DEPS} ) @@ -92,8 +91,6 @@ pkg_setup() { } src_prepare() { - eapply "${FILESDIR}"/${PN}-13.3-riscv-spinlocks.patch - # Set proper run directory sed "s|\(PGSOCKET_DIR\s\+\)\"/tmp\"|\1\"${EPREFIX}/run/postgresql\"|" \ -i src/include/pg_config_manual.h || die @@ -103,7 +100,7 @@ src_prepare() { # hardened and non-hardened environments. (Bug #528786) sed 's/@install_bin@/install -c/' -i src/Makefile.global.in || die - use server || eapply "${FILESDIR}/${PN}-13_beta1-no-server.patch" + use server || eapply "${FILESDIR}/${PN}-11_beta1-no-server.patch" if use pam ; then sed "s/\(#define PGSQL_PAM_SERVICE \"postgresql\)/\1-${SLOT}/" \ @@ -137,20 +134,20 @@ src_configure() { [[ -z $uuid_config ]] && uuid_config="--with-uuid=ossp" fi - local myconf="\ + econf \ --prefix="${PO}/usr/$(get_libdir)/postgresql-${SLOT}" \ --datadir="${PO}/usr/share/postgresql-${SLOT}" \ --includedir="${PO}/usr/include/postgresql-${SLOT}" \ --mandir="${PO}/usr/share/postgresql-${SLOT}/man" \ --sysconfdir="${PO}/etc/postgresql-${SLOT}" \ --with-system-tzdata="${PO}/usr/share/zoneinfo" \ + $(use_enable !alpha spinlocks) \ $(use_enable debug) \ $(use_enable threads thread-safety) \ $(use_with icu) \ $(use_with kerberos gssapi) \ $(use_with ldap) \ $(use_with llvm) \ - $(use_with lz4) \ $(use_with pam) \ $(use_with perl) \ $(use_with python) \ @@ -162,14 +159,7 @@ src_configure() { $(use_with xml libxml) \ $(use_with xml libxslt) \ $(use_with zlib) \ - $(use_enable nls)" - if use alpha; then - myconf+=" --disable-spinlocks" - else - # Should be the default but just in case - myconf+=" --enable-spinlocks" - fi - econf ${myconf} + $(use_enable nls) } src_compile() { @@ -181,7 +171,7 @@ src_install() { emake DESTDIR="${D}" install emake DESTDIR="${D}" install -C contrib - dodoc README HISTORY + dodoc README HISTORY doc/{TODO,bug.template} # man pages are already built, but if we have the target make them, # they'll be generated from source before being installed so we @@ -450,12 +440,8 @@ pkg_config() { src_test() { if use server && [[ ${UID} -ne 0 ]] ; then - # Some ICU tests fail if LC_CTYPE and LC_COLLATE aren't the same. We set - # LC_CTYPE to be equal to LC_COLLATE since LC_COLLATE is set by Portage. - local old_ctype=${LC_CTYPE} - export LC_CTYPE=${LC_COLLATE} emake check - export LC_CTYPE=${old_ctype} + einfo "If you think other tests besides the regression tests are necessary, please" einfo "submit a bug including a patch for this ebuild to enable them." else diff --git a/dev-db/postgresql/postgresql-14_beta2.ebuild b/dev-db/postgresql/postgresql-12.8.ebuild similarity index 95% copy from dev-db/postgresql/postgresql-14_beta2.ebuild copy to dev-db/postgresql/postgresql-12.8.ebuild index 7cf4067cc08..20d046c4d1b 100644 --- a/dev-db/postgresql/postgresql-14_beta2.ebuild +++ b/dev-db/postgresql/postgresql-12.8.ebuild @@ -7,7 +7,7 @@ PYTHON_COMPAT=( python3_{8,9,10} ) inherit flag-o-matic linux-info multilib pam prefix python-single-r1 systemd tmpfiles -KEYWORDS="" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" SLOT=$(ver_cut 1) @@ -20,7 +20,7 @@ LICENSE="POSTGRESQL GPL-2" DESCRIPTION="PostgreSQL RDBMS" HOMEPAGE="https://www.postgresql.org/" -IUSE="debug doc icu kerberos kernel_linux ldap llvm lz4 nls pam +IUSE="debug doc icu kerberos kernel_linux ldap llvm nls pam perl python +readline selinux +server systemd ssl static-libs tcl threads uuid xml zlib" @@ -39,7 +39,6 @@ llvm? ( sys-devel/llvm:= sys-devel/clang:= ) -lz4? ( app-arch/lz4 ) pam? ( sys-libs/pam ) perl? ( >=dev-lang/perl-5.8:= ) python? ( ${PYTHON_DEPS} ) @@ -92,8 +91,6 @@ pkg_setup() { } src_prepare() { - eapply "${FILESDIR}"/${PN}-13.3-riscv-spinlocks.patch - # Set proper run directory sed "s|\(PGSOCKET_DIR\s\+\)\"/tmp\"|\1\"${EPREFIX}/run/postgresql\"|" \ -i src/include/pg_config_manual.h || die @@ -103,7 +100,7 @@ src_prepare() { # hardened and non-hardened environments. (Bug #528786) sed 's/@install_bin@/install -c/' -i src/Makefile.global.in || die - use server || eapply "${FILESDIR}/${PN}-13_beta1-no-server.patch" + use server || eapply "${FILESDIR}/${PN}-12.1-no-server.patch" if use pam ; then sed "s/\(#define PGSQL_PAM_SERVICE \"postgresql\)/\1-${SLOT}/" \ @@ -137,20 +134,20 @@ src_configure() { [[ -z $uuid_config ]] && uuid_config="--with-uuid=ossp" fi - local myconf="\ + econf \ --prefix="${PO}/usr/$(get_libdir)/postgresql-${SLOT}" \ --datadir="${PO}/usr/share/postgresql-${SLOT}" \ --includedir="${PO}/usr/include/postgresql-${SLOT}" \ --mandir="${PO}/usr/share/postgresql-${SLOT}/man" \ --sysconfdir="${PO}/etc/postgresql-${SLOT}" \ --with-system-tzdata="${PO}/usr/share/zoneinfo" \ + $(use_enable !alpha spinlocks) \ $(use_enable debug) \ $(use_enable threads thread-safety) \ $(use_with icu) \ $(use_with kerberos gssapi) \ $(use_with ldap) \ $(use_with llvm) \ - $(use_with lz4) \ $(use_with pam) \ $(use_with perl) \ $(use_with python) \ @@ -162,14 +159,7 @@ src_configure() { $(use_with xml libxml) \ $(use_with xml libxslt) \ $(use_with zlib) \ - $(use_enable nls)" - if use alpha; then - myconf+=" --disable-spinlocks" - else - # Should be the default but just in case - myconf+=" --enable-spinlocks" - fi - econf ${myconf} + $(use_enable nls) } src_compile() { @@ -450,12 +440,8 @@ pkg_config() { src_test() { if use server && [[ ${UID} -ne 0 ]] ; then - # Some ICU tests fail if LC_CTYPE and LC_COLLATE aren't the same. We set - # LC_CTYPE to be equal to LC_COLLATE since LC_COLLATE is set by Portage. - local old_ctype=${LC_CTYPE} - export LC_CTYPE=${LC_COLLATE} emake check - export LC_CTYPE=${old_ctype} + einfo "If you think other tests besides the regression tests are necessary, please" einfo "submit a bug including a patch for this ebuild to enable them." else diff --git a/dev-db/postgresql/postgresql-14_beta2.ebuild b/dev-db/postgresql/postgresql-13.4.ebuild similarity index 98% copy from dev-db/postgresql/postgresql-14_beta2.ebuild copy to dev-db/postgresql/postgresql-13.4.ebuild index 7cf4067cc08..1f97899af30 100644 --- a/dev-db/postgresql/postgresql-14_beta2.ebuild +++ b/dev-db/postgresql/postgresql-13.4.ebuild @@ -7,7 +7,7 @@ PYTHON_COMPAT=( python3_{8,9,10} ) inherit flag-o-matic linux-info multilib pam prefix python-single-r1 systemd tmpfiles -KEYWORDS="" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" SLOT=$(ver_cut 1) @@ -20,7 +20,7 @@ LICENSE="POSTGRESQL GPL-2" DESCRIPTION="PostgreSQL RDBMS" HOMEPAGE="https://www.postgresql.org/" -IUSE="debug doc icu kerberos kernel_linux ldap llvm lz4 nls pam +IUSE="debug doc icu kerberos kernel_linux ldap llvm nls pam perl python +readline selinux +server systemd ssl static-libs tcl threads uuid xml zlib" @@ -39,7 +39,6 @@ llvm? ( sys-devel/llvm:= sys-devel/clang:= ) -lz4? ( app-arch/lz4 ) pam? ( sys-libs/pam ) perl? ( >=dev-lang/perl-5.8:= ) python? ( ${PYTHON_DEPS} ) @@ -150,7 +149,6 @@ src_configure() { $(use_with kerberos gssapi) \ $(use_with ldap) \ $(use_with llvm) \ - $(use_with lz4) \ $(use_with pam) \ $(use_with perl) \ $(use_with python) \ diff --git a/dev-db/postgresql/postgresql-14_beta2.ebuild b/dev-db/postgresql/postgresql-14_beta3.ebuild similarity index 100% copy from dev-db/postgresql/postgresql-14_beta2.ebuild copy to dev-db/postgresql/postgresql-14_beta3.ebuild diff --git a/dev-db/postgresql/postgresql-14_beta2.ebuild b/dev-db/postgresql/postgresql-9.6.23.ebuild similarity index 82% rename from dev-db/postgresql/postgresql-14_beta2.ebuild rename to dev-db/postgresql/postgresql-9.6.23.ebuild index 7cf4067cc08..c64d33741fa 100644 --- a/dev-db/postgresql/postgresql-14_beta2.ebuild +++ b/dev-db/postgresql/postgresql-9.6.23.ebuild @@ -3,13 +3,13 @@ EAPI=7 -PYTHON_COMPAT=( python3_{8,9,10} ) +PYTHON_COMPAT=( python3_{8,9} ) inherit flag-o-matic linux-info multilib pam prefix python-single-r1 systemd tmpfiles -KEYWORDS="" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" -SLOT=$(ver_cut 1) +SLOT=$(ver_cut 1-2) MY_PV=${PV/_/} S="${WORKDIR}/${PN}-${MY_PV}" @@ -20,9 +20,9 @@ LICENSE="POSTGRESQL GPL-2" DESCRIPTION="PostgreSQL RDBMS" HOMEPAGE="https://www.postgresql.org/" -IUSE="debug doc icu kerberos kernel_linux ldap llvm lz4 nls pam - perl python +readline selinux +server systemd ssl static-libs tcl - threads uuid xml zlib" +IUSE="debug doc kerberos kernel_linux ldap nls pam perl + pg-legacytimestamp python +readline selinux +server systemd ssl + static-libs tcl threads uuid xml zlib" REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" @@ -31,21 +31,16 @@ CDEPEND=" acct-group/postgres acct-user/postgres sys-apps/less +virtual/libcrypt:= virtual/libintl -icu? ( dev-libs/icu:= ) kerberos? ( virtual/krb5 ) ldap? ( net-nds/openldap ) -llvm? ( - sys-devel/llvm:= - sys-devel/clang:= -) -lz4? ( app-arch/lz4 ) pam? ( sys-libs/pam ) perl? ( >=dev-lang/perl-5.8:= ) python? ( ${PYTHON_DEPS} ) readline? ( sys-libs/readline:0= ) -server? ( systemd? ( sys-apps/systemd ) ) ssl? ( >=dev-libs/openssl-0.9.6-r1:0= ) +server? ( systemd? ( sys-apps/systemd ) ) tcl? ( >=dev-lang/tcl-8:0= ) xml? ( dev-libs/libxml2 dev-libs/libxslt ) zlib? ( sys-libs/zlib ) @@ -92,7 +87,8 @@ pkg_setup() { } src_prepare() { - eapply "${FILESDIR}"/${PN}-13.3-riscv-spinlocks.patch + # Work around PPC{,64} compilation bug where bool is already defined + sed '/#ifndef __cplusplus/a #undef bool' -i src/include/c.h || die # Set proper run directory sed "s|\(PGSOCKET_DIR\s\+\)\"/tmp\"|\1\"${EPREFIX}/run/postgresql\"|" \ @@ -103,10 +99,10 @@ src_prepare() { # hardened and non-hardened environments. (Bug #528786) sed 's/@install_bin@/install -c/' -i src/Makefile.global.in || die - use server || eapply "${FILESDIR}/${PN}-13_beta1-no-server.patch" + use server || eapply "${FILESDIR}/${PN}-${SLOT}.3-no-server.patch" if use pam ; then - sed "s/\(#define PGSQL_PAM_SERVICE \"postgresql\)/\1-${SLOT}/" \ + sed -e "s/\(#define PGSQL_PAM_SERVICE \"postgresql\)/\1-${SLOT}/" \ -i src/backend/libpq/auth.c || \ die 'PGSQL_PAM_SERVICE rename failed.' fi @@ -137,20 +133,19 @@ src_configure() { [[ -z $uuid_config ]] && uuid_config="--with-uuid=ossp" fi - local myconf="\ + econf \ --prefix="${PO}/usr/$(get_libdir)/postgresql-${SLOT}" \ --datadir="${PO}/usr/share/postgresql-${SLOT}" \ --includedir="${PO}/usr/include/postgresql-${SLOT}" \ --mandir="${PO}/usr/share/postgresql-${SLOT}/man" \ --sysconfdir="${PO}/etc/postgresql-${SLOT}" \ --with-system-tzdata="${PO}/usr/share/zoneinfo" \ + $(use_enable !alpha spinlocks) \ + $(use_enable !pg-legacytimestamp integer-datetimes) \ $(use_enable debug) \ $(use_enable threads thread-safety) \ - $(use_with icu) \ $(use_with kerberos gssapi) \ $(use_with ldap) \ - $(use_with llvm) \ - $(use_with lz4) \ $(use_with pam) \ $(use_with perl) \ $(use_with python) \ @@ -162,14 +157,7 @@ src_configure() { $(use_with xml libxml) \ $(use_with xml libxslt) \ $(use_with zlib) \ - $(use_enable nls)" - if use alpha; then - myconf+=" --disable-spinlocks" - else - # Should be the default but just in case - myconf+=" --enable-spinlocks" - fi - econf ${myconf} + $(use_enable nls) } src_compile() { @@ -181,7 +169,7 @@ src_install() { emake DESTDIR="${D}" install emake DESTDIR="${D}" install -C contrib - dodoc README HISTORY + dodoc README HISTORY doc/{TODO,bug.template} # man pages are already built, but if we have the target make them, # they'll be generated from source before being installed so we @@ -191,13 +179,7 @@ src_install() { doins -r doc/src/sgml/man{1,3,7} if ! use server; then # Remove man pages for non-existent binaries - serverman=( - initdb - pg_{archivecleanup,controldata,ctl,resetwal,rewind,standby} - pg_{test_{fsync,timing},upgrade,waldump} - post{gres,master} - ) - for m in ${serverman[@]} ; do + for m in {initdb,pg_{controldata,ctl,resetxlog},post{gres,master}}; do rm "${ED}/usr/share/postgresql-${SLOT}/man/man1/${m}.1" done fi @@ -213,7 +195,7 @@ src_install() { for f in "${ED}/usr/share/postgresql-${SLOT}/man/man${mansec}"/* ; do bn=$(basename "${f}") - slotted_name=${bn%.${mansec}}${SLOT}.${mansec} + slotted_name=${bn%.${mansec}}${SLOT/.}.${mansec} case ${bn} in TABLE.7|WITH.7) echo ".so ${rel_manpath}/SELECT.7" > ${slotted_name} @@ -236,19 +218,24 @@ src_install() { find "${ED}" -name '*.a' ! -name libpgport.a ! -name libpgcommon.a \ -delete - # Make slot specific links to programs local f bn for f in $(find "${ED}/usr/$(get_libdir)/postgresql-${SLOT}/bin" \ -mindepth 1 -maxdepth 1) do bn=$(basename "${f}") + # Temporarily tack on tmp to workaround a file collision + # issue. This is only necessary for 9.7 and earlier. 10 never + # had this issue. dosym "../$(get_libdir)/postgresql-${SLOT}/bin/${bn}" \ - "/usr/bin/${bn}${SLOT/.}" + "/usr/bin/${bn}${SLOT/.}tmp" done if use doc ; then docinto html dodoc doc/src/sgml/html/* + + docinto sgml + dodoc doc/src/sgml/*.{sgml,dsl} fi if use server; then @@ -262,10 +249,11 @@ src_install() { sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \ "${FILESDIR}/${PN}.service-9.6-r1" | \ systemd_newunit - ${PN}-${SLOT}.service - newbin "${FILESDIR}"/${PN}-check-db-dir ${PN}-${SLOT}-check-db-dir newtmpfiles "${FILESDIR}"/${PN}.tmpfiles ${PN}-${SLOT}.conf fi + newbin "${FILESDIR}"/${PN}-check-db-dir ${PN}-${SLOT}-check-db-dir + use pam && pamd_mimic system-auth ${PN}-${SLOT} auth account session if use prefix ; then @@ -275,6 +263,40 @@ src_install() { fi } +pkg_preinst() { + # Find all of the slot-specific symlinks, if any, in /usr/bin (e.g., + # /usr/bin/psql96). They may have been created by the + # postgresql.eselect module, but they're handled within this ebuild + # now. It's alright if we momentarily delete /usr/bin/psql as it + # will be recreated by the eselect module in pkg_ppostinst(). This + # is only necessary for 9.7 and earlier. 10 and later were never + # handled in this manner. + local canonicalise + if type -p realpath > /dev/null; then + canonicalise=realpath + elif type -p readlink > /dev/null; then + canonicalise='readlink -f' + else + # can't die, subshell + die "No readlink nor realpath found, cannot canonicalise" + fi + + local l + # First remove any symlinks in /usr/bin that may have been created + # by the old eselect + for l in $(find "${ROOT}/usr/bin" -mindepth 1 -maxdepth 1 -type l) ; do + if [[ $(${canonicalise} "${l}") == *postgresql-${SLOT}* ]] ; then + rm "${l}" || ewarn "Couldn't remove ${l}" + fi + done + + # Then move the symlinks created by the ebuild to their proper place. + for l in "${ED}"/usr/bin/*tmp ; do + mv "${l}" "${l%tmp}" \ + || ewarn "Couldn't rename $(basename ${l}) to $(basename ${l%tmp})" + done +} + pkg_postinst() { use server && use systemd && tmpfiles_process ${PN}-${SLOT}.conf postgresql-config update @@ -300,14 +322,6 @@ pkg_postinst() { elog "Then, execute the following command to setup the initial database" elog "environment:" elog " emerge --config =${CATEGORY}/${PF}" - - if [[ -n ${REPLACING_VERSIONS} ]] ; then - ewarn "If your system is using 'pg_stat_statements' and you are running a" - ewarn "version of PostgreSQL ${SLOT}, we advise that you execute" - ewarn "the following command after upgrading:" - ewarn - ewarn "ALTER EXTENSION pg_stat_statements UPDATE;" - fi fi } @@ -390,9 +404,9 @@ pkg_config() { einfo "Creating the data directory ..." if [[ ${EUID} == 0 ]] ; then - mkdir -p "$(dirname ${DATA_DIR%/})" || die "Couldn't parent dirs" - mkdir -m 0700 "${DATA_DIR%/}" || die "Couldn't make DATA_DIR" - chown -h postgres:postgres "${DATA_DIR%/}" || die "Couldn't chown" + mkdir -p "${DATA_DIR}" + chown -Rf postgres:postgres "${DATA_DIR}" + chmod 0700 "${DATA_DIR}" fi einfo "Initializing the database ..." @@ -450,12 +464,8 @@ pkg_config() { src_test() { if use server && [[ ${UID} -ne 0 ]] ; then - # Some ICU tests fail if LC_CTYPE and LC_COLLATE aren't the same. We set - # LC_CTYPE to be equal to LC_COLLATE since LC_COLLATE is set by Portage. - local old_ctype=${LC_CTYPE} - export LC_CTYPE=${LC_COLLATE} emake check - export LC_CTYPE=${old_ctype} + einfo "If you think other tests besides the regression tests are necessary, please" einfo "submit a bug including a patch for this ebuild to enable them." else