diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2021-03-12 21:55:15 +0000 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2021-03-12 21:55:15 +0000 |
commit | 7218e1b46bceac05841e90472501742d905fb3fc (patch) | |
tree | 56fae051db521b8fce8014cbc8b11484885b14b3 /dev-db | |
parent | 6d691ad5b6239929063441bbd14c489e92e7396e (diff) |
gentoo resync : 12.03.2021
Diffstat (limited to 'dev-db')
60 files changed, 2485 insertions, 948 deletions
diff --git a/dev-db/4store/4store-1.1.5-r1.ebuild b/dev-db/4store/4store-1.1.5-r1.ebuild deleted file mode 100644 index bc3835b91931..000000000000 --- a/dev-db/4store/4store-1.1.5-r1.ebuild +++ /dev/null @@ -1,62 +0,0 @@ -# Copyright 1999-2018 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI="5" - -inherit eutils user - -DESCRIPTION="4store is an efficient, scalable and stable RDF database" -HOMEPAGE="https://4store.github.io/" -MY_P="${PN}-v${PV}" -SRC_URI="https://4store.danielknoell.de/download/4store-v${PV}.tar.gz" - -LICENSE="GPL-3" -SLOT="0" -KEYWORDS="~amd64 ~x86" -IUSE="" - -# < http://4store.org/trac/wiki/Dependencies -DEPEND="media-libs/raptor - >=dev-libs/rasqal-0.9.18 - dev-libs/glib - dev-libs/libxml2 - dev-libs/libpcre - sys-libs/readline - sys-libs/ncurses - dev-libs/expat - sys-libs/zlib" - -RDEPEND="${DEPEND}" -S="${WORKDIR}/${MY_P}" - -pkg_setup() { - enewgroup fourstore - enewuser fourstore -1 -1 /var/lib/4store fourstore -} - -src_install() { - - # patch the Makefiles to use /usr/ instead of /usr/local/ - find . -name "Makefile" -execdir sed -e "s#/usr/local/#/usr/#" -i {} \; - - MAKEOPTS="-j1" emake DESTDIR="${D}" install - - dodir /var/log/4store - fowners fourstore:fourstore \ - /var/lib/4store \ - /var/log/4store - - # fix 1777 - fperms 755 /var/lib/4store - - # fix 755 - fperms 644 \ - /usr/share/man/man1/4s-query.1 \ - /usr/share/man/man1/4s-backend-setup.1 \ - /usr/share/man/man1/4s-import.1 \ - /usr/share/man/man1/4s-cluster-info.1 \ - /usr/share/man/man1/4s-cluster-start.1 \ - /usr/share/man/man1/4s-cluster-create.1 \ - /usr/share/man/man1/4s-cluster-stop.1 \ - /usr/share/man/man1/4s-cluster-destroy.1 -} diff --git a/dev-db/4store/Manifest b/dev-db/4store/Manifest deleted file mode 100644 index 34a4b2aa6924..000000000000 --- a/dev-db/4store/Manifest +++ /dev/null @@ -1,3 +0,0 @@ -DIST 4store-v1.1.5.tar.gz 5610204 BLAKE2B fefcad237a587e83bc58b8f89e9c40cbc19ba9e2b784ca2d96b7a502c79068bf60fa78d7f273589df4e110b3f14a77f9d901479902b640454ac1f0dfe6e028e7 SHA512 42a7431c7853e1b06a76ed15c205eebd7b334516c14e7dcfeddb2f9249f30f879f8256a1b454be71f79e71205b3efa95efab726fd88b4d455bb0fc4a8092bcf4 -EBUILD 4store-1.1.5-r1.ebuild 1442 BLAKE2B e1e1ece74d5eed879b4eaee82197ca02f05970f753a3c2ac26f74493910e7b9f7e1427352537848bd602f6c203abc143bb368220d9191e9eed50acaf7ee4ff30 SHA512 57a351dfca0ec636034bb9d7c9959da149c6093a4275b54bdd13e1eaf933d242088b281def4922c66e2c0afc96313cf95fd62c44a6de85c3a1bd84c460dfcc09 -MISC metadata.xml 247 BLAKE2B 5a20af3c9732ef7dba68131a08988652f5c93a6d186a82c4deb1bb9c06dc3ae73152a0d241cc346637f7b11caf4676da43301ba596c67b66669535e71db0b03e SHA512 29cf52c16b0cce69899d9c2da8acd9144b7d760442aa323b854dceadb42459e009545193b1df7911ac2241b59f4819b4a6bb1d206d6f57953f770031433bb6b7 diff --git a/dev-db/4store/metadata.xml b/dev-db/4store/metadata.xml deleted file mode 100644 index 40aa45df2b01..000000000000 --- a/dev-db/4store/metadata.xml +++ /dev/null @@ -1,8 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> -<pkgmetadata> - <maintainer type="person"> - <email>patrick@gentoo.org</email> - <name>Patrick Lauer</name> - </maintainer> -</pkgmetadata> diff --git a/dev-db/Manifest.gz b/dev-db/Manifest.gz Binary files differindex 326cf11dc3c9..caaeb64b2da9 100644 --- a/dev-db/Manifest.gz +++ b/dev-db/Manifest.gz diff --git a/dev-db/citus/Manifest b/dev-db/citus/Manifest index 43c15284414c..2991d0dc4536 100644 --- a/dev-db/citus/Manifest +++ b/dev-db/citus/Manifest @@ -1,7 +1,9 @@ DIST citus-10.0.1.tar.gz 5133492 BLAKE2B d0b95d00bb374613eb9514544e19071bfd28f5f30b02352b644bd4100a50f337dfc132a15d4193f4c8a369beec6ee783eafa2d032e7ac074667d3f0de6617d97 SHA512 31c979bd4baec987d709a5865e78296584104cb25671b986c5f5545cb3dda64cd2663c1274efc72c35c523ce9aefed598adf4df8aa96e790a8772ebb09233ae7 +DIST citus-10.0.2.tar.gz 5154816 BLAKE2B ace68ec3dcce3e2e9d872b85a864a49f026ba2c0c8b0919bb057b60921094a922f6fed8bc6482b3c31dad396550348d51a514aff0d877d851b871bb5b97773f3 SHA512 3f831c1efd1a54b9dee587f64eae2466691f8d8316643e459d00219c8ca710ea9d12aeac4f0e2e01cadc3dee29f2d8e59f9757d794e9b0bedfbe6ae107815957 DIST citus-9.5.2.tar.gz 4714211 BLAKE2B b8e9d862b5ea8cb77202632ddac1b20d521b82d512c424f093e41bca146630197fd57c6986660a7d3fd98b67fefac0255184bc83ac1c6ef4242b67bda28cbe69 SHA512 db114053419f9b268ad45a3bbebc58ba5aec0925737840c4389c5ebf23bef9a26ce8c132a4a88cf06fa54cab926172cc283a12acc2c09bd888b55a9a4c0472a3 DIST citus-9.5.4.tar.gz 4718209 BLAKE2B 706726c8ca6ffb38321e3b91395924e9b778c106096393992080f511338a7ae559f94336bb015508900f85290bd17cda8ef9ce6dbdc2e254f3daf7a09e243bf6 SHA512 3d5e956354e094811675b646a5baf75c26a3ac593c56ac5b6c4c711671002f78fb98a1a4879c4cc967fc4381ae971311f5d73ddadc78a39b66c3108978d677b6 EBUILD citus-10.0.1.ebuild 576 BLAKE2B abd2e1f362db53d55bbbfc8bef3e1d3d26fea6234685f353e72df5ea8584118015966f6a11f238ca8b0db91f1eb916e0a9f00a082358058bbf2fcbe338f8b99d SHA512 c2bf7eea0716ead448f7b9a3b8c3301492b6afcc59dd8f0101c9400423d9fea2de8aa4ec90452385486ce47ceb7955f7f93fb03cdb24a8094eb46110b374f1ea +EBUILD citus-10.0.2.ebuild 576 BLAKE2B abd2e1f362db53d55bbbfc8bef3e1d3d26fea6234685f353e72df5ea8584118015966f6a11f238ca8b0db91f1eb916e0a9f00a082358058bbf2fcbe338f8b99d SHA512 c2bf7eea0716ead448f7b9a3b8c3301492b6afcc59dd8f0101c9400423d9fea2de8aa4ec90452385486ce47ceb7955f7f93fb03cdb24a8094eb46110b374f1ea EBUILD citus-9.5.2.ebuild 545 BLAKE2B a55e994a95d3dc45985461843c8b69372835fa47cd1721cd580c9bcfda147ff5a5d69336b2e34cb487d92bebca583fe007255e0895cb6a253b0ab0c0c53d1df3 SHA512 4d38ab59fda3a078faabd49e22f36d1f9d449e730f82fd71e63ddce161c7af402edf7dc5a67d3aa08eebf0076d7f829ede2f2959a8b82bbbd1c0a91d7b1cc893 EBUILD citus-9.5.4.ebuild 576 BLAKE2B abd2e1f362db53d55bbbfc8bef3e1d3d26fea6234685f353e72df5ea8584118015966f6a11f238ca8b0db91f1eb916e0a9f00a082358058bbf2fcbe338f8b99d SHA512 c2bf7eea0716ead448f7b9a3b8c3301492b6afcc59dd8f0101c9400423d9fea2de8aa4ec90452385486ce47ceb7955f7f93fb03cdb24a8094eb46110b374f1ea MISC metadata.xml 280 BLAKE2B 75bfaba3095bd67dfa80654885579e51053fd130ae4e3ad61ac75192eebad9fe8d08cbdf63773dad3837ef2805e0594d0823655966fde8876ba5919e01f0e698 SHA512 efb5fb6652ac8cd75fff4eea8b2b044a2c9201cce2faf3bbe13a97565d150e64f9ba0dd8bb691a44a1b6726455306ea8b6c1b121678a721a82e7ea8b6589c94f diff --git a/dev-db/citus/citus-10.0.2.ebuild b/dev-db/citus/citus-10.0.2.ebuild new file mode 100644 index 000000000000..4bb39ab5f008 --- /dev/null +++ b/dev-db/citus/citus-10.0.2.ebuild @@ -0,0 +1,31 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +POSTGRES_COMPAT=( 11 12 13 ) + +inherit postgres-multi + +DESCRIPTION="Open-source postgresql extension for clustering/multi-node setups" +HOMEPAGE="https://www.citusdata.com/" +SRC_URI="https://github.com/citusdata/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" + +IUSE="" +LICENSE="POSTGRESQL AGPL-3" + +KEYWORDS="~amd64" + +SLOT=0 + +RESTRICT="test" + +DEPEND="${POSTGRES_DEP} + app-arch/lz4 + app-arch/zstd + " +RDEPEND="${DEPEND}" + +src_configure() { + postgres-multi_foreach econf +} diff --git a/dev-db/etcd/Manifest b/dev-db/etcd/Manifest index 2f4b8270c394..1fc51437f9ad 100644 --- a/dev-db/etcd/Manifest +++ b/dev-db/etcd/Manifest @@ -232,9 +232,9 @@ DIST honnef.co%2Fgo%2Ftools%2F@v%2Fv0.0.0-20190102054323-c2f93a96b099.mod 26 BLA DIST honnef.co%2Fgo%2Ftools%2F@v%2Fv0.0.0-20190523083050-ea95bdfd59fc.mod 26 BLAKE2B db6cc87a17bed88b955e6b36a17568930239c94a969211b02c2d5acc70386fbea63ac44365a0d3241e900125bd64644d698d8f1bdcabc3e6cf99c47259c63df5 SHA512 d00ae74b24e7fb3ff351ff68b88e59636153bbcf92b36e81e91556e3e75a7ccfb08ce471f757f92fd7612378944de3d7309c73923812e2df6a26b74e999ca9ce DIST sigs.k8s.io%2Fyaml%2F@v%2Fv1.1.0.mod 24 BLAKE2B d33080dbc62b185d029eb43f75d66328dbfa7c463a3117b3efd5419ab8e1e52cc6f5d5a288d553421025c785ec6948b3aa68588cae19bd325f6acc0d043bb5fb SHA512 78f6402daccb04510f4ef35ee457ee13e4f447fba8e6aa33b4d32aa666e925861bf3b3f22c5ba9573871ec7e830f99e4caae0969724a54eadf40e6a7ed7931a0 DIST sigs.k8s.io%2Fyaml%2F@v%2Fv1.1.0.zip 18120 BLAKE2B 244d3089322264e2fab71fa27e6e49396f724026674970eac309bb027d7bbc7030e9780fbc1c3803b20d893b8621f4e24d5c7824e0315440c14ceb850ec391f9 SHA512 c6e23fe09971b82d52e14d67e68458d3884b0f1d56a7fa9131fe4dafbfa971dd1f134f2d9eeab2599eae02c96132502036fd6b37eda92cd62f3129de6e04e7c3 -EBUILD etcd-3.3.23.ebuild 2306 BLAKE2B 66394befa1bfd85fdc9069640022fdb447117a530d346e2ab8b7babaaa152b9b1227f5c8f9cac3c569b744caa3f55cf82488aac5d2f4dec04350b350af54bc3d SHA512 5fb2e4690541975147e32643aff2956caced1300b07f6bb69e14038ebe97ed5e56f3f55fae84cdc71c7225311028986eeee1917c5777472165cd67e2363cd9ee -EBUILD etcd-3.3.24.ebuild 2021 BLAKE2B 710c9d1a96f1d12214ae0d03cfb1bbedb49311eb24827e47d4a9b82b93efa49213b016e056efb819148154bf3cd22160231b3edbc316af4693505c0995b168be SHA512 58ec157dcbf6aac4acea3e9216df0d2133e466aff815701c1d47cf6b946419e5ed3d98bf4ac0cf5938063285c157f58b70da383c9a83114009a172aa75e1b492 -EBUILD etcd-3.4.10.ebuild 2021 BLAKE2B 9e3fea4ff53b32f674f25339b40cc2f34b6f9ab738f15277776639d3279f1e1b1257c9af1ac7d175ee452f03ba4a5773e2214fe767b1d90023744149920edc33 SHA512 02ac09ae25b0d9c88d6d7393f10560b7c6dcbcf0893ec84f443bf4581dc7f5938f66896a2cc6f7566242488712e04ff3120899b36cf45215ea49c83bd161fe55 -EBUILD etcd-3.4.11.ebuild 2021 BLAKE2B 717e742acfdd33589971ac2ff7ea7101f31806bf55277f7e34a4288887678b4be943aa8d05a97e36e357a2a0c8354a78812791ce614a80eb1af8f4d21d413b69 SHA512 e4aada179c51082594c974761f219f95aa01c8c2bfc8c45272ca5983d13dca1765457dbe5140f1259f2cbc0a0d75d3266d6b2b1d8d26140f727ee39cc41fcbec -EBUILD etcd-3.4.14.ebuild 13586 BLAKE2B 36f396a4909d6b080c5f60c54132b79b50a855e96765d12f0b65e247d637a8179abd2d3814c6e6bb0591ac35bd61978f3fe74aa7bcd75b6cb6571dc07eecad43 SHA512 5a73a8452f55110350620d6b70683cedcb190c261a866cf93a2602f4a27d2429268c3bf516dd4a6654080535db7d3b3a948d11c50abfae47adebad3bc16f229e +EBUILD etcd-3.3.23.ebuild 2306 BLAKE2B a6eeb3fa9e8f6f0d240b44c115994f5e93e8f1ee562e88ba0307156336635f597d1b58c242577baf1b50f57bb8ab77ac33ae80c04941c4538686afebbe332d3d SHA512 60d7f589f92afb66801e4ea30006fde9f6976587595cb6ec3de3351f0733bb9b40c980f3b97d78931e314d0f4c93c2206358ad28072d1beeac87d2534a5ea9a7 +EBUILD etcd-3.3.24.ebuild 2021 BLAKE2B 246302b4346900e1a08f35c10e671930d9488b6e254f18f5746fa2e3552e007d165bef4dd65ed550e4778c612dddb0e7299e64261e1bd5922abeb44272600ef3 SHA512 006c625c6dacca95a5026ca882c5201de65c275910df497ad6663729836910a568be2ec7001f5247ef5d2cb344608e3c2dcb6703b42c84aa326a6e9102ce59ed +EBUILD etcd-3.4.10.ebuild 2021 BLAKE2B c8bef5978243cb9b0017c7b114fa9839b406ec96de8f3cff5748768c4290ffd8670c4b67905de48d298c3b557dd640a3f33be6c4ca73ae84eb63afbef6444100 SHA512 a3399faef05a679736fef259b91fa06cbea44cfdb4f3acc86466b1aabc645014118b142cba993c7400c81a280059ec33e5b5bc32bfcf397cb754a5d3fe5debf7 +EBUILD etcd-3.4.11.ebuild 2021 BLAKE2B 4cc8a8b9c5a357bc6a5ff1a6f85a10e861d100db43cd30e02548f8d9eb8ed02c21002469a2db7efb528715a7b3650367fa47aadd9b334a4dced3001ea1861770 SHA512 759c0add461da1899382161a07ef1dc0da841a037c937a061a72ea381aa71de41b917053b9765884917c2578f67dcf8bf23016e01cbf8074d4112982ef58513f +EBUILD etcd-3.4.14.ebuild 13586 BLAKE2B 548c156b5872210329929dfb3ac60830a99dd7555fb3360fb40e2d162e49441bda354ae762bbaa7634785aff7e28d4a9e70612baaf690e3ca83ec5c5c64114e8 SHA512 c37e313703e6bfd8c295a6acf7d6a507cbd3d699b3c9e5744f3b884c400e430fad031946989676c649147149dbdfa6809e24c2c142c75016cfcd6ef85fbe57d8 MISC metadata.xml 573 BLAKE2B 48714fc34469739cf1fea338b8e686726692ee45be8f3b841e747cdb9f5f13f5e2964ced9423de8a2cde26fef9a0b9ee24e42c8ad6db43a4151194ee4b115029 SHA512 8162b96dd5984554115e7c889d3c6c015a5c07dc553baea6fd1d6263bde02b20bf0d9a411c93f06b537698958994f9d975782c8770cb33793776bf5fb7f999b7 diff --git a/dev-db/etcd/etcd-3.3.23.ebuild b/dev-db/etcd/etcd-3.3.23.ebuild index d767c318c0c5..8381d1a4fae4 100644 --- a/dev-db/etcd/etcd-3.3.23.ebuild +++ b/dev-db/etcd/etcd-3.3.23.ebuild @@ -1,8 +1,8 @@ -# Copyright 1999-2020 Gentoo Authors +# Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=7 -inherit go-module systemd +inherit go-module systemd tmpfiles GIT_COMMIT=4873f5516 MY_PV="${PV/_rc/-rc.}" @@ -68,7 +68,7 @@ src_install() { dobin bin/etcd dodoc README.md systemd_dounit "${FILESDIR}/${PN}.service" - systemd_newtmpfilesd "${FILESDIR}/${PN}.tmpfiles.d.conf" ${PN}.conf + newtmpfiles "${FILESDIR}/${PN}.tmpfiles.d.conf" ${PN}.conf newinitd "${FILESDIR}"/${PN}.initd ${PN} newconfd "${FILESDIR}"/${PN}.confd ${PN} insinto /etc/logrotate.d diff --git a/dev-db/etcd/etcd-3.3.24.ebuild b/dev-db/etcd/etcd-3.3.24.ebuild index ebb677c1e00e..d42802d3d244 100644 --- a/dev-db/etcd/etcd-3.3.24.ebuild +++ b/dev-db/etcd/etcd-3.3.24.ebuild @@ -1,8 +1,8 @@ -# Copyright 1999-2020 Gentoo Authors +# Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=7 -inherit go-module systemd +inherit go-module systemd tmpfiles GIT_COMMIT=bdd57848d MY_PV="${PV/_rc/-rc.}" @@ -61,7 +61,7 @@ src_install() { dobin bin/etcd dodoc README.md systemd_dounit "${FILESDIR}/${PN}.service" - systemd_newtmpfilesd "${FILESDIR}/${PN}.tmpfiles.d.conf" ${PN}.conf + newtmpfiles "${FILESDIR}/${PN}.tmpfiles.d.conf" ${PN}.conf newinitd "${FILESDIR}"/${PN}.initd ${PN} newconfd "${FILESDIR}"/${PN}.confd ${PN} insinto /etc/logrotate.d diff --git a/dev-db/etcd/etcd-3.4.10.ebuild b/dev-db/etcd/etcd-3.4.10.ebuild index 55d46653132b..4cc5cd41c5e2 100644 --- a/dev-db/etcd/etcd-3.4.10.ebuild +++ b/dev-db/etcd/etcd-3.4.10.ebuild @@ -1,8 +1,8 @@ -# Copyright 1999-2020 Gentoo Authors +# Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=7 -inherit go-module systemd +inherit go-module systemd tmpfiles GIT_COMMIT=18dfb9cca MY_PV="${PV/_rc/-rc.}" @@ -61,7 +61,7 @@ src_install() { dobin bin/etcd dodoc README.md systemd_dounit "${FILESDIR}/${PN}.service" - systemd_newtmpfilesd "${FILESDIR}/${PN}.tmpfiles.d.conf" ${PN}.conf + newtmpfiles "${FILESDIR}/${PN}.tmpfiles.d.conf" ${PN}.conf newinitd "${FILESDIR}"/${PN}.initd ${PN} newconfd "${FILESDIR}"/${PN}.confd ${PN} insinto /etc/logrotate.d diff --git a/dev-db/etcd/etcd-3.4.11.ebuild b/dev-db/etcd/etcd-3.4.11.ebuild index 0c3cc8f2f4b1..bb9e9a16f55c 100644 --- a/dev-db/etcd/etcd-3.4.11.ebuild +++ b/dev-db/etcd/etcd-3.4.11.ebuild @@ -1,8 +1,8 @@ -# Copyright 1999-2020 Gentoo Authors +# Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=7 -inherit go-module systemd +inherit go-module systemd tmpfiles GIT_COMMIT=e71e0c5c8 MY_PV="${PV/_rc/-rc.}" @@ -61,7 +61,7 @@ src_install() { dobin bin/etcd dodoc README.md systemd_dounit "${FILESDIR}/${PN}.service" - systemd_newtmpfilesd "${FILESDIR}/${PN}.tmpfiles.d.conf" ${PN}.conf + newtmpfiles "${FILESDIR}/${PN}.tmpfiles.d.conf" ${PN}.conf newinitd "${FILESDIR}"/${PN}.initd ${PN} newconfd "${FILESDIR}"/${PN}.confd ${PN} insinto /etc/logrotate.d diff --git a/dev-db/etcd/etcd-3.4.14.ebuild b/dev-db/etcd/etcd-3.4.14.ebuild index 39f5321f2333..63f03f9e8d4f 100644 --- a/dev-db/etcd/etcd-3.4.14.ebuild +++ b/dev-db/etcd/etcd-3.4.14.ebuild @@ -1,8 +1,8 @@ -# Copyright 1999-2020 Gentoo Authors +# Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=7 -inherit go-module systemd +inherit go-module systemd tmpfiles GIT_COMMIT=8a03d2e96 MY_PV="${PV/_rc/-rc.}" @@ -290,7 +290,7 @@ src_install() { dobin bin/etcd dodoc README.md systemd_dounit "${FILESDIR}/${PN}.service" - systemd_newtmpfilesd "${FILESDIR}/${PN}.tmpfiles.d.conf" ${PN}.conf + newtmpfiles "${FILESDIR}/${PN}.tmpfiles.d.conf" ${PN}.conf newinitd "${FILESDIR}"/${PN}.initd ${PN} newconfd "${FILESDIR}"/${PN}.confd ${PN} insinto /etc/logrotate.d diff --git a/dev-db/kyotocabinet/Manifest b/dev-db/kyotocabinet/Manifest index 22b0d9dae036..1f686d91fe04 100644 --- a/dev-db/kyotocabinet/Manifest +++ b/dev-db/kyotocabinet/Manifest @@ -2,5 +2,5 @@ AUX fix_configure-1.2.62.patch 1668 BLAKE2B 5a572607b5c848c3616fcccac1e936f9218a AUX kyotocabinet-1.2.76-configure-8-byte-atomics.patch 1250 BLAKE2B 882c4897a40609bbfa1183cb97e80e5ed6d95d0035c30c836e3f252962db822249f8b48934923e816a720d3cbf64a6f47f80cef77528216f3171f332ca3a350b SHA512 4833cecd6c67515e0c59d7161be6891df290ae816593de1bf35718e9c9d8691db221bec5078c5dc7cf56e55b0086d61c415e148a7ee63b2a47ac4885f6d0960e AUX kyotocabinet-1.2.76-flags.patch 894 BLAKE2B 50efb4b21f0101a942eb758213cf703460056a951617298057567d08b116c7e0a631d631eace992ff447bed5b74940d2b60a8adad373cb77fe42b8c40bfcc9fd SHA512 60a15c54994a5f338cf168feb831d858fdd2cadd16ea0c8001ef652e8502797f5920d3fed0a3ec4a6a2d817381b4690410878a18c7c859df34e26b033f48fe03 DIST kyotocabinet-1.2.77.tar.gz 949326 BLAKE2B faacde57e8c7fed3fb232ea6fd12b668f2d2ee352cd357d5e16e0d1740cd8f73e223964249efeae50f3ea5d0672117b2410b91ba557ebe1ac7ba4075ac28deab SHA512 f38794c11faa3f4b64097a2e314307e1a6b75ddc495103647ebe52786a689336754496e7083697417ea90436e7fad681f16440975abec9ae917874aa25153e0f -EBUILD kyotocabinet-1.2.77.ebuild 1518 BLAKE2B 1dd67c3e39cbcad976424822f3b3acccf7296772ad0dda5973a741708c244b1e16b5f6b76dee3c8207c986091812c50d1ca46308ea1eb8bede2f65b7b823f346 SHA512 734aadf20ca0d78ba63968626b676c7d89ea620e7bb54d65b3da6d011505ebf4b9e072d7f339e5da31d70d5ccc00c5fdf283a04afba76bccf62c75d90f291fba +EBUILD kyotocabinet-1.2.77.ebuild 1468 BLAKE2B de111d3501de76bf95ef8aa3f425e48fa5641fd0a6d8531bd2b9c6392d0d28c79aa59e745f230291215c8ec415f1a10ec46268a1ef7a169824f8817c5271c89e SHA512 d7c1e2db09eb594f708423a91729a61f93b920147ee137f3422fc48913596cc791cd4fa4ba0e4385876461daaa87232753385a949fd81511d27d645d8fcc9866 MISC metadata.xml 167 BLAKE2B e4dadf27fd344484f2bccb5b904909c89aac568c32e5b3c44bdf139eacefd4b4fae74419f503d2b7da0dccc1b68ba05d777d11292c0f89270d1ac5c9c703e8ca SHA512 7c8decb24ee3a850e38186cf3c7f8933a28017426806870ad6ef9ceb2533be147a2681fc789b535a81cb528af8c29d90d3006e4f250aee23bd7dea4561294e33 diff --git a/dev-db/kyotocabinet/kyotocabinet-1.2.77.ebuild b/dev-db/kyotocabinet/kyotocabinet-1.2.77.ebuild index 9ec32d27948a..df0ceeaceb78 100644 --- a/dev-db/kyotocabinet/kyotocabinet-1.2.77.ebuild +++ b/dev-db/kyotocabinet/kyotocabinet-1.2.77.ebuild @@ -1,7 +1,7 @@ # Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI="7" +EAPI=7 inherit autotools toolchain-funcs @@ -57,13 +57,12 @@ src_install() { find "${ED}" -name '*.a' -delete || die fi - if use examples; then - insinto /usr/share/${PF}/example - doins example/* + if use doc; then + dodoc -r doc/* fi - if use doc; then - insinto /usr/share/doc/${PF} - doins -r doc/* + if use examples; then + docinto example + dodoc example/* fi } diff --git a/dev-db/libiodbc/Manifest b/dev-db/libiodbc/Manifest index 3599e7979fa8..bde55623c1bc 100644 --- a/dev-db/libiodbc/Manifest +++ b/dev-db/libiodbc/Manifest @@ -1,8 +1,10 @@ -AUX fix-runpaths-r1.patch 438 BLAKE2B 0089f678dea14f4f1f3cf0e6fdaa9863b2659b3a93208404fbf29939a7d797cbac75a9f128d625fd4a8691807507bc69e42894bae19cacc680d202616d0e3de1 SHA512 2c64890a2e61f7fd3c6c053a35308b57eb7c50bf070d4833bd0b8a4182d3581cfb358ee315cc26cb26d6b11941d4e9265b38f59732f7b679d3b2d23d0dda0035 -AUX libiodbc-3.52.12-multilib.patch 934 BLAKE2B e98b6bb650605154c251752d2208237a45dbc794ca141a292628192765020b33a3d6b331194d9f204657d06e590446b2809a91ad24944221005afae557c1d361 SHA512 718f564371d962283525f946b60b9028e66b3477d4bf20fd6f5363d08635c2d2603d9de5fb157e6039c124324578e5367e985d83623a3b1cd4dd0de7605f1911 -AUX libiodbc-3.52.7-debian_bug501100.patch 408 BLAKE2B 6fb1e24cb2d4f32eca6cde6d50bf9ce77e6a55e3e09c491f971863067b402e7f77bc5238750062094b4092d172909ff592fa36c31e50db122bb85bdfa0eaaaeb SHA512 e36a2b936b36af3cbdf125725628a2c5ca1f4d246c7b7eaf8c08a97e96fa25915b2b03bdd33f7a1c42b08d54f89174edbcb7f1ebaaa1a2e9777ff33023ac2575 -AUX libiodbc-3.52.7-debian_bug508480.patch 577 BLAKE2B 0d605b754b6b4b970a15a236be6eebdc6e24dcb1231cacf10e859b22eb577ac49b26ffcdae437cf05de26850de33ed10cfbbffb9b54ab79fada2525a6de939a3 SHA512 2e3a0ab2284b0b302e2eb5d27e1cc952810c5ec2d123491047cda15d1e0b2aa651a1d3357fb330be24fa72ec855a89143eb88bd4b87ce079b469b6ab8647ce74 -AUX libiodbc-3.52.7-unicode_includes.patch 432 BLAKE2B 3f9c833c223fb5d5dd94530501b5403732b88b420a6cf6a0453734d1cacd9eebdb0e69d7cf265b4ce2da4baa2faad32b467beffdf76d6c339316323b2ba9237c SHA512 b4bd56e88199ed06ec7ce64bbf53c3d792c501cdadee44a1c52d95336c36e93c2379d312b14c576a138210f2cf277e895ded18e80db4e5bb3f664ccb5695a305 -DIST libiodbc-3.52.12.zip 1248801 BLAKE2B e19b740904a332df7d7f510a6ef7414121e99bcbce0b89db94f4b7a09c0de09f39a8f8abdbec40029b79140fab6e1e1d319ad146cc7d74872a7fe69852a3f710 SHA512 240f6f7dc406fcc6688499bac8800b81380d32e8443e4f098875fabc649da1b86567b67d2259206be64cced8537d3171040d16be39845b9009cd90be62ae97db -EBUILD libiodbc-3.52.12.ebuild 1635 BLAKE2B 33e84b45f1e80eb45b47ba4b0cea63ab9131c9db0bd5100feb837542386322a4a25c77e9f9f958436288e717a81ad77500135bbe520583d1b5a158ac0bb11a02 SHA512 c72beda1b707bc40a80cd0b3a13f9d7f49689c884f9c1e2188cbc0f13698488eb8a8b62c1ba98461613c9a00b3824377ed858cffc2cfb51bf82821961875448f +AUX fix-runpaths-r1.patch 362 BLAKE2B 25ae148f9170b1c8d2a112c84d231611e6e042775daceaeca8c0df0a3bbbc586fb6c668a3cd53f280bbfeb091823d77157ec17b53f20e1c3abee2802eefe07ad SHA512 36baa70ad2a33145b30cc3a9841fed9c81a5aa2d6a6c8aa7037aa6b859abdc5b45b7bfbcaeac5ebe7480589c205b7e9fc3863e7b81711e9c09b38d311345cbb3 +AUX libiodbc-3.52.12-multilib.patch 849 BLAKE2B acf21f410e8f187cdd221de8f4c6099e816a69177f71364f8e7575b45ee135db19cf604bf793a995e0f08f6f5452da163243c1f592d1ae043ef27ccb3ca47163 SHA512 adb175b2f5f1221bd2e55b598a7b5a72529f09e04f25fd14471ac84e207a5030a153e0a2b397259e20fa2cd1efadde6a4efa83fc9b9959f89e688ae6dd71b7ad +AUX libiodbc-3.52.7-debian_bug501100.patch 190 BLAKE2B 9543a5d3a1772b12b76d7a5ebcd01437de37a9d8c26189b2c4eae8e69fa16d9ba1239aecdf8be616cd204e7bc3ba66a296aeb006ecd7c1e771d8a491ad40f49e SHA512 57f0f6f1cc6f513daabf0e57db6d2ca1445e19615987d5714c3b5e7ee9672ce782da17711d1051660042a6e062e6b827c59b6dc6c8ba3e4799dfdaaa9ce269ed +AUX libiodbc-3.52.7-debian_bug508480.patch 358 BLAKE2B d2fcd5ebed2f71f1e679eaf4973b45ff98cc6863abf034ce8d752546fdfef5287e4d198317f55798e10bfb5e6b788cd946ac74a08733da4a0997679534fb05b7 SHA512 b9da90f0deffbfd8ca35a1583f35689d2f04fd83817c9884b0566a78a95a2407bc478455402d68debbce298149ca736453ada1010ad00dac4f524bf32b3bc6e0 +AUX libiodbc-3.52.7-unicode_includes.patch 213 BLAKE2B cc4c0abb2d694497cb38bac5dc746a70ffb8c0b904133a128c2328bcbe11ff2e5926b1cbb330c8b017ec39face9925b646dc655fde5554bf22118572242f2a76 SHA512 56d370dfd916c74f4bb66db4e13378fc3b6978a53921c831c0c56bd8e803773fd2e327ac43b69ce533acdd023cc042f1748159bd82a8cfe2dedb0f98fb17b496 +DIST libiodbc-3.52.12.tar.gz 760155 BLAKE2B ab1a66b34c55f5ebd72c76c09bf356c9e009666634f7f7516c39653840051bd7ae399b54232284e9cfeae37b752eae761d8f749e48e3184857ba59177016e03a SHA512 992a4d0a36651fe55178a4834160901381ea230a0e1671f61e1c5dd17708d2b649823313b97d5954e1656dc2213382361cb5f1eaf2f28f3b1ac55fd9f7aac535 +DIST libiodbc-3.52.14.tar.gz 800285 BLAKE2B 6d6c52ae6eb133c5d844a9106079878290a317c72e1d1fb31f4a91c703ff26b8b97fbeccfcf0041442dc7775042f64711cf7a47db7a2eba745e6a502b3f2adeb SHA512 76f60b1bf818937f1aa6fa4ac8a98573860e37d437ece94de9500b815be9e931fbd81a5ca700aa645329727773cc1710b4a7de69fbf2ef43cf610b6fbca05bac +EBUILD libiodbc-3.52.12-r1.ebuild 1642 BLAKE2B 0be8913bf0a957c2834b20abb938385eaea7336de460f43aeb939a0e96e182d1de79f64de4f981021218e714626c08fd855ba60dd056e61bedaa2687cf493522 SHA512 1bbec0ca5ac9725c0d9cad5ac78d080305adddb0a60bddd66fe1dad7922684945c911220ac0827ee7f71303f3d0e390333bb1bf2e8730bceac7b0963606ee795 +EBUILD libiodbc-3.52.14.ebuild 1598 BLAKE2B 9d1e47306d4d86d0a34558f419c0677541eb46ef4ba21dd2c5cce5896ef64e754618565c55ee4351921bb1d5ab0b864e18217557ca3d6522c0fd34fdc0ebfbdd SHA512 d463fe93d4aab5f5c26433a317e37977c552b43dc12911b0ac3c488120cca604133f251618c027740c746603e75c272b6ce8f650ae43941aecbfc139a1c3b07f MISC metadata.xml 251 BLAKE2B de1fe040cd23515516e31a81c78089f5fb4b9240f43a659d0e6981665bec427ebfe5f68bbea534b92dd4352f42e366c2070d3ef3e7fc0d3beee880445d973bef SHA512 ec0eb5cbc30d0a7ad8c74612255d84a473c370d977f9be4c95904eb5281060bbe3c23d97fb9537e844bbaf90c2f6dd1fae891d44628bbca29fbecb0fe0cb8bbd diff --git a/dev-db/libiodbc/files/fix-runpaths-r1.patch b/dev-db/libiodbc/files/fix-runpaths-r1.patch index 2cd76c816254..a9774e013807 100644 --- a/dev-db/libiodbc/files/fix-runpaths-r1.patch +++ b/dev-db/libiodbc/files/fix-runpaths-r1.patch @@ -1,5 +1,5 @@ ---- a/samples/Makefile.am 2012-03-27 05:15:02.000000000 +0200 -+++ b/samples/Makefile.am.new 2013-04-09 14:07:48.303789999 +0200 +--- a/samples/Makefile.am ++++ b/samples/Makefile.am @@ -78,12 +78,10 @@ # iodbctest_SOURCES = iodbctest.c diff --git a/dev-db/libiodbc/files/libiodbc-3.52.12-multilib.patch b/dev-db/libiodbc/files/libiodbc-3.52.12-multilib.patch index e2819211ccac..c4d063f1f6fa 100644 --- a/dev-db/libiodbc/files/libiodbc-3.52.12-multilib.patch +++ b/dev-db/libiodbc/files/libiodbc-3.52.12-multilib.patch @@ -1,5 +1,3 @@ -diff --git a/bin/iodbc-config.in b/bin/iodbc-config.in -index 08d46ae..576aa8b 100644 --- a/bin/iodbc-config.in +++ b/bin/iodbc-config.in @@ -145,10 +145,10 @@ while test $# -gt 0; do diff --git a/dev-db/libiodbc/files/libiodbc-3.52.7-debian_bug501100.patch b/dev-db/libiodbc/files/libiodbc-3.52.7-debian_bug501100.patch index 5e19d1e68094..8b1550a1359b 100644 --- a/dev-db/libiodbc/files/libiodbc-3.52.7-debian_bug501100.patch +++ b/dev-db/libiodbc/files/libiodbc-3.52.7-debian_bug501100.patch @@ -1,7 +1,5 @@ -Index: libiodbc2-3.52.7/include/sqltypes.h -=================================================================== ---- libiodbc2-3.52.7.orig/include/sqltypes.h 2010-06-26 21:15:00.000000000 +0200 -+++ libiodbc2-3.52.7/include/sqltypes.h 2010-06-26 21:15:36.000000000 +0200 +--- a/include/sqltypes.h ++++ b/include/sqltypes.h @@ -96,6 +96,9 @@ extern "C" { #endif diff --git a/dev-db/libiodbc/files/libiodbc-3.52.7-debian_bug508480.patch b/dev-db/libiodbc/files/libiodbc-3.52.7-debian_bug508480.patch index d1e80184e5b1..d501d1b9dc49 100644 --- a/dev-db/libiodbc/files/libiodbc-3.52.7-debian_bug508480.patch +++ b/dev-db/libiodbc/files/libiodbc-3.52.7-debian_bug508480.patch @@ -1,7 +1,5 @@ -Index: libiodbc2-3.52.7/iodbcinst/inifile.c -=================================================================== ---- libiodbc2-3.52.7.orig/iodbcinst/inifile.c 2010-06-26 21:29:43.000000000 +0200 -+++ libiodbc2-3.52.7/iodbcinst/inifile.c 2010-06-26 21:30:07.000000000 +0200 +--- a/iodbcinst/inifile.c ++++ b/iodbcinst/inifile.c @@ -1023,7 +1023,8 @@ if (!_iodbcdm_cfg_find (pCfg, lpszSection, NULL)) diff --git a/dev-db/libiodbc/files/libiodbc-3.52.7-unicode_includes.patch b/dev-db/libiodbc/files/libiodbc-3.52.7-unicode_includes.patch index 67730ec65556..62ee9178f6b9 100644 --- a/dev-db/libiodbc/files/libiodbc-3.52.7-unicode_includes.patch +++ b/dev-db/libiodbc/files/libiodbc-3.52.7-unicode_includes.patch @@ -1,7 +1,5 @@ -Index: libiodbc2-3.52.7/iodbcinst/unicode.h -=================================================================== ---- libiodbc2-3.52.7.orig/iodbcinst/unicode.h 2009-09-09 14:13:17.000000000 +0200 -+++ libiodbc2-3.52.7/iodbcinst/unicode.h 2010-06-26 21:16:26.000000000 +0200 +--- a/iodbcinst/unicode.h ++++ b/iodbcinst/unicode.h @@ -76,6 +76,7 @@ #ifndef _UNICODE_H diff --git a/dev-db/libiodbc/libiodbc-3.52.12.ebuild b/dev-db/libiodbc/libiodbc-3.52.12-r1.ebuild index fd954d02ad93..ebcf516830df 100644 --- a/dev-db/libiodbc/libiodbc-3.52.12.ebuild +++ b/dev-db/libiodbc/libiodbc-3.52.12-r1.ebuild @@ -1,15 +1,16 @@ -# Copyright 1999-2020 Gentoo Authors +# Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=6 +EAPI=7 -inherit autotools ltprune multilib-minimal +inherit autotools multilib-minimal MY_PN="iODBC" DESCRIPTION="ODBC Interface for Linux" HOMEPAGE="http://www.iodbc.org/" -SRC_URI="https://github.com/openlink/${MY_PN}/archive/v${PV}.zip -> ${P}.zip" +SRC_URI="https://github.com/openlink/${MY_PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" +S="${WORKDIR}/${MY_PN}-${PV}" KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~mips ppc ppc64 ~riscv s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos" LICENSE="|| ( LGPL-2 BSD )" @@ -21,15 +22,13 @@ DEPEND="${RDEPEND}" DOCS=( AUTHORS NEWS README ) -S="${WORKDIR}/${MY_PN}-${PV}" - MULTILIB_CHOST_TOOLS=( /usr/bin/iodbc-config ) PATCHES=( - "${FILESDIR}"/libiodbc-3.52.12-multilib.patch - "${FILESDIR}"/libiodbc-3.52.7-debian_bug501100.patch - "${FILESDIR}"/libiodbc-3.52.7-debian_bug508480.patch - "${FILESDIR}"/libiodbc-3.52.7-unicode_includes.patch + "${FILESDIR}"/${PN}-3.52.12-multilib.patch + "${FILESDIR}"/${PN}-3.52.7-debian_bug501100.patch + "${FILESDIR}"/${PN}-3.52.7-debian_bug508480.patch + "${FILESDIR}"/${PN}-3.52.7-unicode_includes.patch "${FILESDIR}"/fix-runpaths-r1.patch ) @@ -58,7 +57,8 @@ multilib_src_configure() { multilib_src_install_all() { einstalldocs - prune_libtool_files + + find "${ED}" -name '*.la' -delete || die # Install lintian overrides insinto /usr/share/lintian/overrides diff --git a/dev-db/libiodbc/libiodbc-3.52.14.ebuild b/dev-db/libiodbc/libiodbc-3.52.14.ebuild new file mode 100644 index 000000000000..e7acaba82d3f --- /dev/null +++ b/dev-db/libiodbc/libiodbc-3.52.14.ebuild @@ -0,0 +1,66 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit autotools multilib-minimal + +MY_PN="iODBC" + +DESCRIPTION="ODBC Interface for Linux" +HOMEPAGE="http://www.iodbc.org/" +SRC_URI="https://github.com/openlink/${MY_PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" +S="${WORKDIR}/${MY_PN}-${PV}" + +LICENSE="|| ( LGPL-2 BSD )" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos" +IUSE="gtk" + +RDEPEND="gtk? ( x11-libs/gtk+:2[${MULTILIB_USEDEP}] )" +DEPEND="${RDEPEND}" + +DOCS=( AUTHORS NEWS README ) + +MULTILIB_CHOST_TOOLS=( /usr/bin/iodbc-config ) + +PATCHES=( + "${FILESDIR}"/${PN}-3.52.12-multilib.patch + "${FILESDIR}"/${PN}-3.52.7-debian_bug501100.patch + "${FILESDIR}"/${PN}-3.52.7-unicode_includes.patch + "${FILESDIR}"/fix-runpaths-r1.patch +) + +src_prepare() { + default + + sed -i.orig \ + -e '/^cd "$PREFIX"/,/^esac/d' \ + iodbc/install_libodbc.sh || die "sed failed" + + # Without this, automake dies. It's what upstream's autogen.sh does. + touch ChangeLog || die "failed to create empty ChangeLog" + + eautoreconf +} + +multilib_src_configure() { + ECONF_SOURCE="${S}" econf \ + --disable-static \ + --enable-odbc3 \ + --enable-pthreads \ + --with-layout=gentoo \ + --with-iodbc-inidir=yes \ + $(use_enable gtk gui) +} + +multilib_src_install_all() { + einstalldocs + + find "${ED}" -name '*.la' -delete || die + + # Install lintian overrides + insinto /usr/share/lintian/overrides + newins debian/iodbc.lintian-overrides iodbc + newins debian/libiodbc2.lintian-overrides libiodbc2 +} diff --git a/dev-db/libzdb/Manifest b/dev-db/libzdb/Manifest index d57363e8f81e..490e260316a1 100644 --- a/dev-db/libzdb/Manifest +++ b/dev-db/libzdb/Manifest @@ -1,3 +1,5 @@ DIST libzdb-3.1.tar.gz 720162 BLAKE2B 2ad8ede7e2a1c0ee831ba546b7756d2688bcde83b537e812c12ab3d42d6bdc13526778ae68b61584a52569f0b42fbeb8462efe379821295d855f585ae3420df4 SHA512 7cf24ccf0f0a938955d8b54af2c6eca8a8f700737beafde9e824129f324511e06adbc11a3fdbd6ad6d9b902fdae6f7caab4e5c1c594d2211be314e3a24c697f3 +DIST libzdb-3.2.2.tar.gz 752292 BLAKE2B 449fe1cf9ac7196473ab45593d197ea9d02a91bb3b0efaaea91b3c95bb22de1ced68704835e542e092a9f507e8f2484a141e021721df84e818a18a36214f7c40 SHA512 1e732f8785322e0369de16a8100c9467e96ad1ca4eee31e8bfc349f4f17d4cc237a691addc060a66e1b46bcfeb99c3aed07b1d5dbe20e70fde4ffbf35dbea2eb EBUILD libzdb-3.1-r1.ebuild 1987 BLAKE2B 7747fd2a24c9f45fbd2713d931a41368369964635466442b452af6a1ea38e1b187d26a424981b76da1a9796dd45a94d00fd3f79a2b43e6f9e855e3b0c6b2b719 SHA512 735b7ed0579a6cdc95dec473f6fc0d15891e51d2068ccedec1188b163a3afa285603a32f68352df88c7cd3f5bc9dc15da6cfb41321b4a2b09efd1231e2dfb0f0 -MISC metadata.xml 167 BLAKE2B e4dadf27fd344484f2bccb5b904909c89aac568c32e5b3c44bdf139eacefd4b4fae74419f503d2b7da0dccc1b68ba05d777d11292c0f89270d1ac5c9c703e8ca SHA512 7c8decb24ee3a850e38186cf3c7f8933a28017426806870ad6ef9ceb2533be147a2681fc789b535a81cb528af8c29d90d3006e4f250aee23bd7dea4561294e33 +EBUILD libzdb-3.2.2.ebuild 1989 BLAKE2B 33e36d7cc7b73aacf23215e4a40383338faea0140ab926367c0e971f1529725b1673042f2ddd4113461db31ac0cbe8a086ea892f0588618a9f5774de1796f271 SHA512 c1c1c9c0864221f2a90909d0ed994f8c36fc16f461c67b46d07c7effd3357f570bc59f5dd6fd5cc9036401dbb442212af3ab36723bb8848c2831aeebddc58b78 +MISC metadata.xml 258 BLAKE2B a542b7d3d6fe41d4d6804f23d3f4eae32151dd6a261fd9c53df59afc03381e2621ef74094f612a796d2bfdcdc994b210f47935bb396e4ceb58e9901ffbdbd50d SHA512 5744904454b157ef1753d1858d293f35e7aa0d9c513a96823f5efc1ea7fde3bcbe2a50ae70f56be9c9c15463b820d45fcdfd52773a58d078252aceb0e93992f6 diff --git a/dev-db/libzdb/libzdb-3.2.2.ebuild b/dev-db/libzdb/libzdb-3.2.2.ebuild new file mode 100644 index 000000000000..cc039a65aee6 --- /dev/null +++ b/dev-db/libzdb/libzdb-3.2.2.ebuild @@ -0,0 +1,90 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit toolchain-funcs + +DESCRIPTION="A thread safe high level multi-database connection pool library" +HOMEPAGE="https://www.tildeslash.com/libzdb/" +SRC_URI="https://www.tildeslash.com/${PN}/dist/${P}.tar.gz" + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="debug doc mysql postgres +sqlite ssl static-libs" +REQUIRED_USE=" || ( postgres mysql sqlite )" + +RESTRICT=test + +RDEPEND="mysql? ( dev-db/mysql-connector-c:0= ) + postgres? ( dev-db/postgresql ) + sqlite? ( >=dev-db/sqlite-3.7:3[unlock-notify(+)] ) + ssl? ( dev-libs/openssl:0= )" +DEPEND="${RDEPEND} + virtual/pkgconfig + doc? ( app-doc/doxygen )" + +src_prepare() { + default + sed -i -e "s|&& ./pool||g" test/Makefile.in || die + # Fix detection of openssl 1.1 + sed -i -e "s|SSL_library_init|SSL_CTX_new|" configure || die +} + +src_configure() { + ## TODO: check what --enable-optimized actually does + ## TODO: find someone with oracle db to add oci8 support + myconf="" + # enable default hidden visibility + myconf="${myconf} --enable-protected" + + if use sqlite; then + myconf="${myconf} --with-sqlite=${EPREFIX}/usr/ --enable-sqliteunlock" + else + myconf="${myconf} --without-sqlite" + fi + + if use mysql; then + myconf="${myconf} --with-mysql=${EPREFIX}/usr/bin/mysql_config" + else + myconf="${myconf} --without-mysql" + fi + + if use postgres; then + myconf="${myconf} --with-postgresql=${EPREFIX}/usr/bin/pg_config" + else + myconf="${myconf} --without-postgresql" + fi + + econf \ + $(use_enable debug profiling) \ + $(use_enable static-libs static) \ + $(use_enable ssl openssl) \ + --without-oci \ + ${myconf} +} + +src_compile() { + default + if use doc; then + emake doc + fi +} + +src_install() { + default + + # the --disable-static flag only skips .a + use static-libs || rm -f "${D}"/usr/lib*/libzdb.la + + dodoc AUTHORS CHANGES README + if use doc;then + docinto html + dodoc -r "${S}/doc/api-docs"/* + fi +} + +src_test() { + emake verify +} diff --git a/dev-db/libzdb/metadata.xml b/dev-db/libzdb/metadata.xml index 7a38bb900964..ff82108a6c99 100644 --- a/dev-db/libzdb/metadata.xml +++ b/dev-db/libzdb/metadata.xml @@ -1,5 +1,8 @@ <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> <pkgmetadata> - <!-- maintainer-needed --> + <maintainer type="person"> + <email>lordvan@gentoo.org</email> + <name>Thomas Raschbacher</name> + </maintainer> </pkgmetadata> diff --git a/dev-db/mariadb-connector-c/Manifest b/dev-db/mariadb-connector-c/Manifest index 2990ad6d5510..7fa34dfcea83 100644 --- a/dev-db/mariadb-connector-c/Manifest +++ b/dev-db/mariadb-connector-c/Manifest @@ -4,6 +4,6 @@ AUX mariadb-connector-c-3.1.3-fix-pkconfig-file.patch 616 BLAKE2B 650c5a794da6d3 DIST mariadb-connector-c-3.1.11-src.tar.gz 752342 BLAKE2B 5bee575bffdceb1eff60b7ba3fa334882cf2b2a12446cd6c52663cc5ce2e179bcd19c8452e9bdae3877ac7e9e08f4f6a974d136170c399439c42e1759d226c84 SHA512 2da3a5e438037dde2b9fafb07c084c742983ff4ce18f06cf7a34836aace5317cdb2ddb1bca63143367f5ae827c988d99ee20e8f598fabdb06190d9e2191eb3f4 DIST mariadb-connector-c-3.1.12-src.tar.gz 966702 BLAKE2B 8187199f43ccb6f92ea9df61a1f62e48dbef4744cda9a5e865f71038e47a65dea3ed094dd76d81d0d8d357a8d611a9770590a3504c297ea30f59f285ab511d17 SHA512 a46e8ec976c28e227a72f09c15c92126d178b422a92a4c90fd52c8053604c3309aeb3bd098dc63fbd0d87059d5360c8b63d76e61a1152e7a3e7145e13681453d EBUILD mariadb-connector-c-3.1.11.ebuild 2423 BLAKE2B a730cf40e59ae4df181b6c18be1b0cc563594f7895c5591a36329a650c20f9cbb698d5fc40a95985f5d9716a70da30989dda63472329580c59abc96f3d7ce9bb SHA512 ad31779e758d653b7b329dd571dd4d03cc0e2989fb49edbe29ac7fe7836be5d8b59751b6fb3c466fafb7ad6f21b96f177602dc39393d9079b88a95c7b793d974 -EBUILD mariadb-connector-c-3.1.12.ebuild 2236 BLAKE2B 14a278c900328c79745b077916976220dbbfa47535616b77056240e409f6341eabe72ec00247328a8a05a385865f984cb4c851d9de8c04f4a74cf5ae28a7b14a SHA512 ff3afb663809098ff3ffe4e0eb8ab4b289664c6cd34fbbd10625203823fe11aa1ee91e011410bc49e98d637a47d0b8e6b3edc6e85a03b1915681dc6960d14c64 +EBUILD mariadb-connector-c-3.1.12.ebuild 2229 BLAKE2B 5ffb26517f126e78e24f859a8355da9bbb08de4919b9f83e7397e127f16fbdfbdf83a95dcbd8cf266863bd23e769d91a50e29241d2c52060a1ce5bfe1fd7cdd4 SHA512 11d0884642d55aa294e4c24cffed4a13d96ddca896b2fa53042f0b50da1dff77f0a0ab92100c6ece8b588db0c9157f91e008d2c80cf6cf4f399999d583217bec EBUILD mariadb-connector-c-9999.ebuild 2236 BLAKE2B 14a278c900328c79745b077916976220dbbfa47535616b77056240e409f6341eabe72ec00247328a8a05a385865f984cb4c851d9de8c04f4a74cf5ae28a7b14a SHA512 ff3afb663809098ff3ffe4e0eb8ab4b289664c6cd34fbbd10625203823fe11aa1ee91e011410bc49e98d637a47d0b8e6b3edc6e85a03b1915681dc6960d14c64 MISC metadata.xml 243 BLAKE2B f247f748a23e4cda2f518ad7e4e53b9027ff08ec62289010e6dfc8cd2ad49412430c4095e80f2156c8e6f1226bcda0163b4faae83759550f79e9998928398713 SHA512 7c227a1fadd8d61aae9baabeb5d964c93fe0c4d82fb838c83fe0360cf38b24bebf51037726f13188ecd8f52c335368a693b81e74d79ba949576a6dbcb54887a9 diff --git a/dev-db/mariadb-connector-c/mariadb-connector-c-3.1.12.ebuild b/dev-db/mariadb-connector-c/mariadb-connector-c-3.1.12.ebuild index 7a4723936d30..9caa67e3bbbd 100644 --- a/dev-db/mariadb-connector-c/mariadb-connector-c-3.1.12.ebuild +++ b/dev-db/mariadb-connector-c/mariadb-connector-c-3.1.12.ebuild @@ -11,7 +11,7 @@ else MY_PV=${PV/_b/-b} SRC_URI="https://downloads.mariadb.org/f/${MY_PN}-${PV%_beta}/${PN}-${MY_PV}-src.tar.gz?serve -> ${P}-src.tar.gz" S="${WORKDIR%/}/${PN}-${MY_PV}-src" - KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sparc ~x86" + KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~ppc ppc64 s390 sparc x86" fi CMAKE_ECLASS=cmake diff --git a/dev-db/mariadb/Manifest b/dev-db/mariadb/Manifest index 043bf3582a82..5bc73606b712 100644 --- a/dev-db/mariadb/Manifest +++ b/dev-db/mariadb/Manifest @@ -40,7 +40,7 @@ DIST mariadb-10.5.7-patches-02.tar.xz 8992 BLAKE2B ec9acc1f09ac08319c5ad7e952e75 DIST mariadb-10.5.7.tar.gz 88214625 BLAKE2B 8ec53b4b98565d99a707899fd6adfdc5bffbf722528e0042ab16b5e186d32229a386881f2781a0ce435585f338b48dc66459bef9d8921fadc00a3d770b62bf5c SHA512 d964c61d6ba7cf21fea97b8e0b6a0bf1ee50fc7a7995753dafd710f4656001bd6e03c243896efb5802cce16dd6470849ed036d09b17415a538e008f64e974a9f DIST mariadb-10.5.8-patches-01.tar.xz 6212 BLAKE2B 7e4358d02d25edc51f5926a75646052ccf07fe2b5cab1901a133b27764793c94ca2a6c4d4b90b5d911b25a6d86f1cb7d2659edbcdab52c445fd6959ea080275d SHA512 f7a5d948c6d7d97896538b7df0de60c8e7969dd15b4ff406e8955a282e69fb7f19fe91424afc332029ac2a36c52781617bbf1c5f6d57dd3bfc21d3ea20ff4c5a DIST mariadb-10.5.8.tar.gz 88206163 BLAKE2B eaaddaf240102428a23602655920bdf543d25cf85e669b1b07bedba5119a5e0f4498e999db39031dcff168ac810ed0b28f5fa9ac995b3634b84b99b753b4636c SHA512 9801a68440a3502b49655e34dcbfd09734f4a4f1ba8621ed9b895e194cea461a8c69fb0ff66488d5defd3065b43f73e5083a60142e11cc7e4a442f86769b06e5 -DIST mariadb-10.5.9-patches-02.tar.xz 6464 BLAKE2B 59b9c6abd137613fb468ef408508ba6c4604ca6cc67e6cfed72ddcc04a6bb3b3624eebee50eb3d1b93fb19f8a66074d606145daba5bae487936e7938445c2d38 SHA512 c8668c8dc56c8c9f61e91244bc1b444b8dfa85052b710cebec4b022cbb9c13d1cc8b16186122fad207a32f250c44ebb995a07034d917dc54f929e5d02799a813 +DIST mariadb-10.5.9-patches-03.tar.xz 6440 BLAKE2B 3dd767e0a122357d00a1728e4ec0b5bde5c4d5abc2f996f40befb2fe0e4ef3f78095b1349bfe547eab420900f2f90fcd7e8ef16db4531eee126caba415e909b9 SHA512 21f78755335531591b497d97ff626e6e5f11e79eb8b389da4a187186e9cee17507778354545d9d5db524c8c9e322a8749c70ef7e7cb2d5a77a3b901e9e5cbfea DIST mariadb-10.5.9.tar.gz 88639930 BLAKE2B 512c3fb0541bbeb19878979104f7858ce18ce67187507c8395798cfc9ffe92bd83e39bd47251419363600348a85716406286bd27b3c28662ea63e8ec761a4e01 SHA512 d23d5bf8510b3c36a6521fb3244cf323ef0f5d100ba379ed7b5bbc2acae1765a5b46c17bd929f0b27b28923eb1b5975314abdf7ffb96905cf7a93a5c8837294e DIST mysql-extras-20190305-2052Z.tar.bz2 331304 BLAKE2B 1d2c35a961159fa5ce9ee6699fce943f5a5b5cf60b11c9bb4bcccee4943f4508a9eb6d01050c642353ac592ce1a6b421abf2a1bebc706c44c4c8a36aa698ec43 SHA512 ae63403320e010acbb92f8aec6da8ed4f267cef0bad37147d594076fd94571de7f98bfc2afbe94af5d716f58d57696fd958b1e13e20e87052f252ed4a188cd3c EBUILD mariadb-10.2.22-r2.ebuild 32479 BLAKE2B cdb02077582e1f1e0f6c1739b43cfc28e8d03eb96c2c63d992fda2dd1a7da26baaaa8847cec4c6acd57ab0c54359d979015fec16a5faed2b3e4dc7c311eead68 SHA512 94d355a6789b3b44ef71137369d5e7dc0efa02efbfb656c989da0397332a69260031b53d17a93ccee97b3ce07201dcc7d009e500e04ff916619647e2ea14e964 @@ -48,19 +48,19 @@ EBUILD mariadb-10.2.32-r3.ebuild 33782 BLAKE2B 675dcec5874d2f025b4d9c38e36b9c9f9 EBUILD mariadb-10.2.34.ebuild 33912 BLAKE2B 0cf9492ea67e37883f4cbdd6060f0e44c5e045934500cd7482e8bd22b929879ab2b9e607ed724dbf28fc5fa61e82374ffe41adebfac1f54dba7266f0f2d9cfec SHA512 cdcdde796878493c0cc314688e5d24c44786e4a39654fae6ad0066385fd15643cb076cf6459844d92a3037b3fe1c2baa9e384e8a5525cf16575347027bc613a6 EBUILD mariadb-10.2.35.ebuild 33971 BLAKE2B 4c278c61d7497f3d8f9c69c90582411a2ec14f57d7865afc1932f2e07d897a2e9ee4388c53e16fffe4c001d09bfb12b16891f81b36c57556cea59f02b5159f06 SHA512 f42bdee8fe233b585f23a71b445b3ce2b4053e55833cd78957f77195b9fa407c575fcd0bcb035de9fd4018fbe7b6337a2a53c04099cb62b862cb8f5df6ec6add EBUILD mariadb-10.2.36.ebuild 33966 BLAKE2B e0bc3edc8eaf181d8e69e047353e46f9d1973d10108968c4b29f1e61d980a55492518f9fd27a93d8f9bdd63d2e64b3e828d19995ca5d322cfd19d5519a0bc5bd SHA512 d4b79a214f2823d5074288d359223468df2fa22caa69dc86d9f404267f21ff6b366dcaa4c23f35f7c5a76e381588c572cfcacfae16f8ce8c31940ded7e411afb -EBUILD mariadb-10.2.37.ebuild 33971 BLAKE2B 59104373cf1576eb020dfa6ee4777f2c1c3adfb5dd97b4d113eb288ddf3d6494e0f7ea5e137b12e68fae03a4e9ff839ab61a287f728f3d9e6823ca397a6270ea SHA512 b7800ce0d4b31f1a7da62c7fb1a52d22140f5357547032748fa5198fc324e97db777020b68b259b861ef100f00ecf843f021efc4fe5dada580c6cfb0cb259f62 +EBUILD mariadb-10.2.37-r2.ebuild 41669 BLAKE2B 05027a2154513221fe2b201fbc9acd32341af3d1cddcba49cdec02f2b25041a2793612fa45c8b6d75035d1a2b11f740ab97fb59a61f9b94282e560b9db5dd03e SHA512 db07c6bdaaaeaa1bd708382660846ae2dfda395804a0c9d128f074740a2729d7245022925526bf340d253ebc0cbdb1e5474cde5081d90787e1c51acab2811afe EBUILD mariadb-10.3.23-r3.ebuild 33535 BLAKE2B 90d0236994e8a13ab0b38e5e6dc052967b1fcb5442babfea78e032b46ce9051c2a01cc9383caae286d24a1ca80a5d74367574125b4500116804a432ea56bdcfa SHA512 f061844f10c320275febd82136bef72b1deb495b03f1cf5faa0550dfd6f7d677c46e0c296d505efb678d1e829b5f628b98af0e4bea64383167f553bb9c40a327 EBUILD mariadb-10.3.25.ebuild 33425 BLAKE2B c072e3713ca3dad00b1397d824fa8a04f68e38d875db46dd2527bddccc374dc8977e25e99d1ed7cd6504911a6e934b930667aa869ca394c7e01aa4b10b189c64 SHA512 673ed5a913c69bc86915c424bd221babc9639e17c704309e82feff8d0d509ce59b4345556bc5e8680662f8bd070d0cc84a7ad43d472ac680a19fe01683ce263f EBUILD mariadb-10.3.26.ebuild 33484 BLAKE2B 4b06603235ff2c01bae85db60240fe27e6c7ada074f0626033d6737e307674e99fb01ca2f49c32a4b370d364423f678f6a2c7af515f66bfb848d3d9c5e5e361d SHA512 64986ed9f33e393d75936f877c35a4e53d9e37718eb414a9cdd90322553f12e5ada3b1b0f99f49772728a601d81ac52cf628abc4d4b274b8fa636e5c365ad133 EBUILD mariadb-10.3.27.ebuild 33479 BLAKE2B c3ad220e76779a7ea17fdadee68cc0d8880ada6ee0df78bab327dee5d6fa762552174c38c69f9a639c50901f3de67be320e7c3a62116afbd3d6bd79ac2572b5e SHA512 d94cf965c4a2af570f899beb4ac98d65292459f9f0ea4db26731d20ef5d78d897b1740d82c6ad61e93997f8a25e43f1d2fa6f1bedfe16c4614a4f01ce188e49e -EBUILD mariadb-10.3.28.ebuild 33484 BLAKE2B 32bbc4caf115fa28e411129ae829599d3b721a0d4353361826fa9518e3240c435b1269ef35e17f1336bd93b3eb3e10e4245723f2dade1c9d4486f8e669cc1353 SHA512 b6c0c3fbda9bbb046b57a099f34943c23bc57b15a5ba718831dabf4b91f82b88328346814841ac8b18338c61ba7291ab86b2d92366eff33be7f07a5aaff5539f +EBUILD mariadb-10.3.28-r2.ebuild 41201 BLAKE2B 24d79ad94b235d722530d6ff70c8aeb423b5d53e5cd8cd8d2bbbedf6f8f129b23d0caa47667b824ccb37d0061275faf465c797023705c7cc287b9d5671100b44 SHA512 4cb20665a2e01063da80b5b111aae195bd272eec48c475c29a45e806a431cdadb7678a74c81b1f20c1b378000c56741df734b64c414906e305f7fc7fbc655098 EBUILD mariadb-10.4.13-r3.ebuild 34099 BLAKE2B e8e055d85f8bdb2d278d5ecdcd78c7ec27b0e7760a4ae395624283ce75000cc6db26e29a784334ccfbf20dea63509df778da7b7b0f53c74169307dfe816f3e56 SHA512 c6fa64eb68089f606b5b225b762bdebad5cc9650ad3ca94fd2c2d35e8945dc36d0e354a5fecbcb00f33699f6ff74048389f28b7f8f103836fb2b49428007d127 EBUILD mariadb-10.4.15.ebuild 34130 BLAKE2B 23e17c379bcf4b8b388b8c0f44d332b9a8e4fc3dfe98f8f6c98d4135f509cf08f22022a140cbe47a3fe18b3ea772d8675c77ad5ed5cebe84b6c8bdfdabd081f8 SHA512 8b13080b4547f60bc9dfe092caf35d8ec44227919213edc2f80a4445446306f7e9ee7cbea7ebec054c697ceee2acb90e6af0a58bcc1b5279c679b8d74feaf3f4 EBUILD mariadb-10.4.16.ebuild 34263 BLAKE2B ca00223bd452d01f101cf60c1f91ee6c65cffa7f6873590d6f0807a6fc7ae3712ab14634a4b4115c79e437add7d25855569e7d2a5ea45e30087e1a2b7816d769 SHA512 40140335a8ffce7389fbab8ce4acc610466feaf2798cff1798ba1bb6c5ec9ce5244f01e53a2ea717002abecf6a602bcc244369e12920eca1adb9fc78fbc63a20 EBUILD mariadb-10.4.17.ebuild 34258 BLAKE2B 305bc236a9e044b34272681ebee9d2b4a199d905a05ff40812e3616908745c45820f4222240d3e07bddad8d8db5f0e2f20f082491ee7643865535854131c8628 SHA512 1aeabf3cf0f287a2780b5eabe7efc61c11374909d8797344cde0e0bd60b4027f2652c568f6e57099110ad2db3b91730edab90a12bd85c3a5c5ea6f30ab6736af -EBUILD mariadb-10.4.18.ebuild 34263 BLAKE2B 182b671347a2bcd187acd621770b5916b4e79565814f85e0a6f48c047b07854426dff705303ae69e2dc0fbd6e3b1d8d37ff6ce59bf440cf7e06ac50be9ab1a35 SHA512 3fcbaa99afb1a4df593d1efbc1bb5a99863b0c0433406fe4b12121d3e5a87f390c23f02947942488248f13fab88f53763f1e3d06d25acc29fd7a0881b1a7c2a8 +EBUILD mariadb-10.4.18-r2.ebuild 41758 BLAKE2B 68b854b434ec06bd043e4ed0d35c714292a6b2ecfaccaf20c0f22f3981156e7be00b5d69ff091dfc487fb0359ce2e22482dd981a3b67affdb0968b2bf4e4d8e8 SHA512 752de719abc3b8c3f9ede1c4652c2209c46b73afae16aaeaf05fee281111aeb229546d1ba818c1cd9615eee99806df76f57bb31b30a829223be1e9467eb5f138 EBUILD mariadb-10.5.6.ebuild 33558 BLAKE2B 99623b62d5b0c6578f658bb7e1f5b713d59ff587eb95522d28834d1721538c38486f53c15335f42fc48c9814f965c9b028038cc796cc0893e3213b7f48fd11b4 SHA512 fb4013c674716962bb075c0c410b07e26d9d75baed841e237cf827a38994ce2c98b3fc07578071ead4c51cfe7b59564cc4e2a43a7d415983f56fa722d6311076 EBUILD mariadb-10.5.7.ebuild 33691 BLAKE2B 84108be4efeecf9544c727420e0bc1cdff72edd2c19d332fd9d5a31b1962780d74c75a93c8d230554e03c6c1b2bfdc89e7ef8d0cd936c04e1e8a61bbe62fda68 SHA512 eb19dae5ec6b535030f20a3b9ba2bdfb5e7d855188cf4c39a1a2f16d432c710c1883deb1f1252d1b176ca577129bc8d31c1f9f2a2f0e2d020d07fa0b5e8f9ce0 EBUILD mariadb-10.5.8.ebuild 33691 BLAKE2B c633321db0b12350ecac0efc53b9a06cf1d71ff43c3057e58afc299280d60d0118a5fd3cba9b6186ce5f753a36d6d11b27912cfdb4ac1891d35f79eef5e4c51d SHA512 b9bd51575a3703df33321c30e70143c94d8466e3f046fa0516e719df3cc7dccd1d60f0ce2c417ff0575de41afecab955d546b2b3fed1ae2cede2d8fc994448f8 -EBUILD mariadb-10.5.9.ebuild 33691 BLAKE2B 42fa229ae05775b7da85631a1bfc0de2d1dacb47fba30d65746c6b12d905a595171720aa7581164f7b0a26fbe9c1641695c6363499faa3e73029495be394243b SHA512 fc0623ce4c3c1a68413f3a982f83f3ec637a8ba1a9f181f37d97de3fe3ef0eaeaa018cb5b212a588d4249484f4aca7d2447915ebe4f41d0f78ae8050dc9ed7c6 +EBUILD mariadb-10.5.9-r3.ebuild 41256 BLAKE2B 6f79cff7460b11b531bba495748d669982e834c7560e50b7372cdf55841a076fadb1263b3bb97454362e61dbc73e6c19cca9f6917b0a5c0cac8a3caa29786478 SHA512 5f33c7bdb5e36232d1fb0f82a9977bf75bda76ff78cf9186e15d76ce78c2823008f820f90e68ae4967bde84d7b9bedbfe35c0499865c7bde4285547b2407647e MISC metadata.xml 2735 BLAKE2B 961d1d49f7a6f5b90c731ce710c27e11bd2a1d996de9ae0adbabecd5823053e815397b5930797b66d94e1e767fbcba83fbb25fd002a1b2d346235cb24b6a2c3a SHA512 85a7ca20443ed2630f7ff8da19d74d9f415cd9d8dde25300eb1d6ed44b4d0c73bc34a149bf0471748933aa0200e14ced48c009b99d71a737e38283ed754b75c9 diff --git a/dev-db/mariadb/mariadb-10.2.37.ebuild b/dev-db/mariadb/mariadb-10.2.37-r2.ebuild index 141bce8198aa..85198a6d6ccb 100644 --- a/dev-db/mariadb/mariadb-10.2.37.ebuild +++ b/dev-db/mariadb/mariadb-10.2.37-r2.ebuild @@ -33,7 +33,7 @@ REQUIRED_USE="jdbc? ( extraengine server !static ) ?? ( tcmalloc jemalloc ) static? ( yassl !pam )" -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" +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" # Shorten the path because the socket path length must be shorter than 107 chars # and we will run a mysql server during test phase @@ -112,13 +112,6 @@ RDEPEND="selinux? ( sec-policy/selinux-mysql ) !prefix? ( dev-db/mysql-init-scripts acct-group/mysql acct-user/mysql ) extraengine? ( jdbc? ( >=virtual/jre-1.6 ) ) ) - perl? ( - !dev-db/mytop - virtual/perl-Getopt-Long - dev-perl/TermReadKey - virtual/perl-Term-ANSIColor - virtual/perl-Time-HiRes - ) " # For other stuff to bring us in # dev-perl/DBD-mysql is needed by some scripts installed by MySQL @@ -320,7 +313,7 @@ src_configure() { -DINSTALL_MANDIR=share/man -DINSTALL_MYSQLSHAREDIR=share/mariadb -DINSTALL_PLUGINDIR=$(get_libdir)/mariadb/plugin - -DINSTALL_SCRIPTDIR=share/mariadb/scripts + -DINSTALL_SCRIPTDIR=bin -DINSTALL_MYSQLDATADIR="${EPREFIX}/var/lib/mysql" -DINSTALL_SBINDIR=sbin -DINSTALL_SUPPORTFILESDIR="${EPREFIX}/usr/share/mariadb" @@ -696,10 +689,16 @@ src_install() { doexe "${BUILD_DIR}/extra/my_print_defaults" "${BUILD_DIR}/extra/perror" fi - # Remove mytop if perl is not selected - if [[ -e "${ED}/usr/bin/mytop" ]] && ! use perl ; then - rm -f "${ED}/usr/bin/mytop" || die - fi + # Remove bundled mytop in favor of dev-db/mytop + local mytop_file + for mytop_file in \ + "${ED}/usr/bin/mytop" \ + "${ED}/usr/share/man/man1/mytop.1" \ + ; do + if [[ -e "${mytop_file}" ]] ; then + rm -v "${mytop_file}" || die + fi + done # Fix a dangling symlink when galera is not built if [[ -L "${ED}/usr/bin/wsrep_sst_rsync_wan" ]] && ! use galera ; then @@ -784,63 +783,312 @@ pkg_postinst() { pkg_config() { _getoptval() { - local mypd="${EROOT}"/usr/libexec/mariadb/my_print_defaults - local section="$1" + local section="${1}" local flag="--${2}=" local extra_options="${3}" - "${mypd}" $extra_options $section | sed -n "/^${flag}/s,${flag},,gp" + local cmd=( + "${my_print_defaults_binary}" + "${extra_options}" + "${section}" + ) + local results=( $(eval "${cmd[@]}" 2>/dev/null | sed -n "/^${flag}/s,${flag},,gp") ) + + if [[ ${#results[@]} -gt 0 ]] ; then + # When option is set multiple times only return last value + echo "${results[-1]}" + fi } - local old_MY_DATADIR="${MY_DATADIR}" - local old_HOME="${HOME}" + + _mktemp_dry() { + # emktemp has no --dry-run option + local template="${1}" + + if [[ -z "${template}" ]] ; then + if [[ -z "${T}" ]] ; then + template="/tmp/XXXXXXX" + else + template="${T}/XXXXXXX" + fi + fi + + local template_wo_X=${template//X/} + local n_X + let n_X=${#template}-${#template_wo_X} + if [[ ${n_X} -lt 3 ]] ; then + echo "${FUNCNAME[0]}: too few X's in template ‘${template}’" >&2 + return + fi + + local attempts=0 + local character tmpfile + while [[ true ]] ; do + let attempts=attempts+1 + + new_file= + while read -n1 character ; do + if [[ "${character}" == "X" ]] ; then + tmpfile+="${RANDOM:0:1}" + else + tmpfile+="${character}" + fi + done < <(echo -n "${template}") + + if [[ ! -f "${tmpfile}" ]] + then + echo "${tmpfile}" + return + fi + + if [[ ${attempts} -ge 100 ]] ; then + echo "${FUNCNAME[0]}: Cannot create temporary file after 100 attempts." >&2 + return + fi + done + } + + local mysql_binary="${EROOT}/usr/bin/mysql" + if [[ ! -x "${mysql_binary}" ]] ; then + die "'${mysql_binary}' not found! Please re-install ${CATEGORY}/${PN}!" + fi + + local mysqld_binary="${EROOT}/usr/sbin/mysqld" + if [[ ! -x "${mysqld_binary}" ]] ; then + die "'${mysqld_binary}' not found! Please re-install ${CATEGORY}/${PN}!" + fi + + local mysql_install_db_binary="${EROOT}/usr/bin/mysql_install_db" + if [[ ! -x "${mysql_install_db_binary}" ]] ; then + die "'${mysql_install_db_binary}' not found! Please re-install ${CATEGORY}/${PN}!" + fi + + local my_print_defaults_binary="${EROOT}/usr/bin/my_print_defaults" + if [[ ! -x "${my_print_defaults_binary}" ]] ; then + die "'${my_print_defaults_binary}' not found! Please re-install dev-db/mysql-connector-c!" + fi + + if [[ -z "${MYSQL_USER}" ]] ; then + MYSQL_USER=mysql + if use prefix ; then + MYSQL_USER=$(id -u -n 2>/dev/null) + if [[ -z "${MYSQL_USER}" ]] ; then + die "Failed to determine current username!" + fi + fi + fi + + if [[ -z "${MYSQL_GROUP}" ]] ; then + MYSQL_GROUP=mysql + if use prefix ; then + MYSQL_GROUP=$(id -g -n 2>/dev/null) + if [[ -z "${MYSQL_GROUP}" ]] ; then + die "Failed to determine current user groupname!" + fi + fi + fi + # my_print_defaults needs to read stuff in $HOME/.my.cnf - export HOME=${EPREFIX}/root + local -x HOME="${EROOT}/root" # Make sure the vars are correctly initialized mysql_init_vars - [[ -z "${MY_DATADIR}" ]] && die "Sorry, unable to find MY_DATADIR" - if [[ ! -x "${EROOT}/usr/sbin/mysqld" ]] ; then - die "Minimal builds do NOT include the MySQL server" + # Read currently set data directory + MY_DATADIR="$(_getoptval mysqld datadir "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")" + + # Bug #213475 - MySQL _will_ object strenously if your machine is named + # localhost. Also causes weird failures. + [[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost" + + if [[ -z "${MY_DATADIR}" ]] ; then + die "Sorry, unable to find MY_DATADIR!" + elif [[ -d "${MY_DATADIR}/mysql" ]] ; then + ewarn "Looks like your data directory '${MY_DATADIR}' is already initialized!" + ewarn "Please rename or delete its content if you wish to initialize a new data directory." + die "${PN} data directory at '${MY_DATADIR}' looks already initialized!" fi - if [[ ( -n "${MY_DATADIR}" ) && ( "${MY_DATADIR}" != "${old_MY_DATADIR}" ) ]]; then - local MY_DATADIR_s="${ROOT}/${MY_DATADIR}" - MY_DATADIR_s="${MY_DATADIR_s%%/}" - local old_MY_DATADIR_s="${ROOT}/${old_MY_DATADIR}" - old_MY_DATADIR_s="${old_MY_DATADIR_s%%/}" + MYSQL_TMPDIR="$(_getoptval mysqld tmpdir "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")" + MYSQL_TMPDIR=${MYSQL_TMPDIR%/} + # These are dir+prefix + MYSQL_LOG_BIN="$(_getoptval mysqld log-bin "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")" + MYSQL_LOG_BIN=${MYSQL_LOG_BIN%/*} + MYSQL_RELAY_LOG="$(_getoptval mysqld relay-log "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")" + MYSQL_RELAY_LOG=${MYSQL_RELAY_LOG%/*} - if [[ ( -d "${old_MY_DATADIR_s}" ) && ( "${old_MY_DATADIR_s}" != / ) ]]; then - if [[ -d "${MY_DATADIR_s}" ]]; then - ewarn "Both ${old_MY_DATADIR_s} and ${MY_DATADIR_s} exist" - ewarn "Attempting to use ${MY_DATADIR_s} and preserving ${old_MY_DATADIR_s}" - else - elog "Moving MY_DATADIR from ${old_MY_DATADIR_s} to ${MY_DATADIR_s}" - mv --strip-trailing-slashes -T "${old_MY_DATADIR_s}" "${MY_DATADIR_s}" \ - || die "Moving MY_DATADIR failed" - fi + # Create missing directories. + # Always check if mysql user can write to directory even if we just + # created directory because a parent directory might be not + # accessible for that user. + PID_DIR="${EROOT}/run/mysqld" + if [[ ! -d "${PID_DIR}" ]] ; then + einfo "Creating ${PN} PID directory '${PID_DIR}' ..." + install -d -m 755 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${PID_DIR}" \ + || die "Failed to create PID directory '${PID_DIR}'!" + fi + + local _pid_dir_testfile="$(_mktemp_dry "${PID_DIR}/.pkg_config-access-test.XXXXXXXXX")" + [[ -z "${_pid_dir_testfile}" ]] \ + && die "_mktemp_dry() for '${PID_DIR}/.pkg_config-access-test.XXXXXXXXX' failed!" + + if use prefix ; then + touch "${_pid_dir_testfile}" &>/dev/null + else + su -s /bin/sh -c "touch ${_pid_dir_testfile}" ${MYSQL_USER} &>/dev/null + fi + + if [[ $? -ne 0 ]] ; then + die "${MYSQL_USER} user cannot write into PID dir '${PID_DIR}'!" + else + rm "${_pid_dir_testfile}" || die + unset _pid_dir_testfile + fi + + if [[ ! -d "${MY_DATADIR}" ]] ; then + einfo "Creating ${PN} data directory '${MY_DATADIR}' ..." + install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MY_DATADIR}" \ + || die "Failed to create ${PN} data directory '${MY_DATADIR}'!" + fi + + local _my_datadir_testfile="$(_mktemp_dry "${MY_DATADIR}/.pkg_config-access-test.XXXXXXXXX")" + [[ -z "${_my_datadir_testfile}" ]] \ + && die "_mktemp_dry() for '${MY_DATADIR}/.pkg_config-access-test.XXXXXXXXX' failed!" + + if use prefix ; then + touch "${_my_datadir_testfile}" &>/dev/null + else + su -s /bin/sh -c "touch ${_my_datadir_testfile}" ${MYSQL_USER} &>/dev/null + fi + + if [[ $? -ne 0 ]] ; then + die "${MYSQL_USER} user cannot write into data directory '${MY_DATADIR}'!" + else + rm "${_my_datadir_testfile}" || die + unset _my_datadir_testfile + fi + + if [[ -n "${MYSQL_TMPDIR}" && ! -d "${MYSQL_TMPDIR}" ]] ; then + einfo "Creating ${PN} tmpdir '${MYSQL_TMPDIR}' ..." + install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MYSQL_TMPDIR}" \ + || die "Failed to create ${PN} tmpdir '${MYSQL_TMPDIR}'!" + fi + + if [[ -z "${MYSQL_TMPDIR}" ]] ; then + MYSQL_TMPDIR="$(_mktemp_dry "${EROOT}/tmp/mysqld-tmp.XXXXXXXXX")" + [[ -z "${MYSQL_TMPDIR}" ]] \ + && die "_mktemp_dry() for '${MYSQL_TMPDIR}' failed!" + + mkdir "${MYSQL_TMPDIR}" || die + chown ${MYSQL_USER} "${MYSQL_TMPDIR}" || die + fi + + # Now we need to test MYSQL_TMPDIR... + local _my_tmpdir_testfile="$(_mktemp_dry "${MYSQL_TMPDIR}/.pkg_config-access-test.XXXXXXXXX")" + [[ -z "${_my_tmpdir_testfile}" ]] \ + && die "_mktemp_dry() for '${MYSQL_TMPDIR}/.pkg_config-access-test.XXXXXXXXX' failed!" + + if use prefix ; then + touch "${_my_tmpdir_testfile}" &>/dev/null + else + su -s /bin/sh -c "touch ${_my_tmpdir_testfile}" ${MYSQL_USER} &>/dev/null + fi + + if [[ $? -ne 0 ]] ; then + die "${MYSQL_USER} user cannot write into tmpdir '${MYSQL_TMPDIR}'!" + else + rm "${_my_tmpdir_testfile}" || die + unset _my_tmpdir_testfile + fi + + if [[ -n "${MYSQL_LOG_BIN}" && ! -d "${MYSQL_LOG_BIN}" ]] ; then + einfo "Creating ${PN} log-bin directory '${MYSQL_LOG_BIN}' ..." + install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MYSQL_LOG_BIN}" \ + || die "Failed to create ${PN} log-bin directory '${MYSQL_LOG_BIN}'" + fi + + if [[ -n "${MYSQL_LOG_BIN}" ]] ; then + local _my_logbin_testfile="$(_mktemp_dry "${MYSQL_LOG_BIN}/.pkg_config-access-test.XXXXXXXXX")" + [[ -z "${_my_logbin_testfile}" ]] \ + && die "_mktemp_dry() for '${MYSQL_LOG_BIN}/.pkg_config-access-test.XXXXXXXXX' failed!" + + if use prefix ; then + touch "${_my_logbin_testfile}" &>/dev/null else - ewarn "Previous MY_DATADIR (${old_MY_DATADIR_s}) does not exist" - if [[ -d "${MY_DATADIR_s}" ]]; then - ewarn "Attempting to use ${MY_DATADIR_s}" - else - eerror "New MY_DATADIR (${MY_DATADIR_s}) does not exist" - die "Configuration Failed! Please reinstall ${CATEGORY}/${PN}" - fi + su -s /bin/sh -c "touch ${_my_logbin_testfile}" ${MYSQL_USER} &>/dev/null + fi + + if [[ $? -ne 0 ]] ; then + die "${MYSQL_USER} user cannot write into log-bin directory '${MYSQL_LOG_BIN}'!" + else + rm "${_my_logbin_testfile}" || die + unset _my_logbin_testfile fi fi - local pwd1="a" - local pwd2="b" - local maxtry=15 + if [[ -n "${MYSQL_RELAY_LOG}" && ! -d "${MYSQL_RELAY_LOG}" ]] ; then + einfo "Creating ${PN} relay-log directory '${MYSQL_RELAY_LOG}' ..." + install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MYSQL_RELAY_LOG}" \ + || die "Failed to create ${PN} relay-log directory '${MYSQL_RELAY_LOG}'!" + fi + + if [[ -n "${MYSQL_RELAY_LOG}" ]] ; then + local _my_relaylog_testfile="$(_mktemp_dry "${MYSQL_RELAY_LOG}/.pkg_config-access-test.XXXXXXXXX")" + [[ -z "${_my_relaylog_testfile}" ]] \ + && die "_mktemp_dry() for '${MYSQL_RELAY_LOG}/.pkg_config-access-test.XXXXXXXXX' failed!" - if [ -z "${MYSQL_ROOT_PASSWORD}" ]; then + if use prefix ; then + touch "${_my_relaylog_testfile}" &>/dev/null + else + su -s /bin/sh -c "touch ${_my_relaylog_testfile}" ${MYSQL_USER} &>/dev/null + fi + + if [[ $? -ne 0 ]] ; then + die "${MYSQL_USER} user cannot write into relay-log directory '${MYSQL_RELAY_LOG}'!" + else + rm "${_my_relaylog_testfile}" || die + unset _my_relaylog_testfile + fi + fi + + local SETUP_TMPDIR=$(mktemp -d "/tmp/${PN}-config.XXXXXXXXX" 2>/dev/null) + [[ -z "${SETUP_TMPDIR}" ]] && die "Failed to create setup tmpdir" + + # Limit access + chmod 0770 "${SETUP_TMPDIR}" || die + chown ${MYSQL_USER} "${SETUP_TMPDIR}" || die + + local mysql_install_log="${SETUP_TMPDIR}/install_db.log" + local mysqld_logfile="${SETUP_TMPDIR}/mysqld.log" + + echo "" + einfo "Detected settings:" + einfo "==================" + einfo "MySQL User:\t\t\t\t${MYSQL_USER}" + einfo "MySQL Group:\t\t\t\t${MYSQL_GROUP}" + einfo "MySQL DATA directory:\t\t${MY_DATADIR}" + einfo "MySQL TMP directory:\t\t\t${MYSQL_TMPDIR}" + + if [[ -n "${MYSQL_LOG_BIN}" ]] ; then + einfo "MySQL Binary Log File location:\t${MYSQL_LOG_BIN}" + fi + + if [[ -n "${MYSQL_RELAY_LOG}" ]] ; then + einfo "MySQL Relay Log File location:\t${MYSQL_RELAY_LOG}" + fi + + einfo "PID DIR:\t\t\t\t${PID_DIR}" + einfo "Install db log:\t\t\t${mysql_install_log}" + einfo "Install server log:\t\t\t${mysqld_logfile}" + + echo + + if [[ -z "${MYSQL_ROOT_PASSWORD}" ]] ; then local tmp_mysqld_password_source= - for tmp_mysqld_password_source in mysql client; do + for tmp_mysqld_password_source in mysql client ; do einfo "Trying to get password for mysql 'root' user from '${tmp_mysqld_password_source}' section ..." MYSQL_ROOT_PASSWORD="$(_getoptval "${tmp_mysqld_password_source}" password)" - if [[ -n "${MYSQL_ROOT_PASSWORD}" ]]; then - if [[ ${MYSQL_ROOT_PASSWORD} == *$'\n'* ]]; then + if [[ -n "${MYSQL_ROOT_PASSWORD}" ]] ; then + if [[ ${MYSQL_ROOT_PASSWORD} == *$'\n'* ]] ; then ewarn "Ignoring password from '${tmp_mysqld_password_source}' section due to newline character (do you have multiple password options set?)!" MYSQL_ROOT_PASSWORD= continue @@ -852,167 +1100,188 @@ pkg_config() { done # Sometimes --show is required to display passwords in some implementations of my_print_defaults - if [[ "${MYSQL_ROOT_PASSWORD}" == '*****' ]]; then + if [[ "${MYSQL_ROOT_PASSWORD}" == '*****' ]] ; then MYSQL_ROOT_PASSWORD="$(_getoptval "${tmp_mysqld_password_source}" password --show)" fi unset tmp_mysqld_password_source fi - MYSQL_TMPDIR="$(_getoptval mysqld tmpdir | tail -n1)" - # These are dir+prefix - MYSQL_RELAY_LOG="$(_getoptval mysqld relay-log | tail -n1)" - MYSQL_RELAY_LOG=${MYSQL_RELAY_LOG%/*} - MYSQL_LOG_BIN="$(_getoptval mysqld log-bin | tail -n1)" - MYSQL_LOG_BIN=${MYSQL_LOG_BIN%/*} - if [[ ! -d "${ROOT}/$MYSQL_TMPDIR" ]]; then - einfo "Creating MySQL tmpdir $MYSQL_TMPDIR" - install -d -m 770 -o mysql -g mysql "${EROOT}/$MYSQL_TMPDIR" - fi - if [[ ! -d "${ROOT}/$MYSQL_LOG_BIN" ]]; then - einfo "Creating MySQL log-bin directory $MYSQL_LOG_BIN" - install -d -m 770 -o mysql -g mysql "${EROOT}/$MYSQL_LOG_BIN" - fi - if [[ ! -d "${EROOT}/$MYSQL_RELAY_LOG" ]]; then - einfo "Creating MySQL relay-log directory $MYSQL_RELAY_LOG" - install -d -m 770 -o mysql -g mysql "${EROOT}/$MYSQL_RELAY_LOG" - fi - - if [[ -d "${ROOT}/${MY_DATADIR}/mysql" ]] ; then - ewarn "You have already a MySQL database in place." - ewarn "(${ROOT}/${MY_DATADIR}/*)" - ewarn "Please rename or delete it if you wish to replace it." - die "MySQL database already exists!" - fi - - # Bug #213475 - MySQL _will_ object strenously if your machine is named - # localhost. Also causes weird failures. - [[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost" - - if [[ -z "${MYSQL_ROOT_PASSWORD}" ]]; then - - einfo "Please provide a password for the mysql 'root'@'localhost' user now" - einfo "or through the ${HOME}/.my.cnf file." - ewarn "Avoid [\"'\\_%] characters in the password" + if [[ -z "${MYSQL_ROOT_PASSWORD}" ]] ; then + local pwd1="a" + local pwd2="b" + + echo + einfo "No password for mysql 'root' user was specified via environment" + einfo "variable MYSQL_ROOT_PASSWORD and no password was found in config" + einfo "file like '${HOME}/.my.cnf'." + einfo "To continue please provide a password for the mysql 'root' user" + einfo "now on console:" + ewarn "NOTE: Please avoid [\"'\\_%] characters in the password!" read -rsp " >" pwd1 ; echo einfo "Retype the password" read -rsp " >" pwd2 ; echo - if [[ "x$pwd1" != "x$pwd2" ]] ; then - die "Passwords are not the same" + if [[ "x${pwd1}" != "x${pwd2}" ]] ; then + die "Passwords are not the same!" fi MYSQL_ROOT_PASSWORD="${pwd1}" unset pwd1 pwd2 + + echo fi - local options - local sqltmp="$(emktemp)" + local -a mysqld_options # Fix bug 446200. Don't reference host my.cnf, needs to come first, - # see https://bugs.mysql.com/bug.php?id=31312 - use prefix && options="${options} '--defaults-file=${MY_SYSCONFDIR}/my.cnf'" + # see http://bugs.mysql.com/bug.php?id=31312 + use prefix && mysqld_options+=( "--defaults-file='${MY_SYSCONFDIR}/my.cnf'" ) # Figure out which options we need to disable to do the setup local helpfile="${TMPDIR}/mysqld-help" "${EROOT}/usr/sbin/mysqld" --verbose --help >"${helpfile}" 2>/dev/null - for opt in grant-tables host-cache name-resolve networking slave-start \ + + local opt optexp optfull + for opt in host-cache name-resolve networking slave-start \ federated ssl log-bin relay-log slow-query-log external-locking \ log-slave-updates \ - ; do + ; do optexp="--(skip-)?${opt}" optfull="--loose-skip-${opt}" - egrep -sq -- "${optexp}" "${helpfile}" && options="${options} ${optfull}" + egrep -sq -- "${optexp}" "${helpfile}" && mysqld_options+=( "${optfull}" ) done - einfo "Creating the mysql database and setting proper permissions on it ..." + # Prepare timezones, see + # https://dev.mysql.com/doc/mysql/en/time-zone-support.html + local tz_sql="${SETUP_TMPDIR}/tz.sql" - # Now that /var/run is a tmpfs mount point, we need to ensure it exists before using it - PID_DIR="${EROOT}/var/run/mysqld" - if [[ ! -d "${PID_DIR}" ]]; then - install -d -m 755 -o mysql -g mysql "${PID_DIR}" || die "Could not create pid directory" + echo "USE mysql;" >"${tz_sql}" + "${EROOT}/usr/bin/mysql_tzinfo_to_sql" "${EROOT}/usr/share/zoneinfo" >> "${tz_sql}" 2>/dev/null + if [[ $? -ne 0 ]] ; then + die "mysql_tzinfo_to_sql failed!" fi - if [[ ! -d "${MY_DATADIR}" ]]; then - install -d -m 750 -o mysql -g mysql "${MY_DATADIR}" || die "Could not create data directory" - fi + local cmd=( + "${mysql_install_db_binary}" + "${mysqld_options[@]}" + "--init-file='${tz_sql}'" + "--basedir='${EROOT}/usr'" + "--datadir='${MY_DATADIR}'" + "--tmpdir='${MYSQL_TMPDIR}'" + "--log-error='${mysql_install_log}'" + "--rpm" + "--cross-bootstrap" + "--user=${MYSQL_USER}" + ) - pushd "${TMPDIR}" &>/dev/null || die + einfo "Initializing ${PN} data directory: ${cmd[@]}" + eval "${cmd[@]}" >>"${mysql_install_log}" 2>&1 - # Filling timezones, see - # https://dev.mysql.com/doc/mysql/en/time-zone-support.html - "${EROOT}/usr/bin/mysql_tzinfo_to_sql" "${EROOT}/usr/share/zoneinfo" > "${sqltmp}" 2>/dev/null - - local cmd=( "${EROOT}/usr/share/mariadb/scripts/mysql_install_db" ) - [[ -f "${cmd}" ]] || cmd=( "${EROOT}/usr/bin/mysql_install_db" ) - cmd+=( "--basedir=${EPREFIX}/usr" ${options} "--datadir=${ROOT}/${MY_DATADIR}" "--tmpdir=${ROOT}/${MYSQL_TMPDIR}" ) - einfo "Command: ${cmd[*]}" - su -s /bin/sh -c "${cmd[*]}" mysql \ - >"${TMPDIR}"/mysql_install_db.log 2>&1 - if [[ $? -ne 0 ]]; then - grep -B5 -A999 -i "ERROR" "${TMPDIR}"/mysql_install_db.log 1>&2 - die "Failed to initialize mysqld. Please review ${EPREFIX}/var/log/mysql/mysqld.err AND ${TMPDIR}/mysql_install_db.log" + if [[ $? -ne 0 || ! -f "${MY_DATADIR}/mysql/user.frm" ]] ; then + grep -B5 -A999 -iE "(Aborting|ERROR|errno)" "${mysql_install_log}" 1>&2 + die "Failed to initialize ${PN} data directory. Please review '${mysql_install_log}'!" fi - popd &>/dev/null || die - [[ -f "${ROOT}/${MY_DATADIR}/mysql/user.frm" ]] \ - || die "MySQL databases not installed" - - use prefix || options="${options} --user=mysql" - - local socket="${EROOT}/var/run/mysqld/mysqld${RANDOM}.sock" - local pidfile="${EROOT}/var/run/mysqld/mysqld${RANDOM}.pid" - local mysqld="${EROOT}/usr/sbin/mysqld \ - ${options} \ - --log-warnings=0 \ - --basedir=${EROOT}/usr \ - --datadir=${ROOT}/${MY_DATADIR} \ - --max_allowed_packet=8M \ - --net_buffer_length=16K \ - --socket=${socket} \ - --pid-file=${pidfile} \ - --tmpdir=${ROOT}/${MYSQL_TMPDIR}" - #einfo "About to start mysqld: ${mysqld}" - ebegin "Starting mysqld" - einfo "Command ${mysqld}" - ${mysqld} & - rc=$? - while ! [[ -S "${socket}" || "${maxtry}" -lt 1 ]] ; do + + local x=${RANDOM} + local socket="${PID_DIR}/mysqld.${x}.sock" + [[ -f "${socket}" ]] && die "Randomness failed; Socket ${socket} already exists!" + local pidfile="${PID_DIR}/mysqld.${x}.pid" + [[ -f "${pidfile}" ]] && die "Randomness failed; Pidfile ${pidfile} already exists!" + unset x + + cmd=( + "${mysqld_binary}" + "${mysqld_options[@]}" + "--basedir='${EROOT}/usr'" + "--datadir='${MY_DATADIR}'" + "--tmpdir='${MYSQL_TMPDIR}'" + --max_allowed_packet=8M + --net_buffer_length=16K + "--socket='${socket}'" + "--pid-file='${pidfile}'" + "--log-error='${mysqld_logfile}'" + "--user=${MYSQL_USER}" + ) + + einfo "Starting mysqld to finalize initialization: ${cmd[@]}" + eval "${cmd[@]}" >>"${mysqld_logfile}" 2>&1 & + + echo -n "Waiting for mysqld to accept connections " + local maxtry=15 + while [[ ! -S "${socket}" && "${maxtry}" -gt 1 ]] ; do maxtry=$((${maxtry}-1)) echo -n "." sleep 1 done - eend $rc - if ! [[ -S "${socket}" ]]; then - die "Completely failed to start up mysqld with: ${mysqld}" + if [[ -S "${socket}" ]] ; then + # Even with a socket we don't know if mysqld will abort + # start due to an error so just wait a little bit more... + maxtry=5 + while [[ -S "${socket}" && "${maxtry}" -gt 1 ]] ; do + maxtry=$((${maxtry}-1)) + echo -n "." + sleep 1 + done + fi + + echo + + if [[ ! -S "${socket}" ]] ; then + grep -B5 -A999 -iE "(Aborting|ERROR|errno)" "${mysqld_logfile}" 1>&2 + die "mysqld was unable to start from initialized data directory. Please review '${mysqld_logfile}'!" fi + local mysql_logfile="${SETUP_TMPDIR}/set_root_pw.log" + touch "${mysql_logfile}" || die + ebegin "Setting root password" # Do this from memory, as we don't want clear text passwords in temp files - local sql="UPDATE mysql.user SET Password = PASSWORD('${MYSQL_ROOT_PASSWORD}') WHERE USER='root'; FLUSH PRIVILEGES" - "${EROOT}/usr/bin/mysql" \ - "--socket=${socket}" \ - -hlocalhost \ - -e "${sql}" - eend $? - - if [[ -n "${sqltmp}" ]] ; then - ebegin "Loading \"zoneinfo\", this step may require a few seconds" - "${EROOT}/usr/bin/mysql" \ - "--socket=${socket}" \ - -hlocalhost \ - -uroot \ - --password="${MYSQL_ROOT_PASSWORD}" \ - mysql < "${sqltmp}" - rc=$? - eend $? - [[ $rc -ne 0 ]] && ewarn "Failed to load zoneinfo!" - fi - - # Stop the server and cleanup - einfo "Stopping the server ..." - kill $(< "${pidfile}" ) - rm -f "${sqltmp}" - wait %1 - einfo "Done" + local sql="ALTER USER 'root'@'localhost' IDENTIFIED BY '${MYSQL_ROOT_PASSWORD}'" + cmd=( + "${mysql_binary}" + --no-defaults + "--socket='${socket}'" + -hlocalhost + "-e \"${sql}\"" + ) + eval "${cmd[@]}" >"${mysql_logfile}" 2>&1 + local rc=$? + eend ${rc} + + if [[ ${rc} -ne 0 ]] ; then + # Poor man's solution which tries to avoid having password + # in log. NOTE: sed can fail if user didn't follow advice + # and included character which will require escaping... + sed -i -e "s/${MYSQL_ROOT_PASSWORD}/*****/" "${mysql_logfile}" 2>/dev/null + + grep -B5 -A999 -iE "(Aborting|ERROR|errno)" "${mysql_logfile}" + die "Failed to set ${PN} root password. Please review '${mysql_logfile}'!" + fi + + # Stop the server + if [[ -f "${pidfile}" ]] && pgrep -F "${pidfile}" &>/dev/null ; then + echo -n "Stopping the server " + pkill -F "${pidfile}" &>/dev/null + + maxtry=10 + while [[ -f "${pidfile}" ]] && pgrep -F "${pidfile}" &>/dev/null ; do + maxtry=$((${maxtry}-1)) + echo -n "." + sleep 1 + done + + echo + + if [[ -f "${pidfile}" ]] && pgrep -F "${pidfile}" &>/dev/null ; then + # We somehow failed to stop server. + # However, not a fatal error. Just warn the user. + ewarn "WARNING: mysqld[$(cat "${pidfile}")] is still running!" + fi + fi + + rm -r "${SETUP_TMPDIR}" || die + + einfo "${PN} data directory at '${MY_DATADIR}' successfully initialized!" } diff --git a/dev-db/mariadb/mariadb-10.3.28.ebuild b/dev-db/mariadb/mariadb-10.3.28-r2.ebuild index 4a7fac23c3f3..b127dfd2fcd0 100644 --- a/dev-db/mariadb/mariadb-10.3.28.ebuild +++ b/dev-db/mariadb/mariadb-10.3.28-r2.ebuild @@ -33,7 +33,7 @@ REQUIRED_USE="jdbc? ( extraengine server !static ) ?? ( tcmalloc jemalloc ) static? ( yassl !pam )" -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" +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" # Shorten the path because the socket path length must be shorter than 107 chars # and we will run a mysql server during test phase @@ -111,13 +111,6 @@ RDEPEND="selinux? ( sec-policy/selinux-mysql ) !prefix? ( dev-db/mysql-init-scripts acct-group/mysql acct-user/mysql ) extraengine? ( jdbc? ( >=virtual/jre-1.6 ) ) ) - perl? ( - !dev-db/mytop - virtual/perl-Getopt-Long - dev-perl/TermReadKey - virtual/perl-Term-ANSIColor - virtual/perl-Time-HiRes - ) " # For other stuff to bring us in # dev-perl/DBD-mysql is needed by some scripts installed by MySQL @@ -311,7 +304,7 @@ src_configure() { -DINSTALL_MANDIR=share/man -DINSTALL_MYSQLSHAREDIR=share/mariadb -DINSTALL_PLUGINDIR=$(get_libdir)/mariadb/plugin - -DINSTALL_SCRIPTDIR=share/mariadb/scripts + -DINSTALL_SCRIPTDIR=bin -DINSTALL_MYSQLDATADIR="${EPREFIX}/var/lib/mysql" -DINSTALL_SBINDIR=sbin -DINSTALL_SUPPORTFILESDIR="${EPREFIX}/usr/share/mariadb" @@ -685,10 +678,16 @@ src_install() { doexe "${BUILD_DIR}/extra/my_print_defaults" "${BUILD_DIR}/extra/perror" fi - # Remove mytop if perl is not selected - if [[ -e "${ED}/usr/bin/mytop" ]] && ! use perl ; then - rm -f "${ED}/usr/bin/mytop" || die - fi + # Remove bundled mytop in favor of dev-db/mytop + local mytop_file + for mytop_file in \ + "${ED}/usr/bin/mytop" \ + "${ED}/usr/share/man/man1/mytop.1" \ + ; do + if [[ -e "${mytop_file}" ]] ; then + rm -v "${mytop_file}" || die + fi + done # Fix a dangling symlink when galera is not built if [[ -L "${ED}/usr/bin/wsrep_sst_rsync_wan" ]] && ! use galera ; then @@ -775,63 +774,312 @@ pkg_postinst() { pkg_config() { _getoptval() { - local mypd="${EROOT}"/usr/libexec/mariadb/my_print_defaults - local section="$1" + local section="${1}" local flag="--${2}=" local extra_options="${3}" - "${mypd}" $extra_options $section | sed -n "/^${flag}/s,${flag},,gp" + local cmd=( + "${my_print_defaults_binary}" + "${extra_options}" + "${section}" + ) + local results=( $(eval "${cmd[@]}" 2>/dev/null | sed -n "/^${flag}/s,${flag},,gp") ) + + if [[ ${#results[@]} -gt 0 ]] ; then + # When option is set multiple times only return last value + echo "${results[-1]}" + fi } - local old_MY_DATADIR="${MY_DATADIR}" - local old_HOME="${HOME}" + + _mktemp_dry() { + # emktemp has no --dry-run option + local template="${1}" + + if [[ -z "${template}" ]] ; then + if [[ -z "${T}" ]] ; then + template="/tmp/XXXXXXX" + else + template="${T}/XXXXXXX" + fi + fi + + local template_wo_X=${template//X/} + local n_X + let n_X=${#template}-${#template_wo_X} + if [[ ${n_X} -lt 3 ]] ; then + echo "${FUNCNAME[0]}: too few X's in template ‘${template}’" >&2 + return + fi + + local attempts=0 + local character tmpfile + while [[ true ]] ; do + let attempts=attempts+1 + + new_file= + while read -n1 character ; do + if [[ "${character}" == "X" ]] ; then + tmpfile+="${RANDOM:0:1}" + else + tmpfile+="${character}" + fi + done < <(echo -n "${template}") + + if [[ ! -f "${tmpfile}" ]] + then + echo "${tmpfile}" + return + fi + + if [[ ${attempts} -ge 100 ]] ; then + echo "${FUNCNAME[0]}: Cannot create temporary file after 100 attempts." >&2 + return + fi + done + } + + local mysql_binary="${EROOT}/usr/bin/mysql" + if [[ ! -x "${mysql_binary}" ]] ; then + die "'${mysql_binary}' not found! Please re-install ${CATEGORY}/${PN}!" + fi + + local mysqld_binary="${EROOT}/usr/sbin/mysqld" + if [[ ! -x "${mysqld_binary}" ]] ; then + die "'${mysqld_binary}' not found! Please re-install ${CATEGORY}/${PN}!" + fi + + local mysql_install_db_binary="${EROOT}/usr/bin/mysql_install_db" + if [[ ! -x "${mysql_install_db_binary}" ]] ; then + die "'${mysql_install_db_binary}' not found! Please re-install ${CATEGORY}/${PN}!" + fi + + local my_print_defaults_binary="${EROOT}/usr/bin/my_print_defaults" + if [[ ! -x "${my_print_defaults_binary}" ]] ; then + die "'${my_print_defaults_binary}' not found! Please re-install dev-db/mysql-connector-c!" + fi + + if [[ -z "${MYSQL_USER}" ]] ; then + MYSQL_USER=mysql + if use prefix ; then + MYSQL_USER=$(id -u -n 2>/dev/null) + if [[ -z "${MYSQL_USER}" ]] ; then + die "Failed to determine current username!" + fi + fi + fi + + if [[ -z "${MYSQL_GROUP}" ]] ; then + MYSQL_GROUP=mysql + if use prefix ; then + MYSQL_GROUP=$(id -g -n 2>/dev/null) + if [[ -z "${MYSQL_GROUP}" ]] ; then + die "Failed to determine current user groupname!" + fi + fi + fi + # my_print_defaults needs to read stuff in $HOME/.my.cnf - export HOME=${EPREFIX}/root + local -x HOME="${EROOT}/root" # Make sure the vars are correctly initialized mysql_init_vars - [[ -z "${MY_DATADIR}" ]] && die "Sorry, unable to find MY_DATADIR" - if [[ ! -x "${EROOT}/usr/sbin/mysqld" ]] ; then - die "Minimal builds do NOT include the MySQL server" + # Read currently set data directory + MY_DATADIR="$(_getoptval mysqld datadir "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")" + + # Bug #213475 - MySQL _will_ object strenously if your machine is named + # localhost. Also causes weird failures. + [[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost" + + if [[ -z "${MY_DATADIR}" ]] ; then + die "Sorry, unable to find MY_DATADIR!" + elif [[ -d "${MY_DATADIR}/mysql" ]] ; then + ewarn "Looks like your data directory '${MY_DATADIR}' is already initialized!" + ewarn "Please rename or delete its content if you wish to initialize a new data directory." + die "${PN} data directory at '${MY_DATADIR}' looks already initialized!" fi - if [[ ( -n "${MY_DATADIR}" ) && ( "${MY_DATADIR}" != "${old_MY_DATADIR}" ) ]]; then - local MY_DATADIR_s="${ROOT}/${MY_DATADIR}" - MY_DATADIR_s="${MY_DATADIR_s%%/}" - local old_MY_DATADIR_s="${ROOT}/${old_MY_DATADIR}" - old_MY_DATADIR_s="${old_MY_DATADIR_s%%/}" + MYSQL_TMPDIR="$(_getoptval mysqld tmpdir "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")" + MYSQL_TMPDIR=${MYSQL_TMPDIR%/} + # These are dir+prefix + MYSQL_LOG_BIN="$(_getoptval mysqld log-bin "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")" + MYSQL_LOG_BIN=${MYSQL_LOG_BIN%/*} + MYSQL_RELAY_LOG="$(_getoptval mysqld relay-log "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")" + MYSQL_RELAY_LOG=${MYSQL_RELAY_LOG%/*} - if [[ ( -d "${old_MY_DATADIR_s}" ) && ( "${old_MY_DATADIR_s}" != / ) ]]; then - if [[ -d "${MY_DATADIR_s}" ]]; then - ewarn "Both ${old_MY_DATADIR_s} and ${MY_DATADIR_s} exist" - ewarn "Attempting to use ${MY_DATADIR_s} and preserving ${old_MY_DATADIR_s}" - else - elog "Moving MY_DATADIR from ${old_MY_DATADIR_s} to ${MY_DATADIR_s}" - mv --strip-trailing-slashes -T "${old_MY_DATADIR_s}" "${MY_DATADIR_s}" \ - || die "Moving MY_DATADIR failed" - fi + # Create missing directories. + # Always check if mysql user can write to directory even if we just + # created directory because a parent directory might be not + # accessible for that user. + PID_DIR="${EROOT}/run/mysqld" + if [[ ! -d "${PID_DIR}" ]] ; then + einfo "Creating ${PN} PID directory '${PID_DIR}' ..." + install -d -m 755 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${PID_DIR}" \ + || die "Failed to create PID directory '${PID_DIR}'!" + fi + + local _pid_dir_testfile="$(_mktemp_dry "${PID_DIR}/.pkg_config-access-test.XXXXXXXXX")" + [[ -z "${_pid_dir_testfile}" ]] \ + && die "_mktemp_dry() for '${PID_DIR}/.pkg_config-access-test.XXXXXXXXX' failed!" + + if use prefix ; then + touch "${_pid_dir_testfile}" &>/dev/null + else + su -s /bin/sh -c "touch ${_pid_dir_testfile}" ${MYSQL_USER} &>/dev/null + fi + + if [[ $? -ne 0 ]] ; then + die "${MYSQL_USER} user cannot write into PID dir '${PID_DIR}'!" + else + rm "${_pid_dir_testfile}" || die + unset _pid_dir_testfile + fi + + if [[ ! -d "${MY_DATADIR}" ]] ; then + einfo "Creating ${PN} data directory '${MY_DATADIR}' ..." + install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MY_DATADIR}" \ + || die "Failed to create ${PN} data directory '${MY_DATADIR}'!" + fi + + local _my_datadir_testfile="$(_mktemp_dry "${MY_DATADIR}/.pkg_config-access-test.XXXXXXXXX")" + [[ -z "${_my_datadir_testfile}" ]] \ + && die "_mktemp_dry() for '${MY_DATADIR}/.pkg_config-access-test.XXXXXXXXX' failed!" + + if use prefix ; then + touch "${_my_datadir_testfile}" &>/dev/null + else + su -s /bin/sh -c "touch ${_my_datadir_testfile}" ${MYSQL_USER} &>/dev/null + fi + + if [[ $? -ne 0 ]] ; then + die "${MYSQL_USER} user cannot write into data directory '${MY_DATADIR}'!" + else + rm "${_my_datadir_testfile}" || die + unset _my_datadir_testfile + fi + + if [[ -n "${MYSQL_TMPDIR}" && ! -d "${MYSQL_TMPDIR}" ]] ; then + einfo "Creating ${PN} tmpdir '${MYSQL_TMPDIR}' ..." + install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MYSQL_TMPDIR}" \ + || die "Failed to create ${PN} tmpdir '${MYSQL_TMPDIR}'!" + fi + + if [[ -z "${MYSQL_TMPDIR}" ]] ; then + MYSQL_TMPDIR="$(_mktemp_dry "${EROOT}/tmp/mysqld-tmp.XXXXXXXXX")" + [[ -z "${MYSQL_TMPDIR}" ]] \ + && die "_mktemp_dry() for '${MYSQL_TMPDIR}' failed!" + + mkdir "${MYSQL_TMPDIR}" || die + chown ${MYSQL_USER} "${MYSQL_TMPDIR}" || die + fi + + # Now we need to test MYSQL_TMPDIR... + local _my_tmpdir_testfile="$(_mktemp_dry "${MYSQL_TMPDIR}/.pkg_config-access-test.XXXXXXXXX")" + [[ -z "${_my_tmpdir_testfile}" ]] \ + && die "_mktemp_dry() for '${MYSQL_TMPDIR}/.pkg_config-access-test.XXXXXXXXX' failed!" + + if use prefix ; then + touch "${_my_tmpdir_testfile}" &>/dev/null + else + su -s /bin/sh -c "touch ${_my_tmpdir_testfile}" ${MYSQL_USER} &>/dev/null + fi + + if [[ $? -ne 0 ]] ; then + die "${MYSQL_USER} user cannot write into tmpdir '${MYSQL_TMPDIR}'!" + else + rm "${_my_tmpdir_testfile}" || die + unset _my_tmpdir_testfile + fi + + if [[ -n "${MYSQL_LOG_BIN}" && ! -d "${MYSQL_LOG_BIN}" ]] ; then + einfo "Creating ${PN} log-bin directory '${MYSQL_LOG_BIN}' ..." + install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MYSQL_LOG_BIN}" \ + || die "Failed to create ${PN} log-bin directory '${MYSQL_LOG_BIN}'" + fi + + if [[ -n "${MYSQL_LOG_BIN}" ]] ; then + local _my_logbin_testfile="$(_mktemp_dry "${MYSQL_LOG_BIN}/.pkg_config-access-test.XXXXXXXXX")" + [[ -z "${_my_logbin_testfile}" ]] \ + && die "_mktemp_dry() for '${MYSQL_LOG_BIN}/.pkg_config-access-test.XXXXXXXXX' failed!" + + if use prefix ; then + touch "${_my_logbin_testfile}" &>/dev/null else - ewarn "Previous MY_DATADIR (${old_MY_DATADIR_s}) does not exist" - if [[ -d "${MY_DATADIR_s}" ]]; then - ewarn "Attempting to use ${MY_DATADIR_s}" - else - eerror "New MY_DATADIR (${MY_DATADIR_s}) does not exist" - die "Configuration Failed! Please reinstall ${CATEGORY}/${PN}" - fi + su -s /bin/sh -c "touch ${_my_logbin_testfile}" ${MYSQL_USER} &>/dev/null + fi + + if [[ $? -ne 0 ]] ; then + die "${MYSQL_USER} user cannot write into log-bin directory '${MYSQL_LOG_BIN}'!" + else + rm "${_my_logbin_testfile}" || die + unset _my_logbin_testfile fi fi - local pwd1="a" - local pwd2="b" - local maxtry=15 + if [[ -n "${MYSQL_RELAY_LOG}" && ! -d "${MYSQL_RELAY_LOG}" ]] ; then + einfo "Creating ${PN} relay-log directory '${MYSQL_RELAY_LOG}' ..." + install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MYSQL_RELAY_LOG}" \ + || die "Failed to create ${PN} relay-log directory '${MYSQL_RELAY_LOG}'!" + fi + + if [[ -n "${MYSQL_RELAY_LOG}" ]] ; then + local _my_relaylog_testfile="$(_mktemp_dry "${MYSQL_RELAY_LOG}/.pkg_config-access-test.XXXXXXXXX")" + [[ -z "${_my_relaylog_testfile}" ]] \ + && die "_mktemp_dry() for '${MYSQL_RELAY_LOG}/.pkg_config-access-test.XXXXXXXXX' failed!" - if [ -z "${MYSQL_ROOT_PASSWORD}" ]; then + if use prefix ; then + touch "${_my_relaylog_testfile}" &>/dev/null + else + su -s /bin/sh -c "touch ${_my_relaylog_testfile}" ${MYSQL_USER} &>/dev/null + fi + + if [[ $? -ne 0 ]] ; then + die "${MYSQL_USER} user cannot write into relay-log directory '${MYSQL_RELAY_LOG}'!" + else + rm "${_my_relaylog_testfile}" || die + unset _my_relaylog_testfile + fi + fi + + local SETUP_TMPDIR=$(mktemp -d "/tmp/${PN}-config.XXXXXXXXX" 2>/dev/null) + [[ -z "${SETUP_TMPDIR}" ]] && die "Failed to create setup tmpdir" + + # Limit access + chmod 0770 "${SETUP_TMPDIR}" || die + chown ${MYSQL_USER} "${SETUP_TMPDIR}" || die + + local mysql_install_log="${SETUP_TMPDIR}/install_db.log" + local mysqld_logfile="${SETUP_TMPDIR}/mysqld.log" + + echo "" + einfo "Detected settings:" + einfo "==================" + einfo "MySQL User:\t\t\t\t${MYSQL_USER}" + einfo "MySQL Group:\t\t\t\t${MYSQL_GROUP}" + einfo "MySQL DATA directory:\t\t${MY_DATADIR}" + einfo "MySQL TMP directory:\t\t\t${MYSQL_TMPDIR}" + + if [[ -n "${MYSQL_LOG_BIN}" ]] ; then + einfo "MySQL Binary Log File location:\t${MYSQL_LOG_BIN}" + fi + + if [[ -n "${MYSQL_RELAY_LOG}" ]] ; then + einfo "MySQL Relay Log File location:\t${MYSQL_RELAY_LOG}" + fi + + einfo "PID DIR:\t\t\t\t${PID_DIR}" + einfo "Install db log:\t\t\t${mysql_install_log}" + einfo "Install server log:\t\t\t${mysqld_logfile}" + + echo + + if [[ -z "${MYSQL_ROOT_PASSWORD}" ]] ; then local tmp_mysqld_password_source= - for tmp_mysqld_password_source in mysql client; do + for tmp_mysqld_password_source in mysql client ; do einfo "Trying to get password for mysql 'root' user from '${tmp_mysqld_password_source}' section ..." MYSQL_ROOT_PASSWORD="$(_getoptval "${tmp_mysqld_password_source}" password)" - if [[ -n "${MYSQL_ROOT_PASSWORD}" ]]; then - if [[ ${MYSQL_ROOT_PASSWORD} == *$'\n'* ]]; then + if [[ -n "${MYSQL_ROOT_PASSWORD}" ]] ; then + if [[ ${MYSQL_ROOT_PASSWORD} == *$'\n'* ]] ; then ewarn "Ignoring password from '${tmp_mysqld_password_source}' section due to newline character (do you have multiple password options set?)!" MYSQL_ROOT_PASSWORD= continue @@ -843,167 +1091,189 @@ pkg_config() { done # Sometimes --show is required to display passwords in some implementations of my_print_defaults - if [[ "${MYSQL_ROOT_PASSWORD}" == '*****' ]]; then + if [[ "${MYSQL_ROOT_PASSWORD}" == '*****' ]] ; then MYSQL_ROOT_PASSWORD="$(_getoptval "${tmp_mysqld_password_source}" password --show)" fi unset tmp_mysqld_password_source fi - MYSQL_TMPDIR="$(_getoptval mysqld tmpdir | tail -n1)" - # These are dir+prefix - MYSQL_RELAY_LOG="$(_getoptval mysqld relay-log | tail -n1)" - MYSQL_RELAY_LOG=${MYSQL_RELAY_LOG%/*} - MYSQL_LOG_BIN="$(_getoptval mysqld log-bin | tail -n1)" - MYSQL_LOG_BIN=${MYSQL_LOG_BIN%/*} - if [[ ! -d "${ROOT}/$MYSQL_TMPDIR" ]]; then - einfo "Creating MySQL tmpdir $MYSQL_TMPDIR" - install -d -m 770 -o mysql -g mysql "${EROOT}/$MYSQL_TMPDIR" - fi - if [[ ! -d "${ROOT}/$MYSQL_LOG_BIN" ]]; then - einfo "Creating MySQL log-bin directory $MYSQL_LOG_BIN" - install -d -m 770 -o mysql -g mysql "${EROOT}/$MYSQL_LOG_BIN" - fi - if [[ ! -d "${EROOT}/$MYSQL_RELAY_LOG" ]]; then - einfo "Creating MySQL relay-log directory $MYSQL_RELAY_LOG" - install -d -m 770 -o mysql -g mysql "${EROOT}/$MYSQL_RELAY_LOG" - fi - - if [[ -d "${ROOT}/${MY_DATADIR}/mysql" ]] ; then - ewarn "You have already a MySQL database in place." - ewarn "(${ROOT}/${MY_DATADIR}/*)" - ewarn "Please rename or delete it if you wish to replace it." - die "MySQL database already exists!" - fi - - # Bug #213475 - MySQL _will_ object strenously if your machine is named - # localhost. Also causes weird failures. - [[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost" - - if [[ -z "${MYSQL_ROOT_PASSWORD}" ]]; then - - einfo "Please provide a password for the mysql 'root'@'localhost' user now" - einfo "or through the ${HOME}/.my.cnf file." - ewarn "Avoid [\"'\\_%] characters in the password" + if [[ -z "${MYSQL_ROOT_PASSWORD}" ]] ; then + local pwd1="a" + local pwd2="b" + + echo + einfo "No password for mysql 'root' user was specified via environment" + einfo "variable MYSQL_ROOT_PASSWORD and no password was found in config" + einfo "file like '${HOME}/.my.cnf'." + einfo "To continue please provide a password for the mysql 'root' user" + einfo "now on console:" + ewarn "NOTE: Please avoid [\"'\\_%] characters in the password!" read -rsp " >" pwd1 ; echo einfo "Retype the password" read -rsp " >" pwd2 ; echo - if [[ "x$pwd1" != "x$pwd2" ]] ; then - die "Passwords are not the same" + if [[ "x${pwd1}" != "x${pwd2}" ]] ; then + die "Passwords are not the same!" fi MYSQL_ROOT_PASSWORD="${pwd1}" unset pwd1 pwd2 + + echo fi - local options - local sqltmp="$(emktemp)" + local -a mysqld_options # Fix bug 446200. Don't reference host my.cnf, needs to come first, - # see https://bugs.mysql.com/bug.php?id=31312 - use prefix && options="${options} '--defaults-file=${MY_SYSCONFDIR}/my.cnf'" + # see http://bugs.mysql.com/bug.php?id=31312 + use prefix && mysqld_options+=( "--defaults-file='${MY_SYSCONFDIR}/my.cnf'" ) # Figure out which options we need to disable to do the setup local helpfile="${TMPDIR}/mysqld-help" "${EROOT}/usr/sbin/mysqld" --verbose --help >"${helpfile}" 2>/dev/null - for opt in grant-tables host-cache name-resolve networking slave-start \ + + local opt optexp optfull + for opt in host-cache name-resolve networking slave-start \ federated ssl log-bin relay-log slow-query-log external-locking \ log-slave-updates \ - ; do + ; do optexp="--(skip-)?${opt}" optfull="--loose-skip-${opt}" - egrep -sq -- "${optexp}" "${helpfile}" && options="${options} ${optfull}" + egrep -sq -- "${optexp}" "${helpfile}" && mysqld_options+=( "${optfull}" ) done - einfo "Creating the mysql database and setting proper permissions on it ..." + # Prepare timezones, see + # https://dev.mysql.com/doc/mysql/en/time-zone-support.html + local tz_sql="${SETUP_TMPDIR}/tz.sql" - # Now that /var/run is a tmpfs mount point, we need to ensure it exists before using it - PID_DIR="${EROOT}/var/run/mysqld" - if [[ ! -d "${PID_DIR}" ]]; then - install -d -m 755 -o mysql -g mysql "${PID_DIR}" || die "Could not create pid directory" + echo "USE mysql;" >"${tz_sql}" + "${EROOT}/usr/bin/mysql_tzinfo_to_sql" "${EROOT}/usr/share/zoneinfo" >> "${tz_sql}" 2>/dev/null + if [[ $? -ne 0 ]] ; then + die "mysql_tzinfo_to_sql failed!" fi - if [[ ! -d "${MY_DATADIR}" ]]; then - install -d -m 750 -o mysql -g mysql "${MY_DATADIR}" || die "Could not create data directory" - fi + local cmd=( + "${mysql_install_db_binary}" + "${mysqld_options[@]}" + "--init-file='${tz_sql}'" + "--basedir='${EROOT}/usr'" + "--datadir='${MY_DATADIR}'" + "--tmpdir='${MYSQL_TMPDIR}'" + "--log-error='${mysql_install_log}'" + "--rpm" + "--cross-bootstrap" + "--skip-test-db" + "--user=${MYSQL_USER}" + ) - pushd "${TMPDIR}" &>/dev/null || die + einfo "Initializing ${PN} data directory: ${cmd[@]}" + eval "${cmd[@]}" >>"${mysql_install_log}" 2>&1 - # Filling timezones, see - # https://dev.mysql.com/doc/mysql/en/time-zone-support.html - "${EROOT}/usr/bin/mysql_tzinfo_to_sql" "${EROOT}/usr/share/zoneinfo" > "${sqltmp}" 2>/dev/null - - local cmd=( "${EROOT}/usr/share/mariadb/scripts/mysql_install_db" ) - [[ -f "${cmd}" ]] || cmd=( "${EROOT}/usr/bin/mysql_install_db" ) - cmd+=( "--basedir=${EPREFIX}/usr" ${options} "--datadir=${ROOT}/${MY_DATADIR}" "--tmpdir=${ROOT}/${MYSQL_TMPDIR}" ) - einfo "Command: ${cmd[*]}" - su -s /bin/sh -c "${cmd[*]}" mysql \ - >"${TMPDIR}"/mysql_install_db.log 2>&1 - if [[ $? -ne 0 ]]; then - grep -B5 -A999 -i "ERROR" "${TMPDIR}"/mysql_install_db.log 1>&2 - die "Failed to initialize mysqld. Please review ${EPREFIX}/var/log/mysql/mysqld.err AND ${TMPDIR}/mysql_install_db.log" + if [[ $? -ne 0 || ! -f "${MY_DATADIR}/mysql/user.frm" ]] ; then + grep -B5 -A999 -iE "(Aborting|ERROR|errno)" "${mysql_install_log}" 1>&2 + die "Failed to initialize ${PN} data directory. Please review '${mysql_install_log}'!" fi - popd &>/dev/null || die - [[ -f "${ROOT}/${MY_DATADIR}/mysql/user.frm" ]] \ - || die "MySQL databases not installed" - - use prefix || options="${options} --user=mysql" - - local socket="${EROOT}/var/run/mysqld/mysqld${RANDOM}.sock" - local pidfile="${EROOT}/var/run/mysqld/mysqld${RANDOM}.pid" - local mysqld="${EROOT}/usr/sbin/mysqld \ - ${options} \ - --log-warnings=0 \ - --basedir=${EROOT}/usr \ - --datadir=${ROOT}/${MY_DATADIR} \ - --max_allowed_packet=8M \ - --net_buffer_length=16K \ - --socket=${socket} \ - --pid-file=${pidfile} \ - --tmpdir=${ROOT}/${MYSQL_TMPDIR}" - #einfo "About to start mysqld: ${mysqld}" - ebegin "Starting mysqld" - einfo "Command ${mysqld}" - ${mysqld} & - rc=$? - while ! [[ -S "${socket}" || "${maxtry}" -lt 1 ]] ; do + + local x=${RANDOM} + local socket="${PID_DIR}/mysqld.${x}.sock" + [[ -f "${socket}" ]] && die "Randomness failed; Socket ${socket} already exists!" + local pidfile="${PID_DIR}/mysqld.${x}.pid" + [[ -f "${pidfile}" ]] && die "Randomness failed; Pidfile ${pidfile} already exists!" + unset x + + cmd=( + "${mysqld_binary}" + "${mysqld_options[@]}" + "--basedir='${EROOT}/usr'" + "--datadir='${MY_DATADIR}'" + "--tmpdir='${MYSQL_TMPDIR}'" + --max_allowed_packet=8M + --net_buffer_length=16K + "--socket='${socket}'" + "--pid-file='${pidfile}'" + "--log-error='${mysqld_logfile}'" + "--user=${MYSQL_USER}" + ) + + einfo "Starting mysqld to finalize initialization: ${cmd[@]}" + eval "${cmd[@]}" >>"${mysqld_logfile}" 2>&1 & + + echo -n "Waiting for mysqld to accept connections " + local maxtry=15 + while [[ ! -S "${socket}" && "${maxtry}" -gt 1 ]] ; do maxtry=$((${maxtry}-1)) echo -n "." sleep 1 done - eend $rc - if ! [[ -S "${socket}" ]]; then - die "Completely failed to start up mysqld with: ${mysqld}" + if [[ -S "${socket}" ]] ; then + # Even with a socket we don't know if mysqld will abort + # start due to an error so just wait a little bit more... + maxtry=5 + while [[ -S "${socket}" && "${maxtry}" -gt 1 ]] ; do + maxtry=$((${maxtry}-1)) + echo -n "." + sleep 1 + done + fi + + echo + + if [[ ! -S "${socket}" ]] ; then + grep -B5 -A999 -iE "(Aborting|ERROR|errno)" "${mysqld_logfile}" 1>&2 + die "mysqld was unable to start from initialized data directory. Please review '${mysqld_logfile}'!" fi + local mysql_logfile="${SETUP_TMPDIR}/set_root_pw.log" + touch "${mysql_logfile}" || die + ebegin "Setting root password" # Do this from memory, as we don't want clear text passwords in temp files - local sql="UPDATE mysql.user SET Password = PASSWORD('${MYSQL_ROOT_PASSWORD}') WHERE USER='root'; FLUSH PRIVILEGES" - "${EROOT}/usr/bin/mysql" \ - "--socket=${socket}" \ - -hlocalhost \ - -e "${sql}" - eend $? - - if [[ -n "${sqltmp}" ]] ; then - ebegin "Loading \"zoneinfo\", this step may require a few seconds" - "${EROOT}/usr/bin/mysql" \ - "--socket=${socket}" \ - -hlocalhost \ - -uroot \ - --password="${MYSQL_ROOT_PASSWORD}" \ - mysql < "${sqltmp}" - rc=$? - eend $? - [[ $rc -ne 0 ]] && ewarn "Failed to load zoneinfo!" - fi - - # Stop the server and cleanup - einfo "Stopping the server ..." - kill $(< "${pidfile}" ) - rm -f "${sqltmp}" - wait %1 - einfo "Done" + local sql="ALTER USER 'root'@'localhost' IDENTIFIED BY '${MYSQL_ROOT_PASSWORD}'" + cmd=( + "${mysql_binary}" + --no-defaults + "--socket='${socket}'" + -hlocalhost + "-e \"${sql}\"" + ) + eval "${cmd[@]}" >"${mysql_logfile}" 2>&1 + local rc=$? + eend ${rc} + + if [[ ${rc} -ne 0 ]] ; then + # Poor man's solution which tries to avoid having password + # in log. NOTE: sed can fail if user didn't follow advice + # and included character which will require escaping... + sed -i -e "s/${MYSQL_ROOT_PASSWORD}/*****/" "${mysql_logfile}" 2>/dev/null + + grep -B5 -A999 -iE "(Aborting|ERROR|errno)" "${mysql_logfile}" + die "Failed to set ${PN} root password. Please review '${mysql_logfile}'!" + fi + + # Stop the server + if [[ -f "${pidfile}" ]] && pgrep -F "${pidfile}" &>/dev/null ; then + echo -n "Stopping the server " + pkill -F "${pidfile}" &>/dev/null + + maxtry=10 + while [[ -f "${pidfile}" ]] && pgrep -F "${pidfile}" &>/dev/null ; do + maxtry=$((${maxtry}-1)) + echo -n "." + sleep 1 + done + + echo + + if [[ -f "${pidfile}" ]] && pgrep -F "${pidfile}" &>/dev/null ; then + # We somehow failed to stop server. + # However, not a fatal error. Just warn the user. + ewarn "WARNING: mysqld[$(cat "${pidfile}")] is still running!" + fi + fi + + rm -r "${SETUP_TMPDIR}" || die + + einfo "${PN} data directory at '${MY_DATADIR}' successfully initialized!" } diff --git a/dev-db/mariadb/mariadb-10.4.18.ebuild b/dev-db/mariadb/mariadb-10.4.18-r2.ebuild index ec758248c228..a372d07959ca 100644 --- a/dev-db/mariadb/mariadb-10.4.18.ebuild +++ b/dev-db/mariadb/mariadb-10.4.18-r2.ebuild @@ -33,7 +33,7 @@ REQUIRED_USE="jdbc? ( extraengine server !static ) ?? ( tcmalloc jemalloc ) static? ( yassl !pam )" -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" +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" # Shorten the path because the socket path length must be shorter than 107 chars # and we will run a mysql server during test phase @@ -112,13 +112,6 @@ RDEPEND="selinux? ( sec-policy/selinux-mysql ) !prefix? ( dev-db/mysql-init-scripts acct-group/mysql acct-user/mysql ) extraengine? ( jdbc? ( >=virtual/jre-1.6 ) ) ) - perl? ( - !dev-db/mytop - virtual/perl-Getopt-Long - dev-perl/TermReadKey - virtual/perl-Term-ANSIColor - virtual/perl-Time-HiRes - ) " # For other stuff to bring us in # dev-perl/DBD-mysql is needed by some scripts installed by MySQL @@ -325,7 +318,7 @@ src_configure() { -DINSTALL_MANDIR=share/man -DINSTALL_MYSQLSHAREDIR=share/mariadb -DINSTALL_PLUGINDIR=$(get_libdir)/mariadb/plugin - -DINSTALL_SCRIPTDIR=share/mariadb/scripts + -DINSTALL_SCRIPTDIR=bin -DINSTALL_MYSQLDATADIR="${EPREFIX}/var/lib/mysql" -DINSTALL_SBINDIR=sbin -DINSTALL_SUPPORTFILESDIR="${EPREFIX}/usr/share/mariadb" @@ -704,10 +697,16 @@ src_install() { fi fi - # Remove mytop if perl is not selected - if [[ -e "${ED}/usr/bin/mytop" ]] && ! use perl ; then - rm -f "${ED}/usr/bin/mytop" || die - fi + # Remove bundled mytop in favor of dev-db/mytop + local mytop_file + for mytop_file in \ + "${ED}/usr/bin/mytop" \ + "${ED}/usr/share/man/man1/mytop.1" \ + ; do + if [[ -e "${mytop_file}" ]] ; then + rm -v "${mytop_file}" || die + fi + done # Fix a dangling symlink when galera is not built if [[ -L "${ED}/usr/bin/wsrep_sst_rsync_wan" ]] && ! use galera ; then @@ -794,63 +793,312 @@ pkg_postinst() { pkg_config() { _getoptval() { - local mypd="${EROOT}"/usr/libexec/mariadb/my_print_defaults - local section="$1" + local section="${1}" local flag="--${2}=" local extra_options="${3}" - "${mypd}" $extra_options $section | sed -n "/^${flag}/s,${flag},,gp" + local cmd=( + "${my_print_defaults_binary}" + "${extra_options}" + "${section}" + ) + local results=( $(eval "${cmd[@]}" 2>/dev/null | sed -n "/^${flag}/s,${flag},,gp") ) + + if [[ ${#results[@]} -gt 0 ]] ; then + # When option is set multiple times only return last value + echo "${results[-1]}" + fi + } + + _mktemp_dry() { + # emktemp has no --dry-run option + local template="${1}" + + if [[ -z "${template}" ]] ; then + if [[ -z "${T}" ]] ; then + template="/tmp/XXXXXXX" + else + template="${T}/XXXXXXX" + fi + fi + + local template_wo_X=${template//X/} + local n_X + let n_X=${#template}-${#template_wo_X} + if [[ ${n_X} -lt 3 ]] ; then + echo "${FUNCNAME[0]}: too few X's in template ‘${template}’" >&2 + return + fi + + local attempts=0 + local character tmpfile + while [[ true ]] ; do + let attempts=attempts+1 + + new_file= + while read -n1 character ; do + if [[ "${character}" == "X" ]] ; then + tmpfile+="${RANDOM:0:1}" + else + tmpfile+="${character}" + fi + done < <(echo -n "${template}") + + if [[ ! -f "${tmpfile}" ]] + then + echo "${tmpfile}" + return + fi + + if [[ ${attempts} -ge 100 ]] ; then + echo "${FUNCNAME[0]}: Cannot create temporary file after 100 attempts." >&2 + return + fi + done } - local old_MY_DATADIR="${MY_DATADIR}" - local old_HOME="${HOME}" + + local mysql_binary="${EROOT}/usr/bin/mysql" + if [[ ! -x "${mysql_binary}" ]] ; then + die "'${mysql_binary}' not found! Please re-install ${CATEGORY}/${PN}!" + fi + + local mysqld_binary="${EROOT}/usr/sbin/mysqld" + if [[ ! -x "${mysqld_binary}" ]] ; then + die "'${mysqld_binary}' not found! Please re-install ${CATEGORY}/${PN}!" + fi + + local mysql_install_db_binary="${EROOT}/usr/bin/mysql_install_db" + if [[ ! -x "${mysql_install_db_binary}" ]] ; then + die "'${mysql_install_db_binary}' not found! Please re-install ${CATEGORY}/${PN}!" + fi + + local my_print_defaults_binary="${EROOT}/usr/bin/my_print_defaults" + if [[ ! -x "${my_print_defaults_binary}" ]] ; then + die "'${my_print_defaults_binary}' not found! Please re-install dev-db/mysql-connector-c!" + fi + + if [[ -z "${MYSQL_USER}" ]] ; then + MYSQL_USER=mysql + if use prefix ; then + MYSQL_USER=$(id -u -n 2>/dev/null) + if [[ -z "${MYSQL_USER}" ]] ; then + die "Failed to determine current username!" + fi + fi + fi + + if [[ -z "${MYSQL_GROUP}" ]] ; then + MYSQL_GROUP=mysql + if use prefix ; then + MYSQL_GROUP=$(id -g -n 2>/dev/null) + if [[ -z "${MYSQL_GROUP}" ]] ; then + die "Failed to determine current user groupname!" + fi + fi + fi + # my_print_defaults needs to read stuff in $HOME/.my.cnf - export HOME=${EPREFIX}/root + local -x HOME="${EROOT}/root" # Make sure the vars are correctly initialized mysql_init_vars - [[ -z "${MY_DATADIR}" ]] && die "Sorry, unable to find MY_DATADIR" - if [[ ! -x "${EROOT}/usr/sbin/mysqld" ]] ; then - die "Minimal builds do NOT include the MySQL server" + # Read currently set data directory + MY_DATADIR="$(_getoptval mysqld datadir "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")" + + # Bug #213475 - MySQL _will_ object strenously if your machine is named + # localhost. Also causes weird failures. + [[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost" + + if [[ -z "${MY_DATADIR}" ]] ; then + die "Sorry, unable to find MY_DATADIR!" + elif [[ -d "${MY_DATADIR}/mysql" ]] ; then + ewarn "Looks like your data directory '${MY_DATADIR}' is already initialized!" + ewarn "Please rename or delete its content if you wish to initialize a new data directory." + die "${PN} data directory at '${MY_DATADIR}' looks already initialized!" fi - if [[ ( -n "${MY_DATADIR}" ) && ( "${MY_DATADIR}" != "${old_MY_DATADIR}" ) ]]; then - local MY_DATADIR_s="${ROOT}/${MY_DATADIR}" - MY_DATADIR_s="${MY_DATADIR_s%%/}" - local old_MY_DATADIR_s="${ROOT}/${old_MY_DATADIR}" - old_MY_DATADIR_s="${old_MY_DATADIR_s%%/}" + MYSQL_TMPDIR="$(_getoptval mysqld tmpdir "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")" + MYSQL_TMPDIR=${MYSQL_TMPDIR%/} + # These are dir+prefix + MYSQL_LOG_BIN="$(_getoptval mysqld log-bin "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")" + MYSQL_LOG_BIN=${MYSQL_LOG_BIN%/*} + MYSQL_RELAY_LOG="$(_getoptval mysqld relay-log "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")" + MYSQL_RELAY_LOG=${MYSQL_RELAY_LOG%/*} - if [[ ( -d "${old_MY_DATADIR_s}" ) && ( "${old_MY_DATADIR_s}" != / ) ]]; then - if [[ -d "${MY_DATADIR_s}" ]]; then - ewarn "Both ${old_MY_DATADIR_s} and ${MY_DATADIR_s} exist" - ewarn "Attempting to use ${MY_DATADIR_s} and preserving ${old_MY_DATADIR_s}" - else - elog "Moving MY_DATADIR from ${old_MY_DATADIR_s} to ${MY_DATADIR_s}" - mv --strip-trailing-slashes -T "${old_MY_DATADIR_s}" "${MY_DATADIR_s}" \ - || die "Moving MY_DATADIR failed" - fi + # Create missing directories. + # Always check if mysql user can write to directory even if we just + # created directory because a parent directory might be not + # accessible for that user. + PID_DIR="${EROOT}/run/mysqld" + if [[ ! -d "${PID_DIR}" ]] ; then + einfo "Creating ${PN} PID directory '${PID_DIR}' ..." + install -d -m 755 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${PID_DIR}" \ + || die "Failed to create PID directory '${PID_DIR}'!" + fi + + local _pid_dir_testfile="$(_mktemp_dry "${PID_DIR}/.pkg_config-access-test.XXXXXXXXX")" + [[ -z "${_pid_dir_testfile}" ]] \ + && die "_mktemp_dry() for '${PID_DIR}/.pkg_config-access-test.XXXXXXXXX' failed!" + + if use prefix ; then + touch "${_pid_dir_testfile}" &>/dev/null + else + su -s /bin/sh -c "touch ${_pid_dir_testfile}" ${MYSQL_USER} &>/dev/null + fi + + if [[ $? -ne 0 ]] ; then + die "${MYSQL_USER} user cannot write into PID dir '${PID_DIR}'!" + else + rm "${_pid_dir_testfile}" || die + unset _pid_dir_testfile + fi + + if [[ ! -d "${MY_DATADIR}" ]] ; then + einfo "Creating ${PN} data directory '${MY_DATADIR}' ..." + install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MY_DATADIR}" \ + || die "Failed to create ${PN} data directory '${MY_DATADIR}'!" + fi + + local _my_datadir_testfile="$(_mktemp_dry "${MY_DATADIR}/.pkg_config-access-test.XXXXXXXXX")" + [[ -z "${_my_datadir_testfile}" ]] \ + && die "_mktemp_dry() for '${MY_DATADIR}/.pkg_config-access-test.XXXXXXXXX' failed!" + + if use prefix ; then + touch "${_my_datadir_testfile}" &>/dev/null + else + su -s /bin/sh -c "touch ${_my_datadir_testfile}" ${MYSQL_USER} &>/dev/null + fi + + if [[ $? -ne 0 ]] ; then + die "${MYSQL_USER} user cannot write into data directory '${MY_DATADIR}'!" + else + rm "${_my_datadir_testfile}" || die + unset _my_datadir_testfile + fi + + if [[ -n "${MYSQL_TMPDIR}" && ! -d "${MYSQL_TMPDIR}" ]] ; then + einfo "Creating ${PN} tmpdir '${MYSQL_TMPDIR}' ..." + install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MYSQL_TMPDIR}" \ + || die "Failed to create ${PN} tmpdir '${MYSQL_TMPDIR}'!" + fi + + if [[ -z "${MYSQL_TMPDIR}" ]] ; then + MYSQL_TMPDIR="$(_mktemp_dry "${EROOT}/tmp/mysqld-tmp.XXXXXXXXX")" + [[ -z "${MYSQL_TMPDIR}" ]] \ + && die "_mktemp_dry() for '${MYSQL_TMPDIR}' failed!" + + mkdir "${MYSQL_TMPDIR}" || die + chown ${MYSQL_USER} "${MYSQL_TMPDIR}" || die + fi + + # Now we need to test MYSQL_TMPDIR... + local _my_tmpdir_testfile="$(_mktemp_dry "${MYSQL_TMPDIR}/.pkg_config-access-test.XXXXXXXXX")" + [[ -z "${_my_tmpdir_testfile}" ]] \ + && die "_mktemp_dry() for '${MYSQL_TMPDIR}/.pkg_config-access-test.XXXXXXXXX' failed!" + + if use prefix ; then + touch "${_my_tmpdir_testfile}" &>/dev/null + else + su -s /bin/sh -c "touch ${_my_tmpdir_testfile}" ${MYSQL_USER} &>/dev/null + fi + + if [[ $? -ne 0 ]] ; then + die "${MYSQL_USER} user cannot write into tmpdir '${MYSQL_TMPDIR}'!" + else + rm "${_my_tmpdir_testfile}" || die + unset _my_tmpdir_testfile + fi + + if [[ -n "${MYSQL_LOG_BIN}" && ! -d "${MYSQL_LOG_BIN}" ]] ; then + einfo "Creating ${PN} log-bin directory '${MYSQL_LOG_BIN}' ..." + install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MYSQL_LOG_BIN}" \ + || die "Failed to create ${PN} log-bin directory '${MYSQL_LOG_BIN}'" + fi + + if [[ -n "${MYSQL_LOG_BIN}" ]] ; then + local _my_logbin_testfile="$(_mktemp_dry "${MYSQL_LOG_BIN}/.pkg_config-access-test.XXXXXXXXX")" + [[ -z "${_my_logbin_testfile}" ]] \ + && die "_mktemp_dry() for '${MYSQL_LOG_BIN}/.pkg_config-access-test.XXXXXXXXX' failed!" + + if use prefix ; then + touch "${_my_logbin_testfile}" &>/dev/null else - ewarn "Previous MY_DATADIR (${old_MY_DATADIR_s}) does not exist" - if [[ -d "${MY_DATADIR_s}" ]]; then - ewarn "Attempting to use ${MY_DATADIR_s}" - else - eerror "New MY_DATADIR (${MY_DATADIR_s}) does not exist" - die "Configuration Failed! Please reinstall ${CATEGORY}/${PN}" - fi + su -s /bin/sh -c "touch ${_my_logbin_testfile}" ${MYSQL_USER} &>/dev/null + fi + + if [[ $? -ne 0 ]] ; then + die "${MYSQL_USER} user cannot write into log-bin directory '${MYSQL_LOG_BIN}'!" + else + rm "${_my_logbin_testfile}" || die + unset _my_logbin_testfile fi fi - local pwd1="a" - local pwd2="b" - local maxtry=15 + if [[ -n "${MYSQL_RELAY_LOG}" && ! -d "${MYSQL_RELAY_LOG}" ]] ; then + einfo "Creating ${PN} relay-log directory '${MYSQL_RELAY_LOG}' ..." + install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MYSQL_RELAY_LOG}" \ + || die "Failed to create ${PN} relay-log directory '${MYSQL_RELAY_LOG}'!" + fi + + if [[ -n "${MYSQL_RELAY_LOG}" ]] ; then + local _my_relaylog_testfile="$(_mktemp_dry "${MYSQL_RELAY_LOG}/.pkg_config-access-test.XXXXXXXXX")" + [[ -z "${_my_relaylog_testfile}" ]] \ + && die "_mktemp_dry() for '${MYSQL_RELAY_LOG}/.pkg_config-access-test.XXXXXXXXX' failed!" - if [ -z "${MYSQL_ROOT_PASSWORD}" ]; then + if use prefix ; then + touch "${_my_relaylog_testfile}" &>/dev/null + else + su -s /bin/sh -c "touch ${_my_relaylog_testfile}" ${MYSQL_USER} &>/dev/null + fi + + if [[ $? -ne 0 ]] ; then + die "${MYSQL_USER} user cannot write into relay-log directory '${MYSQL_RELAY_LOG}'!" + else + rm "${_my_relaylog_testfile}" || die + unset _my_relaylog_testfile + fi + fi + + local SETUP_TMPDIR=$(mktemp -d "/tmp/${PN}-config.XXXXXXXXX" 2>/dev/null) + [[ -z "${SETUP_TMPDIR}" ]] && die "Failed to create setup tmpdir" + + # Limit access + chmod 0770 "${SETUP_TMPDIR}" || die + chown ${MYSQL_USER} "${SETUP_TMPDIR}" || die + + local mysql_install_log="${SETUP_TMPDIR}/install_db.log" + local mysqld_logfile="${SETUP_TMPDIR}/mysqld.log" + + echo "" + einfo "Detected settings:" + einfo "==================" + einfo "MySQL User:\t\t\t\t${MYSQL_USER}" + einfo "MySQL Group:\t\t\t\t${MYSQL_GROUP}" + einfo "MySQL DATA directory:\t\t${MY_DATADIR}" + einfo "MySQL TMP directory:\t\t\t${MYSQL_TMPDIR}" + + if [[ -n "${MYSQL_LOG_BIN}" ]] ; then + einfo "MySQL Binary Log File location:\t${MYSQL_LOG_BIN}" + fi + + if [[ -n "${MYSQL_RELAY_LOG}" ]] ; then + einfo "MySQL Relay Log File location:\t${MYSQL_RELAY_LOG}" + fi + + einfo "PID DIR:\t\t\t\t${PID_DIR}" + einfo "Install db log:\t\t\t${mysql_install_log}" + einfo "Install server log:\t\t\t${mysqld_logfile}" + + echo + + if [[ -z "${MYSQL_ROOT_PASSWORD}" ]] ; then local tmp_mysqld_password_source= - for tmp_mysqld_password_source in mysql client; do + for tmp_mysqld_password_source in mysql client ; do einfo "Trying to get password for mysql 'root' user from '${tmp_mysqld_password_source}' section ..." MYSQL_ROOT_PASSWORD="$(_getoptval "${tmp_mysqld_password_source}" password)" - if [[ -n "${MYSQL_ROOT_PASSWORD}" ]]; then - if [[ ${MYSQL_ROOT_PASSWORD} == *$'\n'* ]]; then + if [[ -n "${MYSQL_ROOT_PASSWORD}" ]] ; then + if [[ ${MYSQL_ROOT_PASSWORD} == *$'\n'* ]] ; then ewarn "Ignoring password from '${tmp_mysqld_password_source}' section due to newline character (do you have multiple password options set?)!" MYSQL_ROOT_PASSWORD= continue @@ -862,179 +1110,189 @@ pkg_config() { done # Sometimes --show is required to display passwords in some implementations of my_print_defaults - if [[ "${MYSQL_ROOT_PASSWORD}" == '*****' ]]; then + if [[ "${MYSQL_ROOT_PASSWORD}" == '*****' ]] ; then MYSQL_ROOT_PASSWORD="$(_getoptval "${tmp_mysqld_password_source}" password --show)" fi unset tmp_mysqld_password_source fi - MYSQL_TMPDIR="$(_getoptval mysqld tmpdir | tail -n1)" - # These are dir+prefix - MYSQL_RELAY_LOG="$(_getoptval mysqld relay-log | tail -n1)" - MYSQL_RELAY_LOG=${MYSQL_RELAY_LOG%/*} - MYSQL_LOG_BIN="$(_getoptval mysqld log-bin | tail -n1)" - MYSQL_LOG_BIN=${MYSQL_LOG_BIN%/*} - - if [[ ! -d "${ROOT}/$MYSQL_TMPDIR" ]]; then - einfo "Creating MySQL tmpdir $MYSQL_TMPDIR" - install -d -m 770 -o mysql -g mysql "${EROOT}/$MYSQL_TMPDIR" - fi - if [[ ! -d "${ROOT}/$MYSQL_LOG_BIN" ]]; then - einfo "Creating MySQL log-bin directory $MYSQL_LOG_BIN" - install -d -m 770 -o mysql -g mysql "${EROOT}/$MYSQL_LOG_BIN" - fi - if [[ ! -d "${EROOT}/$MYSQL_RELAY_LOG" ]]; then - einfo "Creating MySQL relay-log directory $MYSQL_RELAY_LOG" - install -d -m 770 -o mysql -g mysql "${EROOT}/$MYSQL_RELAY_LOG" - fi - - if [[ -d "${ROOT}/${MY_DATADIR}/mysql" ]] ; then - ewarn "You have already a MySQL database in place." - ewarn "(${ROOT}/${MY_DATADIR}/*)" - ewarn "Please rename or delete it if you wish to replace it." - die "MySQL database already exists!" - fi - # Bug #213475 - MySQL _will_ object strenously if your machine is named - # localhost. Also causes weird failures. - [[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost" - - if [[ -z "${MYSQL_ROOT_PASSWORD}" ]]; then - - einfo "Please provide a password for the mysql 'root'@'localhost' user now" - einfo "or through the ${HOME}/.my.cnf file." - ewarn "Avoid [\"'\\_%] characters in the password" - einfo "Not entering a password defaults to UNIX authentication" + if [[ -z "${MYSQL_ROOT_PASSWORD}" ]] ; then + local pwd1="a" + local pwd2="b" + + echo + einfo "No password for mysql 'root' user was specified via environment" + einfo "variable MYSQL_ROOT_PASSWORD and no password was found in config" + einfo "file like '${HOME}/.my.cnf'." + einfo "To continue please provide a password for the mysql 'root' user" + einfo "now on console:" + ewarn "NOTE: Please avoid [\"'\\_%] characters in the password!" read -rsp " >" pwd1 ; echo - if [[ -n "${pwd1}" ]] ; then - einfo "Retype the password" - read -rsp " >" pwd2 ; echo - - if [[ "x$pwd1" != "x$pwd2" ]] ; then - die "Passwords are not the same" - fi + einfo "Retype the password" + read -rsp " >" pwd2 ; echo - MYSQL_ROOT_PASSWORD="${pwd1}" + if [[ "x${pwd1}" != "x${pwd2}" ]] ; then + die "Passwords are not the same!" fi + MYSQL_ROOT_PASSWORD="${pwd1}" unset pwd1 pwd2 + + echo fi - local options - local sqltmp="$(emktemp)" + local -a mysqld_options # Fix bug 446200. Don't reference host my.cnf, needs to come first, - # see https://bugs.mysql.com/bug.php?id=31312 - use prefix && options="${options} '--defaults-file=${MY_SYSCONFDIR}/my.cnf'" + # see http://bugs.mysql.com/bug.php?id=31312 + use prefix && mysqld_options+=( "--defaults-file='${MY_SYSCONFDIR}/my.cnf'" ) # Figure out which options we need to disable to do the setup local helpfile="${TMPDIR}/mysqld-help" "${EROOT}/usr/sbin/mysqld" --verbose --help >"${helpfile}" 2>/dev/null + + local opt optexp optfull for opt in host-cache name-resolve networking slave-start \ federated ssl log-bin relay-log slow-query-log external-locking \ log-slave-updates \ - ; do + ; do optexp="--(skip-)?${opt}" optfull="--loose-skip-${opt}" - egrep -sq -- "${optexp}" "${helpfile}" && options="${options} ${optfull}" + egrep -sq -- "${optexp}" "${helpfile}" && mysqld_options+=( "${optfull}" ) done - einfo "Creating the mysql database and setting proper permissions on it ..." + # Prepare timezones, see + # https://dev.mysql.com/doc/mysql/en/time-zone-support.html + local tz_sql="${SETUP_TMPDIR}/tz.sql" - # Now that /var/run is a tmpfs mount point, we need to ensure it exists before using it - PID_DIR="${EROOT}/var/run/mysqld" - if [[ ! -d "${PID_DIR}" ]]; then - install -d -m 755 -o mysql -g mysql "${PID_DIR}" || die "Could not create pid directory" + echo "USE mysql;" >"${tz_sql}" + "${EROOT}/usr/bin/mysql_tzinfo_to_sql" "${EROOT}/usr/share/zoneinfo" >> "${tz_sql}" 2>/dev/null + if [[ $? -ne 0 ]] ; then + die "mysql_tzinfo_to_sql failed!" fi - if [[ ! -d "${MY_DATADIR}" ]]; then - install -d -m 750 -o mysql -g mysql "${MY_DATADIR}" || die "Could not create data directory" - fi + local cmd=( + "${mysql_install_db_binary}" + "${mysqld_options[@]}" + "--init-file='${tz_sql}'" + "--basedir='${EROOT}/usr'" + "--datadir='${MY_DATADIR}'" + "--tmpdir='${MYSQL_TMPDIR}'" + "--log-error='${mysql_install_log}'" + "--rpm" + "--cross-bootstrap" + "--skip-test-db" + "--user=${MYSQL_USER}" + ) - pushd "${TMPDIR}" &>/dev/null || die + einfo "Initializing ${PN} data directory: ${cmd[@]}" + eval "${cmd[@]}" >>"${mysql_install_log}" 2>&1 - # Filling timezones, see - # https://dev.mysql.com/doc/mysql/en/time-zone-support.html - "${EROOT}/usr/bin/mysql_tzinfo_to_sql" "${EROOT}/usr/share/zoneinfo" > "${sqltmp}" 2>/dev/null - - local cmd=( "${EROOT}/usr/share/mariadb/scripts/mysql_install_db" ) - [[ -f "${cmd}" ]] || cmd=( "${EROOT}/usr/bin/mysql_install_db" ) - cmd+=( "--basedir=${EPREFIX}/usr" ${options} "--datadir=${ROOT}/${MY_DATADIR}" "--tmpdir=${ROOT}/${MYSQL_TMPDIR}" ) - einfo "Command: ${cmd[*]}" - su -s /bin/sh -c "${cmd[*]}" mysql \ - >"${TMPDIR}"/mysql_install_db.log 2>&1 - if [[ $? -ne 0 ]]; then - grep -B5 -A999 -i "ERROR" "${TMPDIR}"/mysql_install_db.log 1>&2 - die "Failed to initialize mysqld. Please review ${EPREFIX}/var/log/mysql/mysqld.err AND ${TMPDIR}/mysql_install_db.log" + if [[ $? -ne 0 || ! -f "${MY_DATADIR}/mysql/user.frm" ]] ; then + grep -B5 -A999 -iE "(Aborting|ERROR|errno)" "${mysql_install_log}" 1>&2 + die "Failed to initialize ${PN} data directory. Please review '${mysql_install_log}'!" fi - popd &>/dev/null || die - [[ -f "${ROOT}/${MY_DATADIR}/mysql/user.frm" ]] \ - || die "MySQL databases not installed" - if [[ -z ${sqltmp} && -z ${MYSQL_ROOT_PASSWORD} ]] ; then - einfo "Done" - exit 0 - fi + local x=${RANDOM} + local socket="${PID_DIR}/mysqld.${x}.sock" + [[ -f "${socket}" ]] && die "Randomness failed; Socket ${socket} already exists!" + local pidfile="${PID_DIR}/mysqld.${x}.pid" + [[ -f "${pidfile}" ]] && die "Randomness failed; Pidfile ${pidfile} already exists!" + unset x + + cmd=( + "${mysqld_binary}" + "${mysqld_options[@]}" + "--basedir='${EROOT}/usr'" + "--datadir='${MY_DATADIR}'" + "--tmpdir='${MYSQL_TMPDIR}'" + --max_allowed_packet=8M + --net_buffer_length=16K + "--socket='${socket}'" + "--pid-file='${pidfile}'" + "--log-error='${mysqld_logfile}'" + "--user=${MYSQL_USER}" + ) - use prefix || options="${options} --user=mysql" - - local socket="${EROOT}/var/run/mysqld/mysqld${RANDOM}.sock" - local pidfile="${EROOT}/var/run/mysqld/mysqld${RANDOM}.pid" - local mysqld="${EROOT}/usr/sbin/mysqld \ - ${options} \ - --log-warnings=0 \ - --basedir=${EROOT}/usr \ - --datadir=${ROOT}/${MY_DATADIR} \ - --max_allowed_packet=8M \ - --net_buffer_length=16K \ - --socket=${socket} \ - --pid-file=${pidfile} \ - --tmpdir=${ROOT}/${MYSQL_TMPDIR}" - #einfo "About to start mysqld: ${mysqld}" - ebegin "Starting mysqld" - einfo "Command ${mysqld}" - ${mysqld} & - rc=$? - while ! [[ -S "${socket}" || "${maxtry}" -lt 1 ]] ; do + einfo "Starting mysqld to finalize initialization: ${cmd[@]}" + eval "${cmd[@]}" >>"${mysqld_logfile}" 2>&1 & + + echo -n "Waiting for mysqld to accept connections " + local maxtry=15 + while [[ ! -S "${socket}" && "${maxtry}" -gt 1 ]] ; do maxtry=$((${maxtry}-1)) echo -n "." sleep 1 done - eend $rc - if ! [[ -S "${socket}" ]]; then - die "Completely failed to start up mysqld with: ${mysqld}" + if [[ -S "${socket}" ]] ; then + # Even with a socket we don't know if mysqld will abort + # start due to an error so just wait a little bit more... + maxtry=5 + while [[ -S "${socket}" && "${maxtry}" -gt 1 ]] ; do + maxtry=$((${maxtry}-1)) + echo -n "." + sleep 1 + done + fi + + echo + + if [[ ! -S "${socket}" ]] ; then + grep -B5 -A999 -iE "(Aborting|ERROR|errno)" "${mysqld_logfile}" 1>&2 + die "mysqld was unable to start from initialized data directory. Please review '${mysqld_logfile}'!" fi - if [[ -n "${MYSQL_ROOT_PASSWORD}" ]] ; then - ebegin "Setting root password" - # Do this from memory, as we don't want clear text passwords in temp files - local sql="SET PASSWORD FOR 'root'@'localhost' = PASSWORD('${MYSQL_ROOT_PASSWORD}')" - "${EROOT}/usr/bin/mysql" \ - "--socket=${socket}" \ - -hlocalhost \ - -e "${sql}" - unset sql - eend $? + local mysql_logfile="${SETUP_TMPDIR}/set_root_pw.log" + touch "${mysql_logfile}" || die + + ebegin "Setting root password" + # Do this from memory, as we don't want clear text passwords in temp files + local sql="ALTER USER 'root'@'localhost' IDENTIFIED BY '${MYSQL_ROOT_PASSWORD}'" + cmd=( + "${mysql_binary}" + --no-defaults + "--socket='${socket}'" + -hlocalhost + "-e \"${sql}\"" + ) + eval "${cmd[@]}" >"${mysql_logfile}" 2>&1 + local rc=$? + eend ${rc} + + if [[ ${rc} -ne 0 ]] ; then + # Poor man's solution which tries to avoid having password + # in log. NOTE: sed can fail if user didn't follow advice + # and included character which will require escaping... + sed -i -e "s/${MYSQL_ROOT_PASSWORD}/*****/" "${mysql_logfile}" 2>/dev/null + + grep -B5 -A999 -iE "(Aborting|ERROR|errno)" "${mysql_logfile}" + die "Failed to set ${PN} root password. Please review '${mysql_logfile}'!" fi - if [[ -n "${sqltmp}" ]] ; then - ebegin "Loading \"zoneinfo\", this step may require a few seconds" - "${EROOT}/usr/bin/mysql" \ - "--socket=${socket}" \ - -hlocalhost \ - -uroot \ - --password="${MYSQL_ROOT_PASSWORD}" \ - mysql < "${sqltmp}" - rc=$? - eend $? - [[ $rc -ne 0 ]] && ewarn "Failed to load zoneinfo!" + # Stop the server + if [[ -f "${pidfile}" ]] && pgrep -F "${pidfile}" &>/dev/null ; then + echo -n "Stopping the server " + pkill -F "${pidfile}" &>/dev/null + + maxtry=10 + while [[ -f "${pidfile}" ]] && pgrep -F "${pidfile}" &>/dev/null ; do + maxtry=$((${maxtry}-1)) + echo -n "." + sleep 1 + done + + echo + + if [[ -f "${pidfile}" ]] && pgrep -F "${pidfile}" &>/dev/null ; then + # We somehow failed to stop server. + # However, not a fatal error. Just warn the user. + ewarn "WARNING: mysqld[$(cat "${pidfile}")] is still running!" + fi fi - # Stop the server and cleanup - einfo "Stopping the server ..." - kill $(< "${pidfile}" ) - rm -f "${sqltmp}" - wait %1 - einfo "Done" + rm -r "${SETUP_TMPDIR}" || die + + einfo "${PN} data directory at '${MY_DATADIR}' successfully initialized!" } diff --git a/dev-db/mariadb/mariadb-10.5.9.ebuild b/dev-db/mariadb/mariadb-10.5.9-r3.ebuild index cda02012e05b..8a8a34578935 100644 --- a/dev-db/mariadb/mariadb-10.5.9.ebuild +++ b/dev-db/mariadb/mariadb-10.5.9-r3.ebuild @@ -10,7 +10,7 @@ inherit eutils systemd flag-o-matic prefix toolchain-funcs \ multiprocessing java-pkg-opt-2 cmake # Patch version -PATCH_SET="https://dev.gentoo.org/~whissi/dist/${PN}/${PN}-10.5.9-patches-02.tar.xz" +PATCH_SET="https://dev.gentoo.org/~whissi/dist/${PN}/${PN}-10.5.9-patches-03.tar.xz" SRC_URI="https://downloads.mariadb.org/interstitial/${P}/source/${P}.tar.gz ${PATCH_SET}" @@ -32,7 +32,7 @@ REQUIRED_USE="jdbc? ( extraengine server !static ) ?? ( tcmalloc jemalloc ) static? ( yassl !pam )" -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" +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" # Shorten the path because the socket path length must be shorter than 107 chars # and we will run a mysql server during test phase @@ -41,7 +41,7 @@ S="${WORKDIR}/mysql" # Be warned, *DEPEND are version-dependant # These are used for both runtime and compiletime COMMON_DEPEND=" - >=dev-libs/libpcre-8.41-r1:3= + >=dev-libs/libpcre2-10.34:= >=sys-apps/sed-4 >=sys-apps/texinfo-4.7-r1 sys-libs/ncurses:0= @@ -120,13 +120,6 @@ RDEPEND="${COMMON_DEPEND} ) !prefix? ( dev-db/mysql-init-scripts acct-group/mysql acct-user/mysql ) ) - perl? ( - !dev-db/mytop - virtual/perl-Getopt-Long - dev-perl/TermReadKey - virtual/perl-Term-ANSIColor - virtual/perl-Time-HiRes - ) " # For other stuff to bring us in # dev-perl/DBD-mysql is needed by some scripts installed by MySQL @@ -321,7 +314,7 @@ src_configure() { -DINSTALL_MANDIR=share/man -DINSTALL_MYSQLSHAREDIR=share/mariadb -DINSTALL_PLUGINDIR=$(get_libdir)/mariadb/plugin - -DINSTALL_SCRIPTDIR=share/mariadb/scripts + -DINSTALL_SCRIPTDIR=bin -DINSTALL_MYSQLDATADIR="${EPREFIX}/var/lib/mysql" -DINSTALL_SBINDIR=sbin -DINSTALL_SUPPORTFILESDIR="${EPREFIX}/usr/share/mariadb" @@ -572,6 +565,7 @@ src_test() { disabled_tests+=( "main.plugin_auth;0;Needs client libraries built" ) disabled_tests+=( "main.stat_tables;0;Sporadically failing test" ) disabled_tests+=( "main.stat_tables_innodb;0;Sporadically failing test" ) + disabled_tests+=( "main.upgrade_MDEV-19650;25096;Known to be broken" ) disabled_tests+=( "mariabackup.*;0;Broken test suite" ) disabled_tests+=( "perfschema.nesting;23458;Known to be broken" ) disabled_tests+=( "plugins.auth_ed25519;0;Needs client libraries built" ) @@ -699,10 +693,16 @@ src_install() { fi fi - # Remove mytop if perl is not selected - if [[ -e "${ED}/usr/bin/mytop" ]] && ! use perl ; then - rm -f "${ED}/usr/bin/mytop" || die - fi + # Remove bundled mytop in favor of dev-db/mytop + local mytop_file + for mytop_file in \ + "${ED}/usr/bin/mytop" \ + "${ED}/usr/share/man/man1/mytop.1" \ + ; do + if [[ -e "${mytop_file}" ]] ; then + rm -v "${mytop_file}" || die + fi + done # Fix a dangling symlink when galera is not built if [[ -L "${ED}/usr/bin/wsrep_sst_rsync_wan" ]] && ! use galera ; then @@ -789,63 +789,312 @@ pkg_postinst() { pkg_config() { _getoptval() { - local mypd="${EROOT}"/usr/libexec/mariadb/my_print_defaults - local section="$1" + local section="${1}" local flag="--${2}=" local extra_options="${3}" - "${mypd}" $extra_options $section | sed -n "/^${flag}/s,${flag},,gp" + local cmd=( + "${my_print_defaults_binary}" + "${extra_options}" + "${section}" + ) + local results=( $(eval "${cmd[@]}" 2>/dev/null | sed -n "/^${flag}/s,${flag},,gp") ) + + if [[ ${#results[@]} -gt 0 ]] ; then + # When option is set multiple times only return last value + echo "${results[-1]}" + fi + } + + _mktemp_dry() { + # emktemp has no --dry-run option + local template="${1}" + + if [[ -z "${template}" ]] ; then + if [[ -z "${T}" ]] ; then + template="/tmp/XXXXXXX" + else + template="${T}/XXXXXXX" + fi + fi + + local template_wo_X=${template//X/} + local n_X + let n_X=${#template}-${#template_wo_X} + if [[ ${n_X} -lt 3 ]] ; then + echo "${FUNCNAME[0]}: too few X's in template ‘${template}’" >&2 + return + fi + + local attempts=0 + local character tmpfile + while [[ true ]] ; do + let attempts=attempts+1 + + new_file= + while read -n1 character ; do + if [[ "${character}" == "X" ]] ; then + tmpfile+="${RANDOM:0:1}" + else + tmpfile+="${character}" + fi + done < <(echo -n "${template}") + + if [[ ! -f "${tmpfile}" ]] + then + echo "${tmpfile}" + return + fi + + if [[ ${attempts} -ge 100 ]] ; then + echo "${FUNCNAME[0]}: Cannot create temporary file after 100 attempts." >&2 + return + fi + done } - local old_MY_DATADIR="${MY_DATADIR}" - local old_HOME="${HOME}" + + local mysql_binary="${EROOT}/usr/bin/mysql" + if [[ ! -x "${mysql_binary}" ]] ; then + die "'${mysql_binary}' not found! Please re-install ${CATEGORY}/${PN}!" + fi + + local mysqld_binary="${EROOT}/usr/sbin/mysqld" + if [[ ! -x "${mysqld_binary}" ]] ; then + die "'${mysqld_binary}' not found! Please re-install ${CATEGORY}/${PN}!" + fi + + local mysql_install_db_binary="${EROOT}/usr/bin/mysql_install_db" + if [[ ! -x "${mysql_install_db_binary}" ]] ; then + die "'${mysql_install_db_binary}' not found! Please re-install ${CATEGORY}/${PN}!" + fi + + local my_print_defaults_binary="${EROOT}/usr/bin/my_print_defaults" + if [[ ! -x "${my_print_defaults_binary}" ]] ; then + die "'${my_print_defaults_binary}' not found! Please re-install dev-db/mysql-connector-c!" + fi + + if [[ -z "${MYSQL_USER}" ]] ; then + MYSQL_USER=mysql + if use prefix ; then + MYSQL_USER=$(id -u -n 2>/dev/null) + if [[ -z "${MYSQL_USER}" ]] ; then + die "Failed to determine current username!" + fi + fi + fi + + if [[ -z "${MYSQL_GROUP}" ]] ; then + MYSQL_GROUP=mysql + if use prefix ; then + MYSQL_GROUP=$(id -g -n 2>/dev/null) + if [[ -z "${MYSQL_GROUP}" ]] ; then + die "Failed to determine current user groupname!" + fi + fi + fi + # my_print_defaults needs to read stuff in $HOME/.my.cnf - export HOME=${EPREFIX}/root + local -x HOME="${EROOT}/root" # Make sure the vars are correctly initialized mysql_init_vars - [[ -z "${MY_DATADIR}" ]] && die "Sorry, unable to find MY_DATADIR" - if [[ ! -x "${EROOT}/usr/sbin/mysqld" ]] ; then - die "Minimal builds do NOT include the MySQL server" + # Read currently set data directory + MY_DATADIR="$(_getoptval mysqld datadir "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")" + + # Bug #213475 - MySQL _will_ object strenously if your machine is named + # localhost. Also causes weird failures. + [[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost" + + if [[ -z "${MY_DATADIR}" ]] ; then + die "Sorry, unable to find MY_DATADIR!" + elif [[ -d "${MY_DATADIR}/mysql" ]] ; then + ewarn "Looks like your data directory '${MY_DATADIR}' is already initialized!" + ewarn "Please rename or delete its content if you wish to initialize a new data directory." + die "${PN} data directory at '${MY_DATADIR}' looks already initialized!" fi - if [[ ( -n "${MY_DATADIR}" ) && ( "${MY_DATADIR}" != "${old_MY_DATADIR}" ) ]]; then - local MY_DATADIR_s="${ROOT}/${MY_DATADIR}" - MY_DATADIR_s="${MY_DATADIR_s%%/}" - local old_MY_DATADIR_s="${ROOT}/${old_MY_DATADIR}" - old_MY_DATADIR_s="${old_MY_DATADIR_s%%/}" + MYSQL_TMPDIR="$(_getoptval mysqld tmpdir "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")" + MYSQL_TMPDIR=${MYSQL_TMPDIR%/} + # These are dir+prefix + MYSQL_LOG_BIN="$(_getoptval mysqld log-bin "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")" + MYSQL_LOG_BIN=${MYSQL_LOG_BIN%/*} + MYSQL_RELAY_LOG="$(_getoptval mysqld relay-log "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")" + MYSQL_RELAY_LOG=${MYSQL_RELAY_LOG%/*} - if [[ ( -d "${old_MY_DATADIR_s}" ) && ( "${old_MY_DATADIR_s}" != / ) ]]; then - if [[ -d "${MY_DATADIR_s}" ]]; then - ewarn "Both ${old_MY_DATADIR_s} and ${MY_DATADIR_s} exist" - ewarn "Attempting to use ${MY_DATADIR_s} and preserving ${old_MY_DATADIR_s}" - else - elog "Moving MY_DATADIR from ${old_MY_DATADIR_s} to ${MY_DATADIR_s}" - mv --strip-trailing-slashes -T "${old_MY_DATADIR_s}" "${MY_DATADIR_s}" \ - || die "Moving MY_DATADIR failed" - fi + # Create missing directories. + # Always check if mysql user can write to directory even if we just + # created directory because a parent directory might be not + # accessible for that user. + PID_DIR="${EROOT}/run/mysqld" + if [[ ! -d "${PID_DIR}" ]] ; then + einfo "Creating ${PN} PID directory '${PID_DIR}' ..." + install -d -m 755 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${PID_DIR}" \ + || die "Failed to create PID directory '${PID_DIR}'!" + fi + + local _pid_dir_testfile="$(_mktemp_dry "${PID_DIR}/.pkg_config-access-test.XXXXXXXXX")" + [[ -z "${_pid_dir_testfile}" ]] \ + && die "_mktemp_dry() for '${PID_DIR}/.pkg_config-access-test.XXXXXXXXX' failed!" + + if use prefix ; then + touch "${_pid_dir_testfile}" &>/dev/null + else + su -s /bin/sh -c "touch ${_pid_dir_testfile}" ${MYSQL_USER} &>/dev/null + fi + + if [[ $? -ne 0 ]] ; then + die "${MYSQL_USER} user cannot write into PID dir '${PID_DIR}'!" + else + rm "${_pid_dir_testfile}" || die + unset _pid_dir_testfile + fi + + if [[ ! -d "${MY_DATADIR}" ]] ; then + einfo "Creating ${PN} data directory '${MY_DATADIR}' ..." + install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MY_DATADIR}" \ + || die "Failed to create ${PN} data directory '${MY_DATADIR}'!" + fi + + local _my_datadir_testfile="$(_mktemp_dry "${MY_DATADIR}/.pkg_config-access-test.XXXXXXXXX")" + [[ -z "${_my_datadir_testfile}" ]] \ + && die "_mktemp_dry() for '${MY_DATADIR}/.pkg_config-access-test.XXXXXXXXX' failed!" + + if use prefix ; then + touch "${_my_datadir_testfile}" &>/dev/null + else + su -s /bin/sh -c "touch ${_my_datadir_testfile}" ${MYSQL_USER} &>/dev/null + fi + + if [[ $? -ne 0 ]] ; then + die "${MYSQL_USER} user cannot write into data directory '${MY_DATADIR}'!" + else + rm "${_my_datadir_testfile}" || die + unset _my_datadir_testfile + fi + + if [[ -n "${MYSQL_TMPDIR}" && ! -d "${MYSQL_TMPDIR}" ]] ; then + einfo "Creating ${PN} tmpdir '${MYSQL_TMPDIR}' ..." + install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MYSQL_TMPDIR}" \ + || die "Failed to create ${PN} tmpdir '${MYSQL_TMPDIR}'!" + fi + + if [[ -z "${MYSQL_TMPDIR}" ]] ; then + MYSQL_TMPDIR="$(_mktemp_dry "${EROOT}/tmp/mysqld-tmp.XXXXXXXXX")" + [[ -z "${MYSQL_TMPDIR}" ]] \ + && die "_mktemp_dry() for '${MYSQL_TMPDIR}' failed!" + + mkdir "${MYSQL_TMPDIR}" || die + chown ${MYSQL_USER} "${MYSQL_TMPDIR}" || die + fi + + # Now we need to test MYSQL_TMPDIR... + local _my_tmpdir_testfile="$(_mktemp_dry "${MYSQL_TMPDIR}/.pkg_config-access-test.XXXXXXXXX")" + [[ -z "${_my_tmpdir_testfile}" ]] \ + && die "_mktemp_dry() for '${MYSQL_TMPDIR}/.pkg_config-access-test.XXXXXXXXX' failed!" + + if use prefix ; then + touch "${_my_tmpdir_testfile}" &>/dev/null + else + su -s /bin/sh -c "touch ${_my_tmpdir_testfile}" ${MYSQL_USER} &>/dev/null + fi + + if [[ $? -ne 0 ]] ; then + die "${MYSQL_USER} user cannot write into tmpdir '${MYSQL_TMPDIR}'!" + else + rm "${_my_tmpdir_testfile}" || die + unset _my_tmpdir_testfile + fi + + if [[ -n "${MYSQL_LOG_BIN}" && ! -d "${MYSQL_LOG_BIN}" ]] ; then + einfo "Creating ${PN} log-bin directory '${MYSQL_LOG_BIN}' ..." + install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MYSQL_LOG_BIN}" \ + || die "Failed to create ${PN} log-bin directory '${MYSQL_LOG_BIN}'" + fi + + if [[ -n "${MYSQL_LOG_BIN}" ]] ; then + local _my_logbin_testfile="$(_mktemp_dry "${MYSQL_LOG_BIN}/.pkg_config-access-test.XXXXXXXXX")" + [[ -z "${_my_logbin_testfile}" ]] \ + && die "_mktemp_dry() for '${MYSQL_LOG_BIN}/.pkg_config-access-test.XXXXXXXXX' failed!" + + if use prefix ; then + touch "${_my_logbin_testfile}" &>/dev/null else - ewarn "Previous MY_DATADIR (${old_MY_DATADIR_s}) does not exist" - if [[ -d "${MY_DATADIR_s}" ]]; then - ewarn "Attempting to use ${MY_DATADIR_s}" - else - eerror "New MY_DATADIR (${MY_DATADIR_s}) does not exist" - die "Configuration Failed! Please reinstall ${CATEGORY}/${PN}" - fi + su -s /bin/sh -c "touch ${_my_logbin_testfile}" ${MYSQL_USER} &>/dev/null + fi + + if [[ $? -ne 0 ]] ; then + die "${MYSQL_USER} user cannot write into log-bin directory '${MYSQL_LOG_BIN}'!" + else + rm "${_my_logbin_testfile}" || die + unset _my_logbin_testfile fi fi - local pwd1="a" - local pwd2="b" - local maxtry=15 + if [[ -n "${MYSQL_RELAY_LOG}" && ! -d "${MYSQL_RELAY_LOG}" ]] ; then + einfo "Creating ${PN} relay-log directory '${MYSQL_RELAY_LOG}' ..." + install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MYSQL_RELAY_LOG}" \ + || die "Failed to create ${PN} relay-log directory '${MYSQL_RELAY_LOG}'!" + fi + + if [[ -n "${MYSQL_RELAY_LOG}" ]] ; then + local _my_relaylog_testfile="$(_mktemp_dry "${MYSQL_RELAY_LOG}/.pkg_config-access-test.XXXXXXXXX")" + [[ -z "${_my_relaylog_testfile}" ]] \ + && die "_mktemp_dry() for '${MYSQL_RELAY_LOG}/.pkg_config-access-test.XXXXXXXXX' failed!" - if [ -z "${MYSQL_ROOT_PASSWORD}" ]; then + if use prefix ; then + touch "${_my_relaylog_testfile}" &>/dev/null + else + su -s /bin/sh -c "touch ${_my_relaylog_testfile}" ${MYSQL_USER} &>/dev/null + fi + + if [[ $? -ne 0 ]] ; then + die "${MYSQL_USER} user cannot write into relay-log directory '${MYSQL_RELAY_LOG}'!" + else + rm "${_my_relaylog_testfile}" || die + unset _my_relaylog_testfile + fi + fi + + local SETUP_TMPDIR=$(mktemp -d "/tmp/${PN}-config.XXXXXXXXX" 2>/dev/null) + [[ -z "${SETUP_TMPDIR}" ]] && die "Failed to create setup tmpdir" + + # Limit access + chmod 0770 "${SETUP_TMPDIR}" || die + chown ${MYSQL_USER} "${SETUP_TMPDIR}" || die + + local mysql_install_log="${SETUP_TMPDIR}/install_db.log" + local mysqld_logfile="${SETUP_TMPDIR}/mysqld.log" + + echo "" + einfo "Detected settings:" + einfo "==================" + einfo "MySQL User:\t\t\t\t${MYSQL_USER}" + einfo "MySQL Group:\t\t\t\t${MYSQL_GROUP}" + einfo "MySQL DATA directory:\t\t${MY_DATADIR}" + einfo "MySQL TMP directory:\t\t\t${MYSQL_TMPDIR}" + + if [[ -n "${MYSQL_LOG_BIN}" ]] ; then + einfo "MySQL Binary Log File location:\t${MYSQL_LOG_BIN}" + fi + + if [[ -n "${MYSQL_RELAY_LOG}" ]] ; then + einfo "MySQL Relay Log File location:\t${MYSQL_RELAY_LOG}" + fi + + einfo "PID DIR:\t\t\t\t${PID_DIR}" + einfo "Install db log:\t\t\t${mysql_install_log}" + einfo "Install server log:\t\t\t${mysqld_logfile}" + + echo + + if [[ -z "${MYSQL_ROOT_PASSWORD}" ]] ; then local tmp_mysqld_password_source= - for tmp_mysqld_password_source in mysql client; do + for tmp_mysqld_password_source in mysql client ; do einfo "Trying to get password for mysql 'root' user from '${tmp_mysqld_password_source}' section ..." MYSQL_ROOT_PASSWORD="$(_getoptval "${tmp_mysqld_password_source}" password)" - if [[ -n "${MYSQL_ROOT_PASSWORD}" ]]; then - if [[ ${MYSQL_ROOT_PASSWORD} == *$'\n'* ]]; then + if [[ -n "${MYSQL_ROOT_PASSWORD}" ]] ; then + if [[ ${MYSQL_ROOT_PASSWORD} == *$'\n'* ]] ; then ewarn "Ignoring password from '${tmp_mysqld_password_source}' section due to newline character (do you have multiple password options set?)!" MYSQL_ROOT_PASSWORD= continue @@ -857,179 +1106,189 @@ pkg_config() { done # Sometimes --show is required to display passwords in some implementations of my_print_defaults - if [[ "${MYSQL_ROOT_PASSWORD}" == '*****' ]]; then + if [[ "${MYSQL_ROOT_PASSWORD}" == '*****' ]] ; then MYSQL_ROOT_PASSWORD="$(_getoptval "${tmp_mysqld_password_source}" password --show)" fi unset tmp_mysqld_password_source fi - MYSQL_TMPDIR="$(_getoptval mysqld tmpdir | tail -n1)" - # These are dir+prefix - MYSQL_RELAY_LOG="$(_getoptval mysqld relay-log | tail -n1)" - MYSQL_RELAY_LOG=${MYSQL_RELAY_LOG%/*} - MYSQL_LOG_BIN="$(_getoptval mysqld log-bin | tail -n1)" - MYSQL_LOG_BIN=${MYSQL_LOG_BIN%/*} - - if [[ ! -d "${ROOT}/$MYSQL_TMPDIR" ]]; then - einfo "Creating MySQL tmpdir $MYSQL_TMPDIR" - install -d -m 770 -o mysql -g mysql "${EROOT}/$MYSQL_TMPDIR" - fi - if [[ ! -d "${ROOT}/$MYSQL_LOG_BIN" ]]; then - einfo "Creating MySQL log-bin directory $MYSQL_LOG_BIN" - install -d -m 770 -o mysql -g mysql "${EROOT}/$MYSQL_LOG_BIN" - fi - if [[ ! -d "${EROOT}/$MYSQL_RELAY_LOG" ]]; then - einfo "Creating MySQL relay-log directory $MYSQL_RELAY_LOG" - install -d -m 770 -o mysql -g mysql "${EROOT}/$MYSQL_RELAY_LOG" - fi - - if [[ -d "${ROOT}/${MY_DATADIR}/mysql" ]] ; then - ewarn "You have already a MySQL database in place." - ewarn "(${ROOT}/${MY_DATADIR}/*)" - ewarn "Please rename or delete it if you wish to replace it." - die "MySQL database already exists!" - fi - # Bug #213475 - MySQL _will_ object strenously if your machine is named - # localhost. Also causes weird failures. - [[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost" - - if [[ -z "${MYSQL_ROOT_PASSWORD}" ]]; then - - einfo "Please provide a password for the mysql 'root'@'localhost' user now" - einfo "or through the ${HOME}/.my.cnf file." - ewarn "Avoid [\"'\\_%] characters in the password" - einfo "Not entering a password defaults to UNIX authentication" + if [[ -z "${MYSQL_ROOT_PASSWORD}" ]] ; then + local pwd1="a" + local pwd2="b" + + echo + einfo "No password for mysql 'root' user was specified via environment" + einfo "variable MYSQL_ROOT_PASSWORD and no password was found in config" + einfo "file like '${HOME}/.my.cnf'." + einfo "To continue please provide a password for the mysql 'root' user" + einfo "now on console:" + ewarn "NOTE: Please avoid [\"'\\_%] characters in the password!" read -rsp " >" pwd1 ; echo - if [[ -n "${pwd1}" ]] ; then - einfo "Retype the password" - read -rsp " >" pwd2 ; echo - - if [[ "x$pwd1" != "x$pwd2" ]] ; then - die "Passwords are not the same" - fi + einfo "Retype the password" + read -rsp " >" pwd2 ; echo - MYSQL_ROOT_PASSWORD="${pwd1}" + if [[ "x${pwd1}" != "x${pwd2}" ]] ; then + die "Passwords are not the same!" fi + MYSQL_ROOT_PASSWORD="${pwd1}" unset pwd1 pwd2 + + echo fi - local options - local sqltmp="$(emktemp)" + local -a mysqld_options # Fix bug 446200. Don't reference host my.cnf, needs to come first, - # see https://bugs.mysql.com/bug.php?id=31312 - use prefix && options="${options} '--defaults-file=${MY_SYSCONFDIR}/my.cnf'" + # see http://bugs.mysql.com/bug.php?id=31312 + use prefix && mysqld_options+=( "--defaults-file='${MY_SYSCONFDIR}/my.cnf'" ) # Figure out which options we need to disable to do the setup local helpfile="${TMPDIR}/mysqld-help" "${EROOT}/usr/sbin/mysqld" --verbose --help >"${helpfile}" 2>/dev/null + + local opt optexp optfull for opt in host-cache name-resolve networking slave-start \ federated ssl log-bin relay-log slow-query-log external-locking \ log-slave-updates \ - ; do + ; do optexp="--(skip-)?${opt}" optfull="--loose-skip-${opt}" - egrep -sq -- "${optexp}" "${helpfile}" && options="${options} ${optfull}" + egrep -sq -- "${optexp}" "${helpfile}" && mysqld_options+=( "${optfull}" ) done - einfo "Creating the mysql database and setting proper permissions on it ..." + # Prepare timezones, see + # https://dev.mysql.com/doc/mysql/en/time-zone-support.html + local tz_sql="${SETUP_TMPDIR}/tz.sql" - # Now that /var/run is a tmpfs mount point, we need to ensure it exists before using it - PID_DIR="${EROOT}/var/run/mysqld" - if [[ ! -d "${PID_DIR}" ]]; then - install -d -m 755 -o mysql -g mysql "${PID_DIR}" || die "Could not create pid directory" + echo "USE mysql;" >"${tz_sql}" + "${EROOT}/usr/bin/mysql_tzinfo_to_sql" "${EROOT}/usr/share/zoneinfo" >> "${tz_sql}" 2>/dev/null + if [[ $? -ne 0 ]] ; then + die "mysql_tzinfo_to_sql failed!" fi - if [[ ! -d "${MY_DATADIR}" ]]; then - install -d -m 750 -o mysql -g mysql "${MY_DATADIR}" || die "Could not create data directory" - fi + local cmd=( + "${mysql_install_db_binary}" + "${mysqld_options[@]}" + "--init-file='${tz_sql}'" + "--basedir='${EROOT}/usr'" + "--datadir='${MY_DATADIR}'" + "--tmpdir='${MYSQL_TMPDIR}'" + "--log-error='${mysql_install_log}'" + "--rpm" + "--cross-bootstrap" + "--skip-test-db" + "--user=${MYSQL_USER}" + ) - pushd "${TMPDIR}" &>/dev/null || die + einfo "Initializing ${PN} data directory: ${cmd[@]}" + eval "${cmd[@]}" >>"${mysql_install_log}" 2>&1 - # Filling timezones, see - # https://dev.mysql.com/doc/mysql/en/time-zone-support.html - "${EROOT}/usr/bin/mysql_tzinfo_to_sql" "${EROOT}/usr/share/zoneinfo" > "${sqltmp}" 2>/dev/null - - local cmd=( "${EROOT}/usr/share/mariadb/scripts/mysql_install_db" ) - [[ -f "${cmd}" ]] || cmd=( "${EROOT}/usr/bin/mysql_install_db" ) - cmd+=( "--basedir=${EPREFIX}/usr" ${options} "--datadir=${ROOT}/${MY_DATADIR}" "--tmpdir=${ROOT}/${MYSQL_TMPDIR}" ) - einfo "Command: ${cmd[*]}" - su -s /bin/sh -c "${cmd[*]}" mysql \ - >"${TMPDIR}"/mysql_install_db.log 2>&1 - if [[ $? -ne 0 ]]; then - grep -B5 -A999 -i "ERROR" "${TMPDIR}"/mysql_install_db.log 1>&2 - die "Failed to initialize mysqld. Please review ${EPREFIX}/var/log/mysql/mysqld.err AND ${TMPDIR}/mysql_install_db.log" + if [[ $? -ne 0 || ! -f "${MY_DATADIR}/mysql/user.frm" ]] ; then + grep -B5 -A999 -iE "(Aborting|ERROR|errno)" "${mysql_install_log}" 1>&2 + die "Failed to initialize ${PN} data directory. Please review '${mysql_install_log}'!" fi - popd &>/dev/null || die - [[ -f "${ROOT}/${MY_DATADIR}/mysql/user.frm" ]] \ - || die "MySQL databases not installed" - if [[ -z ${sqltmp} && -z ${MYSQL_ROOT_PASSWORD} ]] ; then - einfo "Done" - exit 0 - fi + local x=${RANDOM} + local socket="${PID_DIR}/mysqld.${x}.sock" + [[ -f "${socket}" ]] && die "Randomness failed; Socket ${socket} already exists!" + local pidfile="${PID_DIR}/mysqld.${x}.pid" + [[ -f "${pidfile}" ]] && die "Randomness failed; Pidfile ${pidfile} already exists!" + unset x + + cmd=( + "${mysqld_binary}" + "${mysqld_options[@]}" + "--basedir='${EROOT}/usr'" + "--datadir='${MY_DATADIR}'" + "--tmpdir='${MYSQL_TMPDIR}'" + --max_allowed_packet=8M + --net_buffer_length=16K + "--socket='${socket}'" + "--pid-file='${pidfile}'" + "--log-error='${mysqld_logfile}'" + "--user=${MYSQL_USER}" + ) - use prefix || options="${options} --user=mysql" - - local socket="${EROOT}/var/run/mysqld/mysqld${RANDOM}.sock" - local pidfile="${EROOT}/var/run/mysqld/mysqld${RANDOM}.pid" - local mysqld="${EROOT}/usr/sbin/mysqld \ - ${options} \ - --log-warnings=0 \ - --basedir=${EROOT}/usr \ - --datadir=${ROOT}/${MY_DATADIR} \ - --max_allowed_packet=8M \ - --net_buffer_length=16K \ - --socket=${socket} \ - --pid-file=${pidfile} \ - --tmpdir=${ROOT}/${MYSQL_TMPDIR}" - #einfo "About to start mysqld: ${mysqld}" - ebegin "Starting mysqld" - einfo "Command ${mysqld}" - ${mysqld} & - rc=$? - while ! [[ -S "${socket}" || "${maxtry}" -lt 1 ]] ; do + einfo "Starting mysqld to finalize initialization: ${cmd[@]}" + eval "${cmd[@]}" >>"${mysqld_logfile}" 2>&1 & + + echo -n "Waiting for mysqld to accept connections " + local maxtry=15 + while [[ ! -S "${socket}" && "${maxtry}" -gt 1 ]] ; do maxtry=$((${maxtry}-1)) echo -n "." sleep 1 done - eend $rc - if ! [[ -S "${socket}" ]]; then - die "Completely failed to start up mysqld with: ${mysqld}" + if [[ -S "${socket}" ]] ; then + # Even with a socket we don't know if mysqld will abort + # start due to an error so just wait a little bit more... + maxtry=5 + while [[ -S "${socket}" && "${maxtry}" -gt 1 ]] ; do + maxtry=$((${maxtry}-1)) + echo -n "." + sleep 1 + done + fi + + echo + + if [[ ! -S "${socket}" ]] ; then + grep -B5 -A999 -iE "(Aborting|ERROR|errno)" "${mysqld_logfile}" 1>&2 + die "mysqld was unable to start from initialized data directory. Please review '${mysqld_logfile}'!" fi - if [[ -n "${MYSQL_ROOT_PASSWORD}" ]] ; then - ebegin "Setting root password" - # Do this from memory, as we don't want clear text passwords in temp files - local sql="SET PASSWORD FOR 'root'@'localhost' = PASSWORD('${MYSQL_ROOT_PASSWORD}')" - "${EROOT}/usr/bin/mysql" \ - "--socket=${socket}" \ - -hlocalhost \ - -e "${sql}" - unset sql - eend $? + local mysql_logfile="${SETUP_TMPDIR}/set_root_pw.log" + touch "${mysql_logfile}" || die + + ebegin "Setting root password" + # Do this from memory, as we don't want clear text passwords in temp files + local sql="ALTER USER 'root'@'localhost' IDENTIFIED BY '${MYSQL_ROOT_PASSWORD}'" + cmd=( + "${mysql_binary}" + --no-defaults + "--socket='${socket}'" + -hlocalhost + "-e \"${sql}\"" + ) + eval "${cmd[@]}" >"${mysql_logfile}" 2>&1 + local rc=$? + eend ${rc} + + if [[ ${rc} -ne 0 ]] ; then + # Poor man's solution which tries to avoid having password + # in log. NOTE: sed can fail if user didn't follow advice + # and included character which will require escaping... + sed -i -e "s/${MYSQL_ROOT_PASSWORD}/*****/" "${mysql_logfile}" 2>/dev/null + + grep -B5 -A999 -iE "(Aborting|ERROR|errno)" "${mysql_logfile}" + die "Failed to set ${PN} root password. Please review '${mysql_logfile}'!" fi - if [[ -n "${sqltmp}" ]] ; then - ebegin "Loading \"zoneinfo\", this step may require a few seconds" - "${EROOT}/usr/bin/mysql" \ - "--socket=${socket}" \ - -hlocalhost \ - -uroot \ - --password="${MYSQL_ROOT_PASSWORD}" \ - mysql < "${sqltmp}" - rc=$? - eend $? - [[ $rc -ne 0 ]] && ewarn "Failed to load zoneinfo!" + # Stop the server + if [[ -f "${pidfile}" ]] && pgrep -F "${pidfile}" &>/dev/null ; then + echo -n "Stopping the server " + pkill -F "${pidfile}" &>/dev/null + + maxtry=10 + while [[ -f "${pidfile}" ]] && pgrep -F "${pidfile}" &>/dev/null ; do + maxtry=$((${maxtry}-1)) + echo -n "." + sleep 1 + done + + echo + + if [[ -f "${pidfile}" ]] && pgrep -F "${pidfile}" &>/dev/null ; then + # We somehow failed to stop server. + # However, not a fatal error. Just warn the user. + ewarn "WARNING: mysqld[$(cat "${pidfile}")] is still running!" + fi fi - # Stop the server and cleanup - einfo "Stopping the server ..." - kill $(< "${pidfile}" ) - rm -f "${sqltmp}" - wait %1 - einfo "Done" + rm -r "${SETUP_TMPDIR}" || die + + einfo "${PN} data directory at '${MY_DATADIR}' successfully initialized!" } diff --git a/dev-db/mongodb/Manifest b/dev-db/mongodb/Manifest index 964e459ef22d..5a1f809acb8f 100644 --- a/dev-db/mongodb/Manifest +++ b/dev-db/mongodb/Manifest @@ -13,9 +13,13 @@ AUX mongos.conf-r2 648 BLAKE2B 420bebfafc1ef4af4b90580077a803fe30f37d63eca6509e7 AUX mongos.confd-r3 470 BLAKE2B 9cf6f201d337430901d957a5a0811ff11ac2e81814aac2120c5018e6ec4c38b5ca22d19caea593834416c63609c69a8294227fb6b30200b41dfb29799cc5c1b4 SHA512 952fb9cf5d3eeea2006b101e23142e408c98d66d1f4f868f6ea5a4df6a6331ddcbcbdfb24f4b031c1a8c42652141a3684073b96dfc0b3fbd21dc6b5bcf0e36cb AUX mongos.initd-r3 422 BLAKE2B 90872d0d8cdc5e33e3eebee848f58a2db0511d48b496ba9318117b74ad9265ead53a21b7d1790729a62d61839099bee315ace8ff3646c01e096a943c2251bf88 SHA512 bf5897614d59c6b4e72529b126408a62ea37d9e9368e5ff69c8fcf2bad3ec09065cff09467f82117a892c51090018706d2f38c03cb9a974a61a49bd9efa0f144 DIST mongodb-src-r4.2.11.tar.gz 61829417 BLAKE2B cc989d6ea87a48b7402d119dda4678a966cf96cec0da5d00d792faf06ecb6fbe4bc426069e1a72548410adcbd26162038ec7201e76036ac599af5f53029c0e66 SHA512 ff398a9d3a012e0eb860c2139967e163b8b0ac045c1c47f2c0c5584ba7c60a1403bb423ce8c6e8b3900fdcad1164a84c6da79276f897fd640366e3f80cf54316 +DIST mongodb-src-r4.2.12.tar.gz 61855596 BLAKE2B 2114c3b6e7a941c566cf631e06b0f850d4f10b12fb6367caef5d6f6e92ebbee04650b41b8ea9d90e9ba983012f812144be9c50caa77c9a68263b6a6a19d522b2 SHA512 9be714b6d8f51cfd36530b103cfb5e9b31493c6294b453d32fe2176dd06e9a2145a671bd15b1f97865944c88256fbaea63542a994f2c033df75ab7280e82a576 DIST mongodb-src-r4.4.1.tar.gz 49644743 BLAKE2B 7d84998c69b9b55164ebab04b49c38a4113a0f58d431612389ec37eb044fba1adf9284e9d4454bd40bb7a071fd042308a5cd350129d6d52480412cf6b868ec2b SHA512 16aa66995ea8cfe0cc47b96c1c5643a28ab47fc9f27bd93404cf572944ab30492df7c9255553f918b353cd7157a6ccde9ac6f58bfba322fb52c2d7409c6fb9b0 DIST mongodb-src-r4.4.2.tar.gz 49816559 BLAKE2B 0e51302e7e414de9fef74872e44c8de1f5682cb3cac0aa7a02e3c1ee3084669ea647d1e574e8a76a3b6b2f34aa4ef693c8d1f3fa025ec3072eff7b7c408b94e5 SHA512 bbf59ed97a8718576c469c696d5331c122f63528dad950fd415b00269c2fa5e6949b372c575e2504c2a58b145bae485172b25000000481662e6543bc3127252a +DIST mongodb-src-r4.4.4.tar.gz 49942905 BLAKE2B 8aa9813e87e216899b3c609b413ce6915d6ddf30faea3c0ecda2a14476fc6b08024614fa7b20e1703b5908759459e88e5e302539c27525c2359233743aa7dcda SHA512 a999528a8a6bf4bf0b8ff8f5169b1aadb3c4dab9c7d936c59d66f238b864fad6e8fb6a1b9ec27f395fca95152ee020f96a8c1cf8960a48de3ce5141f8dda7d88 EBUILD mongodb-4.2.11.ebuild 4787 BLAKE2B b9aa3049df6ebac95cf923504e933e7a268cbf88cc9e5198202f3252feeee907ff001978c99f1a3d6bc450b93c9750a1f438c4453aac443f2997cd908e88d93c SHA512 f2b51e6e0490f2ed79979888add6fcdbb54da8e963374f6ef9954393781df6c7c51cff25f72ed3379606e78f083dcc869b8e2d68663d38595f3dd179708f8299 +EBUILD mongodb-4.2.12.ebuild 4788 BLAKE2B 115775a207a79fa87ffef40fc2dc366661fa4c11c250a9fe233df17691bfb2e88f4c8f40713690bf55c560d76c6686493c3b14b0b392356e646c5ae7de591f1e SHA512 3ae507c6c302079b205691c13166984dbefd51e2a0dbf6252179ac26f0eed71ca60bc8aa5b7c7b33a024669290a138553ae4800799df8659d6f00139db451dde EBUILD mongodb-4.4.1.ebuild 4873 BLAKE2B 9c0f2c502e255275f4a10f9e4304626a77000079d865ffa62cedf534d0962bce76e529ec3f442f550d90c2ab73abfb13686595cdb6e9121c57a036a54673fe63 SHA512 5047b0b34f5a62b69ec2197724f3bc0a3ec6310f887d95bda695448e72e708a7308799ce65128e146fdb5a42918acb8ea2efb6d3fcdf983c5318019baef8225a EBUILD mongodb-4.4.2.ebuild 4828 BLAKE2B 9ef6309cda268a3ffeb0a911995ba315dd7b46125f86dd3dc993a0cd6fedff247ccddffe1453391a26031b1e42b07fd5cb7946894a5d2663478ed4ea210a463a SHA512 5ac4a24121572c858f63e251d701e95cc79c4baacdb24ec6026746a60e77fe164205f67fde38fce24ded3e560c56f0e5e2601366c32b6dae80f9b12b934cd6a7 +EBUILD mongodb-4.4.4.ebuild 4828 BLAKE2B 9ef6309cda268a3ffeb0a911995ba315dd7b46125f86dd3dc993a0cd6fedff247ccddffe1453391a26031b1e42b07fd5cb7946894a5d2663478ed4ea210a463a SHA512 5ac4a24121572c858f63e251d701e95cc79c4baacdb24ec6026746a60e77fe164205f67fde38fce24ded3e560c56f0e5e2601366c32b6dae80f9b12b934cd6a7 MISC metadata.xml 824 BLAKE2B d7e131d6292b092deb2001bbd6f3d6f6a908f57a064f36f64429696849633ae5ff8dee36604e9952a90ef160b834c56f91d085be7c67a6f9a973c83875bf426c SHA512 cc3555829b1587640259c30c8ede022846ad60993d064ba43d16b28ef5b4a46e5b1fad6818826d4668f0738d27a43f29c5ec769fd647076828e275b5d325e748 diff --git a/dev-db/mongodb/mongodb-4.2.12.ebuild b/dev-db/mongodb/mongodb-4.2.12.ebuild new file mode 100644 index 000000000000..0c574bfd2752 --- /dev/null +++ b/dev-db/mongodb/mongodb-4.2.12.ebuild @@ -0,0 +1,175 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +PYTHON_COMPAT=( python3_{7..9} ) + +SCONS_MIN_VERSION="2.5.0" +CHECKREQS_DISK_BUILD="2400M" +CHECKREQS_DISK_USR="512M" +CHECKREQS_MEMORY="1024M" + +inherit check-reqs flag-o-matic multiprocessing pax-utils python-any-r1 scons-utils systemd toolchain-funcs + +MY_P=${PN}-src-r${PV/_rc/-rc} + +DESCRIPTION="A high-performance, open source, schema-free document-oriented database" +HOMEPAGE="https://www.mongodb.com" +SRC_URI="https://fastdl.mongodb.org/src/${MY_P}.tar.gz" + +LICENSE="Apache-2.0 SSPL-1" +SLOT="0" +KEYWORDS="~amd64 ~arm64" +IUSE="debug kerberos libressl lto ssl test +tools" +RESTRICT="!test? ( test )" + +RDEPEND="acct-group/mongodb + acct-user/mongodb + >=app-arch/snappy-1.1.3 + >=dev-cpp/yaml-cpp-0.6.2:= + >=dev-libs/boost-1.70:=[threads(+)] + >=dev-libs/libpcre-8.42[cxx] + app-arch/zstd + dev-libs/snowball-stemmer + net-libs/libpcap + >=sys-libs/zlib-1.2.11:= + kerberos? ( dev-libs/cyrus-sasl[kerberos] ) + ssl? ( + !libressl? ( >=dev-libs/openssl-1.0.1g:0= ) + libressl? ( dev-libs/libressl:0= ) + )" +DEPEND="${RDEPEND} + ${PYTHON_DEPS} + $(python_gen_any_dep ' + test? ( dev-python/pymongo[${PYTHON_USEDEP}] dev-python/requests[${PYTHON_USEDEP}] ) + >=dev-util/scons-2.5.0[${PYTHON_USEDEP}] + dev-python/cheetah3[${PYTHON_USEDEP}] + dev-python/psutil[${PYTHON_USEDEP}] + dev-python/pyyaml[${PYTHON_USEDEP}] + ') + sys-libs/ncurses:0= + sys-libs/readline:0= + debug? ( dev-util/valgrind )" +PDEPEND="tools? ( >=app-admin/mongo-tools-${PV} )" + +PATCHES=( + "${FILESDIR}/${PN}-4.2.0-fix-scons.patch" + "${FILESDIR}/${PN}-4.2.10-no-compass.patch" +) + +S="${WORKDIR}/${MY_P}" + +python_check_deps() { + if use test; then + has_version "dev-python/pymongo[${PYTHON_USEDEP}]" || return 1 + has_version "dev-python/requests[${PYTHON_USEDEP}]" || return 1 + fi + + has_version ">=dev-util/scons-2.5.0[${PYTHON_USEDEP}]" && + has_version "dev-python/cheetah3[${PYTHON_USEDEP}]" && + has_version "dev-python/psutil[${PYTHON_USEDEP}]" && + has_version "dev-python/pyyaml[${PYTHON_USEDEP}]" +} + +pkg_pretend() { + if [[ -n ${REPLACING_VERSIONS} ]]; then + if ver_test "$REPLACING_VERSIONS" -lt 4.0; then + ewarn "To upgrade from a version earlier than the 4.0-series, you must" + ewarn "successively upgrade major releases until you have upgraded" + ewarn "to 4.0-series. Then upgrade to 4.2 series." + else + ewarn "Be sure to set featureCompatibilityVersion to 4.0 before upgrading." + fi + fi +} + +src_prepare() { + default + + # remove bundled libs + rm -r src/third_party/{boost-*,pcre-*,scons-*,snappy-*,yaml-cpp-*,zlib-*,zstandard-*} || die + + # remove compass + rm -r src/mongo/installer/compass || die +} + +src_configure() { + # https://github.com/mongodb/mongo/wiki/Build-Mongodb-From-Source + # --use-system-icu fails tests + # --use-system-tcmalloc is strongly NOT recommended: + scons_opts=( + CC="$(tc-getCC)" + CXX="$(tc-getCXX)" + + --disable-warnings-as-errors + --use-system-boost + --use-system-pcre + --use-system-snappy + --use-system-stemmer + --use-system-yaml + --use-system-zlib + --use-system-zstd + ) + + use arm64 && scons_opts+=( --use-hardware-crc32=off ) # Bug 701300 + use debug && scons_opts+=( --dbg=on ) + use kerberos && scons_opts+=( --use-sasl-client ) + use lto && scons_opts+=( --lto=on ) + use ssl && scons_opts+=( --ssl ) + + # respect mongoDB upstream's basic recommendations + # see bug #536688 and #526114 + if ! use debug; then + filter-flags '-m*' + filter-flags '-O?' + fi + + default +} + +src_compile() { + escons "${scons_opts[@]}" core tools +} + +# FEATURES="test -usersandbox" emerge dev-db/mongodb +src_test() { + ewarn "Tests may hang with FEATURES=usersandbox" + "${EPYTHON}" ./buildscripts/resmoke.py run --dbpathPrefix=test --suites core --jobs=$(makeopts_jobs) || die "Tests failed with ${EPYTHON}" +} + +src_install() { + escons "${scons_opts[@]}" --nostrip install --prefix="${ED}"/usr + + doman debian/mongo*.1 + dodoc README docs/building.md + + newinitd "${FILESDIR}/${PN}.initd-r3" ${PN} + newconfd "${FILESDIR}/${PN}.confd-r3" ${PN} + newinitd "${FILESDIR}/mongos.initd-r3" mongos + newconfd "${FILESDIR}/mongos.confd-r3" mongos + + insinto /etc + newins "${FILESDIR}/${PN}.conf-r3" ${PN}.conf + newins "${FILESDIR}/mongos.conf-r2" mongos.conf + + systemd_dounit "${FILESDIR}/${PN}.service" + + insinto /etc/logrotate.d/ + newins "${FILESDIR}/${PN}.logrotate" ${PN} + + # see bug #526114 + pax-mark emr "${ED}"/usr/bin/{mongo,mongod,mongos} + + local x + for x in /var/{lib,log}/${PN}; do + diropts -m0750 -o mongodb -g mongodb + keepdir "${x}" + done +} + +pkg_postinst() { + ewarn "Make sure to read the release notes and follow the upgrade process:" + ewarn " https://docs.mongodb.com/manual/release-notes/$(ver_cut 1-2)/" + ewarn " https://docs.mongodb.com/manual/release-notes/$(ver_cut 1-2)/#upgrade-procedures" +} diff --git a/dev-db/mongodb/mongodb-4.4.4.ebuild b/dev-db/mongodb/mongodb-4.4.4.ebuild new file mode 100644 index 000000000000..24d855cd1a1a --- /dev/null +++ b/dev-db/mongodb/mongodb-4.4.4.ebuild @@ -0,0 +1,176 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +PYTHON_COMPAT=( python3_{7..9} ) + +SCONS_MIN_VERSION="3.3.1" +CHECKREQS_DISK_BUILD="2400M" +CHECKREQS_DISK_USR="512M" +CHECKREQS_MEMORY="1024M" + +inherit check-reqs flag-o-matic multiprocessing pax-utils python-any-r1 scons-utils systemd toolchain-funcs + +MY_P=${PN}-src-r${PV/_rc/-rc} + +DESCRIPTION="A high-performance, open source, schema-free document-oriented database" +HOMEPAGE="https://www.mongodb.com" +SRC_URI="https://fastdl.mongodb.org/src/${MY_P}.tar.gz" + +LICENSE="Apache-2.0 SSPL-1" +SLOT="0" +KEYWORDS="~amd64 ~arm64" +IUSE="debug kerberos libressl lto ssl test +tools" +RESTRICT="!test? ( test )" + +RDEPEND="acct-group/mongodb + acct-user/mongodb + >=app-arch/snappy-1.1.3 + >=dev-cpp/yaml-cpp-0.6.2:= + >=dev-libs/boost-1.70:=[threads(+),nls] + >=dev-libs/libpcre-8.42[cxx] + app-arch/zstd + dev-libs/snowball-stemmer + net-libs/libpcap + >=sys-libs/zlib-1.2.11:= + kerberos? ( dev-libs/cyrus-sasl[kerberos] ) + ssl? ( + !libressl? ( >=dev-libs/openssl-1.0.1g:0= ) + libressl? ( dev-libs/libressl:0= ) + )" +DEPEND="${RDEPEND} + ${PYTHON_DEPS} + $(python_gen_any_dep ' + test? ( dev-python/pymongo[${PYTHON_USEDEP}] dev-python/requests[${PYTHON_USEDEP}] ) + >=dev-util/scons-3.1.1[${PYTHON_USEDEP}] + dev-python/cheetah3[${PYTHON_USEDEP}] + dev-python/psutil[${PYTHON_USEDEP}] + dev-python/pyyaml[${PYTHON_USEDEP}] + ') + sys-libs/ncurses:0= + sys-libs/readline:0= + debug? ( dev-util/valgrind )" +PDEPEND="tools? ( >=app-admin/mongo-tools-100 )" + +PATCHES=( + "${FILESDIR}/${PN}-4.4.1-fix-scons.patch" + "${FILESDIR}/${PN}-4.4.1-no-compass.patch" + "${FILESDIR}/${PN}-4.4.1-boost.patch" +) + +S="${WORKDIR}/${MY_P}" + +python_check_deps() { + if use test; then + has_version "dev-python/pymongo[${PYTHON_USEDEP}]" || return 1 + has_version "dev-python/requests[${PYTHON_USEDEP}]" || return 1 + fi + + has_version ">=dev-util/scons-2.5.0[${PYTHON_USEDEP}]" && + has_version "dev-python/cheetah3[${PYTHON_USEDEP}]" && + has_version "dev-python/psutil[${PYTHON_USEDEP}]" && + has_version "dev-python/pyyaml[${PYTHON_USEDEP}]" +} + +pkg_pretend() { + if [[ -n ${REPLACING_VERSIONS} ]]; then + if ver_test "$REPLACING_VERSIONS" -lt 4.2; then + ewarn "To upgrade from a version earlier than the 4.2-series, you must" + ewarn "successively upgrade major releases until you have upgraded" + ewarn "to 4.2-series. Then upgrade to 4.4 series." + else + ewarn "Be sure to set featureCompatibilityVersion to 4.2 before upgrading." + fi + fi +} + +src_prepare() { + default + + # remove bundled libs + rm -r src/third_party/{boost-*,pcre-*,scons-*,snappy-*,yaml-cpp-*,zlib-*} || die + + # remove compass + rm -r src/mongo/installer/compass || die +} + +src_configure() { + # https://github.com/mongodb/mongo/wiki/Build-Mongodb-From-Source + # --use-system-icu fails tests + # --use-system-tcmalloc is strongly NOT recommended: + scons_opts=( + CC="$(tc-getCC)" + CXX="$(tc-getCXX)" + + --disable-warnings-as-errors + --use-system-boost + --use-system-pcre + --use-system-snappy + --use-system-stemmer + --use-system-yaml + --use-system-zlib + --use-system-zstd + ) + + use arm64 && scons_opts+=( --use-hardware-crc32=off ) # Bug 701300 + use debug && scons_opts+=( --dbg=on ) + use kerberos && scons_opts+=( --use-sasl-client ) + use lto && scons_opts+=( --lto=on ) + use ssl && scons_opts+=( --ssl ) + + # respect mongoDB upstream's basic recommendations + # see bug #536688 and #526114 + if ! use debug; then + filter-flags '-m*' + filter-flags '-O?' + fi + + default +} + +src_compile() { + PREFIX="${ED}"/usr escons "${scons_opts[@]}" --nostrip install-core +} + +# FEATURES="test -usersandbox" emerge dev-db/mongodb +src_test() { + ewarn "Tests may hang with FEATURES=usersandbox" + "${EPYTHON}" ./buildscripts/resmoke.py run --dbpathPrefix=test --suites core --jobs=$(makeopts_jobs) || die "Tests failed with ${EPYTHON}" +} + +src_install() { + dobin build/install/bin/{mongo,mongod,mongos} + + doman debian/mongo*.1 + dodoc README docs/building.md + + newinitd "${FILESDIR}/${PN}.initd-r3" ${PN} + newconfd "${FILESDIR}/${PN}.confd-r3" ${PN} + newinitd "${FILESDIR}/mongos.initd-r3" mongos + newconfd "${FILESDIR}/mongos.confd-r3" mongos + + insinto /etc + newins "${FILESDIR}/${PN}.conf-r3" ${PN}.conf + newins "${FILESDIR}/mongos.conf-r2" mongos.conf + + systemd_dounit "${FILESDIR}/${PN}.service" + + insinto /etc/logrotate.d/ + newins "${FILESDIR}/${PN}.logrotate" ${PN} + + # see bug #526114 + pax-mark emr "${ED}"/usr/bin/{mongo,mongod,mongos} + + local x + for x in /var/{lib,log}/${PN}; do + diropts -m0750 -o mongodb -g mongodb + keepdir "${x}" + done +} + +pkg_postinst() { + ewarn "Make sure to read the release notes and follow the upgrade process:" + ewarn " https://docs.mongodb.com/manual/release-notes/$(ver_cut 1-2)/" + ewarn " https://docs.mongodb.com/manual/release-notes/$(ver_cut 1-2)/#upgrade-procedures" +} diff --git a/dev-db/mysql-connector-c/Manifest b/dev-db/mysql-connector-c/Manifest index 0991558e1c91..06f5cb9c1254 100644 --- a/dev-db/mysql-connector-c/Manifest +++ b/dev-db/mysql-connector-c/Manifest @@ -5,5 +5,5 @@ AUX mysql-connector-c-8.0.23-libressl.patch 13374 BLAKE2B 991f1e921c3f06937c682e DIST mysql-boost-8.0.22.tar.gz 285934450 BLAKE2B 1ba0c9bb9a0cb74af4842d3b746f8b690c122cfbf2c6d5201ce95e59a257427a8683dd8d5c2be31dfe9ece4761366c1287fa7b841c45db222725bf76b0639bc6 SHA512 792f2ada93ec67a4679228478c6b798e81d9e9f6d13c7f4977cb7682738a4aae3cb483294edc6b2fde16c3960e51af8786216c063ab500840afd39a609e4b612 DIST mysql-boost-8.0.23.tar.gz 291039175 BLAKE2B 3a7d3e05c774085d6078d0d3effd58d2df47521615356a2aa5efc2ea2ef8457e19ad57a054926ccff0a4752ca71d0464daa7fe9a3ac6c1b1d3bd86a9a82dfc58 SHA512 b8c2e2ac772b7b730f8b3bac7a5afb205da173b3639500606e7d1fac74832a0134027951855a2dc81af015e6158c924927ad63b9e1f2e7c823d45d4c4961c3f8 EBUILD mysql-connector-c-8.0.22.ebuild 2904 BLAKE2B b46f1757bd0d1f4ba6db5f9c029425e57f5f43b379ce121fcffffd0d6562f747b81f980bbf22cec610fdb416192b05368cd9cb45362e296d6e851de6d5ed6780 SHA512 e8de286e91c74a9cd65396d713372fa13d793a719bd702e9116370659194b001a221881051f0bc9c46f3474336e7d134177b1bd35883c09e0e0c3f3c5e0902e5 -EBUILD mysql-connector-c-8.0.23.ebuild 2911 BLAKE2B f94bb5ef4bf2d292366365145b76664c7da3a9d9012b0da24a1e4112d9f30e2676e884c2f8a232081096b21d32d9d8c63ac56dac903697b6677f0bb9dc83a15e SHA512 262330857d2785449aa0bd1e6c5d4c167c88b3b1ed57b1686cc9d4dbb34a33277e6ade1409b8d169f068f5281ec9ed2189a29abfa14105ef30f3614751718b0a +EBUILD mysql-connector-c-8.0.23-r1.ebuild 2980 BLAKE2B 77204b68e7322efddef3db0adaec920f596b960743adbad721386947195f7faaf6707bd2217d0c566fb5eb9301d29aa913eef3fee77a5cf946973fe1bd7386ce SHA512 cfe53abf698a40f57e51af85d5eef0315d89deddfc73c5dec4636720271225899df31c917c34ffe1f0119dcb39e66aae826456b15fa9177fc100257d0bc3badd MISC metadata.xml 239 BLAKE2B c4d6706d083b72927d239f41a644a4009c054c1c1a388af7733d3a2daf47d354009eb472573304a6be272601f05535297bcd9ceaea811a741cd905577ffe53d1 SHA512 e6e2fafe2f503db1d12e3d2368a99631ee8d014b7ea802d9879e7e3e2c0f9378675fffccd78ed09b914ae781ac3902567b1a53a721906e3ea63ceb51d0a1654b diff --git a/dev-db/mysql-connector-c/mysql-connector-c-8.0.23.ebuild b/dev-db/mysql-connector-c/mysql-connector-c-8.0.23-r1.ebuild index 17f49931dfe1..1abc77fe9934 100644 --- a/dev-db/mysql-connector-c/mysql-connector-c-8.0.23.ebuild +++ b/dev-db/mysql-connector-c/mysql-connector-c-8.0.23-r1.ebuild @@ -3,6 +3,7 @@ EAPI=7 +CMAKE_ECLASS=cmake inherit cmake-multilib # wrap the config script @@ -10,12 +11,11 @@ MULTILIB_CHOST_TOOLS=( /usr/bin/mysql_config ) DESCRIPTION="C client library for MariaDB/MySQL" HOMEPAGE="https://dev.mysql.com/downloads/" -LICENSE="GPL-2" - SRC_URI="https://dev.mysql.com/get/Downloads/MySQL-8.0/mysql-boost-${PV}.tar.gz" -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 sparc ~x86" +LICENSE="GPL-2" SLOT="0/21" +KEYWORDS="~alpha amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 sparc ~x86" IUSE="ldap libressl static-libs" RDEPEND=" @@ -25,7 +25,7 @@ RDEPEND=" ldap? ( dev-libs/cyrus-sasl:=[${MULTILIB_USEDEP}] ) libressl? ( dev-libs/libressl:0=[${MULTILIB_USEDEP}] ) !libressl? ( dev-libs/openssl:0=[${MULTILIB_USEDEP}] ) - " +" DEPEND="${RDEPEND}" # Avoid file collisions, #692580 @@ -48,7 +48,7 @@ PATCHES=( ) src_prepare() { - sed -i -e 's/CLIENT_LIBS/CONFIG_CLIENT_LIBS/' "${S}/scripts/CMakeLists.txt" || die + sed -i -e 's/CLIENT_LIBS/CONFIG_CLIENT_LIBS/' "scripts/CMakeLists.txt" || die # All these are for the server only. # Disable rpm call which would trigger sandbox, #692368 @@ -73,11 +73,15 @@ src_prepare() { echo > libmysql/authentication_ldap/CMakeLists.txt || die fi - cmake-utils_src_prepare + cmake_src_prepare } multilib_src_configure() { + CMAKE_BUILD_TYPE="RelWithDebInfo" + local mycmakeargs=( + -DCMAKE_C_FLAGS_RELWITHDEBINFO=-DNDEBUG + -DCMAKE_CXX_FLAGS_RELWITHDEBINFO=-DNDEBUG -DINSTALL_LAYOUT=RPM -DINSTALL_LIBDIR=$(get_libdir) -DWITH_DEFAULT_COMPILER_OPTIONS=OFF @@ -93,11 +97,8 @@ multilib_src_configure() { -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DWITHOUT_SERVER=ON ) - cmake-utils_src_configure -} -multilib_src_install() { - cmake-utils_src_install + cmake_src_configure } multilib_src_install_all() { diff --git a/dev-db/pgadmin4/Manifest b/dev-db/pgadmin4/Manifest index a09dcd1c493e..d1272f28272b 100644 --- a/dev-db/pgadmin4/Manifest +++ b/dev-db/pgadmin4/Manifest @@ -1,6 +1,6 @@ AUX pgadmin4.desktop 298 BLAKE2B 9048ee03c9f8e05807f2907fd7dcfda9d76bb3cd3b2567676cf6bc9acebdf8d2b4de1626f9fe57c4940422766fa7e6fa9111a5bc9c252e34f72af2850813b158 SHA512 a083c525cf49543751dcf4f98a9e2607ce06c35a573c5a97d4088b21b41dc260ea0fcbb139ce153f0e1deb6bd8e6e75e69a6fe08ff2f4aa563d7398bd52553b2 DIST pgadmin4-4.29.tar.gz 35389494 BLAKE2B faaa84c0eee9c92ba483f4adffaf9e39e0c5f8ea21630a9ee8fad62aa833c88aa913df50c760be740afa0696aa1fbf1b6902a8b5bfd322822472f7d2dcb295e1 SHA512 2c7d20d10c96712f41621c2862a6a6222f6d6dad4a0b3e1aaf04744e65744460dcae4220f61b27785e02c82a624fa0793df2ea9d8e83ac0a6de048455929e615 DIST pgadmin4-4.30.tar.gz 36490656 BLAKE2B 3e8e998b29b13ced40b38106a468d047dea92a0cc930150d153c473e78045278840f78b3bcbd41f20a5017e68c1980c05ccf734bf63d8f107e0e02c2df54162e SHA512 7ce12f65ce9dbfe4af9e92dd7f9327a05be8b8436ef495a0634043158417f3af5f457b88ee5422ede59f517c197668094454c6d7b7c33e255068479ce6ec13d9 -EBUILD pgadmin4-4.29.ebuild 3922 BLAKE2B 613e2fdc1e4daa79bb5876c76a677f9d4f0c3a4d2c020019466dfe9547acb24fb42a534f62f9cb367e6734ed1d4a3ca98dcf07edcbafacd484b4baeef640252b SHA512 b0b23f05c33a073e84e17752520fbb41aa5b018258970fd4ff3ecd8f38773079e17ff6a330d58c5796c70df69269d42b4489a1f76095cc581c16390864862aed -EBUILD pgadmin4-4.30.ebuild 4027 BLAKE2B 859d39748fccd51a24674762a054078af666c051b12087d783e1ada55256ba602a8fb4bb848735afd999eb28e765bbccdb043ccead8af67b3a5223f0ba749c3d SHA512 fa5c4a62d42df0f1fc27d2a3bb001d803ec928ae28701fa129366ab8a49b73ccdc667db0d8ea5e9b921084af8ce8c666996a5233165ec0fe67b5e9bffde146dd +EBUILD pgadmin4-4.29-r1.ebuild 3921 BLAKE2B fee1e9acc4b834f380038e0ee7575b65f61429adf3c253510be1622a0e46f5c8b76e400f93b1d8ee5a219f0241db39bfd98fc114e1f83587d3c4bf11eace97fc SHA512 956d55aa74100025b20876b6df2307041aee31ad9a46e14ed7ee30eeb3ebff8d28ec53f4aa4c5345461a06086f7cb07b50a54f7d18cc1c76fafac4b65ae3ae19 +EBUILD pgadmin4-4.30-r1.ebuild 4026 BLAKE2B fd07d98cde16b80576889e10fc9e170c64a2ca3088f6fa89023f527980a46ec365c3f1952399f8d3db3cb31369959d43374d5fd2659a672d1742694a07b8d691 SHA512 cd14438ae823d2baad005e0c11d9255a946f5e7900f2c668cefba7374ea01bc4ab32d05ea64392bec45fead566833c7b9aace14190036f9d82ae801872df003b MISC metadata.xml 266 BLAKE2B 9d5988ab45f9939f9be5ee7f4b7a9950a3d62252aa0d3e6c953265467428c59fb8c05b2bb72085431b7aa9fc18d31f2b3273e8fdb33443d786b2237db697b7e2 SHA512 9f85990c7ce6a1de5c1067e4781af18bede2d3bd02963a7b2927766b70dbe98d3fb63bb01e19b1cf6e2b77038d9788bf38155b3cc33f9e5ff8430b10a4006325 diff --git a/dev-db/pgadmin4/pgadmin4-4.29.ebuild b/dev-db/pgadmin4/pgadmin4-4.29-r1.ebuild index 1e90321652d2..0423fbc67937 100644 --- a/dev-db/pgadmin4/pgadmin4-4.29.ebuild +++ b/dev-db/pgadmin4/pgadmin4-4.29-r1.ebuild @@ -54,7 +54,7 @@ RDEPEND="${COMMON_DEPEND} >=dev-python/flask-migrate-2.4.0[${PYTHON_MULTI_USEDEP}] >=dev-python/flask-paranoid-0.2.0[${PYTHON_MULTI_USEDEP}] >=dev-python/flask-principal-0.4.0[${PYTHON_MULTI_USEDEP}] - >=dev-python/flask-security-3.0.0[${PYTHON_MULTI_USEDEP}] + <dev-python/flask-security-4.0.0[${PYTHON_MULTI_USEDEP}] >=dev-python/flask-sqlalchemy-2.4.1[${PYTHON_MULTI_USEDEP}] >=dev-python/flask-wtf-0.14.3[${PYTHON_MULTI_USEDEP}] >=dev-python/ldap3-2.5.1[${PYTHON_MULTI_USEDEP}] diff --git a/dev-db/pgadmin4/pgadmin4-4.30.ebuild b/dev-db/pgadmin4/pgadmin4-4.30-r1.ebuild index 0c5448e5d15d..0d94e48163f5 100644 --- a/dev-db/pgadmin4/pgadmin4-4.30.ebuild +++ b/dev-db/pgadmin4/pgadmin4-4.30-r1.ebuild @@ -55,7 +55,7 @@ RDEPEND="${COMMON_DEPEND} >=dev-python/flask-migrate-2.4.0[${PYTHON_MULTI_USEDEP}] >=dev-python/flask-paranoid-0.2.0[${PYTHON_MULTI_USEDEP}] >=dev-python/flask-principal-0.4.0[${PYTHON_MULTI_USEDEP}] - >=dev-python/flask-security-3.0.0[${PYTHON_MULTI_USEDEP}] + <dev-python/flask-security-4.0.0[${PYTHON_MULTI_USEDEP}] >=dev-python/flask-sqlalchemy-2.4.1[${PYTHON_MULTI_USEDEP}] >=dev-python/flask-wtf-0.14.3[${PYTHON_MULTI_USEDEP}] >=dev-python/ldap3-2.5.1[${PYTHON_MULTI_USEDEP}] diff --git a/dev-db/postgresql/Manifest b/dev-db/postgresql/Manifest index 15a502e47479..192baef60a10 100644 --- a/dev-db/postgresql/Manifest +++ b/dev-db/postgresql/Manifest @@ -18,11 +18,11 @@ DIST postgresql-12.6.tar.bz2 20771172 BLAKE2B 7df8eb901255f56b4574cdd94a5e9d5a90 DIST postgresql-13.2.tar.bz2 21057276 BLAKE2B 982feffdd98d3f519ff1e790d35ac828710d3ca6cbf935a78bf04011dbc12b4523b451bc7f2421a788a709d1746b2cca9135842bfc1d5048ef5951ed48b20b6a SHA512 6d93cbae8de8637deeccd851fb676a12015e8e1efa6be2424f506f232db535c54b974b11f47ed4578575f90f6de1947b1647f399794b4ec242838efd4c5b2bce DIST postgresql-9.5.25.tar.bz2 17923796 BLAKE2B 432e035e78dacddddfd46fd4d04775b61e2e4db9e61945fa5f7e1c3c5ea3516a5e327489b4e57313b0d6ba4f2e20f52a164f96db01aa22b755ff625039f262eb SHA512 621b36d767d2c7eb2e942cb7b26ca7491450fcfd9606114849f7336b4d8a0bc0196badb44da4918e748145d21b6f72ccf1255a1309dff2427da8b39b63fca427 DIST postgresql-9.6.21.tar.bz2 18990266 BLAKE2B 42a2feaf15b8fd4cfcc028a744a696314f0ce7b22ec6c18c43152d7e4b8149a9d5acd6cf22c1d13643709dd2b3f1de571e2925c7fc501dc361248c99c88e3f42 SHA512 6fba42171cbe4ec24ed250c32cc8f35be70ddfbc6d1ef0df733bbd094b29174ef198db351f6679a26170effe1fed44269dbe9dbdd619bb18be87f5b539f74475 -EBUILD postgresql-10.16.ebuild 13708 BLAKE2B 396868b51d52e84fe31b13adfb2b5c39b812c7c7cbcd3649fd6e15c98c33f40656f580c693fc2c18a2a466bf5419be08d595b8f1874a029312bb33ee4463d0d2 SHA512 6b621120e7e8b841e711b231bf598401f562c046f49a36d8fa78956f01e95674aa08ff7c399480e012c2b9bf52595b3d920664f790b372964ec094f2bea69f24 -EBUILD postgresql-11.11.ebuild 13658 BLAKE2B ad4d0294dbf082790da80a852e35b68d5e6c800098785e342deefe4f31035b67f02ccf0781cdc15228b5e29928bc4f1b98232d6cc47f4aab1c17743f504572b4 SHA512 7be02dd64b0a660a8a0be400c73abbf389da35e8d06eaacc652143da1bfbf6c1bcaee3646c1857b7cb50dd27abea484875b10dd0dfb8576736c45436df09e6aa -EBUILD postgresql-12.6.ebuild 13630 BLAKE2B a16b26a6baf869c8702df6cc07e1c32bb15e5399e1ac436b7a79f310c3bd3d359e4059702621c42ace7ab3f5a6371552de3838a6aa0b250590cdf90d417a0555 SHA512 f0fcf871e436a00b67065c1a4698a4178276d3a1da2332d7f6d525e4ea9655efbe208d747eae10f37bde568aa9b31d930cb6b53eaea52e78dc6a8ea1958f2829 -EBUILD postgresql-13.2.ebuild 13876 BLAKE2B a9a7451e095c3eb37f98e8030d5ac0b2d32d45448758793fc4d6190575ea20aa03394628f809fd925de669772e41ddd3b03c4149bc3526cd6241527d9622289c SHA512 7fc2e90a874911ee7be23bc464040d792a6b03bceeb35c7cdfe81595d4a4f236a7f30dc8d6d70d2ebe523785ccf100590af207ce611f2d18c4ecfd154c85e691 -EBUILD postgresql-9.5.25.ebuild 14359 BLAKE2B 023fef7d638339180a10b499cb6c727bb7799092611e88cfa0c47d9b1a86d68386898181dce1be9b21e2fbd764fec41d209fb5dc2a8d5f3de8fb5b57a1fc5e13 SHA512 161d3212b00465fca5367032bd5300ab65e763dca25cea82ef81064ea0b15c27967ffb7d9d7c00cb741472e8f72f966b0672bb04b326cae650ddafbfc4e40973 -EBUILD postgresql-9.6.21.ebuild 14581 BLAKE2B c6072c5be1257207d1a89a976a7ffca7e3806c5332f85d8de6b6a2957995af56293dd895daec7a23c82a6dc2f5f2fe5fb13ffb76ebcd27f8f1834302cdc6f9d0 SHA512 995ce668dda42cc416d0636269677edddfbd147747963cf275528a51c3579369ee91c134de3671cd71b2786b2f6fa995831a8da607e220b7df1a0b11a52d5d5d -EBUILD postgresql-9999.ebuild 14057 BLAKE2B 39b35eb26ed5c45812065a32a55a96fdf53ac1a4f462b2132a43089630158b3fbba9ab1a4f9485f2df493503e52affd9d612bfa874f6a155cc0223aaccbced0a SHA512 87cf7ca36bcaa2af4b990a86cda7fb78f922c25f988f34014f52258d57a9ae99e9684fda7b9add256d07ea8861ddced460e71f25d837abbe92802cfd7b6417f2 +EBUILD postgresql-10.16.ebuild 13701 BLAKE2B 8dd4d481bfbb767db0e6798cd63d92391078dfa53f133fe768cc277872eb668cedc436523d5e676268730b1bccd477bdd84b44c4f9f1ce39ced6247522fcd69d SHA512 e745965c75c199d47165247f138bba493a9def1d1c2294c0cf34fe89aa1682184c8e636d962af3227cb00f83dbc85257176d9ebada4d2f3b8775fc6ce5108633 +EBUILD postgresql-11.11.ebuild 13651 BLAKE2B 064bdd33545a2e5563a9eb9c335e887f0af6f461797147da9f6876cf3b4f34a43f9b9f0b8ec01b6b3456bef3debd6a8f873ffa37ed1a37b73c5c0add0389ae24 SHA512 873cb830b849d6453786a1342d4fafba8a32815bae19fc03ef495be07b856b6456436aa84893fcdb959c9fca641c747d708cb7fef48647918cf5d9ad722a535e +EBUILD postgresql-12.6.ebuild 13623 BLAKE2B fd4a8afad1a5dbf1cdceb5b59185220fb5a2e5adfdfd71bfd413c90f73c92d73aa778ca55e7d556686ee077919362edea63bed26db707cf1d61c357920512526 SHA512 b9a6f025da0d9408c1cd5df3d2150c265a599f4c743016292bf5d8c9841bc315ce38100fb10278cc7b74d80edc7815192310be8efb7e7fb05342af90f476ee4f +EBUILD postgresql-13.2.ebuild 13869 BLAKE2B 1644abb185392b63183e1e949fe9735fa86733e4191716073d12de2fa96538fdf46fc648fdacb6bf06a7b0b4542586ffdcd6b93d7d26fe6a9d22d6377def8d2b SHA512 57dec06a04df5b2cd8847e2dcff6f4a6e643494dd93041a3b75661cf675b15081b2fa9a81bfc3aa89b1769dc474ce0c622a6cb3b4dc4b957242e4419999d327b +EBUILD postgresql-9.5.25.ebuild 14352 BLAKE2B 384d20f025a4c6a5109e6c56b13fc5f3fe1017f4a3e1574ee4902e5a4fba5ca03b06f32407c6a536810a4faec1327ac857004d581102abe88ed54d14d728fe89 SHA512 fe008861fb16e8c4ba9754c89b7beca9d1173e46dec634cf6bd18f0ea95ab36aa600930fef3168d0e6de38a420c8e1af95a1d99b5eda6d9a9eac74f53099470a +EBUILD postgresql-9.6.21.ebuild 14574 BLAKE2B ec064e090ccee5ed827f05469a665014937039fe8c9f12c39ab843037bd772de0fdf25fd931ab5aeb3015fbdcde96bccc6c0cd3afc6b8d969712b76052f1f392 SHA512 991a15e030dd85642f16b05cb724c07fd663630b982e7a982d53b35034d56aa067abf2c6f8b1cf5766549a59adfdbf5bbf074b83a983392c170f1e2d39ccb496 +EBUILD postgresql-9999.ebuild 14050 BLAKE2B 2ab90ab4e72ae00105b995f99b7bfbc249e604ad68f0b1301c1d0bf4a07b192360ac595f66f049e19caade63449ee3b501d842fdf3e58ef7a93bd477a6ccf309 SHA512 1a3fd6fdbe2b5e3a841a4341fccfd4e480c85336668b68994087be439b010f939a412f3b08764546f0ec4e647bf9b7d2ac202ab0075e385c9f98498194a83e41 MISC metadata.xml 715 BLAKE2B 71b868113676bdbb1996ecc8e3727b0cc16a559c5906e6459a41c330bcb5a5f4b3f4b5c4473a81905713c2f0735f185cd14612c69108b6bb602a7d8a92d6f3ce SHA512 4148c9c11ffaea5d30cd18befb06af914147d41eec4a8f905127f0abc5317ca370a745e0fd51b03c4583efde927fe9c1b3333853e80c2aa3e7677de65cd5d1ba diff --git a/dev-db/postgresql/postgresql-10.16.ebuild b/dev-db/postgresql/postgresql-10.16.ebuild index e82b2d2d08b4..ab16abafe92a 100644 --- a/dev-db/postgresql/postgresql-10.16.ebuild +++ b/dev-db/postgresql/postgresql-10.16.ebuild @@ -5,7 +5,7 @@ EAPI=7 PYTHON_COMPAT=( python3_{7,8,9} ) -inherit flag-o-matic linux-info multilib pam prefix python-single-r1 systemd +inherit flag-o-matic linux-info multilib pam prefix python-single-r1 systemd tmpfiles KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~mips ppc ppc64 ~s390 sparc x86 ~ppc-macos ~x86-solaris" @@ -259,7 +259,7 @@ src_install() { "${FILESDIR}/${PN}.service-9.6-r1" | \ systemd_newunit - ${PN}-${SLOT}.service newbin "${FILESDIR}"/${PN}-check-db-dir ${PN}-${SLOT}-check-db-dir - systemd_newtmpfilesd "${FILESDIR}"/${PN}.tmpfiles ${PN}-${SLOT}.conf + newtmpfiles "${FILESDIR}"/${PN}.tmpfiles ${PN}-${SLOT}.conf fi use pam && pamd_mimic system-auth ${PN}-${SLOT} auth account session @@ -272,7 +272,7 @@ src_install() { } pkg_postinst() { - use server && use systemd && systemd_tmpfiles_create ${PN}-${SLOT}.conf + 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:" diff --git a/dev-db/postgresql/postgresql-11.11.ebuild b/dev-db/postgresql/postgresql-11.11.ebuild index cf5cd351c515..76d8f0069f89 100644 --- a/dev-db/postgresql/postgresql-11.11.ebuild +++ b/dev-db/postgresql/postgresql-11.11.ebuild @@ -5,7 +5,7 @@ EAPI=7 PYTHON_COMPAT=( python3_{7,8,9} ) -inherit flag-o-matic linux-info multilib pam prefix python-single-r1 systemd +inherit flag-o-matic linux-info multilib pam prefix 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" @@ -256,7 +256,7 @@ src_install() { "${FILESDIR}/${PN}.service-9.6-r1" | \ systemd_newunit - ${PN}-${SLOT}.service newbin "${FILESDIR}"/${PN}-check-db-dir ${PN}-${SLOT}-check-db-dir - systemd_newtmpfilesd "${FILESDIR}"/${PN}.tmpfiles ${PN}-${SLOT}.conf + newtmpfiles "${FILESDIR}"/${PN}.tmpfiles ${PN}-${SLOT}.conf fi use pam && pamd_mimic system-auth ${PN}-${SLOT} auth account session @@ -269,7 +269,7 @@ src_install() { } pkg_postinst() { - use server && use systemd && systemd_tmpfiles_create ${PN}-${SLOT}.conf + 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:" diff --git a/dev-db/postgresql/postgresql-12.6.ebuild b/dev-db/postgresql/postgresql-12.6.ebuild index 512e4dfc2d3a..07087f076155 100644 --- a/dev-db/postgresql/postgresql-12.6.ebuild +++ b/dev-db/postgresql/postgresql-12.6.ebuild @@ -5,7 +5,7 @@ EAPI=7 PYTHON_COMPAT=( python3_{7,8,9} ) -inherit flag-o-matic linux-info multilib pam prefix python-single-r1 systemd +inherit flag-o-matic linux-info multilib pam prefix 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" @@ -256,7 +256,7 @@ src_install() { "${FILESDIR}/${PN}.service-9.6-r1" | \ systemd_newunit - ${PN}-${SLOT}.service newbin "${FILESDIR}"/${PN}-check-db-dir ${PN}-${SLOT}-check-db-dir - systemd_newtmpfilesd "${FILESDIR}"/${PN}.tmpfiles ${PN}-${SLOT}.conf + newtmpfiles "${FILESDIR}"/${PN}.tmpfiles ${PN}-${SLOT}.conf fi use pam && pamd_mimic system-auth ${PN}-${SLOT} auth account session @@ -269,7 +269,7 @@ src_install() { } pkg_postinst() { - use server && use systemd && systemd_tmpfiles_create ${PN}-${SLOT}.conf + 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:" diff --git a/dev-db/postgresql/postgresql-13.2.ebuild b/dev-db/postgresql/postgresql-13.2.ebuild index 7661f3aed842..577737a80c7c 100644 --- a/dev-db/postgresql/postgresql-13.2.ebuild +++ b/dev-db/postgresql/postgresql-13.2.ebuild @@ -5,7 +5,7 @@ EAPI=7 PYTHON_COMPAT=( python3_{7,8,9} ) -inherit flag-o-matic linux-info multilib pam prefix python-single-r1 systemd +inherit flag-o-matic linux-info multilib pam prefix 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" @@ -256,7 +256,7 @@ src_install() { "${FILESDIR}/${PN}.service-9.6-r1" | \ systemd_newunit - ${PN}-${SLOT}.service newbin "${FILESDIR}"/${PN}-check-db-dir ${PN}-${SLOT}-check-db-dir - systemd_newtmpfilesd "${FILESDIR}"/${PN}.tmpfiles ${PN}-${SLOT}.conf + newtmpfiles "${FILESDIR}"/${PN}.tmpfiles ${PN}-${SLOT}.conf fi use pam && pamd_mimic system-auth ${PN}-${SLOT} auth account session @@ -269,7 +269,7 @@ src_install() { } pkg_postinst() { - use server && use systemd && systemd_tmpfiles_create ${PN}-${SLOT}.conf + 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:" diff --git a/dev-db/postgresql/postgresql-9.5.25.ebuild b/dev-db/postgresql/postgresql-9.5.25.ebuild index 21b9e356bb31..3c904ec03a9f 100644 --- a/dev-db/postgresql/postgresql-9.5.25.ebuild +++ b/dev-db/postgresql/postgresql-9.5.25.ebuild @@ -5,7 +5,7 @@ EAPI=7 PYTHON_COMPAT=( python3_{7,8,9} ) -inherit flag-o-matic linux-info multilib pam prefix python-single-r1 systemd +inherit flag-o-matic linux-info multilib pam prefix python-single-r1 systemd tmpfiles KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~mips ppc ppc64 ~s390 sparc x86 ~ppc-macos ~x86-solaris" @@ -246,7 +246,7 @@ src_install() { sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \ "${FILESDIR}/${PN}.service-9.2" | \ systemd_newunit - ${PN}-${SLOT}.service - systemd_newtmpfilesd "${FILESDIR}"/${PN}.tmpfiles ${PN}-${SLOT}.conf + newtmpfiles "${FILESDIR}"/${PN}.tmpfiles ${PN}-${SLOT}.conf fi newbin "${FILESDIR}"/${PN}-check-db-dir ${PN}-${SLOT}-check-db-dir @@ -295,7 +295,7 @@ pkg_preinst() { } pkg_postinst() { - use server && use systemd && systemd_tmpfiles_create ${PN}-${SLOT}.conf + use server && use systemd && tmpfiles_process ${PN}-${SLOT}.conf postgresql-config update if use alpha && use server ; then diff --git a/dev-db/postgresql/postgresql-9.6.21.ebuild b/dev-db/postgresql/postgresql-9.6.21.ebuild index 974a58975c23..c11c4e214056 100644 --- a/dev-db/postgresql/postgresql-9.6.21.ebuild +++ b/dev-db/postgresql/postgresql-9.6.21.ebuild @@ -5,7 +5,7 @@ EAPI=7 PYTHON_COMPAT=( python3_{7,8,9} ) -inherit flag-o-matic linux-info multilib pam prefix python-single-r1 systemd +inherit flag-o-matic linux-info multilib pam prefix 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" @@ -251,7 +251,7 @@ src_install() { sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \ "${FILESDIR}/${PN}.service-9.6-r1" | \ systemd_newunit - ${PN}-${SLOT}.service - systemd_newtmpfilesd "${FILESDIR}"/${PN}.tmpfiles ${PN}-${SLOT}.conf + newtmpfiles "${FILESDIR}"/${PN}.tmpfiles ${PN}-${SLOT}.conf fi newbin "${FILESDIR}"/${PN}-check-db-dir ${PN}-${SLOT}-check-db-dir @@ -300,7 +300,7 @@ pkg_preinst() { } pkg_postinst() { - use server && use systemd && systemd_tmpfiles_create ${PN}-${SLOT}.conf + 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:" diff --git a/dev-db/postgresql/postgresql-9999.ebuild b/dev-db/postgresql/postgresql-9999.ebuild index ea330b58b0bb..c9a4ce82776c 100644 --- a/dev-db/postgresql/postgresql-9999.ebuild +++ b/dev-db/postgresql/postgresql-9999.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2020 Gentoo Authors +# Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=7 @@ -6,7 +6,7 @@ EAPI=7 PYTHON_COMPAT=( python3_{7,8,9} ) inherit flag-o-matic git-r3 linux-info multilib pam prefix python-single-r1 \ - systemd + systemd tmpfiles KEYWORDS="" @@ -209,7 +209,7 @@ src_install() { sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \ "${FILESDIR}/${PN}.service-9.6-r1" | \ systemd_newunit - ${PN}-${SLOT}.service - systemd_newtmpfilesd "${FILESDIR}"/${PN}.tmpfiles ${PN}-${SLOT}.conf + newtmpfiles "${FILESDIR}"/${PN}.tmpfiles ${PN}-${SLOT}.conf fi newbin "${FILESDIR}"/${PN}-check-db-dir ${PN}-${SLOT}-check-db-dir @@ -293,7 +293,7 @@ pkg_preinst() { } pkg_postinst() { - use systemd && systemd_tmpfiles_create ${PN}-${SLOT}.conf + use systemd && tmpfiles_process ${PN}-${SLOT}.conf postgresql-config update elog "If you need a global psqlrc-file, you can place it in:" diff --git a/dev-db/redis/Manifest b/dev-db/redis/Manifest index 689590dc9edd..0cf3c261b68c 100644 --- a/dev-db/redis/Manifest +++ b/dev-db/redis/Manifest @@ -26,9 +26,9 @@ DIST redis-5.0.9.tar.gz 1986574 BLAKE2B 7802d0556d11c9be8577b9bb3f4dbad8c2419b38 DIST redis-6.0.12.tar.gz 2276349 BLAKE2B ab49b0278420c65fc995a90e850130971ccaf3df34a08a5cc10a8c211239eba8449b87fe67684189c71816cf259a70a23a77935ec61e8baa787daa61cb994201 SHA512 9dd8e3bed51e1356470e1bf08892f771744c0c9418ff874c16ea932ad1f471a908ffd8479efe1f32531d7f63cd7af5224273ce50f2fe7aa26c47716e0e78330b DIST redis-6.0.9.tar.gz 2261418 BLAKE2B 93e64e2c682320d11e468021fd13a2888dd6b15430c15eaaa9468242d9b4d8b60e29dfe656e677774dc88ed751471284d1adf94c723521085019b375785abe7a SHA512 ebae2b09637fdbdc71dd22b72ccea24e2c21beb81c6ff5c4bae8b341886a7d847ce868f52dc917079bab8aa250ff61c83efe8acbb8a1cbc5e285c7842b0aefa3 DIST redis-6.2.1.tar.gz 2438367 BLAKE2B 8717630771eafaf8a15dd371d46475f81f15bbcdc9a4fabd8f270ab6e09fbfb3ee2a1cddddb6c7778922d3552bcf5ee475eec7ba0623147ec36a5c5422cb0de0 SHA512 7c339cc360fc3125bb67c5748bb4fe940977faa937e3a86294829bde472479a811df8ea0ce4961d8128ec8d4ffba5d5a943c2957589c8da0cfc3f109f82e4af6 -EBUILD redis-5.0.12.ebuild 4733 BLAKE2B 16dff9009b44aff40a0d8b00c6d9885fd26bbd7265a57f09b57060acedb083d15ccbf593015bf66fdd0b0d05b8ce84cfc3805000b7f0aa9a5d7209773046d476 SHA512 f25cf0346af69b39075537a5fc8ee547c1bc3d1c3bd77e9ea6ab7c44fcbfd13e4e23ed5126f37fa86ecf5637c8a6619d864c69cfe3a5b5879464c04c1f7d9261 -EBUILD redis-5.0.9-r1.ebuild 4727 BLAKE2B 691271bcb72643dd3b1b0adb6f1a374967b7172437c2049fbc6cfdb01b19ee2cbd104f0baa96fce3b6b6983704f49922863f45677727b4d4ee573694d6897336 SHA512 bf5edded12de21673a5095ea034a344de05b5e54070dbbe698b8ca591d576af209f38df9c3715c21e38e877ae79a9b57b894142a55f2c475e933f72e4dc95222 -EBUILD redis-6.0.12.ebuild 5021 BLAKE2B ac91e37906af46af4e4856f6d9d5068fb246a948b131275e97308555688f3b65f25d9287344abf5c1d51432c64cc8340120472e1c7cee713c4872b2f3ff06408 SHA512 7610225cdd9cb2daa965170ebe48a7bcc311119ef08685117847158b308bcb10c206876a8bd86db426584b0091ec82bd8fb0f8b05997cc8b166aa00ce31588c3 -EBUILD redis-6.0.9-r100.ebuild 4569 BLAKE2B 48495bfafcb136622355a82d124eba794756934767aca2785a72cae537f69a711764d6975690e90733f8ad1c128b3c70ae453cd0214bc391b064b0a75a2252e3 SHA512 1f814c38ba21dec646d87560d25791fabb2610d6aaf9f56466915bb322603f5db7d56a30b8f342459ebb2ac2ce3f61b9890ae6b5786f2c4c70f87d7a3c9dc4c1 -EBUILD redis-6.2.1.ebuild 5020 BLAKE2B 7f55f4943b3234dcd3bdf4faa56926ab3173d54f97b5cf98a210e7f5eec95721d692de180d1c5c268eb308812a9fdf5c56cc1a22cdbbde80fd848099f6ead026 SHA512 7ec3b5d1dd6bff857a8f462c40d2df73a8662242a0a3997f8aa21d5c6ca541af0d152c4642e23b12594094c78013e3f6cb5927f1a6a6cbc039ece5aae02c04b5 +EBUILD redis-5.0.12.ebuild 4732 BLAKE2B e1aa4db765f757fdcffbeb806975dc346879d09bbbe23eddcfa8deffe2a6f86b173d4d5fcd01ee2845f03318986e68fdba7793ff7561a98ab801cd7471898e03 SHA512 db0e89efafd5045e2c2efcdb0dd2902af4e4539e5f6cfe7206a681e3b9f9387e6a192cf5041ff6dde47b922e20b997957ef1aee46458a68c0d92acf916da146a +EBUILD redis-5.0.9-r1.ebuild 4727 BLAKE2B 296ae8313437d189b96ee93f5b63cefe11abb576d4925e150de6db510183a948bae6a4ae76db1a393e8c1f3c0c17dfad8c52e07b8d1cf36cd88d11df4d2ac17d SHA512 af8a96dcccbc12d8dfb0c77d1c857b245c47d77b3084f11021e9cf02ce1a8258c3c09a855c209356c49ba9aa8a5ad37e732751d908e01e2314d7c2d5ceddf320 +EBUILD redis-6.0.12.ebuild 5020 BLAKE2B 097ff357543c0060d3684562bb58a018ac16e4a6800bcc5f1bfebdba842a45a5b9400bcaca36ef781d201d85814bd28025c4c53662dd67a14f1e6c4f7eff2aca SHA512 41fc1ee5d297d54bf62042851de411fbe5a6ec2846dd58d826eaceab191cddf4d35018542c0259d6330a5ab8d7b770aa2481997e634d28d7bd10771eead57eda +EBUILD redis-6.0.9-r100.ebuild 4569 BLAKE2B 255dc421757021cabf391366934eaac4eb3220df64e60742ccc7746e5923fe60bc90e7abb7180002c831017525ac3bf0dcc39d0bb8a4014a38894e68fb3bad18 SHA512 b3ce8c2c71d11f73a66b012adfef1aed5505e441814cb14cdc820a24d50cfc6f7dd57695d3bb5fa2f18037ca92113932daa22f97979c967a6f5fdf91bf630785 +EBUILD redis-6.2.1.ebuild 5020 BLAKE2B 9d64fc2efeb3b7a22ecbaf9440639b327f2555a21152f0cedb81cccbed351f1037e6158dbff9afa10e33c7ea59b575fce0f9c59e06576b1284e749f07a1472bd SHA512 c61f65441d30d13a939275bdebc0d27b7906eb6aa9de5dc675ba53662a5404d06f5bee04c4412a85daff711b5d31a739142e7e365e2fd19bd32aaaf66ebbbed5 MISC metadata.xml 356 BLAKE2B 19e27b12be84927b990fc2f481d8dd1f88f05b5e029fdd91c7ce9517e7fd378d6e1df1eb55052a04fefe781da09b371da1c28fd269c72f4222aa896897222bf7 SHA512 ab06f694c5b20072f40e85b3a8e05d2c333f3b29fc145733fde1e3f42ea78ac7c51550afc29e671ef9b4a163597ac9f44bc182344c18db52036595e5d65f7e22 diff --git a/dev-db/redis/redis-5.0.12.ebuild b/dev-db/redis/redis-5.0.12.ebuild index 0a96e9c91cf5..d9cb0a2b1f39 100644 --- a/dev-db/redis/redis-5.0.12.ebuild +++ b/dev-db/redis/redis-5.0.12.ebuild @@ -3,14 +3,14 @@ EAPI=7 -inherit autotools flag-o-matic systemd toolchain-funcs +inherit autotools flag-o-matic systemd toolchain-funcs tmpfiles DESCRIPTION="A persistent caching system, key-value and data structures database" HOMEPAGE="https://redis.io" SRC_URI="http://download.redis.io/releases/${P}.tar.gz" LICENSE="BSD" -KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux ~x86-solaris" +KEYWORDS="amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux ~x86-solaris" IUSE="+jemalloc tcmalloc luajit test" RESTRICT="!test? ( test )" SLOT="0" @@ -138,7 +138,7 @@ src_install() { newinitd "${FILESDIR}/redis.initd-5" redis systemd_newunit "${FILESDIR}/redis.service-3" redis.service - systemd_newtmpfilesd "${FILESDIR}/redis.tmpfiles-2" redis.conf + newtmpfiles "${FILESDIR}/redis.tmpfiles-2" redis.conf newconfd "${FILESDIR}/redis-sentinel.confd" redis-sentinel newinitd "${FILESDIR}/redis-sentinel.initd" redis-sentinel diff --git a/dev-db/redis/redis-5.0.9-r1.ebuild b/dev-db/redis/redis-5.0.9-r1.ebuild index 25d2628a3892..70f779e9dbd9 100644 --- a/dev-db/redis/redis-5.0.9-r1.ebuild +++ b/dev-db/redis/redis-5.0.9-r1.ebuild @@ -3,7 +3,7 @@ EAPI=7 -inherit autotools flag-o-matic systemd toolchain-funcs +inherit autotools flag-o-matic systemd toolchain-funcs tmpfiles DESCRIPTION="A persistent caching system, key-value and data structures database" HOMEPAGE="https://redis.io" @@ -138,7 +138,7 @@ src_install() { newinitd "${FILESDIR}/redis.initd-5" redis systemd_newunit "${FILESDIR}/redis.service-3" redis.service - systemd_newtmpfilesd "${FILESDIR}/redis.tmpfiles-2" redis.conf + newtmpfiles "${FILESDIR}/redis.tmpfiles-2" redis.conf newconfd "${FILESDIR}/redis-sentinel.confd" redis-sentinel newinitd "${FILESDIR}/redis-sentinel.initd" redis-sentinel diff --git a/dev-db/redis/redis-6.0.12.ebuild b/dev-db/redis/redis-6.0.12.ebuild index b98bd17a8ddf..22268b85376b 100644 --- a/dev-db/redis/redis-6.0.12.ebuild +++ b/dev-db/redis/redis-6.0.12.ebuild @@ -11,14 +11,14 @@ EAPI=7 # because lua_open became lua_newstate in 5.2 LUA_COMPAT=( lua5-1 luajit ) -inherit autotools flag-o-matic lua-single systemd toolchain-funcs +inherit autotools flag-o-matic lua-single systemd toolchain-funcs tmpfiles DESCRIPTION="A persistent caching system, key-value and data structures database" HOMEPAGE="https://redis.io" SRC_URI="https://download.redis.io/releases/${P}.tar.gz" LICENSE="BSD" -KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux ~x86-solaris" +KEYWORDS="amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux ~x86-solaris" IUSE="+jemalloc ssl tcmalloc test" RESTRICT="!test? ( test )" SLOT="0" @@ -154,7 +154,7 @@ src_install() { newinitd "${FILESDIR}/redis.initd-6" redis systemd_newunit "${FILESDIR}/redis.service-4" redis.service - systemd_newtmpfilesd "${FILESDIR}/redis.tmpfiles-2" redis.conf + newtmpfiles "${FILESDIR}/redis.tmpfiles-2" redis.conf newconfd "${FILESDIR}/redis-sentinel.confd-r1" redis-sentinel newinitd "${FILESDIR}/redis-sentinel.initd-r1" redis-sentinel diff --git a/dev-db/redis/redis-6.0.9-r100.ebuild b/dev-db/redis/redis-6.0.9-r100.ebuild index 28abcc4e6591..8c8e563b825b 100644 --- a/dev-db/redis/redis-6.0.9-r100.ebuild +++ b/dev-db/redis/redis-6.0.9-r100.ebuild @@ -11,7 +11,7 @@ EAPI=7 # because lua_open became lua_newstate in 5.2 LUA_COMPAT=( lua5-1 luajit ) -inherit autotools flag-o-matic lua-single systemd toolchain-funcs +inherit autotools flag-o-matic lua-single systemd toolchain-funcs tmpfiles DESCRIPTION="A persistent caching system, key-value and data structures database" HOMEPAGE="https://redis.io" @@ -140,7 +140,7 @@ src_install() { newinitd "${FILESDIR}/redis.initd-5" redis systemd_newunit "${FILESDIR}/redis.service-3" redis.service - systemd_newtmpfilesd "${FILESDIR}/redis.tmpfiles-2" redis.conf + newtmpfiles "${FILESDIR}/redis.tmpfiles-2" redis.conf newconfd "${FILESDIR}/redis-sentinel.confd" redis-sentinel newinitd "${FILESDIR}/redis-sentinel.initd" redis-sentinel diff --git a/dev-db/redis/redis-6.2.1.ebuild b/dev-db/redis/redis-6.2.1.ebuild index 666ef8d84094..5eef07c1367b 100644 --- a/dev-db/redis/redis-6.2.1.ebuild +++ b/dev-db/redis/redis-6.2.1.ebuild @@ -11,7 +11,7 @@ EAPI=7 # because lua_open became lua_newstate in 5.2 LUA_COMPAT=( lua5-1 luajit ) -inherit autotools flag-o-matic lua-single systemd toolchain-funcs +inherit autotools flag-o-matic lua-single systemd toolchain-funcs tmpfiles DESCRIPTION="A persistent caching system, key-value and data structures database" HOMEPAGE="https://redis.io" @@ -154,7 +154,7 @@ src_install() { newinitd "${FILESDIR}/redis.initd-6" redis systemd_newunit "${FILESDIR}/redis.service-4" redis.service - systemd_newtmpfilesd "${FILESDIR}/redis.tmpfiles-2" redis.conf + newtmpfiles "${FILESDIR}/redis.tmpfiles-2" redis.conf newconfd "${FILESDIR}/redis-sentinel.confd-r1" redis-sentinel newinitd "${FILESDIR}/redis-sentinel.initd-r1" redis-sentinel diff --git a/dev-db/sqlcipher/Manifest b/dev-db/sqlcipher/Manifest index 03aee0b819b0..8dc32be6a753 100644 --- a/dev-db/sqlcipher/Manifest +++ b/dev-db/sqlcipher/Manifest @@ -1,6 +1,6 @@ AUX sqlcipher-3.4.2-libressl-2.8.patch 490 BLAKE2B 5ac29fbf1370f1ed1a28335d68f86dada605d6362521fbe4eb4decbd215c5eda04d7c62017979de829f46ac37a9f0718d8c748069173f4d0ff591664f51d83da SHA512 bea99e890d78f1b1417f3a81d612388ad3305d30cc576ef5b29d0726459570a231786551fd8ba4cc03ef8fd257ee985ce5933b7f2bcfc15867f6afc2f662f229 DIST sqlcipher-3.4.2.tar.gz 14743960 BLAKE2B 88ee265b02bb9a42734c2ef93070c8fd8e13d546d7cc85e7fbfd6e6046ccbf2626d75e14b19cbba379c99784c7311d0100de06235b99b4908c60c99890d8d7a2 SHA512 c620bf2b175e404afd60ebe76b5476f5a447ff5fcdfa31bebc3f4bd7f1ebfcd507ee423cd582c9b3d6431d8b57320171492da2586e1a739adb4f440e7443dc03 DIST sqlcipher-4.0.1.tar.gz 17006324 BLAKE2B 44e8eb4e1230c3625b4fe1b4af608cd8edc25f3c6adf7e11450c8f9ddb7970fea92ff0823f3a1e631d1b0acfbab6cf078c80e4645c535d66de57f1d73b55ff47 SHA512 0fb48326860a10e9849b2f56fae0c310deae124c7203b54d51f92d346782be795d505c29eafbdfb7206f5e7be54c0f7228fe50c45bd9d2b23cca976b263264fc -EBUILD sqlcipher-3.4.2.ebuild 1502 BLAKE2B 9ca7dcafad6bac82a01b43a08b20e2a2898d04abe6d06f55552cf21cd7b963a53443e5e1f19be6aa08b39d6a84cc587e6364652e943878193c362893ea8dfe6d SHA512 3a73d0638bf15f7aab9c31b868ae2563126957f5dc8d5c7b12429c18f472a8338abdc37ed86529bd3df29e72d5418d3fe26eeb873711178ee0e3c1406919a0fc -EBUILD sqlcipher-4.0.1.ebuild 1670 BLAKE2B 05bafb28456a408367973a8115b5ae9e273be86e3391225ff1170c34297c84d3ed012bbbbef5287091d329390fd6cc9e5d787051139ce6fdc6ccd6348f59c43f SHA512 b80daff29d79ed5d74cdecd1f7ba95f5050d42633d1f9058865f4cc046fb1b73979378b3122a45910666b4de28608e23cabc86c62bea6cfe68c5d212db40dcbf +EBUILD sqlcipher-3.4.2.ebuild 1507 BLAKE2B 32fd411212dae9b1741e29cd743fa1e7b162b904dcb7118a68ab0b931d00e4c77a55c0f243cfc9517aef474b41f6017148efac0690029541af57e067122ff13b SHA512 ba6e99edf7e9e500c41224edee7858d9ded5adb59ecc88caae9e5f0c32c9dbeb343a73501715ab9c9f9d3a22a849dafb2e8c880b7fb129aec816c25ae0b6bd62 +EBUILD sqlcipher-4.0.1.ebuild 1661 BLAKE2B 569b13cebf390c3257f4b136539e9304cd2375b051be0f932ebb9b2b69fba3c316f5fba71c40b0d0ddcebcb6693c79feb6cb5c99cd6576b5794711acacca3516 SHA512 3123ed4dd6ab2c243bde0189e2343c04bc0381f4e3efe925ce89f994929c325b85d2635cd1e6b653e87c9c8a6960140cec353dec8c1f7c9e3e1cef08e049ae57 MISC metadata.xml 341 BLAKE2B f5035fe38770437027936a72b9b7d66854fd6a19cf19f7140e409e8004297ed3da11aab122ba81b2f2b5d82302e8252462a7f185de0a998f79d348dd45e16c7e SHA512 b387658993279fb3c74c7647b36035f5c0e0e3e81a3cf4eab28f3dac19319f0b6958cfa16fab30295e5508c0810d601b0e2899710f57e992886f35c781e37dfa diff --git a/dev-db/sqlcipher/sqlcipher-3.4.2.ebuild b/dev-db/sqlcipher/sqlcipher-3.4.2.ebuild index 8f299103e6af..1f5bdc481350 100644 --- a/dev-db/sqlcipher/sqlcipher-3.4.2.ebuild +++ b/dev-db/sqlcipher/sqlcipher-3.4.2.ebuild @@ -1,9 +1,9 @@ -# Copyright 1999-2020 Gentoo Authors +# Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=6 +EAPI=7 -inherit autotools eutils flag-o-matic ltprune multilib-minimal +inherit autotools flag-o-matic multilib-minimal DESCRIPTION="Full Database Encryption for SQLite" HOMEPAGE="https://www.zetetic.net/sqlcipher/" @@ -41,12 +41,12 @@ src_prepare() { eapply "${FILESDIR}/${P}-libressl-2.8.patch" append-cflags -DSQLITE_HAS_CODEC - eapply_user + default eautoreconf } multilib_src_configure() { - ECONF_SOURCE=${S} \ + ECONF_SOURCE="${S}" \ econf \ --enable-fts3 \ --enable-fts4 \ @@ -60,6 +60,7 @@ multilib_src_configure() { } multilib_src_install_all() { - prune_libtool_files + find "${ED}" -name '*.la' -delete || die + einstalldocs } diff --git a/dev-db/sqlcipher/sqlcipher-4.0.1.ebuild b/dev-db/sqlcipher/sqlcipher-4.0.1.ebuild index 587212f81091..e82a2ba8a159 100644 --- a/dev-db/sqlcipher/sqlcipher-4.0.1.ebuild +++ b/dev-db/sqlcipher/sqlcipher-4.0.1.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2019 Gentoo Authors +# Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=7 @@ -41,12 +41,13 @@ RESTRICT="test" src_prepare() { # Column metadata added due to bug #670346 append-cflags -DSQLITE_HAS_CODEC -DSQLITE_ENABLE_COLUMN_METADATA - default_src_prepare + + default eautoreconf } multilib_src_configure() { - ECONF_SOURCE=${S} \ + ECONF_SOURCE="${S}" \ econf \ --enable-fts3 \ --enable-fts4 \ diff --git a/dev-db/tokyocabinet/Manifest b/dev-db/tokyocabinet/Manifest index 9ad64c171672..f36ac04a42a4 100644 --- a/dev-db/tokyocabinet/Manifest +++ b/dev-db/tokyocabinet/Manifest @@ -1,4 +1,4 @@ -AUX fix_rpath.patch 2111 BLAKE2B 3aa9797555e0eb02a3d63e4e117e8aff5c7c0a09922cf6b0344777cd95b2480623f05fe68cfe63750ba00ff954bd6bb3e1a587c4e8af31086c94b2b3344cc08e SHA512 c0ee076d048d8ec4a77b036d0503776c4e3ca7a97c30cd8ba41cb0d99707ad5021613e1d308f6e73cc3432e0f71f7b38429ca0edcbc4edfe0d96955fc56b3504 +AUX fix_rpath.patch 1792 BLAKE2B 38d89cc47984b4d83e2df79b444cba657b814a0d9f80d0c3172c49984a7c22eac40d7c880872be632244fcc2efbf24c52b5613ecbdef624db47df97d6c27c1c1 SHA512 aca59f03c289ed2ffc1df1a387d7f141df56968866187324d14239258c6b270a8a56739bfea7c8398af90f52c5ec7a87eedba4194eb3b097cd0df05cc8553964 DIST tokyocabinet-1.4.48.tar.gz 1000485 BLAKE2B 4da2659a90dcee1cc99be286fe0e286ee75bd8179b75a944f229a3cc04169b8007220e36400d4934a7b5fde554bbc1783c4813fdf44b4a3530882ea0a8ef258e SHA512 b9995c838e713c13f781ab41062caefeb5c613f696dab08039f992f6860413d60a513114b83468cafdf7fc5b5e51ab880226972465d532f873f2a55f615e1440 -EBUILD tokyocabinet-1.4.48-r1.ebuild 1494 BLAKE2B d7a32b2431724d6d9dd07a377fbd41fb3ad07ba6fe0c368c3e7fb0b20d6a5b5ae69ada03632fdf36b344b570b8e7e92ea4a88932069f205da5eb601f4a0f7ea0 SHA512 af9b93b20f9ce148b192ff151ffc7f70d51bf0e93d6cbd14d2e4265218044a21b8e64a2441a36a9f482124b5804529e0fc8d81a99f6f13a55672ccf75735b1ac +EBUILD tokyocabinet-1.4.48-r1.ebuild 1504 BLAKE2B 7be3bbe407d6283a0a8d2173348462e4d0d661f9461eb8c77f0b2d9cc1f2c4e8d4773cc4aa30201a81d27ffbeca8a097364b9228f387288d69b4f0cc53da6e87 SHA512 fc3d0c986990206a48d151d4be90f7914a09c43c48fb7cf7652edc66ea1c6be10df576dd2f735779f6d69b04b134218e812d8f9ad35f058d92892f78e015b687 MISC metadata.xml 247 BLAKE2B 5a20af3c9732ef7dba68131a08988652f5c93a6d186a82c4deb1bb9c06dc3ae73152a0d241cc346637f7b11caf4676da43301ba596c67b66669535e71db0b03e SHA512 29cf52c16b0cce69899d9c2da8acd9144b7d760442aa323b854dceadb42459e009545193b1df7911ac2241b59f4819b4a6bb1d206d6f57953f770031433bb6b7 diff --git a/dev-db/tokyocabinet/files/fix_rpath.patch b/dev-db/tokyocabinet/files/fix_rpath.patch index e1cba0a0370f..052e22f0c10f 100644 --- a/dev-db/tokyocabinet/files/fix_rpath.patch +++ b/dev-db/tokyocabinet/files/fix_rpath.patch @@ -1,6 +1,5 @@ -diff -ur Makefile.in Makefile.in ---- Makefile.in 2009-08-04 09:37:52.000000000 +0200 -+++ Makefile.in 2009-09-30 23:45:28.000000000 +0200 +--- a/Makefile.in ++++ b/Makefile.in @@ -54,8 +54,8 @@ LDFLAGS = @MYLDFLAGS@ CMDLDFLAGS = @MYCMDLDFLAGS@ @@ -12,9 +11,8 @@ diff -ur Makefile.in Makefile.in POSTCMD = @MYPOSTCMD@ -diff -ur configure.in configure.in ---- configure.in 2009-08-31 11:36:58.000000000 +0200 -+++ configure.in 2009-09-30 23:45:28.000000000 +0200 +--- a/configure.in ++++ b/configure.in @@ -31,25 +31,15 @@ MYPCFILES="tokyocabinet.pc" @@ -44,9 +42,8 @@ diff -ur configure.in configure.in #================================================================ # Options -diff -ur tokyocabinet.pc.in tokyocabinet.pc.in ---- tokyocabinet.pc.in 2008-02-18 08:25:18.000000000 +0100 -+++ tokyocabinet.pc.in 2009-09-30 23:45:28.000000000 +0200 +--- a/tokyocabinet.pc.in ++++ b/tokyocabinet.pc.in @@ -10,5 +10,5 @@ Name: Tokyo Cabinet Description: a modern implementation of DBM diff --git a/dev-db/tokyocabinet/tokyocabinet-1.4.48-r1.ebuild b/dev-db/tokyocabinet/tokyocabinet-1.4.48-r1.ebuild index 52ddccc5c6ad..0fe6fc6285d1 100644 --- a/dev-db/tokyocabinet/tokyocabinet-1.4.48-r1.ebuild +++ b/dev-db/tokyocabinet/tokyocabinet-1.4.48-r1.ebuild @@ -1,9 +1,9 @@ # Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI="5" +EAPI=7 -inherit eutils autotools +inherit autotools DESCRIPTION="A library of routines for managing a database" HOMEPAGE="https://fallabs.com/tokyocabinet/" @@ -18,43 +18,55 @@ DEPEND="bzip2? ( app-arch/bzip2 ) zlib? ( sys-libs/zlib )" RDEPEND="${DEPEND}" +PATCHES=( + "${FILESDIR}/fix_rpath.patch" +) + src_prepare() { - epatch "${FILESDIR}/fix_rpath.patch" + default + sed -i \ -e "/ldconfig/d" \ -e "/DATADIR/d" Makefile.in || die + # cflags fix - remove -O2 at end of line and -fomit-frame-pointer sed -i -e 's/-O3"$/"/' configure.in || die sed -i -e 's/-fomit-frame-pointer//' configure.in || die + # flag only works on x86 derivatives, remove everywhere else - if ! use x86 && ! use amd64; then sed -i -e 's/ -minline-all-stringops//' configure.in; fi + if ! use x86 && ! use amd64; then + sed -i -e 's/ -minline-all-stringops//' configure.in || die + fi + + mv configure.{in,ac} || die + eautoreconf } src_configure() { # we use the "fastest" target without the -O3 econf \ - $(use_enable debug) \ - $(use_enable bzip2 bzip) \ - $(use_enable zlib) \ - $(use_enable threads pthread) \ - --enable-off64 --enable-fastest + $(use_enable debug) \ + $(use_enable bzip2 bzip) \ + $(use_enable zlib) \ + $(use_enable threads pthread) \ + --enable-off64 \ + --enable-fastest +} + +src_test() { + emake -j1 check } src_install() { emake DESTDIR="${D}" install - if use examples; then - insinto /usr/share/${PF}/example - doins example/* - fi - if use doc; then - insinto /usr/share/doc/${PF} - doins -r doc/* + dodoc -r doc/* fi -} -src_test() { - emake -j1 check + if use examples; then + docinto example + dodoc example/* + fi } |