From ebc282ef4dfa408accac685565b8ee5f6faec119 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Sun, 12 Feb 2023 09:56:54 +0000 Subject: gentoo auto-resync : 12:02:2023 - 09:56:54 --- dev-db/Manifest.gz | Bin 15236 -> 15237 bytes dev-db/lmdb/Manifest | 2 + dev-db/lmdb/lmdb-0.9.30.ebuild | 75 ++++ dev-db/mariadb/Manifest | 18 +- dev-db/mariadb/mariadb-10.3.36.ebuild | 7 +- dev-db/mariadb/mariadb-10.3.37.ebuild | 7 +- dev-db/mariadb/mariadb-10.4.26.ebuild | 7 +- dev-db/mariadb/mariadb-10.4.27.ebuild | 7 +- dev-db/mariadb/mariadb-10.5.17.ebuild | 7 +- dev-db/mariadb/mariadb-10.5.18.ebuild | 7 +- dev-db/mariadb/mariadb-10.6.10.ebuild | 7 +- dev-db/mariadb/mariadb-10.6.11-r1.ebuild | 7 +- dev-db/mariadb/mariadb-10.6.11.ebuild | 7 +- dev-db/mysql-connector-c++/Manifest | 6 +- .../mysql-connector-c++-1.1.11-fix-mariadb.patch | 43 -- .../mysql-connector-c++-1.1.6-fix-cmake.patch | 23 - dev-db/mysql-connector-c++/metadata.xml | 1 - .../mysql-connector-c++-1.1.12-r2.ebuild | 54 --- dev-db/mysql-workbench/Manifest | 2 +- .../mysql-workbench-8.0.31-r1.ebuild | 2 +- dev-db/postgresql/Manifest | 10 + dev-db/postgresql/postgresql-11.19.ebuild | 453 ++++++++++++++++++++ dev-db/postgresql/postgresql-12.14.ebuild | 453 ++++++++++++++++++++ dev-db/postgresql/postgresql-13.10.ebuild | 465 ++++++++++++++++++++ dev-db/postgresql/postgresql-14.7.ebuild | 465 ++++++++++++++++++++ dev-db/postgresql/postgresql-15.2.ebuild | 467 +++++++++++++++++++++ dev-db/sqlmap/Manifest | 2 + dev-db/sqlmap/sqlmap-1.7.2.ebuild | 60 +++ 28 files changed, 2509 insertions(+), 155 deletions(-) create mode 100644 dev-db/lmdb/lmdb-0.9.30.ebuild delete mode 100644 dev-db/mysql-connector-c++/files/mysql-connector-c++-1.1.11-fix-mariadb.patch delete mode 100644 dev-db/mysql-connector-c++/files/mysql-connector-c++-1.1.6-fix-cmake.patch delete mode 100644 dev-db/mysql-connector-c++/mysql-connector-c++-1.1.12-r2.ebuild create mode 100644 dev-db/postgresql/postgresql-11.19.ebuild create mode 100644 dev-db/postgresql/postgresql-12.14.ebuild create mode 100644 dev-db/postgresql/postgresql-13.10.ebuild create mode 100644 dev-db/postgresql/postgresql-14.7.ebuild create mode 100644 dev-db/postgresql/postgresql-15.2.ebuild create mode 100644 dev-db/sqlmap/sqlmap-1.7.2.ebuild (limited to 'dev-db') diff --git a/dev-db/Manifest.gz b/dev-db/Manifest.gz index ac6158933ac3..e27e93639ffe 100644 Binary files a/dev-db/Manifest.gz and b/dev-db/Manifest.gz differ diff --git a/dev-db/lmdb/Manifest b/dev-db/lmdb/Manifest index 1d1bbce5ea7a..4acf3dab7107 100644 --- a/dev-db/lmdb/Manifest +++ b/dev-db/lmdb/Manifest @@ -1,4 +1,6 @@ AUX lmdb.pc 295 BLAKE2B 29c1cc5a70eb3d7f5c9dc4b1646644045514929428f164894ece93a4fabf33ca464e1f116c8a803b499aabf28b6dec372b50c46a2fa4fc1eb65105208759f4ba SHA512 d0749849a0ca0593fbff0b4f8db7143177c588e342978bdb8331238761379f5d5bf686190e39506ff6b0abf6f9d668c96480da685c56d7ed44e7756f92f4e057 DIST openldap-LMDB_0.9.29.tar.gz 144545 BLAKE2B b7e55e4fa03e878a95b8f7c583684727a81d51a3acf2ec064d8fe26475bf9ffe4dddf16c2bccbda901b94b7c8d57f41fa63f7c09bcab46401bd000958a5b87b3 SHA512 b41ba5b139375d23617a79f4d322399df55745c5a4a63159ddbe0f1ded4707f0eb7f71acf3d1a4928f8fcab30a7b5db17e3e165441a61ec1dbd29f8d9efa65d1 +DIST openldap-LMDB_0.9.30.tar.gz 145023 BLAKE2B bf93d23a3d2a2a4fe1e82e310125187e52f22cfcf7809f729edc6085521d2f66c07c042c552b745d8241d515d58c4c8da9921d503cfcca25ecacd1d06a662ad4 SHA512 4d531f1e2bb01566ad60970201cf10418a894d64167dd2e01503ab7b42c148c6ced8e857ae7f5d09e46feaa709b88f7006e5cb702b69ddaa343f005d0fef16ed EBUILD lmdb-0.9.29.ebuild 2378 BLAKE2B 5f7d0adc974b6c4569312698604cddc62151716db262754c69c5ec463008dc8676bf59c8b9920495aebf11de77c308cf0c56b819a63908c05d567124d9d79db5 SHA512 f97c769f8c00a595b306c5e65080d423fa2a3fba9b1e61047dadfb05e2887b6cb33b0e86c8d74714987634123879c14cb1684d42141ae920b0ab36aeb32d138a +EBUILD lmdb-0.9.30.ebuild 2395 BLAKE2B f496f07d2fdcc3cf941ea6624b9823aa1d12c2bc7e7e4cc6fd0984a0f1cfcc6aa8b93f3bbde8933f3f70071fd487490f0ac1b67410e20bc8030ecfaee76c930d SHA512 300f6df6531acb123b5170518959ca0e7a095fe6aa192923f281ce0586d21619b05987de9470b7ac8f3c3e62627982b1d43559a008d4c3ddfeda203df056de9a MISC metadata.xml 433 BLAKE2B cf3186fe7876aa15283c1d2154469b7f8451e99b3a36637e67820703a576fa1297ac7804ef7df660aaa63a44b1c18a3d2298dac12159a3b3268526e10d7bdaf9 SHA512 f526eb14df23a1b9e92bec0b643e8dc993ad489e8776641aa330d1db878dcf4fb1b7dbb8b62e0c88a4ea484a393e5b396902abb2d035b8a311555e1e69fe387a diff --git a/dev-db/lmdb/lmdb-0.9.30.ebuild b/dev-db/lmdb/lmdb-0.9.30.ebuild new file mode 100644 index 000000000000..aca049fcc8b2 --- /dev/null +++ b/dev-db/lmdb/lmdb-0.9.30.ebuild @@ -0,0 +1,75 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 +inherit flag-o-matic multilib multilib-minimal toolchain-funcs + +MY_P="${PN^^}_${PV}" + +DESCRIPTION="An ultra-fast, ultra-compact key-value embedded data store" +HOMEPAGE="https://symas.com/lmdb/technical/" +SRC_URI="https://git.openldap.org/openldap/openldap/-/archive/${MY_P}/openldap-${MY_P}.tar.gz" + +LICENSE="OPENLDAP" +SLOT="0/${PV}" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" +IUSE="static-libs" + +DEPEND="" +RDEPEND="" + +S="${WORKDIR}/openldap-${MY_P}/libraries/liblmdb" + +src_prepare() { + default + if [[ ${CHOST} == *-darwin* && ${CHOST#*-darwin} -lt 10 ]] ; then + # posix_memalign isn't available before 10.6, but on OSX + # malloc is always aligned for any addressable type + sed -i -e '/(__APPLE__)/a#define HAVE_MEMALIGN 1\n#define memalign(X,Y) malloc(X)' mdb.c || die + fi + multilib_copy_sources +} + +multilib_src_configure() { + local soname="-Wl,-soname,liblmdb$(get_libname 0)" + if [[ ${CHOST} == *-darwin* ]] ; then + soname="-dynamiclib -install_name ${EPREFIX}/usr/$(get_libdir)/liblmdb$(get_libname 0)" + replace-flags -O[123456789] -O1 + fi + sed -i -e "s!^CC.*!CC = $(tc-getCC)!" \ + -e "s!^CFLAGS.*!CFLAGS = ${CFLAGS}!" \ + -e "s!^AR.*!AR = $(tc-getAR)!" \ + -e "s!^SOEXT.*!SOEXT = $(get_libname)!" \ + -e "/^prefix/s!/usr/local!${EPREFIX}/usr!" \ + -e "/^libdir/s!lib\$!$(get_libdir)!" \ + -e "s!shared!shared ${soname}!" \ + "Makefile" || die + + if [[ ${CHOST} == *-solaris* ]] ; then + # fdatasync lives in -lrt on Solaris 10 + [[ ${CHOST#*-solaris2.} -le 10 ]] && append-ldflags -lrt + fi +} + +multilib_src_compile() { + emake LDLIBS+=" -pthread" +} + +multilib_src_install() { + emake DESTDIR="${D}" install + + mv "${ED}"/usr/$(get_libdir)/liblmdb$(get_libname) \ + "${ED}"/usr/$(get_libdir)/liblmdb$(get_libname 0) || die + dosym liblmdb$(get_libname 0) /usr/$(get_libdir)/liblmdb$(get_libname) + + insinto /usr/$(get_libdir)/pkgconfig + doins "${FILESDIR}/lmdb.pc" + sed -i -e "s!@PACKAGE_VERSION@!${PV}!" \ + -e "s!@prefix@!${EPREFIX}/usr!g" \ + -e "s!@libdir@!$(get_libdir)!" \ + "${ED}"/usr/$(get_libdir)/pkgconfig/lmdb.pc || die + + if ! use static-libs; then + rm "${ED}"/usr/$(get_libdir)/liblmdb.a || die + fi +} diff --git a/dev-db/mariadb/Manifest b/dev-db/mariadb/Manifest index 9ece20e46944..e0052644fa19 100644 --- a/dev-db/mariadb/Manifest +++ b/dev-db/mariadb/Manifest @@ -16,13 +16,13 @@ DIST mariadb-10.5.18.tar.gz 111568643 BLAKE2B 39067475c00c456d0cb5e79eef063665db DIST mariadb-10.6.10-patches-01.tar.xz 5240 BLAKE2B 4c41bbb5a81ecca3e9ccbdfb0861189575e5b3edfb1019465c8dbceee641a8bbeb3e54f061ff3ec44fb5ff3bca960419893429897db4a919177c390b44ef7e49 SHA512 aee039f5e771c840e2a5bb6f6f5fcbec06c0bbd7fd5ce155f0e6f3694595d5d2a0e38f25972c328fc9f69dd68354434e40c5e9a7b2d509d7ea795e097a57864d DIST mariadb-10.6.10.tar.gz 96453293 BLAKE2B 889d141ab9e0e9a0cd3fc9b191a15192170029a5fddcff8ebfe482cc3cfdfec6307c014fe09719c7c254a3941034f53ee7ff6187f3d502e3f3edb4d586dff8f3 SHA512 912219878e2201280f5927ee8a34dafe83ac2c3ce8c6fa3d90731d10fd693c369872aff840edc8329b82c53e9908fbdb1ba731ba140e2b99048edb5eb21f22c4 DIST mariadb-10.6.11.tar.gz 94742041 BLAKE2B cb5ff7a9b44814cb56f715c92f9d136070872889c0fe2d27987f62f75b1c787ef4ece81ae8bad9a944cbb4c4416fc23587fdab366ad1181b319eb3a0bf40f91a SHA512 4b9e8e16651329f53eb19670dcc7f5dbb11ba84c28cca35bc7d216c5504b6db698ab65ce42c30a34ab967c1b14e6637c511ac4b49f2613b01f6dd615288cba98 -EBUILD mariadb-10.3.36.ebuild 41377 BLAKE2B 1df517781b60e2cd178694b9d004f89d86a8252f3629fedfb861cc39cf7c2b1abd428caed88f0359a5dd26c1844a9dae6cd3608b2015414c6399eb35e49cd0e7 SHA512 a84b27c8c7ed92cbf9ad17be650a989412605898d74f26a54886cc6cee4632f8a28048dc2375691ae61d5cd36caa9114faf290877399780401011f3272d1aad2 -EBUILD mariadb-10.3.37.ebuild 41384 BLAKE2B cc76c9dd6e387b221a70918fdce2db6729fa48cccdcdd1fe01ad31c536ec7e127d97e2aefcc687de79f07529adb71b17fa17acefcea56ea75e2ddd633caf64ba SHA512 0706e2275526805b3b810c9551f228f72912ba538ef601bf623a79e508fbf8f5cd8c44a29fd7b0ac561f7b791f901533d8e53d28c78e47e82e6f8568b27a0589 -EBUILD mariadb-10.4.26.ebuild 42080 BLAKE2B b4e259549c259d2ec4653caeefc27ed588cb778f76212e185833ea4c0557f1f0634cc460c229768d0fe071ac395a73e5aba284d37dc1e58fc7a44a042026ff32 SHA512 066a19894c828e5bb6619958eab3c985c715b84bc6d09f6ba031227b14a84fef9cabe021bc555136b15e424d5a53cb652fecc929c1e66e2bffb4920d2f1469b4 -EBUILD mariadb-10.4.27.ebuild 42079 BLAKE2B 4dd73392405ef22c0d366e3be03d5329fbeb466600b7966a2d41597c00b4d216001039cca97d721180cc05fdc71d1a378ae19b38a892d82a8b134b7acafa519f SHA512 10c75b0c000e201390f77d4e9793d8a7f8bfe8583f4a0078707f169b19829afa7404c394cf81108555b3541da3170d1105fbb9986ab45d3030ae996857aed102 -EBUILD mariadb-10.5.17.ebuild 42039 BLAKE2B 4b6a08ef9a8673356833f4d9495b07f548a9f9b6e4dfc90af5fab478ef13f91f451bb444b1a132a9d3418b20ea2149621cb24e593529864c7338f1e211fe6284 SHA512 acc33064c0ce6aba4568f79d21e0124d7fcf3eb75755697f0986925fd196a770dc79b91237eaeb051027530da250fff40760477a96f2af476e1991dcb1834e82 -EBUILD mariadb-10.5.18.ebuild 42038 BLAKE2B 00aa21e6ef21413fb9bbb22cefd4431910ecc9970867b6a931f3f357319e4fec6e20d78c527498b3194029ec6541030dfd7966f529db73e3217b4e0535e7523a SHA512 b3ef6c099808a17b568ccc9a1e9fbed357508d9c25f303271f8f049cd03c4eb098823bbb1b2504fd00ed49f69dc822254c03db3476504bfdbbc72c7515a19c4c -EBUILD mariadb-10.6.10.ebuild 42414 BLAKE2B ce19b4626b496ffb7b9390e88e653c5ec38e4e54774d6f5aa4bcd7b14da22250a7d91a84f92738e2cc283424a214862c96e3867d8b360b9e716ab78d4ebf0f0c SHA512 12a7284a5ed095c335a224acffebe5ba8f8968d6d4f5829e57582a36ecc84e28679545b740b490ff966789deb46bf1f1c43f1f241df54b2077fc30c46f72517d -EBUILD mariadb-10.6.11-r1.ebuild 42546 BLAKE2B 7c30357d30f311b1af8207d0b6fa15ee5e4a947ff9396b551f83077bab70c864ab72d486cb460a52e3020a8d24a877aa479ff38d3a769d4716825de3e2ca7ae0 SHA512 4e4844cd8f86dadcbf72673ebd64e189c1a4fd8225ea3737c732c23231242bc4bcc873f1e72e5f6d3701f466c3f13d63a2d62043884a92c6c589cd0909924899 -EBUILD mariadb-10.6.11.ebuild 42567 BLAKE2B 51ccc2336df1a87c36132f8da66a6b7861630ba3f2f99995fcfb883ea24dbdcde48cb449c2386f3685e920d88e2355ff84db6c66fe6f961a12bf95da7ef59395 SHA512 b5e35f356dabf39b7c7571c07c329f8bf6ac2903437b0319dbdd2deb94b02045a51e22f0206c32a9d2efed6403dbcf3f408adc6acd06e35291d3e21cf16dcc17 +EBUILD mariadb-10.3.36.ebuild 41419 BLAKE2B 00a841bc6de179190f6af3123b89c3712a537ba67aee42a47a182e2b082b05cbcf7b33f9e912b85add54928494c25727c3ea84d0f9cea18ac9704e8438b38dc0 SHA512 5bd208084ce7c822c3d8d1b273fae6091b9c85c15489749330b5a482718c6e0b0de42d7fb5c32a4ef06b9c2f113e51d483d3618436108f27f1af0561fb3592b3 +EBUILD mariadb-10.3.37.ebuild 41426 BLAKE2B b58b1162bb9f5dde79884ba90702008b0cf82367a1c20bf1424ec95f31661eaac7d268103b50f85fb17faa96170fc65f9e220cfc3a9c41ff70ae6a4d48af5842 SHA512 a755b3fea4ae45cd1c09f59ce9406e9b8e337adc7e0273873b6f1dffa524284358239d5fa7f24e12634cda69d16fe3a88154041795e67fc13db974e4e7610468 +EBUILD mariadb-10.4.26.ebuild 42122 BLAKE2B 046fb8f4bbfb13965ddd0afc1cfd1cba2428097cdab29a55177535a868c0706a54194aa63ce5ab43d506056b1986e1cca08b70a8c5ff00e0075f652017187c0c SHA512 d1aefeea448aa1d74bd97470ef3ad6e3d350e133cd4f174416968bd3d7893d25b46ebfdd5c1bfd54e26a4472c44bccc000d831ed265877626baa444bff242373 +EBUILD mariadb-10.4.27.ebuild 42121 BLAKE2B 332f5d61f789e607c0bc450a458bdbf13d0b5279e4e95d8f728bcbc4fb2e23a4110c42e51d176890986c6b932a49b8c2dac139bc9d505f998cc49139a6a73794 SHA512 a82b294eccc8272ae0d370af0245238c15e162660827aa03f22a2d26e7c84ba42c3e23e5bb58adbcc92e5bcfcd70034e82b377b4db8592e974ec2167101b86b1 +EBUILD mariadb-10.5.17.ebuild 42081 BLAKE2B 78a2d0e5d55394399a2cb0ecb7b28b96536be282b02e2c57b7f0bda52a7c44478df2f8acd65f269601c2034b34967f2309608ad0bd396aed6557daffd5f35621 SHA512 be00feae76cca07d7c91b9ac66b7d29ef0fbe8d4fc88d2d03be2c6f584ae18be8825b89f55d99e1d573d49e60b77c3e1557aa4745f0ed3df7fde37a82eb7b014 +EBUILD mariadb-10.5.18.ebuild 42080 BLAKE2B 5252ab1695c80057ec24db41f895791b11c55732c883998e3d358fffcd40e67786062dea8912c914b59ab73309f560639a37f989aa8c90ef9d23fe30f22e1a5f SHA512 bc3430bb2cf0b67e098079ff3ac1454de26dfe8265c1fc1f76044bf826baa8f3e374b02ec80a0fd89cb92cf9d75bc67dadd4014f9517675db99870d4c42531f0 +EBUILD mariadb-10.6.10.ebuild 42456 BLAKE2B 6fd2ff41d538b30d3ad992bb6f5c3b2779f682b4cb9e705af23cf3a2b0b415f12efb442b6df261340ac7a039d9cfd14a5a33ef5b34dae658e76016c92b83ab59 SHA512 907c6d104a68980120ca44d7720404cbc05c8694e21219d035597207ab12c0479cebf9d94ad076f4839ab2f639bba9b4a1984547d5aab8d7eb037b48dd39962d +EBUILD mariadb-10.6.11-r1.ebuild 42588 BLAKE2B fd14c0c3c3fe8ee227422ef8671e5d2d0d9f23b07fba63f851602e170589972dd96083362f606972ad05bb20f98a491169e2340047c452972a898239cf0c20cc SHA512 116c63f89a51517d45f4cbaccb7b1af0f07ce83d7812d42fb7aae9df92a66d727b62d410fa61e0f279ecc9615da2ec829bed8ecca7f74687732549347d8bf0a7 +EBUILD mariadb-10.6.11.ebuild 42609 BLAKE2B 2de2fdba1eb102f6d547a7c9a7c69a479977e80e5a95a4532af1698a7d4479c818d042f472fcc0ebf2b011c479b5c3b49b36720c3c0833f1b3430239de62b4b8 SHA512 ef7a52a60548a9a91eadef928aeaaad5e103da4b97cbd12c64868d490dc02f6c28851cfd4787334e1d87ecc2b026eae5cef00759df4f182edb3bd249738bf460 MISC metadata.xml 2602 BLAKE2B 7d388158062c76f40bca2feba53f292bbdab51cf0c3dba59ce2b74c3dedcb07cd7d4f1b5b52f7bf42c814dfc817a0670fcd8e39dccb2395337b46be98deda258 SHA512 a53f2612f8aea11cf7037847dc6f8b2acc87f710778b1bc18d7e1821c95061c1b08deefd3019789810eea2e5445b50c604b8686f3d491397793be3cbf86a35be diff --git a/dev-db/mariadb/mariadb-10.3.36.ebuild b/dev-db/mariadb/mariadb-10.3.36.ebuild index a4cfcfe57f25..f939b7ec970d 100644 --- a/dev-db/mariadb/mariadb-10.3.36.ebuild +++ b/dev-db/mariadb/mariadb-10.3.36.ebuild @@ -27,10 +27,13 @@ IUSE="+backup bindist client-libs cracklib debug extraengine galera innodb-lz4 RESTRICT="!bindist? ( bindist ) !test? ( test )" -REQUIRED_USE="jdbc? ( extraengine server !static ) +REQUIRED_USE=" + jdbc? ( extraengine server !static ) server? ( tokudb? ( jemalloc !tcmalloc ) ) ?? ( tcmalloc jemalloc ) - static? ( yassl !extraengine !pam )" + static? ( yassl !extraengine !pam ) + test? ( extraengine perl server xml ) +" KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~mips ppc ppc64 ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x64-solaris ~x86-solaris" diff --git a/dev-db/mariadb/mariadb-10.3.37.ebuild b/dev-db/mariadb/mariadb-10.3.37.ebuild index ec4245a011ba..517f12786a11 100644 --- a/dev-db/mariadb/mariadb-10.3.37.ebuild +++ b/dev-db/mariadb/mariadb-10.3.37.ebuild @@ -27,10 +27,13 @@ IUSE="+backup bindist client-libs cracklib debug extraengine galera innodb-lz4 RESTRICT="!bindist? ( bindist ) !test? ( test )" -REQUIRED_USE="jdbc? ( extraengine server !static ) +REQUIRED_USE=" + jdbc? ( extraengine server !static ) server? ( tokudb? ( jemalloc !tcmalloc ) ) ?? ( tcmalloc jemalloc ) - static? ( yassl !extraengine !pam )" + static? ( yassl !extraengine !pam ) + test? ( extraengine perl server xml ) +" KEYWORDS="~alpha amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x64-solaris ~x86-solaris" diff --git a/dev-db/mariadb/mariadb-10.4.26.ebuild b/dev-db/mariadb/mariadb-10.4.26.ebuild index 26f337d76e62..958912f828a0 100644 --- a/dev-db/mariadb/mariadb-10.4.26.ebuild +++ b/dev-db/mariadb/mariadb-10.4.26.ebuild @@ -27,10 +27,13 @@ IUSE="+backup bindist cracklib debug extraengine galera innodb-lz4 RESTRICT="!bindist? ( bindist ) !test? ( test )" -REQUIRED_USE="jdbc? ( extraengine server !static ) +REQUIRED_USE=" + jdbc? ( extraengine server !static ) server? ( tokudb? ( jemalloc !tcmalloc ) ) ?? ( tcmalloc jemalloc ) - static? ( yassl !pam )" + static? ( yassl !pam ) + test? ( extraengine perl server xml ) +" KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~mips ppc ppc64 ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x64-solaris ~x86-solaris" diff --git a/dev-db/mariadb/mariadb-10.4.27.ebuild b/dev-db/mariadb/mariadb-10.4.27.ebuild index f03d9d91b921..c162f08df0cc 100644 --- a/dev-db/mariadb/mariadb-10.4.27.ebuild +++ b/dev-db/mariadb/mariadb-10.4.27.ebuild @@ -27,10 +27,13 @@ IUSE="+backup bindist cracklib debug extraengine galera innodb-lz4 RESTRICT="!bindist? ( bindist ) !test? ( test )" -REQUIRED_USE="jdbc? ( extraengine server !static ) +REQUIRED_USE=" + jdbc? ( extraengine server !static ) server? ( tokudb? ( jemalloc !tcmalloc ) ) ?? ( tcmalloc jemalloc ) - static? ( yassl !pam )" + static? ( yassl !pam ) + test? ( extraengine perl server xml ) +" KEYWORDS="~alpha amd64 ~arm arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x64-solaris ~x86-solaris" diff --git a/dev-db/mariadb/mariadb-10.5.17.ebuild b/dev-db/mariadb/mariadb-10.5.17.ebuild index 384feb3be774..46cdd74fcf86 100644 --- a/dev-db/mariadb/mariadb-10.5.17.ebuild +++ b/dev-db/mariadb/mariadb-10.5.17.ebuild @@ -27,9 +27,12 @@ IUSE="+backup bindist columnstore cracklib debug extraengine galera innodb-lz4 RESTRICT="!bindist? ( bindist ) !test? ( test )" -REQUIRED_USE="jdbc? ( extraengine server !static ) +REQUIRED_USE=" + jdbc? ( extraengine server !static ) ?? ( tcmalloc jemalloc ) - static? ( yassl !pam )" + static? ( yassl !pam ) + test? ( extraengine perl server xml ) +" KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x64-solaris ~x86-solaris" diff --git a/dev-db/mariadb/mariadb-10.5.18.ebuild b/dev-db/mariadb/mariadb-10.5.18.ebuild index 2b131d7c2a1d..138ad05991b8 100644 --- a/dev-db/mariadb/mariadb-10.5.18.ebuild +++ b/dev-db/mariadb/mariadb-10.5.18.ebuild @@ -27,9 +27,12 @@ IUSE="+backup bindist columnstore cracklib debug extraengine galera innodb-lz4 RESTRICT="!bindist? ( bindist ) !test? ( test )" -REQUIRED_USE="jdbc? ( extraengine server !static ) +REQUIRED_USE=" + jdbc? ( extraengine server !static ) ?? ( tcmalloc jemalloc ) - static? ( yassl !pam )" + static? ( yassl !pam ) + test? ( extraengine perl server xml ) +" KEYWORDS="~alpha amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x64-solaris ~x86-solaris" diff --git a/dev-db/mariadb/mariadb-10.6.10.ebuild b/dev-db/mariadb/mariadb-10.6.10.ebuild index a67cb52a4a5e..2eb20a78c614 100644 --- a/dev-db/mariadb/mariadb-10.6.10.ebuild +++ b/dev-db/mariadb/mariadb-10.6.10.ebuild @@ -27,9 +27,12 @@ IUSE="+backup bindist columnstore cracklib debug extraengine galera innodb-lz4 RESTRICT="!bindist? ( bindist ) !test? ( test )" -REQUIRED_USE="jdbc? ( extraengine server !static ) +REQUIRED_USE=" + jdbc? ( extraengine server !static ) ?? ( tcmalloc jemalloc ) - static? ( yassl !pam )" + static? ( yassl !pam ) + test? ( extraengine perl server xml ) +" KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~loong ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x64-solaris ~x86-solaris" diff --git a/dev-db/mariadb/mariadb-10.6.11-r1.ebuild b/dev-db/mariadb/mariadb-10.6.11-r1.ebuild index 18c894925298..48ec56b4ccc2 100644 --- a/dev-db/mariadb/mariadb-10.6.11-r1.ebuild +++ b/dev-db/mariadb/mariadb-10.6.11-r1.ebuild @@ -24,9 +24,12 @@ IUSE="+backup bindist columnstore cracklib debug extraengine galera innodb-lz4 RESTRICT="!bindist? ( bindist ) !test? ( test )" -REQUIRED_USE="jdbc? ( extraengine server !static ) +REQUIRED_USE=" + jdbc? ( extraengine server !static ) ?? ( tcmalloc jemalloc ) - static? ( yassl !pam )" + static? ( yassl !pam ) + test? ( extraengine perl server xml ) +" KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x64-solaris ~x86-solaris" diff --git a/dev-db/mariadb/mariadb-10.6.11.ebuild b/dev-db/mariadb/mariadb-10.6.11.ebuild index 930b7e0df6ee..61fe37166184 100644 --- a/dev-db/mariadb/mariadb-10.6.11.ebuild +++ b/dev-db/mariadb/mariadb-10.6.11.ebuild @@ -27,9 +27,12 @@ IUSE="+backup bindist columnstore cracklib debug extraengine galera innodb-lz4 RESTRICT="!bindist? ( bindist ) !test? ( test )" -REQUIRED_USE="jdbc? ( extraengine server !static ) +REQUIRED_USE=" + jdbc? ( extraengine server !static ) ?? ( tcmalloc jemalloc ) - static? ( yassl !pam )" + static? ( yassl !pam ) + test? ( extraengine perl server xml ) +" KEYWORDS="~alpha amd64 arm ~arm64 ~hppa ~ia64 ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x64-solaris ~x86-solaris" diff --git a/dev-db/mysql-connector-c++/Manifest b/dev-db/mysql-connector-c++/Manifest index 179eabb9c062..23daa395b80a 100644 --- a/dev-db/mysql-connector-c++/Manifest +++ b/dev-db/mysql-connector-c++/Manifest @@ -1,14 +1,10 @@ -AUX mysql-connector-c++-1.1.11-fix-mariadb.patch 1939 BLAKE2B 4ca552777bfcb8671e5dc0213c411f9e1e8fbcbeb0f9f3369572c82ba03304a9df2ab98725b1fb3a365a63e4c8ed9d3d86332c54ffcb14210469b3d6078d89da SHA512 3d02972b57a0c2a544edef9ec5050c82f9214a7013e941cdc13a8f0742b7608812f33bc0c84367e70ea556562efb653297730ce5fc8d928458c5af1d71f3f60a -AUX mysql-connector-c++-1.1.6-fix-cmake.patch 762 BLAKE2B 4cecebd2cb075c6e1af7ab74a84132f41beeeb202d4d286038b05cbbb202cef709e7114563bdbee12aab4e6a738a9e23bbb9455fc1ce0f906d952af4e0042f05 SHA512 c4c89b398aa88a9e7b4ed4cf42b055b79670dc70685775afd1ef2d683e5b3754575c831a6083ef0d097431e796513597e1daf7737e3ade710abad917f63ed32f AUX mysql-connector-c++-8.0.27-fix-build.patch 3170 BLAKE2B acadbb354505f4b40e3121134c93cabd6e13dfbbc5268ea5aadcfdd01a96fad3d682a1b2d77b0a63eeea31c7737f852d624f2505100e52016b6f98c5b2feca01 SHA512 413ca9ed5965eb9805639a8ba252d60486eb7aa038db7d2b993457e940ed61f3073d8008ee53b0e84798e9c059f84bb2c2de272412a1a256c1e6b81e43b75535 AUX mysql-connector-c++-8.0.27-mysqlclient_r.patch 1070 BLAKE2B 339951ae0df13467247168052a9928d2d0f72dca1c97f6d78eb604372e45ed1a14564a05f1bdd54e5848d669520ac43a2129b3c337c776a71a6670da09c74d04 SHA512 c141b81fc755ef4b586debe473b9bd0f903d4575314327a319ad584263a09281290bc5c95b683c11932fded730ca3962b8450be8a916db3c86391ad3edb52305 -DIST mysql-connector-c++-1.1.12.tar.gz 518615 BLAKE2B 386a4753ca3f03999a49a89507da1b1172b3db89797c38403fee4eea86e7108a5e4f91f24a17de86d585c2a3d9e5742a117fa84d9b14aad649f938a597f3dae9 SHA512 d7e132dbc2efda4a77f8ae00c24006a1ade1d0a50f22d89ece453505e6d206427ee7988df29c0d6ef8b396ad6b8d326b6d263a1d4fa08ef5db0966fb4f1479f4 DIST mysql-connector-c++-8.0.27-src.tar.gz 4004836 BLAKE2B e581c679d8d9a31d2570b9cf1968b4e793cfccbd4cafdc5a9c9d17a465c16faa1492b2da7bdc1679d97474c27b6353274a390668f77d3cb47f72598eb3a967fa SHA512 3da7109efd2d1af813931b923218de9a85afe20d23e2654eecfa5524431f5b11ebdb8421b14563300b66ab61714e284cc15407a3b28a87922c9a8c79b2804bf3 DIST mysql-connector-c++-8.0.31-src.tar.gz 4201904 BLAKE2B 48385db732572ccf2ba91edca0fbdecf94b3ac5ca6c095e1e2e525e5f9b17749b9cb1ed9732253f9239296d364a69a91d56f60958eb4cf399f16db38f6bd76a8 SHA512 a088936e207926031b6bafe45925bf0c9d2acede9477b605adb09dc875c87965e58e3ecd0332168021122c9def831f0dfdb837ad2c4ea2f140b07b43c9f8bb3c DIST mysql-connector-c++-8.0.32-src.tar.gz 4202413 BLAKE2B fe15be7b6ec0c4699ded6e392f3f2e1c12fa9fe033172f6219916fb6ce4ae78d3e8cc882eaf66da606dc1445a59a5cf573f92ee6f1d18178d6c11762dcffb0c0 SHA512 cdfddaf84efe0d49d07c5ef07b5c50bde2f64cbf58d48016573a20ca372b0ba5dab640305d16d8b34032a63f2ceb2954eac108f838fb2f3849a7f3838329df48 -EBUILD mysql-connector-c++-1.1.12-r2.ebuild 1305 BLAKE2B 62cf36d8a5c5fe823ddfa7897cacef3d082d8a247ffaa8292f7599d0637bdad37e751fba3018b27746f6ce9077906507e947aefed932a89eacefaa3a0e76ecc5 SHA512 c4f7defd6e3fbcb891bd9e4a8529d081b05376329ef8556d206bc33c13f4d718be35d93158900d86c116cde96027c14500d36e92ba3714e7cccc469591281940 EBUILD mysql-connector-c++-8.0.27-r1.ebuild 1025 BLAKE2B 1de09343d48984a042bd9f141e72fd568603022b2d221d9d737720f4e4e002a488ae104cc92fc1a667dce0772ed38822a40557e56900085e1ec3696601c2550a SHA512 570c4deb40fe652f328c0f33f8fb34f80ca000f1a6988e1092aafc27bad15a05a86632608bc4b65b2b808f86d2a84e9bbd938073714639ce78b3457f570ec00d EBUILD mysql-connector-c++-8.0.27.ebuild 973 BLAKE2B 956082e0b535dd644bbf81dd2392785f7bc53c07bfc2e4c4136b0adb249b3d199a151a8a40551379e039d6d2b18e2b1fe3dcef9c594f03677dcee3abdebfc560 SHA512 07d72d46a68a61368bd923fb2ac1664e3660af9bd7f049f00a36f78775cccdc123ea28b52a5ccee2389b65fbfb28b1af130555671819eadbac5c006e4ccbe693 EBUILD mysql-connector-c++-8.0.31.ebuild 1173 BLAKE2B 9e7856cb6f77cccc978102f60188a6aae259ffa54246f26450c7d0fd8ebd09684a1fadaa696a5b68ce58da5513c0d3105cf47e7af6c288e6ae486eb07ae5fbdd SHA512 b97247a5589466d285f6696bb6caa2126e3e1538d8d884d390d76ec40d96da945ef388f3136e8e7ce5e8feeb6a0a7d20604d9dfbd7f9837c44a54b7bf7024e9a EBUILD mysql-connector-c++-8.0.32.ebuild 1186 BLAKE2B 51cf36205f0fc869d46ca52229ec97dae406987f2b6327fcd1450cf3cd46ac5228835fd2f0c182b2a2cbc5f13002554b20a5cece42ab72f4ae3a0da9b239c02a SHA512 7615b58362e982997099e6580f2325eef522d92688738aae46a6c59302be60ffa39783dacb94e57c11f3ba2c778c607a8f7b09866792eb48f180c0da7b65d28f -MISC metadata.xml 477 BLAKE2B c2f18ac95fc5dc00aa030ea5282340551481c1474a728dc94473f1e18d03475d2c014f4acb496de4cdf027ede3c0c94cec6b1d1faad0ba0f902fbf4d6fb71789 SHA512 54f2daaabb2450c2feb3004f7754df52b7eaab1bb1cdca69a8b3e2155536841420118314635de877eb532b0dabc5d6ff1c67c939265fc478d660743bc8e9bbb3 +MISC metadata.xml 427 BLAKE2B 6467a6f2f5b106904e37a7d305ef49d6d43a07ac94f958e4f02406ea6d118feb7ba6cb6a036226e419b5ee732500e9cfda2d332a41f8d3635eadd3d3f826c868 SHA512 dfc7271b8c49ad4bd9672c098c9ef29144488f2dd92caec9ab54d0f01a849b4507662c2d5788da102e373da31d8b33b55697ad9b22dfd64e1d9dfdc082e576a0 diff --git a/dev-db/mysql-connector-c++/files/mysql-connector-c++-1.1.11-fix-mariadb.patch b/dev-db/mysql-connector-c++/files/mysql-connector-c++-1.1.11-fix-mariadb.patch deleted file mode 100644 index 2868a3c024af..000000000000 --- a/dev-db/mysql-connector-c++/files/mysql-connector-c++-1.1.11-fix-mariadb.patch +++ /dev/null @@ -1,43 +0,0 @@ ---- a/driver/mysql_connection.cpp -+++ b/driver/mysql_connection.cpp -@@ -1067,6 +1067,7 @@ MySQL_Connection::getClientOption(const sql::SQLString & optionName, void * opti - proxy->get_character_set_info(&cs); - *(static_cast(optionValue)) = cs.mbmaxlen; - /* mysql_get_option() was added in mysql 5.7.3 version */ -+#if !defined( MARIADB_BASE_VERSION ) && !defined ( MARIADB_VERSION_ID ) - } else if ( proxy->get_server_version() >= 50703 ) { - try { - if (GET_CONN_OPTION(optionName, optionValue, intOptions)) { -@@ -1080,6 +1081,7 @@ MySQL_Connection::getClientOption(const sql::SQLString & optionName, void * opti - CPP_ERR_FMT("Unsupported option : %d:(%s) %s", proxy->errNo(), proxy->sqlstate().c_str(), proxy->error().c_str()); - throw e; - } -+#endif - } - } - /* }}} */ -@@ -1097,11 +1099,13 @@ MySQL_Connection::getClientOption(const sql::SQLString & optionName) - MY_CHARSET_INFO cs; - proxy->get_character_set_info(&cs); - return cs.dir ? sql::SQLString(cs.dir) : ""; -+#if !defined( MARIADB_BASE_VERSION ) && !defined ( MARIADB_VERSION_ID ) - } else if ( proxy->get_server_version() >= 50703 ) { - const char* optionValue= NULL; - if (GET_CONN_OPTION(optionName, &optionValue, stringOptions)) { - return optionValue ? sql::SQLString(optionValue) : ""; - } -+#endif - } - return ""; - } ---- a/driver/nativeapi/libmysql_static_proxy.cpp -+++ b/driver/nativeapi/libmysql_static_proxy.cpp -@@ -325,7 +325,7 @@ LibmysqlStaticProxy::options(MYSQL * mysql, enum mysql_option option, const void - int - LibmysqlStaticProxy::get_option(MYSQL * mysql, enum mysql_option option, const void *arg) - { --#if MYSQL_VERSION_ID >= 50703 -+#if MYSQL_VERSION_ID >= 50703 && !defined( MARIADB_BASE_VERSION ) && !defined ( MARIADB_VERSION_ID ) - if (::mysql_get_option(mysql, option, arg)) { - throw sql::InvalidArgumentException("Unsupported option provided to mysql_get_option()"); - } else { diff --git a/dev-db/mysql-connector-c++/files/mysql-connector-c++-1.1.6-fix-cmake.patch b/dev-db/mysql-connector-c++/files/mysql-connector-c++-1.1.6-fix-cmake.patch deleted file mode 100644 index 18d4e9a80410..000000000000 --- a/dev-db/mysql-connector-c++/files/mysql-connector-c++-1.1.6-fix-cmake.patch +++ /dev/null @@ -1,23 +0,0 @@ -diff -aurN a/CMakeLists.txt b/CMakeLists.txt ---- a/CMakeLists.txt 2015-06-04 08:58:30.000000000 -0400 -+++ b/CMakeLists.txt 2015-07-21 10:41:59.081091000 -0400 -@@ -300,7 +300,7 @@ - SET(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_INSTALL_DIRECTORY}") - ENDIF(WIN32) - --SET(DOC_DESTINATION ".") -+SET(DOC_DESTINATION ${INSTALL_DOCS}) - IF(RPM_LAYOUT) - SET(DOC_DESTINATION "share/doc/${CPACK_PACKAGE_NAME}-${MYSQLCPPCONN_VERSION}") - ENDIF() -@@ -373,10 +373,6 @@ - ADD_SUBDIRECTORY(cppconn) - ADD_SUBDIRECTORY(driver) - ADD_SUBDIRECTORY(examples) --ADD_SUBDIRECTORY(test) --ADD_SUBDIRECTORY(test/framework) --ADD_SUBDIRECTORY(test/CJUnitTestsPort) --ADD_SUBDIRECTORY(test/unit) - - IF(DEFINED CMAKE_SYSTEM_NAME AND ${CMAKE_SYSTEM_NAME} STREQUAL "SunOS") - # see also README diff --git a/dev-db/mysql-connector-c++/metadata.xml b/dev-db/mysql-connector-c++/metadata.xml index 41a2871986c3..bf1ec7ca65a3 100644 --- a/dev-db/mysql-connector-c++/metadata.xml +++ b/dev-db/mysql-connector-c++/metadata.xml @@ -6,7 +6,6 @@ MySQL - Build coverage support Build the legacy 1.x API as well as the DevX API diff --git a/dev-db/mysql-connector-c++/mysql-connector-c++-1.1.12-r2.ebuild b/dev-db/mysql-connector-c++/mysql-connector-c++-1.1.12-r2.ebuild deleted file mode 100644 index e4f89b29bcd2..000000000000 --- a/dev-db/mysql-connector-c++/mysql-connector-c++-1.1.12-r2.ebuild +++ /dev/null @@ -1,54 +0,0 @@ -# Copyright 1999-2022 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -inherit cmake flag-o-matic - -DESCRIPTION="MySQL database connector for C++ (mimics JDBC 4.0 API)" -HOMEPAGE="https://dev.mysql.com/downloads/connector/cpp/" -SRC_URI="https://dev.mysql.com/get/Downloads/Connector-C++/${P}.tar.gz" - -LICENSE="Artistic GPL-2" -SLOT="0/7" -KEYWORDS="amd64 arm ~arm64 ~ppc ppc64 sparc x86" -IUSE="debug examples gcov" - -DEPEND=" - dev-db/mysql-connector-c:= - dev-libs/boost:= - dev-libs/openssl:0= - ! /dev/null || die "pushd failed" + + for f in "${ED}/usr/share/postgresql-${SLOT}/man/man${mansec}"/* ; do + bn=$(basename "${f}") + slotted_name=${bn%.${mansec}}${SLOT}.${mansec} + case ${bn} in + TABLE.7|WITH.7) + echo ".so ${rel_manpath}/SELECT.7" > ${slotted_name} + ;; + *) + echo ".so ${rel_manpath}/${bn}" > ${slotted_name} + ;; + esac + done + + popd > /dev/null + done + + insinto /etc/postgresql-${SLOT} + newins src/bin/psql/psqlrc.sample psqlrc + + # Don't delete libpg{port,common}.a (Bug #571046). They're always + # needed by extensions utilizing PGXS. + use static-libs || \ + 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}") + dosym "../$(get_libdir)/postgresql-${SLOT}/bin/${bn}" \ + "/usr/bin/${bn}${SLOT/.}" + done + + if use doc ; then + docinto html + dodoc doc/src/sgml/html/* + fi + + if use server; then + sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \ + "${FILESDIR}/${PN}.confd-9.3" | newconfd - ${PN}-${SLOT} + + sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \ + "${FILESDIR}/${PN}.init-9.3-r1" | newinitd - ${PN}-${SLOT} + + if use systemd; then + 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 + + use pam && pamd_mimic system-auth ${PN}-${SLOT} auth account session + + if use prefix ; then + keepdir /run/postgresql + fperms 1775 /run/postgresql + fi + fi +} + +pkg_postinst() { + use server && use systemd && tmpfiles_process ${PN}-${SLOT}.conf + postgresql-config update + + elog "If you need a global psqlrc-file, you can place it in:" + elog " ${EROOT}/etc/postgresql-${SLOT}/" + + if use server ; then + elog + elog "Gentoo specific documentation:" + elog "https://wiki.gentoo.org/wiki/PostgreSQL" + elog + elog "Official documentation:" + elog "https://www.postgresql.org/docs/${SLOT}/static/index.html" + elog + elog "The default location of the Unix-domain socket is:" + elog " ${EROOT}/run/postgresql/" + elog + elog "Before initializing the database, you may want to edit PG_INITDB_OPTS" + elog "so that it contains your preferred locale in:" + elog " ${EROOT}/etc/conf.d/postgresql-${SLOT}" + elog + 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 +} + +pkg_prerm() { + if use server && [[ -z ${REPLACED_BY_VERSION} ]] ; then + ewarn "Have you dumped and/or migrated the ${SLOT} database cluster?" + ewarn "\thttps://wiki.gentoo.org/wiki/PostgreSQL/QuickStart#Migrating_PostgreSQL" + + ebegin "Resuming removal in 10 seconds (Control-C to cancel)" + sleep 10 + eend 0 + fi +} + +pkg_postrm() { + postgresql-config update +} + +pkg_config() { + use server || die "USE flag 'server' not enabled. Nothing to configure." + + [[ -f "${EROOT}/etc/conf.d/postgresql-${SLOT}" ]] \ + && source "${EROOT}/etc/conf.d/postgresql-${SLOT}" + [[ -z "${PGDATA}" ]] && PGDATA="${EROOT}/etc/postgresql-${SLOT}/" + [[ -z "${DATA_DIR}" ]] \ + && DATA_DIR="${EROOT}/var/lib/postgresql/${SLOT}/data" + + # environment.bz2 may not contain the same locale as the current system + # locale. Unset and source from the current system locale. + if [ -f "${EROOT}/etc/env.d/02locale" ]; then + unset LANG + unset LC_CTYPE + unset LC_NUMERIC + unset LC_TIME + unset LC_COLLATE + unset LC_MONETARY + unset LC_MESSAGES + unset LC_ALL + source "${EROOT}/etc/env.d/02locale" + [ -n "${LANG}" ] && export LANG + [ -n "${LC_CTYPE}" ] && export LC_CTYPE + [ -n "${LC_NUMERIC}" ] && export LC_NUMERIC + [ -n "${LC_TIME}" ] && export LC_TIME + [ -n "${LC_COLLATE}" ] && export LC_COLLATE + [ -n "${LC_MONETARY}" ] && export LC_MONETARY + [ -n "${LC_MESSAGES}" ] && export LC_MESSAGES + [ -n "${LC_ALL}" ] && export LC_ALL + fi + + einfo "You can modify the paths and options passed to initdb by editing:" + einfo " ${EROOT}/etc/conf.d/postgresql-${SLOT}" + einfo + einfo "Information on options that can be passed to initdb are found at:" + einfo " https://www.postgresql.org/docs/${SLOT}/static/creating-cluster.html" + einfo " https://www.postgresql.org/docs/${SLOT}/static/app-initdb.html" + einfo + einfo "PG_INITDB_OPTS is currently set to:" + if [[ -z "${PG_INITDB_OPTS}" ]] ; then + einfo " (none)" + else + einfo " ${PG_INITDB_OPTS}" + fi + einfo + einfo "Configuration files will be installed to:" + einfo " ${PGDATA}" + einfo + einfo "The database cluster will be created in:" + einfo " ${DATA_DIR}" + einfo + + ebegin "Continuing initialization in 5 seconds (Control-C to cancel)" + sleep 5 + eend 0 + + if [ -n "$(ls -A ${DATA_DIR} 2> /dev/null)" ] ; then + eerror "The given directory, '${DATA_DIR}', is not empty." + eerror "Modify DATA_DIR to point to an empty directory." + die "${DATA_DIR} is not empty." + fi + + 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" + fi + + einfo "Initializing the database ..." + + if [[ ${EUID} == 0 ]] ; then + su - postgres -c "${EROOT}/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -D \"${DATA_DIR}\" ${PG_INITDB_OPTS}" + else + "${EROOT}"/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -U postgres -D "${DATA_DIR}" ${PG_INITDB_OPTS} + fi + + if [[ "${DATA_DIR%/}" != "${PGDATA%/}" ]] ; then + mv "${DATA_DIR%/}"/{pg_{hba,ident},postgresql}.conf "${PGDATA}" + ln -s "${PGDATA%/}"/{pg_{hba,ident},postgresql}.conf "${DATA_DIR%/}" + fi + + # unix_socket_directory has no effect in postgresql.conf as it's + # overridden in the initscript + sed '/^#unix_socket_directories/,+1d' -i "${PGDATA%/}"/postgresql.conf + + cat <<- EOF >> "${PGDATA%/}"/postgresql.conf + # This is here because of https://bugs.gentoo.org/show_bug.cgi?id=518522 + # On the off-chance that you might need to work with UTF-8 encoded + # characters in PL/Perl + plperl.on_init = 'use utf8; use re; package utf8; require "utf8_heavy.pl";' + EOF + + einfo "The autovacuum function, which was in contrib, has been moved to the main" + einfo "PostgreSQL functions starting with 8.1, and starting with 8.4 is now enabled" + einfo "by default. You can disable it in the cluster's:" + einfo " ${PGDATA%/}/postgresql.conf" + einfo + if ! use systemd; then + einfo "The PostgreSQL server, by default, will log events to:" + einfo " ${DATA_DIR%/}/postmaster.log" + einfo + fi + if use prefix ; then + einfo "The location of the configuration files have moved to:" + einfo " ${PGDATA}" + einfo "To start the server:" + einfo " pg_ctl start -D ${DATA_DIR} -o '-D ${PGDATA} --data-directory=${DATA_DIR}'" + einfo "To stop:" + einfo " pg_ctl stop -D ${DATA_DIR}" + einfo + einfo "Or move the configuration files back:" + einfo "mv ${PGDATA}*.conf ${DATA_DIR}" + elif use systemd; then + einfo "You should use the 'postgresql-${SLOT}.service' unit to run PostgreSQL" + einfo "instead of 'pg_ctl'." + else + einfo "You should use the '${EROOT}/etc/init.d/postgresql-${SLOT}' script to run PostgreSQL" + einfo "instead of 'pg_ctl'." + fi +} + +src_test() { + if use server && [[ ${UID} -ne 0 ]] ; then + emake check + + 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 + use server || \ + ewarn 'Tests cannot be run without the "server" use flag enabled.' + [[ ${UID} -eq 0 ]] || \ + ewarn 'Tests cannot be run as root. Enable "userpriv" in FEATURES.' + + ewarn 'Skipping.' + fi +} diff --git a/dev-db/postgresql/postgresql-12.14.ebuild b/dev-db/postgresql/postgresql-12.14.ebuild new file mode 100644 index 000000000000..084853e140d3 --- /dev/null +++ b/dev-db/postgresql/postgresql-12.14.ebuild @@ -0,0 +1,453 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{9,10,11} ) +LLVM_MAX_SLOT=15 + +inherit flag-o-matic linux-info llvm pam python-single-r1 systemd tmpfiles + +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) + +MY_PV=${PV/_/} +S="${WORKDIR}/${PN}-${MY_PV}" + +SRC_URI="https://ftp.postgresql.org/pub/source/v${MY_PV}/postgresql-${MY_PV}.tar.bz2" + +LICENSE="POSTGRESQL GPL-2" +DESCRIPTION="PostgreSQL RDBMS" +HOMEPAGE="https://www.postgresql.org/" + +IUSE="debug doc icu kerberos ldap llvm nls pam + perl python +readline selinux +server systemd ssl static-libs tcl + threads uuid xml zlib" + +REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" + +CDEPEND=" +>=app-eselect/eselect-postgresql-2.0 +acct-group/postgres +acct-user/postgres +sys-apps/less +virtual/libintl +icu? ( dev-libs/icu:= ) +kerberos? ( virtual/krb5 ) +ldap? ( net-nds/openldap:= ) +llvm? ( + =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= ) +tcl? ( >=dev-lang/tcl-8:0= ) +xml? ( dev-libs/libxml2 dev-libs/libxslt ) +zlib? ( sys-libs/zlib ) +" + +# uuid flags -- depend on sys-apps/util-linux for Linux libcs, or if no +# supported libc in use depend on dev-libs/ossp-uuid. For BSD systems, +# the libc includes UUID functions. +UTIL_LINUX_LIBC=( elibc_{glibc,musl} ) + +nest_usedep() { + local front back + while [[ ${#} -gt 1 ]]; do + front+="${1}? ( " + back+=" )" + shift + done + echo "${front}${1}${back}" +} + +CDEPEND+=" +uuid? ( + ${UTIL_LINUX_LIBC[@]/%/? ( sys-apps/util-linux )} + $(nest_usedep ${UTIL_LINUX_LIBC[@]/#/!} dev-libs/ossp-uuid) +)" + +DEPEND="${CDEPEND} +sys-devel/bison +sys-devel/flex +nls? ( sys-devel/gettext ) +xml? ( virtual/pkgconfig ) +" + +RDEPEND="${CDEPEND} +selinux? ( sec-policy/selinux-postgresql ) +" + +pkg_setup() { + use llvm && llvm_pkg_setup + + use server && CONFIG_CHECK="~SYSVIPC" linux-info_pkg_setup + + use python && python-single-r1_pkg_setup +} + +src_prepare() { + # Set proper run directory + sed "s|\(PGSOCKET_DIR\s\+\)\"/tmp\"|\1\"${EPREFIX}/run/postgresql\"|" \ + -i src/include/pg_config_manual.h || die + + # Rely on $PATH being in the proper order so that the correct + # install program is used for modules utilizing PGXS in both + # hardened and non-hardened environments. (Bug #528786) + sed 's/@install_bin@/install -c/' -i src/Makefile.global.in || die + + use server || eapply "${FILESDIR}/${PN}-12.1-no-server.patch" + + if use pam ; then + sed "s/\(#define PGSQL_PAM_SERVICE \"postgresql\)/\1-${SLOT}/" \ + -i src/backend/libpq/auth.c || \ + die 'PGSQL_PAM_SERVICE rename failed.' + fi + + eapply_user +} + +src_configure() { + case ${CHOST} in + *-darwin*|*-solaris*) + use nls && append-libs intl + ;; + esac + + export LDFLAGS_SL="${LDFLAGS}" + export LDFLAGS_EX="${LDFLAGS}" + + local PO="${EPREFIX}" + + local i uuid_config="" + if use uuid; then + for i in ${UTIL_LINUX_LIBC[@]}; do + use ${i} && uuid_config="--with-uuid=e2fs" + done + [[ -z $uuid_config ]] && uuid_config="--with-uuid=ossp" + fi + + 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 pam) \ + $(use_with perl) \ + $(use_with python) \ + $(use_with readline) \ + $(use_with ssl openssl) \ + $(usex server "$(use_with systemd)" '--without-systemd') \ + $(use_with tcl) \ + ${uuid_config} \ + $(use_with xml libxml) \ + $(use_with xml libxslt) \ + $(use_with zlib) \ + $(use_enable nls) +} + +src_compile() { + emake + emake -C contrib +} + +src_install() { + emake DESTDIR="${D}" install + emake DESTDIR="${D}" install -C contrib + + dodoc README HISTORY + + # man pages are already built, but if we have the target make them, + # they'll be generated from source before being installed so we + # manually install man pages. + # We use ${SLOT} instead of doman for postgresql.eselect + insinto /usr/share/postgresql-${SLOT}/man/ + 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 + rm "${ED}/usr/share/postgresql-${SLOT}/man/man1/${m}.1" + done + fi + docompress /usr/share/postgresql-${SLOT}/man/man{1,3,7} + + # Create slot specific man pages + local bn f mansec slotted_name + for mansec in 1 3 7 ; do + local rel_manpath="../../postgresql-${SLOT}/man/man${mansec}" + + mkdir -p "${ED}"/usr/share/man/man${mansec} || die "making man dir" + pushd "${ED}"/usr/share/man/man${mansec} > /dev/null || die "pushd failed" + + for f in "${ED}/usr/share/postgresql-${SLOT}/man/man${mansec}"/* ; do + bn=$(basename "${f}") + slotted_name=${bn%.${mansec}}${SLOT}.${mansec} + case ${bn} in + TABLE.7|WITH.7) + echo ".so ${rel_manpath}/SELECT.7" > ${slotted_name} + ;; + *) + echo ".so ${rel_manpath}/${bn}" > ${slotted_name} + ;; + esac + done + + popd > /dev/null + done + + insinto /etc/postgresql-${SLOT} + newins src/bin/psql/psqlrc.sample psqlrc + + # Don't delete libpg{port,common}.a (Bug #571046). They're always + # needed by extensions utilizing PGXS. + use static-libs || \ + 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}") + dosym "../$(get_libdir)/postgresql-${SLOT}/bin/${bn}" \ + "/usr/bin/${bn}${SLOT/.}" + done + + if use doc ; then + docinto html + dodoc doc/src/sgml/html/* + fi + + if use server; then + sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \ + "${FILESDIR}/${PN}.confd-9.3" | newconfd - ${PN}-${SLOT} + + sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \ + "${FILESDIR}/${PN}.init-9.3-r1" | newinitd - ${PN}-${SLOT} + + if use systemd; then + 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 + + use pam && pamd_mimic system-auth ${PN}-${SLOT} auth account session + + if use prefix ; then + keepdir /run/postgresql + fperms 1775 /run/postgresql + fi + fi +} + +pkg_postinst() { + use server && use systemd && tmpfiles_process ${PN}-${SLOT}.conf + postgresql-config update + + elog "If you need a global psqlrc-file, you can place it in:" + elog " ${EROOT}/etc/postgresql-${SLOT}/" + + if use server ; then + elog + elog "Gentoo specific documentation:" + elog "https://wiki.gentoo.org/wiki/PostgreSQL" + elog + elog "Official documentation:" + elog "https://www.postgresql.org/docs/${SLOT}/static/index.html" + elog + elog "The default location of the Unix-domain socket is:" + elog " ${EROOT}/run/postgresql/" + elog + elog "Before initializing the database, you may want to edit PG_INITDB_OPTS" + elog "so that it contains your preferred locale in:" + elog " ${EROOT}/etc/conf.d/postgresql-${SLOT}" + elog + 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 +} + +pkg_prerm() { + if use server && [[ -z ${REPLACED_BY_VERSION} ]] ; then + ewarn "Have you dumped and/or migrated the ${SLOT} database cluster?" + ewarn "\thttps://wiki.gentoo.org/wiki/PostgreSQL/QuickStart#Migrating_PostgreSQL" + + ebegin "Resuming removal in 10 seconds (Control-C to cancel)" + sleep 10 + eend 0 + fi +} + +pkg_postrm() { + postgresql-config update +} + +pkg_config() { + use server || die "USE flag 'server' not enabled. Nothing to configure." + + [[ -f "${EROOT}/etc/conf.d/postgresql-${SLOT}" ]] \ + && source "${EROOT}/etc/conf.d/postgresql-${SLOT}" + [[ -z "${PGDATA}" ]] && PGDATA="${EROOT}/etc/postgresql-${SLOT}/" + [[ -z "${DATA_DIR}" ]] \ + && DATA_DIR="${EROOT}/var/lib/postgresql/${SLOT}/data" + + # environment.bz2 may not contain the same locale as the current system + # locale. Unset and source from the current system locale. + if [ -f "${EROOT}/etc/env.d/02locale" ]; then + unset LANG + unset LC_CTYPE + unset LC_NUMERIC + unset LC_TIME + unset LC_COLLATE + unset LC_MONETARY + unset LC_MESSAGES + unset LC_ALL + source "${EROOT}/etc/env.d/02locale" + [ -n "${LANG}" ] && export LANG + [ -n "${LC_CTYPE}" ] && export LC_CTYPE + [ -n "${LC_NUMERIC}" ] && export LC_NUMERIC + [ -n "${LC_TIME}" ] && export LC_TIME + [ -n "${LC_COLLATE}" ] && export LC_COLLATE + [ -n "${LC_MONETARY}" ] && export LC_MONETARY + [ -n "${LC_MESSAGES}" ] && export LC_MESSAGES + [ -n "${LC_ALL}" ] && export LC_ALL + fi + + einfo "You can modify the paths and options passed to initdb by editing:" + einfo " ${EROOT}/etc/conf.d/postgresql-${SLOT}" + einfo + einfo "Information on options that can be passed to initdb are found at:" + einfo " https://www.postgresql.org/docs/${SLOT}/static/creating-cluster.html" + einfo " https://www.postgresql.org/docs/${SLOT}/static/app-initdb.html" + einfo + einfo "PG_INITDB_OPTS is currently set to:" + if [[ -z "${PG_INITDB_OPTS}" ]] ; then + einfo " (none)" + else + einfo " ${PG_INITDB_OPTS}" + fi + einfo + einfo "Configuration files will be installed to:" + einfo " ${PGDATA}" + einfo + einfo "The database cluster will be created in:" + einfo " ${DATA_DIR}" + einfo + + ebegin "Continuing initialization in 5 seconds (Control-C to cancel)" + sleep 5 + eend 0 + + if [ -n "$(ls -A ${DATA_DIR} 2> /dev/null)" ] ; then + eerror "The given directory, '${DATA_DIR}', is not empty." + eerror "Modify DATA_DIR to point to an empty directory." + die "${DATA_DIR} is not empty." + fi + + 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" + fi + + einfo "Initializing the database ..." + + if [[ ${EUID} == 0 ]] ; then + su - postgres -c "${EROOT}/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -D \"${DATA_DIR}\" ${PG_INITDB_OPTS}" + else + "${EROOT}"/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -U postgres -D "${DATA_DIR}" ${PG_INITDB_OPTS} + fi + + if [[ "${DATA_DIR%/}" != "${PGDATA%/}" ]] ; then + mv "${DATA_DIR%/}"/{pg_{hba,ident},postgresql}.conf "${PGDATA}" + ln -s "${PGDATA%/}"/{pg_{hba,ident},postgresql}.conf "${DATA_DIR%/}" + fi + + # unix_socket_directory has no effect in postgresql.conf as it's + # overridden in the initscript + sed '/^#unix_socket_directories/,+1d' -i "${PGDATA%/}"/postgresql.conf + + cat <<- EOF >> "${PGDATA%/}"/postgresql.conf + # This is here because of https://bugs.gentoo.org/show_bug.cgi?id=518522 + # On the off-chance that you might need to work with UTF-8 encoded + # characters in PL/Perl + plperl.on_init = 'use utf8; use re; package utf8; require "utf8_heavy.pl";' + EOF + + einfo "The autovacuum function, which was in contrib, has been moved to the main" + einfo "PostgreSQL functions starting with 8.1, and starting with 8.4 is now enabled" + einfo "by default. You can disable it in the cluster's:" + einfo " ${PGDATA%/}/postgresql.conf" + einfo + if ! use systemd; then + einfo "The PostgreSQL server, by default, will log events to:" + einfo " ${DATA_DIR%/}/postmaster.log" + einfo + fi + if use prefix ; then + einfo "The location of the configuration files have moved to:" + einfo " ${PGDATA}" + einfo "To start the server:" + einfo " pg_ctl start -D ${DATA_DIR} -o '-D ${PGDATA} --data-directory=${DATA_DIR}'" + einfo "To stop:" + einfo " pg_ctl stop -D ${DATA_DIR}" + einfo + einfo "Or move the configuration files back:" + einfo "mv ${PGDATA}*.conf ${DATA_DIR}" + elif use systemd; then + einfo "You should use the 'postgresql-${SLOT}.service' unit to run PostgreSQL" + einfo "instead of 'pg_ctl'." + else + einfo "You should use the '${EROOT}/etc/init.d/postgresql-${SLOT}' script to run PostgreSQL" + einfo "instead of 'pg_ctl'." + fi +} + +src_test() { + if use server && [[ ${UID} -ne 0 ]] ; then + emake check + + 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 + use server || \ + ewarn 'Tests cannot be run without the "server" use flag enabled.' + [[ ${UID} -eq 0 ]] || \ + ewarn 'Tests cannot be run as root. Enable "userpriv" in FEATURES.' + + ewarn 'Skipping.' + fi +} diff --git a/dev-db/postgresql/postgresql-13.10.ebuild b/dev-db/postgresql/postgresql-13.10.ebuild new file mode 100644 index 000000000000..8df70d557212 --- /dev/null +++ b/dev-db/postgresql/postgresql-13.10.ebuild @@ -0,0 +1,465 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{9,10,11} ) +LLVM_MAX_SLOT=15 + +inherit flag-o-matic linux-info llvm pam python-single-r1 systemd tmpfiles + +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) + +MY_PV=${PV/_/} +S="${WORKDIR}/${PN}-${MY_PV}" + +SRC_URI="https://ftp.postgresql.org/pub/source/v${MY_PV}/postgresql-${MY_PV}.tar.bz2" + +LICENSE="POSTGRESQL GPL-2" +DESCRIPTION="PostgreSQL RDBMS" +HOMEPAGE="https://www.postgresql.org/" + +IUSE="debug doc icu kerberos ldap llvm nls pam + perl python +readline selinux +server systemd ssl static-libs tcl + threads uuid xml zlib" + +REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" + +CDEPEND=" +>=app-eselect/eselect-postgresql-2.0 +acct-group/postgres +acct-user/postgres +sys-apps/less +virtual/libintl +icu? ( dev-libs/icu:= ) +kerberos? ( virtual/krb5 ) +ldap? ( net-nds/openldap:= ) +llvm? ( + =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= ) +tcl? ( >=dev-lang/tcl-8:0= ) +xml? ( dev-libs/libxml2 dev-libs/libxslt ) +zlib? ( sys-libs/zlib ) +" + +# uuid flags -- depend on sys-apps/util-linux for Linux libcs, or if no +# supported libc in use depend on dev-libs/ossp-uuid. For BSD systems, +# the libc includes UUID functions. +UTIL_LINUX_LIBC=( elibc_{glibc,musl} ) + +nest_usedep() { + local front back + while [[ ${#} -gt 1 ]]; do + front+="${1}? ( " + back+=" )" + shift + done + echo "${front}${1}${back}" +} + +CDEPEND+=" +uuid? ( + ${UTIL_LINUX_LIBC[@]/%/? ( sys-apps/util-linux )} + $(nest_usedep ${UTIL_LINUX_LIBC[@]/#/!} dev-libs/ossp-uuid) +)" + +DEPEND="${CDEPEND} +sys-devel/bison +sys-devel/flex +nls? ( sys-devel/gettext ) +xml? ( virtual/pkgconfig ) +" + +RDEPEND="${CDEPEND} +selinux? ( sec-policy/selinux-postgresql ) +" + +pkg_setup() { + use llvm && llvm_pkg_setup + + use server && CONFIG_CHECK="~SYSVIPC" linux-info_pkg_setup + + use python && python-single-r1_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 + + # Rely on $PATH being in the proper order so that the correct + # install program is used for modules utilizing PGXS in both + # 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.8-no-server.patch" + + if use pam ; then + sed "s/\(#define PGSQL_PAM_SERVICE \"postgresql\)/\1-${SLOT}/" \ + -i src/backend/libpq/auth.c || \ + die 'PGSQL_PAM_SERVICE rename failed.' + fi + + eapply_user +} + +src_configure() { + case ${CHOST} in + *-darwin*|*-solaris*) + use nls && append-libs intl + ;; + esac + + export LDFLAGS_SL="${LDFLAGS}" + export LDFLAGS_EX="${LDFLAGS}" + + local PO="${EPREFIX}" + + local i uuid_config="" + if use uuid; then + for i in ${UTIL_LINUX_LIBC[@]}; do + use ${i} && uuid_config="--with-uuid=e2fs" + done + [[ -z $uuid_config ]] && uuid_config="--with-uuid=ossp" + fi + + local myconf="\ + --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 debug) \ + $(use_enable threads thread-safety) \ + $(use_with icu) \ + $(use_with kerberos gssapi) \ + $(use_with ldap) \ + $(use_with llvm) \ + $(use_with pam) \ + $(use_with perl) \ + $(use_with python) \ + $(use_with readline) \ + $(use_with ssl openssl) \ + $(usex server "$(use_with systemd)" '--without-systemd') \ + $(use_with tcl) \ + ${uuid_config} \ + $(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} +} + +src_compile() { + emake + emake -C contrib +} + +src_install() { + emake DESTDIR="${D}" install + emake DESTDIR="${D}" install -C contrib + + dodoc README HISTORY + + # man pages are already built, but if we have the target make them, + # they'll be generated from source before being installed so we + # manually install man pages. + # We use ${SLOT} instead of doman for postgresql.eselect + insinto /usr/share/postgresql-${SLOT}/man/ + 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 + rm "${ED}/usr/share/postgresql-${SLOT}/man/man1/${m}.1" + done + fi + docompress /usr/share/postgresql-${SLOT}/man/man{1,3,7} + + # Create slot specific man pages + local bn f mansec slotted_name + for mansec in 1 3 7 ; do + local rel_manpath="../../postgresql-${SLOT}/man/man${mansec}" + + mkdir -p "${ED}"/usr/share/man/man${mansec} || die "making man dir" + pushd "${ED}"/usr/share/man/man${mansec} > /dev/null || die "pushd failed" + + for f in "${ED}/usr/share/postgresql-${SLOT}/man/man${mansec}"/* ; do + bn=$(basename "${f}") + slotted_name=${bn%.${mansec}}${SLOT}.${mansec} + case ${bn} in + TABLE.7|WITH.7) + echo ".so ${rel_manpath}/SELECT.7" > ${slotted_name} + ;; + *) + echo ".so ${rel_manpath}/${bn}" > ${slotted_name} + ;; + esac + done + + popd > /dev/null + done + + insinto /etc/postgresql-${SLOT} + newins src/bin/psql/psqlrc.sample psqlrc + + # Don't delete libpg{port,common}.a (Bug #571046). They're always + # needed by extensions utilizing PGXS. + use static-libs || \ + 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}") + dosym "../$(get_libdir)/postgresql-${SLOT}/bin/${bn}" \ + "/usr/bin/${bn}${SLOT/.}" + done + + if use doc ; then + docinto html + dodoc doc/src/sgml/html/* + fi + + if use server; then + sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \ + "${FILESDIR}/${PN}.confd-9.3" | newconfd - ${PN}-${SLOT} + + sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \ + "${FILESDIR}/${PN}.init-9.3-r1" | newinitd - ${PN}-${SLOT} + + if use systemd; then + 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 + + use pam && pamd_mimic system-auth ${PN}-${SLOT} auth account session + + if use prefix ; then + keepdir /run/postgresql + fperms 1775 /run/postgresql + fi + fi +} + +pkg_postinst() { + use server && use systemd && tmpfiles_process ${PN}-${SLOT}.conf + postgresql-config update + + elog "If you need a global psqlrc-file, you can place it in:" + elog " ${EROOT}/etc/postgresql-${SLOT}/" + + if use server ; then + elog + elog "Gentoo specific documentation:" + elog "https://wiki.gentoo.org/wiki/PostgreSQL" + elog + elog "Official documentation:" + elog "https://www.postgresql.org/docs/${SLOT}/static/index.html" + elog + elog "The default location of the Unix-domain socket is:" + elog " ${EROOT}/run/postgresql/" + elog + elog "Before initializing the database, you may want to edit PG_INITDB_OPTS" + elog "so that it contains your preferred locale in:" + elog " ${EROOT}/etc/conf.d/postgresql-${SLOT}" + elog + 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 +} + +pkg_prerm() { + if use server && [[ -z ${REPLACED_BY_VERSION} ]] ; then + ewarn "Have you dumped and/or migrated the ${SLOT} database cluster?" + ewarn "\thttps://wiki.gentoo.org/wiki/PostgreSQL/QuickStart#Migrating_PostgreSQL" + + ebegin "Resuming removal in 10 seconds (Control-C to cancel)" + sleep 10 + eend 0 + fi +} + +pkg_postrm() { + postgresql-config update +} + +pkg_config() { + use server || die "USE flag 'server' not enabled. Nothing to configure." + + [[ -f "${EROOT}/etc/conf.d/postgresql-${SLOT}" ]] \ + && source "${EROOT}/etc/conf.d/postgresql-${SLOT}" + [[ -z "${PGDATA}" ]] && PGDATA="${EROOT}/etc/postgresql-${SLOT}/" + [[ -z "${DATA_DIR}" ]] \ + && DATA_DIR="${EROOT}/var/lib/postgresql/${SLOT}/data" + + # environment.bz2 may not contain the same locale as the current system + # locale. Unset and source from the current system locale. + if [ -f "${EROOT}/etc/env.d/02locale" ]; then + unset LANG + unset LC_CTYPE + unset LC_NUMERIC + unset LC_TIME + unset LC_COLLATE + unset LC_MONETARY + unset LC_MESSAGES + unset LC_ALL + source "${EROOT}/etc/env.d/02locale" + [ -n "${LANG}" ] && export LANG + [ -n "${LC_CTYPE}" ] && export LC_CTYPE + [ -n "${LC_NUMERIC}" ] && export LC_NUMERIC + [ -n "${LC_TIME}" ] && export LC_TIME + [ -n "${LC_COLLATE}" ] && export LC_COLLATE + [ -n "${LC_MONETARY}" ] && export LC_MONETARY + [ -n "${LC_MESSAGES}" ] && export LC_MESSAGES + [ -n "${LC_ALL}" ] && export LC_ALL + fi + + einfo "You can modify the paths and options passed to initdb by editing:" + einfo " ${EROOT}/etc/conf.d/postgresql-${SLOT}" + einfo + einfo "Information on options that can be passed to initdb are found at:" + einfo " https://www.postgresql.org/docs/${SLOT}/static/creating-cluster.html" + einfo " https://www.postgresql.org/docs/${SLOT}/static/app-initdb.html" + einfo + einfo "PG_INITDB_OPTS is currently set to:" + if [[ -z "${PG_INITDB_OPTS}" ]] ; then + einfo " (none)" + else + einfo " ${PG_INITDB_OPTS}" + fi + einfo + einfo "Configuration files will be installed to:" + einfo " ${PGDATA}" + einfo + einfo "The database cluster will be created in:" + einfo " ${DATA_DIR}" + einfo + + ebegin "Continuing initialization in 5 seconds (Control-C to cancel)" + sleep 5 + eend 0 + + if [ -n "$(ls -A ${DATA_DIR} 2> /dev/null)" ] ; then + eerror "The given directory, '${DATA_DIR}', is not empty." + eerror "Modify DATA_DIR to point to an empty directory." + die "${DATA_DIR} is not empty." + fi + + 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" + fi + + einfo "Initializing the database ..." + + if [[ ${EUID} == 0 ]] ; then + su - postgres -c "${EROOT}/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -D \"${DATA_DIR}\" ${PG_INITDB_OPTS}" + else + "${EROOT}"/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -U postgres -D "${DATA_DIR}" ${PG_INITDB_OPTS} + fi + + if [[ "${DATA_DIR%/}" != "${PGDATA%/}" ]] ; then + mv "${DATA_DIR%/}"/{pg_{hba,ident},postgresql}.conf "${PGDATA}" + ln -s "${PGDATA%/}"/{pg_{hba,ident},postgresql}.conf "${DATA_DIR%/}" + fi + + # unix_socket_directory has no effect in postgresql.conf as it's + # overridden in the initscript + sed '/^#unix_socket_directories/,+1d' -i "${PGDATA%/}"/postgresql.conf + + cat <<- EOF >> "${PGDATA%/}"/postgresql.conf + # This is here because of https://bugs.gentoo.org/show_bug.cgi?id=518522 + # On the off-chance that you might need to work with UTF-8 encoded + # characters in PL/Perl + plperl.on_init = 'use utf8; use re; package utf8; require "utf8_heavy.pl";' + EOF + + einfo "The autovacuum function, which was in contrib, has been moved to the main" + einfo "PostgreSQL functions starting with 8.1, and starting with 8.4 is now enabled" + einfo "by default. You can disable it in the cluster's:" + einfo " ${PGDATA%/}/postgresql.conf" + einfo + if ! use systemd; then + einfo "The PostgreSQL server, by default, will log events to:" + einfo " ${DATA_DIR%/}/postmaster.log" + einfo + fi + if use prefix ; then + einfo "The location of the configuration files have moved to:" + einfo " ${PGDATA}" + einfo "To start the server:" + einfo " pg_ctl start -D ${DATA_DIR} -o '-D ${PGDATA} --data-directory=${DATA_DIR}'" + einfo "To stop:" + einfo " pg_ctl stop -D ${DATA_DIR}" + einfo + einfo "Or move the configuration files back:" + einfo "mv ${PGDATA}*.conf ${DATA_DIR}" + elif use systemd; then + einfo "You should use the 'postgresql-${SLOT}.service' unit to run PostgreSQL" + einfo "instead of 'pg_ctl'." + else + einfo "You should use the '${EROOT}/etc/init.d/postgresql-${SLOT}' script to run PostgreSQL" + einfo "instead of 'pg_ctl'." + fi +} + +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 + use server || \ + ewarn 'Tests cannot be run without the "server" use flag enabled.' + [[ ${UID} -eq 0 ]] || \ + ewarn 'Tests cannot be run as root. Enable "userpriv" in FEATURES.' + + ewarn 'Skipping.' + fi +} diff --git a/dev-db/postgresql/postgresql-14.7.ebuild b/dev-db/postgresql/postgresql-14.7.ebuild new file mode 100644 index 000000000000..8876f738f6c1 --- /dev/null +++ b/dev-db/postgresql/postgresql-14.7.ebuild @@ -0,0 +1,465 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{9,10,11} ) +LLVM_MAX_SLOT=15 + +inherit flag-o-matic linux-info llvm pam python-single-r1 systemd tmpfiles + +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) + +MY_PV=${PV/_/} +S="${WORKDIR}/${PN}-${MY_PV}" + +SRC_URI="https://ftp.postgresql.org/pub/source/v${MY_PV}/postgresql-${MY_PV}.tar.bz2" + +LICENSE="POSTGRESQL GPL-2" +DESCRIPTION="PostgreSQL RDBMS" +HOMEPAGE="https://www.postgresql.org/" + +IUSE="debug doc icu kerberos ldap llvm lz4 nls pam + perl python +readline selinux +server systemd ssl static-libs tcl + threads uuid xml zlib" + +REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" + +CDEPEND=" +>=app-eselect/eselect-postgresql-2.0 +acct-group/postgres +acct-user/postgres +sys-apps/less +virtual/libintl +icu? ( dev-libs/icu:= ) +kerberos? ( virtual/krb5 ) +ldap? ( net-nds/openldap:= ) +llvm? ( + =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= ) +tcl? ( >=dev-lang/tcl-8:0= ) +xml? ( dev-libs/libxml2 dev-libs/libxslt ) +zlib? ( sys-libs/zlib ) +" + +# uuid flags -- depend on sys-apps/util-linux for Linux libcs, or if no +# supported libc in use depend on dev-libs/ossp-uuid. For BSD systems, +# the libc includes UUID functions. +UTIL_LINUX_LIBC=( elibc_{glibc,musl} ) + +nest_usedep() { + local front back + while [[ ${#} -gt 1 ]]; do + front+="${1}? ( " + back+=" )" + shift + done + echo "${front}${1}${back}" +} + +CDEPEND+=" +uuid? ( + ${UTIL_LINUX_LIBC[@]/%/? ( sys-apps/util-linux )} + $(nest_usedep ${UTIL_LINUX_LIBC[@]/#/!} dev-libs/ossp-uuid) +)" + +DEPEND="${CDEPEND} +sys-devel/bison +sys-devel/flex +nls? ( sys-devel/gettext ) +xml? ( virtual/pkgconfig ) +" + +RDEPEND="${CDEPEND} +selinux? ( sec-policy/selinux-postgresql ) +" + +pkg_setup() { + use llvm && llvm_pkg_setup + + use server && CONFIG_CHECK="~SYSVIPC" linux-info_pkg_setup + + use python && python-single-r1_pkg_setup +} + +src_prepare() { + # Set proper run directory + sed "s|\(PGSOCKET_DIR\s\+\)\"/tmp\"|\1\"${EPREFIX}/run/postgresql\"|" \ + -i src/include/pg_config_manual.h || die + + # Rely on $PATH being in the proper order so that the correct + # install program is used for modules utilizing PGXS in both + # hardened and non-hardened environments. (Bug #528786) + sed 's/@install_bin@/install -c/' -i src/Makefile.global.in || die + + use server || eapply "${FILESDIR}/${PN}-14.5-no-server.patch" + + if use pam ; then + sed "s/\(#define PGSQL_PAM_SERVICE \"postgresql\)/\1-${SLOT}/" \ + -i src/backend/libpq/auth.c || \ + die 'PGSQL_PAM_SERVICE rename failed.' + fi + + eapply_user +} + +src_configure() { + case ${CHOST} in + *-darwin*|*-solaris*) + use nls && append-libs intl + ;; + esac + + export LDFLAGS_SL="${LDFLAGS}" + export LDFLAGS_EX="${LDFLAGS}" + + local PO="${EPREFIX}" + + local i uuid_config="" + if use uuid; then + for i in ${UTIL_LINUX_LIBC[@]}; do + use ${i} && uuid_config="--with-uuid=e2fs" + done + [[ -z $uuid_config ]] && uuid_config="--with-uuid=ossp" + fi + + local myconf="\ + --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 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) \ + $(use_with readline) \ + $(use_with ssl openssl) \ + $(usex server "$(use_with systemd)" '--without-systemd') \ + $(use_with tcl) \ + ${uuid_config} \ + $(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} +} + +src_compile() { + emake + emake -C contrib +} + +src_install() { + emake DESTDIR="${D}" install + emake DESTDIR="${D}" install -C contrib + + dodoc README HISTORY + + # man pages are already built, but if we have the target make them, + # they'll be generated from source before being installed so we + # manually install man pages. + # We use ${SLOT} instead of doman for postgresql.eselect + insinto /usr/share/postgresql-${SLOT}/man/ + 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 + rm "${ED}/usr/share/postgresql-${SLOT}/man/man1/${m}.1" + done + fi + docompress /usr/share/postgresql-${SLOT}/man/man{1,3,7} + + # Create slot specific man pages + local bn f mansec slotted_name + for mansec in 1 3 7 ; do + local rel_manpath="../../postgresql-${SLOT}/man/man${mansec}" + + mkdir -p "${ED}"/usr/share/man/man${mansec} || die "making man dir" + pushd "${ED}"/usr/share/man/man${mansec} > /dev/null || die "pushd failed" + + for f in "${ED}/usr/share/postgresql-${SLOT}/man/man${mansec}"/* ; do + bn=$(basename "${f}") + slotted_name=${bn%.${mansec}}${SLOT}.${mansec} + case ${bn} in + TABLE.7|WITH.7) + echo ".so ${rel_manpath}/SELECT.7" > ${slotted_name} + ;; + *) + echo ".so ${rel_manpath}/${bn}" > ${slotted_name} + ;; + esac + done + + popd > /dev/null + done + + insinto /etc/postgresql-${SLOT} + newins src/bin/psql/psqlrc.sample psqlrc + + # Don't delete libpg{port,common}.a (Bug #571046). They're always + # needed by extensions utilizing PGXS. + use static-libs || \ + 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}") + dosym "../$(get_libdir)/postgresql-${SLOT}/bin/${bn}" \ + "/usr/bin/${bn}${SLOT/.}" + done + + if use doc ; then + docinto html + dodoc doc/src/sgml/html/* + fi + + if use server; then + sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \ + "${FILESDIR}/${PN}.confd-9.3" | newconfd - ${PN}-${SLOT} + + sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \ + "${FILESDIR}/${PN}.init-9.3-r1" | newinitd - ${PN}-${SLOT} + + if use systemd; then + 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 + + use pam && pamd_mimic system-auth ${PN}-${SLOT} auth account session + + if use prefix ; then + keepdir /run/postgresql + fperms 1775 /run/postgresql + fi + fi +} + +pkg_postinst() { + use server && use systemd && tmpfiles_process ${PN}-${SLOT}.conf + postgresql-config update + + elog "If you need a global psqlrc-file, you can place it in:" + elog " ${EROOT}/etc/postgresql-${SLOT}/" + + if use server ; then + elog + elog "Gentoo specific documentation:" + elog "https://wiki.gentoo.org/wiki/PostgreSQL" + elog + elog "Official documentation:" + elog "https://www.postgresql.org/docs/${SLOT}/static/index.html" + elog + elog "The default location of the Unix-domain socket is:" + elog " ${EROOT}/run/postgresql/" + elog + elog "Before initializing the database, you may want to edit PG_INITDB_OPTS" + elog "so that it contains your preferred locale in:" + elog " ${EROOT}/etc/conf.d/postgresql-${SLOT}" + elog + 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 +} + +pkg_prerm() { + if use server && [[ -z ${REPLACED_BY_VERSION} ]] ; then + ewarn "Have you dumped and/or migrated the ${SLOT} database cluster?" + ewarn "\thttps://wiki.gentoo.org/wiki/PostgreSQL/QuickStart#Migrating_PostgreSQL" + + ebegin "Resuming removal in 10 seconds (Control-C to cancel)" + sleep 10 + eend 0 + fi +} + +pkg_postrm() { + postgresql-config update +} + +pkg_config() { + use server || die "USE flag 'server' not enabled. Nothing to configure." + + [[ -f "${EROOT}/etc/conf.d/postgresql-${SLOT}" ]] \ + && source "${EROOT}/etc/conf.d/postgresql-${SLOT}" + [[ -z "${PGDATA}" ]] && PGDATA="${EROOT}/etc/postgresql-${SLOT}/" + [[ -z "${DATA_DIR}" ]] \ + && DATA_DIR="${EROOT}/var/lib/postgresql/${SLOT}/data" + + # environment.bz2 may not contain the same locale as the current system + # locale. Unset and source from the current system locale. + if [ -f "${EROOT}/etc/env.d/02locale" ]; then + unset LANG + unset LC_CTYPE + unset LC_NUMERIC + unset LC_TIME + unset LC_COLLATE + unset LC_MONETARY + unset LC_MESSAGES + unset LC_ALL + source "${EROOT}/etc/env.d/02locale" + [ -n "${LANG}" ] && export LANG + [ -n "${LC_CTYPE}" ] && export LC_CTYPE + [ -n "${LC_NUMERIC}" ] && export LC_NUMERIC + [ -n "${LC_TIME}" ] && export LC_TIME + [ -n "${LC_COLLATE}" ] && export LC_COLLATE + [ -n "${LC_MONETARY}" ] && export LC_MONETARY + [ -n "${LC_MESSAGES}" ] && export LC_MESSAGES + [ -n "${LC_ALL}" ] && export LC_ALL + fi + + einfo "You can modify the paths and options passed to initdb by editing:" + einfo " ${EROOT}/etc/conf.d/postgresql-${SLOT}" + einfo + einfo "Information on options that can be passed to initdb are found at:" + einfo " https://www.postgresql.org/docs/${SLOT}/static/creating-cluster.html" + einfo " https://www.postgresql.org/docs/${SLOT}/static/app-initdb.html" + einfo + einfo "PG_INITDB_OPTS is currently set to:" + if [[ -z "${PG_INITDB_OPTS}" ]] ; then + einfo " (none)" + else + einfo " ${PG_INITDB_OPTS}" + fi + einfo + einfo "Configuration files will be installed to:" + einfo " ${PGDATA}" + einfo + einfo "The database cluster will be created in:" + einfo " ${DATA_DIR}" + einfo + + ebegin "Continuing initialization in 5 seconds (Control-C to cancel)" + sleep 5 + eend 0 + + if [ -n "$(ls -A ${DATA_DIR} 2> /dev/null)" ] ; then + eerror "The given directory, '${DATA_DIR}', is not empty." + eerror "Modify DATA_DIR to point to an empty directory." + die "${DATA_DIR} is not empty." + fi + + 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" + fi + + einfo "Initializing the database ..." + + if [[ ${EUID} == 0 ]] ; then + su - postgres -c "${EROOT}/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -D \"${DATA_DIR}\" ${PG_INITDB_OPTS}" + else + "${EROOT}"/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -U postgres -D "${DATA_DIR}" ${PG_INITDB_OPTS} + fi + + if [[ "${DATA_DIR%/}" != "${PGDATA%/}" ]] ; then + mv "${DATA_DIR%/}"/{pg_{hba,ident},postgresql}.conf "${PGDATA}" + ln -s "${PGDATA%/}"/{pg_{hba,ident},postgresql}.conf "${DATA_DIR%/}" + fi + + # unix_socket_directory has no effect in postgresql.conf as it's + # overridden in the initscript + sed '/^#unix_socket_directories/,+1d' -i "${PGDATA%/}"/postgresql.conf + + cat <<- EOF >> "${PGDATA%/}"/postgresql.conf + # This is here because of https://bugs.gentoo.org/show_bug.cgi?id=518522 + # On the off-chance that you might need to work with UTF-8 encoded + # characters in PL/Perl + plperl.on_init = 'use utf8; use re; package utf8; require "utf8_heavy.pl";' + EOF + + einfo "The autovacuum function, which was in contrib, has been moved to the main" + einfo "PostgreSQL functions starting with 8.1, and starting with 8.4 is now enabled" + einfo "by default. You can disable it in the cluster's:" + einfo " ${PGDATA%/}/postgresql.conf" + einfo + if ! use systemd; then + einfo "The PostgreSQL server, by default, will log events to:" + einfo " ${DATA_DIR%/}/postmaster.log" + einfo + fi + if use prefix ; then + einfo "The location of the configuration files have moved to:" + einfo " ${PGDATA}" + einfo "To start the server:" + einfo " pg_ctl start -D ${DATA_DIR} -o '-D ${PGDATA} --data-directory=${DATA_DIR}'" + einfo "To stop:" + einfo " pg_ctl stop -D ${DATA_DIR}" + einfo + einfo "Or move the configuration files back:" + einfo "mv ${PGDATA}*.conf ${DATA_DIR}" + elif use systemd; then + einfo "You should use the 'postgresql-${SLOT}.service' unit to run PostgreSQL" + einfo "instead of 'pg_ctl'." + else + einfo "You should use the '${EROOT}/etc/init.d/postgresql-${SLOT}' script to run PostgreSQL" + einfo "instead of 'pg_ctl'." + fi +} + +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 + use server || \ + ewarn 'Tests cannot be run without the "server" use flag enabled.' + [[ ${UID} -eq 0 ]] || \ + ewarn 'Tests cannot be run as root. Enable "userpriv" in FEATURES.' + + ewarn 'Skipping.' + fi +} diff --git a/dev-db/postgresql/postgresql-15.2.ebuild b/dev-db/postgresql/postgresql-15.2.ebuild new file mode 100644 index 000000000000..82c830dff9d2 --- /dev/null +++ b/dev-db/postgresql/postgresql-15.2.ebuild @@ -0,0 +1,467 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{9,10,11} ) +LLVM_MAX_SLOT=15 + +inherit flag-o-matic linux-info llvm pam python-single-r1 systemd tmpfiles + +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~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) + +MY_PV=${PV/_/} +S="${WORKDIR}/${PN}-${MY_PV}" + +SRC_URI="https://ftp.postgresql.org/pub/source/v${MY_PV}/postgresql-${MY_PV}.tar.bz2" + +LICENSE="POSTGRESQL GPL-2" +DESCRIPTION="PostgreSQL RDBMS" +HOMEPAGE="https://www.postgresql.org/" + +IUSE="debug doc icu kerberos ldap llvm lz4 nls pam + perl python +readline selinux +server systemd ssl static-libs tcl + threads uuid xml zlib zstd" + +REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" + +CDEPEND=" +>=app-eselect/eselect-postgresql-2.0 +acct-group/postgres +acct-user/postgres +sys-apps/less +virtual/libintl +icu? ( dev-libs/icu:= ) +kerberos? ( virtual/krb5 ) +ldap? ( net-nds/openldap:= ) +llvm? ( + =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= ) +tcl? ( >=dev-lang/tcl-8:0= ) +xml? ( dev-libs/libxml2 dev-libs/libxslt ) +zlib? ( sys-libs/zlib ) +zstd? ( app-arch/zstd ) +" + +# uuid flags -- depend on sys-apps/util-linux for Linux libcs, or if no +# supported libc in use depend on dev-libs/ossp-uuid. For BSD systems, +# the libc includes UUID functions. +UTIL_LINUX_LIBC=( elibc_{glibc,musl} ) + +nest_usedep() { + local front back + while [[ ${#} -gt 1 ]]; do + front+="${1}? ( " + back+=" )" + shift + done + echo "${front}${1}${back}" +} + +CDEPEND+=" +uuid? ( + ${UTIL_LINUX_LIBC[@]/%/? ( sys-apps/util-linux )} + $(nest_usedep ${UTIL_LINUX_LIBC[@]/#/!} dev-libs/ossp-uuid) +)" + +DEPEND="${CDEPEND} +sys-devel/bison +sys-devel/flex +nls? ( sys-devel/gettext ) +xml? ( virtual/pkgconfig ) +" + +RDEPEND="${CDEPEND} +selinux? ( sec-policy/selinux-postgresql ) +" + +pkg_setup() { + use llvm && llvm_pkg_setup + + use server && CONFIG_CHECK="~SYSVIPC" linux-info_pkg_setup + + use python && python-single-r1_pkg_setup +} + +src_prepare() { + # Set proper run directory + sed "s|\(PGSOCKET_DIR\s\+\)\"/tmp\"|\1\"${EPREFIX}/run/postgresql\"|" \ + -i src/include/pg_config_manual.h || die + + # Rely on $PATH being in the proper order so that the correct + # install program is used for modules utilizing PGXS in both + # hardened and non-hardened environments. (Bug #528786) + sed 's/@install_bin@/install -c/' -i src/Makefile.global.in || die + + use server || eapply "${FILESDIR}/${PN}-15_beta3-no-server.patch" + + if use pam ; then + sed "s/\(#define PGSQL_PAM_SERVICE \"postgresql\)/\1-${SLOT}/" \ + -i src/backend/libpq/auth.c || \ + die 'PGSQL_PAM_SERVICE rename failed.' + fi + + eapply_user +} + +src_configure() { + case ${CHOST} in + *-darwin*|*-solaris*) + use nls && append-libs intl + ;; + esac + + export LDFLAGS_SL="${LDFLAGS}" + export LDFLAGS_EX="${LDFLAGS}" + + local PO="${EPREFIX}" + + local i uuid_config="" + if use uuid; then + for i in ${UTIL_LINUX_LIBC[@]}; do + use ${i} && uuid_config="--with-uuid=e2fs" + done + [[ -z $uuid_config ]] && uuid_config="--with-uuid=ossp" + fi + + local myconf="\ + --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 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) \ + $(use_with readline) \ + $(use_with ssl openssl) \ + $(usex server "$(use_with systemd)" '--without-systemd') \ + $(use_with tcl) \ + ${uuid_config} \ + $(use_with xml libxml) \ + $(use_with xml libxslt) \ + $(use_with zlib) \ + $(use_with zstd) \ + $(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} +} + +src_compile() { + emake + emake -C contrib +} + +src_install() { + emake DESTDIR="${D}" install + emake DESTDIR="${D}" install -C contrib + + dodoc README HISTORY + + # man pages are already built, but if we have the target make them, + # they'll be generated from source before being installed so we + # manually install man pages. + # We use ${SLOT} instead of doman for postgresql.eselect + insinto /usr/share/postgresql-${SLOT}/man/ + 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 + rm "${ED}/usr/share/postgresql-${SLOT}/man/man1/${m}.1" + done + fi + docompress /usr/share/postgresql-${SLOT}/man/man{1,3,7} + + # Create slot specific man pages + local bn f mansec slotted_name + for mansec in 1 3 7 ; do + local rel_manpath="../../postgresql-${SLOT}/man/man${mansec}" + + mkdir -p "${ED}"/usr/share/man/man${mansec} || die "making man dir" + pushd "${ED}"/usr/share/man/man${mansec} > /dev/null || die "pushd failed" + + for f in "${ED}/usr/share/postgresql-${SLOT}/man/man${mansec}"/* ; do + bn=$(basename "${f}") + slotted_name=${bn%.${mansec}}${SLOT}.${mansec} + case ${bn} in + TABLE.7|WITH.7) + echo ".so ${rel_manpath}/SELECT.7" > ${slotted_name} + ;; + *) + echo ".so ${rel_manpath}/${bn}" > ${slotted_name} + ;; + esac + done + + popd > /dev/null + done + + insinto /etc/postgresql-${SLOT} + newins src/bin/psql/psqlrc.sample psqlrc + + # Don't delete libpg{port,common}.a (Bug #571046). They're always + # needed by extensions utilizing PGXS. + use static-libs || \ + 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}") + dosym "../$(get_libdir)/postgresql-${SLOT}/bin/${bn}" \ + "/usr/bin/${bn}${SLOT/.}" + done + + if use doc ; then + docinto html + dodoc doc/src/sgml/html/* + fi + + if use server; then + sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \ + "${FILESDIR}/${PN}.confd-9.3" | newconfd - ${PN}-${SLOT} + + sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \ + "${FILESDIR}/${PN}.init-9.3-r1" | newinitd - ${PN}-${SLOT} + + if use systemd; then + 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 + + use pam && pamd_mimic system-auth ${PN}-${SLOT} auth account session + + if use prefix ; then + keepdir /run/postgresql + fperms 1775 /run/postgresql + fi + fi +} + +pkg_postinst() { + use server && use systemd && tmpfiles_process ${PN}-${SLOT}.conf + postgresql-config update + + elog "If you need a global psqlrc-file, you can place it in:" + elog " ${EROOT}/etc/postgresql-${SLOT}/" + + if use server ; then + elog + elog "Gentoo specific documentation:" + elog "https://wiki.gentoo.org/wiki/PostgreSQL" + elog + elog "Official documentation:" + elog "https://www.postgresql.org/docs/${SLOT}/static/index.html" + elog + elog "The default location of the Unix-domain socket is:" + elog " ${EROOT}/run/postgresql/" + elog + elog "Before initializing the database, you may want to edit PG_INITDB_OPTS" + elog "so that it contains your preferred locale in:" + elog " ${EROOT}/etc/conf.d/postgresql-${SLOT}" + elog + 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 +} + +pkg_prerm() { + if use server && [[ -z ${REPLACED_BY_VERSION} ]] ; then + ewarn "Have you dumped and/or migrated the ${SLOT} database cluster?" + ewarn "\thttps://wiki.gentoo.org/wiki/PostgreSQL/QuickStart#Migrating_PostgreSQL" + + ebegin "Resuming removal in 10 seconds (Control-C to cancel)" + sleep 10 + eend 0 + fi +} + +pkg_postrm() { + postgresql-config update +} + +pkg_config() { + use server || die "USE flag 'server' not enabled. Nothing to configure." + + [[ -f "${EROOT}/etc/conf.d/postgresql-${SLOT}" ]] \ + && source "${EROOT}/etc/conf.d/postgresql-${SLOT}" + [[ -z "${PGDATA}" ]] && PGDATA="${EROOT}/etc/postgresql-${SLOT}/" + [[ -z "${DATA_DIR}" ]] \ + && DATA_DIR="${EROOT}/var/lib/postgresql/${SLOT}/data" + + # environment.bz2 may not contain the same locale as the current system + # locale. Unset and source from the current system locale. + if [ -f "${EROOT}/etc/env.d/02locale" ]; then + unset LANG + unset LC_CTYPE + unset LC_NUMERIC + unset LC_TIME + unset LC_COLLATE + unset LC_MONETARY + unset LC_MESSAGES + unset LC_ALL + source "${EROOT}/etc/env.d/02locale" + [ -n "${LANG}" ] && export LANG + [ -n "${LC_CTYPE}" ] && export LC_CTYPE + [ -n "${LC_NUMERIC}" ] && export LC_NUMERIC + [ -n "${LC_TIME}" ] && export LC_TIME + [ -n "${LC_COLLATE}" ] && export LC_COLLATE + [ -n "${LC_MONETARY}" ] && export LC_MONETARY + [ -n "${LC_MESSAGES}" ] && export LC_MESSAGES + [ -n "${LC_ALL}" ] && export LC_ALL + fi + + einfo "You can modify the paths and options passed to initdb by editing:" + einfo " ${EROOT}/etc/conf.d/postgresql-${SLOT}" + einfo + einfo "Information on options that can be passed to initdb are found at:" + einfo " https://www.postgresql.org/docs/${SLOT}/static/creating-cluster.html" + einfo " https://www.postgresql.org/docs/${SLOT}/static/app-initdb.html" + einfo + einfo "PG_INITDB_OPTS is currently set to:" + if [[ -z "${PG_INITDB_OPTS}" ]] ; then + einfo " (none)" + else + einfo " ${PG_INITDB_OPTS}" + fi + einfo + einfo "Configuration files will be installed to:" + einfo " ${PGDATA}" + einfo + einfo "The database cluster will be created in:" + einfo " ${DATA_DIR}" + einfo + + ebegin "Continuing initialization in 5 seconds (Control-C to cancel)" + sleep 5 + eend 0 + + if [ -n "$(ls -A ${DATA_DIR} 2> /dev/null)" ] ; then + eerror "The given directory, '${DATA_DIR}', is not empty." + eerror "Modify DATA_DIR to point to an empty directory." + die "${DATA_DIR} is not empty." + fi + + 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" + fi + + einfo "Initializing the database ..." + + if [[ ${EUID} == 0 ]] ; then + su - postgres -c "${EROOT}/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -D \"${DATA_DIR}\" ${PG_INITDB_OPTS}" + else + "${EROOT}"/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -U postgres -D "${DATA_DIR}" ${PG_INITDB_OPTS} + fi + + if [[ "${DATA_DIR%/}" != "${PGDATA%/}" ]] ; then + mv "${DATA_DIR%/}"/{pg_{hba,ident},postgresql}.conf "${PGDATA}" + ln -s "${PGDATA%/}"/{pg_{hba,ident},postgresql}.conf "${DATA_DIR%/}" + fi + + # unix_socket_directory has no effect in postgresql.conf as it's + # overridden in the initscript + sed '/^#unix_socket_directories/,+1d' -i "${PGDATA%/}"/postgresql.conf + + cat <<- EOF >> "${PGDATA%/}"/postgresql.conf + # This is here because of https://bugs.gentoo.org/show_bug.cgi?id=518522 + # On the off-chance that you might need to work with UTF-8 encoded + # characters in PL/Perl + plperl.on_init = 'use utf8; use re; package utf8; require "utf8_heavy.pl";' + EOF + + einfo "The autovacuum function, which was in contrib, has been moved to the main" + einfo "PostgreSQL functions starting with 8.1, and starting with 8.4 is now enabled" + einfo "by default. You can disable it in the cluster's:" + einfo " ${PGDATA%/}/postgresql.conf" + einfo + if ! use systemd; then + einfo "The PostgreSQL server, by default, will log events to:" + einfo " ${DATA_DIR%/}/postmaster.log" + einfo + fi + if use prefix ; then + einfo "The location of the configuration files have moved to:" + einfo " ${PGDATA}" + einfo "To start the server:" + einfo " pg_ctl start -D ${DATA_DIR} -o '-D ${PGDATA} --data-directory=${DATA_DIR}'" + einfo "To stop:" + einfo " pg_ctl stop -D ${DATA_DIR}" + einfo + einfo "Or move the configuration files back:" + einfo "mv ${PGDATA}*.conf ${DATA_DIR}" + elif use systemd; then + einfo "You should use the 'postgresql-${SLOT}.service' unit to run PostgreSQL" + einfo "instead of 'pg_ctl'." + else + einfo "You should use the '${EROOT}/etc/init.d/postgresql-${SLOT}' script to run PostgreSQL" + einfo "instead of 'pg_ctl'." + fi +} + +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 + use server || \ + ewarn 'Tests cannot be run without the "server" use flag enabled.' + [[ ${UID} -eq 0 ]] || \ + ewarn 'Tests cannot be run as root. Enable "userpriv" in FEATURES.' + + ewarn 'Skipping.' + fi +} diff --git a/dev-db/sqlmap/Manifest b/dev-db/sqlmap/Manifest index e5ea64389332..b543531e074f 100644 --- a/dev-db/sqlmap/Manifest +++ b/dev-db/sqlmap/Manifest @@ -1,9 +1,11 @@ AUX sqlmap.bash-completion 5757 BLAKE2B f602d99b6b0a30cf405b390eaef355f7a4b4fa4260f0a18fe09a0fa7530af131b75ffc25ca161898f2ed4a93ef9251c0c88cb1ad25d78d870fd2ff19225e0609 SHA512 5024cfb2274a2798fcc7d12e59693253732f66c1389aed36cc31fb8e40d03f7e9a713e93e24711185b5d2d82dd2ac91ec2b6cdc4929c5ca3245fcb4f502d327a DIST sqlmap-1.6.11.gh.tar.gz 7206836 BLAKE2B fd55093c873537d8607822d4bf84b6eed47a1a01e89750265c040f70a82faea2141096a611f66c46f025cfe2893cb0401e63034c80be6d736cc25246cd70e3fd SHA512 d773ab5e45e933ed64533e3ede0ec3e25543ecf9489fa72dc57558385ddb7c515e57952022b8c350fbeb347f6e935864e22c2cc51abee81740fd66478349e2ab DIST sqlmap-1.6.12.gh.tar.gz 7207020 BLAKE2B 9d26c5a5dce4bd2eb5ab38b307d211fefc27a2fe0784f7d91dade2a1eecabdbeec506eeb8bed4a85993873760bb050a77c16d08f01ecdaad1e82e56dbf17c12e SHA512 297cd31f055ee7ee41244f205e9cf71209a29d71e7002331a0d7eba04a151a238cef5c3c06710af516b86cdb95ae9bb72b63019830004a366008b798aad768aa +DIST sqlmap-1.7.2.gh.tar.gz 7208613 BLAKE2B 69c8f6ba75b884ef13a693857a864df973a7f38f796b3489adea3ef1fbfaf01a2181b0f22af124b8efa22c29d0f988fa3bb1050b33e84aa029bb97a6c2f0e949 SHA512 a26da178ba151d8c34574dee30f4247ec16002b719fbb0ecd56dc074c9806daa81ed0d414421641d98b354663ff1685596c5f276f6e4812dae266dbab84a8286 DIST sqlmap-1.7.gh.tar.gz 7207796 BLAKE2B 5a30cb111b0b6b8c37ff8b9ec37e3724b51b9a41cdd3d75d9665cfc6ceb4c9d11d642714cd327669015309b427184663c0ba248c4158378489bc5e0668a8cb7a SHA512 ca79239eec7b0e72a37de65471787800837b01c9567a8dae617bda5f4dde70c80a0d2e8f38373245bf43cf6feaca19e606dddd482f7c1ca7b18745ca107693f3 EBUILD sqlmap-1.6.11.ebuild 1332 BLAKE2B bd60bc7189d811d3e3b847750ec6e8981e04f495b98b601e6bb645ff5addb9e548bb8a064ef003540c367e9b262e529019255594409f71174c5588b11e2a3cf6 SHA512 6617f419f3591f314cf1fdd1bc44ee1c9de3580167c428a9484a686e8616fab489c2a579f94bf20ba87c5aa8437a943e0096a9541b4a1510f0e09768de9cabf5 EBUILD sqlmap-1.6.12.ebuild 1334 BLAKE2B 1fe71c950c682821addd140f103e63a519908b3f7edba932bb8191dff577e5c6d378cf17acddc8cbdd81aefff91102d916df6a7f76488164b17e9705ec64a721 SHA512 a6e6b2878f4b63bdb10c7e98937074cef23bedce9220a985ed4e021354ea213651334cc650640995c27edcdccbda184f0d5570edea3f6fe5945b63f0e94551da +EBUILD sqlmap-1.7.2.ebuild 1334 BLAKE2B 1fe71c950c682821addd140f103e63a519908b3f7edba932bb8191dff577e5c6d378cf17acddc8cbdd81aefff91102d916df6a7f76488164b17e9705ec64a721 SHA512 a6e6b2878f4b63bdb10c7e98937074cef23bedce9220a985ed4e021354ea213651334cc650640995c27edcdccbda184f0d5570edea3f6fe5945b63f0e94551da EBUILD sqlmap-1.7.ebuild 1334 BLAKE2B 1fe71c950c682821addd140f103e63a519908b3f7edba932bb8191dff577e5c6d378cf17acddc8cbdd81aefff91102d916df6a7f76488164b17e9705ec64a721 SHA512 a6e6b2878f4b63bdb10c7e98937074cef23bedce9220a985ed4e021354ea213651334cc650640995c27edcdccbda184f0d5570edea3f6fe5945b63f0e94551da EBUILD sqlmap-9999.ebuild 1334 BLAKE2B 1fe71c950c682821addd140f103e63a519908b3f7edba932bb8191dff577e5c6d378cf17acddc8cbdd81aefff91102d916df6a7f76488164b17e9705ec64a721 SHA512 a6e6b2878f4b63bdb10c7e98937074cef23bedce9220a985ed4e021354ea213651334cc650640995c27edcdccbda184f0d5570edea3f6fe5945b63f0e94551da MISC metadata.xml 847 BLAKE2B 31fdd4fd94a4b6ad8c775bbbc9cb48b5627f2f5944a7bdaf6c30f3559044dda6cd92be3b50c8baf462b1e2e4ea4aa905bbac88c616cbfbc833a4895a1944b0d6 SHA512 bddfbc5ce988bc1770a2ad1d6952d8ef44010c9e4ef789500f0408c7c5754960804f270bb6e24e4739852cdef07b3f22111ad9da453648730f045d0b2c3deea9 diff --git a/dev-db/sqlmap/sqlmap-1.7.2.ebuild b/dev-db/sqlmap/sqlmap-1.7.2.ebuild new file mode 100644 index 000000000000..550ec7d5d4b0 --- /dev/null +++ b/dev-db/sqlmap/sqlmap-1.7.2.ebuild @@ -0,0 +1,60 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{9..11} ) +PYTHON_REQ_USE="sqlite" + +inherit bash-completion-r1 python-single-r1 wrapper + +DESCRIPTION="An automatic SQL injection and database takeover tool" +HOMEPAGE="https://sqlmap.org/" + +if [[ ${PV} == 9999 ]] ; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/sqlmapproject/sqlmap" +else + SRC_URI="https://github.com/sqlmapproject/sqlmap/archive/refs/tags/${PV}.tar.gz -> ${P}.gh.tar.gz" + KEYWORDS="~amd64 ~x86" +fi + +# sqlmap (GPL-2+) +# ansitrm (BSD) +# beautifulsoup (BSD) +# bottle (MIT) +# chardet (LGPL-2.1+) +# clientform (BSD) +# colorama (BSD) +# fcrypt (BSD-2) +# identitywaf (MIT) +# keepalive (LGPL-2.1+) +# magic (MIT) +# multipartpost (LGPL-2.1+) +# ordereddict (MIT) +# prettyprint (BSD-2) +# pydes (public-domain) +# six (MIT) +# socks (BSD) +# termcolor (BSD) +# wininetpton (public-domain) +LICENSE="BSD BSD-2 GPL-2+ LGPL-2.1+ MIT public-domain" +SLOT="0" + +RDEPEND="${PYTHON_DEPS}" +REQUIRED_USE="${PYTHON_REQUIRED_USE}" + +DOCS=( doc/ README.md ) + +src_install () { + einstalldocs + + insinto /usr/share/${PN}/ + doins -r * + python_optimize "${ED}"/usr/share/${PN} + + make_wrapper ${PN} \ + "${EPYTHON} ${EPREFIX}/usr/share/${PN}/sqlmap.py" + + newbashcomp "${FILESDIR}"/sqlmap.bash-completion sqlmap +} -- cgit v1.2.3