diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2020-05-17 14:32:10 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2020-05-17 14:32:10 +0100 |
commit | 51c50bd4c895ebf56d81fecae8e45ec3b5fc3efa (patch) | |
tree | 753b6b08624c34d1ed8414bbe22c45409f7741b9 /dev-db | |
parent | be9d77d3ac6af8f4ead98d89706f356b65578c93 (diff) | |
parent | deba8115d2c2af26df42966b91ef04ff4dd79cde (diff) |
Merge branch 'edge' into next
Diffstat (limited to 'dev-db')
61 files changed, 3366 insertions, 12187 deletions
diff --git a/dev-db/Manifest.gz b/dev-db/Manifest.gz Binary files differindex ce66e9a72619..d2b53e90bfae 100644 --- a/dev-db/Manifest.gz +++ b/dev-db/Manifest.gz diff --git a/dev-db/cpp-driver/Manifest b/dev-db/cpp-driver/Manifest index b5b23c5f070a..41d48b3dcaad 100644 --- a/dev-db/cpp-driver/Manifest +++ b/dev-db/cpp-driver/Manifest @@ -2,4 +2,4 @@ DIST cpp-driver-2.11.0.tar.gz 9392387 BLAKE2B 37d6063b33cd9821faa15d0eb8cb7e87d3 DIST cpp-driver-2.9.0.tar.gz 9178108 BLAKE2B 22c51d050dc65303dd6b584f0a89e510905bf084ff5e45a543666675a4e0b904c11895c9a7dd3d0df2fb12c1e2e58e8530c4113706c8b2548adb0b6f9431419c SHA512 45c6d58b1d287d142c9d7d6b1e28114683648a3634f44b185208fa44da64d4c8a9d485b3956a0cf7429e96f74faa588de832de30265dfa17782ca90e8163a0c1 EBUILD cpp-driver-2.11.0.ebuild 613 BLAKE2B ef569879f623a411b2e92060b2b6b3854e6a1ab3e58cc89b00f980bc3d15225d0a21582d731bdf53498eb7adc604a0d9db95251f3d54ee2f08fa27088ba2ce2c SHA512 63d19c7b45eebb4099d206cb5ada28fa9adcc52297ad7b07016cc929022a72edd4e8ad50a88dd02b3d8fcca84901d716386e64f2f6aabbbaa5dd714d55f8a761 EBUILD cpp-driver-2.9.0.ebuild 625 BLAKE2B ab741c2ba9d2039bbc1743d6315c8374e148b0e3fc37ef62b50514eb628ec5d53915363347b85e76a5cd0e50a491f770692c7445ef743a65aaced9087ff33096 SHA512 46374aa29a2a0d2bd213cec83ca1a4ebd24704d5ecebaff334d1c81d501937aab164640f8ce5dbb17c26c3d367f6eedaf50e0a5dbec9bac98bac28e177da85c5 -MISC metadata.xml 562 BLAKE2B f62a42056c94e60ae6bd2d6cb990f393d3270bde99714aecb00baea47d3bee506d297506f213090cc919b64708e199df50c54647a46d2fbfbaf00d48342d0d9c SHA512 5a38e54e8f0f5ee7c61b97b76cc7ed7fd6744a125a8733d72fdc7d3751db68b7639a0a1d8a970b8ac7908d1d095226aca0a409e9818c81d02d2e1eed4013e5a7 +MISC metadata.xml 676 BLAKE2B 48e5c2f895466b330017e6c13f15eb49f41f3e317250dbce3537210895f9234568b1470af0fe1bc7f88ccf40a01ce340543ae6176e46f9a89f26f3751ece50a5 SHA512 dae7394f2998715c2928fa0d4200ebe222f66328adbdcf51e5a1d1d25f5d1f7e48e5bd356236470dbbe36ea18477617b5da02cfa70365bb74c4a2d1428e12ad2 diff --git a/dev-db/cpp-driver/metadata.xml b/dev-db/cpp-driver/metadata.xml index 6352cbeb9dfc..35194b53a268 100644 --- a/dev-db/cpp-driver/metadata.xml +++ b/dev-db/cpp-driver/metadata.xml @@ -2,7 +2,9 @@ <!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> <pkgmetadata> <longdescription lang="en"> - DataStax Cassandra C/C++ driver for Apache Cassandra or Scilla + DataStax Cassandra C/C++ driver for Apache Cassandra or Scilla. + This driver works exclusively with the Cassandra Query Language v3 + (CQL3) and Cassandra's native protocol. </longdescription> <maintainer type="person"> <email>geaaru@gmail.com</email> diff --git a/dev-db/mariadb/Manifest b/dev-db/mariadb/Manifest index 784dcdec05cf..b0ae16e7c2b2 100644 --- a/dev-db/mariadb/Manifest +++ b/dev-db/mariadb/Manifest @@ -21,14 +21,14 @@ DIST mysql-extras-20190731-2258Z.tar.bz2 332111 BLAKE2B cc144c9af852bfdd4149b96b DIST mysql-extras-20200203-1749Z.tar.bz2 344999 BLAKE2B 46441f3c210c87b8ce1df89e9480d0bd5be216b0a1380c3ca330294e787bf2fb2b7078438f032dd0381363e756312d7634350a0b02c00b3145d4787a9ad65cad SHA512 210d240efef4d7bb64d356cae240039d9bd65e2bd4af47e01131ab5bf48779f4c0519e50d212d50db998e6b9bf9d73f1a03b0bbf4f7d6dc6f978660c8ac8a21f EBUILD mariadb-10.1.38-r1.ebuild 29427 BLAKE2B 4817945be76f85f162f6a26381d1e327bd0907304e9376faf3828f9c8e7ac7f0e8bec344b64af6da5bf78dafd1d8d40a44e2554c1862e9adce0666f2e990da61 SHA512 2b611ad16609527f1c5f1857ffc893a48b70a1d52018d0907723be892268d7c64dfcb727e44e64af9ae9f992585990dd13a5af64acb07f3a5ba2abb35562afad EBUILD mariadb-10.1.43.ebuild 29830 BLAKE2B 0b105fd2ea914b0e7fe5d47c58784a1c68f5dcb57c90e612bd207bd6ee7cb6b4e7f20e4e3d4e257326742963cd132336939d5bbbff35c669f668dd3f71146aab SHA512 4e6156acf7f78aa79293b6b11c535a862d21ccbe0592c100cba3a5bf4f3db770e2a1e8ab25e914e22a8cb2bbf247dee79fcf686e6357c72a1dfe65e5398713b9 -EBUILD mariadb-10.1.44-r1.ebuild 32169 BLAKE2B 8e4cdccf2e1efa90de01aa2a35c65c7e39e3e0389900aa68f9e7fa63fe885a3b333bd16955ba2d4d9c62c78f60a256ae2bb4d6a3394a5ff11258e364af0eb33f SHA512 e33aa7e75a7ef2e3fba74ee9daedf0644bdc203b1761ed2062281fbb9afc6d507f1bd334b2e8b9547152fc9df7a3c51568f9b050b58b3544251753d5c4edf95b +EBUILD mariadb-10.1.44-r1.ebuild 32167 BLAKE2B ea6304c6e0ef890a5443d4e46bd172876705b93e4c35bbf64935c8ae78d38e7baf44c433317dadac14ffca699df19df744e68ec782945bbf603c092b0cda77fb SHA512 54c45813c42e55b109e27b35d78a2d404ad038db6eefbc90d6c4382c9d30a15164ab1febed3efef03b7cd68012e164ec8bafa6e010eb5838881609d44ba5bc75 EBUILD mariadb-10.2.22-r1.ebuild 32490 BLAKE2B 1909cd64d969d82cd7826920aa04a9c92c7022d8d0b395f1ca8bf237cd2ad86ec919c9e4412aac3788b7cd5956df5f8d06bc18df345c12f3382405ecc9e920b7 SHA512 d219c571b941e3f3214bef82893507ec8ed233a6623f0cb7dba9e327fef628afca9af610a49378697ba10f14b6137eab50d5f0290fde46871970cf56d31b6e6c EBUILD mariadb-10.2.29.ebuild 33063 BLAKE2B 0cbf1bf88713221ef663ebb4e3e7e60e170890177b272a3ed851b192e3f45700b40daaf14de32f2bf752f5820ae75e6fef84ebc21ce56176fcc2f6a9214a47ea SHA512 183ad995db6fc08f3da3913f64510bfa4252c31e8478a19738bb6b421c66555db452a8d77243a5ba8e97e0dd6fdda2b47f29f2fd01abac26b114aaa3b8856f4c -EBUILD mariadb-10.2.31-r1.ebuild 34998 BLAKE2B df8a93d284b3aa55dcdb288fdf85e2852d76c04d844f46d214b7cee955cafd85b0a690adbe35d9a5d61446801165450f7066928025a0f4bb053a421012a4d1ca SHA512 3ed50d0bc0ac8e7371b5b39f269083084bf92760d98562011a67271f09d6a33a0c91f70b5437ed0c27c3753c2664ebec4d334e7e58f822c520d5da9d38c62843 +EBUILD mariadb-10.2.31-r1.ebuild 34996 BLAKE2B 5afbfd085d07291e4e4d92e3d5023fbfc214cebd8075299d122abb929271fa88a3ff635d7b534ee023bd1c2c994251fbdd4fb91cdd195a55333361b5c248d347 SHA512 49224247f852201a0d6df85ecd90f37e5e3b62d3e8b355be003ce998e6aed8a672a3dd2cc302462da5aaf99979feae90d9d9ebc1f6298826b41193bcff354ad0 EBUILD mariadb-10.3.20.ebuild 32690 BLAKE2B 35f9eb05a31fa3949464a77b044dc00561c016572a88fc028cb9ff58a1c149db72cd09d9cb0e1cb9e64b055881940adec0bcf990b3cbaa1bf9fb26a3d066ceda SHA512 861f3608796ab075c052e623cb8949adcea2bf49c97e81b70f9236ca8f67d6ca32602c7946f556763b7f421d275845c896f74db8e5ac966a387ccbcc69c29afd -EBUILD mariadb-10.3.22-r1.ebuild 34773 BLAKE2B 48dba826e948efe9c8076adf5eebb070496ae3d515c509b377fc6636e911a139fca62440e7d3a609def4ba518ed90433c1f2f4d15420dbb8b4f605c521b7f3d3 SHA512 66a4f81c7e4198412405309da10d4f33c81cb29544af2ea4159e4459fc8446d9463d115f20141ded9419e244cd65a3fde16e70b91847be9fa5615f76133b5279 +EBUILD mariadb-10.3.22-r1.ebuild 34771 BLAKE2B c8dca58770e27fce52ed0b492968334cbdf6bc7e6f691dd610a39cfab5261eccd467afa8a832388140d584349db7ce5668c5c0b13a4080f0b8bbe26a077a74b8 SHA512 e860dd7b60b5f6ce5dca20915364fd94f17c0fb80cf1afdd4b791f3c2454cb7240a7bebf91a8fcb4c52a6f5c71d1bec95436b0f662656d2b97387fc1de7ac6ee EBUILD mariadb-10.4.10.ebuild 33342 BLAKE2B 8aa25f71b60b596994749905a9af6d0171a259bafba7ab76ff68e855d97de0363a687d4c603fe2ffb1d14196ff51ab5e8706c05d2c2a0dfdcb8f801001b1e0bf SHA512 ac6dcded63450f4a83e1bc41fd5a881bfe7f712cc4e31270d2d1b3015dd48e4a79876acc359e6bd6fd6f1c560a281fad96f4369965d9734b88165a27a5a1a70b -EBUILD mariadb-10.4.12.ebuild 35331 BLAKE2B 3343776f4d4b0b3cc449ed5db4df84866b260982a5253b7b8f3bed7c88ee8e89fceb0510228b7ac1845b50c76549752102f8b5edf441f922f68454f72394a441 SHA512 32381752a3e297a79afe9e4bb68b0ca37a5167ee814277d45139fd30f2352af61d9cc0f78b079bf743c3715b8d767f4f372c71219d72f92f60e446ea501f07b0 +EBUILD mariadb-10.4.12.ebuild 35329 BLAKE2B 88641f83a0e7e7617834b5bf27249e9ea863eb933be1b04389e4da0af004540f6c1472eb04dc98e4b51a89d81fbb651a88839db514adbf137169a315075fbfcd SHA512 647a0e6651ee8ca4f61bde0a88e9e2de4c3f06f10a7bcc0ce8bf940de830051025c89fa3428f154b14e58c050bf1dccf525804cccb73cdbabe265bf62dd9b595 EBUILD mariadb-5.5.66.ebuild 27209 BLAKE2B 837dad98c4e35a0e1ab4be51a0452531a33479098dd6706fb2991c617ae0bdb8cbd117f6c598c2eee0a0a63f5ae0b26f7e334d223548782cb5c4a47d31f5ff2d SHA512 be93e099475ca316318db96ba5437a491993440b42c638a52a215b3cc7d66ae14595d024a65efb032e26cf85130247f242d23e659509aa2a175fb6228b30bd3b EBUILD mariadb-5.5.67.ebuild 27209 BLAKE2B 80a419eded23bef53857b7554dc528e3196413ee9216c7341904af5d1590758a3017e006a4a67192a0fc37e6af70485f422ada200c99aa82714c08aaa9da8c01 SHA512 cdc301f9ae2cafd19919d10149a09d98f4bd9e106c521e398754e8cc1a770c3951432acec2e5ea19aed958c0233b4ec623bd28a573e085849b4dda860f35b26f MISC metadata.xml 2611 BLAKE2B d1b6b11359e92a3d9cb2c58ed35a15e3cf42ab616ed907fa36a5f777168a805ffd03d01bd13fcd30352ef6c5e8b1d80f4e882ffaf8f6445ed3fce2bcc2a92923 SHA512 80395b35839acebbb18ac8d01e8c806bd89f18d32f85fcba41f41ecfc4f1f869dc8c51c90bb21ebd3c9ac30d51d47869a4dcf3b8ce73967e337e6e396b267c97 diff --git a/dev-db/mariadb/mariadb-10.1.44-r1.ebuild b/dev-db/mariadb/mariadb-10.1.44-r1.ebuild index 6ab7fdcf492d..70eec0ce5f04 100644 --- a/dev-db/mariadb/mariadb-10.1.44-r1.ebuild +++ b/dev-db/mariadb/mariadb-10.1.44-r1.ebuild @@ -41,7 +41,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 ~x86-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 ~x86-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 diff --git a/dev-db/mariadb/mariadb-10.2.31-r1.ebuild b/dev-db/mariadb/mariadb-10.2.31-r1.ebuild index cf1dcef31889..994101f4575f 100644 --- a/dev-db/mariadb/mariadb-10.2.31-r1.ebuild +++ b/dev-db/mariadb/mariadb-10.2.31-r1.ebuild @@ -42,7 +42,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 ~x86-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 ~x86-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 diff --git a/dev-db/mariadb/mariadb-10.3.22-r1.ebuild b/dev-db/mariadb/mariadb-10.3.22-r1.ebuild index ca766931b1aa..3d65b2ca81e0 100644 --- a/dev-db/mariadb/mariadb-10.3.22-r1.ebuild +++ b/dev-db/mariadb/mariadb-10.3.22-r1.ebuild @@ -42,7 +42,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 ~x86-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 ~x86-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 diff --git a/dev-db/mariadb/mariadb-10.4.12.ebuild b/dev-db/mariadb/mariadb-10.4.12.ebuild index 59c656ba80c7..f413db7d47bc 100644 --- a/dev-db/mariadb/mariadb-10.4.12.ebuild +++ b/dev-db/mariadb/mariadb-10.4.12.ebuild @@ -40,7 +40,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 ~x86-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 ~x86-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 diff --git a/dev-db/mongodb/Manifest b/dev-db/mongodb/Manifest index 7490af8b9393..cb782d9dfffd 100644 --- a/dev-db/mongodb/Manifest +++ b/dev-db/mongodb/Manifest @@ -33,6 +33,6 @@ EBUILD mongodb-4.0.16-r1.ebuild 4593 BLAKE2B 25a75906f5b037572499b8f5a51bc5df9be EBUILD mongodb-4.0.16.ebuild 4240 BLAKE2B 70ef636c1c4d69adf066f0cdc5fb80417649bcde429c21ec67dc11c1ff72a1114778443fbf5758ea9f495cf654258568635b6f30de2ff81f478a8753072186b9 SHA512 604bb7090f98b5e8bb00d5daa7a6a9ec56a0e8a6fdbb46159eb721e5fd8bd47fe4ce7cf7fb9586b44b3c3225fd24c5df09fa9803fe03717afdb95e005c846749 EBUILD mongodb-4.2.1.ebuild 4254 BLAKE2B 35a011623e2261aed880acfd81c2454917faab2fe5e670501bf8ee1f3d1b5a6c62352d4a3560373a63730c5860507835517f393a78742870c4d65678824a2488 SHA512 a7de46767a57975f898769488388024bc00b2dd145ede78fbdec3cb475d98721d2c1262ce09180e5850b95c4ef09568c929980cef1b0e9829f9c96b27a6a4b2f EBUILD mongodb-4.2.2.ebuild 4254 BLAKE2B 35a011623e2261aed880acfd81c2454917faab2fe5e670501bf8ee1f3d1b5a6c62352d4a3560373a63730c5860507835517f393a78742870c4d65678824a2488 SHA512 a7de46767a57975f898769488388024bc00b2dd145ede78fbdec3cb475d98721d2c1262ce09180e5850b95c4ef09568c929980cef1b0e9829f9c96b27a6a4b2f -EBUILD mongodb-4.2.3-r1.ebuild 4708 BLAKE2B c40333f8e7e1bff7fbea449320fbc18f8ec6985d7569c7db84a4481678e7a740b440e534f80520ee896741f2ecbe8119347913660d7a7b6369da1552131d5de2 SHA512 ca73f93c8b31f5580bf4696e769c551ba15635647cad4896fbb2fa17b42a34c022d9871edd6cb103e96a0243271c5986a40035de0b23583f621566781bf47039 +EBUILD mongodb-4.2.3-r1.ebuild 4715 BLAKE2B 5353fa66ed97f5c6b026d21ee2439cc49e38df3845b6a289517556e82f049896a720637cc88309c3ac36d094f6ae8e12226a9af660aa4306a1142ada3759aeab SHA512 c03d118604e77642eb145b317e117da64c09b99564e341cfb909553a7109b68bf9f4308064ed7a02a0b9ee946ad3ec5b9d22973535041632015b6888b75c3f3c EBUILD mongodb-4.2.3.ebuild 4254 BLAKE2B 35a011623e2261aed880acfd81c2454917faab2fe5e670501bf8ee1f3d1b5a6c62352d4a3560373a63730c5860507835517f393a78742870c4d65678824a2488 SHA512 a7de46767a57975f898769488388024bc00b2dd145ede78fbdec3cb475d98721d2c1262ce09180e5850b95c4ef09568c929980cef1b0e9829f9c96b27a6a4b2f MISC metadata.xml 901 BLAKE2B f7fde58679ba05518634b82bf5fcc371897165364fe5b023a2ec161790c869de82b4a3dd769d5e1bb450f99679869b60bb1e35beb8d41c54d3448dfca580a7ae SHA512 48f133d396aa31b992bac5f947e5a262b2d07a1016c6d49fa3c86dabb85981edfa332abb867413826762d88051ff3981cc77c2ec92e992d7a231c3b542336e36 diff --git a/dev-db/mongodb/mongodb-4.2.3-r1.ebuild b/dev-db/mongodb/mongodb-4.2.3-r1.ebuild index 84df690ae769..71eeff3756bf 100644 --- a/dev-db/mongodb/mongodb-4.2.3-r1.ebuild +++ b/dev-db/mongodb/mongodb-4.2.3-r1.ebuild @@ -20,7 +20,7 @@ SRC_URI="https://fastdl.mongodb.org/src/${MY_P}.tar.gz" LICENSE="Apache-2.0 SSPL-1" SLOT="0" -KEYWORDS="~amd64" +KEYWORDS="~amd64 ~arm64" IUSE="debug kerberos libressl lto ssl test +tools" RESTRICT="!test? ( test )" diff --git a/dev-db/mysql-connector-c++/Manifest b/dev-db/mysql-connector-c++/Manifest index f306ee3d2cf1..70b205e2539b 100644 --- a/dev-db/mysql-connector-c++/Manifest +++ b/dev-db/mysql-connector-c++/Manifest @@ -2,8 +2,11 @@ AUX mysql-connector-c++-1.1.11-fix-mariadb.patch 1939 BLAKE2B 4ca552777bfcb8671e AUX mysql-connector-c++-1.1.6-fix-cmake.patch 762 BLAKE2B 4cecebd2cb075c6e1af7ab74a84132f41beeeb202d4d286038b05cbbb202cef709e7114563bdbee12aab4e6a738a9e23bbb9455fc1ce0f906d952af4e0042f05 SHA512 c4c89b398aa88a9e7b4ed4cf42b055b79670dc70685775afd1ef2d683e5b3754575c831a6083ef0d097431e796513597e1daf7737e3ade710abad917f63ed32f AUX mysql-connector-c++-8.0.19-fix-build.patch 9695 BLAKE2B c3334f74160a9b1148a588c7190db6f3a79fe70530d921428b7d86ec02f01324cf02c4130cd8d0cf42ecc4ccaccbecf90ffe0ac1cf8b265ea5cd9dea1046f30f SHA512 3d726b70a270e56ab38e8cebe5eb0186c4d0293dbd72844914ca9ef20674f20bc0fb4d2f0c449da77e4e6a81cc3ae454447a7983468d386e73f946dccd4a20cc AUX mysql-connector-c++-8.0.19-fix-libressl-support.patch 3358 BLAKE2B 795c9f313d2495c3fee01066c7116fa3272a162b7401359657256d1adfb24d236049bbad6016e763de2a62ec9b6ccc93546eccffc457ae0bafca29b2c7e21b5d SHA512 d7b4b1424a6fd237ad0e7bd5648b156f770e352ec8fb3edfa6dfb767ebbe73e8ebc186b327e8543aa7bc12b7bc6081fae225a6ff0e153e25bb76900142adaa31 +AUX mysql-connector-c++-8.0.20-fix-libressl-support.patch 3299 BLAKE2B a78d87ed7d483ac04b6676214941048d17c40215aa248dfda152c2d149469ce8595fb4b76f26a96f965e001ca58db95b7d4a4f50607076178ee4d57008626657 SHA512 529b1a6a3b0ecc7861601e665c494602d4b362d7259f93738e422c428416720d38185f2dd959e456d367e31442ecf046a266fc2dbef39cd3a29e439eca0ae266 DIST mysql-connector-c++-1.1.12.tar.gz 518615 BLAKE2B 386a4753ca3f03999a49a89507da1b1172b3db89797c38403fee4eea86e7108a5e4f91f24a17de86d585c2a3d9e5742a117fa84d9b14aad649f938a597f3dae9 SHA512 d7e132dbc2efda4a77f8ae00c24006a1ade1d0a50f22d89ece453505e6d206427ee7988df29c0d6ef8b396ad6b8d326b6d263a1d4fa08ef5db0966fb4f1479f4 DIST mysql-connector-c++-8.0.19-src.tar.gz 3137484 BLAKE2B 82a2900b0daa00bcfd72d562818ada25fe15901991a896a46ecdd9304e03066c4e7a3804287540559df1c74dbd1b3983b450ab783ee8cb7f0d7ec152f3cdc6b0 SHA512 5987ae31cda3a5db18ceded201ccbe66263b8ab7665ceacf70af6bb6b99130377b40514b96644b0768fd809b36ee02580520923c11c1edecccc75da15d7bb0bd +DIST mysql-connector-c++-8.0.20-src.tar.gz 3774428 BLAKE2B a06114432ab21c36fd0b3b91df2382198b2a48871e8e0bfd8c7a94729ed0e29f33599c078c97670fe9d744b13042db52fb89de2294c75eae670a77112d11d251 SHA512 3edb7c3d4ccf218a3f76afcf83a6d233b7accd236c05105ab3f7a6610cfd8809a78c78142c82fb60fb0931d2ae0f0f8fdc3ce9caf5f0cde7ef54067a7e20270b EBUILD mysql-connector-c++-1.1.12-r1.ebuild 1636 BLAKE2B e0e977f956845c46bc99a003b5e74fe5d085e1d5e2b9648474f27028b0d99b1764438fb07da8008c3fdef677fc35310342ad2988ada1f54a8c7a9583f5904a41 SHA512 5a80daba3b6038b57c284e409284106b19bcbb426fc2ba56d73d3c65fbad4343d150e7714782f558a94160dec90482cd88426ba5771bafc02300fa722b065778 EBUILD mysql-connector-c++-8.0.19.ebuild 1067 BLAKE2B 8407348e0e4da0ea8acca8ec0caa33a0c2e863c9a95d6951ce500b6306b77687e76ca867eeeb580dc5e9b8a9df3dff7ca0a8cb8ae95403a9a117d50d2dc8d869 SHA512 83d72ab1104a0ebd014d8b3e1f475944f16a18dc4836386e3ebf7b16df547f35cf7db42c586411fcef80ec6273f15a0f9531b197eaecb991a62301d9a9d3ff4b +EBUILD mysql-connector-c++-8.0.20.ebuild 1070 BLAKE2B bd6b438aa0a660bc19a50695ed77fa5f952aabfb6ff1996244eed5846476bb0c725cf2d4899105c88f1409725ebe80970655ac4f51b7012d1fccc3539a69a062 SHA512 d54363d3172c98ef6d500a336fc98c8d8abdd28e443e09e2ce50e85353c374cdd95739b9d6ab636d4aad3a8647bca1eb99329a761a10ff3ffb2040c1ec3796e8 MISC metadata.xml 378 BLAKE2B 43fdbbc8d3b6ef99e51da96ddfefbdeaa70ef5fcb2fc6067305f75f75b7ee2fd21b79ca76704d8752bf59ae057b28efb187b063770964246f93fea629b58b467 SHA512 c6e545fb60d306792421ea26a937aaa6aea53d2a4100c9cafe78cf695c9dd0620cf3e770d43ff42749ae42bbe3a35212407ea84edee9af2dcb0255c2b763ddfc diff --git a/dev-db/mysql-connector-c++/files/mysql-connector-c++-8.0.20-fix-libressl-support.patch b/dev-db/mysql-connector-c++/files/mysql-connector-c++-8.0.20-fix-libressl-support.patch new file mode 100644 index 000000000000..f2ae0d02ed7f --- /dev/null +++ b/dev-db/mysql-connector-c++/files/mysql-connector-c++-8.0.20-fix-libressl-support.patch @@ -0,0 +1,88 @@ +--- a/cdk/cmake/DepFindSSL.cmake ++++ b/cdk/cmake/DepFindSSL.cmake +@@ -88,7 +88,7 @@ function(main) + + set(OPENSSL_LIB_DIR "${OPENSSL_LIB_DIR}" CACHE INTERNAL "") + +- if(NOT OPENSSL_VERSION_MAJOR EQUAL 1) ++ if(NOT OPENSSL_VERSION_MAJOR VERSION_GREATER_EQUAL 1) + message(SEND_ERROR "OpenSSL version 1.x is required but version ${OPENSSL_VERSION} was found") + else() + message(STATUS "Using OpenSSL version: ${OPENSSL_VERSION}") +@@ -184,41 +184,35 @@ function(find_openssl) + + + # Verify version number. Version information looks like: +- # #define OPENSSL_VERSION_TEXT "OpenSSL 1.1.1a 20 Nov 2018" ++ # #define OPENSSL_VERSION_NUMBER 0x1000103fL ++ # Encoded as MNNFFPPS: major minor fix patch status + + FILE(STRINGS "${OPENSSL_INCLUDE_DIR}/openssl/opensslv.h" + OPENSSL_VERSION_NUMBER +- REGEX "#[ ]*define[\t ]+OPENSSL_VERSION_TEXT" ++ REGEX "^#[ ]*define[\t ]+OPENSSL_VERSION_NUMBER[\t ]+0x[0-9].*" + ) + +- #message("== OPENSSL_VERSION_NUMBER: ${OPENSSL_VERSION_NUMBER}") +- # define OPENSSL_VERSION_TEXT "OpenSSL 1.1.1d-freebsd 10 Sep 2019" + STRING(REGEX REPLACE +- "^.*OPENSSL_VERSION_TEXT[\t ]+\"OpenSSL[\t ]([0-9]+)\\.([0-9]+)\\.([0-9]+)([a-z]|)[\t \\-].*$" +- "\\1;\\2;\\3;\\4" +- version_list "${OPENSSL_VERSION_NUMBER}" ++ "^.*OPENSSL_VERSION_NUMBER[\t ]+0x([0-9]).*$" "\\1" ++ OPENSSL_VERSION_MAJOR "${OPENSSL_VERSION_NUMBER}" ++ ) ++ STRING(REGEX REPLACE ++ "^.*OPENSSL_VERSION_NUMBER[\t ]+0x[0-9]([0-9][0-9]).*$" "\\1" ++ OPENSSL_VERSION_MINOR "${OPENSSL_VERSION_NUMBER}" ++ ) ++ STRING(REGEX REPLACE ++ "^.*OPENSSL_VERSION_NUMBER[\t ]+0x[0-9][0-9][0-9]([0-9][0-9]).*$" "\\1" ++ OPENSSL_VERSION_FIX "${OPENSSL_VERSION_NUMBER}" + ) +- #message("-- OPENSSL_VERSION: ${version_list}") +- +- list(GET version_list 0 OPENSSL_VERSION_MAJOR) +- math(EXPR OPENSSL_VERSION_MAJOR ${OPENSSL_VERSION_MAJOR}) +- +- list(GET version_list 1 OPENSSL_VERSION_MINOR) +- math(EXPR OPENSSL_VERSION_MINOR ${OPENSSL_VERSION_MINOR}) +- +- list(GET version_list 2 OPENSSL_VERSION_FIX) +- math(EXPR OPENSSL_VERSION_FIX ${OPENSSL_VERSION_FIX}) +- +- list(GET version_list 3 OPENSSL_VERSION_PATCH) +- + + + set(OPENSSL_VERSION +- "${OPENSSL_VERSION_MAJOR}.${OPENSSL_VERSION_MINOR}.${OPENSSL_VERSION_FIX}${OPENSSL_VERSION_PATCH}" ++ "${OPENSSL_VERSION_MAJOR}.${OPENSSL_VERSION_MINOR}.${OPENSSL_VERSION_FIX}" + PARENT_SCOPE + ) + set(OPENSSL_VERSION_MAJOR ${OPENSSL_VERSION_MAJOR} PARENT_SCOPE) + ++ CHECK_SYMBOL_EXISTS(TLS1_3_VERSION "openssl/tls1.h" HAVE_TLS1_3_VERSION) + + find_library(OPENSSL_LIBRARY + NAMES ssl ssleay32 ssleay32MD libssl +--- a/cdk/foundation/connection_openssl.cc ++++ b/cdk/foundation/connection_openssl.cc +@@ -211,7 +211,7 @@ static void throw_ssl_error(SSL* tls, int err) + case SSL_ERROR_WANT_CONNECT: + case SSL_ERROR_WANT_ACCEPT: + case SSL_ERROR_WANT_X509_LOOKUP: +-# if OPENSSL_VERSION_NUMBER >= 0x10100000L ++# if OPENSSL_VERSION_NUMBER >= 0x10100000L && !defined(LIBRESSL_VERSION_NUMBER) + case SSL_ERROR_WANT_ASYNC: + case SSL_ERROR_WANT_ASYNC_JOB: + # endif +@@ -387,7 +387,7 @@ void TLS_helper::setup(SSL_CTX *ctx) + + SSL_CTX_set_cipher_list(ctx, m_cipher_list.c_str()); + +-#if OPENSSL_VERSION_NUMBER>=0x1010100fL ++#if HAVE_TLS1_3_VERSION + + /* + Note: If TLSv1.3 is not enabled, there is no need to restrict diff --git a/dev-db/mysql-connector-c++/mysql-connector-c++-8.0.20.ebuild b/dev-db/mysql-connector-c++/mysql-connector-c++-8.0.20.ebuild new file mode 100644 index 000000000000..fcacc48a0540 --- /dev/null +++ b/dev-db/mysql-connector-c++/mysql-connector-c++-8.0.20.ebuild @@ -0,0 +1,44 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI="7" + +CMAKE_MAKEFILE_GENERATOR=emake +inherit cmake-utils + +DESCRIPTION="MySQL database connector for C++ (mimics JDBC 4.0 API)" +HOMEPAGE="https://dev.mysql.com/downloads/connector/cpp/" +URI_DIR="Connector-C++" +SRC_URI="https://dev.mysql.com/get/Downloads/${URI_DIR}/${P}-src.tar.gz" + +LICENSE="Artistic GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~sparc ~x86" +IUSE="+legacy libressl" + +RDEPEND=" + dev-libs/protobuf:= + legacy? ( + dev-libs/boost:= + >=dev-db/mysql-connector-c-6.1.8:= + ) + !libressl? ( dev-libs/openssl:0= ) + libressl? ( dev-libs/libressl:0= )" +DEPEND="${RDEPEND}" +S="${WORKDIR}/${P}-src" + +PATCHES=( + "${FILESDIR}"/${PN}-8.0.19-fix-build.patch + "${FILESDIR}"/${PN}-8.0.20-fix-libressl-support.patch +) + +src_configure() { + local mycmakeargs=( + -DWITH_SSL=system + -DWITH_JDBC=$(usex legacy ON OFF) + $(usex legacy '-DMYSQLCLIENT_STATIC_BINDING=0' '') + $(usex legacy '-DMYSQLCLIENT_STATIC_LINKING=0' '') + ) + + cmake-utils_src_configure +} diff --git a/dev-db/mysql-connector-c/Manifest b/dev-db/mysql-connector-c/Manifest index d61ffbe18e60..45c8544954b0 100644 --- a/dev-db/mysql-connector-c/Manifest +++ b/dev-db/mysql-connector-c/Manifest @@ -4,9 +4,12 @@ AUX mysql-connector-c-8.0.17-use-relative-include-path-for-udf_registration_type AUX mysql-connector-c-8.0.18-always-build-decompress-utilities.patch 874 BLAKE2B 1622ba22ebb68d8b72499efec3075bbbe157b1ceaab5651dbc6dea996c831159161878a859972119dd4d5c20bb631681efb00b8d9715b3097890def8016898f4 SHA512 02ae005e8ac710dcc75f07011006df63a6d22f030b4eff0c6d28f78b083b1d7385190c9080812b5c9c2a84ad66972594b7d79a1485285c9ad76245577d42e528 AUX mysql-connector-c-8.0.19-do-not-install-comp_err.patch 307 BLAKE2B 864c07e9d4fb9a38ac418476f4b7738caa1f2a5dc633ad5921859793983c7b42acd87263ce2703df5a8c7d3bc3d7a60efb28a3ff17c311d89cc7b12edd22574f SHA512 cbb9be24a67a649b68230fe3482063d2d16fb629233e070289eb1ab0011bd8c43b0c056e4b6ca430a62ce0e8f47bb9490cb6746b7dc3fe06a05670b078cd084f AUX mysql-connector-c-8.0.19-libressl.patch 10501 BLAKE2B 73a31afdbbb591cadd45f158ca16c39344f540459b20683e5998f0e0f0d593dfd06e7198d3d8a5e06f8e65ff6b7a5f79435a1face9997f3316e487ef1e081459 SHA512 1d8e75e8ba6866ff4d0dced7211607e41033bbdfabd0f8a670ac221e7366e272cfc2b9c4d0f259e5d33ed486e9697bcefbdb0e6a0cd65ed2811b63e9cf1610f3 +AUX mysql-connector-c-8.0.20-libressl.patch 11923 BLAKE2B a545f2570e744cce7e4e59109daebfd2f29d2065bfeadbb48f9d910c3d2d24e5fe24064e6453e6f423a241b59a69f26492a0cd82801e81f2eec13674291a4abe SHA512 cee40efd1ce9806fb36d0d36374b2d231a45553a2ff595d5e752f1b0ae80a9bb61cfeaa7a280f51f290580de777517524eac563028c747dbc2ac7b269cc1dcb4 AUX mysql_com.patch 1787 BLAKE2B 4fbd40325f400586926072927b3f07231d577f18c1e30951c34c36ded9b9e42b7c3dc47ca51df974265c28b40116e30274d8a73d6a843e5d9d0074430bc17b08 SHA512 340365b05d72045af0ef12fd5c260a796be547d9abb97a6ef3d6aaf30aecf29368c1dfa28f1284da544a81656f0436f11ada2f8c5cb481540d1f1c90dd354b49 DIST mysql-boost-8.0.19.tar.gz 264147972 BLAKE2B 61a5ccbef1a7a675c85e4e6bda8e5285bdb931e6ee14d4710bf13dfd9157d1095200db2886dc93ea7251d3d59245f35c0bef5ba88ba6aac209b1e080f3b07dc4 SHA512 5ffc03f005ab2585694902e926b6cb2b10059b2b030549eccd3949f9c3b2f02626d02529f940dec003f2d69683856fd1c720ff12f89dfbdc48befaf24a9c4d01 +DIST mysql-boost-8.0.20.tar.gz 266282970 BLAKE2B 2aeb9d6c575ed9dc2d00d3e51e6391c59ffa39156491d9ed2c07e19bb2efb88a14d5a9d4b537c137d71854e39fa3a7fc2b93618118d4fd062e92ba2d83783c6f SHA512 7a962e9ddec7069008c5ab6ac2801515e2661ca2875afc6141541c03e2f941f4255b3c0d806a4df2fd2f2f1d12323aeb1e456c1d364777a18ccebefad7b22a99 DIST mysql-connector-c-6.1.11-src.tar.gz 3489345 BLAKE2B 813512520ef660521221565a4466e81d902629d0ee731f746b68eed2b9129ea8361fcabe184537ec8ba91aed5a4b02dfb3450b36524c2e98f81fba148eee0cf1 SHA512 271395c888a93b833e0bbe1840b9987ecdb37d0f1cf89904207cc9aa99ed32e538aee8c9529ff39b6533947159776a8f5aa079da86ed51b1d26b086f4ffdd7c6 EBUILD mysql-connector-c-6.1.11-r2.ebuild 2287 BLAKE2B 831b0960af0f087357840434bf61ef773df2a98357fec736c9279fff8f44e9d68384aca45381aa9b332137f5ba6b3ab9478fb3c21169893a520f9017508ee827 SHA512 f06aef9d2d5e2bc0a607d66d10b7cd755e34cf5167f0fb2b2ed5595f50b8f8d6f41e839879c343ec272121f4c1c1d71ff6ada70e40f7cd9ea69b8fd385b85abd EBUILD mysql-connector-c-8.0.19.ebuild 2927 BLAKE2B 37b57beb51549b94d75bf1695b93914042303f933e5294e9b73804ab7a6bae986ac89db6e648f78e9b1fcf106cfab143f4942da76ed930cf71b5f14fde9c7709 SHA512 d6404f3558f254a08702dea0036d346155e83dc6695b1237e0da9d17cb5aa85e32a3c60195d461cf33d976be2ec9af2519abb16aab16a1b73c27c34e38bd88b2 +EBUILD mysql-connector-c-8.0.20.ebuild 2936 BLAKE2B cc7571d0d64f102259368c247f8c992997965f985b3582c72d36457798e6341844f349b4de635dd0a94bb2092505e071eff4de64b8e96f90f145123a8f6b462a SHA512 5b7b0134429713e44c6c4f98ce8b04cdd0bedc9520c72772a274cb522a3590e856455553cbb83d868b3fee606e9a00fff233a6358bb0d635811d4c2a0b1f5450 MISC metadata.xml 239 BLAKE2B c4d6706d083b72927d239f41a644a4009c054c1c1a388af7733d3a2daf47d354009eb472573304a6be272601f05535297bcd9ceaea811a741cd905577ffe53d1 SHA512 e6e2fafe2f503db1d12e3d2368a99631ee8d014b7ea802d9879e7e3e2c0f9378675fffccd78ed09b914ae781ac3902567b1a53a721906e3ea63ceb51d0a1654b diff --git a/dev-db/mysql-connector-c/files/mysql-connector-c-8.0.20-libressl.patch b/dev-db/mysql-connector-c/files/mysql-connector-c-8.0.20-libressl.patch new file mode 100644 index 000000000000..88f32419239a --- /dev/null +++ b/dev-db/mysql-connector-c/files/mysql-connector-c-8.0.20-libressl.patch @@ -0,0 +1,332 @@ +From 2108922a8292d74874ede834158c208d81c3cf76 Mon Sep 17 00:00:00 2001 +From: Thomas Deutschmann <whissi@gentoo.org> +Date: Thu, 30 Apr 2020 20:01:48 +0200 +Subject: [PATCH 5/5] Add LibreSSL support + +Signed-off-by: Thomas Deutschmann <whissi@gentoo.org> +--- + cmake/ssl.cmake | 5 +++-- + mysys/my_md5.cc | 2 ++ + .../bindings/xcom/xcom/xcom_ssl_transport.c | 6 +++++- + plugin/x/client/xconnection_impl.cc | 4 ++++ + router/src/http/src/tls_client_context.cc | 2 +- + router/src/http/src/tls_context.cc | 9 ++++++-- + router/src/http/src/tls_server_context.cc | 3 ++- + sql-common/client.cc | 2 ++ + sql/mysqld.cc | 4 +++- + sql/sys_vars.cc | 21 +++++++++++++++++-- + vio/viossl.cc | 8 +++---- + vio/viosslfactories.cc | 2 ++ + 12 files changed, 54 insertions(+), 14 deletions(-) + +--- a/cmake/ssl.cmake ++++ b/cmake/ssl.cmake +@@ -222,13 +222,14 @@ MACRO (MYSQL_CHECK_SSL) + OPENSSL_FIX_VERSION "${OPENSSL_VERSION_NUMBER}" + ) + ENDIF() +- IF("${OPENSSL_MAJOR_VERSION}.${OPENSSL_MINOR_VERSION}.${OPENSSL_FIX_VERSION}" VERSION_GREATER "1.1.0") ++ CHECK_SYMBOL_EXISTS(TLS1_3_VERSION "openssl/tls1.h" HAVE_TLS1_3_VERSION) ++ IF(HAVE_TLS1_3_VERSION) + ADD_DEFINITIONS(-DHAVE_TLSv13) + ENDIF() + IF(OPENSSL_INCLUDE_DIR AND + OPENSSL_LIBRARY AND + CRYPTO_LIBRARY AND +- OPENSSL_MAJOR_VERSION STREQUAL "1" ++ OPENSSL_MAJOR_VERSION VERSION_GREATER_EQUAL "1" + ) + SET(OPENSSL_FOUND TRUE) + FIND_PROGRAM(OPENSSL_EXECUTABLE openssl +--- a/mysys/my_md5.cc ++++ b/mysys/my_md5.cc +@@ -56,7 +56,9 @@ static void my_md5_hash(unsigned char *digest, unsigned const char *buf, + int compute_md5_hash(char *digest, const char *buf, int len) { + int retval = 0; + int fips_mode = 0; ++#ifndef LIBRESSL_VERSION_NUMBER + fips_mode = FIPS_mode(); ++#endif + /* If fips mode is ON/STRICT restricted method calls will result into abort, + * skipping call. */ + if (fips_mode == 0) { +--- a/plugin/group_replication/libmysqlgcs/src/bindings/xcom/xcom/xcom_ssl_transport.c ++++ b/plugin/group_replication/libmysqlgcs/src/bindings/xcom/xcom/xcom_ssl_transport.c +@@ -329,6 +329,7 @@ error: + return 1; + } + ++#ifndef LIBRESSL_VERSION_NUMBER + #define OPENSSL_ERROR_LENGTH 512 + static int configure_ssl_fips_mode(const uint fips_mode) { + int rc = -1; +@@ -352,6 +353,7 @@ static int configure_ssl_fips_mode(const uint fips_mode) { + EXIT: + return rc; + } ++#endif + + static int configure_ssl_ca(SSL_CTX *ssl_ctx, const char *ca_file, + const char *ca_path) { +@@ -555,10 +557,12 @@ int xcom_init_ssl(const char *server_key_file, const char *server_cert_file, + int verify_server = SSL_VERIFY_NONE; + int verify_client = SSL_VERIFY_NONE; + ++#ifndef LIBRESSL_VERSION_NUMBER + if (configure_ssl_fips_mode(ssl_fips_mode) != 1) { + G_ERROR("Error setting the ssl fips mode"); + goto error; + } ++#endif + + SSL_library_init(); + SSL_load_error_strings(); +@@ -622,7 +626,7 @@ error: + void xcom_cleanup_ssl() { + if (!xcom_use_ssl()) return; + +-#if OPENSSL_VERSION_NUMBER < 0x10100000L ++#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER) + ERR_remove_thread_state(0); + #endif /* OPENSSL_VERSION_NUMBER < 0x10100000L */ + } +--- a/plugin/x/client/xconnection_impl.cc ++++ b/plugin/x/client/xconnection_impl.cc +@@ -511,6 +511,7 @@ XError Connection_impl::get_ssl_error(const int error_id) { + return XError(CR_SSL_CONNECTION_ERROR, buffer); + } + ++#ifndef LIBRESSL_VERSION_NUMBER + /** + Set fips mode in openssl library, + When we set fips mode ON/STRICT, it will perform following operations: +@@ -550,6 +551,7 @@ int set_fips_mode(const uint32_t fips_mode, + EXIT: + return rc; + } ++#endif + + XError Connection_impl::activate_tls() { + if (nullptr == m_vio) return get_socket_error(SOCKET_ECONNRESET); +@@ -560,12 +562,14 @@ XError Connection_impl::activate_tls() { + if (!m_context->m_ssl_config.is_configured()) + return XError{CR_SSL_CONNECTION_ERROR, ER_TEXT_TLS_NOT_CONFIGURATED, true}; + ++#ifndef LIBRESSL_VERSION_NUMBER + char err_string[OPENSSL_ERROR_LENGTH] = {'\0'}; + if (set_fips_mode( + static_cast<uint32_t>(m_context->m_ssl_config.m_ssl_fips_mode), + err_string) != 1) { + return XError{CR_SSL_CONNECTION_ERROR, err_string, true}; + } ++#endif + auto ssl_ctx_flags = process_tls_version( + details::null_when_empty(m_context->m_ssl_config.m_tls_version)); + +--- a/router/src/http/src/tls_client_context.cc ++++ b/router/src/http/src/tls_client_context.cc +@@ -54,7 +54,7 @@ void TlsClientContext::verify(TlsVerify verify) { + + void TlsClientContext::cipher_suites(const std::string &ciphers) { + // TLSv1.3 ciphers are controlled via SSL_CTX_set_ciphersuites() +-#if OPENSSL_VERSION_NUMBER >= ROUTER_OPENSSL_VERSION(1, 1, 1) ++#ifdef TLS1_3_VERSION + if (1 != SSL_CTX_set_ciphersuites(ssl_ctx_.get(), ciphers.c_str())) { + throw TlsError("set-cipher-suites"); + } +--- a/router/src/http/src/tls_context.cc ++++ b/router/src/http/src/tls_context.cc +@@ -91,7 +91,7 @@ static int o11x_version(TlsVersion version) { + return TLS1_1_VERSION; + case TlsVersion::TLS_1_2: + return TLS1_2_VERSION; +-#if OPENSSL_VERSION_NUMBER >= ROUTER_OPENSSL_VERSION(1, 1, 1) ++#ifdef TLS1_3_VERSION + case TlsVersion::TLS_1_3: + return TLS1_3_VERSION; + #endif +@@ -120,9 +120,11 @@ void TlsContext::version_range(TlsVersion min_version, TlsVersion max_version) { + switch (min_version) { + default: + // unknown, leave all disabled ++#ifdef TLS1_3_VERSION + // fallthrough + case TlsVersion::TLS_1_3: + opts |= SSL_OP_NO_TLSv1_2; ++#endif + // fallthrough + case TlsVersion::TLS_1_2: + opts |= SSL_OP_NO_TLSv1_1; +@@ -170,8 +172,10 @@ TlsVersion TlsContext::min_version() const { + return TlsVersion::TLS_1_1; + case TLS1_2_VERSION: + return TlsVersion::TLS_1_2; ++#ifdef TLS1_3_VERSION + case TLS1_3_VERSION: + return TlsVersion::TLS_1_3; ++#endif + case 0: + return TlsVersion::AUTO; + default: +@@ -230,7 +234,8 @@ TlsContext::InfoCallback TlsContext::info_callback() const { + } + + int TlsContext::security_level() const { +-#if OPENSSL_VERSION_NUMBER >= ROUTER_OPENSSL_VERSION(1, 1, 0) ++#if OPENSSL_VERSION_NUMBER >= ROUTER_OPENSSL_VERSION(1, 1, 0) && \ ++ !defined(LIBRESSL_VERSION_NUMBER) + return SSL_CTX_get_security_level(ssl_ctx_.get()); + #else + return 0; +--- a/router/src/http/src/tls_server_context.cc ++++ b/router/src/http/src/tls_server_context.cc +@@ -167,7 +167,8 @@ void TlsServerContext::init_tmp_dh(const std::string &dh_params) { + } + + } else { +-#if OPENSSL_VERSION_NUMBER >= ROUTER_OPENSSL_VERSION(1, 1, 0) ++#if OPENSSL_VERSION_NUMBER >= ROUTER_OPENSSL_VERSION(1, 1, 0) && \ ++ !defined(LIBRESSL_VERSION_NUMBER) + dh2048.reset(DH_get_2048_256()); + #else + /* +--- a/sql-common/client.cc ++++ b/sql-common/client.cc +@@ -7752,6 +7752,7 @@ int STDCALL mysql_options(MYSQL *mysql, enum mysql_option option, + return 1; + break; + case MYSQL_OPT_SSL_FIPS_MODE: { ++#if !defined(LIBRESSL_VERSION_NUMBER) + char ssl_err_string[OPENSSL_ERROR_LENGTH] = {'\0'}; + ENSURE_EXTENSIONS_PRESENT(&mysql->options); + mysql->options.extension->ssl_fips_mode = *static_cast<const uint *>(arg); +@@ -7763,6 +7764,7 @@ int STDCALL mysql_options(MYSQL *mysql, enum mysql_option option, + "Set Fips mode ON/STRICT failed, detail: '%s'.", ssl_err_string); + return 1; + } ++#endif + } break; + case MYSQL_OPT_SSL_MODE: + ENSURE_EXTENSIONS_PRESENT(&mysql->options); +--- a/sql/mysqld.cc ++++ b/sql/mysqld.cc +@@ -4857,7 +4857,7 @@ static int init_thread_environment() { + + static PSI_memory_key key_memory_openssl = PSI_NOT_INSTRUMENTED; + +-#if OPENSSL_VERSION_NUMBER < 0x10100000L ++#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER) + #define FILE_LINE_ARGS + #else + #define FILE_LINE_ARGS , const char *, int +@@ -4891,12 +4891,14 @@ static void init_ssl() { + } + + static int init_ssl_communication() { ++#ifndef LIBRESSL_VERSION_NUMBER + char ssl_err_string[OPENSSL_ERROR_LENGTH] = {'\0'}; + int ret_fips_mode = set_fips_mode(opt_ssl_fips_mode, ssl_err_string); + if (ret_fips_mode != 1) { + LogErr(ERROR_LEVEL, ER_SSL_FIPS_MODE_ERROR, ssl_err_string); + return 1; + } ++#endif + if (SslAcceptorContext::singleton_init(opt_use_ssl)) return 1; + + #if OPENSSL_VERSION_NUMBER < 0x10100000L +--- a/sql/sys_vars.cc ++++ b/sql/sys_vars.cc +@@ -4459,6 +4459,7 @@ static Sys_var_ulong Sys_max_execution_time( + HINT_UPDATEABLE SESSION_VAR(max_execution_time), CMD_LINE(REQUIRED_ARG), + VALID_RANGE(0, ULONG_MAX), DEFAULT(0), BLOCK_SIZE(1)); + ++#ifndef LIBRESSL_VERSION_NUMBER + static bool update_fips_mode(sys_var *, THD *, enum_var_type) { + char ssl_err_string[OPENSSL_ERROR_LENGTH] = {'\0'}; + if (set_fips_mode(opt_ssl_fips_mode, ssl_err_string) != 1) { +@@ -4469,15 +4470,31 @@ static bool update_fips_mode(sys_var *, THD *, enum_var_type) { + return false; + } + } ++#endif ++ ++#if defined(LIBRESSL_VERSION_NUMBER) ++static const char *ssl_fips_mode_names[] = {"OFF", 0}; ++#else ++static const char *ssl_fips_mode_names[] = {"OFF", "ON", "STRICT", 0}; ++#endif + +-static const char *ssl_fips_mode_names[] = {"OFF", "ON", "STRICT", nullptr}; + static Sys_var_enum Sys_ssl_fips_mode( + "ssl_fips_mode", + "SSL FIPS mode (applies only for OpenSSL); " ++#ifndef LIBRESSL_VERSION_NUMBER + "permitted values are: OFF, ON, STRICT", ++#else ++ "permitted values are: OFF", ++#endif + GLOBAL_VAR(opt_ssl_fips_mode), CMD_LINE(REQUIRED_ARG, OPT_SSL_FIPS_MODE), + ssl_fips_mode_names, DEFAULT(0), NO_MUTEX_GUARD, NOT_IN_BINLOG, +- ON_CHECK(nullptr), ON_UPDATE(update_fips_mode), nullptr); ++ ON_CHECK(NULL), ++#ifndef LIBRESSL_VERSION_NUMBER ++ ON_UPDATE(update_fips_mode), ++#else ++ ON_UPDATE(NULL), ++#endif ++ NULL); + + static Sys_var_bool Sys_auto_generate_certs( + "auto_generate_certs", +--- a/vio/viossl.cc ++++ b/vio/viossl.cc +@@ -45,7 +45,7 @@ + BIO_set_callback_ex was added in openSSL 1.1.1 + For older openSSL, use the deprecated BIO_set_callback. + */ +-#if OPENSSL_VERSION_NUMBER >= 0x10101000L ++#if OPENSSL_VERSION_NUMBER >= 0x10101000L && !defined(LIBRESSL_VERSION_NUMBER) + #define HAVE_BIO_SET_CALLBACK_EX + #endif + +@@ -634,8 +634,8 @@ static int ssl_do(struct st_VioSSLFd *ptr, Vio *vio, long timeout, + + #if !defined(DBUG_OFF) + { +- STACK_OF(SSL_COMP) *ssl_comp_methods = nullptr; +- ssl_comp_methods = SSL_COMP_get_compression_methods(); ++ STACK_OF(SSL_COMP) *ssl_comp_methods = NULL; ++ ssl_comp_methods = (STACK_OF(SSL_COMP) *)SSL_COMP_get_compression_methods(); + n = sk_SSL_COMP_num(ssl_comp_methods); + DBUG_PRINT("info", ("Available compression methods:\n")); + if (n == 0) +@@ -643,7 +643,7 @@ static int ssl_do(struct st_VioSSLFd *ptr, Vio *vio, long timeout, + else + for (j = 0; j < n; j++) { + SSL_COMP *c = sk_SSL_COMP_value(ssl_comp_methods, j); +-#if OPENSSL_VERSION_NUMBER < 0x10100000L ++#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER) + DBUG_PRINT("info", (" %d: %s\n", c->id, c->name)); + #else /* OPENSSL_VERSION_NUMBER < 0x10100000L */ + DBUG_PRINT("info", +--- a/vio/viosslfactories.cc ++++ b/vio/viosslfactories.cc +@@ -472,6 +472,7 @@ void ssl_start() { + } + } + ++#ifndef LIBRESSL_VERSION_NUMBER + /** + Set fips mode in openssl library, + When we set fips mode ON/STRICT, it will perform following operations: +@@ -525,6 +526,7 @@ EXIT: + @returns openssl current fips mode + */ + uint get_fips_mode() { return FIPS_mode(); } ++#endif + + long process_tls_version(const char *tls_version) { + const char *separator = ","; +-- +2.26.2 + diff --git a/dev-db/mysql-connector-c/mysql-connector-c-8.0.20.ebuild b/dev-db/mysql-connector-c/mysql-connector-c-8.0.20.ebuild new file mode 100644 index 000000000000..db0c6dcd3c15 --- /dev/null +++ b/dev-db/mysql-connector-c/mysql-connector-c-8.0.20.ebuild @@ -0,0 +1,111 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit cmake-multilib + +# wrap the config script +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" + +SLOT="0/21" +IUSE="ldap libressl static-libs" + +RDEPEND=" + >=app-arch/lz4-0_p131:= + sys-libs/zlib:=[${MULTILIB_USEDEP}] + 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 +RDEPEND+=" !<dev-db/mysql-5.6.45-r1" +RDEPEND+=" !=dev-db/mysql-5.7.23*" +RDEPEND+=" !=dev-db/mysql-5.7.24*" +RDEPEND+=" !=dev-db/mysql-5.7.25*" +RDEPEND+=" !=dev-db/mysql-5.7.26-r0" +RDEPEND+=" !=dev-db/mysql-5.7.27-r0" +RDEPEND+=" !<dev-db/percona-server-5.7.26.29-r1" + +DOCS=( README ) + +S="${WORKDIR}/mysql-${PV}" + +PATCHES=( + "${FILESDIR}"/${PN}-8.0.18-always-build-decompress-utilities.patch + "${FILESDIR}"/${PN}-8.0.17-use-relative-include-path-for-udf_registration_types-h.patch + "${FILESDIR}"/${PN}-8.0.19-do-not-install-comp_err.patch + "${FILESDIR}"/${PN}-8.0.20-libressl.patch +) + +src_prepare() { + sed -i -e 's/CLIENT_LIBS/CONFIG_CLIENT_LIBS/' "${S}/scripts/CMakeLists.txt" || die + + # All these are for the server only. + # Disable rpm call which would trigger sandbox, #692368 + sed -i \ + -e '/MYSQL_CHECK_LIBEVENT/d' \ + -e '/MYSQL_CHECK_RAPIDJSON/d' \ + -e '/MYSQL_CHECK_ICU/d' \ + -e '/MYSQL_CHECK_EDITLINE/d' \ + -e '/MYSQL_CHECK_CURL/d' \ + -e '/ADD_SUBDIRECTORY(man)/d' \ + -e '/ADD_SUBDIRECTORY(share)/d' \ + -e '/INCLUDE(cmake\/boost/d' \ + -e 's/MY_RPM rpm/MY_RPM rpmNOTEXISTENT/' \ + CMakeLists.txt || die + + # Skip building clients + echo > client/CMakeLists.txt || die + + # Forcefully disable auth plugin + if ! use ldap ; then + sed -i -e '/MYSQL_CHECK_SASL/d' CMakeLists.txt || die + echo > libmysql/authentication_ldap/CMakeLists.txt || die + fi + + cmake-utils_src_prepare +} + +multilib_src_configure() { + local mycmakeargs=( + -DINSTALL_LAYOUT=RPM + -DINSTALL_LIBDIR=$(get_libdir) + -DWITH_DEFAULT_COMPILER_OPTIONS=OFF + -DWITH_DEFAULT_FEATURE_SET=OFF + -DENABLED_LOCAL_INFILE=ON + -DMYSQL_UNIX_ADDR="${EPREFIX}/run/mysqld/mysqld.sock" + -DWITH_ZLIB=system + -DWITH_SSL=system + -DWITH_NUMA=OFF + -DLIBMYSQL_OS_OUTPUT_NAME=mysqlclient + -DSHARED_LIB_PATCH_VERSION="0" + -DCMAKE_POSITION_INDEPENDENT_CODE=ON + -DWITHOUT_SERVER=ON + ) + cmake-utils_src_configure +} + +multilib_src_install() { + cmake-utils_src_install +} + +multilib_src_install_all() { + doman \ + man/my_print_defaults.1 \ + man/perror.1 \ + man/zlib_decompress.1 + + if ! use static-libs ; then + find "${ED}" -name "*.a" -delete || die + fi +} diff --git a/dev-db/mysql-workbench/Manifest b/dev-db/mysql-workbench/Manifest index 148cab61ecdc..84ea4df2c7ce 100644 --- a/dev-db/mysql-workbench/Manifest +++ b/dev-db/mysql-workbench/Manifest @@ -3,5 +3,7 @@ AUX mysql-workbench-6.3.10-i386-json.patch 7167 BLAKE2B 44a6e2446b24cd2f7f096d51 AUX mysql-workbench-8.0.19-mysql-connector-8.patch 624 BLAKE2B 0cb899a8b0127664471877bb9cdcda946c35ed7a159646b94891a791a618c77201cc7696d6f2893e95fd78dbc13325cef752740f76e69974e10c0f88084594fb SHA512 09c2349cb42393f6d32f24804e2c3438a5d846fc9611e0684ccf2139fd30b0abcb0f2aa7b205c60a081259e073fb345cd72837dab1a216e6a8aaaba5ec3decf7 DIST antlr-4.7.1-complete.jar 2240116 BLAKE2B 3acf99b3701b2092cad2fb6e91f27791cbedd82f26888d7329e481be29fce4ec644eb57f663e515b92dea46c24222d4fb090aae5cae30c57c412a38932ea72ed SHA512 de1c230d7294e05ac7b451cbc639bab9d416a674b281e21092fb4a9329ca8b6d4b92b9ad78a9771cff475a1610f1d0419819c4619bdff36c683019da67ef13b1 DIST mysql-workbench-community-8.0.19-src.tar.gz 19391463 BLAKE2B f9374c234a75851784c940f8288a783ee1c02fe4be2973b174a0d3768a60dd5318ceea7d2dacb083376c83c33bed8fca02768bcf4f3b8ba6284ca78fc7910cfe SHA512 986a34328ec3b9aba1532cfd8792fb970fe3c71eda577988a17a6bca25e783a520878067acd097a74ca3f274f02d271af16d7d6beb6970bca48332721021eebc +DIST mysql-workbench-community-8.0.20-src.tar.gz 19391920 BLAKE2B 9baf37dec18002ebf7956979fa1e3e45b69a7061bd85d6b2ef25f058ce7595a6847ea314b7443dadf7524ff985ff4e87869e91ea7a012e6cf07a6d139a6c733b SHA512 b31314fac018959a008b283c795df5a676d6c667827e87a98379ce1de172b98cfdf8dd5cac009e2fb78241358afcb318abfed0178d73840bf6b4432b85b6a4e7 EBUILD mysql-workbench-8.0.19-r1.ebuild 2629 BLAKE2B 3796fddc98646419abf3b497862b1e3eecbd3d846dc4654bb4629adab10679738d2434b48b5fbc221c3383bbc59cc94ef0bc25b22beb18a8cb73628a7560c26a SHA512 4ef8643322b88a123a0cac098f5835e64581ab21e1eefa339b92bc1d507f03a9976bfa67a75a14e58165e90cf8ad1aa16e259db32ccc22c172a82b7f15fe3df4 +EBUILD mysql-workbench-8.0.20.ebuild 2639 BLAKE2B cada322f63595aaf9a6add80d1db5f160f616f4026cb65f8bd3bb968def8348ff8cc89b7fbc1f6c550780b5df332ef6f814dbf9f1578734671eedcd07276b334 SHA512 ce59a3350cae3f4714e139553f824aa29992ea374bdfcf4a9b881ef9a875f069845d4e4655597aacc7c4ed05105536b79a8dabdef430efa57703f29af7422be0 MISC metadata.xml 310 BLAKE2B b0d985e39bb17865a05907e5449723c2bf862d9f3ae7f8570173c9cff443171feef6694db26a51880f8c1a4b1e3834ca7ab9bc7c2057fd6f8930b9d1c1c02cdd SHA512 f284063d72f2218f8ed60a74b43f252d608865682b8c0447f52016a02a7cbf6d45a226787d893328dd31946ade1cca78ff7556896183b4422c4142a8935a2193 diff --git a/dev-db/mysql-workbench/mysql-workbench-8.0.20.ebuild b/dev-db/mysql-workbench/mysql-workbench-8.0.20.ebuild new file mode 100644 index 000000000000..2590c53d77bb --- /dev/null +++ b/dev-db/mysql-workbench/mysql-workbench-8.0.20.ebuild @@ -0,0 +1,109 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 +GCONF_DEBUG="no" + +PYTHON_COMPAT=( python2_7 ) +PYTHON_REQ_USE="sqlite" + +ANTLR_VERSION=4.7.1 + +inherit gnome2 flag-o-matic python-single-r1 cmake-utils + +MY_P="${PN}-community-${PV}-src" + +DESCRIPTION="MySQL Workbench" +HOMEPAGE="https://www.mysql.com/products/workbench/" +SRC_URI="https://cdn.mysql.com/Downloads/MySQLGUITools/${MY_P}.tar.gz + https://www.antlr.org/download/antlr-${ANTLR_VERSION}-complete.jar" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux" +IUSE="debug doc" +REQUIRED_USE="${PYTHON_REQUIRED_USE}" + +# glibc: deprecated mutex functions, removed in 2.36.0 +CDEPEND="${PYTHON_DEPS} + app-crypt/libsecret + dev-libs/glib:2 + dev-cpp/antlr-cpp:4 + dev-cpp/atkmm + dev-cpp/pangomm + >=dev-cpp/glibmm-2.14:2 + dev-cpp/gtkmm:3.0 + dev-libs/atk + >=net-libs/libssh-0.8.5[server] + x11-libs/pango + x11-libs/gtk+:3 + gnome-base/libglade:2.0 + >=x11-libs/cairo-1.5.12[glib,svg] + >=dev-libs/rapidjson-1.1.0 + dev-libs/libsigc++:2 + >=dev-libs/boost-1.55.0[nls] + >=dev-cpp/ctemplate-0.95 + >=dev-libs/libxml2-2.6.2:2 + dev-libs/libzip + dev-libs/libpcre[cxx] + >=sci-libs/gdal-1.11.1-r1 + virtual/opengl + || ( sys-libs/e2fsprogs-libs dev-libs/ossp-uuid ) + dev-libs/tinyxml[stl] + >=dev-db/mysql-connector-c++-1.1.8 =dev-db/mysql-connector-c++-1* + dev-db/vsqlite++ + || ( dev-db/libiodbc dev-db/unixODBC ) + dev-python/pexpect + >=dev-python/paramiko-1.7.4 +" + +RDEPEND="${CDEPEND} + app-admin/sudo + >=sys-apps/net-tools-1.60_p20120127084908" + +DEPEND="${CDEPEND} + dev-lang/swig + virtual/jre + virtual/pkgconfig" + +S="${WORKDIR}"/"${MY_P}" + +PATCHES=( + "${FILESDIR}/${PN}-6.2.5-wbcopytables.patch" + "${FILESDIR}/${PN}-8.0.19-mysql-connector-8.patch" +) + +src_unpack() { + unpack ${PN}-community-${PV}-src.tar.gz +} + +src_prepare() { + ## remove hardcoded CXXFLAGS + sed -i -e 's/-O0 -g3//' ext/scintilla/gtk/CMakeLists.txt || die + ## And avoid -Werror + sed -i -e 's/-Werror//' CMakeLists.txt || die + + ## package is very fragile... + strip-flags + + cmake-utils_src_prepare +} + +src_configure() { + if has_version dev-db/libiodbc ; then + IODBC="-DIODBC_CONFIG_PATH=/usr/bin/iodbc-config" + fi + + append-cxxflags -std=c++11 + ANTLR_JAR_PATH="${DISTDIR}/antlr-${ANTLR_VERSION}-complete.jar" + local mycmakeargs=( + -DWITH_ANTLR_JAR=${ANTLR_JAR_PATH} + -DLIB_INSTALL_DIR="/usr/$(get_libdir)" + -DIODBC_INCLUDE_PATH="/usr/include/iodbc" + ${IODBC} + -DPYTHON_INCLUDE_DIR="$(python_get_includedir)" + -DPYTHON_LIBRARY="$(python_get_library_path)" + -DMySQL_CONFIG_PATH="/usr/bin/mysql_config" + ) + cmake-utils_src_configure +} diff --git a/dev-db/mysql/Manifest b/dev-db/mysql/Manifest index 0bebc192fb5d..47c89b13dce7 100644 --- a/dev-db/mysql/Manifest +++ b/dev-db/mysql/Manifest @@ -4,20 +4,21 @@ AUX my.cnf-8.0.distro-client 749 BLAKE2B b01b39c85430714b5a4bfb9923c9ed1df99cdce AUX my.cnf-8.0.distro-server 1125 BLAKE2B f4d6941aad1fc29e81e6c805ac42f4c8d3c7bc250990a9c432800dbe25b5c31be08d8e3895666b57f21606ffb69e704c57ed2692fd94696b9d325a4442596587 SHA512 82d35b7bc944e5690e1f2670a3d5674845610c2d11d6d8b1c5784ccb3877c6298de70eced3d7c497c0bcaecfa9e339ac43ce0534a97e7d976e950bb1a7f5c75d AUX my.cnf.distro-client 637 BLAKE2B b0812e0e03aa9a3b2e55e08b933a0b41b6afd95ded61f4d9d7c34a2d3810ec38520abd0d89e1c6565f61d4cd8a36d653f9f3199b3dd6a91345cdb5ff962685d8 SHA512 74bd1d9a58075d0a6195be1f94db310bcbe8da532b03844e6fa1ff84676e84843fc9adf9aed06b7e4db53c9aa24ef0885d96de0ccfe4c6ad98afe4c145d43f4f AUX my.cnf.distro-server 994 BLAKE2B 41dceff58edf748f9f60ac3c0d1682d2fc2f026fc1fd14b4c2dea398814beda3c09aabea04dd3a9e145464524c629e7e69dc257d1245e0a46dd8584b7f685172 SHA512 cf172edc23d3dda49c21af6b8adef8aa13694d8ceecddf1d612d4ae34d00ba53c51ae4ae7ca4d11083eeacb5d862f59a855a9d80e9e448ab8bbf17f42aac2650 -DIST mysql-5.6.44.tar.gz 32531507 BLAKE2B 28fbf49f699eb9f43223ffa186671b119d16016274cc7192db232b85c58123a61154e37193b9b7145c6a650b80b5f6cf838529bc2bc5ea9c78c0dbc39de834d3 SHA512 65ace1c803773ca6c8759d171c09bc93c7d61b8e3208ac9905f82e99087622c9dcca602d2da217741dc62fc6eabe9108ebc7f31facd26705072eae65fcc37077 DIST mysql-5.6.45.tar.gz 32525559 BLAKE2B 3c629aed1de808acdea6654c7413e6851507c9c5be939ca4b4f5e2796da317e9b518a749bfc03d2b0ef05bd604b39f72e24b751076b9f206b462d21fa5db4f50 SHA512 f9d8bb72e96cc83f1064fe7df2e5fe8317ca9d44c4e776cf7827a61292fbcfccec716806c80d565958383d78fef93a19d61c726687b57680d5f93299291ff168 -DIST mysql-boost-5.7.26.tar.gz 51098338 BLAKE2B 1263cd75814a7293b26b0f44fd2b7d20d983f3c6a62725df9515ecac2ef252f6644810cb4bf0d6f36b98e55317f1c67ea7541228cb38d896dfedc476a5755f26 SHA512 a5f9871dc5a8e5fffc1467c3dd542533a63fe553c029120475f8fd5530d884c76ab0c33ad260daf317faf318ccef01464f6ac2dc3468efceb6bf2b6c06c54cfd +DIST mysql-5.7.30-patches-01.tar.xz 6684 BLAKE2B 9350280094619fda0d91eacae573396198954fceb5dc039669d236b1dad98eef306702550b517ef30ee3d0e6721667b6f5549df91e3c15cef68888079c00d9ba SHA512 74e8e8794fe54b73776b38296aa42c65547311b80bfe65c88b2f961bd44083e9628eb47da4ebcf4c20e2d7c694f514223bcbf29cce27853cca500710ae97778d +DIST mysql-8.0.20-patches-01.tar.xz 7176 BLAKE2B 2fc51986c0a4da60521d0e64b9f8705caf8ec3869af930c9729359c3710059fc78aae176523fdf17d10173b404431f31f9bb23ee5c82fba7cbbb4cb39881c005 SHA512 bf8211cf3873f8672b9d3d1dc42b68a1c635690ffdc2d3393eafa83f060ada9f2eaa63f859bf8eecc24976a733d8c7c3b9632ac70f28b5facf48eae921c7ceeb DIST mysql-boost-5.7.27.tar.gz 51436383 BLAKE2B 6db64ab5fa659aae9baa3725a0de9465e48c37618ffd69f34809880c06a00ce55dce77f507810c6fa52d86901facfa42d3d1bd8db1914a779fbc88a69be82497 SHA512 573f4555f3d62bcd3dc2228bcfba023518d462bb6689114a3505ccf7c7c3061d2775a8e7a37ec3c8b9dea6e8fbc56ba599610f237abc38cedff58e75799bdc52 DIST mysql-boost-5.7.29.tar.gz 51417554 BLAKE2B 652ce9f99419387e9bcc37afeb1b46438784752e963c3aa1877f17650c31d8b058b4052da97c3a7e9454e758c259d6c311e0518f9a75909fce9741150b82164c SHA512 38acf7c2a10b20c59230ad05cd2cd6996c4c582233c1be573ead08e5c6684275790da07a036570363f89b4d61547b306589b0b98ed5fca70723a3f2cbc21fe11 +DIST mysql-boost-5.7.30.tar.gz 51363998 BLAKE2B 7897ad74b685c3b30e7ecdf132fdfa72f3416c05e8d0086cb8f7674b6c4f377fff9abc51ed258cc4dfeab50a2cb393af9076d9c1f9a83a26521facbaf223afa1 SHA512 b75d41d0c72d16c6f8d5393dab6e476b7993d296eb5683c12417ce2da3db2052fdab2a152f6e7c545315d21bfa35f26a247cb6cdab83d3418b5d34ed7f5f9560 DIST mysql-boost-8.0.19.tar.gz 264147972 BLAKE2B 61a5ccbef1a7a675c85e4e6bda8e5285bdb931e6ee14d4710bf13dfd9157d1095200db2886dc93ea7251d3d59245f35c0bef5ba88ba6aac209b1e080f3b07dc4 SHA512 5ffc03f005ab2585694902e926b6cb2b10059b2b030549eccd3949f9c3b2f02626d02529f940dec003f2d69683856fd1c720ff12f89dfbdc48befaf24a9c4d01 -DIST mysql-extras-20190817-0024Z.tar.bz2 337793 BLAKE2B dfd51a708654aff5bdbbaf2acad7ef966869a8e3adcba544ee15f217d2ba942827445841e73981bccc6c1f145b6225bfa7245114219f0cf52f0dfb85494a6830 SHA512 c2ff81be1c55636f0a2700033af030149f312f0383217054a4b8c65aef174626299fcb4539eaae967ea7d096a5bb09f5b5122dce344b44b0a135d886ba0fdf28 +DIST mysql-boost-8.0.20.tar.gz 266282970 BLAKE2B 2aeb9d6c575ed9dc2d00d3e51e6391c59ffa39156491d9ed2c07e19bb2efb88a14d5a9d4b537c137d71854e39fa3a7fc2b93618118d4fd062e92ba2d83783c6f SHA512 7a962e9ddec7069008c5ab6ac2801515e2661ca2875afc6141541c03e2f941f4255b3c0d806a4df2fd2f2f1d12323aeb1e456c1d364777a18ccebefad7b22a99 DIST mysql-extras-20190822-1908Z.tar.bz2 338830 BLAKE2B bc197f8e541206548d8982814e82e028d699ba9c41aec8d5191bcc46581f7880ed2741dbe2206fde44a5e8d8d54bbcf40efbd0709b357636c4c8fdb2ccc3a7bb SHA512 be469e55f7e9966638600d6836a44258c74e5600240fafe2d79eaeebe7d1695b043678184b5d18ee9946f28154bc2529586a7f860b510180a30c82454ed575c8 DIST mysql-extras-20200125-1945Z.tar.bz2 344906 BLAKE2B 0e87875efbc221ded43d6f080dc7dce4277b676b538950120c94b962e51d054093286486e5d83ea3e38e1b2d0b12cf81873df50e1cebbe4cff33b54297e6a17a SHA512 5fcc5d372998db2b8aef32661ff71290791c20c1195a6210ca79c0fda12008906e665f9dc878d3df5a38a95e23ff05b910daa861002c17a1b6de71ef0520bee1 DIST mysql-extras-20200317-0103Z.tar.bz2 344905 BLAKE2B c4c8bb2acea16663ab32cf291d0a2d52af04448a507ad3a6dc22dfdef4d6ba427582d66e5923d05cd51565286f85c8df5ccabef9a67a4a500574d21e1f708f27 SHA512 d1d34817faf0a1271f906213eea9081c204d745b14f96166f17d5c60a29ec58c05926e7216f135b6e9d5df2ceab373f10fc4e6a652514d99ba34a336571dce1f -EBUILD mysql-5.6.44-r1.ebuild 27086 BLAKE2B a6f986c588ed2735a07368064795c877bddb9d9acf1fb13d6f28df0b935423cb33534b2f0dd3d5ef9acae16f2ba739b64fe35400159c3c53db0416c71264b285 SHA512 dce67ba1174c0eb8594450073110674e1905184389d40a0b83d3982b455f6914217d86c39f507a7bd31001f50276f1ae77a67952c64182f1b2bd8f0482061332 EBUILD mysql-5.6.45-r2.ebuild 27033 BLAKE2B d1d7621c9b9535776e8acafa7a0a13923bfa19b28923a376769cb83f4d824913d192482efc8358549974ad454a036e480b695e584d45c90614ef82cb2682a3c0 SHA512 ba2d27d934f207fa9073946d650d0a709b491141f98410342d9491002cde51866126125b41356d86ba8387474f1a9c28ee6eff8d156e56828d3f67bbf10d6dd8 -EBUILD mysql-5.7.26-r1.ebuild 31661 BLAKE2B 863288a1f2b1578686980c9008892e12fe87a7ea1b773653106bccffd57e119302fe7567163dd8411640784b3c5bc8ed81008e151e0ba4c0b2ea5fa6de2c9096 SHA512 b92cb1cc37634c1311aead861f50c00e4083335fa1eb5c0d0285b469debcfc427ff299cb9ef9d932ea14e4f77939ea23a2313cb4babaacbf656eaf5841f46ecd EBUILD mysql-5.7.27-r1.ebuild 31684 BLAKE2B 9ff6937c77124bc8b6a01f6b56f23941599a517b1d89519045ede1c67312c78e594ece5ad0a0ce3fa2b93594dc6eaf811a85867e1c6a29c4e931f6b1c7000429 SHA512 725c6023e23d8341cc474b29c5929d920795abaa2d7d0af995eacbd4d7f8fef20bf054226f3756960e1be7f45c87242f331aa70add9af3cd43501b7dc9189148 -EBUILD mysql-5.7.29.ebuild 31555 BLAKE2B 9efa82e1aabf81d129dd79ded88f964f305c57f4fd15bdeb088455b051411a8479b498ac9962313dd0fdb0c2a2e45d84a4514b5bc3e53df7bdf98a4e2ff8d82f SHA512 9bb299bab54abb7667402530ef11c1290394c92337377c39583c1e1693c49fc138db1063006029eb5088d8ae4b553e3e79d434ad6d3c716433b1aee23aab6fbd +EBUILD mysql-5.7.29.ebuild 31420 BLAKE2B 7afa9f1af981304087cd0c1d6fbddf3031b1b0b9493e528acbc6befbf32432934a4920d6345a4ff18d3ea7973da0233d278f104295c75d232be3353960eb3922 SHA512 80a092af7eb3633973edf413ab07de355bc928648b7f42e89fc432e4143d3afcd34aec83f64329587ff4988a8d301006f43a32b1e3a2096c397e97be92b838e1 +EBUILD mysql-5.7.30.ebuild 30435 BLAKE2B facf1f861724cd3f97ffdf2a12d1338f05bad119d44014d39d76b659b4d113374175f0f9370f44e04e1cfa766ac765b0f059010c3cb74b08f9130e2bef5698a1 SHA512 1341a41fb5018c95e80f3d748c590a7159ab2bc1ab3896b1c9661b6c2598a665283170df3d584268647aa776ad0d4f810d74850bc99e37ed98c6d48d93050c9e EBUILD mysql-8.0.19-r1.ebuild 36962 BLAKE2B e7f3d084bbc61e6ef205c136016d3ac46c5f82925a964eb04e4f2b1ea3c1748a86d40a02602a3ab5b49428ff213e98a28fac415987ce51d9329e4f984c820b03 SHA512 7c3628de6bf1fae99d6593e73b52203fba1d4482048c076d798755cb1c66197d5d0c921539252cc10fc733925b2c8dbd349039a5b1b295b4ebbf1147bcc1c360 +EBUILD mysql-8.0.20.ebuild 36231 BLAKE2B 2dbaecd485842582e4d680815d92b90666fea0193e33de1c7d55c278f009cc1d5dd13715ccc65a7052ff9fced379b55e6c4033cbb3663f48ff4c16c0ddb1f1c9 SHA512 c2d30efd25f86a11f7df8723293e639cd5673e9c3f0d974facacedf4bd09d0b9b3b3c92c7fc3791c2631559a9efdff265b23391e9a12d0e0671ad4495d1daeac MISC metadata.xml 1470 BLAKE2B 09754bc9a1cf5584588c4f69700919fd72a860175ae1c045ce90a644a1360d5abccedd5b2649e16fcd189e82df659ceb96fd71ab2aeccdac6256af4f80e46a0d SHA512 d96f6a133611f50b80116221e2586eff899210255efac58d9f6ef7ccd0ee0854a3322b4d4d1db15b3b2e410525f5d73e43f52a833f3ce358f6708b88b3cf00c7 diff --git a/dev-db/mysql/mysql-5.6.44-r1.ebuild b/dev-db/mysql/mysql-5.6.44-r1.ebuild deleted file mode 100644 index dd4f1b213a78..000000000000 --- a/dev-db/mysql/mysql-5.6.44-r1.ebuild +++ /dev/null @@ -1,837 +0,0 @@ -# Copyright 1999-2020 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI="6" -MY_EXTRAS_VER="20190817-0024Z" - -CMAKE_MAKEFILE_GENERATOR=emake - -# Keeping eutils in EAPI=6 for emktemp in pkg_config - -inherit eutils flag-o-matic prefix toolchain-funcs \ - user cmake-utils multilib-build - -SRC_URI="http://cdn.mysql.com/Downloads/MySQL-5.6/${P}.tar.gz - https://cdn.mysql.com/archives/mysql-5.6/${P}.tar.gz - http://downloads.mysql.com/archives/MySQL-5.6/${P}.tar.gz" - -# Gentoo patches to MySQL -if [[ "${MY_EXTRAS_VER}" != "live" && "${MY_EXTRAS_VER}" != "none" ]]; then - SRC_URI="${SRC_URI} - mirror://gentoo/mysql-extras-${MY_EXTRAS_VER}.tar.bz2 - https://gitweb.gentoo.org/proj/mysql-extras.git/snapshot/mysql-extras-${MY_EXTRAS_VER}.tar.bz2 - https://dev.gentoo.org/~grknight/distfiles/mysql-extras-${MY_EXTRAS_VER}.tar.bz2 - https://dev.gentoo.org/~robbat2/distfiles/mysql-extras-${MY_EXTRAS_VER}.tar.bz2 - https://dev.gentoo.org/~jmbsvicetto/distfiles/mysql-extras-${MY_EXTRAS_VER}.tar.bz2" -fi - -HOMEPAGE="https://www.mysql.com/" -DESCRIPTION="A fast, multi-threaded, multi-user SQL database server" -LICENSE="GPL-2" -SLOT="0/18" -IUSE="client-libs cracklib debug jemalloc latin1 libressl numa +perl profiling selinux - +server static static-libs systemtap tcmalloc test yassl" - -# Tests always fail when libressl is enabled due to hard-coded ciphers in the tests -RESTRICT="!test? ( test ) libressl? ( test )" - -REQUIRED_USE="?? ( tcmalloc jemalloc ) static? ( yassl )" - -KEYWORDS="amd64 arm ~hppa ~ia64 ~mips ppc ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-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 -S="${WORKDIR}/mysql" - -if [[ "${MY_EXTRAS_VER}" == "live" ]] ; then - inherit git-r3 - EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/mysql-extras.git" - EGIT_CHECKOUT_DIR="${WORKDIR}/mysql-extras" - EGIT_CLONE_TYPE=shallow - MY_PATCH_DIR="${WORKDIR}/mysql-extras" -else - MY_PATCH_DIR="${WORKDIR}/mysql-extras-${MY_EXTRAS_VER}" -fi - -PATCHES=( - "${MY_PATCH_DIR}"/01050_all_mysql_config_cleanup-5.6.patch - "${MY_PATCH_DIR}"/02040_all_embedded-library-shared-5.5.10.patch - "${MY_PATCH_DIR}"/20006_all_cmake_elib-mysql-5.6.35.patch - "${MY_PATCH_DIR}"/20007_all_cmake-debug-werror-5.6.22.patch - "${MY_PATCH_DIR}"/20008_all_mysql-tzinfo-symlink-5.6.37.patch - "${MY_PATCH_DIR}"/20009_all_mysql_myodbc_symbol_fix-5.6.patch - "${MY_PATCH_DIR}"/20018_all_mysql-5.6.25-without-clientlibs-tools.patch - "${MY_PATCH_DIR}"/20027_all_mysql-5.5-perl5.26-includes.patch - "${MY_PATCH_DIR}"/20028_all_mysql-5.6-gcc7.patch - "${MY_PATCH_DIR}"/20031_all_mysql-5.6-fix-monitor.test.patch - "${MY_PATCH_DIR}"/20036_all_mysql-5.6-fix-rpl_semi_sync_shutdown_hang.test.patch - "${MY_PATCH_DIR}"/20018_all_mysql-5.6.44-fix-libressl-support.patch - "${MY_PATCH_DIR}"/20018_all_mysql-5.6.44-add-openssl-1.1-support.patch -) - -# Be warned, *DEPEND are version-dependant -# These are used for both runtime and compiletime -COMMON_DEPEND=" - kernel_linux? ( - sys-process/procps:0= - dev-libs/libaio:0= - ) - net-misc/curl - >=sys-apps/sed-4 - >=sys-apps/texinfo-4.7-r1 - jemalloc? ( dev-libs/jemalloc:0= ) - tcmalloc? ( dev-util/google-perftools:0= ) - systemtap? ( >=dev-util/systemtap-1.3:0= ) - !yassl? ( - !libressl? ( >=dev-libs/openssl-1.0.0:0= ) - libressl? ( =dev-libs/libressl-2.6.5*:0= ) - ) - >=sys-libs/zlib-1.2.3:0= - sys-libs/ncurses:0= - server? ( - numa? ( sys-process/numactl ) - ) - !client-libs? ( dev-db/mysql-connector-c[${MULTILIB_USEDEP},static-libs?] ) -" -DEPEND="virtual/yacc - static? ( sys-libs/ncurses[static-libs] ) - test? ( dev-perl/JSON ) - || ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 ) - ${COMMON_DEPEND}" -RDEPEND="selinux? ( sec-policy/selinux-mysql ) - client-libs? ( !dev-db/mariadb-connector-c[mysqlcompat] !dev-db/mysql-connector-c ) - !dev-db/mariadb !dev-db/mariadb-galera !dev-db/percona-server !dev-db/mysql-cluster - server? ( !prefix? ( dev-db/mysql-init-scripts ) ) - ${COMMON_DEPEND} -" -# For other stuff to bring us in -# dev-perl/DBD-mysql is needed by some scripts installed by MySQL -PDEPEND="perl? ( >=dev-perl/DBD-mysql-2.9004 )" - -pkg_setup() { - if [[ ${MERGE_TYPE} != binary ]] ; then - local GCC_MAJOR_SET=$(gcc-major-version) - local GCC_MINOR_SET=$(gcc-minor-version) - # Bug 565584. InnoDB now requires atomic functions introduced with gcc-4.7 on - # non x86{,_64} arches - if ! use amd64 && ! use x86 && [[ ${GCC_MAJOR_SET} -lt 4 || \ - ${GCC_MAJOR_SET} -eq 4 && ${GCC_MINOR_SET} -lt 7 ]] ; then - eerror "${PN} needs to be built with gcc-4.7 or later." - eerror "Please use gcc-config to switch to gcc-4.7 or later version." - die - fi - fi - if has test ${FEATURES} && \ - use server && ! has userpriv ${FEATURES} ; then - eerror "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root." - fi - - # This should come after all of the die statements - enewgroup mysql 60 || die "problem adding 'mysql' group" - enewuser mysql 60 -1 /dev/null mysql || die "problem adding 'mysql' user" -} - -pkg_preinst() { - # Here we need to see if the implementation switched client libraries - # We check if this is a new instance of the package and a client library already exists - local SHOW_ABI_MESSAGE libpath - if use client-libs && [[ -z ${REPLACING_VERSIONS} && -e "${EROOT%/}/usr/$(get_libdir)/libmysqlclient.so" ]] ; then - libpath=$(readlink "${EROOT%/}/usr/$(get_libdir)/libmysqlclient.so") - elog "Due to ABI changes when switching between different client libraries," - elog "revdep-rebuild must find and rebuild all packages linking to libmysqlclient." - elog "Please run: revdep-rebuild --library ${libpath}" - ewarn "Failure to run revdep-rebuild may cause issues with other programs or libraries" - fi -} - -pkg_postinst() { - # Make sure the vars are correctly initialized - mysql_init_vars - - # Create log directory securely if it does not exist - [[ -d "${ROOT}${MY_LOGDIR}" ]] || install -d -m0750 -o mysql -g mysql "${ROOT}${MY_LOGDIR}" - - if use server ; then - if [[ -z "${REPLACING_VERSIONS}" ]] ; then - einfo - elog "You might want to run:" - elog "\"emerge --config =${CATEGORY}/${PF}\"" - elog "if this is a new install." - elog - elog "If you are switching server implentations, you should run the" - elog "mysql_upgrade tool." - einfo - else - einfo - elog "If you are upgrading major versions, you should run the" - elog "mysql_upgrade tool." - einfo - fi - fi -} - -src_unpack() { - unpack ${A} - # Grab the patches - [[ "${MY_EXTRAS_VER}" == "live" ]] && S="${WORKDIR}/mysql-extras" git-r3_src_unpack - - mv -f "${WORKDIR}/${P}" "${S}" || die -} - -src_prepare() { - _disable_engine() { - echo > "${S%/}/storage/${1}/CMakeLists.txt" || die - } - - _disable_plugin() { - echo > "${S%/}/plugin/${1}/CMakeLists.txt" || die - } - - if use jemalloc ; then - echo "TARGET_LINK_LIBRARIES(mysqld jemalloc)" >> "${S}/sql/CMakeLists.txt" || die - fi - if use tcmalloc; then - echo "TARGET_LINK_LIBRARIES(mysqld tcmalloc)" >> "${S}/sql/CMakeLists.txt" || die - fi - # Remove the centos and rhel selinux policies to support mysqld_safe under SELinux - if [[ -d "${S}/support-files/SELinux" ]] ; then - echo > "${S}/support-files/SELinux/CMakeLists.txt" || die - fi - - if use libressl ; then - sed -i 's/OPENSSL_MAJOR_VERSION STREQUAL "1"/OPENSSL_MAJOR_VERSION STREQUAL "2"/' \ - "${S}/cmake/ssl.cmake" || die - fi - - sed -i 's~ADD_SUBDIRECTORY(storage/ndb)~~' CMakeLists.txt || die - - local plugin - local server_plugins=( semisync ) - local test_plugins=( audit_null daemon_example fulltext ) - if ! use server; then # These plugins are for the server - for plugin in "${server_plugins[@]}" ; do - _disable_plugin "${plugin}" - done - fi - - if ! use test; then # These plugins are only used during testing - for plugin in "${test_plugins[@]}" ; do - _disable_plugin "${plugin}" - done - fi - - # Don't build example - _disable_engine example - _disable_engine ndb - _disable_plugin innodb_memcached - - cmake-utils_src_prepare -} - -src_configure() { - # bug 508724 mariadb cannot use ld.gold - tc-ld-disable-gold - # Bug #114895, bug #110149 - filter-flags "-O" "-O[01]" - - append-cxxflags -felide-constructors - - # bug #283926, with GCC4.4, this is required to get correct behavior. - append-flags -fno-strict-aliasing - - CMAKE_BUILD_TYPE="RelWithDebInfo" - - # debug hack wrt #497532 - mycmakeargs=( - -DCMAKE_C_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')" - -DCMAKE_CXX_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')" - -DMYSQL_DATADIR="${EPREFIX}/var/lib/mysql" - -DSYSCONFDIR="${EPREFIX}/etc/mysql" - -DINSTALL_BINDIR=bin - -DINSTALL_DOCDIR=share/doc/${PF} - -DINSTALL_DOCREADMEDIR=share/doc/${PF} - -DINSTALL_INCLUDEDIR=include/mysql - -DINSTALL_INFODIR=share/info - -DINSTALL_LIBDIR=$(get_libdir) - -DINSTALL_MANDIR=share/man - -DINSTALL_MYSQLSHAREDIR=share/mysql - -DINSTALL_PLUGINDIR=$(get_libdir)/mysql/plugin - -DINSTALL_SCRIPTDIR=share/mysql/scripts - -DINSTALL_MYSQLDATADIR="${EPREFIX}/var/lib/mysql" - -DINSTALL_SBINDIR=sbin - -DINSTALL_SUPPORTFILESDIR="${EPREFIX}/usr/share/mysql" - -DCOMPILATION_COMMENT="Gentoo Linux ${PF}" - -DWITH_UNIT_TESTS=$(usex test ON OFF) - ### TODO: make this system but issues with UTF-8 prevent it - -DWITH_EDITLINE=bundled - -DWITH_ZLIB=system - -DWITH_LIBWRAP=0 - -DENABLED_LOCAL_INFILE=1 - -DMYSQL_UNIX_ADDR="${EPREFIX}/var/run/mysqld/mysqld.sock" - -DWITH_DEFAULT_COMPILER_OPTIONS=0 - -DWITH_DEFAULT_FEATURE_SET=0 - # The build forces this to be defined when cross-compiling. We pass it - # all the time for simplicity and to make sure it is actually correct. - -DSTACK_DIRECTION=$(tc-stack-grows-down && echo -1 || echo 1) - -DWITH_LIBEVENT=NO - -DWITHOUT_CLIENTLIBS=YES - -DENABLE_DTRACE=$(usex systemtap) - -DWITH_SSL=$(usex yassl bundled system) - -DINSTALL_MYSQLTESTDIR=$(usex test 'share/mysql/mysql-test' '') - -DWITHOUT_VALIDATE_PASSWORD=1 - ) - - if use server ; then - - if [[ ( -n ${MYSQL_DEFAULT_CHARSET} ) && ( -n ${MYSQL_DEFAULT_COLLATION} ) ]]; then - ewarn "You are using a custom charset of ${MYSQL_DEFAULT_CHARSET}" - ewarn "and a collation of ${MYSQL_DEFAULT_COLLATION}." - ewarn "You MUST file bugs without these variables set." - - mycmakeargs+=( - -DDEFAULT_CHARSET=${MYSQL_DEFAULT_CHARSET} - -DDEFAULT_COLLATION=${MYSQL_DEFAULT_COLLATION} - ) - - elif ! use latin1 ; then - mycmakeargs+=( - -DDEFAULT_CHARSET=utf8 - -DDEFAULT_COLLATION=utf8_general_ci - ) - else - mycmakeargs+=( - -DDEFAULT_CHARSET=latin1 - -DDEFAULT_COLLATION=latin1_swedish_ci - ) - fi - mycmakeargs+=( - -DWITH_NUMA=$(usex numa ON OFF) - -DEXTRA_CHARSETS=all - -DDISABLE_SHARED=$(usex static YES NO) - -DWITH_DEBUG=$(usex debug) - -DWITH_EMBEDDED_SERVER=OFF - ) - - if use profiling ; then - # Setting to OFF doesn't work: Once set, profiling options will be added - # to `mysqld --help` output via sql/sys_vars.cc causing - # "main.mysqld--help-notwin" test to fail - mycmakeargs+=( -DENABLED_PROFILING=ON ) - fi - - if use static; then - mycmakeargs+=( -DWITH_PIC=1 ) - fi - - # Storage engines - mycmakeargs+=( - -DWITH_ARCHIVE_STORAGE_ENGINE=1 - -DWITH_BLACKHOLE_STORAGE_ENGINE=1 - -DWITH_CSV_STORAGE_ENGINE=1 - -DWITH_HEAP_STORAGE_ENGINE=1 - -DWITH_INNOBASE_STORAGE_ENGINE=1 - -DWITH_MYISAMMRG_STORAGE_ENGINE=1 - -DWITH_MYISAM_STORAGE_ENGINE=1 - -DWITH_PARTITION_STORAGE_ENGINE=1 - -DWITH_INNODB_MEMCACHED=0 - ) - - else - mycmakeargs+=( - -DWITHOUT_SERVER=1 - -DWITH_EMBEDDED_SERVER=OFF - -DEXTRA_CHARSETS=none - ) - fi - - cmake-utils_src_configure -} - -src_compile() { - cmake-utils_src_compile -} - -src_install() { - cmake-utils_src_install - - # Kill old libmysqclient_r symlinks if they exist. Time to fix what depends on them. - find "${D}" -name 'libmysqlclient_r.*' -type l -delete || die - # Make sure the vars are correctly initialized - mysql_init_vars - - # Convenience links - einfo "Making Convenience links for mysqlcheck multi-call binary" - dosym "mysqlcheck" "/usr/bin/mysqlanalyze" - dosym "mysqlcheck" "/usr/bin/mysqlrepair" - dosym "mysqlcheck" "/usr/bin/mysqloptimize" - - # INSTALL_LAYOUT=STANDALONE causes cmake to create a /usr/data dir - if [[ -d "${ED}/usr/data" ]] ; then - rm -Rf "${ED}/usr/data" || die - fi - - if [[ -d "${ED%/}/usr/sql-bench" ]] ; then - mv "${ED%/}/usr/sql-bench" "${ED%/}/usr/share/mysql/" || die - fi - - # Unless they explicitly specific USE=test, then do not install the - # testsuite. It DOES have a use to be installed, esp. when you want to do a - # validation of your database configuration after tuning it. - if ! use test ; then - rm -rf "${D}/${MY_SHAREDSTATEDIR}/mysql-test" - fi - - # Configuration stuff - einfo "Building default configuration ..." - insinto "${MY_SYSCONFDIR#${EPREFIX}}" - [[ -f "${S%/}/scripts/mysqlaccess.conf" ]] && doins "${S%/}"/scripts/mysqlaccess.conf - local mycnf_src="my.cnf-5.6" - sed -e "s!@DATADIR@!${MY_DATADIR}!g" \ - "${FILESDIR%/}/${mycnf_src}" \ - > "${TMPDIR%/}/my.cnf.ok" || die - use prefix && sed -i -r -e '/^user[[:space:]]*=[[:space:]]*mysql$/d' "${TMPDIR%/}/my.cnf.ok" - if use latin1 ; then - sed -i \ - -e "/character-set/s|utf8|latin1|g" \ - "${TMPDIR%/}/my.cnf.ok" || die - fi - eprefixify "${TMPDIR%/}/my.cnf.ok" - newins "${TMPDIR}/my.cnf.ok" my.cnf - - if use server ; then - einfo "Including support files and sample configurations" - docinto "support-files" - local script - for script in \ - "${S}"/support-files/magic - do - [[ -f "$script" ]] && dodoc "${script}" - done - - docinto "scripts" - for script in "${S}"/scripts/mysql* ; do - [[ ( -f "$script" ) && ( "${script%.sh}" == "${script}" ) ]] && dodoc "${script}" - done - fi - - #Remove mytop if perl is not selected - [[ -e "${ED}/usr/bin/mytop" ]] && ! use perl && rm -f "${ED}/usr/bin/mytop" -} - -# Official test instructions: -# USE='perl server static-libs' \ -# FEATURES='test userpriv -usersandbox' \ -# ebuild mysql-X.X.XX.ebuild \ -# digest clean package -src_test() { - - _disable_test() { - local rawtestname reason - rawtestname="${1}" ; shift - reason="${@}" - ewarn "test '${rawtestname}' disabled: '${reason}'" - echo ${rawtestname} : ${reason} >> "${T}/disabled.def" - } - - local TESTDIR="${BUILD_DIR}/mysql-test" - local retstatus_unit - local retstatus_tests - - if ! use server ; then - einfo "Skipping server tests due to minimal build." - return 0 - 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 [[ $UID -eq 0 ]]; then - die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root." - fi - has usersandbox $FEATURES && ewarn "Some tests may fail with FEATURES=usersandbox" - - einfo ">>> Test phase [test]: ${CATEGORY}/${PF}" - - # Run CTest (test-units) - cmake-utils_src_test - retstatus_unit=$? - - # Ensure that parallel runs don't die - export MTR_BUILD_THREAD="$((${RANDOM} % 100))" - # Enable parallel testing, auto will try to detect number of cores - # You may set this by hand. - # The default maximum is 8 unless MTR_MAX_PARALLEL is increased - export MTR_PARALLEL="${MTR_PARALLEL:-auto}" - - # create directories because mysqladmin might run out of order - mkdir -p "${T}"/var-tests{,/log} || die - - # Run mysql tests - pushd "${TESTDIR}" > /dev/null || die - - touch "${T}/disabled.def" - # These are failing in MySQL 5.6 for now and are believed to be - # false positives: - # - local t - - for t in auth_sec.keyring_udf federated.federated_plugin ; do - _disable_test "$t" "False positives in Gentoo" - done - - if ! use latin1 ; then - for t in \ - binlog.binlog_mysqlbinlog_filter \ - binlog.binlog_statement_insert_delayed \ - funcs_1.is_columns_mysql \ - funcs_1.is_tables_mysql \ - funcs_1.is_triggers \ - main.information_schema \ - main.mysql_client_test \ - main.mysqld--help-notwin \ - perfschema.binlog_edge_mix \ - perfschema.binlog_edge_stmt \ - ; do - _disable_test "$t" "Requires DEFAULT_CHARSET=latin1 but USE=-latin1 is set" - done - fi - - if has_version '>=dev-libs/openssl-1.1.0' ; then - # Tests are expecting <openssl-1.1 default cipher - for t in \ - main.openssl_1 \ - main.plugin_auth_sha256_tls \ - main.ssl \ - main.ssl_8k_key \ - main.ssl_ca \ - main.ssl_cipher\ - main.ssl_compress \ - main.ssl_crl \ - main.ssl-sha512 \ - ; do - _disable_test "$t" "Requires <dev-libs/openssl-1.1.0" - done - fi - - _disable_test main.gis-precise "Known rounding error with latest AMD processors" - - # run mysql-test tests - perl mysql-test-run.pl --force --vardir="${T}/var-tests" --reorder --skip-test=tokudb --skip-test-list="${T}/disabled.def" - retstatus_tests=$? - - popd > /dev/null || die - - # Cleanup is important for these testcases. - pkill -9 -f "${S}/ndb" 2>/dev/null - pkill -9 -f "${S}/sql" 2>/dev/null - - local failures="" - [[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit" - [[ $retstatus_tests -eq 0 ]] || failures="${failures} tests" - - [[ -z "$failures" ]] || die "Test failures: $failures" - einfo "Tests successfully completed" -} - -mysql_init_vars() { - MY_SHAREDSTATEDIR=${MY_SHAREDSTATEDIR="${EPREFIX}/usr/share/mysql"} - MY_SYSCONFDIR=${MY_SYSCONFDIR="${EPREFIX}/etc/mysql"} - MY_LOCALSTATEDIR=${MY_LOCALSTATEDIR="${EPREFIX}/var/lib/mysql"} - MY_LOGDIR=${MY_LOGDIR="${EPREFIX}/var/log/mysql"} - - if [[ -z "${MY_DATADIR}" ]] ; then - MY_DATADIR="" - if [[ -f "${MY_SYSCONFDIR}/my.cnf" ]] ; then - MY_DATADIR=`"my_print_defaults" mysqld 2>/dev/null \ - | sed -ne '/datadir/s|^--datadir=||p' \ - | tail -n1` - if [[ -z "${MY_DATADIR}" ]] ; then - MY_DATADIR=`grep ^datadir "${MY_SYSCONFDIR}/my.cnf" \ - | sed -e 's/.*=\s*//' \ - | tail -n1` - fi - fi - if [[ -z "${MY_DATADIR}" ]] ; then - MY_DATADIR="${MY_LOCALSTATEDIR}" - einfo "Using default MY_DATADIR" - fi - elog "MySQL MY_DATADIR is ${MY_DATADIR}" - - if [[ -z "${PREVIOUS_DATADIR}" ]] ; then - if [[ -e "${MY_DATADIR}" ]] ; then - # If you get this and you're wondering about it, see bug #207636 - elog "MySQL datadir found in ${MY_DATADIR}" - elog "A new one will not be created." - PREVIOUS_DATADIR="yes" - else - PREVIOUS_DATADIR="no" - fi - export PREVIOUS_DATADIR - fi - else - if [[ ${EBUILD_PHASE} == "config" ]]; then - local new_MY_DATADIR - new_MY_DATADIR=`"my_print_defaults" mysqld 2>/dev/null \ - | sed -ne '/datadir/s|^--datadir=||p' \ - | tail -n1` - - if [[ ( -n "${new_MY_DATADIR}" ) && ( "${new_MY_DATADIR}" != "${MY_DATADIR}" ) ]]; then - ewarn "MySQL MY_DATADIR has changed" - ewarn "from ${MY_DATADIR}" - ewarn "to ${new_MY_DATADIR}" - MY_DATADIR="${new_MY_DATADIR}" - fi - fi - fi - - export MY_SHAREDSTATEDIR MY_SYSCONFDIR - export MY_LOCALSTATEDIR MY_LOGDIR - export MY_DATADIR -} - -pkg_config() { - _getoptval() { - local mypd="${EROOT%/}"/usr/bin/my_print_defaults - local section="$1" - local flag="--${2}=" - local extra_options="${3}" - "${mypd}" $extra_options $section | sed -n "/^${flag}/s,${flag},,gp" - } - local old_MY_DATADIR="${MY_DATADIR}" - local old_HOME="${HOME}" - # my_print_defaults needs to read stuff in $HOME/.my.cnf - export HOME=${EPREFIX}/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" - 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%%/}" - - 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 - 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 - fi - fi - - local pwd1="a" - local pwd2="b" - local maxtry=15 - - if [ -z "${MYSQL_ROOT_PASSWORD}" ]; then - local tmp_mysqld_password_source= - - 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 - ewarn "Ignoring password from '${tmp_mysqld_password_source}' section due to newline character (do you have multiple password options set?)!" - MYSQL_ROOT_PASSWORD= - continue - fi - - einfo "Found password in '${tmp_mysqld_password_source}' section!" - break - fi - done - - # Sometimes --show is required to display passwords in some implementations of my_print_defaults - 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)" - # These are dir+prefix - MYSQL_RELAY_LOG="$(_getoptval mysqld relay-log)" - MYSQL_RELAY_LOG=${MYSQL_RELAY_LOG%/*} - MYSQL_LOG_BIN="$(_getoptval mysqld log-bin)" - MYSQL_LOG_BIN=${MYSQL_LOG_BIN%/*} - - if [[ ! -d "${EROOT%/}/$MYSQL_TMPDIR" ]]; then - einfo "Creating MySQL tmpdir $MYSQL_TMPDIR" - install -d -m 770 -o mysql -g mysql "${EROOT%/}/$MYSQL_TMPDIR" - fi - if [[ ! -d "${EROOT%/}/$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' user now" - einfo "or through the ${HOME}/.my.cnf file." - ewarn "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" - fi - MYSQL_ROOT_PASSWORD="${pwd1}" - unset pwd1 pwd2 - fi - - local options - local sqltmp="$(emktemp)" - - # Fix bug 446200. Don't reference host my.cnf, needs to come first, - # see http://bugs.mysql.com/bug.php?id=31312 - use prefix && options="${options} '--defaults-file=${MY_SYSCONFDIR}/my.cnf'" - - local help_tables="${EROOT%/}${MY_SHAREDSTATEDIR}/fill_help_tables.sql" - [[ -r "${help_tables}" ]] \ - && cp "${help_tables}" "${TMPDIR}/fill_help_tables.sql" \ - || touch "${TMPDIR}/fill_help_tables.sql" - help_tables="${TMPDIR}/fill_help_tables.sql" - - # 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 host-cache name-resolve networking slave-start \ - federated ssl log-bin relay-log slow-query-log external-locking \ - log-slave-updates \ - ; do - optexp="--(skip-)?${opt}" optfull="--loose-skip-${opt}" - egrep -sq -- "${optexp}" "${helpfile}" && options="${options} ${optfull}" - done - - einfo "Creating the mysql database and setting proper permissions on it ..." - - # 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" - fi - - if [[ ! -d "${MY_DATADIR}" ]]; then - install -d -m 750 -o mysql -g mysql "${MY_DATADIR}" || die "Could not create data directory" - fi - - pushd "${TMPDIR}" &>/dev/null || die - - # Filling timezones, see - # http://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 - chown mysql "${sqltmp}" || die - - local cmd=( "${EROOT%/}/usr/share/mysql/scripts/mysql_install_db" ) - [[ -f "${cmd}" ]] || cmd=( "${EROOT%/}/usr/bin/mysql_install_db" ) - if [[ -r "${help_tables}" ]] ; then - cat "${help_tables}" >> "${sqltmp}" - fi - 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" - 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} \ - $(use prefix || echo --user=mysql) \ - --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 - maxtry=$((${maxtry}-1)) - echo -n "." - sleep 1 - done - eend $rc - - if ! [[ -S "${socket}" ]]; then - die "Completely failed to start up mysqld with: ${mysqld}" - fi - - 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" \ - --no-defaults \ - "--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" -} diff --git a/dev-db/mysql/mysql-5.7.29.ebuild b/dev-db/mysql/mysql-5.7.29.ebuild index dceca6a058f4..1bab98a18ca1 100644 --- a/dev-db/mysql/mysql-5.7.29.ebuild +++ b/dev-db/mysql/mysql-5.7.29.ebuild @@ -27,12 +27,12 @@ DESCRIPTION="A fast, multi-threaded, multi-user SQL database server" LICENSE="GPL-2" SLOT="0/18" IUSE="cjk client-libs cracklib debug experimental jemalloc latin1 libressl numa +perl profiling - selinux +server static static-libs systemtap tcmalloc test yassl" + selinux +server static static-libs systemtap tcmalloc test" # Tests always fail when libressl is enabled due to hard-coded ciphers in the tests RESTRICT="!test? ( test ) libressl? ( test )" -REQUIRED_USE="?? ( tcmalloc jemalloc ) static? ( yassl )" +REQUIRED_USE="?? ( tcmalloc jemalloc )" KEYWORDS="amd64 arm ~arm64 ~hppa ~ia64 ~mips ~ppc ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris" @@ -90,15 +90,13 @@ COMMON_DEPEND="net-misc/curl:= ) systemtap? ( >=dev-util/systemtap-1.3:0= ) tcmalloc? ( dev-util/google-perftools:0= ) - !yassl? ( - client-libs? ( - !libressl? ( >=dev-libs/openssl-1.0.0:0=[${MULTILIB_USEDEP},static-libs?] ) - libressl? ( dev-libs/libressl:0=[${MULTILIB_USEDEP},static-libs?] ) - ) - !client-libs? ( - !libressl? ( >=dev-libs/openssl-1.0.0:0= ) - libressl? ( dev-libs/libressl:0= ) - ) + client-libs? ( + !libressl? ( >=dev-libs/openssl-1.0.0:0=[${MULTILIB_USEDEP},static-libs?] ) + libressl? ( dev-libs/libressl:0=[${MULTILIB_USEDEP},static-libs?] ) + ) + !client-libs? ( + !libressl? ( >=dev-libs/openssl-1.0.0:0= ) + libressl? ( dev-libs/libressl:0= ) ) " DEPEND="${COMMON_DEPEND} @@ -362,6 +360,7 @@ multilib_src_configure() { ### TODO: make this system but issues with UTF-8 prevent it -DWITH_EDITLINE=bundled -DWITH_ZLIB=system + -DWITH_SSL=system -DWITH_LIBWRAP=0 -DENABLED_LOCAL_INFILE=1 -DMYSQL_UNIX_ADDR="${EPREFIX}/var/run/mysqld/mysqld.sock" @@ -379,12 +378,6 @@ multilib_src_configure() { mycmakeargs+=( -DINSTALL_MYSQLTESTDIR='' ) fi - if ! use yassl ; then - mycmakeargs+=( -DWITH_SSL=system ) - else - mycmakeargs+=( -DWITH_SSL=bundled ) - fi - if ! use client-libs ; then mycmakeargs+=( -DWITHOUT_CLIENTLIBS=YES ) fi diff --git a/dev-db/mysql/mysql-5.7.26-r1.ebuild b/dev-db/mysql/mysql-5.7.30.ebuild index bdb8fac53962..fab0a6937cb6 100644 --- a/dev-db/mysql/mysql-5.7.26-r1.ebuild +++ b/dev-db/mysql/mysql-5.7.30.ebuild @@ -2,67 +2,40 @@ # Distributed under the terms of the GNU General Public License v2 EAPI="6" -MY_EXTRAS_VER="20190822-1908Z" CMAKE_MAKEFILE_GENERATOR=emake # Keeping eutils in EAPI=6 for emktemp in pkg_config inherit cmake-utils eutils flag-o-matic linux-info \ - prefix toolchain-funcs user multilib-minimal + prefix toolchain-funcs multilib-minimal + +# Patch version +PATCH_SET="https://dev.gentoo.org/~whissi/dist/mysql/${PN}-5.7.30-patches-01.tar.xz" SRC_URI="https://cdn.mysql.com/Downloads/MySQL-5.7/${PN}-boost-${PV}.tar.gz https://cdn.mysql.com/archives/mysql-5.7/mysql-boost-${PV}.tar.gz - http://downloads.mysql.com/archives/MySQL-5.7/${PN}-boost-${PV}.tar.gz" - -# Gentoo patches to MySQL -if [[ "${MY_EXTRAS_VER}" != "live" && "${MY_EXTRAS_VER}" != "none" ]] ; then - SRC_URI="${SRC_URI} - mirror://gentoo/mysql-extras-${MY_EXTRAS_VER}.tar.bz2 - https://gitweb.gentoo.org/proj/mysql-extras.git/snapshot/mysql-extras-${MY_EXTRAS_VER}.tar.bz2" -fi + http://downloads.mysql.com/archives/MySQL-5.7/${PN}-boost-${PV}.tar.gz + ${PATCH_SET}" HOMEPAGE="https://www.mysql.com/" DESCRIPTION="A fast, multi-threaded, multi-user SQL database server" LICENSE="GPL-2" SLOT="0/18" IUSE="cjk client-libs cracklib debug experimental jemalloc latin1 libressl numa +perl profiling - selinux +server static static-libs systemtap tcmalloc test yassl" + selinux +server static static-libs systemtap tcmalloc test" # Tests always fail when libressl is enabled due to hard-coded ciphers in the tests RESTRICT="!test? ( test ) libressl? ( test )" -REQUIRED_USE="?? ( tcmalloc jemalloc ) static? ( yassl )" +REQUIRED_USE="?? ( tcmalloc jemalloc )" -KEYWORDS="amd64 arm arm64 ~hppa ~ia64 ~mips ppc ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris" +KEYWORDS="amd64 arm arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-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 S="${WORKDIR}/mysql" -if [[ "${MY_EXTRAS_VER}" == "live" ]] ; then - inherit git-r3 - EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/mysql-extras.git" - EGIT_CHECKOUT_DIR="${WORKDIR}/mysql-extras" - EGIT_CLONE_TYPE=shallow - MY_PATCH_DIR="${WORKDIR}/mysql-extras" -else - MY_PATCH_DIR="${WORKDIR}/mysql-extras-${MY_EXTRAS_VER}" -fi - -PATCHES=( - "${MY_PATCH_DIR}"/20001_all_fix-minimal-build-cmake-mysql-5.7.23.patch - "${MY_PATCH_DIR}"/20007_all_cmake-debug-werror-5.7.patch - "${MY_PATCH_DIR}"/20009_all_mysql_myodbc_symbol_fix-5.7.10.patch - "${MY_PATCH_DIR}"/20018_all_mysql-5.7.26-without-clientlibs-tools.patch - "${MY_PATCH_DIR}"/20018_all_mysql-5.7.25-fix-libressl-support.patch - "${MY_PATCH_DIR}"/20018_all_mysql-5.7.23-add-missing-gcc-8-fix.patch - "${MY_PATCH_DIR}"/20018_all_mysql-5.7.23-fix-grant_user_lock-a-root.patch - "${MY_PATCH_DIR}"/20018_all_mysql-5.7.23-round-off-test-values-for-same-output-on-all-architectures.patch - "${MY_PATCH_DIR}"/20018_all_mysql-5.7.23-fix-mips-ASM.patch - "${MY_PATCH_DIR}"/20018_all_mysql-5.7.25-fix-build-without-server.patch -) - # Be warned, *DEPEND are version-dependant # These are used for both runtime and compiletime # MULTILIB_USEDEP only set for libraries used by the client library @@ -92,15 +65,13 @@ COMMON_DEPEND="net-misc/curl:= ) systemtap? ( >=dev-util/systemtap-1.3:0= ) tcmalloc? ( dev-util/google-perftools:0= ) - !yassl? ( - client-libs? ( - !libressl? ( >=dev-libs/openssl-1.0.0:0=[${MULTILIB_USEDEP},static-libs?] ) - libressl? ( dev-libs/libressl:0=[${MULTILIB_USEDEP},static-libs?] ) - ) - !client-libs? ( - !libressl? ( >=dev-libs/openssl-1.0.0:0= ) - libressl? ( dev-libs/libressl:0= ) - ) + client-libs? ( + !libressl? ( >=dev-libs/openssl-1.0.0:0=[${MULTILIB_USEDEP},static-libs?] ) + libressl? ( dev-libs/libressl:0=[${MULTILIB_USEDEP},static-libs?] ) + ) + !client-libs? ( + !libressl? ( >=dev-libs/openssl-1.0.0:0= ) + libressl? ( dev-libs/libressl:0= ) ) " DEPEND="${COMMON_DEPEND} @@ -112,13 +83,21 @@ DEPEND="${COMMON_DEPEND} experimental? ( net-libs/rpcsvc-proto ) ) static? ( sys-libs/ncurses[static-libs] ) - test? ( dev-perl/JSON ) + test? ( + acct-group/mysql acct-user/mysql + dev-perl/JSON + ) " RDEPEND="${COMMON_DEPEND} !dev-db/mariadb !dev-db/mariadb-galera !dev-db/percona-server !dev-db/mysql-cluster client-libs? ( !dev-db/mariadb-connector-c[mysqlcompat] !dev-db/mysql-connector-c dev-libs/protobuf:= ) selinux? ( sec-policy/selinux-mysql ) - server? ( !prefix? ( dev-db/mysql-init-scripts ) ) + server? ( + !prefix? ( + acct-group/mysql acct-user/mysql + dev-db/mysql-init-scripts + ) + ) " # For other stuff to bring us in # dev-perl/DBD-mysql is needed by some scripts installed by MySQL @@ -209,10 +188,6 @@ pkg_setup() { use server && ! has userpriv ${FEATURES} ; then eerror "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root." fi - - # This should come after all of the die statements - enewgroup mysql 60 || die "problem adding 'mysql' group" - enewuser mysql 60 -1 /dev/null mysql || die "problem adding 'mysql' user" } pkg_preinst() { @@ -266,13 +241,13 @@ pkg_postinst() { src_unpack() { unpack ${A} - # Grab the patches - [[ "${MY_EXTRAS_VER}" == "live" ]] && S="${WORKDIR}/mysql-extras" git-r3_src_unpack mv -f "${WORKDIR}/${P}" "${S}" || die } src_prepare() { + eapply "${WORKDIR}"/mysql-patches + cmake-utils_src_prepare if use jemalloc ; then @@ -296,6 +271,13 @@ src_prepare() { "${S}"/zlib \ || die + # Don't clash with dev-db/mysql-connector-c + rm \ + man/my_print_defaults.1 \ + man/perror.1 \ + man/zlib_decompress.1 \ + || die + if use libressl ; then sed -i 's/OPENSSL_MAJOR_VERSION STREQUAL "1"/OPENSSL_MAJOR_VERSION STREQUAL "2"/' \ "${S}/cmake/ssl.cmake" || die @@ -353,6 +335,7 @@ multilib_src_configure() { ### TODO: make this system but issues with UTF-8 prevent it -DWITH_EDITLINE=bundled -DWITH_ZLIB=system + -DWITH_SSL=system -DWITH_LIBWRAP=0 -DENABLED_LOCAL_INFILE=1 -DMYSQL_UNIX_ADDR="${EPREFIX}/var/run/mysqld/mysqld.sock" @@ -370,12 +353,6 @@ multilib_src_configure() { mycmakeargs+=( -DINSTALL_MYSQLTESTDIR='' ) fi - if ! use yassl ; then - mycmakeargs+=( -DWITH_SSL=system ) - else - mycmakeargs+=( -DWITH_SSL=bundled ) - fi - if ! use client-libs ; then mycmakeargs+=( -DWITHOUT_CLIENTLIBS=YES ) fi @@ -565,10 +542,16 @@ src_test() { gis.spatial_utility_function_distance_sphere \ gis.spatial_utility_function_simplify \ gis.spatial_analysis_functions_centroid \ + main.with_recursive \ ; do _disable_test "$t" "Known rounding error with latest AMD processors" done + if ! hash zip 1>/dev/null 2>&1 ; then + # no need to force dep app-arch/zip for one test + _disable_test "innodb.partition_upgrade_create" "Requires app-arch/zip" + fi + if use numa && use kernel_linux ; then # bug 584880 if ! linux_config_exists || ! linux_chkconfig_present NUMA ; then diff --git a/dev-db/mysql/mysql-8.0.20.ebuild b/dev-db/mysql/mysql-8.0.20.ebuild new file mode 100644 index 000000000000..7a1ea0b39205 --- /dev/null +++ b/dev-db/mysql/mysql-8.0.20.ebuild @@ -0,0 +1,1114 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI="7" + +CMAKE_MAKEFILE_GENERATOR=emake + +inherit cmake-utils flag-o-matic linux-info \ + multiprocessing prefix toolchain-funcs check-reqs + +MY_PV="${PV//_pre*}" +MY_P="${PN}-${MY_PV}" + +# Patch version +PATCH_SET="https://dev.gentoo.org/~whissi/dist/mysql/${PN}-8.0.20-patches-01.tar.xz" + +SRC_URI="https://cdn.mysql.com/Downloads/MySQL-8.0/mysql-boost-${MY_PV}.tar.gz + https://cdn.mysql.com/archives/mysql-8.0/mysql-boost-${MY_PV}.tar.gz + http://downloads.mysql.com/archives/MySQL-8.0/${PN}-boost-${MY_PV}.tar.gz + ${PATCH_SET}" + +HOMEPAGE="https://www.mysql.com/" +DESCRIPTION="A fast, multi-threaded, multi-user SQL database server" +LICENSE="GPL-2" +SLOT="0" +IUSE="cjk cracklib debug jemalloc latin1 libressl numa +perl profiling + router selinux +server tcmalloc test" + +# Tests always fail when libressl is enabled due to hard-coded ciphers in the tests +RESTRICT="!test? ( test ) libressl? ( test )" + +REQUIRED_USE="?? ( tcmalloc jemalloc ) + cjk? ( server ) + jemalloc? ( server ) + numa? ( server ) + profiling? ( server ) + router? ( server ) + tcmalloc? ( server )" + +KEYWORDS="amd64 arm arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-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 +S="${WORKDIR}/mysql" + +# Be warned, *DEPEND are version-dependant +# These are used for both runtime and compiletime +COMMON_DEPEND=" + >=app-arch/lz4-0_p131:= + sys-libs/ncurses:0= + >=sys-libs/zlib-1.2.3:0= + libressl? ( dev-libs/libressl:0= ) + !libressl? ( >=dev-libs/openssl-1.0.0:0= ) + server? ( + dev-libs/icu:= + dev-libs/libevent:= + >=dev-libs/protobuf-3.8:= + net-libs/libtirpc:= + cjk? ( app-text/mecab:= ) + jemalloc? ( dev-libs/jemalloc:0= ) + kernel_linux? ( + dev-libs/libaio:0= + sys-process/procps:0= + ) + numa? ( sys-process/numactl ) + tcmalloc? ( dev-util/google-perftools:0= ) + ) +" +DEPEND="${COMMON_DEPEND} + || ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 ) + virtual/yacc + server? ( net-libs/rpcsvc-proto ) + test? ( + acct-group/mysql acct-user/mysql + dev-perl/JSON + ) +" +RDEPEND="${COMMON_DEPEND} + !dev-db/mariadb !dev-db/mariadb-galera !dev-db/percona-server !dev-db/mysql-cluster + selinux? ( sec-policy/selinux-mysql ) + !prefix? ( + acct-group/mysql acct-user/mysql + dev-db/mysql-init-scripts + ) +" +# For other stuff to bring us in +# dev-perl/DBD-mysql is needed by some scripts installed by MySQL +PDEPEND="perl? ( >=dev-perl/DBD-mysql-2.9004 )" + +CHECKREQS_DISK_BUILD="8G" + +mysql_init_vars() { + : ${MY_SHAREDSTATEDIR="${EPREFIX}/usr/share/mysql"} + : ${MY_SYSCONFDIR="${EPREFIX}/etc/mysql"} + : ${MY_LOCALSTATEDIR="${EPREFIX}/var/lib/mysql"} + : ${MY_LOGDIR="${EPREFIX}/var/log/mysql"} + MY_DATADIR="${MY_LOCALSTATEDIR}" + + export MY_SHAREDSTATEDIR MY_SYSCONFDIR + export MY_LOCALSTATEDIR MY_LOGDIR + export MY_DATADIR +} + +pkg_pretend() { + [[ ${MERGE_TYPE} == binary ]] && return + use server && check-reqs_pkg_pretend +} + +pkg_setup() { + [[ ${MERGE_TYPE} == binary ]] && return + + if has test ${FEATURES} ; then + # Bug #213475 - MySQL _will_ object strenuously if your machine is named + # localhost. Also causes weird failures. + [[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost" + + if ! has userpriv ${FEATURES} ; then + die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root." + fi + + local aio_max_nr=$(sysctl -n fs.aio-max-nr 2>/dev/null) + [[ -z "${aio_max_nr}" || ${aio_max_nr} -lt 250000 ]] \ + && die "FEATURES=test will require fs.aio-max-nr=250000 at minimum!" + + if use latin1 ; then + # Upstream only supports tests with default charset + die "Testing with USE=latin1 is not supported." + fi + fi + + if use kernel_linux ; then + if use numa ; then + linux-info_get_any_version + + local CONFIG_CHECK="~NUMA" + + local WARNING_NUMA="This package expects NUMA support in kernel which this system does not have at the moment;" + WARNING_NUMA+=" Either expect runtime errors, enable NUMA support in kernel or rebuild the package without NUMA support" + + check_extra_config + fi + fi + + use server && check-reqs_pkg_setup +} + +src_unpack() { + unpack ${A} + + mv -f "${WORKDIR}/${MY_P}" "${S}" || die +} + +src_prepare() { + eapply "${WORKDIR}"/mysql-patches + + eapply_user + + # Avoid rpm call which would trigger sandbox, #692368 + sed -i \ + -e 's/MY_RPM rpm/MY_RPM rpmNOTEXISTENT/' \ + CMakeLists.txt || die + + if use jemalloc ; then + echo "TARGET_LINK_LIBRARIES(mysqld jemalloc)" >> "${S}/sql/CMakeLists.txt" || die + fi + + if use tcmalloc ; then + echo "TARGET_LINK_LIBRARIES(mysqld tcmalloc)" >> "${S}/sql/CMakeLists.txt" || die + fi + + # Remove the centos and rhel selinux policies to support mysqld_safe under SELinux + if [[ -d "${S}/support-files/SELinux" ]] ; then + echo > "${S}/support-files/SELinux/CMakeLists.txt" || die + fi + + # Remove man pages for client-lib tools we don't install + rm \ + man/my_print_defaults.1 \ + man/perror.1 \ + man/zlib_decompress.1 \ + || die + + cmake-utils_src_prepare +} + +src_configure() { + # Bug #114895, bug #110149 + filter-flags "-O" "-O[01]" + + append-cxxflags -felide-constructors + + # bug #283926, with GCC4.4, this is required to get correct behavior. + append-flags -fno-strict-aliasing + + CMAKE_BUILD_TYPE="RelWithDebInfo" + + # debug hack wrt #497532 + mycmakeargs=( + -DCMAKE_C_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')" + -DCMAKE_CXX_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')" + -DMYSQL_DATADIR="${EPREFIX}/var/lib/mysql" + -DSYSCONFDIR="${EPREFIX}/etc/mysql" + -DINSTALL_BINDIR=bin + -DINSTALL_DOCDIR=share/doc/${PF} + -DINSTALL_DOCREADMEDIR=share/doc/${PF} + -DINSTALL_INCLUDEDIR=include/mysql + -DINSTALL_INFODIR=share/info + -DINSTALL_LIBDIR=$(get_libdir) + -DINSTALL_MANDIR=share/man + -DINSTALL_MYSQLSHAREDIR=share/mysql + -DINSTALL_PLUGINDIR=$(get_libdir)/mysql/plugin + -DINSTALL_MYSQLDATADIR="${EPREFIX}/var/lib/mysql" + -DINSTALL_SBINDIR=sbin + -DINSTALL_SUPPORTFILESDIR="${EPREFIX}/usr/share/mysql" + -DCOMPILATION_COMMENT="Gentoo Linux ${PF}" + -DWITH_UNIT_TESTS=$(usex test ON OFF) + # Using bundled editline to get CTRL+C working + -DWITH_EDITLINE=bundled + -DWITH_ZLIB=system + -DWITH_SSL=system + -DWITH_LIBWRAP=0 + -DENABLED_LOCAL_INFILE=1 + -DMYSQL_UNIX_ADDR="${EPREFIX}/var/run/mysqld/mysqld.sock" + -DWITH_DEFAULT_COMPILER_OPTIONS=0 + -DWITH_DEFAULT_FEATURE_SET=0 + # The build forces this to be defined when cross-compiling. We pass it + # all the time for simplicity and to make sure it is actually correct. + -DSTACK_DIRECTION=$(tc-stack-grows-down && echo -1 || echo 1) + -DCMAKE_POSITION_INDEPENDENT_CODE=ON + -DWITH_CURL=system + -DWITH_BOOST="${S}/boost" + -DWITH_ROUTER=$(usex router ON OFF) + ) + + if is-flagq -fno-lto ; then + einfo "LTO disabled via {C,CXX,F,FC}FLAGS" + mycmakeargs+=( -DWITH_LTO=OFF ) + elif is-flagq -flto ; then + einfo "LTO forced via {C,CXX,F,FC}FLAGS" + myconf+=( -DWITH_LTO=ON ) + else + # Disable automagic + myconf+=( -DWITH_LTO=OFF ) + fi + + if use test ; then + mycmakeargs+=( -DINSTALL_MYSQLTESTDIR=share/mysql/mysql-test ) + else + mycmakeargs+=( -DINSTALL_MYSQLTESTDIR='' ) + fi + + mycmakeargs+=( -DWITHOUT_CLIENTLIBS=YES ) + + mycmakeargs+=( + -DWITH_ICU=system + -DWITH_LZ4=system + # Our dev-libs/rapidjson doesn't carry necessary fixes for std::regex + -DWITH_RAPIDJSON=bundled + ) + + if [[ -n "${MYSQL_DEFAULT_CHARSET}" && -n "${MYSQL_DEFAULT_COLLATION}" ]] ; then + ewarn "You are using a custom charset of ${MYSQL_DEFAULT_CHARSET}" + ewarn "and a collation of ${MYSQL_DEFAULT_COLLATION}." + ewarn "You MUST file bugs without these variables set." + ewarn "Tests will probably fail!" + + mycmakeargs+=( + -DDEFAULT_CHARSET=${MYSQL_DEFAULT_CHARSET} + -DDEFAULT_COLLATION=${MYSQL_DEFAULT_COLLATION} + ) + elif use latin1 ; then + mycmakeargs+=( + -DDEFAULT_CHARSET=latin1 + -DDEFAULT_COLLATION=latin1_swedish_ci + ) + else + mycmakeargs+=( + -DDEFAULT_CHARSET=utf8mb4 + -DDEFAULT_COLLATION=utf8mb4_0900_ai_ci + ) + fi + + if use server ; then + mycmakeargs+=( + -DWITH_EXTRA_CHARSETS=all + -DWITH_DEBUG=$(usex debug) + -DWITH_MECAB=$(usex cjk system OFF) + -DWITH_LIBEVENT=system + -DWITH_PROTOBUF=system + -DWITH_NUMA=$(usex numa ON OFF) + ) + + if use profiling ; then + # Setting to OFF doesn't work: Once set, profiling options will be added + # to `mysqld --help` output via sql/sys_vars.cc causing + # "main.mysqld--help-notwin" test to fail + mycmakeargs+=( -DENABLED_PROFILING=ON ) + fi + + # Storage engines + mycmakeargs+=( + -DWITH_EXAMPLE_STORAGE_ENGINE=0 + -DWITH_ARCHIVE_STORAGE_ENGINE=1 + -DWITH_BLACKHOLE_STORAGE_ENGINE=1 + -DWITH_CSV_STORAGE_ENGINE=1 + -DWITH_FEDERATED_STORAGE_ENGINE=1 + -DWITH_HEAP_STORAGE_ENGINE=1 + -DWITH_INNOBASE_STORAGE_ENGINE=1 + -DWITH_INNODB_MEMCACHED=0 + -DWITH_MYISAMMRG_STORAGE_ENGINE=1 + -DWITH_MYISAM_STORAGE_ENGINE=1 + ) + else + mycmakeargs+=( + -DWITHOUT_SERVER=1 + -DWITH_SYSTEMD=no + ) + fi + + cmake-utils_src_configure +} + +# Official test instructions: +# ulimit -n 16500 && \ +# USE='perl server' \ +# FEATURES='test userpriv' \ +# ebuild mysql-X.X.XX.ebuild \ +# digest clean package +src_test() { + _disable_test() { + local rawtestname bug reason + rawtestname="${1}" ; shift + bug="${1}" ; shift + reason="${@}" + ewarn "test '${rawtestname}' disabled: '${reason}' (BUG#${bug})" + echo ${rawtestname} : BUG#${bug} ${reason} >> "${T}/disabled.def" + } + + local TESTDIR="${BUILD_DIR}/mysql-test" + local retstatus_unit + local retstatus_tests + + # Run CTest (test-units) + cmake-utils_src_test + retstatus_unit=$? + + # Ensure that parallel runs don't die + export MTR_BUILD_THREAD="$((${RANDOM} % 100))" + + if [[ -z "${MTR_PARALLEL}" ]] ; then + local -x MTR_PARALLEL=$(makeopts_jobs) + + if [[ ${MTR_PARALLEL} -gt 4 ]] ; then + # Running multiple tests in parallel usually require higher ulimit + # and fs.aio-max-nr setting. In addition, tests like main.multi_update + # are known to hit timeout when system is busy. + # To avoid test failure we will limit MTR_PARALLEL to 4 instead of + # using "auto". + local info_msg="Parallel MySQL test suite jobs limited to 4 (MAKEOPTS=${MTR_PARALLEL})" + info_msg+=" to avoid test failures. Set MTR_PARALLEL if you know what you are doing!" + einfo "${info_msg}" + unset info_msg + MTR_PARALLEL=4 + fi + else + einfo "MTR_PARALLEL is set to '${MTR_PARALLEL}'" + fi + + # create directories because mysqladmin might run out of order + mkdir -p "${T}"/var-tests{,/log} || die + + # Run mysql tests + pushd "${TESTDIR}" &>/dev/null || die + + touch "${T}/disabled.def" + + local -a disabled_tests + disabled_tests+=( "auth_sec.keyring_file_data_qa;0;Won't work with user privileges" ) + disabled_tests+=( "gis.spatial_analysis_functions_buffer;5452;Known rounding error with latest AMD processors (PS)" ) + disabled_tests+=( "gis.gis_bugs_crashes;5452;Known rounding error with latest AMD processors (PS)" ) + disabled_tests+=( "gis.geometry_class_attri_prop;5452;Known rounding error with latest AMD processors (PS)" ) + disabled_tests+=( "gis.spatial_utility_function_distance_sphere;5452;Known rounding error with latest AMD processors (PS)" ) + disabled_tests+=( "gis.geometry_property_function_issimple;5452;Known rounding error with latest AMD processors (PS)" ) + disabled_tests+=( "gis.spatial_analysis_functions_centroid;5452;Known rounding error with latest AMD processors (PS)" ) + disabled_tests+=( "gis.spatial_operators_intersection;5452;Known rounding error with latest AMD processors (PS)" ) + disabled_tests+=( "gis.spatial_utility_function_simplify;5452;Known rounding error with latest AMD processors (PS)" ) + disabled_tests+=( "gis.spatial_op_testingfunc_mix;5452;Known rounding error with latest AMD processors (PS)" ) + disabled_tests+=( "gis.spatial_analysis_functions_distance;5452;Known rounding error with latest AMD processors (PS)" ) + disabled_tests+=( "main.window_std_var;0;Known rounding error with latest AMD processors -- no upstream bug yet" ) + disabled_tests+=( "main.window_std_var_optimized;0;Known rounding error with latest AMD processors -- no upstream bug yet" ) + disabled_tests+=( "main.with_recursive;0;Known rounding error with latest AMD processors -- no upstream bug yet" ) + disabled_tests+=( "rpl_gtid.rpl_gtid_stm_drop_table;90612;Known test failure" ) + disabled_tests+=( "rpl_gtid.rpl_multi_source_mtr_includes;0;Known failure - no upstream bug yet" ) + disabled_tests+=( "sys_vars.myisam_data_pointer_size_func;87935;Test will fail on slow hardware") + disabled_tests+=( "x.connection;0;Known failure - no upstream bug yet" ) + disabled_tests+=( "main.mysqlpump_basic_lz4;0;Extra tool output causes false positive" ) + disabled_tests+=( "x.message_compressed_payload;0;False positive caused by protobuff-3.11+" ) + disabled_tests+=( "x.message_protobuf_nested;0;False positive caused by protobuff-3.11+" ) + + if ! hash zip 1>/dev/null 2>&1 ; then + # no need to force dep app-arch/zip for one test + disabled_tests+=( "innodb.partition_upgrade_create;0;Requires app-arch/zip" ) + fi + + local test_infos_str test_infos_arr + for test_infos_str in "${disabled_tests[@]}" ; do + IFS=';' read -r -a test_infos_arr <<< "${test_infos_str}" + + if [[ ${#test_infos_arr[@]} != 3 ]] ; then + die "Invalid test data set, not matching format: ${test_infos_str}" + fi + + _disable_test "${test_infos_arr[0]}" "${test_infos_arr[1]}" "${test_infos_arr[2]}" + done + unset test_infos_str test_infos_arr + + # Try to increase file limits to increase test coverage + if ! ulimit -n 16500 1>/dev/null 2>&1 ; then + # Upper limit comes from parts.partition_* tests + ewarn "For maximum test coverage please raise open file limit to 16500 (ulimit -n 16500) before calling the package manager." + + if ! ulimit -n 4162 1>/dev/null 2>&1 ; then + # Medium limit comes from '[Warning] Buffered warning: Could not increase number of max_open_files to more than 3000 (request: 4162)' + ewarn "For medium test coverage please raise open file limit to 4162 (ulimit -n 4162) before calling the package manager." + + if ! ulimit -n 3000 1>/dev/null 2>&1 ; then + ewarn "For minimum test coverage please raise open file limit to 3000 (ulimit -n 3000) before calling the package manager." + else + einfo "Will run test suite with open file limit set to 3000 (minimum test coverage)." + fi + else + einfo "Will run test suite with open file limit set to 4162 (medium test coverage)." + fi + else + einfo "Will run test suite with open file limit set to 16500 (best test coverage)." + fi + + # run mysql-test tests + perl mysql-test-run.pl --force --vardir="${T}/var-tests" --reorder --skip-test=tokudb --skip-test-list="${T}/disabled.def" + retstatus_tests=$? + + popd &>/dev/null || die + + # Cleanup is important for these testcases. + pkill -9 -f "${S}/ndb" 2>/dev/null + pkill -9 -f "${S}/sql" 2>/dev/null + + local failures="" + [[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit" + [[ $retstatus_tests -eq 0 ]] || failures="${failures} tests" + + [[ -z "$failures" ]] || die "Test failures: $failures" + einfo "Tests successfully completed" +} + +src_install() { + cmake-utils_src_install + + # Make sure the vars are correctly initialized + mysql_init_vars + + # Convenience links + einfo "Making Convenience links for mysqlcheck multi-call binary" + dosym "mysqlcheck" "/usr/bin/mysqlanalyze" + dosym "mysqlcheck" "/usr/bin/mysqlrepair" + dosym "mysqlcheck" "/usr/bin/mysqloptimize" + + # INSTALL_LAYOUT=STANDALONE causes cmake to create a /usr/data dir + if [[ -d "${ED}/usr/data" ]] ; then + rm -Rf "${ED}/usr/data" || die + fi + + # Unless they explicitly specific USE=test, then do not install the + # testsuite. It DOES have a use to be installed, esp. when you want to do a + # validation of your database configuration after tuning it. + if ! use test ; then + rm -rf "${ED}/${MY_SHAREDSTATEDIR#${EPREFIX}}/mysql-test" + fi + + # Configuration stuff + einfo "Building default configuration ..." + insinto "${MY_SYSCONFDIR#${EPREFIX}}" + [[ -f "${S}/scripts/mysqlaccess.conf" ]] && doins "${S}"/scripts/mysqlaccess.conf + cp "${FILESDIR}/my.cnf-5.7" "${TMPDIR}/my.cnf" || die + eprefixify "${TMPDIR}/my.cnf" + doins "${TMPDIR}/my.cnf" + insinto "${MY_SYSCONFDIR#${EPREFIX}}/mysql.d" + cp "${FILESDIR}/my.cnf-8.0.distro-client" "${TMPDIR}/50-distro-client.cnf" || die + eprefixify "${TMPDIR}/50-distro-client.cnf" + doins "${TMPDIR}/50-distro-client.cnf" + + mycnf_src="my.cnf-8.0.distro-server" + sed -e "s!@DATADIR@!${MY_DATADIR}!g" \ + "${FILESDIR}/${mycnf_src}" \ + > "${TMPDIR}/my.cnf.ok" || die + + if use prefix ; then + sed -i -r -e '/^user[[:space:]]*=[[:space:]]*mysql$/d' \ + "${TMPDIR}/my.cnf.ok" || die + fi + + if use latin1 ; then + sed -i \ + -e "/character-set/s|utf8mb4|latin1|g" \ + "${TMPDIR}/my.cnf.ok" || die + fi + + eprefixify "${TMPDIR}/my.cnf.ok" + + newins "${TMPDIR}/my.cnf.ok" 50-distro-server.cnf + + #Remove mytop if perl is not selected + [[ -e "${ED}/usr/bin/mytop" ]] && ! use perl && rm -f "${ED}/usr/bin/mytop" + + if use router ; then + rm -rf \ + "${ED}/usr/LICENSE.router" \ + "${ED}/usr/README.router" \ + "${ED}/usr/run" \ + "${ED}/usr/var" \ + || die + fi + + # Kill old libmysqclient_r symlinks if they exist. Time to fix what depends on them. + find "${D}" -name 'libmysqlclient_r.*' -type l -delete || die +} + +pkg_postinst() { + # Make sure the vars are correctly initialized + mysql_init_vars + + # Create log directory securely if it does not exist + # NOTE: $MY_LOGDIR contains $EPREFIX by default + [[ -d "${MY_LOGDIR}" ]] || install -d -m0750 -o mysql -g mysql "${MY_LOGDIR}" + + # Note about configuration change + einfo + elog "This version of ${PN} reorganizes the configuration from a single my.cnf" + elog "to several files in /etc/mysql/mysql.d." + elog "Please backup any changes you made to /etc/mysql/my.cnf" + elog "and add them as a new file under /etc/mysql/mysql.d with a .cnf extension." + elog "You may have as many files as needed and they are read alphabetically." + elog "Be sure the options have the appropriate section headers, i.e. [mysqld]." + einfo + + if [[ -z "${REPLACING_VERSIONS}" ]] ; then + einfo + elog "You might want to run:" + elog " \"emerge --config =${CATEGORY}/${PF}\"" + elog "if this is a new install." + einfo + else + einfo + elog "Upgrade process for ${PN}-8.x has changed. Please read" + elog "https://dev.mysql.com/doc/refman/8.0/en/upgrade-binary-package.html" + einfo + fi +} + +pkg_config() { + 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_binary="${EROOT}/usr/bin/mysql" + if [[ ! -x "${mysql_binary}" ]] ; then + die "'${mysql_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 + + einfo "Will use username '${MYSQL_USER}' and group '${MYSQL_GROUP}' ..." + + _getoptval() { + local section="$1" + local flag="--${2}=" + local extra_options="${3}" + 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 + } + + # my_print_defaults needs to read stuff in $HOME/.my.cnf + local -x HOME="${EROOT}/root" + + # Make sure the vars are correctly initialized + mysql_init_vars + + # 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!" + else + einfo "${PN} data directory detected as '${MY_DATADIR}' ..." + fi + + MYSQL_TMPDIR="$(_getoptval mysqld tmpdir "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")" + # 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%/*} + + # 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 [[ -n "${MYSQL_TMPDIR}" ]] ; then + 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 data directory '${MYSQL_TMPDIR}'!" + else + rm "${_my_tmpdir_testfile}" || die + unset _my_tmpdir_testfile + fi + else + # If no tmpdir is set, mysqld will use default system tmpdir. + # However, we are using tmpdir from package manager at the + # moment which maybe isn't writeable for $MYSQL_USER... + MYSQL_TMPDIR="$(_mktemp_dry "${T}/mysqld-tmp.XXXXXXXXX")" + [[ -z "${MYSQL_TMPDIR}" ]] \ + && die "_mktemp_dry() for '${MYSQL_TMPDIR}' failed!" + + mkdir "${MYSQL_TMPDIR}" || die + chown ${MYSQL_USER} "${MYSQL_TMPDIR}" || die + 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 + 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 + + 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 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 -a config_files + + local config_file="${EROOT}/etc/mysql/mysql.d/50-distro-client.cnf" + if [[ -f "${config_file}" ]] ; then + config_files+=( "${config_file}" ) + else + ewarn "Client configuration '${config_file}' not found; Skipping configuration of default authentication plugin for client ..." + fi + + config_file="${EROOT}/etc/mysql/mysql.d/50-distro-server.cnf" + if [[ -f "${config_file}" ]] ; then + config_files+=( "${config_file}" ) + else + ewarn "Server configuration '${config_file}' not found; Skipping configuration of default authentication plugin for mysqld ..." + fi + + if [[ ${#config_files[@]} -gt 0 ]] ; then + if [[ -z "${MYSQL_DEFAULT_AUTHENTICATION_PLUGIN}" ]] ; then + local user_answer + + echo + einfo "Please select default authentication plugin (enter number or plugin name):" + einfo "1) caching_sha2_password [MySQL 8.0 default]" + einfo "2) mysql_native_password [MySQL 5.7 default]" + einfo + einfo "For details see:" + einfo "https://dev.mysql.com/doc/refman/8.0/en/upgrading-from-previous-series.html#upgrade-caching-sha2-password" + read -p " >" user_answer + echo + + case "${user_answer}" in + 1|caching_sha2_password) + MYSQL_DEFAULT_AUTHENTICATION_PLUGIN=caching_sha2_password + ;; + 2|mysql_native_password) + MYSQL_DEFAULT_AUTHENTICATION_PLUGIN=mysql_native_password + ;; + '') + die "No authentication plugin selected!" + ;; + *) + die "Authentication plugin '${user_answer}' is unknown/unsupported!" + ;; + esac + + unset user_answer + fi + + local cfg_option cfg_option_tabs cfg_section + for config_file in "${config_files[@]}" ; do + cfg_option="default-authentication-plugin" + cfg_section="mysqld" + cfg_option_tabs="\t\t" + if [[ "${config_file}" == *client.cnf ]] ; then + cfg_option="default-auth" + cfg_section="client" + cfg_option_tabs="\t\t\t\t" + fi + + if grep -qE "^(loose-)?${cfg_option}\b.*=" "${config_file}" 2>/dev/null ; then + einfo "Ensuring that ${cfg_option} is set to '${MYSQL_DEFAULT_AUTHENTICATION_PLUGIN}' in '${config_file}' ..." + sed -i \ + -e "s/^\(loose-\)\?${cfg_option}\b.*=.*/loose-${cfg_option}${cfg_option_tabs}= ${MYSQL_DEFAULT_AUTHENTICATION_PLUGIN}/" \ + "${config_file}" || die "Failed to change ${cfg_option} in '${config_file}'!" + else + einfo "Setting ${cfg_option} to '${MYSQL_DEFAULT_AUTHENTICATION_PLUGIN}' in '${config_file}' ..." + sed -i \ + -e "/^\[${cfg_section}\]$/a loose-${cfg_option}${cfg_option_tabs}= ${MYSQL_DEFAULT_AUTHENTICATION_PLUGIN}" \ + "${config_file}" || die "Failed to add ${cfg_option} to '${config_file}'!" + fi + done + unset cfg_option cfg_option_tabs cfg_section + fi + unset config_files config_file + + echo + + if [[ -z "${MYSQL_ROOT_PASSWORD}" ]] ; then + local tmp_mysqld_password_source= + + 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 + ewarn "Ignoring password from '${tmp_mysqld_password_source}' section due to newline character (do you have multiple password options set?)!" + MYSQL_ROOT_PASSWORD= + continue + fi + + einfo "Found password in '${tmp_mysqld_password_source}' section!" + break + fi + done + + # Sometimes --show is required to display passwords in some implementations of my_print_defaults + if [[ "${MYSQL_ROOT_PASSWORD}" == '*****' ]] ; then + MYSQL_ROOT_PASSWORD="$(_getoptval "${tmp_mysqld_password_source}" password --show)" + fi + + unset tmp_mysqld_password_source + fi + + 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!" + fi + + MYSQL_ROOT_PASSWORD="${pwd1}" + unset pwd1 pwd2 + + echo + fi + + local -a mysqld_options + + # Fix bug 446200. Don't reference host my.cnf, needs to come first, + # 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 + optexp="--(skip-)?${opt}" optfull="--loose-skip-${opt}" + egrep -sq -- "${optexp}" "${helpfile}" && mysqld_options+=( "${optfull}" ) + done + + # Prepare timezones, see + # https://dev.mysql.com/doc/mysql/en/time-zone-support.html + local tz_sql="${TMPDIR}/tz.sql" + 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 + + chown ${MYSQL_USER} "${tz_sql}" || die + + local mysql_install_log="${TMPDIR}/mysql_install_db.log" + touch "${mysql_install_log}" || die + chown ${MYSQL_USER} "${mysql_install_log}" || die + + # --initialize-insecure will not set root password + # --initialize would set a random one in the log which we don't need as we set it ourselves + local cmd=( + "${mysqld_binary}" + "${mysqld_options[@]}" + "--initialize-insecure" + "--init-file='${tz_sql}'" + "--basedir='${EROOT}/usr'" + "--datadir='${MY_DATADIR}'" + "--tmpdir='${MYSQL_TMPDIR}'" + "--log-error='${mysql_install_log}'" + "--user=${MYSQL_USER}" + ) + + einfo "Initializing ${PN} data directory: ${cmd[@]}" + eval "${cmd[@]}" >>"${mysql_install_log}" 2>&1 + + if [[ $? -ne 0 || ! -f "${MY_DATADIR}/mysql.ibd" ]] ; 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 + + local x=${RANDOM} + local socket="${EROOT}/run/mysqld/mysqld${x}.sock" + local pidfile="${EROOT}/run/mysqld/mysqld${x}.pid" + unset x + + local mysqld_logfile="${TMPDIR}/mysqld.log" + touch "${mysqld_logfile}" || die + chown ${MYSQL_USER} "${mysqld_logfile}" || die + + 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 + + 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="${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 + + # 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 + + einfo "${PN} data directory at '${MY_DATADIR}' successfully initialized!" +} diff --git a/dev-db/percona-server/Manifest b/dev-db/percona-server/Manifest index c80e056de769..27aa85700130 100644 --- a/dev-db/percona-server/Manifest +++ b/dev-db/percona-server/Manifest @@ -9,6 +9,9 @@ DIST mysql-extras-20190822-1908Z.tar.bz2 338830 BLAKE2B bc197f8e541206548d898281 DIST mysql-extras-20200317-0103Z.tar.bz2 344905 BLAKE2B c4c8bb2acea16663ab32cf291d0a2d52af04448a507ad3a6dc22dfdef4d6ba427582d66e5923d05cd51565286f85c8df5ccabef9a67a4a500574d21e1f708f27 SHA512 d1d34817faf0a1271f906213eea9081c204d745b14f96166f17d5c60a29ec58c05926e7216f135b6e9d5df2ceab373f10fc4e6a652514d99ba34a336571dce1f DIST percona-server-5.7.27-30.tar.gz 84672298 BLAKE2B 8431d231f602b704195868110e8eb73adb3db7c761906c15eff182e54634ef091a3ffa0d4f3498a93dbfbf65cd5cdd12102871abaaaa0f32378ba3068d083b2b SHA512 d62c66de3128df87dce52292ad1671e01fe2c923e668ef0faf9cb663c11c9cd0b976345aea1de6ea2bc458d0e1066b42c022849e422121d96cea082ed12c8f4b DIST percona-server-8.0.18-9.tar.gz 256867152 BLAKE2B 34c7b7b320f973313ecd95e658999a17748fc70ff46b1dc58144df02c17b7870cf33d68a555ee8aaaecb66c5b1003e6023154f7100a6f413514e89d495330dd2 SHA512 ce537a160b48e7c3dc35b15a293c39142a5b633111b5c9c5f9c1150476f0faa5e9cf81b34c9ca85286463455e3ae3fce7a200d253d880e3b67b3c71eefdbdcd4 +DIST percona-server-8.0.19-10.tar.gz 490703179 BLAKE2B 731e9498c4934eb53451c202e8b1de93618190d9b6334b761428ab223756d515d958db77515517e6b5db3ba6cd908c8b238c18b63f4c73b256ec251f8b161ff3 SHA512 39aa805474c6655980e70c97e0d2c0f21ae16e2c1e2e9c7e1d615f46320f1615620368fbdfc24f5d1784aae856090856c3ccda3d6f09ed86c6c9ffe3197be90e +DIST percona-server-8.0.19.10-patches-01.tar.xz 8288 BLAKE2B 2f79c538ac1512b052210439a27b71491917cb9eab08ac3a3b21c188458c2989f0c998d973b8dd654a7d7606acd70ccf374f1e2f5e0088d0c6b96a794dc4c4a5 SHA512 43313797ec405be82f15745185bfab25fda093045f981a8caa8a019522e432415e4b3cca4ca5ffb735d102f98b3c2fccafccbd4695bd2d1f011707f709fcc2b3 EBUILD percona-server-5.7.27.30.ebuild 37216 BLAKE2B 980cf1ea9aeb005335ea7f7fe8d373b8b0b5c663525cfa69b6df043baa7a4e669e4c1b94d4d9b220290654761f33115ec477ac45f1a482af2baa6ee15a1e5200 SHA512 673a01611f23a5b47be6eebf42c8654d9863b167a1ec7fd35deee59336386021a4fe11391e892e68f50dd44cb2b2025f1187726ad586443ba2992027c8eb2866 EBUILD percona-server-8.0.18.9.ebuild 37721 BLAKE2B 717ce0fbb72b33c377379c3e6ac38b771585c145b52d0ce9fdbfda887a78d64871cc81461a6e4654d40cbdf47b2deacea3e8eae4229600cf765e48c5647d038a SHA512 82c9781982d4c66213c7f362c4233eb90a6cf539d6dce3413f1b82fe1197c1b784fee5ea1f48354d89cdebe7dab1f39d34fc43476a402946bcac28074446443e +EBUILD percona-server-8.0.19.10.ebuild 38004 BLAKE2B 7f218db480e95b211e73e5b3530c7982cbc8c38ce7e1c986333e8500b765e4e01a71ec5202eef41e0b9902462ecba5336b364b5d601a005877e9cd27b099a329 SHA512 c2aae21cd87a5a420e58c5dfcca9fbada6b73f9fae9c58987061ae3ed5a9e08d12ee53972c32794870947037c2e35017ee8920a1be2361f94b9768eb7ec9a141 MISC metadata.xml 1476 BLAKE2B 45302733bbb03e6e999d60db72bed7382f664d9b46772904a35a1a8bfceccc89008e739fcead55bfb6a056523f0ff84fd22c638de859236f47a01eb8ac6c45eb SHA512 e53b29f9d78e895a26f228b7719a023dbd5957d1e10f384376b75b539a211425be143c229378af2ade5314f6b414d891bafc7e1fffde9bb88b59ff24de31a2c2 diff --git a/dev-db/percona-server/percona-server-8.0.19.10.ebuild b/dev-db/percona-server/percona-server-8.0.19.10.ebuild new file mode 100644 index 000000000000..0eb015df2a82 --- /dev/null +++ b/dev-db/percona-server/percona-server-8.0.19.10.ebuild @@ -0,0 +1,1154 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI="7" + +CMAKE_MAKEFILE_GENERATOR=emake + +inherit cmake-utils flag-o-matic linux-info \ + multiprocessing prefix toolchain-funcs check-reqs + +MY_BOOST_VERSION="1.70.0" +MY_PV=$(ver_rs 3 '-') +MY_PV="${MY_PV//_pre*}" +MY_PN="Percona-Server" +MY_P="${PN}-${MY_PV}" +MY_MAJOR_PV=$(ver_cut 1-2) +MY_RELEASE_NOTES_URI="https://www.percona.com/doc/percona-server/${MY_MAJOR_PV}/" + +# Patch version +PATCH_SET="https://dev.gentoo.org/~whissi/dist/percona-server/${PN}-8.0.19.10-patches-01.tar.xz" + +SRC_URI="https://www.percona.com/downloads/${MY_PN}-${MY_MAJOR_PV}/${MY_PN}-${MY_PV}/source/tarball/${PN}-${MY_PV}.tar.gz + https://dl.bintray.com/boostorg/release/${MY_BOOST_VERSION}/source/boost_$(ver_rs 1- _ ${MY_BOOST_VERSION}).tar.bz2 + ${PATCH_SET} +" + +HOMEPAGE="https://www.percona.com/software/mysql-database/percona-server https://github.com/percona/percona-server" +DESCRIPTION="Fully compatible, enhanced and open source drop-in replacement for MySQL" +LICENSE="GPL-2" +SLOT="0" +IUSE="cjk cracklib debug jemalloc latin1 libressl numa pam +perl profiling + rocksdb router selinux +server tcmalloc test tokudb tokudb-backup-plugin" + +# Tests always fail when libressl is enabled due to hard-coded ciphers in the tests +RESTRICT="!test? ( test ) libressl? ( test )" + +REQUIRED_USE="?? ( tcmalloc jemalloc ) + cjk? ( server ) + jemalloc? ( server ) + numa? ( server ) + profiling? ( server ) + router? ( server ) + tcmalloc? ( server )" + +KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-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 +S="${WORKDIR}/mysql" + +# Be warned, *DEPEND are version-dependant +# These are used for both runtime and compiletime +COMMON_DEPEND=" + >=app-arch/lz4-0_p131:= + sys-libs/ncurses:0= + >=sys-libs/zlib-1.2.3:0= + libressl? ( dev-libs/libressl:0= ) + !libressl? ( >=dev-libs/openssl-1.0.0:0= ) + server? ( + dev-libs/icu:= + dev-libs/libevent:= + >=dev-libs/protobuf-3.8:= + net-libs/libtirpc:= + net-misc/curl:= + cjk? ( app-text/mecab:= ) + jemalloc? ( dev-libs/jemalloc:0= ) + kernel_linux? ( + dev-libs/libaio:0= + sys-process/procps:0= + ) + numa? ( sys-process/numactl ) + pam? ( sys-libs/pam:0= ) + tcmalloc? ( dev-util/google-perftools:0= ) + ) +" +DEPEND="${COMMON_DEPEND} + || ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 ) + virtual/yacc + server? ( net-libs/rpcsvc-proto ) + test? ( + acct-group/mysql acct-user/mysql + dev-perl/JSON + ) +" +RDEPEND="${COMMON_DEPEND} + !dev-db/mariadb !dev-db/mariadb-galera !dev-db/mysql !dev-db/mysql-cluster + selinux? ( sec-policy/selinux-mysql ) + !prefix? ( + acct-group/mysql acct-user/mysql + dev-db/mysql-init-scripts + ) +" +# For other stuff to bring us in +# dev-perl/DBD-mysql is needed by some scripts installed by MySQL +PDEPEND="perl? ( >=dev-perl/DBD-mysql-2.9004 )" + +CHECKREQS_DISK_BUILD="9G" + +mysql_init_vars() { + : ${MY_SHAREDSTATEDIR="${EPREFIX}/usr/share/mysql"} + : ${MY_SYSCONFDIR="${EPREFIX}/etc/mysql"} + : ${MY_LOCALSTATEDIR="${EPREFIX}/var/lib/mysql"} + : ${MY_LOGDIR="${EPREFIX}/var/log/mysql"} + MY_DATADIR="${MY_LOCALSTATEDIR}" + + export MY_SHAREDSTATEDIR MY_SYSCONFDIR + export MY_LOCALSTATEDIR MY_LOGDIR + export MY_DATADIR +} + +pkg_pretend() { + [[ ${MERGE_TYPE} == binary ]] && return + use server && check-reqs_pkg_pretend +} + +pkg_setup() { + [[ ${MERGE_TYPE} == binary ]] && return + + if has test ${FEATURES} ; then + # Bug #213475 - MySQL _will_ object strenuously if your machine is named + # localhost. Also causes weird failures. + [[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost" + + if ! has userpriv ${FEATURES} ; then + die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root." + fi + + local aio_max_nr=$(sysctl -n fs.aio-max-nr 2>/dev/null) + [[ -z "${aio_max_nr}" || ${aio_max_nr} -lt 250000 ]] \ + && die "FEATURES=test will require fs.aio-max-nr=250000 at minimum!" + + if use latin1 ; then + # Upstream only supports tests with default charset + die "Testing with USE=latin1 is not supported." + fi + fi + + if use kernel_linux ; then + if use numa ; then + linux-info_get_any_version + + local CONFIG_CHECK="~NUMA" + + local WARNING_NUMA="This package expects NUMA support in kernel which this system does not have at the moment;" + WARNING_NUMA+=" Either expect runtime errors, enable NUMA support in kernel or rebuild the package without NUMA support" + + check_extra_config + fi + fi + + use server && check-reqs_pkg_setup +} + +src_unpack() { + unpack ${A} + + mv -f "${WORKDIR}/${MY_P}" "${S}" || die +} + +src_prepare() { + eapply "${WORKDIR}"/mysql-patches + + eapply_user + + # Avoid rpm call which would trigger sandbox, #692368 + sed -i \ + -e 's/MY_RPM rpm/MY_RPM rpmNOTEXISTENT/' \ + CMakeLists.txt || die + + if use jemalloc ; then + echo "TARGET_LINK_LIBRARIES(mysqld jemalloc)" >> "${S}/sql/CMakeLists.txt" || die + fi + + if use tcmalloc ; then + echo "TARGET_LINK_LIBRARIES(mysqld tcmalloc)" >> "${S}/sql/CMakeLists.txt" || die + fi + + # Remove the centos and rhel selinux policies to support mysqld_safe under SELinux + if [[ -d "${S}/support-files/SELinux" ]] ; then + echo > "${S}/support-files/SELinux/CMakeLists.txt" || die + fi + + # Remove man pages for client-lib tools we don't install + rm \ + man/my_print_defaults.1 \ + man/perror.1 \ + man/zlib_decompress.1 \ + || die + + cmake-utils_src_prepare +} + +src_configure() { + # Bug #114895, bug #110149 + filter-flags "-O" "-O[01]" + + append-cxxflags -felide-constructors + + # bug #283926, with GCC4.4, this is required to get correct behavior. + append-flags -fno-strict-aliasing + + CMAKE_BUILD_TYPE="RelWithDebInfo" + + # debug hack wrt #497532 + mycmakeargs=( + -DCMAKE_C_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')" + -DCMAKE_CXX_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')" + -DMYSQL_DATADIR="${EPREFIX}/var/lib/mysql" + -DSYSCONFDIR="${EPREFIX}/etc/mysql" + -DINSTALL_BINDIR=bin + -DINSTALL_DOCDIR=share/doc/${PF} + -DINSTALL_DOCREADMEDIR=share/doc/${PF} + -DINSTALL_INCLUDEDIR=include/mysql + -DINSTALL_INFODIR=share/info + -DINSTALL_LIBDIR=$(get_libdir) + -DINSTALL_MANDIR=share/man + -DINSTALL_MYSQLSHAREDIR=share/mysql + -DINSTALL_PLUGINDIR=$(get_libdir)/mysql/plugin + -DINSTALL_MYSQLDATADIR="${EPREFIX}/var/lib/mysql" + -DINSTALL_SBINDIR=sbin + -DINSTALL_SUPPORTFILESDIR="${EPREFIX}/usr/share/mysql" + -DCOMPILATION_COMMENT="Gentoo Linux ${PF}" + -DWITH_UNIT_TESTS=$(usex test ON OFF) + # Using bundled editline to get CTRL+C working + -DWITH_EDITLINE=bundled + -DWITH_ZLIB=system + -DWITH_SSL=system + -DWITH_LIBWRAP=0 + -DENABLED_LOCAL_INFILE=1 + -DMYSQL_UNIX_ADDR="${EPREFIX}/var/run/mysqld/mysqld.sock" + -DWITH_DEFAULT_COMPILER_OPTIONS=0 + -DWITH_DEFAULT_FEATURE_SET=0 + # The build forces this to be defined when cross-compiling. We pass it + # all the time for simplicity and to make sure it is actually correct. + -DSTACK_DIRECTION=$(tc-stack-grows-down && echo -1 || echo 1) + -DCMAKE_POSITION_INDEPENDENT_CODE=ON + -DWITH_CURL=system + -DWITH_BOOST="${WORKDIR}/boost_$(ver_rs 1- _ ${MY_BOOST_VERSION})" + -DWITH_ROUTER=$(usex router ON OFF) + ) + + if is-flagq -fno-lto ; then + einfo "LTO disabled via {C,CXX,F,FC}FLAGS" + mycmakeargs+=( -DWITH_LTO=OFF ) + elif is-flagq -flto ; then + einfo "LTO forced via {C,CXX,F,FC}FLAGS" + myconf+=( -DWITH_LTO=ON ) + else + # Disable automagic + myconf+=( -DWITH_LTO=OFF ) + fi + + if use test ; then + mycmakeargs+=( -DINSTALL_MYSQLTESTDIR=share/mysql/mysql-test ) + else + mycmakeargs+=( -DINSTALL_MYSQLTESTDIR='' ) + fi + + mycmakeargs+=( -DWITHOUT_CLIENTLIBS=YES ) + + mycmakeargs+=( + -DWITH_ICU=system + -DWITH_LZ4=system + # Our dev-libs/rapidjson doesn't carry necessary fixes for std::regex + -DWITH_RAPIDJSON=bundled + ) + + if [[ -n "${MYSQL_DEFAULT_CHARSET}" && -n "${MYSQL_DEFAULT_COLLATION}" ]] ; then + ewarn "You are using a custom charset of ${MYSQL_DEFAULT_CHARSET}" + ewarn "and a collation of ${MYSQL_DEFAULT_COLLATION}." + ewarn "You MUST file bugs without these variables set." + ewarn "Tests will probably fail!" + + mycmakeargs+=( + -DDEFAULT_CHARSET=${MYSQL_DEFAULT_CHARSET} + -DDEFAULT_COLLATION=${MYSQL_DEFAULT_COLLATION} + ) + elif use latin1 ; then + mycmakeargs+=( + -DDEFAULT_CHARSET=latin1 + -DDEFAULT_COLLATION=latin1_swedish_ci + ) + else + mycmakeargs+=( + -DDEFAULT_CHARSET=utf8mb4 + -DDEFAULT_COLLATION=utf8mb4_0900_ai_ci + ) + fi + + if use server ; then + mycmakeargs+=( + -DWITH_EXTRA_CHARSETS=all + -DWITH_DEBUG=$(usex debug) + -DWITH_MECAB=$(usex cjk system OFF) + -DWITH_LIBEVENT=system + -DWITH_PROTOBUF=system + -DWITH_NUMA=$(usex numa ON OFF) + -DWITH_PAM=$(usex pam) + ) + + if use profiling ; then + # Setting to OFF doesn't work: Once set, profiling options will be added + # to `mysqld --help` output via sql/sys_vars.cc causing + # "main.mysqld--help-notwin" test to fail + mycmakeargs+=( -DENABLED_PROFILING=ON ) + fi + + # Storage engines + mycmakeargs+=( + -DWITH_EXAMPLE_STORAGE_ENGINE=0 + -DWITH_ARCHIVE_STORAGE_ENGINE=1 + -DWITH_BLACKHOLE_STORAGE_ENGINE=1 + -DWITH_CSV_STORAGE_ENGINE=1 + -DWITH_FEDERATED_STORAGE_ENGINE=1 + -DWITH_HEAP_STORAGE_ENGINE=1 + -DWITH_INNOBASE_STORAGE_ENGINE=1 + -DWITH_INNODB_MEMCACHED=0 + -DWITH_MYISAMMRG_STORAGE_ENGINE=1 + -DWITH_MYISAM_STORAGE_ENGINE=1 + -DWITH_ROCKSDB=$(usex rocksdb 1 0) + -DWITH_TOKUDB=$(usex tokudb 1 0) + ) + else + mycmakeargs+=( + -DWITHOUT_SERVER=1 + -DWITH_SYSTEMD=no + ) + fi + + cmake-utils_src_configure +} + +# Official test instructions: +# ulimit -n 16500 && \ +# USE='perl server' \ +# FEATURES='test userpriv' \ +# ebuild mysql-X.X.XX.ebuild \ +# digest clean package +src_test() { + _disable_test() { + local rawtestname bug reason + rawtestname="${1}" ; shift + bug="${1}" ; shift + reason="${@}" + ewarn "test '${rawtestname}' disabled: '${reason}' (BUG#${bug})" + echo ${rawtestname} : BUG#${bug} ${reason} >> "${T}/disabled.def" + } + + local TESTDIR="${BUILD_DIR}/mysql-test" + local retstatus_unit + local retstatus_tests + + # Run CTest (test-units) + cmake-utils_src_test + retstatus_unit=$? + + # Ensure that parallel runs don't die + export MTR_BUILD_THREAD="$((${RANDOM} % 100))" + + if [[ -z "${MTR_PARALLEL}" ]] ; then + local -x MTR_PARALLEL=$(makeopts_jobs) + + if [[ ${MTR_PARALLEL} -gt 4 ]] ; then + # Running multiple tests in parallel usually require higher ulimit + # and fs.aio-max-nr setting. In addition, tests like main.multi_update + # are known to hit timeout when system is busy. + # To avoid test failure we will limit MTR_PARALLEL to 4 instead of + # using "auto". + local info_msg="Parallel MySQL test suite jobs limited to 4 (MAKEOPTS=${MTR_PARALLEL})" + info_msg+=" to avoid test failures. Set MTR_PARALLEL if you know what you are doing!" + einfo "${info_msg}" + unset info_msg + MTR_PARALLEL=4 + fi + else + einfo "MTR_PARALLEL is set to '${MTR_PARALLEL}'" + fi + + # create directories because mysqladmin might run out of order + mkdir -p "${T}"/var-tests{,/log} || die + + # Run mysql tests + pushd "${TESTDIR}" &>/dev/null || die + + touch "${T}/disabled.def" + + local -a disabled_tests + disabled_tests+=( "auth_sec.keyring_file_data_qa;0;Won't work with user privileges" ) + disabled_tests+=( "gis.spatial_analysis_functions_buffer;5452;Known rounding error with latest AMD processors (PS)" ) + disabled_tests+=( "gis.gis_bugs_crashes;5452;Known rounding error with latest AMD processors (PS)" ) + disabled_tests+=( "gis.geometry_class_attri_prop;5452;Known rounding error with latest AMD processors (PS)" ) + disabled_tests+=( "gis.spatial_utility_function_distance_sphere;5452;Known rounding error with latest AMD processors (PS)" ) + disabled_tests+=( "gis.geometry_property_function_issimple;5452;Known rounding error with latest AMD processors (PS)" ) + disabled_tests+=( "gis.spatial_analysis_functions_centroid;5452;Known rounding error with latest AMD processors (PS)" ) + disabled_tests+=( "gis.spatial_operators_intersection;5452;Known rounding error with latest AMD processors (PS)" ) + disabled_tests+=( "gis.spatial_utility_function_simplify;5452;Known rounding error with latest AMD processors (PS)" ) + disabled_tests+=( "gis.spatial_op_testingfunc_mix;5452;Known rounding error with latest AMD processors (PS)" ) + disabled_tests+=( "gis.spatial_analysis_functions_distance;5452;Known rounding error with latest AMD processors (PS)" ) + disabled_tests+=( "innodb.percona_changed_page_bmp_flush;6807;False positive on Gentoo (PS)" ) + disabled_tests+=( "innodb.percona_changed_page_bmp_log_resize;0;Sporadic failing test" ) + disabled_tests+=( "innodb.upgrade_orphan;0;Sporadic failing test" ) + disabled_tests+=( "main.myisam-blob;0;Sporadic failing test" ) + disabled_tests+=( "main.mysqlpump_basic_lz4;6042;Extra tool output causes false positive" ) + disabled_tests+=( "main.ssl_bug75311;5996;Known test failure" ) + disabled_tests+=( "main.ssl_san;6808;False positive on IPv6-enabled hosts" ) + disabled_tests+=( "main.window_std_var;0;Known rounding error with latest AMD processors -- no upstream bug yet" ) + disabled_tests+=( "main.window_std_var_optimized;0;Known rounding error with latest AMD processors -- no upstream bug yet" ) + disabled_tests+=( "main.with_recursive;6804;Known rounding error with latest AMD processors" ) + disabled_tests+=( "rpl_gtid.rpl_gtid_stm_drop_table;90612;Known test failure" ) + disabled_tests+=( "rpl_gtid.rpl_multi_source_mtr_includes;0;Know failure - no upstream bug yet" ) + disabled_tests+=( "sys_vars.myisam_data_pointer_size_func;87935;Test will fail on slow hardware" ) + disabled_tests+=( "x.message_compressed_payload;0;False positive caused by protobuff-3.11+" ) + disabled_tests+=( "x.message_protobuf_nested;6803;False positive caused by protobuff-3.11+" ) + + if ! hash zip 1>/dev/null 2>&1 ; then + # no need to force dep app-arch/zip for one test + disabled_tests+=( "innodb.partition_upgrade_create;0;Requires app-arch/zip" ) + fi + + local test_ds + for test_infos_str in "${disabled_tests[@]}" ; do + IFS=';' read -r -a test_infos_arr <<< "${test_infos_str}" + + if [[ ${#test_infos_arr[@]} != 3 ]] ; then + die "Invalid test data set, not matching format: ${test_infos_str}" + fi + + _disable_test "${test_infos_arr[0]}" "${test_infos_arr[1]}" "${test_infos_arr[2]}" + done + unset test_ds test_infos_str test_infos_arr + + if [[ -z "${MTR_VAULT_TOKEN}" ]] ; then + local impossible_test + for impossible_test in \ + encryption.default_table_encryption_var \ + keyring_vault.innodb_online_alter_encryption \ + keyring_vault.innodb_row_log_encryption \ + keyring_vault.install_keyring_vault \ + keyring_vault.keyring_udf \ + keyring_vault.keyring_vault_config \ + keyring_vault.keyring_vault_config_qa \ + keyring_vault.keyring_vault_timeout \ + keyring_vault.key_rotation_qa \ + keyring_vault.rpl_key_rotation \ + keyring_vault.table_encrypt_2 \ + keyring_vault.table_encrypt_2_directory \ + keyring_vault.table_encrypt_2_keyring \ + keyring_vault.table_encrypt_5 \ + keyring_vault.table_encrypt_5_directory \ + keyring_vault.table_encrypt_kill \ + keyring_vault.temp_table_encrypt_keyring_vault \ + ; do + _disable_test "${impossible_test}" "0" "MTR_VAULT_TOKEN is not set" + done + fi + + # Try to increase file limits to increase test coverage + if ! ulimit -n 16500 1>/dev/null 2>&1 ; then + # Upper limit comes from parts.partition_* tests + ewarn "For maximum test coverage please raise open file limit to 16500 (ulimit -n 16500) before calling the package manager." + + if ! ulimit -n 4162 1>/dev/null 2>&1 ; then + # Medium limit comes from '[Warning] Buffered warning: Could not increase number of max_open_files to more than 3000 (request: 4162)' + ewarn "For medium test coverage please raise open file limit to 4162 (ulimit -n 4162) before calling the package manager." + + if ! ulimit -n 3000 1>/dev/null 2>&1 ; then + ewarn "For minimum test coverage please raise open file limit to 3000 (ulimit -n 3000) before calling the package manager." + else + einfo "Will run test suite with open file limit set to 3000 (minimum test coverage)." + fi + else + einfo "Will run test suite with open file limit set to 4162 (medium test coverage)." + fi + else + einfo "Will run test suite with open file limit set to 16500 (best test coverage)." + fi + + # run mysql-test tests + perl mysql-test-run.pl --force --vardir="${T}/var-tests" --reorder --skip-test=tokudb --skip-test-list="${T}/disabled.def" + retstatus_tests=$? + + popd &>/dev/null || die + + # Cleanup is important for these testcases. + pkill -9 -f "${S}/ndb" 2>/dev/null + pkill -9 -f "${S}/sql" 2>/dev/null + + local failures="" + [[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit" + [[ $retstatus_tests -eq 0 ]] || failures="${failures} tests" + + [[ -z "$failures" ]] || die "Test failures: $failures" + einfo "Tests successfully completed" +} + +src_install() { + cmake-utils_src_install + + # Make sure the vars are correctly initialized + mysql_init_vars + + # Convenience links + einfo "Making Convenience links for mysqlcheck multi-call binary" + dosym "mysqlcheck" "/usr/bin/mysqlanalyze" + dosym "mysqlcheck" "/usr/bin/mysqlrepair" + dosym "mysqlcheck" "/usr/bin/mysqloptimize" + + # INSTALL_LAYOUT=STANDALONE causes cmake to create a /usr/data dir + if [[ -d "${ED}/usr/data" ]] ; then + rm -Rf "${ED}/usr/data" || die + fi + + # Unless they explicitly specific USE=test, then do not install the + # testsuite. It DOES have a use to be installed, esp. when you want to do a + # validation of your database configuration after tuning it. + if ! use test ; then + rm -rf "${ED}/${MY_SHAREDSTATEDIR#${EPREFIX}}/mysql-test" + fi + + # Configuration stuff + einfo "Building default configuration ..." + insinto "${MY_SYSCONFDIR#${EPREFIX}}" + [[ -f "${S}/scripts/mysqlaccess.conf" ]] && doins "${S}"/scripts/mysqlaccess.conf + cp "${FILESDIR}/my.cnf-5.7" "${TMPDIR}/my.cnf" || die + eprefixify "${TMPDIR}/my.cnf" + doins "${TMPDIR}/my.cnf" + insinto "${MY_SYSCONFDIR#${EPREFIX}}/mysql.d" + cp "${FILESDIR}/my.cnf-8.0.distro-client" "${TMPDIR}/50-distro-client.cnf" || die + eprefixify "${TMPDIR}/50-distro-client.cnf" + doins "${TMPDIR}/50-distro-client.cnf" + + mycnf_src="my.cnf-8.0.distro-server" + sed -e "s!@DATADIR@!${MY_DATADIR}!g" \ + "${FILESDIR}/${mycnf_src}" \ + > "${TMPDIR}/my.cnf.ok" || die + + if use prefix ; then + sed -i -r -e '/^user[[:space:]]*=[[:space:]]*mysql$/d' \ + "${TMPDIR}/my.cnf.ok" || die + fi + + if use latin1 ; then + sed -i \ + -e "/character-set/s|utf8mb4|latin1|g" \ + "${TMPDIR}/my.cnf.ok" || die + fi + + eprefixify "${TMPDIR}/my.cnf.ok" + + newins "${TMPDIR}/my.cnf.ok" 50-distro-server.cnf + + #Remove mytop if perl is not selected + [[ -e "${ED}/usr/bin/mytop" ]] && ! use perl && rm -f "${ED}/usr/bin/mytop" + + if use router ; then + rm -rf \ + "${ED}/usr/LICENSE.router" \ + "${ED}/usr/README.router" \ + "${ED}/usr/run" \ + "${ED}/usr/var" \ + || die + fi + + # Kill old libmysqclient_r symlinks if they exist. Time to fix what depends on them. + find "${D}" -name 'libmysqlclient_r.*' -type l -delete || die +} + +pkg_postinst() { + # Make sure the vars are correctly initialized + mysql_init_vars + + # Create log directory securely if it does not exist + # NOTE: $MY_LOGDIR contains $EPREFIX by default + [[ -d "${MY_LOGDIR}" ]] || install -d -m0750 -o mysql -g mysql "${MY_LOGDIR}" + + # Note about configuration change + einfo + elog "This version of ${PN} reorganizes the configuration from a single my.cnf" + elog "to several files in /etc/mysql/mysql.d." + elog "Please backup any changes you made to /etc/mysql/my.cnf" + elog "and add them as a new file under /etc/mysql/mysql.d with a .cnf extension." + elog "You may have as many files as needed and they are read alphabetically." + elog "Be sure the options have the appropriate section headers, i.e. [mysqld]." + einfo + + if [[ -z "${REPLACING_VERSIONS}" ]] ; then + einfo + elog "You might want to run:" + elog " \"emerge --config =${CATEGORY}/${PF}\"" + elog "if this is a new install." + einfo + else + einfo + elog "Upgrade process for ${PN}-8.x has changed. Please read" + elog "https://dev.mysql.com/doc/refman/8.0/en/upgrade-binary-package.html" + einfo + fi +} + +pkg_config() { + 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_binary="${EROOT}/usr/bin/mysql" + if [[ ! -x "${mysql_binary}" ]] ; then + die "'${mysql_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 + + einfo "Will use username '${MYSQL_USER}' and group '${MYSQL_GROUP}' ..." + + _getoptval() { + local section="$1" + local flag="--${2}=" + local extra_options="${3}" + 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 + } + + # my_print_defaults needs to read stuff in $HOME/.my.cnf + local -x HOME="${EROOT}/root" + + # Make sure the vars are correctly initialized + mysql_init_vars + + # 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!" + else + einfo "${PN} data directory detected as '${MY_DATADIR}' ..." + fi + + MYSQL_TMPDIR="$(_getoptval mysqld tmpdir "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")" + # 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%/*} + + # 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 [[ -n "${MYSQL_TMPDIR}" ]] ; then + 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 data directory '${MYSQL_TMPDIR}'!" + else + rm "${_my_tmpdir_testfile}" || die + unset _my_tmpdir_testfile + fi + else + # If no tmpdir is set, mysqld will use default system tmpdir. + # However, we are using tmpdir from package manager at the + # moment which maybe isn't writeable for $MYSQL_USER... + MYSQL_TMPDIR="$(_mktemp_dry "${T}/mysqld-tmp.XXXXXXXXX")" + [[ -z "${MYSQL_TMPDIR}" ]] \ + && die "_mktemp_dry() for '${MYSQL_TMPDIR}' failed!" + + mkdir "${MYSQL_TMPDIR}" || die + chown ${MYSQL_USER} "${MYSQL_TMPDIR}" || die + 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 + 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 + + 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 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 -a config_files + + local config_file="${EROOT}/etc/mysql/mysql.d/50-distro-client.cnf" + if [[ -f "${config_file}" ]] ; then + config_files+=( "${config_file}" ) + else + ewarn "Client configuration '${config_file}' not found; Skipping configuration of default authentication plugin for client ..." + fi + + config_file="${EROOT}/etc/mysql/mysql.d/50-distro-server.cnf" + if [[ -f "${config_file}" ]] ; then + config_files+=( "${config_file}" ) + else + ewarn "Server configuration '${config_file}' not found; Skipping configuration of default authentication plugin for mysqld ..." + fi + + if [[ ${#config_files[@]} -gt 0 ]] ; then + if [[ -z "${MYSQL_DEFAULT_AUTHENTICATION_PLUGIN}" ]] ; then + local user_answer + + echo + einfo "Please select default authentication plugin (enter number or plugin name):" + einfo "1) caching_sha2_password [MySQL 8.0 default]" + einfo "2) mysql_native_password [MySQL 5.7 default]" + einfo + einfo "For details see:" + einfo "https://dev.mysql.com/doc/refman/8.0/en/upgrading-from-previous-series.html#upgrade-caching-sha2-password" + read -p " >" user_answer + echo + + case "${user_answer}" in + 1|caching_sha2_password) + MYSQL_DEFAULT_AUTHENTICATION_PLUGIN=caching_sha2_password + ;; + 2|mysql_native_password) + MYSQL_DEFAULT_AUTHENTICATION_PLUGIN=mysql_native_password + ;; + '') + die "No authentication plugin selected!" + ;; + *) + die "Authentication plugin '${user_answer}' is unknown/unsupported!" + ;; + esac + + unset user_answer + fi + + local cfg_option cfg_option_tabs cfg_section + for config_file in "${config_files[@]}" ; do + cfg_option="default-authentication-plugin" + cfg_section="mysqld" + cfg_option_tabs="\t\t" + if [[ "${config_file}" == *client.cnf ]] ; then + cfg_option="default-auth" + cfg_section="client" + cfg_option_tabs="\t\t\t\t" + fi + + if grep -qE "^(loose-)?${cfg_option}\b.*=" "${config_file}" 2>/dev/null ; then + einfo "Ensuring that ${cfg_option} is set to '${MYSQL_DEFAULT_AUTHENTICATION_PLUGIN}' in '${config_file}' ..." + sed -i \ + -e "s/^\(loose-\)\?${cfg_option}\b.*=.*/loose-${cfg_option}${cfg_option_tabs}= ${MYSQL_DEFAULT_AUTHENTICATION_PLUGIN}/" \ + "${config_file}" || die "Failed to change ${cfg_option} in '${config_file}'!" + else + einfo "Setting ${cfg_option} to '${MYSQL_DEFAULT_AUTHENTICATION_PLUGIN}' in '${config_file}' ..." + sed -i \ + -e "/^\[${cfg_section}\]$/a loose-${cfg_option}${cfg_option_tabs}= ${MYSQL_DEFAULT_AUTHENTICATION_PLUGIN}" \ + "${config_file}" || die "Failed to add ${cfg_option} to '${config_file}'!" + fi + done + unset cfg_option cfg_option_tabs cfg_section + fi + unset config_files config_file + + echo + + if [[ -z "${MYSQL_ROOT_PASSWORD}" ]] ; then + local tmp_mysqld_password_source= + + 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 + ewarn "Ignoring password from '${tmp_mysqld_password_source}' section due to newline character (do you have multiple password options set?)!" + MYSQL_ROOT_PASSWORD= + continue + fi + + einfo "Found password in '${tmp_mysqld_password_source}' section!" + break + fi + done + + # Sometimes --show is required to display passwords in some implementations of my_print_defaults + if [[ "${MYSQL_ROOT_PASSWORD}" == '*****' ]] ; then + MYSQL_ROOT_PASSWORD="$(_getoptval "${tmp_mysqld_password_source}" password --show)" + fi + + unset tmp_mysqld_password_source + fi + + 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!" + fi + + MYSQL_ROOT_PASSWORD="${pwd1}" + unset pwd1 pwd2 + + echo + fi + + local -a mysqld_options + + # Fix bug 446200. Don't reference host my.cnf, needs to come first, + # 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 + optexp="--(skip-)?${opt}" optfull="--loose-skip-${opt}" + egrep -sq -- "${optexp}" "${helpfile}" && mysqld_options+=( "${optfull}" ) + done + + # Prepare timezones, see + # https://dev.mysql.com/doc/mysql/en/time-zone-support.html + local tz_sql="${TMPDIR}/tz.sql" + 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 + + chown ${MYSQL_USER} "${tz_sql}" || die + + local mysql_install_log="${TMPDIR}/mysql_install_db.log" + touch "${mysql_install_log}" || die + chown ${MYSQL_USER} "${mysql_install_log}" || die + + # --initialize-insecure will not set root password + # --initialize would set a random one in the log which we don't need as we set it ourselves + local cmd=( + "${mysqld_binary}" + "${mysqld_options[@]}" + "--initialize-insecure" + "--init-file='${tz_sql}'" + "--basedir='${EROOT}/usr'" + "--datadir='${MY_DATADIR}'" + "--tmpdir='${MYSQL_TMPDIR}'" + "--log-error='${mysql_install_log}'" + "--user=${MYSQL_USER}" + ) + + einfo "Initializing ${PN} data directory: ${cmd[@]}" + eval "${cmd[@]}" >>"${mysql_install_log}" 2>&1 + + if [[ $? -ne 0 || ! -f "${MY_DATADIR}/mysql.ibd" ]] ; 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 + + local x=${RANDOM} + local socket="${EROOT}/run/mysqld/mysqld${x}.sock" + local pidfile="${EROOT}/run/mysqld/mysqld${x}.pid" + unset x + + local mysqld_logfile="${TMPDIR}/mysqld.log" + touch "${mysqld_logfile}" || die + chown ${MYSQL_USER} "${mysqld_logfile}" || die + + 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 + + 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="${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 + + # 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 + + einfo "${PN} data directory at '${MY_DATADIR}' successfully initialized!" +} diff --git a/dev-db/pgxnclient/Manifest b/dev-db/pgxnclient/Manifest index c8c37e4625ba..2792b03e8752 100644 --- a/dev-db/pgxnclient/Manifest +++ b/dev-db/pgxnclient/Manifest @@ -1,5 +1,5 @@ DIST pgxnclient-1.2.1.tar.gz 87275 BLAKE2B 794ee6201988ba523cdcb4ee5a6287625cb3dd8a30ad750266d7adb739792b7f8e852d5d01f746fb6b05b54c98d677854dceacc57e41b05efba094efabc6a129 SHA512 3fa864b1ebb5dedaf75515b5efe4c453f02acff558f7b82d2648da62e58c93e050049a7688171a69593784d9963bb62f4ad3674d526284554dbeb4f4a4ea1dbf DIST pgxnclient-1.2.tar.gz 86436 BLAKE2B 796191d31000ff75360e0990bb20ca88af0fb1b908aac9ca7a6b7309b5420c56d045a67c775e8d5dda166f37ad956314f65bd2032c114cac7414bef9ad1a0d8e SHA512 d677f8d5346caf4de5d7e0d4e4031b8bdd932e343af7fc33e8895ebe51b1e9e6a11d7300d9e98ddc10242854f7d39c0a4196f41938e42f0b0e5158454e386deb EBUILD pgxnclient-1.2-r1.ebuild 788 BLAKE2B 6d10568406f8432c8773efc91d1a8b5662309c378d77f05175751cf8360bb59f39f87fbf2395656470384be6cf81621f46c376e3145dd4320642a7e94ed6d292 SHA512 84c19cd6a55d077484bdfa5674fce3da340f9a181987df8b5da99ed80da9f0353dab681bbc32b326e5525356b31e56f5a3384c3c7f4b81125e1e9ebe7c69a29c -EBUILD pgxnclient-1.2.1.ebuild 794 BLAKE2B fea89e9123fcb002da0a5c519b2d320c057e4a0d9f37d683dc5e598edfb3c57299a4442abb360eb44f40b533d094fd4c2b25c6321f520b031f1419766885bbb1 SHA512 ce4fdd3c2283ef90062cca24e711030d4499595ad98c9f23ae4e4490811f3d199a97f54be55e77658f43cc5a780328f54e5c101c6787c5fe0af027f64264757f +EBUILD pgxnclient-1.2.1.ebuild 788 BLAKE2B 7702c7c55c7fe507a7fa02016a7129a86cc77c23ea7650dee57d3c31b96caaced1c7cf34e344c57f4c2d4a55d3f88b4e5ee5c885997dfa2f8e0ca6ab86e43c8c SHA512 83c988cbecab73a3c2cfa1eeb0ba38ec498c0a06ba0c09c7c465c4443d5daa934aa968c427253d4e40ed245fbd5000da1561bbf3646ab8b51a2b66df4ece7d54 MISC metadata.xml 477 BLAKE2B 69bcece85da5b9490a5aec5f94264a420d5babb983d602188b4bcad58f35da663216bb52e694009562e518b716a12b05734a2ee81a1219d93641268630a68e3b SHA512 63a1019650d2bfec1f0dab904cabd0de847f5d7cb5ad62dd04ca93a6cf7c25ef2a727a8dc0700a00958b841f7ffaa2c99f608b4cb1872a31a1dc920d0834d22d diff --git a/dev-db/pgxnclient/pgxnclient-1.2.1.ebuild b/dev-db/pgxnclient/pgxnclient-1.2.1.ebuild index 3ab85dc3dcf8..7a21cde057ad 100644 --- a/dev-db/pgxnclient/pgxnclient-1.2.1.ebuild +++ b/dev-db/pgxnclient/pgxnclient-1.2.1.ebuild @@ -2,7 +2,7 @@ # Distributed under the terms of the GNU General Public License v2 EAPI="5" -PYTHON_COMPAT=( python{2_7,3_6} ) +PYTHON_COMPAT=( python3_6 ) inherit distutils-r1 diff --git a/dev-db/postgresql/Manifest b/dev-db/postgresql/Manifest index fdea7222817a..d847a633ff76 100644 --- a/dev-db/postgresql/Manifest +++ b/dev-db/postgresql/Manifest @@ -10,60 +10,17 @@ AUX postgresql.init-9.3-r1 4999 BLAKE2B f2bc23a51b6d9643bbc14320aaa9c41b7eb1df86 AUX postgresql.service-9.2 1666 BLAKE2B d4b81415539db3d78e0f5908185f903b70966ce3a27feed9bdf80eb6a9065ca6bd4b49e4bb822c41548b7efa9de37656378c395a8bd00a7a3daaa52911a2f674 SHA512 8c64b59f1e80096382a7166e1e8f183a5b9cf14c75138c15a39de74b983bfbed2f41cf9b33b2c72c3b9c79130c10104836a3505c96cb18ac1be1297c0fce1af0 AUX postgresql.service-9.6-r1 1477 BLAKE2B 2a652d5b2892f3a52f484fcc0b4f4dad09cf4b46c3739c3f805072040a26128cb2ad9a25d4a7c9f109a95696d739538d379af6bac53c656f5c41af45b6110de5 SHA512 9e2b04923f6ebec1424c0f276c58a6a0c4933f2de5e2a9776169227729afd06ce5284461be8b6ed70e5aaff2a68b9f96c6893d867d35761c9977f9847ccfe93d AUX postgresql.tmpfiles 39 BLAKE2B 25a5725af53c8e4e4009887e998172dd863ce218a5438351194548c4fc8ea15308dfba3602d5a922cf49b46015198268a4a4528119d8a74dcef4cc4c1767c052 SHA512 498060f2a597cf374f4fb31deaa2d6c5b00edef68efc0e71b82bfc20b717ae12518ba18fcb455a0c518ebba1a0868f38321470616151d02fa79b889a66dcb9f8 -DIST postgresql-10.10.tar.bz2 19012049 BLAKE2B 44ed5cfe2dc57ff3533faa1e921c981e0e437fe19adccc2ad87b939ec0c1bd5772ed8b0d6a7815dfc70c15149725250cb9431d58388fd3331a2bc2623b9959fb SHA512 60cafe4b27a194949aff482dcce4fa096a9916f37205868437a32afb8964df71934b619a0b891fe85eb7c7f9b11775cffbbedca589e78feb6c4184eb224b48bc -DIST postgresql-10.11.tar.bz2 19017947 BLAKE2B 952d0fc76b665545eb512e0a6df6d2dafe0eaec4bdc774968d0a49dd6f6873b35a317ca6fd2bd74f36864d10f5a61e1920440e066522f982d0a7f1ce285143a9 SHA512 ce90b34e74d423b6db1f0e840b8e09579965c020fa2cfe3e567b604d3354d91e00a4347d559876be829aa89db44f84736e154495708ba9908f1d850446a1fc7b DIST postgresql-10.12.tar.bz2 19020488 BLAKE2B 2177e9b63e21a634e1d8ea060b5bd0a7360d81ece64f50dd614e6cdd6b0cf0dcbd3896ef2c11bd1431ce7a964ac8876d24f368d7f7eb309e3d432856d7546f2a SHA512 6accc66cbbae811509095c33e8a8d17ddd11d9e307267312e3d09df90469db4700a5806166d66f25d77769d3ef88653c98dfc7d05dd053f10434b03e0a9e33b7 -DIST postgresql-10.9.tar.bz2 18981395 BLAKE2B ef2ac003b393ea7cbf24c45fac6b3dc69df2a8694a9e891d5a68f7310d63fb816649d16a7351d03b63a4eb2256703efcab616a0146324478335267c39f3b9829 SHA512 4e2f30a0fd262f2e3ce5fc836425be635326600cd6cd4e117c57f59ea7ab2e9ea463a8d357fe7adb8c0dd0094e43d08efc2a137f8f9975715a5908e35920f98e -DIST postgresql-11.4.tar.bz2 19759635 BLAKE2B a3f35df40d31dce52073eeacf4e16bc7ccb487dc0a6e15b84d087f04fd130b66b1168ece3edc63927c377ca1044b54ccb3db5fb9b4a5c86a5b0e179a6678c73c SHA512 159fb84134e05ddc58e40a879ca52ed4d58ced7bcd1e7310d59bda84f9055339a31a92cfaab2c063a88685f7417b9a828534394bf9a2477fc33d1fb6cd26186b -DIST postgresql-11.5.tar.bz2 19773087 BLAKE2B 32dca67ddfe2f6a6801a5d82a25fe7df0cc2dd89c35eee87a57ebe6391b8d7d4bccc59d6cac3e821ad76731ab319e3303f2fcbce9ee8cda1cfef13b2185c0ab1 SHA512 537148079dc6c33cfb9bf9722171e524707b42ef01369deb968d0d6e8fa9b7f16f6ce67139d9dc45fb7385defbf56aa2c0affe5ee9d76e996f31e47486192141 -DIST postgresql-11.6.tar.bz2 19843202 BLAKE2B 379953e0a0abb5a5abb109370cf2b95979321524031fe754c0a5a2cde636b2fdafa1da9c9ee84638a884cec3a312607f8ac7da6b1817c3b700a44c3025fd1944 SHA512 de6833c0df8dbac7bc498ac573dc4c3645070d9bbdd6b5d89db3ef41e86e7fc19d5e6450aa46ee2a1392d86c33acf6b9364b2863caac49f45351a46647feecbd DIST postgresql-11.7.tar.bz2 19890063 BLAKE2B 461c372567ff0b4ff4da52889be5d2822b56889e4890b33c9a71f1105ad629b4f5bec95c4fbf5aebbdd4445e0ff451a7d8df04ae7b5bf7cf0075c3226a41b19b SHA512 32c7ace228f9895241ce0d925fbfc60c0cd39f4cd35368fb10dc7db046151ffd59a9895b4c30a529627f0103051e84b4992ed60312cccd292489f3037076ca1e -DIST postgresql-12.0.tar.bz2 20177458 BLAKE2B 614222e43519a83044587981cb04ab7e437357d5b2784068d425aaeb67df54f44aef4aaaf780bd3f83f012c0fc8f41723bc83b6e44e7bf2707857c491b8d129b SHA512 231a0b5c181c33cb01c3f39de1802319b79eceec6997935ab8605dea1f4583a52d0d16e5a70fcdeea313462f062503361d543433ee03d858ba332c72a665f696 -DIST postgresql-12.1.tar.bz2 20213711 BLAKE2B 670e33c23a14527aedb694647ff2d2670df159352ef10c11e5895aafffaa752bd49ee7b1991262f4c7548dc8c617e06f651c6098a676b4462ed06e3982d0f5fa SHA512 f45b1762fd60b6f7419305d108b7fc521e3a7afa833d3aacccba814465baf40d19f57ff9bf2909d726c4c94a1cd99a39f1aa8e45fd0364cdedbcbed36ff48caf DIST postgresql-12.2.tar.bz2 20363545 BLAKE2B 7b0cfe841d46b117ff5dd793be5537e916f92255eb0d000681ed62c497eef34c5d1261126be408f2b7f95274485e2787869cd4063461ab248b650c168b62548d SHA512 0e0ce8e21856e8f43e58b840c10c4e3ffae6d5207e0d778e9176e36f8e20e34633cbb06f0030a7c963c3491bb7e941456d91b55444c561cfc6f283fba76f33ee -DIST postgresql-9.4.22.tar.bz2 16848787 BLAKE2B 5c2aaef13ef0cf33c421e6839877a8e4e1fc5dbe41d9cabefddd369925869f92f6c6b8a124b5778f9b25359103f0a7ada1eddcaf4bac498709f563928f25e7e3 SHA512 f11623a89b2320616fd53eda52da544bdfcb63bff08cb78fccde134ef628eee7ee90b3de6952f4e08c10297d356624faabf0e5b181b0105f51797796cd04efef -DIST postgresql-9.4.23.tar.bz2 16848808 BLAKE2B fd747fb3f6f540190ecbd53116ef7b8b812d05f5968e32c9d09c5902239eaf073281262dba9836514344303a3c894f48c617e050ce713be7c09f53ee49c7b3cd SHA512 b1eb392b939ac8369c76e4ecc142c78f380afc498b60ec0ea97acb16c21ffa5c11a24c2c46463032865955b7c531492c08feb6ef1efc46a549369f026594ea61 -DIST postgresql-9.4.24.tar.bz2 16842941 BLAKE2B 999a33addd493d1169ba3222a269fea827f4ed866453727bf9545d6a8873943d56b8e71773daf0f116150dc557afaf2e80dc570e8f351ba64b196ae8bcd8fbc9 SHA512 8e7b4da8a5cf48cf4d98cce117614f7ab594087d0002f996c1fedc2a38af6eaa663ad3ce67ced6d6b0fd6d0b00aee932025bf50a4314933ba535716577e9393f -DIST postgresql-9.4.25.tar.bz2 16849015 BLAKE2B 1d843fe29cdb122515f2bded8a04489772f7c40aa54774a454fe0815cc1c6306b42ff3115e1dfb7dc93b483d62611f1e773436c1370462326678f78bc25f3827 SHA512 be45c47a17788be40a2beca058b5dcbf1ded985838d1c85229fbece174fca222d5ac07025c764d40c92f823d6bf784975a25b79a545b903434be8bcd24efb9a0 DIST postgresql-9.4.26.tar.bz2 16871195 BLAKE2B f26fd335293669a815a51ceb994b66e154c66f96f91e4c68d7df3490ad25f4b0366ebf7bfe2b209ff34965ea27a08562ace050f40d49cec94eb576d7a1becd1c SHA512 7d379d139c7b2bdac1df38743cbb46a1790a8d5174e8cf1141b7b4febcbc8f612e347bf4d355684eef24dfc73bb2796f85fc532908f26ba7195c685f198cbb72 -DIST postgresql-9.5.17.tar.bz2 17563469 BLAKE2B d40b7f95d03db594144b4882f36bbe22f348faab0b8d67eda3f946448bb0e09188eccdeb4d1c92742fb29a920b30ede55e536a863b22d2009283eab66679122d SHA512 bb468528b1f18166cda0be136f31a632859ffe6e6800233b1cb0e91ce11d2d00d3dc108a74580b5552a4d30b9f1b6849c91576cd497beac788c429815c66eac5 -DIST postgresql-9.5.18.tar.bz2 17570161 BLAKE2B aee7e4570f2571e507fd972e86d3a6a9243d8fd33c356305998a8dce461bc9b06b45e1ff4267a9eb47f58a793c0b70bce0babfc0dce939cb34b1436a55a5d9fd SHA512 0487ac2891c800de045135d4b153659ec10c28750a09e0b87343f8e7145a11f1783ed0b6ca60829776faae1430c8050cc7661c780f171f1b2621f1673a32e6d1 -DIST postgresql-9.5.19.tar.bz2 17571998 BLAKE2B 24bd617ecef4d0add443d20ea3528eb8d48d83f31a3eaf726213c98211418efd2f35d846964049284332c9d20228308c7441cb3e8ee35f0188d060fc75239788 SHA512 46de40e49910311bf5291e1ece421ab9628641b18bf84cd1cb8093a584dd0358e3b6d2b086f82e9b06ce699a6e38018c3515ea591355078392e8d3d2fe4a7c64 -DIST postgresql-9.5.20.tar.bz2 17610134 BLAKE2B 26400eb8906186c3d1bb2ee1a16248540ed11d61445caf9d657dd47faabc2df8116ffa02727152d37bf88ac10f935887dc449bc421c605fa107bd5a24f38c3d5 SHA512 75558d05f6bee6fad65ad0b4dcb428b50bcf003c4fbd878747010988958464d7119dd8121a8817c3cad83c20bcae6cd550fc01fbca39f54e670d93fc70688bea DIST postgresql-9.5.21.tar.bz2 17640928 BLAKE2B 8ffcf0befc331317a32d63d3cdfe44f7743f72f18b4bc46bee5ee80f8c489b4b1ef26abc8219f277acc922657fc21e3dc31f3fc9838621f44d95cc9405fca43b SHA512 8527356ee3b4f151c832aef50a8b96e923e0a6c77e5fe6ad597f50527f9d084a8feab7bede8fdbe29aab44383577d3f86e5286fb34e2d2b696cde34bd922e69d -DIST postgresql-9.6.13.tar.bz2 18767279 BLAKE2B c1ec780a7f938f878425cbd6556145e60a613135129daaacc52e9a699cc448a22481b01fac20d0c09373ea6a026f39bc58234aae4f1126333b94f621981a8135 SHA512 65cc70410ad4a1a738b92855b92eecdbb9efbbca0eb9a45a138d47b696c8f9c9cd19073fbfdf5c80eea7633d0be29b4ed8acbadd38724acf8f18c90bb30f9b26 -DIST postgresql-9.6.14.tar.bz2 18787744 BLAKE2B be5a0d90fe1cd5ea682d8446e512271175f705bc49514215535d7aa4b631669846c0bd6167f985028c07dc5d6d394a1ea809028c5a5e15a5f010e85c2bede8cf SHA512 dccc183a6992ef4ece4ef5c638339708ab484e571ecd66ed993c9071cd55f250b4277fd3367f9a5ee545aa83e29dc5f7a239200e200e3314d5acc847f35e790c -DIST postgresql-9.6.15.tar.bz2 18799121 BLAKE2B 5dee0fac7592cecf4412deaef54cedbd86eb6081fc268b6ef8a5f01c31af930747749fb54a77d766e1d6ef705bab5d550a7bace25c86d201f25ed69163d920fc SHA512 cc35a059bf59ea3487c17a8432b791ca2a19afaa24b07403a8d33904b3a97ebe601e3036ca8ec766c54cb87a7def7d4618a425a4446e6832391185d7c71117db -DIST postgresql-9.6.16.tar.bz2 18806372 BLAKE2B f5d7287264b05ab6bd157adf05d78597c7e7281ef40d4616ad66f2434a686c68845ad21883bcc97f6ea299a785109e1541d6c75e40ba383d80e9703331d9c624 SHA512 7083d670883b203946f68bcf1216dd1cbd904220b4c95e25855f9a8904334fd7e87509c905f589398ad7b165869b75288c2e4f49b14263ce4891347ecd4485b4 DIST postgresql-9.6.17.tar.bz2 18812282 BLAKE2B 0bb48445201aae1d6b4f5a77652aefaaa629799a019c3b81a14e554a88167530002931c2b0d658731b26a38bd09487f79a6ef514b0955982d6037b383c021819 SHA512 a76f328523517f664e4fc59a4d27e476bc6300e49370712030caae40aa160acb1e6aecc7cd3b3440125713069932df812eb8d75377a3df63e59c9292419c2aa8 -EBUILD postgresql-10.10.ebuild 13841 BLAKE2B df3d99500bc7e22187705433dd3c3407736b78c7af7071e8859cc61d568b2cd253294c9284e15b39304424886e174107396f69b0525d97f266c975850545f4f3 SHA512 923ad584ce13e6c86776b6efec47815926ff52636c154b9737abe9ecbfb90dedcf123218395959be8ad81b3dd303b3834c76c025f230496a64a69c1769f90b5e -EBUILD postgresql-10.11.ebuild 13833 BLAKE2B c255fd95d1948451496a85e44ab1853697a6d5adc6d85e442e2589acd21880c00b7e9b1ad31ad3a8a53ed33935b56e0ae418035521773ed2bd82c8380bac6204 SHA512 14a1e4cb181ded8e6689b4c3adf3717c8ae259284863dc676874244a1928af5ea5559243d27dd9d271b433dada172fa75368eaddc218c1a12786dedac79240c7 EBUILD postgresql-10.12.ebuild 13833 BLAKE2B c255fd95d1948451496a85e44ab1853697a6d5adc6d85e442e2589acd21880c00b7e9b1ad31ad3a8a53ed33935b56e0ae418035521773ed2bd82c8380bac6204 SHA512 14a1e4cb181ded8e6689b4c3adf3717c8ae259284863dc676874244a1928af5ea5559243d27dd9d271b433dada172fa75368eaddc218c1a12786dedac79240c7 -EBUILD postgresql-10.9.ebuild 13835 BLAKE2B 66ec0377c8952fe693499a65e4e4ba4c939249ef7096df53a4a32fd16a4d45a58f4a27fe1ccde862f5c8c58c6b4fd5038de5a9a93aee29b5d9c55793c7c7418b SHA512 1da2584d17c178e89484f03f0194d160e18de09632fc864c57d944e15c1065d66027420ccf2ff17ec7a11ff27ed64da8ac79e12b72a29d1951ff1669ece1e3e7 -EBUILD postgresql-11.4.ebuild 13961 BLAKE2B f7a7767959b1c4c0566ff87a0d9ad3602a2672cf7da4f9bbd197bf954baaf8153e491d66ff53133abe822ec05d491f1b16280e6b0c6f4aef0ad766531df1890d SHA512 7f6c43843c1f67829bbab0301324c984ee4e47c4e1963de0f2724cc72a70835be85c40542503209c8cc7f12bc75b19d4e16f3c912bba4bb46d9c11cd14247910 -EBUILD postgresql-11.5.ebuild 13968 BLAKE2B 13409d72f5e57b360de6fee668fa9b1d50cc679ea0be44baaf03489f83560685fbeabb139f2ea0fd8b147e49b75a51e4bdbc5494c95c9828b2b4f78f03f980ef SHA512 f8dcfda29e435d2e24d47c204a122f8664c4e37b58ca1034d787a7200038c81d0cad0cc23eaac1c2fde9e3384859556e8acb35ab5df7184c472c1f99f3ad65e2 -EBUILD postgresql-11.6.ebuild 13960 BLAKE2B ac5f232278ecfc2d832089b0707f69665fd96a9db916a06e72d75151b906d6d593e78f4348437da9cadd8a7b822707b1c2ad26774317287fa01abae4ec76adb8 SHA512 656589314ae0f79586e1f2cdbc12511f8e5bd29cb726706fd22ac6d1df7500b713488b344feb150f7ea2aadec690756fcea2b9f3637fdd9871a26c58799e1106 EBUILD postgresql-11.7.ebuild 13960 BLAKE2B ac5f232278ecfc2d832089b0707f69665fd96a9db916a06e72d75151b906d6d593e78f4348437da9cadd8a7b822707b1c2ad26774317287fa01abae4ec76adb8 SHA512 656589314ae0f79586e1f2cdbc12511f8e5bd29cb726706fd22ac6d1df7500b713488b344feb150f7ea2aadec690756fcea2b9f3637fdd9871a26c58799e1106 -EBUILD postgresql-12.0.ebuild 13944 BLAKE2B ba51e934f5c1b5dd16c2812956f1bf6201033ee3defbd253254b117bdc43e4911500fce8792adfb01210d84d7468e7fe69d9decabba94d1c98922879e8cabf07 SHA512 45c5d08817bddc5d1ea56c0fee37411a6d10645eccebf7aaa48689b5660b212bf93d6618413fc118033d1b98dae47b2323920f12287854644035d8270bcb1fd0 -EBUILD postgresql-12.1.ebuild 13932 BLAKE2B 8c1819ee06822a77a149cc69f9749ae0163cb2408f237eb241d26f99e7f2873002be1b89fd54f0f977f34812f39bf3fcdcc280880b5bfd140867e094df1c61e9 SHA512 f1490ef4217484bf337637dad1d34affab95657d5160e5c6a1e8d403fc9618a84cc0593fbe4842711b539c7b2ebea41f95806ad15909b95b67587967ba178180 EBUILD postgresql-12.2.ebuild 13932 BLAKE2B 8c1819ee06822a77a149cc69f9749ae0163cb2408f237eb241d26f99e7f2873002be1b89fd54f0f977f34812f39bf3fcdcc280880b5bfd140867e094df1c61e9 SHA512 f1490ef4217484bf337637dad1d34affab95657d5160e5c6a1e8d403fc9618a84cc0593fbe4842711b539c7b2ebea41f95806ad15909b95b67587967ba178180 -EBUILD postgresql-9.4.22-r1.ebuild 14435 BLAKE2B 1df38eb7790bfb7bbe7f70cfc07f439fe6ba55d957a5a1d28508a867dc3f66df41c9c285a2034e95f950cb4c6c8ef2310d138ff00e4f7b4ecc6e76afab3b06fe SHA512 4bc15ff815ae2c19d09f9cbb4eb98da95201fa800b864724a657633b7ece79139529a8741c7936bf7f8e89d3223215f3c868294265705a02c325e0580cc2fc22 -EBUILD postgresql-9.4.22.ebuild 14299 BLAKE2B eacd329211742be4d5ea5049936d302b6e1e3171eed051d0f9340d85ce0702cbc8589ac8121f4e6e4fe0f3076f1cb989ab64b1a3ae9b6e6cbaec079e620fd117 SHA512 e9c53dc3c59b2438071579a601670d8246e38a5a0775b4e779d3597b83aba0f30fdeb91c5c096c63a31c517b1455e31c5bc1316db811941f7a5fa7f87a89e992 -EBUILD postgresql-9.4.23.ebuild 14428 BLAKE2B 455ff868fad6799eacf6420f3aa30427e870221041770dcb0ae16498c6e9da83dd42a8feebcdcc1471ab877b00ac2e2d476e29d30cfe60084f3de7d9be703a3f SHA512 eb0bac6200ce852296aaecd7d1ee5abc4ae2e5e588c5ac85039e25554940022f8da0d6be85d17cf5bebda376dfd6215187023e5b488c99b974163ef50783d1b2 -EBUILD postgresql-9.4.24.ebuild 14435 BLAKE2B 1df38eb7790bfb7bbe7f70cfc07f439fe6ba55d957a5a1d28508a867dc3f66df41c9c285a2034e95f950cb4c6c8ef2310d138ff00e4f7b4ecc6e76afab3b06fe SHA512 4bc15ff815ae2c19d09f9cbb4eb98da95201fa800b864724a657633b7ece79139529a8741c7936bf7f8e89d3223215f3c868294265705a02c325e0580cc2fc22 -EBUILD postgresql-9.4.25.ebuild 14434 BLAKE2B 580507e33bebd4f3de486bfe2d42b6967ff151d8f22b988df1b14f0ab58a1a24b73453519e51a97d5d0ebabb2cd102ad56da351186c1883080a22d717471caad SHA512 50e4a6c3851a0f2b4ef16affcc740058d42201054505416935d55b21f3ca19e6cc3a25e15937f992a327e5836d48a9e1365c0917e55d12aab61bf37115b5df2c -EBUILD postgresql-9.4.26.ebuild 14442 BLAKE2B 3d7727934b37c4263ea29c2f652ee083e01bb28749e11c4598b7fcb7c81568bd204851c7e3a5973796cb7b2a7df308174f80c8b44a34e7eb4f9d51b844b34408 SHA512 0c74f61263a4a24a5f4d8a5f501e524e30d40de07391ec03dfa937888ad4c16508888716bb39f6adb6403c0fc3a78b1cfee58e152be6f4b91e9a425487d95310 -EBUILD postgresql-9.5.17-r1.ebuild 14663 BLAKE2B 6aa2e866fc214566a521e7cfefc29f7aa60e83015e665219166b8fd8da88233b1284748084b92c36683bcb4acf1be5a86897d51ae0af40ee1aee249b9f68203b SHA512 6438248a3901f1497d1e0a3e6fc4e14966a66cf388f7445d81d0f288ae5c4b7fb074d85af0dde509963b476eccdbdf030ecbb2b6c6e27aaf6149d5b1a479a462 -EBUILD postgresql-9.5.17.ebuild 14527 BLAKE2B c6109f14d2093d03c4746713765ab3c60f42e35420dceca8a1a103c547aaeb189cb295b7ab85605dc9271c6baa1bad6f9370790a54a4003468a51efee85fcd83 SHA512 372c2eaa21a35df5165e9fe05756562c210089433089dc717a5cd491fb3796bb11b9e5187b0a4a894db7862d0d2cf67b2fedaa45cd855fc7d164a76a267600a6 -EBUILD postgresql-9.5.18.ebuild 14656 BLAKE2B 82fbae6377935143e39de5828c05477d683df4126a5573d9278a5fa78b8ad9212873cfd614590775462e9bdbb67f69a7c385ef8419f50a48d2a10244e7367369 SHA512 2129c293eb8904267e62ad80a1f4b23dd81a73459dc12899bc5def842342e69489560c7acfa012783aef79d2449cb5314231dc8f73ec1f5e3f6bef648b081010 -EBUILD postgresql-9.5.19.ebuild 14663 BLAKE2B 6aa2e866fc214566a521e7cfefc29f7aa60e83015e665219166b8fd8da88233b1284748084b92c36683bcb4acf1be5a86897d51ae0af40ee1aee249b9f68203b SHA512 6438248a3901f1497d1e0a3e6fc4e14966a66cf388f7445d81d0f288ae5c4b7fb074d85af0dde509963b476eccdbdf030ecbb2b6c6e27aaf6149d5b1a479a462 -EBUILD postgresql-9.5.20.ebuild 14655 BLAKE2B 8505dcafc0aa6a0d3b117f9970eae034cef29258476c30a9bcc36553854570d2436d5c9c0f682f2587aff667450433749cc1eb102af1c5e65b1c58d4ef14e634 SHA512 ce02b47d341aa7102b643310a9effdef2701f9554b683bb09ffde52567baf20b64b10e9cab1ad7480b6804d78cd2089f950ab2462dd18e2bc1938f912775c8f5 -EBUILD postgresql-9.5.21.ebuild 14663 BLAKE2B 6aa2e866fc214566a521e7cfefc29f7aa60e83015e665219166b8fd8da88233b1284748084b92c36683bcb4acf1be5a86897d51ae0af40ee1aee249b9f68203b SHA512 6438248a3901f1497d1e0a3e6fc4e14966a66cf388f7445d81d0f288ae5c4b7fb074d85af0dde509963b476eccdbdf030ecbb2b6c6e27aaf6149d5b1a479a462 -EBUILD postgresql-9.6.13-r1.ebuild 14896 BLAKE2B 7655a38de43f61c2b4c5af8dc0aef4987811e2093f41fc040d27fb9b821579331794a9443ff3f60f7cf8ea8f37f130ff5ee08ba02a1ef37fa2bd96b177f069b2 SHA512 b42557aea44ae1412704d2822569b0ebc082324568c2614140b398d99b08e267115dd7e4fc6257923f04e586ccc1620924a4a1da0701299d194585bc513b90b4 -EBUILD postgresql-9.6.13.ebuild 14760 BLAKE2B a188767a1307221eb73f5f8b7eabd423dc04512940bf2ec104c7d483edbe39c4690f1f47979992cd25275432629176948a534d86fe17499d4c5da756c27a6feb SHA512 cbb98e084914bc2e6616014414258bbb35a15c108468dd0099235c5868b7d3691d3e950eb101b127a665c89019487415c205843ef21d6fae3915dcc1be58ca60 -EBUILD postgresql-9.6.14.ebuild 14889 BLAKE2B aee8bc4a80bf06e31b1d7248470e370471e52e9e808e879292b488a6734468bdec481d5cd0c43925de7aa21e8b64e8abd7c816c726f21fc0d389903165a80254 SHA512 0e2fe1cc9a4566e0bdc78c3cc5c3a36e86abc2462c3d8c6c67a82b2a5b50b6c798b1d7d1cfdefe4a2c871f34c0bf113e543b2d022116f91e5238b2da8889c762 -EBUILD postgresql-9.6.15.ebuild 14896 BLAKE2B 7655a38de43f61c2b4c5af8dc0aef4987811e2093f41fc040d27fb9b821579331794a9443ff3f60f7cf8ea8f37f130ff5ee08ba02a1ef37fa2bd96b177f069b2 SHA512 b42557aea44ae1412704d2822569b0ebc082324568c2614140b398d99b08e267115dd7e4fc6257923f04e586ccc1620924a4a1da0701299d194585bc513b90b4 -EBUILD postgresql-9.6.16.ebuild 14888 BLAKE2B 1abd6b1f1e1281f3ef0f9cd00aacd6122efa9122f671299a43d6185dacabd0169f6aed87dcd3d96bc2bcfe155253a6332391a9ec8863e9f05935e41a0e9012e8 SHA512 660409283c196fa0e53ebe3e2f96cd680d2025071d134dc0dca33cd9501baf7ef211f85ace18919b2a122ee13b9aeb857de74d2b6290979dfc731a3e1a26e120 +EBUILD postgresql-9.4.26.ebuild 14434 BLAKE2B 580507e33bebd4f3de486bfe2d42b6967ff151d8f22b988df1b14f0ab58a1a24b73453519e51a97d5d0ebabb2cd102ad56da351186c1883080a22d717471caad SHA512 50e4a6c3851a0f2b4ef16affcc740058d42201054505416935d55b21f3ca19e6cc3a25e15937f992a327e5836d48a9e1365c0917e55d12aab61bf37115b5df2c +EBUILD postgresql-9.5.21.ebuild 14655 BLAKE2B 8505dcafc0aa6a0d3b117f9970eae034cef29258476c30a9bcc36553854570d2436d5c9c0f682f2587aff667450433749cc1eb102af1c5e65b1c58d4ef14e634 SHA512 ce02b47d341aa7102b643310a9effdef2701f9554b683bb09ffde52567baf20b64b10e9cab1ad7480b6804d78cd2089f950ab2462dd18e2bc1938f912775c8f5 EBUILD postgresql-9.6.17.ebuild 14888 BLAKE2B 1abd6b1f1e1281f3ef0f9cd00aacd6122efa9122f671299a43d6185dacabd0169f6aed87dcd3d96bc2bcfe155253a6332391a9ec8863e9f05935e41a0e9012e8 SHA512 660409283c196fa0e53ebe3e2f96cd680d2025071d134dc0dca33cd9501baf7ef211f85ace18919b2a122ee13b9aeb857de74d2b6290979dfc731a3e1a26e120 EBUILD postgresql-9999.ebuild 14401 BLAKE2B a660542da171012b67ad0c7fe61135d1a4357fca8c7fdba2c51d1149b758d27ad0efc2250bb95d4fc0399f2c78449cea9cdd0cae8f983dcc5881a9896e4571df SHA512 33fab6f657b833451d54230fa2c9c20604ab7b7a55667021390debb1d78acf98f017a971392decc7e5551df5d545cde4f3d421e6d1a5c061a19d078f5f0a28ed MISC metadata.xml 715 BLAKE2B 59ad51ae06a697fe649054d9fe13040423f425b95abdcf3797e1d0d5abba8c62d54cc8c1afb0be0d0a29d1a39d379912bd931925b5df480fb0bb9b238c36e598 SHA512 03027757eaf95313a6825710b1054a9671aa8396381789397006dfe2f66cd41e85cde418e792bf7d71d7db2413905816ff39685774219c1ea5e8b8d35c5cffd0 diff --git a/dev-db/postgresql/postgresql-10.10.ebuild b/dev-db/postgresql/postgresql-10.10.ebuild deleted file mode 100644 index 2153cb49c70f..000000000000 --- a/dev-db/postgresql/postgresql-10.10.ebuild +++ /dev/null @@ -1,465 +0,0 @@ -# Copyright 1999-2020 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -PYTHON_COMPAT=( python3_{6,7} ) - -PLOCALES="af cs de en es fa fr hr hu it ko nb pl pt_BR ro ru sk sl sv tr zh_CN - zh_TW" - -inherit flag-o-matic l10n linux-info multilib pam prefix python-single-r1 \ - systemd user - -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~ppc-macos ~x86-solaris" - -SLOT=$(ver_cut 1) - -MY_PV=${PV/_/} -S="${WORKDIR}/${PN}-${MY_PV}" - -SRC_URI="https://ftp.postgresql.org/pub/source/v${MY_PV}/postgresql-${MY_PV}.tar.bz2" - -LICENSE="POSTGRESQL GPL-2" -DESCRIPTION="PostgreSQL RDBMS" -HOMEPAGE="https://www.postgresql.org/" - -IUSE="debug doc icu kerberos kernel_linux ldap libressl nls pam perl - python +readline selinux +server systemd ssl static-libs tcl - threads uuid xml zlib" - -REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" - -CDEPEND=" ->=app-eselect/eselect-postgresql-2.0 -sys-apps/less -virtual/libintl -icu? ( dev-libs/icu:= ) -kerberos? ( virtual/krb5 ) -ldap? ( net-nds/openldap ) -pam? ( sys-libs/pam ) -perl? ( >=dev-lang/perl-5.8:= ) -python? ( ${PYTHON_DEPS} ) -readline? ( sys-libs/readline:0= ) -server? ( systemd? ( sys-apps/systemd ) ) -ssl? ( - !libressl? ( >=dev-libs/openssl-0.9.6-r1:0= ) - libressl? ( dev-libs/libressl:= ) -) -tcl? ( >=dev-lang/tcl-8:0= ) -xml? ( dev-libs/libxml2 dev-libs/libxslt ) -zlib? ( sys-libs/zlib ) -" - -# uuid flags -- depend on sys-apps/util-linux for Linux libcs, or if no -# supported libc in use depend on dev-libs/ossp-uuid. For BSD systems, -# the libc includes UUID functions. -UTIL_LINUX_LIBC=( elibc_{glibc,uclibc,musl} ) -BSD_LIBC=( elibc_{Free,Net,Open}BSD ) - -nest_usedep() { - local front back - while [[ ${#} -gt 1 ]]; do - front+="${1}? ( " - back+=" )" - shift - done - echo "${front}${1}${back}" -} - -IUSE+=" ${UTIL_LINUX_LIBC[@]} ${BSD_LIBC[@]}" -CDEPEND+=" -uuid? ( - ${UTIL_LINUX_LIBC[@]/%/? ( sys-apps/util-linux )} - $(nest_usedep ${UTIL_LINUX_LIBC[@]/#/!} ${BSD_LIBC[@]/#/!} dev-libs/ossp-uuid) -)" - -DEPEND="${CDEPEND} -!!<sys-apps/sandbox-2.0 -sys-devel/bison -sys-devel/flex -nls? ( sys-devel/gettext ) -xml? ( virtual/pkgconfig ) -" - -RDEPEND="${CDEPEND} -!dev-db/postgresql-docs:${SLOT} -!dev-db/postgresql-base:${SLOT} -!dev-db/postgresql-server:${SLOT} -selinux? ( sec-policy/selinux-postgresql ) -" - -pkg_setup() { - use server && CONFIG_CHECK="~SYSVIPC" linux-info_pkg_setup - - enewgroup postgres 70 - enewuser postgres 70 /bin/sh /var/lib/postgresql postgres - - use python && python-single-r1_pkg_setup -} - -src_prepare() { - # Work around PPC{,64} compilation bug where bool is already defined - sed '/#ifndef __cplusplus/a #undef bool' -i src/include/c.h || die - - # Set proper run directory - sed "s|\(PGSOCKET_DIR\s\+\)\"/tmp\"|\1\"${EPREFIX}/run/postgresql\"|" \ - -i src/include/pg_config_manual.h || die - - # Rely on $PATH being in the proper order so that the correct - # install program is used for modules utilizing PGXS in both - # hardened and non-hardened environments. (Bug #528786) - sed 's/@install_bin@/install -c/' -i src/Makefile.global.in || die - - use server || eapply "${FILESDIR}/${PN}-10.2-no-server.patch" - - if use pam ; then - sed -e "s/\(#define PGSQL_PAM_SERVICE \"postgresql\)/\1-${SLOT}/" \ - -i src/backend/libpq/auth.c || \ - die 'PGSQL_PAM_SERVICE rename failed.' - fi - - eapply_user -} - -src_configure() { - case ${CHOST} in - *-darwin*|*-solaris*) - use nls && append-libs intl - ;; - esac - - export LDFLAGS_SL="${LDFLAGS}" - export LDFLAGS_EX="${LDFLAGS}" - - local PO="${EPREFIX}" - - local i uuid_config="" - if use uuid; then - for i in ${UTIL_LINUX_LIBC[@]}; do - use ${i} && uuid_config="--with-uuid=e2fs" - done - for i in ${BSD_LIBC[@]}; do - use ${i} && uuid_config="--with-uuid=bsd" - done - [[ -z $uuid_config ]] && uuid_config="--with-uuid=ossp" - fi - - econf \ - --prefix="${PO}/usr/$(get_libdir)/postgresql-${SLOT}" \ - --datadir="${PO}/usr/share/postgresql-${SLOT}" \ - --includedir="${PO}/usr/include/postgresql-${SLOT}" \ - --mandir="${PO}/usr/share/postgresql-${SLOT}/man" \ - --sysconfdir="${PO}/etc/postgresql-${SLOT}" \ - --with-system-tzdata="${PO}/usr/share/zoneinfo" \ - $(use_enable !alpha spinlocks) \ - $(use_enable debug) \ - $(use_enable threads thread-safety) \ - $(use_with icu) \ - $(use_with kerberos gssapi) \ - $(use_with ldap) \ - $(use_with pam) \ - $(use_with perl) \ - $(use_with python) \ - $(use_with readline) \ - $(use_with ssl openssl) \ - $(usex server "$(use_with systemd)" '--without-systemd') \ - $(use_with tcl) \ - ${uuid_config} \ - $(use_with xml libxml) \ - $(use_with xml libxslt) \ - $(use_with zlib) \ - $(use_enable nls nls "'$(l10n_get_locales)'") -} - -src_compile() { - emake - emake -C contrib -} - -src_install() { - emake DESTDIR="${D}" install - emake DESTDIR="${D}" install -C contrib - - dodoc README HISTORY doc/{TODO,bug.template} - - # man pages are already built, but if we have the target make them, - # they'll be generated from source before being installed so we - # manually install man pages. - # We use ${SLOT} instead of doman for postgresql.eselect - insinto /usr/share/postgresql-${SLOT}/man/ - doins -r doc/src/sgml/man{1,3,7} - if ! use server; then - # Remove man pages for non-existent binaries - serverman=( - initdb - pg_{archivecleanup,controldata,ctl,resetwal,rewind,standby} - pg_{test_{fsync,timing},upgrade,waldump} - post{gres,master} - ) - for m in ${serverman[@]} ; do - rm "${ED}/usr/share/postgresql-${SLOT}/man/man1/${m}.1" - done - fi - docompress /usr/share/postgresql-${SLOT}/man/man{1,3,7} - - # Create slot specific man pages - local bn f mansec slotted_name - for mansec in 1 3 7 ; do - local rel_manpath="../../postgresql-${SLOT}/man/man${mansec}" - - mkdir -p "${ED}"/usr/share/man/man${mansec} || die "making man dir" - pushd "${ED}"/usr/share/man/man${mansec} > /dev/null || die "pushd failed" - - for f in "${ED}/usr/share/postgresql-${SLOT}/man/man${mansec}"/* ; do - bn=$(basename "${f}") - slotted_name=${bn%.${mansec}}${SLOT}.${mansec} - case ${bn} in - TABLE.7|WITH.7) - echo ".so ${rel_manpath}/SELECT.7" > ${slotted_name} - ;; - *) - echo ".so ${rel_manpath}/${bn}" > ${slotted_name} - ;; - esac - done - - popd > /dev/null - done - - insinto /etc/postgresql-${SLOT} - newins src/bin/psql/psqlrc.sample psqlrc - - # Don't delete libpg{port,common}.a (Bug #571046). They're always - # needed by extensions utilizing PGXS. - use static-libs || \ - find "${ED}" -name '*.a' ! -name libpgport.a ! -name libpgcommon.a \ - -delete - - # Make slot specific links to programs - local f bn - for f in $(find "${ED}/usr/$(get_libdir)/postgresql-${SLOT}/bin" \ - -mindepth 1 -maxdepth 1) - do - bn=$(basename "${f}") - dosym "../$(get_libdir)/postgresql-${SLOT}/bin/${bn}" \ - "/usr/bin/${bn}${SLOT/.}" - done - - if use doc ; then - docinto html - dodoc doc/src/sgml/html/* - fi - - if use server; then - sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \ - "${FILESDIR}/${PN}.confd-9.3" | newconfd - ${PN}-${SLOT} - - sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \ - "${FILESDIR}/${PN}.init-9.3-r1" | newinitd - ${PN}-${SLOT} - - if use systemd; then - sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \ - "${FILESDIR}/${PN}.service-9.6-r1" | \ - systemd_newunit - ${PN}-${SLOT}.service - newbin "${FILESDIR}"/${PN}-check-db-dir ${PN}-${SLOT}-check-db-dir - systemd_newtmpfilesd "${FILESDIR}"/${PN}.tmpfiles ${PN}-${SLOT}.conf - fi - - use pam && pamd_mimic system-auth ${PN}-${SLOT} auth account session - - if use prefix ; then - keepdir /run/postgresql - fperms 1775 /run/postgresql - fi - fi -} - -pkg_postinst() { - use server && use systemd && systemd_tmpfiles_create ${PN}-${SLOT}.conf - postgresql-config update - - elog "If you need a global psqlrc-file, you can place it in:" - elog " ${EROOT}/etc/postgresql-${SLOT}/" - - if use server ; then - elog - elog "Gentoo specific documentation:" - elog "https://wiki.gentoo.org/wiki/PostgreSQL" - elog - elog "Official documentation:" - elog "https://www.postgresql.org/docs/${SLOT}/static/index.html" - elog - elog "The default location of the Unix-domain socket is:" - elog " ${EROOT}/run/postgresql/" - elog - elog "Before initializing the database, you may want to edit PG_INITDB_OPTS" - elog "so that it contains your preferred locale in:" - elog " ${EROOT}/etc/conf.d/postgresql-${SLOT}" - elog - elog "Then, execute the following command to setup the initial database" - elog "environment:" - elog " emerge --config =${CATEGORY}/${PF}" - - if [[ -n ${REPLACING_VERSIONS} ]] ; then - ewarn "If your system is using 'pg_stat_statements' and you are running a" - ewarn "version of PostgreSQL ${SLOT}, we advise that you execute" - ewarn "the following command after upgrading:" - ewarn - ewarn "ALTER EXTENSION pg_stat_statements UPDATE;" - fi - fi -} - -pkg_prerm() { - if use server && [[ -z ${REPLACED_BY_VERSION} ]] ; then - ewarn "Have you dumped and/or migrated the ${SLOT} database cluster?" - ewarn "\thttps://wiki.gentoo.org/wiki/PostgreSQL/QuickStart#Migrating_PostgreSQL" - - ebegin "Resuming removal in 10 seconds (Control-C to cancel)" - sleep 10 - eend 0 - fi -} - -pkg_postrm() { - postgresql-config update -} - -pkg_config() { - use server || die "USE flag 'server' not enabled. Nothing to configure." - - [[ -f "${EROOT}/etc/conf.d/postgresql-${SLOT}" ]] \ - && source "${EROOT}/etc/conf.d/postgresql-${SLOT}" - [[ -z "${PGDATA}" ]] && PGDATA="${EROOT}/etc/postgresql-${SLOT}/" - [[ -z "${DATA_DIR}" ]] \ - && DATA_DIR="${EROOT}/var/lib/postgresql/${SLOT}/data" - - # environment.bz2 may not contain the same locale as the current system - # locale. Unset and source from the current system locale. - if [ -f "${EROOT}/etc/env.d/02locale" ]; then - unset LANG - unset LC_CTYPE - unset LC_NUMERIC - unset LC_TIME - unset LC_COLLATE - unset LC_MONETARY - unset LC_MESSAGES - unset LC_ALL - source "${EROOT}/etc/env.d/02locale" - [ -n "${LANG}" ] && export LANG - [ -n "${LC_CTYPE}" ] && export LC_CTYPE - [ -n "${LC_NUMERIC}" ] && export LC_NUMERIC - [ -n "${LC_TIME}" ] && export LC_TIME - [ -n "${LC_COLLATE}" ] && export LC_COLLATE - [ -n "${LC_MONETARY}" ] && export LC_MONETARY - [ -n "${LC_MESSAGES}" ] && export LC_MESSAGES - [ -n "${LC_ALL}" ] && export LC_ALL - fi - - einfo "You can modify the paths and options passed to initdb by editing:" - einfo " ${EROOT}/etc/conf.d/postgresql-${SLOT}" - einfo - einfo "Information on options that can be passed to initdb are found at:" - einfo " https://www.postgresql.org/docs/${SLOT}/static/creating-cluster.html" - einfo " https://www.postgresql.org/docs/${SLOT}/static/app-initdb.html" - einfo - einfo "PG_INITDB_OPTS is currently set to:" - if [[ -z "${PG_INITDB_OPTS}" ]] ; then - einfo " (none)" - else - einfo " ${PG_INITDB_OPTS}" - fi - einfo - einfo "Configuration files will be installed to:" - einfo " ${PGDATA}" - einfo - einfo "The database cluster will be created in:" - einfo " ${DATA_DIR}" - einfo - - ebegin "Continuing initialization in 5 seconds (Control-C to cancel)" - sleep 5 - eend 0 - - if [ -n "$(ls -A ${DATA_DIR} 2> /dev/null)" ] ; then - eerror "The given directory, '${DATA_DIR}', is not empty." - eerror "Modify DATA_DIR to point to an empty directory." - die "${DATA_DIR} is not empty." - fi - - einfo "Creating the data directory ..." - if [[ ${EUID} == 0 ]] ; then - mkdir -p "${DATA_DIR}" - chown -Rf postgres:postgres "${DATA_DIR}" - chmod 0700 "${DATA_DIR}" - fi - - einfo "Initializing the database ..." - - if [[ ${EUID} == 0 ]] ; then - su postgres -c "${EROOT}/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -D \"${DATA_DIR}\" ${PG_INITDB_OPTS}" - else - "${EROOT}"/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -U postgres -D "${DATA_DIR}" ${PG_INITDB_OPTS} - fi - - if [[ "${DATA_DIR%/}" != "${PGDATA%/}" ]] ; then - mv "${DATA_DIR%/}"/{pg_{hba,ident},postgresql}.conf "${PGDATA}" - ln -s "${PGDATA%/}"/{pg_{hba,ident},postgresql}.conf "${DATA_DIR%/}" - fi - - # unix_socket_directory has no effect in postgresql.conf as it's - # overridden in the initscript - sed '/^#unix_socket_directories/,+1d' -i "${PGDATA%/}"/postgresql.conf - - cat <<- EOF >> "${PGDATA%/}"/postgresql.conf - # This is here because of https://bugs.gentoo.org/show_bug.cgi?id=518522 - # On the off-chance that you might need to work with UTF-8 encoded - # characters in PL/Perl - plperl.on_init = 'use utf8; use re; package utf8; require "utf8_heavy.pl";' - EOF - - einfo "The autovacuum function, which was in contrib, has been moved to the main" - einfo "PostgreSQL functions starting with 8.1, and starting with 8.4 is now enabled" - einfo "by default. You can disable it in the cluster's:" - einfo " ${PGDATA%/}/postgresql.conf" - einfo - if ! use systemd; then - einfo "The PostgreSQL server, by default, will log events to:" - einfo " ${DATA_DIR%/}/postmaster.log" - einfo - fi - if use prefix ; then - einfo "The location of the configuration files have moved to:" - einfo " ${PGDATA}" - einfo "To start the server:" - einfo " pg_ctl start -D ${DATA_DIR} -o '-D ${PGDATA} --data-directory=${DATA_DIR}'" - einfo "To stop:" - einfo " pg_ctl stop -D ${DATA_DIR}" - einfo - einfo "Or move the configuration files back:" - einfo "mv ${PGDATA}*.conf ${DATA_DIR}" - elif use systemd; then - einfo "You should use the 'postgresql-${SLOT}.service' unit to run PostgreSQL" - einfo "instead of 'pg_ctl'." - else - einfo "You should use the '${EROOT}/etc/init.d/postgresql-${SLOT}' script to run PostgreSQL" - einfo "instead of 'pg_ctl'." - fi -} - -src_test() { - if use server && [[ ${UID} -ne 0 ]] ; then - emake check - - einfo "If you think other tests besides the regression tests are necessary, please" - einfo "submit a bug including a patch for this ebuild to enable them." - else - use server || \ - ewarn 'Tests cannot be run without the "server" use flag enabled.' - [[ ${UID} -eq 0 ]] || \ - ewarn 'Tests cannot be run as root. Enable "userpriv" in FEATURES.' - - ewarn 'Skipping.' - fi -} diff --git a/dev-db/postgresql/postgresql-10.11.ebuild b/dev-db/postgresql/postgresql-10.11.ebuild deleted file mode 100644 index 3f23e213da83..000000000000 --- a/dev-db/postgresql/postgresql-10.11.ebuild +++ /dev/null @@ -1,465 +0,0 @@ -# Copyright 1999-2020 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -PYTHON_COMPAT=( python3_{6,7} ) - -PLOCALES="af cs de en es fa fr hr hu it ko nb pl pt_BR ro ru sk sl sv tr zh_CN - zh_TW" - -inherit flag-o-matic l10n linux-info multilib pam prefix python-single-r1 \ - systemd user - -KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~mips ppc ppc64 ~s390 sparc x86 ~ppc-macos ~x86-solaris" - -SLOT=$(ver_cut 1) - -MY_PV=${PV/_/} -S="${WORKDIR}/${PN}-${MY_PV}" - -SRC_URI="https://ftp.postgresql.org/pub/source/v${MY_PV}/postgresql-${MY_PV}.tar.bz2" - -LICENSE="POSTGRESQL GPL-2" -DESCRIPTION="PostgreSQL RDBMS" -HOMEPAGE="https://www.postgresql.org/" - -IUSE="debug doc icu kerberos kernel_linux ldap libressl nls pam perl - python +readline selinux +server systemd ssl static-libs tcl - threads uuid xml zlib" - -REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" - -CDEPEND=" ->=app-eselect/eselect-postgresql-2.0 -sys-apps/less -virtual/libintl -icu? ( dev-libs/icu:= ) -kerberos? ( virtual/krb5 ) -ldap? ( net-nds/openldap ) -pam? ( sys-libs/pam ) -perl? ( >=dev-lang/perl-5.8:= ) -python? ( ${PYTHON_DEPS} ) -readline? ( sys-libs/readline:0= ) -server? ( systemd? ( sys-apps/systemd ) ) -ssl? ( - !libressl? ( >=dev-libs/openssl-0.9.6-r1:0= ) - libressl? ( dev-libs/libressl:= ) -) -tcl? ( >=dev-lang/tcl-8:0= ) -xml? ( dev-libs/libxml2 dev-libs/libxslt ) -zlib? ( sys-libs/zlib ) -" - -# uuid flags -- depend on sys-apps/util-linux for Linux libcs, or if no -# supported libc in use depend on dev-libs/ossp-uuid. For BSD systems, -# the libc includes UUID functions. -UTIL_LINUX_LIBC=( elibc_{glibc,uclibc,musl} ) -BSD_LIBC=( elibc_{Free,Net,Open}BSD ) - -nest_usedep() { - local front back - while [[ ${#} -gt 1 ]]; do - front+="${1}? ( " - back+=" )" - shift - done - echo "${front}${1}${back}" -} - -IUSE+=" ${UTIL_LINUX_LIBC[@]} ${BSD_LIBC[@]}" -CDEPEND+=" -uuid? ( - ${UTIL_LINUX_LIBC[@]/%/? ( sys-apps/util-linux )} - $(nest_usedep ${UTIL_LINUX_LIBC[@]/#/!} ${BSD_LIBC[@]/#/!} dev-libs/ossp-uuid) -)" - -DEPEND="${CDEPEND} -!!<sys-apps/sandbox-2.0 -sys-devel/bison -sys-devel/flex -nls? ( sys-devel/gettext ) -xml? ( virtual/pkgconfig ) -" - -RDEPEND="${CDEPEND} -!dev-db/postgresql-docs:${SLOT} -!dev-db/postgresql-base:${SLOT} -!dev-db/postgresql-server:${SLOT} -selinux? ( sec-policy/selinux-postgresql ) -" - -pkg_setup() { - use server && CONFIG_CHECK="~SYSVIPC" linux-info_pkg_setup - - enewgroup postgres 70 - enewuser postgres 70 /bin/sh /var/lib/postgresql postgres - - use python && python-single-r1_pkg_setup -} - -src_prepare() { - # Work around PPC{,64} compilation bug where bool is already defined - sed '/#ifndef __cplusplus/a #undef bool' -i src/include/c.h || die - - # Set proper run directory - sed "s|\(PGSOCKET_DIR\s\+\)\"/tmp\"|\1\"${EPREFIX}/run/postgresql\"|" \ - -i src/include/pg_config_manual.h || die - - # Rely on $PATH being in the proper order so that the correct - # install program is used for modules utilizing PGXS in both - # hardened and non-hardened environments. (Bug #528786) - sed 's/@install_bin@/install -c/' -i src/Makefile.global.in || die - - use server || eapply "${FILESDIR}/${PN}-10.2-no-server.patch" - - if use pam ; then - sed -e "s/\(#define PGSQL_PAM_SERVICE \"postgresql\)/\1-${SLOT}/" \ - -i src/backend/libpq/auth.c || \ - die 'PGSQL_PAM_SERVICE rename failed.' - fi - - eapply_user -} - -src_configure() { - case ${CHOST} in - *-darwin*|*-solaris*) - use nls && append-libs intl - ;; - esac - - export LDFLAGS_SL="${LDFLAGS}" - export LDFLAGS_EX="${LDFLAGS}" - - local PO="${EPREFIX}" - - local i uuid_config="" - if use uuid; then - for i in ${UTIL_LINUX_LIBC[@]}; do - use ${i} && uuid_config="--with-uuid=e2fs" - done - for i in ${BSD_LIBC[@]}; do - use ${i} && uuid_config="--with-uuid=bsd" - done - [[ -z $uuid_config ]] && uuid_config="--with-uuid=ossp" - fi - - econf \ - --prefix="${PO}/usr/$(get_libdir)/postgresql-${SLOT}" \ - --datadir="${PO}/usr/share/postgresql-${SLOT}" \ - --includedir="${PO}/usr/include/postgresql-${SLOT}" \ - --mandir="${PO}/usr/share/postgresql-${SLOT}/man" \ - --sysconfdir="${PO}/etc/postgresql-${SLOT}" \ - --with-system-tzdata="${PO}/usr/share/zoneinfo" \ - $(use_enable !alpha spinlocks) \ - $(use_enable debug) \ - $(use_enable threads thread-safety) \ - $(use_with icu) \ - $(use_with kerberos gssapi) \ - $(use_with ldap) \ - $(use_with pam) \ - $(use_with perl) \ - $(use_with python) \ - $(use_with readline) \ - $(use_with ssl openssl) \ - $(usex server "$(use_with systemd)" '--without-systemd') \ - $(use_with tcl) \ - ${uuid_config} \ - $(use_with xml libxml) \ - $(use_with xml libxslt) \ - $(use_with zlib) \ - $(use_enable nls nls "'$(l10n_get_locales)'") -} - -src_compile() { - emake - emake -C contrib -} - -src_install() { - emake DESTDIR="${D}" install - emake DESTDIR="${D}" install -C contrib - - dodoc README HISTORY doc/{TODO,bug.template} - - # man pages are already built, but if we have the target make them, - # they'll be generated from source before being installed so we - # manually install man pages. - # We use ${SLOT} instead of doman for postgresql.eselect - insinto /usr/share/postgresql-${SLOT}/man/ - doins -r doc/src/sgml/man{1,3,7} - if ! use server; then - # Remove man pages for non-existent binaries - serverman=( - initdb - pg_{archivecleanup,controldata,ctl,resetwal,rewind,standby} - pg_{test_{fsync,timing},upgrade,waldump} - post{gres,master} - ) - for m in ${serverman[@]} ; do - rm "${ED}/usr/share/postgresql-${SLOT}/man/man1/${m}.1" - done - fi - docompress /usr/share/postgresql-${SLOT}/man/man{1,3,7} - - # Create slot specific man pages - local bn f mansec slotted_name - for mansec in 1 3 7 ; do - local rel_manpath="../../postgresql-${SLOT}/man/man${mansec}" - - mkdir -p "${ED}"/usr/share/man/man${mansec} || die "making man dir" - pushd "${ED}"/usr/share/man/man${mansec} > /dev/null || die "pushd failed" - - for f in "${ED}/usr/share/postgresql-${SLOT}/man/man${mansec}"/* ; do - bn=$(basename "${f}") - slotted_name=${bn%.${mansec}}${SLOT}.${mansec} - case ${bn} in - TABLE.7|WITH.7) - echo ".so ${rel_manpath}/SELECT.7" > ${slotted_name} - ;; - *) - echo ".so ${rel_manpath}/${bn}" > ${slotted_name} - ;; - esac - done - - popd > /dev/null - done - - insinto /etc/postgresql-${SLOT} - newins src/bin/psql/psqlrc.sample psqlrc - - # Don't delete libpg{port,common}.a (Bug #571046). They're always - # needed by extensions utilizing PGXS. - use static-libs || \ - find "${ED}" -name '*.a' ! -name libpgport.a ! -name libpgcommon.a \ - -delete - - # Make slot specific links to programs - local f bn - for f in $(find "${ED}/usr/$(get_libdir)/postgresql-${SLOT}/bin" \ - -mindepth 1 -maxdepth 1) - do - bn=$(basename "${f}") - dosym "../$(get_libdir)/postgresql-${SLOT}/bin/${bn}" \ - "/usr/bin/${bn}${SLOT/.}" - done - - if use doc ; then - docinto html - dodoc doc/src/sgml/html/* - fi - - if use server; then - sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \ - "${FILESDIR}/${PN}.confd-9.3" | newconfd - ${PN}-${SLOT} - - sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \ - "${FILESDIR}/${PN}.init-9.3-r1" | newinitd - ${PN}-${SLOT} - - if use systemd; then - sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \ - "${FILESDIR}/${PN}.service-9.6-r1" | \ - systemd_newunit - ${PN}-${SLOT}.service - newbin "${FILESDIR}"/${PN}-check-db-dir ${PN}-${SLOT}-check-db-dir - systemd_newtmpfilesd "${FILESDIR}"/${PN}.tmpfiles ${PN}-${SLOT}.conf - fi - - use pam && pamd_mimic system-auth ${PN}-${SLOT} auth account session - - if use prefix ; then - keepdir /run/postgresql - fperms 1775 /run/postgresql - fi - fi -} - -pkg_postinst() { - use server && use systemd && systemd_tmpfiles_create ${PN}-${SLOT}.conf - postgresql-config update - - elog "If you need a global psqlrc-file, you can place it in:" - elog " ${EROOT}/etc/postgresql-${SLOT}/" - - if use server ; then - elog - elog "Gentoo specific documentation:" - elog "https://wiki.gentoo.org/wiki/PostgreSQL" - elog - elog "Official documentation:" - elog "https://www.postgresql.org/docs/${SLOT}/static/index.html" - elog - elog "The default location of the Unix-domain socket is:" - elog " ${EROOT}/run/postgresql/" - elog - elog "Before initializing the database, you may want to edit PG_INITDB_OPTS" - elog "so that it contains your preferred locale in:" - elog " ${EROOT}/etc/conf.d/postgresql-${SLOT}" - elog - elog "Then, execute the following command to setup the initial database" - elog "environment:" - elog " emerge --config =${CATEGORY}/${PF}" - - if [[ -n ${REPLACING_VERSIONS} ]] ; then - ewarn "If your system is using 'pg_stat_statements' and you are running a" - ewarn "version of PostgreSQL ${SLOT}, we advise that you execute" - ewarn "the following command after upgrading:" - ewarn - ewarn "ALTER EXTENSION pg_stat_statements UPDATE;" - fi - fi -} - -pkg_prerm() { - if use server && [[ -z ${REPLACED_BY_VERSION} ]] ; then - ewarn "Have you dumped and/or migrated the ${SLOT} database cluster?" - ewarn "\thttps://wiki.gentoo.org/wiki/PostgreSQL/QuickStart#Migrating_PostgreSQL" - - ebegin "Resuming removal in 10 seconds (Control-C to cancel)" - sleep 10 - eend 0 - fi -} - -pkg_postrm() { - postgresql-config update -} - -pkg_config() { - use server || die "USE flag 'server' not enabled. Nothing to configure." - - [[ -f "${EROOT}/etc/conf.d/postgresql-${SLOT}" ]] \ - && source "${EROOT}/etc/conf.d/postgresql-${SLOT}" - [[ -z "${PGDATA}" ]] && PGDATA="${EROOT}/etc/postgresql-${SLOT}/" - [[ -z "${DATA_DIR}" ]] \ - && DATA_DIR="${EROOT}/var/lib/postgresql/${SLOT}/data" - - # environment.bz2 may not contain the same locale as the current system - # locale. Unset and source from the current system locale. - if [ -f "${EROOT}/etc/env.d/02locale" ]; then - unset LANG - unset LC_CTYPE - unset LC_NUMERIC - unset LC_TIME - unset LC_COLLATE - unset LC_MONETARY - unset LC_MESSAGES - unset LC_ALL - source "${EROOT}/etc/env.d/02locale" - [ -n "${LANG}" ] && export LANG - [ -n "${LC_CTYPE}" ] && export LC_CTYPE - [ -n "${LC_NUMERIC}" ] && export LC_NUMERIC - [ -n "${LC_TIME}" ] && export LC_TIME - [ -n "${LC_COLLATE}" ] && export LC_COLLATE - [ -n "${LC_MONETARY}" ] && export LC_MONETARY - [ -n "${LC_MESSAGES}" ] && export LC_MESSAGES - [ -n "${LC_ALL}" ] && export LC_ALL - fi - - einfo "You can modify the paths and options passed to initdb by editing:" - einfo " ${EROOT}/etc/conf.d/postgresql-${SLOT}" - einfo - einfo "Information on options that can be passed to initdb are found at:" - einfo " https://www.postgresql.org/docs/${SLOT}/static/creating-cluster.html" - einfo " https://www.postgresql.org/docs/${SLOT}/static/app-initdb.html" - einfo - einfo "PG_INITDB_OPTS is currently set to:" - if [[ -z "${PG_INITDB_OPTS}" ]] ; then - einfo " (none)" - else - einfo " ${PG_INITDB_OPTS}" - fi - einfo - einfo "Configuration files will be installed to:" - einfo " ${PGDATA}" - einfo - einfo "The database cluster will be created in:" - einfo " ${DATA_DIR}" - einfo - - ebegin "Continuing initialization in 5 seconds (Control-C to cancel)" - sleep 5 - eend 0 - - if [ -n "$(ls -A ${DATA_DIR} 2> /dev/null)" ] ; then - eerror "The given directory, '${DATA_DIR}', is not empty." - eerror "Modify DATA_DIR to point to an empty directory." - die "${DATA_DIR} is not empty." - fi - - einfo "Creating the data directory ..." - if [[ ${EUID} == 0 ]] ; then - mkdir -p "${DATA_DIR}" - chown -Rf postgres:postgres "${DATA_DIR}" - chmod 0700 "${DATA_DIR}" - fi - - einfo "Initializing the database ..." - - if [[ ${EUID} == 0 ]] ; then - su postgres -c "${EROOT}/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -D \"${DATA_DIR}\" ${PG_INITDB_OPTS}" - else - "${EROOT}"/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -U postgres -D "${DATA_DIR}" ${PG_INITDB_OPTS} - fi - - if [[ "${DATA_DIR%/}" != "${PGDATA%/}" ]] ; then - mv "${DATA_DIR%/}"/{pg_{hba,ident},postgresql}.conf "${PGDATA}" - ln -s "${PGDATA%/}"/{pg_{hba,ident},postgresql}.conf "${DATA_DIR%/}" - fi - - # unix_socket_directory has no effect in postgresql.conf as it's - # overridden in the initscript - sed '/^#unix_socket_directories/,+1d' -i "${PGDATA%/}"/postgresql.conf - - cat <<- EOF >> "${PGDATA%/}"/postgresql.conf - # This is here because of https://bugs.gentoo.org/show_bug.cgi?id=518522 - # On the off-chance that you might need to work with UTF-8 encoded - # characters in PL/Perl - plperl.on_init = 'use utf8; use re; package utf8; require "utf8_heavy.pl";' - EOF - - einfo "The autovacuum function, which was in contrib, has been moved to the main" - einfo "PostgreSQL functions starting with 8.1, and starting with 8.4 is now enabled" - einfo "by default. You can disable it in the cluster's:" - einfo " ${PGDATA%/}/postgresql.conf" - einfo - if ! use systemd; then - einfo "The PostgreSQL server, by default, will log events to:" - einfo " ${DATA_DIR%/}/postmaster.log" - einfo - fi - if use prefix ; then - einfo "The location of the configuration files have moved to:" - einfo " ${PGDATA}" - einfo "To start the server:" - einfo " pg_ctl start -D ${DATA_DIR} -o '-D ${PGDATA} --data-directory=${DATA_DIR}'" - einfo "To stop:" - einfo " pg_ctl stop -D ${DATA_DIR}" - einfo - einfo "Or move the configuration files back:" - einfo "mv ${PGDATA}*.conf ${DATA_DIR}" - elif use systemd; then - einfo "You should use the 'postgresql-${SLOT}.service' unit to run PostgreSQL" - einfo "instead of 'pg_ctl'." - else - einfo "You should use the '${EROOT}/etc/init.d/postgresql-${SLOT}' script to run PostgreSQL" - einfo "instead of 'pg_ctl'." - fi -} - -src_test() { - if use server && [[ ${UID} -ne 0 ]] ; then - emake check - - einfo "If you think other tests besides the regression tests are necessary, please" - einfo "submit a bug including a patch for this ebuild to enable them." - else - use server || \ - ewarn 'Tests cannot be run without the "server" use flag enabled.' - [[ ${UID} -eq 0 ]] || \ - ewarn 'Tests cannot be run as root. Enable "userpriv" in FEATURES.' - - ewarn 'Skipping.' - fi -} diff --git a/dev-db/postgresql/postgresql-10.9.ebuild b/dev-db/postgresql/postgresql-10.9.ebuild deleted file mode 100644 index 444c162dfcba..000000000000 --- a/dev-db/postgresql/postgresql-10.9.ebuild +++ /dev/null @@ -1,465 +0,0 @@ -# Copyright 1999-2020 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -PYTHON_COMPAT=( python3_{6,7} ) - -PLOCALES="af cs de en es fa fr hr hu it ko nb pl pt_BR ro ru sk sl sv tr zh_CN - zh_TW" - -inherit flag-o-matic l10n linux-info multilib pam prefix python-single-r1 \ - systemd user - -KEYWORDS="~alpha amd64 arm ~arm64 ~hppa ~ia64 ~mips ppc ppc64 ~s390 sparc x86 ~ppc-macos ~x86-solaris" - -SLOT=$(ver_cut 1) - -MY_PV=${PV/_/} -S="${WORKDIR}/${PN}-${MY_PV}" - -SRC_URI="https://ftp.postgresql.org/pub/source/v${MY_PV}/postgresql-${MY_PV}.tar.bz2" - -LICENSE="POSTGRESQL GPL-2" -DESCRIPTION="PostgreSQL RDBMS" -HOMEPAGE="https://www.postgresql.org/" - -IUSE="debug doc icu kerberos kernel_linux ldap libressl nls pam perl - python +readline selinux +server systemd ssl static-libs tcl - threads uuid xml zlib" - -REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" - -CDEPEND=" ->=app-eselect/eselect-postgresql-2.0 -sys-apps/less -virtual/libintl -icu? ( dev-libs/icu:= ) -kerberos? ( virtual/krb5 ) -ldap? ( net-nds/openldap ) -pam? ( sys-libs/pam ) -perl? ( >=dev-lang/perl-5.8:= ) -python? ( ${PYTHON_DEPS} ) -readline? ( sys-libs/readline:0= ) -server? ( systemd? ( sys-apps/systemd ) ) -ssl? ( - !libressl? ( >=dev-libs/openssl-0.9.6-r1:0= ) - libressl? ( dev-libs/libressl:= ) -) -tcl? ( >=dev-lang/tcl-8:0= ) -xml? ( dev-libs/libxml2 dev-libs/libxslt ) -zlib? ( sys-libs/zlib ) -" - -# uuid flags -- depend on sys-apps/util-linux for Linux libcs, or if no -# supported libc in use depend on dev-libs/ossp-uuid. For BSD systems, -# the libc includes UUID functions. -UTIL_LINUX_LIBC=( elibc_{glibc,uclibc,musl} ) -BSD_LIBC=( elibc_{Free,Net,Open}BSD ) - -nest_usedep() { - local front back - while [[ ${#} -gt 1 ]]; do - front+="${1}? ( " - back+=" )" - shift - done - echo "${front}${1}${back}" -} - -IUSE+=" ${UTIL_LINUX_LIBC[@]} ${BSD_LIBC[@]}" -CDEPEND+=" -uuid? ( - ${UTIL_LINUX_LIBC[@]/%/? ( sys-apps/util-linux )} - $(nest_usedep ${UTIL_LINUX_LIBC[@]/#/!} ${BSD_LIBC[@]/#/!} dev-libs/ossp-uuid) -)" - -DEPEND="${CDEPEND} -!!<sys-apps/sandbox-2.0 -sys-devel/bison -sys-devel/flex -nls? ( sys-devel/gettext ) -xml? ( virtual/pkgconfig ) -" - -RDEPEND="${CDEPEND} -!dev-db/postgresql-docs:${SLOT} -!dev-db/postgresql-base:${SLOT} -!dev-db/postgresql-server:${SLOT} -selinux? ( sec-policy/selinux-postgresql ) -" - -pkg_setup() { - use server && CONFIG_CHECK="~SYSVIPC" linux-info_pkg_setup - - enewgroup postgres 70 - enewuser postgres 70 /bin/sh /var/lib/postgresql postgres - - use python && python-single-r1_pkg_setup -} - -src_prepare() { - # Work around PPC{,64} compilation bug where bool is already defined - sed '/#ifndef __cplusplus/a #undef bool' -i src/include/c.h || die - - # Set proper run directory - sed "s|\(PGSOCKET_DIR\s\+\)\"/tmp\"|\1\"${EPREFIX}/run/postgresql\"|" \ - -i src/include/pg_config_manual.h || die - - # Rely on $PATH being in the proper order so that the correct - # install program is used for modules utilizing PGXS in both - # hardened and non-hardened environments. (Bug #528786) - sed 's/@install_bin@/install -c/' -i src/Makefile.global.in || die - - use server || eapply "${FILESDIR}/${PN}-10.2-no-server.patch" - - if use pam ; then - sed -e "s/\(#define PGSQL_PAM_SERVICE \"postgresql\)/\1-${SLOT}/" \ - -i src/backend/libpq/auth.c || \ - die 'PGSQL_PAM_SERVICE rename failed.' - fi - - eapply_user -} - -src_configure() { - case ${CHOST} in - *-darwin*|*-solaris*) - use nls && append-libs intl - ;; - esac - - export LDFLAGS_SL="${LDFLAGS}" - export LDFLAGS_EX="${LDFLAGS}" - - local PO="${EPREFIX}" - - local i uuid_config="" - if use uuid; then - for i in ${UTIL_LINUX_LIBC[@]}; do - use ${i} && uuid_config="--with-uuid=e2fs" - done - for i in ${BSD_LIBC[@]}; do - use ${i} && uuid_config="--with-uuid=bsd" - done - [[ -z $uuid_config ]] && uuid_config="--with-uuid=ossp" - fi - - econf \ - --prefix="${PO}/usr/$(get_libdir)/postgresql-${SLOT}" \ - --datadir="${PO}/usr/share/postgresql-${SLOT}" \ - --includedir="${PO}/usr/include/postgresql-${SLOT}" \ - --mandir="${PO}/usr/share/postgresql-${SLOT}/man" \ - --sysconfdir="${PO}/etc/postgresql-${SLOT}" \ - --with-system-tzdata="${PO}/usr/share/zoneinfo" \ - $(use_enable !alpha spinlocks) \ - $(use_enable debug) \ - $(use_enable threads thread-safety) \ - $(use_with icu) \ - $(use_with kerberos gssapi) \ - $(use_with ldap) \ - $(use_with pam) \ - $(use_with perl) \ - $(use_with python) \ - $(use_with readline) \ - $(use_with ssl openssl) \ - $(usex server "$(use_with systemd)" '--without-systemd') \ - $(use_with tcl) \ - ${uuid_config} \ - $(use_with xml libxml) \ - $(use_with xml libxslt) \ - $(use_with zlib) \ - $(use_enable nls nls "'$(l10n_get_locales)'") -} - -src_compile() { - emake - emake -C contrib -} - -src_install() { - emake DESTDIR="${D}" install - emake DESTDIR="${D}" install -C contrib - - dodoc README HISTORY doc/{TODO,bug.template} - - # man pages are already built, but if we have the target make them, - # they'll be generated from source before being installed so we - # manually install man pages. - # We use ${SLOT} instead of doman for postgresql.eselect - insinto /usr/share/postgresql-${SLOT}/man/ - doins -r doc/src/sgml/man{1,3,7} - if ! use server; then - # Remove man pages for non-existent binaries - serverman=( - initdb - pg_{archivecleanup,controldata,ctl,resetwal,rewind,standby} - pg_{test_{fsync,timing},upgrade,waldump} - post{gres,master} - ) - for m in ${serverman[@]} ; do - rm "${ED}/usr/share/postgresql-${SLOT}/man/man1/${m}.1" - done - fi - docompress /usr/share/postgresql-${SLOT}/man/man{1,3,7} - - # Create slot specific man pages - local bn f mansec slotted_name - for mansec in 1 3 7 ; do - local rel_manpath="../../postgresql-${SLOT}/man/man${mansec}" - - mkdir -p "${ED}"/usr/share/man/man${mansec} || die "making man dir" - pushd "${ED}"/usr/share/man/man${mansec} > /dev/null || die "pushd failed" - - for f in "${ED}/usr/share/postgresql-${SLOT}/man/man${mansec}"/* ; do - bn=$(basename "${f}") - slotted_name=${bn%.${mansec}}${SLOT}.${mansec} - case ${bn} in - TABLE.7|WITH.7) - echo ".so ${rel_manpath}/SELECT.7" > ${slotted_name} - ;; - *) - echo ".so ${rel_manpath}/${bn}" > ${slotted_name} - ;; - esac - done - - popd > /dev/null - done - - insinto /etc/postgresql-${SLOT} - newins src/bin/psql/psqlrc.sample psqlrc - - # Don't delete libpg{port,common}.a (Bug #571046). They're always - # needed by extensions utilizing PGXS. - use static-libs || \ - find "${ED}" -name '*.a' ! -name libpgport.a ! -name libpgcommon.a \ - -delete - - # Make slot specific links to programs - local f bn - for f in $(find "${ED}/usr/$(get_libdir)/postgresql-${SLOT}/bin" \ - -mindepth 1 -maxdepth 1) - do - bn=$(basename "${f}") - dosym "../$(get_libdir)/postgresql-${SLOT}/bin/${bn}" \ - "/usr/bin/${bn}${SLOT/.}" - done - - if use doc ; then - docinto html - dodoc doc/src/sgml/html/* - fi - - if use server; then - sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \ - "${FILESDIR}/${PN}.confd-9.3" | newconfd - ${PN}-${SLOT} - - sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \ - "${FILESDIR}/${PN}.init-9.3-r1" | newinitd - ${PN}-${SLOT} - - if use systemd; then - sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \ - "${FILESDIR}/${PN}.service-9.6-r1" | \ - systemd_newunit - ${PN}-${SLOT}.service - newbin "${FILESDIR}"/${PN}-check-db-dir ${PN}-${SLOT}-check-db-dir - systemd_newtmpfilesd "${FILESDIR}"/${PN}.tmpfiles ${PN}-${SLOT}.conf - fi - - use pam && pamd_mimic system-auth ${PN}-${SLOT} auth account session - - if use prefix ; then - keepdir /run/postgresql - fperms 1775 /run/postgresql - fi - fi -} - -pkg_postinst() { - use server && use systemd && systemd_tmpfiles_create ${PN}-${SLOT}.conf - postgresql-config update - - elog "If you need a global psqlrc-file, you can place it in:" - elog " ${EROOT}/etc/postgresql-${SLOT}/" - - if use server ; then - elog - elog "Gentoo specific documentation:" - elog "https://wiki.gentoo.org/wiki/PostgreSQL" - elog - elog "Official documentation:" - elog "https://www.postgresql.org/docs/${SLOT}/static/index.html" - elog - elog "The default location of the Unix-domain socket is:" - elog " ${EROOT}/run/postgresql/" - elog - elog "Before initializing the database, you may want to edit PG_INITDB_OPTS" - elog "so that it contains your preferred locale in:" - elog " ${EROOT}/etc/conf.d/postgresql-${SLOT}" - elog - elog "Then, execute the following command to setup the initial database" - elog "environment:" - elog " emerge --config =${CATEGORY}/${PF}" - - if [[ -n ${REPLACING_VERSIONS} ]] ; then - ewarn "If your system is using 'pg_stat_statements' and you are running a" - ewarn "version of PostgreSQL ${SLOT}, we advise that you execute" - ewarn "the following command after upgrading:" - ewarn - ewarn "ALTER EXTENSION pg_stat_statements UPDATE;" - fi - fi -} - -pkg_prerm() { - if use server && [[ -z ${REPLACED_BY_VERSION} ]] ; then - ewarn "Have you dumped and/or migrated the ${SLOT} database cluster?" - ewarn "\thttps://wiki.gentoo.org/wiki/PostgreSQL/QuickStart#Migrating_PostgreSQL" - - ebegin "Resuming removal in 10 seconds (Control-C to cancel)" - sleep 10 - eend 0 - fi -} - -pkg_postrm() { - postgresql-config update -} - -pkg_config() { - use server || die "USE flag 'server' not enabled. Nothing to configure." - - [[ -f "${EROOT}/etc/conf.d/postgresql-${SLOT}" ]] \ - && source "${EROOT}/etc/conf.d/postgresql-${SLOT}" - [[ -z "${PGDATA}" ]] && PGDATA="${EROOT}/etc/postgresql-${SLOT}/" - [[ -z "${DATA_DIR}" ]] \ - && DATA_DIR="${EROOT}/var/lib/postgresql/${SLOT}/data" - - # environment.bz2 may not contain the same locale as the current system - # locale. Unset and source from the current system locale. - if [ -f "${EROOT}/etc/env.d/02locale" ]; then - unset LANG - unset LC_CTYPE - unset LC_NUMERIC - unset LC_TIME - unset LC_COLLATE - unset LC_MONETARY - unset LC_MESSAGES - unset LC_ALL - source "${EROOT}/etc/env.d/02locale" - [ -n "${LANG}" ] && export LANG - [ -n "${LC_CTYPE}" ] && export LC_CTYPE - [ -n "${LC_NUMERIC}" ] && export LC_NUMERIC - [ -n "${LC_TIME}" ] && export LC_TIME - [ -n "${LC_COLLATE}" ] && export LC_COLLATE - [ -n "${LC_MONETARY}" ] && export LC_MONETARY - [ -n "${LC_MESSAGES}" ] && export LC_MESSAGES - [ -n "${LC_ALL}" ] && export LC_ALL - fi - - einfo "You can modify the paths and options passed to initdb by editing:" - einfo " ${EROOT}/etc/conf.d/postgresql-${SLOT}" - einfo - einfo "Information on options that can be passed to initdb are found at:" - einfo " https://www.postgresql.org/docs/${SLOT}/static/creating-cluster.html" - einfo " https://www.postgresql.org/docs/${SLOT}/static/app-initdb.html" - einfo - einfo "PG_INITDB_OPTS is currently set to:" - if [[ -z "${PG_INITDB_OPTS}" ]] ; then - einfo " (none)" - else - einfo " ${PG_INITDB_OPTS}" - fi - einfo - einfo "Configuration files will be installed to:" - einfo " ${PGDATA}" - einfo - einfo "The database cluster will be created in:" - einfo " ${DATA_DIR}" - einfo - - ebegin "Continuing initialization in 5 seconds (Control-C to cancel)" - sleep 5 - eend 0 - - if [ -n "$(ls -A ${DATA_DIR} 2> /dev/null)" ] ; then - eerror "The given directory, '${DATA_DIR}', is not empty." - eerror "Modify DATA_DIR to point to an empty directory." - die "${DATA_DIR} is not empty." - fi - - einfo "Creating the data directory ..." - if [[ ${EUID} == 0 ]] ; then - mkdir -p "${DATA_DIR}" - chown -Rf postgres:postgres "${DATA_DIR}" - chmod 0700 "${DATA_DIR}" - fi - - einfo "Initializing the database ..." - - if [[ ${EUID} == 0 ]] ; then - su postgres -c "${EROOT}/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -D \"${DATA_DIR}\" ${PG_INITDB_OPTS}" - else - "${EROOT}"/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -U postgres -D "${DATA_DIR}" ${PG_INITDB_OPTS} - fi - - if [[ "${DATA_DIR%/}" != "${PGDATA%/}" ]] ; then - mv "${DATA_DIR%/}"/{pg_{hba,ident},postgresql}.conf "${PGDATA}" - ln -s "${PGDATA%/}"/{pg_{hba,ident},postgresql}.conf "${DATA_DIR%/}" - fi - - # unix_socket_directory has no effect in postgresql.conf as it's - # overridden in the initscript - sed '/^#unix_socket_directories/,+1d' -i "${PGDATA%/}"/postgresql.conf - - cat <<- EOF >> "${PGDATA%/}"/postgresql.conf - # This is here because of https://bugs.gentoo.org/show_bug.cgi?id=518522 - # On the off-chance that you might need to work with UTF-8 encoded - # characters in PL/Perl - plperl.on_init = 'use utf8; use re; package utf8; require "utf8_heavy.pl";' - EOF - - einfo "The autovacuum function, which was in contrib, has been moved to the main" - einfo "PostgreSQL functions starting with 8.1, and starting with 8.4 is now enabled" - einfo "by default. You can disable it in the cluster's:" - einfo " ${PGDATA%/}/postgresql.conf" - einfo - if ! use systemd; then - einfo "The PostgreSQL server, by default, will log events to:" - einfo " ${DATA_DIR%/}/postmaster.log" - einfo - fi - if use prefix ; then - einfo "The location of the configuration files have moved to:" - einfo " ${PGDATA}" - einfo "To start the server:" - einfo " pg_ctl start -D ${DATA_DIR} -o '-D ${PGDATA} --data-directory=${DATA_DIR}'" - einfo "To stop:" - einfo " pg_ctl stop -D ${DATA_DIR}" - einfo - einfo "Or move the configuration files back:" - einfo "mv ${PGDATA}*.conf ${DATA_DIR}" - elif use systemd; then - einfo "You should use the 'postgresql-${SLOT}.service' unit to run PostgreSQL" - einfo "instead of 'pg_ctl'." - else - einfo "You should use the '${EROOT}/etc/init.d/postgresql-${SLOT}' script to run PostgreSQL" - einfo "instead of 'pg_ctl'." - fi -} - -src_test() { - if use server && [[ ${UID} -ne 0 ]] ; then - emake check - - einfo "If you think other tests besides the regression tests are necessary, please" - einfo "submit a bug including a patch for this ebuild to enable them." - else - use server || \ - ewarn 'Tests cannot be run without the "server" use flag enabled.' - [[ ${UID} -eq 0 ]] || \ - ewarn 'Tests cannot be run as root. Enable "userpriv" in FEATURES.' - - ewarn 'Skipping.' - fi -} diff --git a/dev-db/postgresql/postgresql-11.4.ebuild b/dev-db/postgresql/postgresql-11.4.ebuild deleted file mode 100644 index 22f96c8c2410..000000000000 --- a/dev-db/postgresql/postgresql-11.4.ebuild +++ /dev/null @@ -1,467 +0,0 @@ -# Copyright 1999-2020 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -PYTHON_COMPAT=( python3_{6,7} ) - -PLOCALES="af cs de en es fa fr hr hu it ko nb pl pt_BR ro ru sk sl sv tr zh_CN - zh_TW" - -inherit flag-o-matic l10n linux-info multilib pam prefix python-single-r1 \ - systemd user - -KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~mips ppc ppc64 ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" - -SLOT=$(ver_cut 1) - -MY_PV=${PV/_/} -S="${WORKDIR}/${PN}-${MY_PV}" - -SRC_URI="https://ftp.postgresql.org/pub/source/v${MY_PV}/postgresql-${MY_PV}.tar.bz2" - -LICENSE="POSTGRESQL GPL-2" -DESCRIPTION="PostgreSQL RDBMS" -HOMEPAGE="http://www.postgresql.org/" - -IUSE="debug doc icu kerberos kernel_linux ldap libressl llvm nls pam - perl python +readline selinux +server systemd ssl static-libs tcl - threads uuid xml zlib" - -REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" - -CDEPEND=" ->=app-eselect/eselect-postgresql-2.0 -sys-apps/less -virtual/libintl -icu? ( dev-libs/icu:= ) -kerberos? ( virtual/krb5 ) -ldap? ( net-nds/openldap ) -llvm? ( - sys-devel/llvm:= - sys-devel/clang:= -) -pam? ( sys-libs/pam ) -perl? ( >=dev-lang/perl-5.8:= ) -python? ( ${PYTHON_DEPS} ) -readline? ( sys-libs/readline:0= ) -server? ( systemd? ( sys-apps/systemd ) ) -ssl? ( - !libressl? ( >=dev-libs/openssl-0.9.6-r1:0= ) - libressl? ( dev-libs/libressl:= ) -) -tcl? ( >=dev-lang/tcl-8:0= ) -xml? ( dev-libs/libxml2 dev-libs/libxslt ) -zlib? ( sys-libs/zlib ) -" - -# uuid flags -- depend on sys-apps/util-linux for Linux libcs, or if no -# supported libc in use depend on dev-libs/ossp-uuid. For BSD systems, -# the libc includes UUID functions. -UTIL_LINUX_LIBC=( elibc_{glibc,uclibc,musl} ) -BSD_LIBC=( elibc_{Free,Net,Open}BSD ) - -nest_usedep() { - local front back - while [[ ${#} -gt 1 ]]; do - front+="${1}? ( " - back+=" )" - shift - done - echo "${front}${1}${back}" -} - -IUSE+=" ${UTIL_LINUX_LIBC[@]} ${BSD_LIBC[@]}" -CDEPEND+=" -uuid? ( - ${UTIL_LINUX_LIBC[@]/%/? ( sys-apps/util-linux )} - $(nest_usedep ${UTIL_LINUX_LIBC[@]/#/!} ${BSD_LIBC[@]/#/!} dev-libs/ossp-uuid) -)" - -DEPEND="${CDEPEND} -!!<sys-apps/sandbox-2.0 -sys-devel/bison -sys-devel/flex -nls? ( sys-devel/gettext ) -xml? ( virtual/pkgconfig ) -" - -RDEPEND="${CDEPEND} -!dev-db/postgresql-docs:${SLOT} -!dev-db/postgresql-base:${SLOT} -!dev-db/postgresql-server:${SLOT} -selinux? ( sec-policy/selinux-postgresql ) -" - -pkg_setup() { - use server && CONFIG_CHECK="~SYSVIPC" linux-info_pkg_setup - - enewgroup postgres 70 - enewuser postgres 70 /bin/sh /var/lib/postgresql postgres - - use python && python-single-r1_pkg_setup -} - -src_prepare() { - # Set proper run directory - sed "s|\(PGSOCKET_DIR\s\+\)\"/tmp\"|\1\"${EPREFIX}/run/postgresql\"|" \ - -i src/include/pg_config_manual.h || die - - # Rely on $PATH being in the proper order so that the correct - # install program is used for modules utilizing PGXS in both - # hardened and non-hardened environments. (Bug #528786) - sed 's/@install_bin@/install -c/' -i src/Makefile.global.in || die - - use server || eapply "${FILESDIR}/${PN}-11_beta1-no-server.patch" - - if use pam ; then - sed "s/\(#define PGSQL_PAM_SERVICE \"postgresql\)/\1-${SLOT}/" \ - -i src/backend/libpq/auth.c || \ - die 'PGSQL_PAM_SERVICE rename failed.' - fi - - eapply_user -} - -src_configure() { - case ${CHOST} in - *-darwin*|*-solaris*) - use nls && append-libs intl - ;; - esac - - export LDFLAGS_SL="${LDFLAGS}" - export LDFLAGS_EX="${LDFLAGS}" - - local PO="${EPREFIX}" - - local i uuid_config="" - if use uuid; then - for i in ${UTIL_LINUX_LIBC[@]}; do - use ${i} && uuid_config="--with-uuid=e2fs" - done - for i in ${BSD_LIBC[@]}; do - use ${i} && uuid_config="--with-uuid=bsd" - done - [[ -z $uuid_config ]] && uuid_config="--with-uuid=ossp" - fi - - econf \ - --prefix="${PO}/usr/$(get_libdir)/postgresql-${SLOT}" \ - --datadir="${PO}/usr/share/postgresql-${SLOT}" \ - --includedir="${PO}/usr/include/postgresql-${SLOT}" \ - --mandir="${PO}/usr/share/postgresql-${SLOT}/man" \ - --sysconfdir="${PO}/etc/postgresql-${SLOT}" \ - --with-system-tzdata="${PO}/usr/share/zoneinfo" \ - $(use_enable !alpha spinlocks) \ - $(use_enable debug) \ - $(use_enable threads thread-safety) \ - $(use_with icu) \ - $(use_with kerberos gssapi) \ - $(use_with ldap) \ - $(use_with llvm) \ - $(use_with pam) \ - $(use_with perl) \ - $(use_with python) \ - $(use_with readline) \ - $(use_with ssl openssl) \ - $(usex server "$(use_with systemd)" '--without-systemd') \ - $(use_with tcl) \ - ${uuid_config} \ - $(use_with xml libxml) \ - $(use_with xml libxslt) \ - $(use_with zlib) \ - $(use_enable nls nls "'$(l10n_get_locales)'") -} - -src_compile() { - emake - emake -C contrib -} - -src_install() { - emake DESTDIR="${D}" install - emake DESTDIR="${D}" install -C contrib - - dodoc README HISTORY doc/{TODO,bug.template} - - # man pages are already built, but if we have the target make them, - # they'll be generated from source before being installed so we - # manually install man pages. - # We use ${SLOT} instead of doman for postgresql.eselect - insinto /usr/share/postgresql-${SLOT}/man/ - doins -r doc/src/sgml/man{1,3,7} - if ! use server; then - # Remove man pages for non-existent binaries - serverman=( - initdb - pg_{archivecleanup,controldata,ctl,resetwal,rewind,standby} - pg_{test_{fsync,timing},upgrade,waldump} - post{gres,master} - ) - for m in ${serverman[@]} ; do - rm "${ED}/usr/share/postgresql-${SLOT}/man/man1/${m}.1" - done - fi - docompress /usr/share/postgresql-${SLOT}/man/man{1,3,7} - - # Create slot specific man pages - local bn f mansec slotted_name - for mansec in 1 3 7 ; do - local rel_manpath="../../postgresql-${SLOT}/man/man${mansec}" - - mkdir -p "${ED}"/usr/share/man/man${mansec} || die "making man dir" - pushd "${ED}"/usr/share/man/man${mansec} > /dev/null || die "pushd failed" - - for f in "${ED}/usr/share/postgresql-${SLOT}/man/man${mansec}"/* ; do - bn=$(basename "${f}") - slotted_name=${bn%.${mansec}}${SLOT}.${mansec} - case ${bn} in - TABLE.7|WITH.7) - echo ".so ${rel_manpath}/SELECT.7" > ${slotted_name} - ;; - *) - echo ".so ${rel_manpath}/${bn}" > ${slotted_name} - ;; - esac - done - - popd > /dev/null - done - - insinto /etc/postgresql-${SLOT} - newins src/bin/psql/psqlrc.sample psqlrc - - # Don't delete libpg{port,common}.a (Bug #571046). They're always - # needed by extensions utilizing PGXS. - use static-libs || \ - find "${ED}" -name '*.a' ! -name libpgport.a ! -name libpgcommon.a \ - -delete - - # Make slot specific links to programs - local f bn - for f in $(find "${ED}/usr/$(get_libdir)/postgresql-${SLOT}/bin" \ - -mindepth 1 -maxdepth 1) - do - bn=$(basename "${f}") - dosym "../$(get_libdir)/postgresql-${SLOT}/bin/${bn}" \ - "/usr/bin/${bn}${SLOT/.}" - done - - if use doc ; then - docinto html - dodoc doc/src/sgml/html/* - fi - - if use server; then - sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \ - "${FILESDIR}/${PN}.confd-9.3" | newconfd - ${PN}-${SLOT} - - sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \ - "${FILESDIR}/${PN}.init-9.3-r1" | newinitd - ${PN}-${SLOT} - - if use systemd; then - sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \ - "${FILESDIR}/${PN}.service-9.6-r1" | \ - systemd_newunit - ${PN}-${SLOT}.service - newbin "${FILESDIR}"/${PN}-check-db-dir ${PN}-${SLOT}-check-db-dir - systemd_newtmpfilesd "${FILESDIR}"/${PN}.tmpfiles ${PN}-${SLOT}.conf - fi - - use pam && pamd_mimic system-auth ${PN}-${SLOT} auth account session - - if use prefix ; then - keepdir /run/postgresql - fperms 1775 /run/postgresql - fi - fi -} - -pkg_postinst() { - use server && use systemd && systemd_tmpfiles_create ${PN}-${SLOT}.conf - postgresql-config update - - elog "If you need a global psqlrc-file, you can place it in:" - elog " ${EROOT}/etc/postgresql-${SLOT}/" - - if use server ; then - elog - elog "Gentoo specific documentation:" - elog "https://wiki.gentoo.org/wiki/PostgreSQL" - elog - elog "Official documentation:" - elog "http://www.postgresql.org/docs/${SLOT}/static/index.html" - elog - elog "The default location of the Unix-domain socket is:" - elog " ${EROOT}/run/postgresql/" - elog - elog "Before initializing the database, you may want to edit PG_INITDB_OPTS" - elog "so that it contains your preferred locale in:" - elog " ${EROOT}/etc/conf.d/postgresql-${SLOT}" - elog - elog "Then, execute the following command to setup the initial database" - elog "environment:" - elog " emerge --config =${CATEGORY}/${PF}" - - if [[ -n ${REPLACING_VERSIONS} ]] ; then - ewarn "If your system is using 'pg_stat_statements' and you are running a" - ewarn "version of PostgreSQL ${SLOT}, we advise that you execute" - ewarn "the following command after upgrading:" - ewarn - ewarn "ALTER EXTENSION pg_stat_statements UPDATE;" - fi - fi -} - -pkg_prerm() { - if use server && [[ -z ${REPLACED_BY_VERSION} ]] ; then - ewarn "Have you dumped and/or migrated the ${SLOT} database cluster?" - ewarn "\thttps://wiki.gentoo.org/wiki/PostgreSQL/QuickStart#Migrating_PostgreSQL" - - ebegin "Resuming removal in 10 seconds (Control-C to cancel)" - sleep 10 - eend 0 - fi -} - -pkg_postrm() { - postgresql-config update -} - -pkg_config() { - use server || die "USE flag 'server' not enabled. Nothing to configure." - - [[ -f "${EROOT}/etc/conf.d/postgresql-${SLOT}" ]] \ - && source "${EROOT}/etc/conf.d/postgresql-${SLOT}" - [[ -z "${PGDATA}" ]] && PGDATA="${EROOT}/etc/postgresql-${SLOT}/" - [[ -z "${DATA_DIR}" ]] \ - && DATA_DIR="${EROOT}/var/lib/postgresql/${SLOT}/data" - - # environment.bz2 may not contain the same locale as the current system - # locale. Unset and source from the current system locale. - if [ -f "${EROOT}/etc/env.d/02locale" ]; then - unset LANG - unset LC_CTYPE - unset LC_NUMERIC - unset LC_TIME - unset LC_COLLATE - unset LC_MONETARY - unset LC_MESSAGES - unset LC_ALL - source "${EROOT}/etc/env.d/02locale" - [ -n "${LANG}" ] && export LANG - [ -n "${LC_CTYPE}" ] && export LC_CTYPE - [ -n "${LC_NUMERIC}" ] && export LC_NUMERIC - [ -n "${LC_TIME}" ] && export LC_TIME - [ -n "${LC_COLLATE}" ] && export LC_COLLATE - [ -n "${LC_MONETARY}" ] && export LC_MONETARY - [ -n "${LC_MESSAGES}" ] && export LC_MESSAGES - [ -n "${LC_ALL}" ] && export LC_ALL - fi - - einfo "You can modify the paths and options passed to initdb by editing:" - einfo " ${EROOT}/etc/conf.d/postgresql-${SLOT}" - einfo - einfo "Information on options that can be passed to initdb are found at:" - einfo " http://www.postgresql.org/docs/${SLOT}/static/creating-cluster.html" - einfo " http://www.postgresql.org/docs/${SLOT}/static/app-initdb.html" - einfo - einfo "PG_INITDB_OPTS is currently set to:" - if [[ -z "${PG_INITDB_OPTS}" ]] ; then - einfo " (none)" - else - einfo " ${PG_INITDB_OPTS}" - fi - einfo - einfo "Configuration files will be installed to:" - einfo " ${PGDATA}" - einfo - einfo "The database cluster will be created in:" - einfo " ${DATA_DIR}" - einfo - - ebegin "Continuing initialization in 5 seconds (Control-C to cancel)" - sleep 5 - eend 0 - - if [ -n "$(ls -A ${DATA_DIR} 2> /dev/null)" ] ; then - eerror "The given directory, '${DATA_DIR}', is not empty." - eerror "Modify DATA_DIR to point to an empty directory." - die "${DATA_DIR} is not empty." - fi - - einfo "Creating the data directory ..." - if [[ ${EUID} == 0 ]] ; then - mkdir -p "$(dirname ${DATA_DIR%/})" || die "Couldn't parent dirs" - mkdir -m 0700 "${DATA_DIR%/}" || die "Couldn't make DATA_DIR" - chown -h postgres:postgres "${DATA_DIR%/}" || die "Couldn't chown" - fi - - einfo "Initializing the database ..." - - if [[ ${EUID} == 0 ]] ; then - su postgres -c "${EROOT}/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -D \"${DATA_DIR}\" ${PG_INITDB_OPTS}" - else - "${EROOT}"/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -U postgres -D "${DATA_DIR}" ${PG_INITDB_OPTS} - fi - - if [[ "${DATA_DIR%/}" != "${PGDATA%/}" ]] ; then - mv "${DATA_DIR%/}"/{pg_{hba,ident},postgresql}.conf "${PGDATA}" - ln -s "${PGDATA%/}"/{pg_{hba,ident},postgresql}.conf "${DATA_DIR%/}" - fi - - # unix_socket_directory has no effect in postgresql.conf as it's - # overridden in the initscript - sed '/^#unix_socket_directories/,+1d' -i "${PGDATA%/}"/postgresql.conf - - cat <<- EOF >> "${PGDATA%/}"/postgresql.conf - # This is here because of https://bugs.gentoo.org/show_bug.cgi?id=518522 - # On the off-chance that you might need to work with UTF-8 encoded - # characters in PL/Perl - plperl.on_init = 'use utf8; use re; package utf8; require "utf8_heavy.pl";' - EOF - - einfo "The autovacuum function, which was in contrib, has been moved to the main" - einfo "PostgreSQL functions starting with 8.1, and starting with 8.4 is now enabled" - einfo "by default. You can disable it in the cluster's:" - einfo " ${PGDATA%/}/postgresql.conf" - einfo - if ! use systemd; then - einfo "The PostgreSQL server, by default, will log events to:" - einfo " ${DATA_DIR%/}/postmaster.log" - einfo - fi - if use prefix ; then - einfo "The location of the configuration files have moved to:" - einfo " ${PGDATA}" - einfo "To start the server:" - einfo " pg_ctl start -D ${DATA_DIR} -o '-D ${PGDATA} --data-directory=${DATA_DIR}'" - einfo "To stop:" - einfo " pg_ctl stop -D ${DATA_DIR}" - einfo - einfo "Or move the configuration files back:" - einfo "mv ${PGDATA}*.conf ${DATA_DIR}" - elif use systemd; then - einfo "You should use the 'postgresql-${SLOT}.service' unit to run PostgreSQL" - einfo "instead of 'pg_ctl'." - else - einfo "You should use the '${EROOT}/etc/init.d/postgresql-${SLOT}' script to run PostgreSQL" - einfo "instead of 'pg_ctl'." - fi -} - -src_test() { - if use server && [[ ${UID} -ne 0 ]] ; then - emake check - - einfo "If you think other tests besides the regression tests are necessary, please" - einfo "submit a bug including a patch for this ebuild to enable them." - else - use server || \ - ewarn 'Tests cannot be run without the "server" use flag enabled.' - [[ ${UID} -eq 0 ]] || \ - ewarn 'Tests cannot be run as root. Enable "userpriv" in FEATURES.' - - ewarn 'Skipping.' - fi -} diff --git a/dev-db/postgresql/postgresql-11.5.ebuild b/dev-db/postgresql/postgresql-11.5.ebuild deleted file mode 100644 index 7ecfb7bea1f4..000000000000 --- a/dev-db/postgresql/postgresql-11.5.ebuild +++ /dev/null @@ -1,467 +0,0 @@ -# Copyright 1999-2020 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -PYTHON_COMPAT=( python3_{6,7} ) - -PLOCALES="af cs de en es fa fr hr hu it ko nb pl pt_BR ro ru sk sl sv tr zh_CN - zh_TW" - -inherit flag-o-matic l10n linux-info multilib pam prefix python-single-r1 \ - systemd user - -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" - -SLOT=$(ver_cut 1) - -MY_PV=${PV/_/} -S="${WORKDIR}/${PN}-${MY_PV}" - -SRC_URI="https://ftp.postgresql.org/pub/source/v${MY_PV}/postgresql-${MY_PV}.tar.bz2" - -LICENSE="POSTGRESQL GPL-2" -DESCRIPTION="PostgreSQL RDBMS" -HOMEPAGE="http://www.postgresql.org/" - -IUSE="debug doc icu kerberos kernel_linux ldap libressl llvm nls pam - perl python +readline selinux +server systemd ssl static-libs tcl - threads uuid xml zlib" - -REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" - -CDEPEND=" ->=app-eselect/eselect-postgresql-2.0 -sys-apps/less -virtual/libintl -icu? ( dev-libs/icu:= ) -kerberos? ( virtual/krb5 ) -ldap? ( net-nds/openldap ) -llvm? ( - sys-devel/llvm:= - sys-devel/clang:= -) -pam? ( sys-libs/pam ) -perl? ( >=dev-lang/perl-5.8:= ) -python? ( ${PYTHON_DEPS} ) -readline? ( sys-libs/readline:0= ) -server? ( systemd? ( sys-apps/systemd ) ) -ssl? ( - !libressl? ( >=dev-libs/openssl-0.9.6-r1:0= ) - libressl? ( dev-libs/libressl:= ) -) -tcl? ( >=dev-lang/tcl-8:0= ) -xml? ( dev-libs/libxml2 dev-libs/libxslt ) -zlib? ( sys-libs/zlib ) -" - -# uuid flags -- depend on sys-apps/util-linux for Linux libcs, or if no -# supported libc in use depend on dev-libs/ossp-uuid. For BSD systems, -# the libc includes UUID functions. -UTIL_LINUX_LIBC=( elibc_{glibc,uclibc,musl} ) -BSD_LIBC=( elibc_{Free,Net,Open}BSD ) - -nest_usedep() { - local front back - while [[ ${#} -gt 1 ]]; do - front+="${1}? ( " - back+=" )" - shift - done - echo "${front}${1}${back}" -} - -IUSE+=" ${UTIL_LINUX_LIBC[@]} ${BSD_LIBC[@]}" -CDEPEND+=" -uuid? ( - ${UTIL_LINUX_LIBC[@]/%/? ( sys-apps/util-linux )} - $(nest_usedep ${UTIL_LINUX_LIBC[@]/#/!} ${BSD_LIBC[@]/#/!} dev-libs/ossp-uuid) -)" - -DEPEND="${CDEPEND} -!!<sys-apps/sandbox-2.0 -sys-devel/bison -sys-devel/flex -nls? ( sys-devel/gettext ) -xml? ( virtual/pkgconfig ) -" - -RDEPEND="${CDEPEND} -!dev-db/postgresql-docs:${SLOT} -!dev-db/postgresql-base:${SLOT} -!dev-db/postgresql-server:${SLOT} -selinux? ( sec-policy/selinux-postgresql ) -" - -pkg_setup() { - use server && CONFIG_CHECK="~SYSVIPC" linux-info_pkg_setup - - enewgroup postgres 70 - enewuser postgres 70 /bin/sh /var/lib/postgresql postgres - - use python && python-single-r1_pkg_setup -} - -src_prepare() { - # Set proper run directory - sed "s|\(PGSOCKET_DIR\s\+\)\"/tmp\"|\1\"${EPREFIX}/run/postgresql\"|" \ - -i src/include/pg_config_manual.h || die - - # Rely on $PATH being in the proper order so that the correct - # install program is used for modules utilizing PGXS in both - # hardened and non-hardened environments. (Bug #528786) - sed 's/@install_bin@/install -c/' -i src/Makefile.global.in || die - - use server || eapply "${FILESDIR}/${PN}-11_beta1-no-server.patch" - - if use pam ; then - sed "s/\(#define PGSQL_PAM_SERVICE \"postgresql\)/\1-${SLOT}/" \ - -i src/backend/libpq/auth.c || \ - die 'PGSQL_PAM_SERVICE rename failed.' - fi - - eapply_user -} - -src_configure() { - case ${CHOST} in - *-darwin*|*-solaris*) - use nls && append-libs intl - ;; - esac - - export LDFLAGS_SL="${LDFLAGS}" - export LDFLAGS_EX="${LDFLAGS}" - - local PO="${EPREFIX}" - - local i uuid_config="" - if use uuid; then - for i in ${UTIL_LINUX_LIBC[@]}; do - use ${i} && uuid_config="--with-uuid=e2fs" - done - for i in ${BSD_LIBC[@]}; do - use ${i} && uuid_config="--with-uuid=bsd" - done - [[ -z $uuid_config ]] && uuid_config="--with-uuid=ossp" - fi - - econf \ - --prefix="${PO}/usr/$(get_libdir)/postgresql-${SLOT}" \ - --datadir="${PO}/usr/share/postgresql-${SLOT}" \ - --includedir="${PO}/usr/include/postgresql-${SLOT}" \ - --mandir="${PO}/usr/share/postgresql-${SLOT}/man" \ - --sysconfdir="${PO}/etc/postgresql-${SLOT}" \ - --with-system-tzdata="${PO}/usr/share/zoneinfo" \ - $(use_enable !alpha spinlocks) \ - $(use_enable debug) \ - $(use_enable threads thread-safety) \ - $(use_with icu) \ - $(use_with kerberos gssapi) \ - $(use_with ldap) \ - $(use_with llvm) \ - $(use_with pam) \ - $(use_with perl) \ - $(use_with python) \ - $(use_with readline) \ - $(use_with ssl openssl) \ - $(usex server "$(use_with systemd)" '--without-systemd') \ - $(use_with tcl) \ - ${uuid_config} \ - $(use_with xml libxml) \ - $(use_with xml libxslt) \ - $(use_with zlib) \ - $(use_enable nls nls "'$(l10n_get_locales)'") -} - -src_compile() { - emake - emake -C contrib -} - -src_install() { - emake DESTDIR="${D}" install - emake DESTDIR="${D}" install -C contrib - - dodoc README HISTORY doc/{TODO,bug.template} - - # man pages are already built, but if we have the target make them, - # they'll be generated from source before being installed so we - # manually install man pages. - # We use ${SLOT} instead of doman for postgresql.eselect - insinto /usr/share/postgresql-${SLOT}/man/ - doins -r doc/src/sgml/man{1,3,7} - if ! use server; then - # Remove man pages for non-existent binaries - serverman=( - initdb - pg_{archivecleanup,controldata,ctl,resetwal,rewind,standby} - pg_{test_{fsync,timing},upgrade,waldump} - post{gres,master} - ) - for m in ${serverman[@]} ; do - rm "${ED}/usr/share/postgresql-${SLOT}/man/man1/${m}.1" - done - fi - docompress /usr/share/postgresql-${SLOT}/man/man{1,3,7} - - # Create slot specific man pages - local bn f mansec slotted_name - for mansec in 1 3 7 ; do - local rel_manpath="../../postgresql-${SLOT}/man/man${mansec}" - - mkdir -p "${ED}"/usr/share/man/man${mansec} || die "making man dir" - pushd "${ED}"/usr/share/man/man${mansec} > /dev/null || die "pushd failed" - - for f in "${ED}/usr/share/postgresql-${SLOT}/man/man${mansec}"/* ; do - bn=$(basename "${f}") - slotted_name=${bn%.${mansec}}${SLOT}.${mansec} - case ${bn} in - TABLE.7|WITH.7) - echo ".so ${rel_manpath}/SELECT.7" > ${slotted_name} - ;; - *) - echo ".so ${rel_manpath}/${bn}" > ${slotted_name} - ;; - esac - done - - popd > /dev/null - done - - insinto /etc/postgresql-${SLOT} - newins src/bin/psql/psqlrc.sample psqlrc - - # Don't delete libpg{port,common}.a (Bug #571046). They're always - # needed by extensions utilizing PGXS. - use static-libs || \ - find "${ED}" -name '*.a' ! -name libpgport.a ! -name libpgcommon.a \ - -delete - - # Make slot specific links to programs - local f bn - for f in $(find "${ED}/usr/$(get_libdir)/postgresql-${SLOT}/bin" \ - -mindepth 1 -maxdepth 1) - do - bn=$(basename "${f}") - dosym "../$(get_libdir)/postgresql-${SLOT}/bin/${bn}" \ - "/usr/bin/${bn}${SLOT/.}" - done - - if use doc ; then - docinto html - dodoc doc/src/sgml/html/* - fi - - if use server; then - sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \ - "${FILESDIR}/${PN}.confd-9.3" | newconfd - ${PN}-${SLOT} - - sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \ - "${FILESDIR}/${PN}.init-9.3-r1" | newinitd - ${PN}-${SLOT} - - if use systemd; then - sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \ - "${FILESDIR}/${PN}.service-9.6-r1" | \ - systemd_newunit - ${PN}-${SLOT}.service - newbin "${FILESDIR}"/${PN}-check-db-dir ${PN}-${SLOT}-check-db-dir - systemd_newtmpfilesd "${FILESDIR}"/${PN}.tmpfiles ${PN}-${SLOT}.conf - fi - - use pam && pamd_mimic system-auth ${PN}-${SLOT} auth account session - - if use prefix ; then - keepdir /run/postgresql - fperms 1775 /run/postgresql - fi - fi -} - -pkg_postinst() { - use server && use systemd && systemd_tmpfiles_create ${PN}-${SLOT}.conf - postgresql-config update - - elog "If you need a global psqlrc-file, you can place it in:" - elog " ${EROOT}/etc/postgresql-${SLOT}/" - - if use server ; then - elog - elog "Gentoo specific documentation:" - elog "https://wiki.gentoo.org/wiki/PostgreSQL" - elog - elog "Official documentation:" - elog "http://www.postgresql.org/docs/${SLOT}/static/index.html" - elog - elog "The default location of the Unix-domain socket is:" - elog " ${EROOT}/run/postgresql/" - elog - elog "Before initializing the database, you may want to edit PG_INITDB_OPTS" - elog "so that it contains your preferred locale in:" - elog " ${EROOT}/etc/conf.d/postgresql-${SLOT}" - elog - elog "Then, execute the following command to setup the initial database" - elog "environment:" - elog " emerge --config =${CATEGORY}/${PF}" - - if [[ -n ${REPLACING_VERSIONS} ]] ; then - ewarn "If your system is using 'pg_stat_statements' and you are running a" - ewarn "version of PostgreSQL ${SLOT}, we advise that you execute" - ewarn "the following command after upgrading:" - ewarn - ewarn "ALTER EXTENSION pg_stat_statements UPDATE;" - fi - fi -} - -pkg_prerm() { - if use server && [[ -z ${REPLACED_BY_VERSION} ]] ; then - ewarn "Have you dumped and/or migrated the ${SLOT} database cluster?" - ewarn "\thttps://wiki.gentoo.org/wiki/PostgreSQL/QuickStart#Migrating_PostgreSQL" - - ebegin "Resuming removal in 10 seconds (Control-C to cancel)" - sleep 10 - eend 0 - fi -} - -pkg_postrm() { - postgresql-config update -} - -pkg_config() { - use server || die "USE flag 'server' not enabled. Nothing to configure." - - [[ -f "${EROOT}/etc/conf.d/postgresql-${SLOT}" ]] \ - && source "${EROOT}/etc/conf.d/postgresql-${SLOT}" - [[ -z "${PGDATA}" ]] && PGDATA="${EROOT}/etc/postgresql-${SLOT}/" - [[ -z "${DATA_DIR}" ]] \ - && DATA_DIR="${EROOT}/var/lib/postgresql/${SLOT}/data" - - # environment.bz2 may not contain the same locale as the current system - # locale. Unset and source from the current system locale. - if [ -f "${EROOT}/etc/env.d/02locale" ]; then - unset LANG - unset LC_CTYPE - unset LC_NUMERIC - unset LC_TIME - unset LC_COLLATE - unset LC_MONETARY - unset LC_MESSAGES - unset LC_ALL - source "${EROOT}/etc/env.d/02locale" - [ -n "${LANG}" ] && export LANG - [ -n "${LC_CTYPE}" ] && export LC_CTYPE - [ -n "${LC_NUMERIC}" ] && export LC_NUMERIC - [ -n "${LC_TIME}" ] && export LC_TIME - [ -n "${LC_COLLATE}" ] && export LC_COLLATE - [ -n "${LC_MONETARY}" ] && export LC_MONETARY - [ -n "${LC_MESSAGES}" ] && export LC_MESSAGES - [ -n "${LC_ALL}" ] && export LC_ALL - fi - - einfo "You can modify the paths and options passed to initdb by editing:" - einfo " ${EROOT}/etc/conf.d/postgresql-${SLOT}" - einfo - einfo "Information on options that can be passed to initdb are found at:" - einfo " http://www.postgresql.org/docs/${SLOT}/static/creating-cluster.html" - einfo " http://www.postgresql.org/docs/${SLOT}/static/app-initdb.html" - einfo - einfo "PG_INITDB_OPTS is currently set to:" - if [[ -z "${PG_INITDB_OPTS}" ]] ; then - einfo " (none)" - else - einfo " ${PG_INITDB_OPTS}" - fi - einfo - einfo "Configuration files will be installed to:" - einfo " ${PGDATA}" - einfo - einfo "The database cluster will be created in:" - einfo " ${DATA_DIR}" - einfo - - ebegin "Continuing initialization in 5 seconds (Control-C to cancel)" - sleep 5 - eend 0 - - if [ -n "$(ls -A ${DATA_DIR} 2> /dev/null)" ] ; then - eerror "The given directory, '${DATA_DIR}', is not empty." - eerror "Modify DATA_DIR to point to an empty directory." - die "${DATA_DIR} is not empty." - fi - - einfo "Creating the data directory ..." - if [[ ${EUID} == 0 ]] ; then - mkdir -p "$(dirname ${DATA_DIR%/})" || die "Couldn't parent dirs" - mkdir -m 0700 "${DATA_DIR%/}" || die "Couldn't make DATA_DIR" - chown -h postgres:postgres "${DATA_DIR%/}" || die "Couldn't chown" - fi - - einfo "Initializing the database ..." - - if [[ ${EUID} == 0 ]] ; then - su postgres -c "${EROOT}/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -D \"${DATA_DIR}\" ${PG_INITDB_OPTS}" - else - "${EROOT}"/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -U postgres -D "${DATA_DIR}" ${PG_INITDB_OPTS} - fi - - if [[ "${DATA_DIR%/}" != "${PGDATA%/}" ]] ; then - mv "${DATA_DIR%/}"/{pg_{hba,ident},postgresql}.conf "${PGDATA}" - ln -s "${PGDATA%/}"/{pg_{hba,ident},postgresql}.conf "${DATA_DIR%/}" - fi - - # unix_socket_directory has no effect in postgresql.conf as it's - # overridden in the initscript - sed '/^#unix_socket_directories/,+1d' -i "${PGDATA%/}"/postgresql.conf - - cat <<- EOF >> "${PGDATA%/}"/postgresql.conf - # This is here because of https://bugs.gentoo.org/show_bug.cgi?id=518522 - # On the off-chance that you might need to work with UTF-8 encoded - # characters in PL/Perl - plperl.on_init = 'use utf8; use re; package utf8; require "utf8_heavy.pl";' - EOF - - einfo "The autovacuum function, which was in contrib, has been moved to the main" - einfo "PostgreSQL functions starting with 8.1, and starting with 8.4 is now enabled" - einfo "by default. You can disable it in the cluster's:" - einfo " ${PGDATA%/}/postgresql.conf" - einfo - if ! use systemd; then - einfo "The PostgreSQL server, by default, will log events to:" - einfo " ${DATA_DIR%/}/postmaster.log" - einfo - fi - if use prefix ; then - einfo "The location of the configuration files have moved to:" - einfo " ${PGDATA}" - einfo "To start the server:" - einfo " pg_ctl start -D ${DATA_DIR} -o '-D ${PGDATA} --data-directory=${DATA_DIR}'" - einfo "To stop:" - einfo " pg_ctl stop -D ${DATA_DIR}" - einfo - einfo "Or move the configuration files back:" - einfo "mv ${PGDATA}*.conf ${DATA_DIR}" - elif use systemd; then - einfo "You should use the 'postgresql-${SLOT}.service' unit to run PostgreSQL" - einfo "instead of 'pg_ctl'." - else - einfo "You should use the '${EROOT}/etc/init.d/postgresql-${SLOT}' script to run PostgreSQL" - einfo "instead of 'pg_ctl'." - fi -} - -src_test() { - if use server && [[ ${UID} -ne 0 ]] ; then - emake check - - einfo "If you think other tests besides the regression tests are necessary, please" - einfo "submit a bug including a patch for this ebuild to enable them." - else - use server || \ - ewarn 'Tests cannot be run without the "server" use flag enabled.' - [[ ${UID} -eq 0 ]] || \ - ewarn 'Tests cannot be run as root. Enable "userpriv" in FEATURES.' - - ewarn 'Skipping.' - fi -} diff --git a/dev-db/postgresql/postgresql-11.6.ebuild b/dev-db/postgresql/postgresql-11.6.ebuild deleted file mode 100644 index 372964685b53..000000000000 --- a/dev-db/postgresql/postgresql-11.6.ebuild +++ /dev/null @@ -1,467 +0,0 @@ -# Copyright 1999-2020 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -PYTHON_COMPAT=( python3_{6,7} ) - -PLOCALES="af cs de en es fa fr hr hu it ko nb pl pt_BR ro ru sk sl sv tr zh_CN - zh_TW" - -inherit flag-o-matic l10n linux-info multilib pam prefix python-single-r1 \ - systemd user - -KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~mips ppc ppc64 ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" - -SLOT=$(ver_cut 1) - -MY_PV=${PV/_/} -S="${WORKDIR}/${PN}-${MY_PV}" - -SRC_URI="https://ftp.postgresql.org/pub/source/v${MY_PV}/postgresql-${MY_PV}.tar.bz2" - -LICENSE="POSTGRESQL GPL-2" -DESCRIPTION="PostgreSQL RDBMS" -HOMEPAGE="http://www.postgresql.org/" - -IUSE="debug doc icu kerberos kernel_linux ldap libressl llvm nls pam - perl python +readline selinux +server systemd ssl static-libs tcl - threads uuid xml zlib" - -REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" - -CDEPEND=" ->=app-eselect/eselect-postgresql-2.0 -sys-apps/less -virtual/libintl -icu? ( dev-libs/icu:= ) -kerberos? ( virtual/krb5 ) -ldap? ( net-nds/openldap ) -llvm? ( - sys-devel/llvm:= - sys-devel/clang:= -) -pam? ( sys-libs/pam ) -perl? ( >=dev-lang/perl-5.8:= ) -python? ( ${PYTHON_DEPS} ) -readline? ( sys-libs/readline:0= ) -server? ( systemd? ( sys-apps/systemd ) ) -ssl? ( - !libressl? ( >=dev-libs/openssl-0.9.6-r1:0= ) - libressl? ( dev-libs/libressl:= ) -) -tcl? ( >=dev-lang/tcl-8:0= ) -xml? ( dev-libs/libxml2 dev-libs/libxslt ) -zlib? ( sys-libs/zlib ) -" - -# uuid flags -- depend on sys-apps/util-linux for Linux libcs, or if no -# supported libc in use depend on dev-libs/ossp-uuid. For BSD systems, -# the libc includes UUID functions. -UTIL_LINUX_LIBC=( elibc_{glibc,uclibc,musl} ) -BSD_LIBC=( elibc_{Free,Net,Open}BSD ) - -nest_usedep() { - local front back - while [[ ${#} -gt 1 ]]; do - front+="${1}? ( " - back+=" )" - shift - done - echo "${front}${1}${back}" -} - -IUSE+=" ${UTIL_LINUX_LIBC[@]} ${BSD_LIBC[@]}" -CDEPEND+=" -uuid? ( - ${UTIL_LINUX_LIBC[@]/%/? ( sys-apps/util-linux )} - $(nest_usedep ${UTIL_LINUX_LIBC[@]/#/!} ${BSD_LIBC[@]/#/!} dev-libs/ossp-uuid) -)" - -DEPEND="${CDEPEND} -!!<sys-apps/sandbox-2.0 -sys-devel/bison -sys-devel/flex -nls? ( sys-devel/gettext ) -xml? ( virtual/pkgconfig ) -" - -RDEPEND="${CDEPEND} -!dev-db/postgresql-docs:${SLOT} -!dev-db/postgresql-base:${SLOT} -!dev-db/postgresql-server:${SLOT} -selinux? ( sec-policy/selinux-postgresql ) -" - -pkg_setup() { - use server && CONFIG_CHECK="~SYSVIPC" linux-info_pkg_setup - - enewgroup postgres 70 - enewuser postgres 70 /bin/sh /var/lib/postgresql postgres - - use python && python-single-r1_pkg_setup -} - -src_prepare() { - # Set proper run directory - sed "s|\(PGSOCKET_DIR\s\+\)\"/tmp\"|\1\"${EPREFIX}/run/postgresql\"|" \ - -i src/include/pg_config_manual.h || die - - # Rely on $PATH being in the proper order so that the correct - # install program is used for modules utilizing PGXS in both - # hardened and non-hardened environments. (Bug #528786) - sed 's/@install_bin@/install -c/' -i src/Makefile.global.in || die - - use server || eapply "${FILESDIR}/${PN}-11_beta1-no-server.patch" - - if use pam ; then - sed "s/\(#define PGSQL_PAM_SERVICE \"postgresql\)/\1-${SLOT}/" \ - -i src/backend/libpq/auth.c || \ - die 'PGSQL_PAM_SERVICE rename failed.' - fi - - eapply_user -} - -src_configure() { - case ${CHOST} in - *-darwin*|*-solaris*) - use nls && append-libs intl - ;; - esac - - export LDFLAGS_SL="${LDFLAGS}" - export LDFLAGS_EX="${LDFLAGS}" - - local PO="${EPREFIX}" - - local i uuid_config="" - if use uuid; then - for i in ${UTIL_LINUX_LIBC[@]}; do - use ${i} && uuid_config="--with-uuid=e2fs" - done - for i in ${BSD_LIBC[@]}; do - use ${i} && uuid_config="--with-uuid=bsd" - done - [[ -z $uuid_config ]] && uuid_config="--with-uuid=ossp" - fi - - econf \ - --prefix="${PO}/usr/$(get_libdir)/postgresql-${SLOT}" \ - --datadir="${PO}/usr/share/postgresql-${SLOT}" \ - --includedir="${PO}/usr/include/postgresql-${SLOT}" \ - --mandir="${PO}/usr/share/postgresql-${SLOT}/man" \ - --sysconfdir="${PO}/etc/postgresql-${SLOT}" \ - --with-system-tzdata="${PO}/usr/share/zoneinfo" \ - $(use_enable !alpha spinlocks) \ - $(use_enable debug) \ - $(use_enable threads thread-safety) \ - $(use_with icu) \ - $(use_with kerberos gssapi) \ - $(use_with ldap) \ - $(use_with llvm) \ - $(use_with pam) \ - $(use_with perl) \ - $(use_with python) \ - $(use_with readline) \ - $(use_with ssl openssl) \ - $(usex server "$(use_with systemd)" '--without-systemd') \ - $(use_with tcl) \ - ${uuid_config} \ - $(use_with xml libxml) \ - $(use_with xml libxslt) \ - $(use_with zlib) \ - $(use_enable nls nls "'$(l10n_get_locales)'") -} - -src_compile() { - emake - emake -C contrib -} - -src_install() { - emake DESTDIR="${D}" install - emake DESTDIR="${D}" install -C contrib - - dodoc README HISTORY doc/{TODO,bug.template} - - # man pages are already built, but if we have the target make them, - # they'll be generated from source before being installed so we - # manually install man pages. - # We use ${SLOT} instead of doman for postgresql.eselect - insinto /usr/share/postgresql-${SLOT}/man/ - doins -r doc/src/sgml/man{1,3,7} - if ! use server; then - # Remove man pages for non-existent binaries - serverman=( - initdb - pg_{archivecleanup,controldata,ctl,resetwal,rewind,standby} - pg_{test_{fsync,timing},upgrade,waldump} - post{gres,master} - ) - for m in ${serverman[@]} ; do - rm "${ED}/usr/share/postgresql-${SLOT}/man/man1/${m}.1" - done - fi - docompress /usr/share/postgresql-${SLOT}/man/man{1,3,7} - - # Create slot specific man pages - local bn f mansec slotted_name - for mansec in 1 3 7 ; do - local rel_manpath="../../postgresql-${SLOT}/man/man${mansec}" - - mkdir -p "${ED}"/usr/share/man/man${mansec} || die "making man dir" - pushd "${ED}"/usr/share/man/man${mansec} > /dev/null || die "pushd failed" - - for f in "${ED}/usr/share/postgresql-${SLOT}/man/man${mansec}"/* ; do - bn=$(basename "${f}") - slotted_name=${bn%.${mansec}}${SLOT}.${mansec} - case ${bn} in - TABLE.7|WITH.7) - echo ".so ${rel_manpath}/SELECT.7" > ${slotted_name} - ;; - *) - echo ".so ${rel_manpath}/${bn}" > ${slotted_name} - ;; - esac - done - - popd > /dev/null - done - - insinto /etc/postgresql-${SLOT} - newins src/bin/psql/psqlrc.sample psqlrc - - # Don't delete libpg{port,common}.a (Bug #571046). They're always - # needed by extensions utilizing PGXS. - use static-libs || \ - find "${ED}" -name '*.a' ! -name libpgport.a ! -name libpgcommon.a \ - -delete - - # Make slot specific links to programs - local f bn - for f in $(find "${ED}/usr/$(get_libdir)/postgresql-${SLOT}/bin" \ - -mindepth 1 -maxdepth 1) - do - bn=$(basename "${f}") - dosym "../$(get_libdir)/postgresql-${SLOT}/bin/${bn}" \ - "/usr/bin/${bn}${SLOT/.}" - done - - if use doc ; then - docinto html - dodoc doc/src/sgml/html/* - fi - - if use server; then - sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \ - "${FILESDIR}/${PN}.confd-9.3" | newconfd - ${PN}-${SLOT} - - sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \ - "${FILESDIR}/${PN}.init-9.3-r1" | newinitd - ${PN}-${SLOT} - - if use systemd; then - sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \ - "${FILESDIR}/${PN}.service-9.6-r1" | \ - systemd_newunit - ${PN}-${SLOT}.service - newbin "${FILESDIR}"/${PN}-check-db-dir ${PN}-${SLOT}-check-db-dir - systemd_newtmpfilesd "${FILESDIR}"/${PN}.tmpfiles ${PN}-${SLOT}.conf - fi - - use pam && pamd_mimic system-auth ${PN}-${SLOT} auth account session - - if use prefix ; then - keepdir /run/postgresql - fperms 1775 /run/postgresql - fi - fi -} - -pkg_postinst() { - use server && use systemd && systemd_tmpfiles_create ${PN}-${SLOT}.conf - postgresql-config update - - elog "If you need a global psqlrc-file, you can place it in:" - elog " ${EROOT}/etc/postgresql-${SLOT}/" - - if use server ; then - elog - elog "Gentoo specific documentation:" - elog "https://wiki.gentoo.org/wiki/PostgreSQL" - elog - elog "Official documentation:" - elog "http://www.postgresql.org/docs/${SLOT}/static/index.html" - elog - elog "The default location of the Unix-domain socket is:" - elog " ${EROOT}/run/postgresql/" - elog - elog "Before initializing the database, you may want to edit PG_INITDB_OPTS" - elog "so that it contains your preferred locale in:" - elog " ${EROOT}/etc/conf.d/postgresql-${SLOT}" - elog - elog "Then, execute the following command to setup the initial database" - elog "environment:" - elog " emerge --config =${CATEGORY}/${PF}" - - if [[ -n ${REPLACING_VERSIONS} ]] ; then - ewarn "If your system is using 'pg_stat_statements' and you are running a" - ewarn "version of PostgreSQL ${SLOT}, we advise that you execute" - ewarn "the following command after upgrading:" - ewarn - ewarn "ALTER EXTENSION pg_stat_statements UPDATE;" - fi - fi -} - -pkg_prerm() { - if use server && [[ -z ${REPLACED_BY_VERSION} ]] ; then - ewarn "Have you dumped and/or migrated the ${SLOT} database cluster?" - ewarn "\thttps://wiki.gentoo.org/wiki/PostgreSQL/QuickStart#Migrating_PostgreSQL" - - ebegin "Resuming removal in 10 seconds (Control-C to cancel)" - sleep 10 - eend 0 - fi -} - -pkg_postrm() { - postgresql-config update -} - -pkg_config() { - use server || die "USE flag 'server' not enabled. Nothing to configure." - - [[ -f "${EROOT}/etc/conf.d/postgresql-${SLOT}" ]] \ - && source "${EROOT}/etc/conf.d/postgresql-${SLOT}" - [[ -z "${PGDATA}" ]] && PGDATA="${EROOT}/etc/postgresql-${SLOT}/" - [[ -z "${DATA_DIR}" ]] \ - && DATA_DIR="${EROOT}/var/lib/postgresql/${SLOT}/data" - - # environment.bz2 may not contain the same locale as the current system - # locale. Unset and source from the current system locale. - if [ -f "${EROOT}/etc/env.d/02locale" ]; then - unset LANG - unset LC_CTYPE - unset LC_NUMERIC - unset LC_TIME - unset LC_COLLATE - unset LC_MONETARY - unset LC_MESSAGES - unset LC_ALL - source "${EROOT}/etc/env.d/02locale" - [ -n "${LANG}" ] && export LANG - [ -n "${LC_CTYPE}" ] && export LC_CTYPE - [ -n "${LC_NUMERIC}" ] && export LC_NUMERIC - [ -n "${LC_TIME}" ] && export LC_TIME - [ -n "${LC_COLLATE}" ] && export LC_COLLATE - [ -n "${LC_MONETARY}" ] && export LC_MONETARY - [ -n "${LC_MESSAGES}" ] && export LC_MESSAGES - [ -n "${LC_ALL}" ] && export LC_ALL - fi - - einfo "You can modify the paths and options passed to initdb by editing:" - einfo " ${EROOT}/etc/conf.d/postgresql-${SLOT}" - einfo - einfo "Information on options that can be passed to initdb are found at:" - einfo " http://www.postgresql.org/docs/${SLOT}/static/creating-cluster.html" - einfo " http://www.postgresql.org/docs/${SLOT}/static/app-initdb.html" - einfo - einfo "PG_INITDB_OPTS is currently set to:" - if [[ -z "${PG_INITDB_OPTS}" ]] ; then - einfo " (none)" - else - einfo " ${PG_INITDB_OPTS}" - fi - einfo - einfo "Configuration files will be installed to:" - einfo " ${PGDATA}" - einfo - einfo "The database cluster will be created in:" - einfo " ${DATA_DIR}" - einfo - - ebegin "Continuing initialization in 5 seconds (Control-C to cancel)" - sleep 5 - eend 0 - - if [ -n "$(ls -A ${DATA_DIR} 2> /dev/null)" ] ; then - eerror "The given directory, '${DATA_DIR}', is not empty." - eerror "Modify DATA_DIR to point to an empty directory." - die "${DATA_DIR} is not empty." - fi - - einfo "Creating the data directory ..." - if [[ ${EUID} == 0 ]] ; then - mkdir -p "$(dirname ${DATA_DIR%/})" || die "Couldn't parent dirs" - mkdir -m 0700 "${DATA_DIR%/}" || die "Couldn't make DATA_DIR" - chown -h postgres:postgres "${DATA_DIR%/}" || die "Couldn't chown" - fi - - einfo "Initializing the database ..." - - if [[ ${EUID} == 0 ]] ; then - su postgres -c "${EROOT}/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -D \"${DATA_DIR}\" ${PG_INITDB_OPTS}" - else - "${EROOT}"/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -U postgres -D "${DATA_DIR}" ${PG_INITDB_OPTS} - fi - - if [[ "${DATA_DIR%/}" != "${PGDATA%/}" ]] ; then - mv "${DATA_DIR%/}"/{pg_{hba,ident},postgresql}.conf "${PGDATA}" - ln -s "${PGDATA%/}"/{pg_{hba,ident},postgresql}.conf "${DATA_DIR%/}" - fi - - # unix_socket_directory has no effect in postgresql.conf as it's - # overridden in the initscript - sed '/^#unix_socket_directories/,+1d' -i "${PGDATA%/}"/postgresql.conf - - cat <<- EOF >> "${PGDATA%/}"/postgresql.conf - # This is here because of https://bugs.gentoo.org/show_bug.cgi?id=518522 - # On the off-chance that you might need to work with UTF-8 encoded - # characters in PL/Perl - plperl.on_init = 'use utf8; use re; package utf8; require "utf8_heavy.pl";' - EOF - - einfo "The autovacuum function, which was in contrib, has been moved to the main" - einfo "PostgreSQL functions starting with 8.1, and starting with 8.4 is now enabled" - einfo "by default. You can disable it in the cluster's:" - einfo " ${PGDATA%/}/postgresql.conf" - einfo - if ! use systemd; then - einfo "The PostgreSQL server, by default, will log events to:" - einfo " ${DATA_DIR%/}/postmaster.log" - einfo - fi - if use prefix ; then - einfo "The location of the configuration files have moved to:" - einfo " ${PGDATA}" - einfo "To start the server:" - einfo " pg_ctl start -D ${DATA_DIR} -o '-D ${PGDATA} --data-directory=${DATA_DIR}'" - einfo "To stop:" - einfo " pg_ctl stop -D ${DATA_DIR}" - einfo - einfo "Or move the configuration files back:" - einfo "mv ${PGDATA}*.conf ${DATA_DIR}" - elif use systemd; then - einfo "You should use the 'postgresql-${SLOT}.service' unit to run PostgreSQL" - einfo "instead of 'pg_ctl'." - else - einfo "You should use the '${EROOT}/etc/init.d/postgresql-${SLOT}' script to run PostgreSQL" - einfo "instead of 'pg_ctl'." - fi -} - -src_test() { - if use server && [[ ${UID} -ne 0 ]] ; then - emake check - - einfo "If you think other tests besides the regression tests are necessary, please" - einfo "submit a bug including a patch for this ebuild to enable them." - else - use server || \ - ewarn 'Tests cannot be run without the "server" use flag enabled.' - [[ ${UID} -eq 0 ]] || \ - ewarn 'Tests cannot be run as root. Enable "userpriv" in FEATURES.' - - ewarn 'Skipping.' - fi -} diff --git a/dev-db/postgresql/postgresql-12.0.ebuild b/dev-db/postgresql/postgresql-12.0.ebuild deleted file mode 100644 index 49dd313ec7ed..000000000000 --- a/dev-db/postgresql/postgresql-12.0.ebuild +++ /dev/null @@ -1,467 +0,0 @@ -# Copyright 1999-2020 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -PYTHON_COMPAT=( python3_{6,7} ) - -PLOCALES="af cs de en es fa fr hr hu it ko nb pl pt_BR ro ru sk sl sv tr zh_CN - zh_TW" - -inherit flag-o-matic l10n linux-info multilib pam prefix python-single-r1 \ - systemd user - -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" - -SLOT=$(ver_cut 1) - -MY_PV=${PV/_/} -S="${WORKDIR}/${PN}-${MY_PV}" - -SRC_URI="https://ftp.postgresql.org/pub/source/v${MY_PV}/postgresql-${MY_PV}.tar.bz2" - -LICENSE="POSTGRESQL GPL-2" -DESCRIPTION="PostgreSQL RDBMS" -HOMEPAGE="http://www.postgresql.org/" - -IUSE="debug doc icu kerberos kernel_linux ldap libressl llvm nls pam - perl python +readline selinux +server systemd ssl static-libs tcl - threads uuid xml zlib" - -REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" - -CDEPEND=" ->=app-eselect/eselect-postgresql-2.0 -sys-apps/less -virtual/libintl -icu? ( dev-libs/icu:= ) -kerberos? ( virtual/krb5 ) -ldap? ( net-nds/openldap ) -llvm? ( - sys-devel/llvm:= - sys-devel/clang:= -) -pam? ( sys-libs/pam ) -perl? ( >=dev-lang/perl-5.8:= ) -python? ( ${PYTHON_DEPS} ) -readline? ( sys-libs/readline:0= ) -server? ( systemd? ( sys-apps/systemd ) ) -ssl? ( - !libressl? ( >=dev-libs/openssl-0.9.6-r1:0= ) - libressl? ( dev-libs/libressl:= ) -) -tcl? ( >=dev-lang/tcl-8:0= ) -xml? ( dev-libs/libxml2 dev-libs/libxslt ) -zlib? ( sys-libs/zlib ) -" - -# uuid flags -- depend on sys-apps/util-linux for Linux libcs, or if no -# supported libc in use depend on dev-libs/ossp-uuid. For BSD systems, -# the libc includes UUID functions. -UTIL_LINUX_LIBC=( elibc_{glibc,uclibc,musl} ) -BSD_LIBC=( elibc_{Free,Net,Open}BSD ) - -nest_usedep() { - local front back - while [[ ${#} -gt 1 ]]; do - front+="${1}? ( " - back+=" )" - shift - done - echo "${front}${1}${back}" -} - -IUSE+=" ${UTIL_LINUX_LIBC[@]} ${BSD_LIBC[@]}" -CDEPEND+=" -uuid? ( - ${UTIL_LINUX_LIBC[@]/%/? ( sys-apps/util-linux )} - $(nest_usedep ${UTIL_LINUX_LIBC[@]/#/!} ${BSD_LIBC[@]/#/!} dev-libs/ossp-uuid) -)" - -DEPEND="${CDEPEND} -!!<sys-apps/sandbox-2.0 -sys-devel/bison -sys-devel/flex -nls? ( sys-devel/gettext ) -xml? ( virtual/pkgconfig ) -" - -RDEPEND="${CDEPEND} -!dev-db/postgresql-docs:${SLOT} -!dev-db/postgresql-base:${SLOT} -!dev-db/postgresql-server:${SLOT} -selinux? ( sec-policy/selinux-postgresql ) -" - -pkg_setup() { - use server && CONFIG_CHECK="~SYSVIPC" linux-info_pkg_setup - - enewgroup postgres 70 - enewuser postgres 70 /bin/sh /var/lib/postgresql postgres - - use python && python-single-r1_pkg_setup -} - -src_prepare() { - # Set proper run directory - sed "s|\(PGSOCKET_DIR\s\+\)\"/tmp\"|\1\"${EPREFIX}/run/postgresql\"|" \ - -i src/include/pg_config_manual.h || die - - # Rely on $PATH being in the proper order so that the correct - # install program is used for modules utilizing PGXS in both - # hardened and non-hardened environments. (Bug #528786) - sed 's/@install_bin@/install -c/' -i src/Makefile.global.in || die - - use server || eapply "${FILESDIR}/${PN}-11_beta1-no-server.patch" - - if use pam ; then - sed "s/\(#define PGSQL_PAM_SERVICE \"postgresql\)/\1-${SLOT}/" \ - -i src/backend/libpq/auth.c || \ - die 'PGSQL_PAM_SERVICE rename failed.' - fi - - eapply_user -} - -src_configure() { - case ${CHOST} in - *-darwin*|*-solaris*) - use nls && append-libs intl - ;; - esac - - export LDFLAGS_SL="${LDFLAGS}" - export LDFLAGS_EX="${LDFLAGS}" - - local PO="${EPREFIX}" - - local i uuid_config="" - if use uuid; then - for i in ${UTIL_LINUX_LIBC[@]}; do - use ${i} && uuid_config="--with-uuid=e2fs" - done - for i in ${BSD_LIBC[@]}; do - use ${i} && uuid_config="--with-uuid=bsd" - done - [[ -z $uuid_config ]] && uuid_config="--with-uuid=ossp" - fi - - econf \ - --prefix="${PO}/usr/$(get_libdir)/postgresql-${SLOT}" \ - --datadir="${PO}/usr/share/postgresql-${SLOT}" \ - --includedir="${PO}/usr/include/postgresql-${SLOT}" \ - --mandir="${PO}/usr/share/postgresql-${SLOT}/man" \ - --sysconfdir="${PO}/etc/postgresql-${SLOT}" \ - --with-system-tzdata="${PO}/usr/share/zoneinfo" \ - $(use_enable !alpha spinlocks) \ - $(use_enable debug) \ - $(use_enable threads thread-safety) \ - $(use_with icu) \ - $(use_with kerberos gssapi) \ - $(use_with ldap) \ - $(use_with llvm) \ - $(use_with pam) \ - $(use_with perl) \ - $(use_with python) \ - $(use_with readline) \ - $(use_with ssl openssl) \ - $(usex server "$(use_with systemd)" '--without-systemd') \ - $(use_with tcl) \ - ${uuid_config} \ - $(use_with xml libxml) \ - $(use_with xml libxslt) \ - $(use_with zlib) \ - $(use_enable nls nls "'$(l10n_get_locales)'") -} - -src_compile() { - emake - emake -C contrib -} - -src_install() { - emake DESTDIR="${D}" install - emake DESTDIR="${D}" install -C contrib - - dodoc README HISTORY - - # man pages are already built, but if we have the target make them, - # they'll be generated from source before being installed so we - # manually install man pages. - # We use ${SLOT} instead of doman for postgresql.eselect - insinto /usr/share/postgresql-${SLOT}/man/ - doins -r doc/src/sgml/man{1,3,7} - if ! use server; then - # Remove man pages for non-existent binaries - serverman=( - initdb - pg_{archivecleanup,controldata,ctl,resetwal,rewind,standby} - pg_{test_{fsync,timing},upgrade,waldump} - post{gres,master} - ) - for m in ${serverman[@]} ; do - rm "${ED}/usr/share/postgresql-${SLOT}/man/man1/${m}.1" - done - fi - docompress /usr/share/postgresql-${SLOT}/man/man{1,3,7} - - # Create slot specific man pages - local bn f mansec slotted_name - for mansec in 1 3 7 ; do - local rel_manpath="../../postgresql-${SLOT}/man/man${mansec}" - - mkdir -p "${ED}"/usr/share/man/man${mansec} || die "making man dir" - pushd "${ED}"/usr/share/man/man${mansec} > /dev/null || die "pushd failed" - - for f in "${ED}/usr/share/postgresql-${SLOT}/man/man${mansec}"/* ; do - bn=$(basename "${f}") - slotted_name=${bn%.${mansec}}${SLOT}.${mansec} - case ${bn} in - TABLE.7|WITH.7) - echo ".so ${rel_manpath}/SELECT.7" > ${slotted_name} - ;; - *) - echo ".so ${rel_manpath}/${bn}" > ${slotted_name} - ;; - esac - done - - popd > /dev/null - done - - insinto /etc/postgresql-${SLOT} - newins src/bin/psql/psqlrc.sample psqlrc - - # Don't delete libpg{port,common}.a (Bug #571046). They're always - # needed by extensions utilizing PGXS. - use static-libs || \ - find "${ED}" -name '*.a' ! -name libpgport.a ! -name libpgcommon.a \ - -delete - - # Make slot specific links to programs - local f bn - for f in $(find "${ED}/usr/$(get_libdir)/postgresql-${SLOT}/bin" \ - -mindepth 1 -maxdepth 1) - do - bn=$(basename "${f}") - dosym "../$(get_libdir)/postgresql-${SLOT}/bin/${bn}" \ - "/usr/bin/${bn}${SLOT/.}" - done - - if use doc ; then - docinto html - dodoc doc/src/sgml/html/* - fi - - if use server; then - sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \ - "${FILESDIR}/${PN}.confd-9.3" | newconfd - ${PN}-${SLOT} - - sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \ - "${FILESDIR}/${PN}.init-9.3-r1" | newinitd - ${PN}-${SLOT} - - if use systemd; then - sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \ - "${FILESDIR}/${PN}.service-9.6-r1" | \ - systemd_newunit - ${PN}-${SLOT}.service - newbin "${FILESDIR}"/${PN}-check-db-dir ${PN}-${SLOT}-check-db-dir - systemd_newtmpfilesd "${FILESDIR}"/${PN}.tmpfiles ${PN}-${SLOT}.conf - fi - - use pam && pamd_mimic system-auth ${PN}-${SLOT} auth account session - - if use prefix ; then - keepdir /run/postgresql - fperms 1775 /run/postgresql - fi - fi -} - -pkg_postinst() { - use server && use systemd && systemd_tmpfiles_create ${PN}-${SLOT}.conf - postgresql-config update - - elog "If you need a global psqlrc-file, you can place it in:" - elog " ${EROOT}/etc/postgresql-${SLOT}/" - - if use server ; then - elog - elog "Gentoo specific documentation:" - elog "https://wiki.gentoo.org/wiki/PostgreSQL" - elog - elog "Official documentation:" - elog "http://www.postgresql.org/docs/${SLOT}/static/index.html" - elog - elog "The default location of the Unix-domain socket is:" - elog " ${EROOT}/run/postgresql/" - elog - elog "Before initializing the database, you may want to edit PG_INITDB_OPTS" - elog "so that it contains your preferred locale in:" - elog " ${EROOT}/etc/conf.d/postgresql-${SLOT}" - elog - elog "Then, execute the following command to setup the initial database" - elog "environment:" - elog " emerge --config =${CATEGORY}/${PF}" - - if [[ -n ${REPLACING_VERSIONS} ]] ; then - ewarn "If your system is using 'pg_stat_statements' and you are running a" - ewarn "version of PostgreSQL ${SLOT}, we advise that you execute" - ewarn "the following command after upgrading:" - ewarn - ewarn "ALTER EXTENSION pg_stat_statements UPDATE;" - fi - fi -} - -pkg_prerm() { - if use server && [[ -z ${REPLACED_BY_VERSION} ]] ; then - ewarn "Have you dumped and/or migrated the ${SLOT} database cluster?" - ewarn "\thttps://wiki.gentoo.org/wiki/PostgreSQL/QuickStart#Migrating_PostgreSQL" - - ebegin "Resuming removal in 10 seconds (Control-C to cancel)" - sleep 10 - eend 0 - fi -} - -pkg_postrm() { - postgresql-config update -} - -pkg_config() { - use server || die "USE flag 'server' not enabled. Nothing to configure." - - [[ -f "${EROOT}/etc/conf.d/postgresql-${SLOT}" ]] \ - && source "${EROOT}/etc/conf.d/postgresql-${SLOT}" - [[ -z "${PGDATA}" ]] && PGDATA="${EROOT}/etc/postgresql-${SLOT}/" - [[ -z "${DATA_DIR}" ]] \ - && DATA_DIR="${EROOT}/var/lib/postgresql/${SLOT}/data" - - # environment.bz2 may not contain the same locale as the current system - # locale. Unset and source from the current system locale. - if [ -f "${EROOT}/etc/env.d/02locale" ]; then - unset LANG - unset LC_CTYPE - unset LC_NUMERIC - unset LC_TIME - unset LC_COLLATE - unset LC_MONETARY - unset LC_MESSAGES - unset LC_ALL - source "${EROOT}/etc/env.d/02locale" - [ -n "${LANG}" ] && export LANG - [ -n "${LC_CTYPE}" ] && export LC_CTYPE - [ -n "${LC_NUMERIC}" ] && export LC_NUMERIC - [ -n "${LC_TIME}" ] && export LC_TIME - [ -n "${LC_COLLATE}" ] && export LC_COLLATE - [ -n "${LC_MONETARY}" ] && export LC_MONETARY - [ -n "${LC_MESSAGES}" ] && export LC_MESSAGES - [ -n "${LC_ALL}" ] && export LC_ALL - fi - - einfo "You can modify the paths and options passed to initdb by editing:" - einfo " ${EROOT}/etc/conf.d/postgresql-${SLOT}" - einfo - einfo "Information on options that can be passed to initdb are found at:" - einfo " http://www.postgresql.org/docs/${SLOT}/static/creating-cluster.html" - einfo " http://www.postgresql.org/docs/${SLOT}/static/app-initdb.html" - einfo - einfo "PG_INITDB_OPTS is currently set to:" - if [[ -z "${PG_INITDB_OPTS}" ]] ; then - einfo " (none)" - else - einfo " ${PG_INITDB_OPTS}" - fi - einfo - einfo "Configuration files will be installed to:" - einfo " ${PGDATA}" - einfo - einfo "The database cluster will be created in:" - einfo " ${DATA_DIR}" - einfo - - ebegin "Continuing initialization in 5 seconds (Control-C to cancel)" - sleep 5 - eend 0 - - if [ -n "$(ls -A ${DATA_DIR} 2> /dev/null)" ] ; then - eerror "The given directory, '${DATA_DIR}', is not empty." - eerror "Modify DATA_DIR to point to an empty directory." - die "${DATA_DIR} is not empty." - fi - - einfo "Creating the data directory ..." - if [[ ${EUID} == 0 ]] ; then - mkdir -p "$(dirname ${DATA_DIR%/})" || die "Couldn't parent dirs" - mkdir -m 0700 "${DATA_DIR%/}" || die "Couldn't make DATA_DIR" - chown -h postgres:postgres "${DATA_DIR%/}" || die "Couldn't chown" - fi - - einfo "Initializing the database ..." - - if [[ ${EUID} == 0 ]] ; then - su postgres -c "${EROOT}/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -D \"${DATA_DIR}\" ${PG_INITDB_OPTS}" - else - "${EROOT}"/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -U postgres -D "${DATA_DIR}" ${PG_INITDB_OPTS} - fi - - if [[ "${DATA_DIR%/}" != "${PGDATA%/}" ]] ; then - mv "${DATA_DIR%/}"/{pg_{hba,ident},postgresql}.conf "${PGDATA}" - ln -s "${PGDATA%/}"/{pg_{hba,ident},postgresql}.conf "${DATA_DIR%/}" - fi - - # unix_socket_directory has no effect in postgresql.conf as it's - # overridden in the initscript - sed '/^#unix_socket_directories/,+1d' -i "${PGDATA%/}"/postgresql.conf - - cat <<- EOF >> "${PGDATA%/}"/postgresql.conf - # This is here because of https://bugs.gentoo.org/show_bug.cgi?id=518522 - # On the off-chance that you might need to work with UTF-8 encoded - # characters in PL/Perl - plperl.on_init = 'use utf8; use re; package utf8; require "utf8_heavy.pl";' - EOF - - einfo "The autovacuum function, which was in contrib, has been moved to the main" - einfo "PostgreSQL functions starting with 8.1, and starting with 8.4 is now enabled" - einfo "by default. You can disable it in the cluster's:" - einfo " ${PGDATA%/}/postgresql.conf" - einfo - if ! use systemd; then - einfo "The PostgreSQL server, by default, will log events to:" - einfo " ${DATA_DIR%/}/postmaster.log" - einfo - fi - if use prefix ; then - einfo "The location of the configuration files have moved to:" - einfo " ${PGDATA}" - einfo "To start the server:" - einfo " pg_ctl start -D ${DATA_DIR} -o '-D ${PGDATA} --data-directory=${DATA_DIR}'" - einfo "To stop:" - einfo " pg_ctl stop -D ${DATA_DIR}" - einfo - einfo "Or move the configuration files back:" - einfo "mv ${PGDATA}*.conf ${DATA_DIR}" - elif use systemd; then - einfo "You should use the 'postgresql-${SLOT}.service' unit to run PostgreSQL" - einfo "instead of 'pg_ctl'." - else - einfo "You should use the '${EROOT}/etc/init.d/postgresql-${SLOT}' script to run PostgreSQL" - einfo "instead of 'pg_ctl'." - fi -} - -src_test() { - if use server && [[ ${UID} -ne 0 ]] ; then - emake check - - einfo "If you think other tests besides the regression tests are necessary, please" - einfo "submit a bug including a patch for this ebuild to enable them." - else - use server || \ - ewarn 'Tests cannot be run without the "server" use flag enabled.' - [[ ${UID} -eq 0 ]] || \ - ewarn 'Tests cannot be run as root. Enable "userpriv" in FEATURES.' - - ewarn 'Skipping.' - fi -} diff --git a/dev-db/postgresql/postgresql-12.1.ebuild b/dev-db/postgresql/postgresql-12.1.ebuild deleted file mode 100644 index 57f10573d891..000000000000 --- a/dev-db/postgresql/postgresql-12.1.ebuild +++ /dev/null @@ -1,467 +0,0 @@ -# Copyright 1999-2020 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -PYTHON_COMPAT=( python3_{6,7} ) - -PLOCALES="af cs de en es fa fr hr hu it ko nb pl pt_BR ro ru sk sl sv tr zh_CN - zh_TW" - -inherit flag-o-matic l10n linux-info multilib pam prefix python-single-r1 \ - systemd user - -KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~mips ppc ppc64 ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" - -SLOT=$(ver_cut 1) - -MY_PV=${PV/_/} -S="${WORKDIR}/${PN}-${MY_PV}" - -SRC_URI="https://ftp.postgresql.org/pub/source/v${MY_PV}/postgresql-${MY_PV}.tar.bz2" - -LICENSE="POSTGRESQL GPL-2" -DESCRIPTION="PostgreSQL RDBMS" -HOMEPAGE="http://www.postgresql.org/" - -IUSE="debug doc icu kerberos kernel_linux ldap libressl llvm nls pam - perl python +readline selinux +server systemd ssl static-libs tcl - threads uuid xml zlib" - -REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" - -CDEPEND=" ->=app-eselect/eselect-postgresql-2.0 -sys-apps/less -virtual/libintl -icu? ( dev-libs/icu:= ) -kerberos? ( virtual/krb5 ) -ldap? ( net-nds/openldap ) -llvm? ( - sys-devel/llvm:= - sys-devel/clang:= -) -pam? ( sys-libs/pam ) -perl? ( >=dev-lang/perl-5.8:= ) -python? ( ${PYTHON_DEPS} ) -readline? ( sys-libs/readline:0= ) -server? ( systemd? ( sys-apps/systemd ) ) -ssl? ( - !libressl? ( >=dev-libs/openssl-0.9.6-r1:0= ) - libressl? ( dev-libs/libressl:= ) -) -tcl? ( >=dev-lang/tcl-8:0= ) -xml? ( dev-libs/libxml2 dev-libs/libxslt ) -zlib? ( sys-libs/zlib ) -" - -# uuid flags -- depend on sys-apps/util-linux for Linux libcs, or if no -# supported libc in use depend on dev-libs/ossp-uuid. For BSD systems, -# the libc includes UUID functions. -UTIL_LINUX_LIBC=( elibc_{glibc,uclibc,musl} ) -BSD_LIBC=( elibc_{Free,Net,Open}BSD ) - -nest_usedep() { - local front back - while [[ ${#} -gt 1 ]]; do - front+="${1}? ( " - back+=" )" - shift - done - echo "${front}${1}${back}" -} - -IUSE+=" ${UTIL_LINUX_LIBC[@]} ${BSD_LIBC[@]}" -CDEPEND+=" -uuid? ( - ${UTIL_LINUX_LIBC[@]/%/? ( sys-apps/util-linux )} - $(nest_usedep ${UTIL_LINUX_LIBC[@]/#/!} ${BSD_LIBC[@]/#/!} dev-libs/ossp-uuid) -)" - -DEPEND="${CDEPEND} -!!<sys-apps/sandbox-2.0 -sys-devel/bison -sys-devel/flex -nls? ( sys-devel/gettext ) -xml? ( virtual/pkgconfig ) -" - -RDEPEND="${CDEPEND} -!dev-db/postgresql-docs:${SLOT} -!dev-db/postgresql-base:${SLOT} -!dev-db/postgresql-server:${SLOT} -selinux? ( sec-policy/selinux-postgresql ) -" - -pkg_setup() { - use server && CONFIG_CHECK="~SYSVIPC" linux-info_pkg_setup - - enewgroup postgres 70 - enewuser postgres 70 /bin/sh /var/lib/postgresql postgres - - use python && python-single-r1_pkg_setup -} - -src_prepare() { - # Set proper run directory - sed "s|\(PGSOCKET_DIR\s\+\)\"/tmp\"|\1\"${EPREFIX}/run/postgresql\"|" \ - -i src/include/pg_config_manual.h || die - - # Rely on $PATH being in the proper order so that the correct - # install program is used for modules utilizing PGXS in both - # hardened and non-hardened environments. (Bug #528786) - sed 's/@install_bin@/install -c/' -i src/Makefile.global.in || die - - use server || eapply "${FILESDIR}/${PN}-12.1-no-server.patch" - - if use pam ; then - sed "s/\(#define PGSQL_PAM_SERVICE \"postgresql\)/\1-${SLOT}/" \ - -i src/backend/libpq/auth.c || \ - die 'PGSQL_PAM_SERVICE rename failed.' - fi - - eapply_user -} - -src_configure() { - case ${CHOST} in - *-darwin*|*-solaris*) - use nls && append-libs intl - ;; - esac - - export LDFLAGS_SL="${LDFLAGS}" - export LDFLAGS_EX="${LDFLAGS}" - - local PO="${EPREFIX}" - - local i uuid_config="" - if use uuid; then - for i in ${UTIL_LINUX_LIBC[@]}; do - use ${i} && uuid_config="--with-uuid=e2fs" - done - for i in ${BSD_LIBC[@]}; do - use ${i} && uuid_config="--with-uuid=bsd" - done - [[ -z $uuid_config ]] && uuid_config="--with-uuid=ossp" - fi - - econf \ - --prefix="${PO}/usr/$(get_libdir)/postgresql-${SLOT}" \ - --datadir="${PO}/usr/share/postgresql-${SLOT}" \ - --includedir="${PO}/usr/include/postgresql-${SLOT}" \ - --mandir="${PO}/usr/share/postgresql-${SLOT}/man" \ - --sysconfdir="${PO}/etc/postgresql-${SLOT}" \ - --with-system-tzdata="${PO}/usr/share/zoneinfo" \ - $(use_enable !alpha spinlocks) \ - $(use_enable debug) \ - $(use_enable threads thread-safety) \ - $(use_with icu) \ - $(use_with kerberos gssapi) \ - $(use_with ldap) \ - $(use_with llvm) \ - $(use_with pam) \ - $(use_with perl) \ - $(use_with python) \ - $(use_with readline) \ - $(use_with ssl openssl) \ - $(usex server "$(use_with systemd)" '--without-systemd') \ - $(use_with tcl) \ - ${uuid_config} \ - $(use_with xml libxml) \ - $(use_with xml libxslt) \ - $(use_with zlib) \ - $(use_enable nls nls "'$(l10n_get_locales)'") -} - -src_compile() { - emake - emake -C contrib -} - -src_install() { - emake DESTDIR="${D}" install - emake DESTDIR="${D}" install -C contrib - - dodoc README HISTORY - - # man pages are already built, but if we have the target make them, - # they'll be generated from source before being installed so we - # manually install man pages. - # We use ${SLOT} instead of doman for postgresql.eselect - insinto /usr/share/postgresql-${SLOT}/man/ - doins -r doc/src/sgml/man{1,3,7} - if ! use server; then - # Remove man pages for non-existent binaries - serverman=( - initdb - pg_{archivecleanup,controldata,ctl,resetwal,rewind,standby} - pg_{test_{fsync,timing},upgrade,waldump} - post{gres,master} - ) - for m in ${serverman[@]} ; do - rm "${ED}/usr/share/postgresql-${SLOT}/man/man1/${m}.1" - done - fi - docompress /usr/share/postgresql-${SLOT}/man/man{1,3,7} - - # Create slot specific man pages - local bn f mansec slotted_name - for mansec in 1 3 7 ; do - local rel_manpath="../../postgresql-${SLOT}/man/man${mansec}" - - mkdir -p "${ED}"/usr/share/man/man${mansec} || die "making man dir" - pushd "${ED}"/usr/share/man/man${mansec} > /dev/null || die "pushd failed" - - for f in "${ED}/usr/share/postgresql-${SLOT}/man/man${mansec}"/* ; do - bn=$(basename "${f}") - slotted_name=${bn%.${mansec}}${SLOT}.${mansec} - case ${bn} in - TABLE.7|WITH.7) - echo ".so ${rel_manpath}/SELECT.7" > ${slotted_name} - ;; - *) - echo ".so ${rel_manpath}/${bn}" > ${slotted_name} - ;; - esac - done - - popd > /dev/null - done - - insinto /etc/postgresql-${SLOT} - newins src/bin/psql/psqlrc.sample psqlrc - - # Don't delete libpg{port,common}.a (Bug #571046). They're always - # needed by extensions utilizing PGXS. - use static-libs || \ - find "${ED}" -name '*.a' ! -name libpgport.a ! -name libpgcommon.a \ - -delete - - # Make slot specific links to programs - local f bn - for f in $(find "${ED}/usr/$(get_libdir)/postgresql-${SLOT}/bin" \ - -mindepth 1 -maxdepth 1) - do - bn=$(basename "${f}") - dosym "../$(get_libdir)/postgresql-${SLOT}/bin/${bn}" \ - "/usr/bin/${bn}${SLOT/.}" - done - - if use doc ; then - docinto html - dodoc doc/src/sgml/html/* - fi - - if use server; then - sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \ - "${FILESDIR}/${PN}.confd-9.3" | newconfd - ${PN}-${SLOT} - - sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \ - "${FILESDIR}/${PN}.init-9.3-r1" | newinitd - ${PN}-${SLOT} - - if use systemd; then - sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \ - "${FILESDIR}/${PN}.service-9.6-r1" | \ - systemd_newunit - ${PN}-${SLOT}.service - newbin "${FILESDIR}"/${PN}-check-db-dir ${PN}-${SLOT}-check-db-dir - systemd_newtmpfilesd "${FILESDIR}"/${PN}.tmpfiles ${PN}-${SLOT}.conf - fi - - use pam && pamd_mimic system-auth ${PN}-${SLOT} auth account session - - if use prefix ; then - keepdir /run/postgresql - fperms 1775 /run/postgresql - fi - fi -} - -pkg_postinst() { - use server && use systemd && systemd_tmpfiles_create ${PN}-${SLOT}.conf - postgresql-config update - - elog "If you need a global psqlrc-file, you can place it in:" - elog " ${EROOT}/etc/postgresql-${SLOT}/" - - if use server ; then - elog - elog "Gentoo specific documentation:" - elog "https://wiki.gentoo.org/wiki/PostgreSQL" - elog - elog "Official documentation:" - elog "http://www.postgresql.org/docs/${SLOT}/static/index.html" - elog - elog "The default location of the Unix-domain socket is:" - elog " ${EROOT}/run/postgresql/" - elog - elog "Before initializing the database, you may want to edit PG_INITDB_OPTS" - elog "so that it contains your preferred locale in:" - elog " ${EROOT}/etc/conf.d/postgresql-${SLOT}" - elog - elog "Then, execute the following command to setup the initial database" - elog "environment:" - elog " emerge --config =${CATEGORY}/${PF}" - - if [[ -n ${REPLACING_VERSIONS} ]] ; then - ewarn "If your system is using 'pg_stat_statements' and you are running a" - ewarn "version of PostgreSQL ${SLOT}, we advise that you execute" - ewarn "the following command after upgrading:" - ewarn - ewarn "ALTER EXTENSION pg_stat_statements UPDATE;" - fi - fi -} - -pkg_prerm() { - if use server && [[ -z ${REPLACED_BY_VERSION} ]] ; then - ewarn "Have you dumped and/or migrated the ${SLOT} database cluster?" - ewarn "\thttps://wiki.gentoo.org/wiki/PostgreSQL/QuickStart#Migrating_PostgreSQL" - - ebegin "Resuming removal in 10 seconds (Control-C to cancel)" - sleep 10 - eend 0 - fi -} - -pkg_postrm() { - postgresql-config update -} - -pkg_config() { - use server || die "USE flag 'server' not enabled. Nothing to configure." - - [[ -f "${EROOT}/etc/conf.d/postgresql-${SLOT}" ]] \ - && source "${EROOT}/etc/conf.d/postgresql-${SLOT}" - [[ -z "${PGDATA}" ]] && PGDATA="${EROOT}/etc/postgresql-${SLOT}/" - [[ -z "${DATA_DIR}" ]] \ - && DATA_DIR="${EROOT}/var/lib/postgresql/${SLOT}/data" - - # environment.bz2 may not contain the same locale as the current system - # locale. Unset and source from the current system locale. - if [ -f "${EROOT}/etc/env.d/02locale" ]; then - unset LANG - unset LC_CTYPE - unset LC_NUMERIC - unset LC_TIME - unset LC_COLLATE - unset LC_MONETARY - unset LC_MESSAGES - unset LC_ALL - source "${EROOT}/etc/env.d/02locale" - [ -n "${LANG}" ] && export LANG - [ -n "${LC_CTYPE}" ] && export LC_CTYPE - [ -n "${LC_NUMERIC}" ] && export LC_NUMERIC - [ -n "${LC_TIME}" ] && export LC_TIME - [ -n "${LC_COLLATE}" ] && export LC_COLLATE - [ -n "${LC_MONETARY}" ] && export LC_MONETARY - [ -n "${LC_MESSAGES}" ] && export LC_MESSAGES - [ -n "${LC_ALL}" ] && export LC_ALL - fi - - einfo "You can modify the paths and options passed to initdb by editing:" - einfo " ${EROOT}/etc/conf.d/postgresql-${SLOT}" - einfo - einfo "Information on options that can be passed to initdb are found at:" - einfo " http://www.postgresql.org/docs/${SLOT}/static/creating-cluster.html" - einfo " http://www.postgresql.org/docs/${SLOT}/static/app-initdb.html" - einfo - einfo "PG_INITDB_OPTS is currently set to:" - if [[ -z "${PG_INITDB_OPTS}" ]] ; then - einfo " (none)" - else - einfo " ${PG_INITDB_OPTS}" - fi - einfo - einfo "Configuration files will be installed to:" - einfo " ${PGDATA}" - einfo - einfo "The database cluster will be created in:" - einfo " ${DATA_DIR}" - einfo - - ebegin "Continuing initialization in 5 seconds (Control-C to cancel)" - sleep 5 - eend 0 - - if [ -n "$(ls -A ${DATA_DIR} 2> /dev/null)" ] ; then - eerror "The given directory, '${DATA_DIR}', is not empty." - eerror "Modify DATA_DIR to point to an empty directory." - die "${DATA_DIR} is not empty." - fi - - einfo "Creating the data directory ..." - if [[ ${EUID} == 0 ]] ; then - mkdir -p "$(dirname ${DATA_DIR%/})" || die "Couldn't parent dirs" - mkdir -m 0700 "${DATA_DIR%/}" || die "Couldn't make DATA_DIR" - chown -h postgres:postgres "${DATA_DIR%/}" || die "Couldn't chown" - fi - - einfo "Initializing the database ..." - - if [[ ${EUID} == 0 ]] ; then - su postgres -c "${EROOT}/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -D \"${DATA_DIR}\" ${PG_INITDB_OPTS}" - else - "${EROOT}"/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -U postgres -D "${DATA_DIR}" ${PG_INITDB_OPTS} - fi - - if [[ "${DATA_DIR%/}" != "${PGDATA%/}" ]] ; then - mv "${DATA_DIR%/}"/{pg_{hba,ident},postgresql}.conf "${PGDATA}" - ln -s "${PGDATA%/}"/{pg_{hba,ident},postgresql}.conf "${DATA_DIR%/}" - fi - - # unix_socket_directory has no effect in postgresql.conf as it's - # overridden in the initscript - sed '/^#unix_socket_directories/,+1d' -i "${PGDATA%/}"/postgresql.conf - - cat <<- EOF >> "${PGDATA%/}"/postgresql.conf - # This is here because of https://bugs.gentoo.org/show_bug.cgi?id=518522 - # On the off-chance that you might need to work with UTF-8 encoded - # characters in PL/Perl - plperl.on_init = 'use utf8; use re; package utf8; require "utf8_heavy.pl";' - EOF - - einfo "The autovacuum function, which was in contrib, has been moved to the main" - einfo "PostgreSQL functions starting with 8.1, and starting with 8.4 is now enabled" - einfo "by default. You can disable it in the cluster's:" - einfo " ${PGDATA%/}/postgresql.conf" - einfo - if ! use systemd; then - einfo "The PostgreSQL server, by default, will log events to:" - einfo " ${DATA_DIR%/}/postmaster.log" - einfo - fi - if use prefix ; then - einfo "The location of the configuration files have moved to:" - einfo " ${PGDATA}" - einfo "To start the server:" - einfo " pg_ctl start -D ${DATA_DIR} -o '-D ${PGDATA} --data-directory=${DATA_DIR}'" - einfo "To stop:" - einfo " pg_ctl stop -D ${DATA_DIR}" - einfo - einfo "Or move the configuration files back:" - einfo "mv ${PGDATA}*.conf ${DATA_DIR}" - elif use systemd; then - einfo "You should use the 'postgresql-${SLOT}.service' unit to run PostgreSQL" - einfo "instead of 'pg_ctl'." - else - einfo "You should use the '${EROOT}/etc/init.d/postgresql-${SLOT}' script to run PostgreSQL" - einfo "instead of 'pg_ctl'." - fi -} - -src_test() { - if use server && [[ ${UID} -ne 0 ]] ; then - emake check - - einfo "If you think other tests besides the regression tests are necessary, please" - einfo "submit a bug including a patch for this ebuild to enable them." - else - use server || \ - ewarn 'Tests cannot be run without the "server" use flag enabled.' - [[ ${UID} -eq 0 ]] || \ - ewarn 'Tests cannot be run as root. Enable "userpriv" in FEATURES.' - - ewarn 'Skipping.' - fi -} diff --git a/dev-db/postgresql/postgresql-9.4.22-r1.ebuild b/dev-db/postgresql/postgresql-9.4.22-r1.ebuild deleted file mode 100644 index 2f5d0dd70e4f..000000000000 --- a/dev-db/postgresql/postgresql-9.4.22-r1.ebuild +++ /dev/null @@ -1,479 +0,0 @@ -# Copyright 1999-2020 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -PYTHON_COMPAT=( python3_{6,7} ) - -PLOCALES="af cs de en es fa fr hr hu it ko nb pl pt_BR ro ru sk sl sv tr zh_CN - zh_TW" - -inherit flag-o-matic l10n linux-info multilib pam prefix python-single-r1 \ - systemd user - -KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~ppc-macos ~x86-solaris" - -SLOT=$(ver_cut 1-2) - -SRC_URI="https://ftp.postgresql.org/pub/source/v${PV}/postgresql-${PV}.tar.bz2" - -LICENSE="POSTGRESQL GPL-2" -DESCRIPTION="PostgreSQL RDBMS" -HOMEPAGE="https://www.postgresql.org/" - -IUSE="debug doc kerberos kernel_linux ldap libressl nls pam perl - -pg_legacytimestamp python +readline selinux +server systemd ssl - static-libs tcl threads uuid xml zlib" - -REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" - -CDEPEND=" ->=app-eselect/eselect-postgresql-2.0 -sys-apps/less -virtual/libintl -kerberos? ( virtual/krb5 ) -ldap? ( net-nds/openldap ) -pam? ( sys-libs/pam ) -perl? ( >=dev-lang/perl-5.8:= ) -python? ( ${PYTHON_DEPS} ) -readline? ( sys-libs/readline:0= ) -ssl? ( - !libressl? ( >=dev-libs/openssl-0.9.6-r1:0= ) - libressl? ( dev-libs/libressl:= ) -) -tcl? ( >=dev-lang/tcl-8:0= ) -xml? ( dev-libs/libxml2 dev-libs/libxslt ) -zlib? ( sys-libs/zlib ) -" - -# uuid flags -- depend on sys-apps/util-linux for Linux libcs, or if no -# supported libc in use depend on dev-libs/ossp-uuid. For BSD systems, -# the libc includes UUID functions. -UTIL_LINUX_LIBC=( elibc_{glibc,uclibc,musl} ) -BSD_LIBC=( elibc_{Free,Net,Open}BSD ) - -nest_usedep() { - local front back - while [[ ${#} -gt 1 ]]; do - front+="${1}? ( " - back+=" )" - shift - done - echo "${front}${1}${back}" -} - -IUSE+=" ${UTIL_LINUX_LIBC[@]} ${BSD_LIBC[@]}" -CDEPEND+=" -uuid? ( - ${UTIL_LINUX_LIBC[@]/%/? ( sys-apps/util-linux )} - $(nest_usedep ${UTIL_LINUX_LIBC[@]/#/!} ${BSD_LIBC[@]/#/!} dev-libs/ossp-uuid) -)" - -DEPEND="${CDEPEND} -!!<sys-apps/sandbox-2.0 -sys-devel/bison -sys-devel/flex -nls? ( sys-devel/gettext ) -xml? ( virtual/pkgconfig ) -" - -RDEPEND="${CDEPEND} -!dev-db/postgresql-docs:${SLOT} -!dev-db/postgresql-base:${SLOT} -!dev-db/postgresql-server:${SLOT} -selinux? ( sec-policy/selinux-postgresql ) -" - -pkg_setup() { - use server && CONFIG_CHECK="~SYSVIPC" linux-info_pkg_setup - - enewgroup postgres 70 - enewuser postgres 70 /bin/sh /var/lib/postgresql postgres - - use python && python-single-r1_pkg_setup -} - -src_prepare() { - # Work around PPC{,64} compilation bug where bool is already defined - sed '/#ifndef __cplusplus/a #undef bool' -i src/include/c.h || die - - # Set proper run directory - sed "s|\(PGSOCKET_DIR\s\+\)\"/tmp\"|\1\"${EPREFIX}/run/postgresql\"|" \ - -i src/include/pg_config_manual.h || die - - # Rely on $PATH being in the proper order so that the correct - # install program is used for modules utilizing PGXS in both - # hardened and non-hardened environments. (Bug #528786) - sed 's/@install_bin@/install -c/' -i src/Makefile.global.in || die - - use server || eapply "${FILESDIR}/${PN}-9.4.10-no-server.patch" - - if use pam ; then - sed -e "s/\(#define PGSQL_PAM_SERVICE \"postgresql\)/\1-${SLOT}/" \ - -i src/backend/libpq/auth.c || \ - die 'PGSQL_PAM_SERVICE rename failed.' - fi - - eapply_user -} - -src_configure() { - case ${CHOST} in - *-darwin*|*-solaris*) - use nls && append-libs intl - ;; - esac - - export LDFLAGS_SL="${LDFLAGS}" - export LDFLAGS_EX="${LDFLAGS}" - - local PO="${EPREFIX}" - - local i uuid_config="" - if use uuid; then - for i in ${UTIL_LINUX_LIBC[@]}; do - use ${i} && uuid_config="--with-uuid=e2fs" - done - for i in ${BSD_LIBC[@]}; do - use ${i} && uuid_config="--with-uuid=bsd" - done - [[ -z $uuid_config ]] && uuid_config="--with-uuid=ossp" - fi - - econf \ - --prefix="${PO}/usr/$(get_libdir)/postgresql-${SLOT}" \ - --datadir="${PO}/usr/share/postgresql-${SLOT}" \ - --includedir="${PO}/usr/include/postgresql-${SLOT}" \ - --mandir="${PO}/usr/share/postgresql-${SLOT}/man" \ - --sysconfdir="${PO}/etc/postgresql-${SLOT}" \ - --with-system-tzdata="${PO}/usr/share/zoneinfo" \ - $(use_enable !pg_legacytimestamp integer-datetimes) \ - $(use_enable debug) \ - $(use_enable threads thread-safety) \ - $(use_with kerberos gssapi) \ - $(use_with ldap) \ - $(use_with pam) \ - $(use_with perl) \ - $(use_with python) \ - $(use_with readline) \ - $(use_with ssl openssl) \ - $(use_with tcl) \ - ${uuid_config} \ - $(use_with xml libxml) \ - $(use_with xml libxslt) \ - $(use_with zlib) \ - $(use_enable nls nls "'$(l10n_get_locales)'") -} - -src_compile() { - emake - emake -C contrib -} - -src_install() { - emake DESTDIR="${D}" install - emake DESTDIR="${D}" install -C contrib - - dodoc README HISTORY doc/{TODO,bug.template} - - # man pages are already built, but if we have the target make them, - # they'll be generated from source before being installed so we - # manually install man pages. - # We use ${SLOT} instead of doman for postgresql.eselect - insinto /usr/share/postgresql-${SLOT}/man/ - doins -r doc/src/sgml/man{1,3,7} - if ! use server; then - # Remove man pages for non-existent binaries - for m in {initdb,pg_{controldata,ctl,resetxlog},post{gres,master}}; do - rm "${ED}/usr/share/postgresql-${SLOT}/man/man1/${m}.1" - done - fi - docompress /usr/share/postgresql-${SLOT}/man/man{1,3,7} - - # Create slot specific man pages - local bn f mansec slotted_name - for mansec in 1 3 7 ; do - local rel_manpath="../../postgresql-${SLOT}/man/man${mansec}" - - mkdir -p "${ED}"/usr/share/man/man${mansec} || die "making man dir" - pushd "${ED}"/usr/share/man/man${mansec} > /dev/null || die "pushd failed" - - for f in "${ED}/usr/share/postgresql-${SLOT}/man/man${mansec}"/* ; do - bn=$(basename "${f}") - slotted_name=${bn%.${mansec}}${SLOT/.}.${mansec} - case ${bn} in - TABLE.7|WITH.7) - echo ".so ${rel_manpath}/SELECT.7" > ${slotted_name} - ;; - *) - echo ".so ${rel_manpath}/${bn}" > ${slotted_name} - ;; - esac - done - - popd > /dev/null - done - - insinto /etc/postgresql-${SLOT} - newins src/bin/psql/psqlrc.sample psqlrc - - # Don't delete libpg{port,common}.a (Bug #571046). They're always - # needed by extensions utilizing PGXS. - use static-libs || \ - find "${ED}" -name '*.a' ! -name libpgport.a ! -name libpgcommon.a \ - -delete - - local f bn - for f in $(find "${ED}/usr/$(get_libdir)/postgresql-${SLOT}/bin" \ - -mindepth 1 -maxdepth 1) - do - bn=$(basename "${f}") - # Temporarily tack on tmp to workaround a file collision - # issue. This is only necessary for 9.7 and earlier. 10 never - # had this issue. - dosym "../$(get_libdir)/postgresql-${SLOT}/bin/${bn}" \ - "/usr/bin/${bn}${SLOT/.}tmp" - done - - if use doc ; then - docinto html - dodoc doc/src/sgml/html/* - - docinto sgml - dodoc doc/src/sgml/*.{sgml,dsl} - fi - - if use server; then - sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \ - "${FILESDIR}/${PN}.confd-9.3" | newconfd - ${PN}-${SLOT} - - sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \ - "${FILESDIR}/${PN}.init-9.3-r1" | newinitd - ${PN}-${SLOT} - - if use systemd; then - sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \ - "${FILESDIR}/${PN}.service-9.2" | \ - systemd_newunit - ${PN}-${SLOT}.service - systemd_newtmpfilesd "${FILESDIR}"/${PN}.tmpfiles ${PN}-${SLOT}.conf - fi - - newbin "${FILESDIR}"/${PN}-check-db-dir ${PN}-${SLOT}-check-db-dir - - use pam && pamd_mimic system-auth ${PN}-${SLOT} auth account session - - if use prefix ; then - keepdir /run/postgresql - fperms 1775 /run/postgresql - fi - fi -} - -pkg_preinst() { - # Find all of the slot-specific symlinks, if any, in /usr/bin (e.g., - # /usr/bin/psql96). They may have been created by the - # postgresql.eselect module, but they're handled within this ebuild - # now. It's alright if we momentarily delete /usr/bin/psql as it - # will be recreated by the eselect module in pkg_ppostinst(). This - # is only necessary for 9.7 and earlier. 10 and later were never - # handled in this manner. - local canonicalise - if type -p realpath > /dev/null; then - canonicalise=realpath - elif type -p readlink > /dev/null; then - canonicalise='readlink -f' - else - # can't die, subshell - die "No readlink nor realpath found, cannot canonicalise" - fi - - local l - # First remove any symlinks in /usr/bin that may have been created - # by the old eselect - for l in $(find "${ROOT}/usr/bin" -mindepth 1 -maxdepth 1 -type l) ; do - if [[ $(${canonicalise} "${l}") == *postgresql-${SLOT}* ]] ; then - rm "${l}" || ewarn "Couldn't remove ${l}" - fi - done - - # Then move the symlinks created by the ebuild to their proper place. - for l in "${ED}"/usr/bin/*tmp ; do - mv "${l}" "${l%tmp}" \ - || ewarn "Couldn't rename $(basename ${l}) to $(basename ${l%tmp})" - done -} - -pkg_postinst() { - use server && use systemd && systemd_tmpfiles_create ${PN}-${SLOT}.conf - postgresql-config update - - elog "If you need a global psqlrc-file, you can place it in:" - elog " ${EROOT}/etc/postgresql-${SLOT}/" - - if use server ; then - elog - elog "Gentoo specific documentation:" - elog "https://wiki.gentoo.org/wiki/PostgreSQL" - elog - elog "Official documentation:" - elog "https://www.postgresql.org/docs/${SLOT}/static/index.html" - elog - elog "The default location of the Unix-domain socket is:" - elog " ${EROOT}/run/postgresql/" - elog - elog "Before initializing the database, you may want to edit PG_INITDB_OPTS" - elog "so that it contains your preferred locale in:" - elog " ${EROOT}/etc/conf.d/postgresql-${SLOT}" - elog - elog "Then, execute the following command to setup the initial database" - elog "environment:" - elog " emerge --config =${CATEGORY}/${PF}" - fi -} - -pkg_prerm() { - if use server && [[ -z ${REPLACED_BY_VERSION} ]] ; then - ewarn "Have you dumped and/or migrated the ${SLOT} database cluster?" - ewarn "\thttps://wiki.gentoo.org/wiki/PostgreSQL/QuickStart#Migrating_PostgreSQL" - - ebegin "Resuming removal in 10 seconds (Control-C to cancel)" - sleep 10 - eend 0 - fi -} - -pkg_postrm() { - postgresql-config update -} - -pkg_config() { - use server || die "USE flag 'server' not enabled. Nothing to configure." - - [[ -f "${EROOT}/etc/conf.d/postgresql-${SLOT}" ]] \ - && source "${EROOT}/etc/conf.d/postgresql-${SLOT}" - [[ -z "${PGDATA}" ]] && PGDATA="${EROOT}/etc/postgresql-${SLOT}/" - [[ -z "${DATA_DIR}" ]] \ - && DATA_DIR="${EROOT}/var/lib/postgresql/${SLOT}/data" - - # environment.bz2 may not contain the same locale as the current system - # locale. Unset and source from the current system locale. - if [ -f "${EROOT}/etc/env.d/02locale" ]; then - unset LANG - unset LC_CTYPE - unset LC_NUMERIC - unset LC_TIME - unset LC_COLLATE - unset LC_MONETARY - unset LC_MESSAGES - unset LC_ALL - source "${EROOT}/etc/env.d/02locale" - [ -n "${LANG}" ] && export LANG - [ -n "${LC_CTYPE}" ] && export LC_CTYPE - [ -n "${LC_NUMERIC}" ] && export LC_NUMERIC - [ -n "${LC_TIME}" ] && export LC_TIME - [ -n "${LC_COLLATE}" ] && export LC_COLLATE - [ -n "${LC_MONETARY}" ] && export LC_MONETARY - [ -n "${LC_MESSAGES}" ] && export LC_MESSAGES - [ -n "${LC_ALL}" ] && export LC_ALL - fi - - einfo "You can modify the paths and options passed to initdb by editing:" - einfo " ${EROOT}/etc/conf.d/postgresql-${SLOT}" - einfo - einfo "Information on options that can be passed to initdb are found at:" - einfo " https://www.postgresql.org/docs/${SLOT}/static/creating-cluster.html" - einfo " https://www.postgresql.org/docs/${SLOT}/static/app-initdb.html" - einfo - einfo "PG_INITDB_OPTS is currently set to:" - if [[ -z "${PG_INITDB_OPTS}" ]] ; then - einfo " (none)" - else - einfo " ${PG_INITDB_OPTS}" - fi - einfo - einfo "Configuration files will be installed to:" - einfo " ${PGDATA}" - einfo - einfo "The database cluster will be created in:" - einfo " ${DATA_DIR}" - einfo - - ebegin "Continuing initialization in 5 seconds (Control-C to cancel)" - sleep 5 - eend 0 - - if [ -n "$(ls -A ${DATA_DIR} 2> /dev/null)" ] ; then - eerror "The given directory, '${DATA_DIR}', is not empty." - eerror "Modify DATA_DIR to point to an empty directory." - die "${DATA_DIR} is not empty." - fi - - einfo "Creating the data directory ..." - if [[ ${EUID} == 0 ]] ; then - mkdir -p "${DATA_DIR}" - chown -Rf postgres:postgres "${DATA_DIR}" - chmod 0700 "${DATA_DIR}" - fi - - einfo "Initializing the database ..." - - if [[ ${EUID} == 0 ]] ; then - su postgres -c "${EROOT}/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -D \"${DATA_DIR}\" ${PG_INITDB_OPTS}" - else - "${EROOT}"/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -U postgres -D "${DATA_DIR}" ${PG_INITDB_OPTS} - fi - - if [[ "${DATA_DIR%/}" != "${PGDATA%/}" ]] ; then - mv "${DATA_DIR%/}"/{pg_{hba,ident},postgresql}.conf "${PGDATA}" - ln -s "${PGDATA%/}"/{pg_{hba,ident},postgresql}.conf "${DATA_DIR%/}" - fi - - # unix_socket_directory has no effect in postgresql.conf as it's - # overridden in the initscript - sed '/^#unix_socket_directories/,+1d' -i "${PGDATA%/}"/postgresql.conf - - cat <<- EOF >> "${PGDATA%/}"/postgresql.conf - # This is here because of https://bugs.gentoo.org/show_bug.cgi?id=518522 - # On the off-chance that you might need to work with UTF-8 encoded - # characters in PL/Perl - plperl.on_init = 'use utf8; use re; package utf8; require "utf8_heavy.pl";' - EOF - - einfo "The autovacuum function, which was in contrib, has been moved to the main" - einfo "PostgreSQL functions starting with 8.1, and starting with 8.4 is now enabled" - einfo "by default. You can disable it in the cluster's:" - einfo " ${PGDATA%/}/postgresql.conf" - einfo - einfo "The PostgreSQL server, by default, will log events to:" - einfo " ${DATA_DIR%/}/postmaster.log" - einfo - if use prefix ; then - einfo "The location of the configuration files have moved to:" - einfo " ${PGDATA}" - einfo "To start the server:" - einfo " pg_ctl start -D ${DATA_DIR} -o '-D ${PGDATA} --data-directory=${DATA_DIR}'" - einfo "To stop:" - einfo " pg_ctl stop -D ${DATA_DIR}" - einfo - einfo "Or move the configuration files back:" - einfo "mv ${PGDATA}*.conf ${DATA_DIR}" - else - einfo "You should use the '${EROOT}/etc/init.d/postgresql-${SLOT}' script to run PostgreSQL" - einfo "instead of 'pg_ctl'." - fi -} - -src_test() { - if use server && [[ ${UID} -ne 0 ]] ; then - emake check - - einfo "If you think other tests besides the regression tests are necessary, please" - einfo "submit a bug including a patch for this ebuild to enable them." - else - use server || \ - ewarn 'Tests cannot be run without the "server" use flag enabled.' - [[ ${UID} -eq 0 ]] || \ - ewarn 'Tests cannot be run as root. Enable "userpriv" in FEATURES.' - - ewarn 'Skipping.' - fi -} diff --git a/dev-db/postgresql/postgresql-9.4.22.ebuild b/dev-db/postgresql/postgresql-9.4.22.ebuild deleted file mode 100644 index fe382d533a60..000000000000 --- a/dev-db/postgresql/postgresql-9.4.22.ebuild +++ /dev/null @@ -1,474 +0,0 @@ -# Copyright 1999-2020 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI="6" - -PYTHON_COMPAT=( python3_6 ) - -PLOCALES="af cs de en es fa fr hr hu it ko nb pl pt_BR ro ru sk sl sv tr zh_CN - zh_TW" - -inherit flag-o-matic l10n linux-info multilib pam prefix python-single-r1 \ - systemd user versionator - -KEYWORDS="~alpha amd64 arm hppa ~ia64 ~mips ppc ppc64 ~s390 sparc x86 ~ppc-macos ~x86-solaris" - -SLOT="$(get_version_component_range 1-2)" - -SRC_URI="https://ftp.postgresql.org/pub/source/v${PV}/postgresql-${PV}.tar.bz2" - -LICENSE="POSTGRESQL GPL-2" -DESCRIPTION="PostgreSQL RDBMS" -HOMEPAGE="https://www.postgresql.org/" - -IUSE="doc kerberos kernel_linux ldap libressl nls pam perl -pg_legacytimestamp - python +readline selinux +server systemd ssl static-libs tcl threads uuid - xml zlib" - -REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" - -CDEPEND=" ->=app-eselect/eselect-postgresql-2.0 -sys-apps/less -virtual/libintl -kerberos? ( virtual/krb5 ) -ldap? ( net-nds/openldap ) -pam? ( sys-libs/pam ) -perl? ( >=dev-lang/perl-5.8:= ) -python? ( ${PYTHON_DEPS} ) -readline? ( sys-libs/readline:0= ) -ssl? ( - !libressl? ( >=dev-libs/openssl-0.9.6-r1:0= ) - libressl? ( dev-libs/libressl:= ) -) -tcl? ( >=dev-lang/tcl-8:0= ) -xml? ( dev-libs/libxml2 dev-libs/libxslt ) -zlib? ( sys-libs/zlib ) -" - -# uuid flags -- depend on sys-apps/util-linux for Linux libcs, or if no -# supported libc in use depend on dev-libs/ossp-uuid. For BSD systems, -# the libc includes UUID functions. -UTIL_LINUX_LIBC=( elibc_{glibc,uclibc,musl} ) -BSD_LIBC=( elibc_{Free,Net,Open}BSD ) - -nest_usedep() { - local front back - while [[ ${#} -gt 1 ]]; do - front+="${1}? ( " - back+=" )" - shift - done - echo "${front}${1}${back}" -} - -IUSE+=" ${UTIL_LINUX_LIBC[@]} ${BSD_LIBC[@]}" -CDEPEND+=" -uuid? ( - ${UTIL_LINUX_LIBC[@]/%/? ( sys-apps/util-linux )} - $(nest_usedep ${UTIL_LINUX_LIBC[@]/#/!} ${BSD_LIBC[@]/#/!} dev-libs/ossp-uuid) -)" - -DEPEND="${CDEPEND} -!!<sys-apps/sandbox-2.0 -sys-devel/bison -sys-devel/flex -nls? ( sys-devel/gettext ) -xml? ( virtual/pkgconfig ) -" - -RDEPEND="${CDEPEND} -!dev-db/postgresql-docs:${SLOT} -!dev-db/postgresql-base:${SLOT} -!dev-db/postgresql-server:${SLOT} -selinux? ( sec-policy/selinux-postgresql ) -" - -pkg_setup() { - use server && CONFIG_CHECK="~SYSVIPC" linux-info_pkg_setup - - enewgroup postgres 70 - enewuser postgres 70 /bin/sh /var/lib/postgresql postgres - - use python && python-single-r1_pkg_setup -} - -src_prepare() { - # Work around PPC{,64} compilation bug where bool is already defined - sed '/#ifndef __cplusplus/a #undef bool' -i src/include/c.h || die - - # Set proper run directory - sed "s|\(PGSOCKET_DIR\s\+\)\"/tmp\"|\1\"${EPREFIX}/run/postgresql\"|" \ - -i src/include/pg_config_manual.h || die - - # Rely on $PATH being in the proper order so that the correct - # install program is used for modules utilizing PGXS in both - # hardened and non-hardened environments. (Bug #528786) - sed 's/@install_bin@/install -c/' -i src/Makefile.global.in || die - - use server || eapply "${FILESDIR}/${PN}-9.4.10-no-server.patch" - - if use pam ; then - sed -e "s/\(#define PGSQL_PAM_SERVICE \"postgresql\)/\1-${SLOT}/" \ - -i src/backend/libpq/auth.c || \ - die 'PGSQL_PAM_SERVICE rename failed.' - fi - - eapply_user -} - -src_configure() { - case ${CHOST} in - *-darwin*|*-solaris*) - use nls && append-libs intl - ;; - esac - - export LDFLAGS_SL="${LDFLAGS}" - export LDFLAGS_EX="${LDFLAGS}" - - local PO="${EPREFIX}" - - local i uuid_config="" - if use uuid; then - for i in ${UTIL_LINUX_LIBC[@]}; do - use ${i} && uuid_config="--with-uuid=e2fs" - done - for i in ${BSD_LIBC[@]}; do - use ${i} && uuid_config="--with-uuid=bsd" - done - [[ -z $uuid_config ]] && uuid_config="--with-uuid=ossp" - fi - - econf \ - --prefix="${PO}/usr/$(get_libdir)/postgresql-${SLOT}" \ - --datadir="${PO}/usr/share/postgresql-${SLOT}" \ - --includedir="${PO}/usr/include/postgresql-${SLOT}" \ - --mandir="${PO}/usr/share/postgresql-${SLOT}/man" \ - --sysconfdir="${PO}/etc/postgresql-${SLOT}" \ - --with-system-tzdata="${PO}/usr/share/zoneinfo" \ - $(use_enable !pg_legacytimestamp integer-datetimes) \ - $(use_enable threads thread-safety) \ - $(use_with kerberos gssapi) \ - $(use_with ldap) \ - $(use_with pam) \ - $(use_with perl) \ - $(use_with python) \ - $(use_with readline) \ - $(use_with ssl openssl) \ - $(use_with tcl) \ - ${uuid_config} \ - $(use_with xml libxml) \ - $(use_with xml libxslt) \ - $(use_with zlib) \ - $(use_enable nls nls "'$(l10n_get_locales)'") -} - -src_compile() { - emake - emake -C contrib -} - -src_install() { - emake DESTDIR="${D}" install - emake DESTDIR="${D}" install -C contrib - - dodoc README HISTORY doc/{TODO,bug.template} - - # man pages are already built, but if we have the target make them, - # they'll be generated from source before being installed so we - # manually install man pages. - # We use ${SLOT} instead of doman for postgresql.eselect - insinto /usr/share/postgresql-${SLOT}/man/ - doins -r doc/src/sgml/man{1,3,7} - if ! use server; then - # Remove man pages for non-existent binaries - for m in {initdb,pg_{controldata,ctl,resetxlog},post{gres,master}}; do - rm "${ED}/usr/share/postgresql-${SLOT}/man/man1/${m}.1" - done - fi - docompress /usr/share/postgresql-${SLOT}/man/man{1,3,7} - - # Create slot specific man pages - local bn f mansec slotted_name - for mansec in 1 3 7 ; do - local rel_manpath="../../postgresql-${SLOT}/man/man${mansec}" - - mkdir -p "${ED}"/usr/share/man/man${mansec} || die "making man dir" - pushd "${ED}"/usr/share/man/man${mansec} > /dev/null || die "pushd failed" - - for f in "${ED}/usr/share/postgresql-${SLOT}/man/man${mansec}"/* ; do - bn=$(basename "${f}") - slotted_name=${bn%.${mansec}}${SLOT/.}.${mansec} - case ${bn} in - TABLE.7|WITH.7) - echo ".so ${rel_manpath}/SELECT.7" > ${slotted_name} - ;; - *) - echo ".so ${rel_manpath}/${bn}" > ${slotted_name} - ;; - esac - done - - popd > /dev/null - done - - insinto /etc/postgresql-${SLOT} - newins src/bin/psql/psqlrc.sample psqlrc - - use static-libs || find "${ED}" -name '*.a' -delete - - local f bn - for f in $(find "${ED}/usr/$(get_libdir)/postgresql-${SLOT}/bin" \ - -mindepth 1 -maxdepth 1) - do - bn=$(basename "${f}") - # Temporarily tack on tmp to workaround a file collision - # issue. This is only necessary for 9.7 and earlier. 10 never - # had this issue. - dosym "../$(get_libdir)/postgresql-${SLOT}/bin/${bn}" \ - "/usr/bin/${bn}${SLOT/.}tmp" - done - - if use doc ; then - docinto html - dodoc doc/src/sgml/html/* - - docinto sgml - dodoc doc/src/sgml/*.{sgml,dsl} - fi - - if use server; then - sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \ - "${FILESDIR}/${PN}.confd-9.3" | newconfd - ${PN}-${SLOT} - - sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \ - "${FILESDIR}/${PN}.init-9.3-r1" | newinitd - ${PN}-${SLOT} - - if use systemd; then - sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \ - "${FILESDIR}/${PN}.service-9.2" | \ - systemd_newunit - ${PN}-${SLOT}.service - systemd_newtmpfilesd "${FILESDIR}"/${PN}.tmpfiles ${PN}-${SLOT}.conf - fi - - newbin "${FILESDIR}"/${PN}-check-db-dir ${PN}-${SLOT}-check-db-dir - - use pam && pamd_mimic system-auth ${PN}-${SLOT} auth account session - - if use prefix ; then - keepdir /run/postgresql - fperms 1775 /run/postgresql - fi - fi -} - -pkg_preinst() { - # Find all of the slot-specific symlinks, if any, in /usr/bin (e.g., - # /usr/bin/psql96). They may have been created by the - # postgresql.eselect module, but they're handled within this ebuild - # now. It's alright if we momentarily delete /usr/bin/psql as it - # will be recreated by the eselect module in pkg_ppostinst(). This - # is only necessary for 9.7 and earlier. 10 and later were never - # handled in this manner. - local canonicalise - if type -p realpath > /dev/null; then - canonicalise=realpath - elif type -p readlink > /dev/null; then - canonicalise='readlink -f' - else - # can't die, subshell - die "No readlink nor realpath found, cannot canonicalise" - fi - - local l - # First remove any symlinks in /usr/bin that may have been created - # by the old eselect - for l in $(find "${ROOT%/}/usr/bin" -mindepth 1 -maxdepth 1 -type l) ; do - if [[ $(${canonicalise} "${l}") == *postgresql-${SLOT}* ]] ; then - rm "${l}" || ewarn "Couldn't remove ${l}" - fi - done - - # Then move the symlinks created by the ebuild to their proper place. - for l in "${ED}"/usr/bin/*tmp ; do - mv "${l}" "${l%tmp}" \ - || ewarn "Couldn't rename $(basename ${l}) to $(basename ${l%tmp})" - done -} - -pkg_postinst() { - use server && use systemd && systemd_tmpfiles_create ${PN}-${SLOT}.conf - postgresql-config update - - elog "If you need a global psqlrc-file, you can place it in:" - elog " ${EROOT%/}/etc/postgresql-${SLOT}/" - - if use server ; then - elog - elog "Gentoo specific documentation:" - elog "https://wiki.gentoo.org/wiki/PostgreSQL" - elog - elog "Official documentation:" - elog "https://www.postgresql.org/docs/${SLOT}/static/index.html" - elog - elog "The default location of the Unix-domain socket is:" - elog " ${EROOT%/}/run/postgresql/" - elog - elog "Before initializing the database, you may want to edit PG_INITDB_OPTS" - elog "so that it contains your preferred locale in:" - elog " ${EROOT%/}/etc/conf.d/postgresql-${SLOT}" - elog - elog "Then, execute the following command to setup the initial database" - elog "environment:" - elog " emerge --config =${CATEGORY}/${PF}" - fi -} - -pkg_prerm() { - if use server && [[ -z ${REPLACED_BY_VERSION} ]] ; then - ewarn "Have you dumped and/or migrated the ${SLOT} database cluster?" - ewarn "\thttps://wiki.gentoo.org/wiki/PostgreSQL/QuickStart#Migrating_PostgreSQL" - - ebegin "Resuming removal in 10 seconds (Control-C to cancel)" - sleep 10 - eend 0 - fi -} - -pkg_postrm() { - postgresql-config update -} - -pkg_config() { - use server || die "USE flag 'server' not enabled. Nothing to configure." - - [[ -f "${EROOT%/}/etc/conf.d/postgresql-${SLOT}" ]] \ - && source "${EROOT%/}/etc/conf.d/postgresql-${SLOT}" - [[ -z "${PGDATA}" ]] && PGDATA="${EROOT%/}/etc/postgresql-${SLOT}/" - [[ -z "${DATA_DIR}" ]] \ - && DATA_DIR="${EROOT%/}/var/lib/postgresql/${SLOT}/data" - - # environment.bz2 may not contain the same locale as the current system - # locale. Unset and source from the current system locale. - if [ -f "${EROOT%/}/etc/env.d/02locale" ]; then - unset LANG - unset LC_CTYPE - unset LC_NUMERIC - unset LC_TIME - unset LC_COLLATE - unset LC_MONETARY - unset LC_MESSAGES - unset LC_ALL - source "${EROOT%/}/etc/env.d/02locale" - [ -n "${LANG}" ] && export LANG - [ -n "${LC_CTYPE}" ] && export LC_CTYPE - [ -n "${LC_NUMERIC}" ] && export LC_NUMERIC - [ -n "${LC_TIME}" ] && export LC_TIME - [ -n "${LC_COLLATE}" ] && export LC_COLLATE - [ -n "${LC_MONETARY}" ] && export LC_MONETARY - [ -n "${LC_MESSAGES}" ] && export LC_MESSAGES - [ -n "${LC_ALL}" ] && export LC_ALL - fi - - einfo "You can modify the paths and options passed to initdb by editing:" - einfo " ${EROOT%/}/etc/conf.d/postgresql-${SLOT}" - einfo - einfo "Information on options that can be passed to initdb are found at:" - einfo " https://www.postgresql.org/docs/${SLOT}/static/creating-cluster.html" - einfo " https://www.postgresql.org/docs/${SLOT}/static/app-initdb.html" - einfo - einfo "PG_INITDB_OPTS is currently set to:" - if [[ -z "${PG_INITDB_OPTS}" ]] ; then - einfo " (none)" - else - einfo " ${PG_INITDB_OPTS}" - fi - einfo - einfo "Configuration files will be installed to:" - einfo " ${PGDATA}" - einfo - einfo "The database cluster will be created in:" - einfo " ${DATA_DIR}" - einfo - - ebegin "Continuing initialization in 5 seconds (Control-C to cancel)" - sleep 5 - eend 0 - - if [ -n "$(ls -A ${DATA_DIR} 2> /dev/null)" ] ; then - eerror "The given directory, '${DATA_DIR}', is not empty." - eerror "Modify DATA_DIR to point to an empty directory." - die "${DATA_DIR} is not empty." - fi - - einfo "Creating the data directory ..." - if [[ ${EUID} == 0 ]] ; then - mkdir -p "${DATA_DIR}" - chown -Rf postgres:postgres "${DATA_DIR}" - chmod 0700 "${DATA_DIR}" - fi - - einfo "Initializing the database ..." - - if [[ ${EUID} == 0 ]] ; then - su postgres -c "${EROOT%/}/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -D \"${DATA_DIR}\" ${PG_INITDB_OPTS}" - else - "${EROOT%/}"/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -U postgres -D "${DATA_DIR}" ${PG_INITDB_OPTS} - fi - - if [[ "${DATA_DIR%/}" != "${PGDATA%/}" ]] ; then - mv "${DATA_DIR%/}"/{pg_{hba,ident},postgresql}.conf "${PGDATA}" - ln -s "${PGDATA%/}"/{pg_{hba,ident},postgresql}.conf "${DATA_DIR%/}" - fi - - # unix_socket_directory has no effect in postgresql.conf as it's - # overridden in the initscript - sed '/^#unix_socket_directories/,+1d' -i "${PGDATA%/}"/postgresql.conf - - cat <<- EOF >> "${PGDATA%/}"/postgresql.conf - # This is here because of https://bugs.gentoo.org/show_bug.cgi?id=518522 - # On the off-chance that you might need to work with UTF-8 encoded - # characters in PL/Perl - plperl.on_init = 'use utf8; use re; package utf8; require "utf8_heavy.pl";' - EOF - - einfo "The autovacuum function, which was in contrib, has been moved to the main" - einfo "PostgreSQL functions starting with 8.1, and starting with 8.4 is now enabled" - einfo "by default. You can disable it in the cluster's:" - einfo " ${PGDATA%/}/postgresql.conf" - einfo - einfo "The PostgreSQL server, by default, will log events to:" - einfo " ${DATA_DIR%/}/postmaster.log" - einfo - if use prefix ; then - einfo "The location of the configuration files have moved to:" - einfo " ${PGDATA}" - einfo "To start the server:" - einfo " pg_ctl start -D ${DATA_DIR} -o '-D ${PGDATA} --data-directory=${DATA_DIR}'" - einfo "To stop:" - einfo " pg_ctl stop -D ${DATA_DIR}" - einfo - einfo "Or move the configuration files back:" - einfo "mv ${PGDATA}*.conf ${DATA_DIR}" - else - einfo "You should use the '${EROOT%/}/etc/init.d/postgresql-${SLOT}' script to run PostgreSQL" - einfo "instead of 'pg_ctl'." - fi -} - -src_test() { - if use server && [[ ${UID} -ne 0 ]] ; then - emake check - - einfo "If you think other tests besides the regression tests are necessary, please" - einfo "submit a bug including a patch for this ebuild to enable them." - else - use server || \ - ewarn 'Tests cannot be run without the "server" use flag enabled.' - [[ ${UID} -eq 0 ]] || \ - ewarn 'Tests cannot be run as root. Enable "userpriv" in FEATURES.' - - ewarn 'Skipping.' - fi -} diff --git a/dev-db/postgresql/postgresql-9.4.23.ebuild b/dev-db/postgresql/postgresql-9.4.23.ebuild deleted file mode 100644 index c0f771cbb877..000000000000 --- a/dev-db/postgresql/postgresql-9.4.23.ebuild +++ /dev/null @@ -1,479 +0,0 @@ -# Copyright 1999-2020 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -PYTHON_COMPAT=( python3_{6,7} ) - -PLOCALES="af cs de en es fa fr hr hu it ko nb pl pt_BR ro ru sk sl sv tr zh_CN - zh_TW" - -inherit flag-o-matic l10n linux-info multilib pam prefix python-single-r1 \ - systemd user - -KEYWORDS="~alpha amd64 arm hppa ~ia64 ~mips ppc ppc64 ~s390 sparc x86 ~ppc-macos ~x86-solaris" - -SLOT=$(ver_cut 1-2) - -SRC_URI="https://ftp.postgresql.org/pub/source/v${PV}/postgresql-${PV}.tar.bz2" - -LICENSE="POSTGRESQL GPL-2" -DESCRIPTION="PostgreSQL RDBMS" -HOMEPAGE="https://www.postgresql.org/" - -IUSE="debug doc kerberos kernel_linux ldap libressl nls pam perl - -pg_legacytimestamp python +readline selinux +server systemd ssl - static-libs tcl threads uuid xml zlib" - -REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" - -CDEPEND=" ->=app-eselect/eselect-postgresql-2.0 -sys-apps/less -virtual/libintl -kerberos? ( virtual/krb5 ) -ldap? ( net-nds/openldap ) -pam? ( sys-libs/pam ) -perl? ( >=dev-lang/perl-5.8:= ) -python? ( ${PYTHON_DEPS} ) -readline? ( sys-libs/readline:0= ) -ssl? ( - !libressl? ( >=dev-libs/openssl-0.9.6-r1:0= ) - libressl? ( dev-libs/libressl:= ) -) -tcl? ( >=dev-lang/tcl-8:0= ) -xml? ( dev-libs/libxml2 dev-libs/libxslt ) -zlib? ( sys-libs/zlib ) -" - -# uuid flags -- depend on sys-apps/util-linux for Linux libcs, or if no -# supported libc in use depend on dev-libs/ossp-uuid. For BSD systems, -# the libc includes UUID functions. -UTIL_LINUX_LIBC=( elibc_{glibc,uclibc,musl} ) -BSD_LIBC=( elibc_{Free,Net,Open}BSD ) - -nest_usedep() { - local front back - while [[ ${#} -gt 1 ]]; do - front+="${1}? ( " - back+=" )" - shift - done - echo "${front}${1}${back}" -} - -IUSE+=" ${UTIL_LINUX_LIBC[@]} ${BSD_LIBC[@]}" -CDEPEND+=" -uuid? ( - ${UTIL_LINUX_LIBC[@]/%/? ( sys-apps/util-linux )} - $(nest_usedep ${UTIL_LINUX_LIBC[@]/#/!} ${BSD_LIBC[@]/#/!} dev-libs/ossp-uuid) -)" - -DEPEND="${CDEPEND} -!!<sys-apps/sandbox-2.0 -sys-devel/bison -sys-devel/flex -nls? ( sys-devel/gettext ) -xml? ( virtual/pkgconfig ) -" - -RDEPEND="${CDEPEND} -!dev-db/postgresql-docs:${SLOT} -!dev-db/postgresql-base:${SLOT} -!dev-db/postgresql-server:${SLOT} -selinux? ( sec-policy/selinux-postgresql ) -" - -pkg_setup() { - use server && CONFIG_CHECK="~SYSVIPC" linux-info_pkg_setup - - enewgroup postgres 70 - enewuser postgres 70 /bin/sh /var/lib/postgresql postgres - - use python && python-single-r1_pkg_setup -} - -src_prepare() { - # Work around PPC{,64} compilation bug where bool is already defined - sed '/#ifndef __cplusplus/a #undef bool' -i src/include/c.h || die - - # Set proper run directory - sed "s|\(PGSOCKET_DIR\s\+\)\"/tmp\"|\1\"${EPREFIX}/run/postgresql\"|" \ - -i src/include/pg_config_manual.h || die - - # Rely on $PATH being in the proper order so that the correct - # install program is used for modules utilizing PGXS in both - # hardened and non-hardened environments. (Bug #528786) - sed 's/@install_bin@/install -c/' -i src/Makefile.global.in || die - - use server || eapply "${FILESDIR}/${PN}-9.4.10-no-server.patch" - - if use pam ; then - sed -e "s/\(#define PGSQL_PAM_SERVICE \"postgresql\)/\1-${SLOT}/" \ - -i src/backend/libpq/auth.c || \ - die 'PGSQL_PAM_SERVICE rename failed.' - fi - - eapply_user -} - -src_configure() { - case ${CHOST} in - *-darwin*|*-solaris*) - use nls && append-libs intl - ;; - esac - - export LDFLAGS_SL="${LDFLAGS}" - export LDFLAGS_EX="${LDFLAGS}" - - local PO="${EPREFIX}" - - local i uuid_config="" - if use uuid; then - for i in ${UTIL_LINUX_LIBC[@]}; do - use ${i} && uuid_config="--with-uuid=e2fs" - done - for i in ${BSD_LIBC[@]}; do - use ${i} && uuid_config="--with-uuid=bsd" - done - [[ -z $uuid_config ]] && uuid_config="--with-uuid=ossp" - fi - - econf \ - --prefix="${PO}/usr/$(get_libdir)/postgresql-${SLOT}" \ - --datadir="${PO}/usr/share/postgresql-${SLOT}" \ - --includedir="${PO}/usr/include/postgresql-${SLOT}" \ - --mandir="${PO}/usr/share/postgresql-${SLOT}/man" \ - --sysconfdir="${PO}/etc/postgresql-${SLOT}" \ - --with-system-tzdata="${PO}/usr/share/zoneinfo" \ - $(use_enable !pg_legacytimestamp integer-datetimes) \ - $(use_enable debug) \ - $(use_enable threads thread-safety) \ - $(use_with kerberos gssapi) \ - $(use_with ldap) \ - $(use_with pam) \ - $(use_with perl) \ - $(use_with python) \ - $(use_with readline) \ - $(use_with ssl openssl) \ - $(use_with tcl) \ - ${uuid_config} \ - $(use_with xml libxml) \ - $(use_with xml libxslt) \ - $(use_with zlib) \ - $(use_enable nls nls "'$(l10n_get_locales)'") -} - -src_compile() { - emake - emake -C contrib -} - -src_install() { - emake DESTDIR="${D}" install - emake DESTDIR="${D}" install -C contrib - - dodoc README HISTORY doc/{TODO,bug.template} - - # man pages are already built, but if we have the target make them, - # they'll be generated from source before being installed so we - # manually install man pages. - # We use ${SLOT} instead of doman for postgresql.eselect - insinto /usr/share/postgresql-${SLOT}/man/ - doins -r doc/src/sgml/man{1,3,7} - if ! use server; then - # Remove man pages for non-existent binaries - for m in {initdb,pg_{controldata,ctl,resetxlog},post{gres,master}}; do - rm "${ED}/usr/share/postgresql-${SLOT}/man/man1/${m}.1" - done - fi - docompress /usr/share/postgresql-${SLOT}/man/man{1,3,7} - - # Create slot specific man pages - local bn f mansec slotted_name - for mansec in 1 3 7 ; do - local rel_manpath="../../postgresql-${SLOT}/man/man${mansec}" - - mkdir -p "${ED}"/usr/share/man/man${mansec} || die "making man dir" - pushd "${ED}"/usr/share/man/man${mansec} > /dev/null || die "pushd failed" - - for f in "${ED}/usr/share/postgresql-${SLOT}/man/man${mansec}"/* ; do - bn=$(basename "${f}") - slotted_name=${bn%.${mansec}}${SLOT/.}.${mansec} - case ${bn} in - TABLE.7|WITH.7) - echo ".so ${rel_manpath}/SELECT.7" > ${slotted_name} - ;; - *) - echo ".so ${rel_manpath}/${bn}" > ${slotted_name} - ;; - esac - done - - popd > /dev/null - done - - insinto /etc/postgresql-${SLOT} - newins src/bin/psql/psqlrc.sample psqlrc - - # Don't delete libpg{port,common}.a (Bug #571046). They're always - # needed by extensions utilizing PGXS. - use static-libs || \ - find "${ED}" -name '*.a' ! -name libpgport.a ! -name libpgcommon.a \ - -delete - - local f bn - for f in $(find "${ED}/usr/$(get_libdir)/postgresql-${SLOT}/bin" \ - -mindepth 1 -maxdepth 1) - do - bn=$(basename "${f}") - # Temporarily tack on tmp to workaround a file collision - # issue. This is only necessary for 9.7 and earlier. 10 never - # had this issue. - dosym "../$(get_libdir)/postgresql-${SLOT}/bin/${bn}" \ - "/usr/bin/${bn}${SLOT/.}tmp" - done - - if use doc ; then - docinto html - dodoc doc/src/sgml/html/* - - docinto sgml - dodoc doc/src/sgml/*.{sgml,dsl} - fi - - if use server; then - sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \ - "${FILESDIR}/${PN}.confd-9.3" | newconfd - ${PN}-${SLOT} - - sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \ - "${FILESDIR}/${PN}.init-9.3-r1" | newinitd - ${PN}-${SLOT} - - if use systemd; then - sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \ - "${FILESDIR}/${PN}.service-9.2" | \ - systemd_newunit - ${PN}-${SLOT}.service - systemd_newtmpfilesd "${FILESDIR}"/${PN}.tmpfiles ${PN}-${SLOT}.conf - fi - - newbin "${FILESDIR}"/${PN}-check-db-dir ${PN}-${SLOT}-check-db-dir - - use pam && pamd_mimic system-auth ${PN}-${SLOT} auth account session - - if use prefix ; then - keepdir /run/postgresql - fperms 1775 /run/postgresql - fi - fi -} - -pkg_preinst() { - # Find all of the slot-specific symlinks, if any, in /usr/bin (e.g., - # /usr/bin/psql96). They may have been created by the - # postgresql.eselect module, but they're handled within this ebuild - # now. It's alright if we momentarily delete /usr/bin/psql as it - # will be recreated by the eselect module in pkg_ppostinst(). This - # is only necessary for 9.7 and earlier. 10 and later were never - # handled in this manner. - local canonicalise - if type -p realpath > /dev/null; then - canonicalise=realpath - elif type -p readlink > /dev/null; then - canonicalise='readlink -f' - else - # can't die, subshell - die "No readlink nor realpath found, cannot canonicalise" - fi - - local l - # First remove any symlinks in /usr/bin that may have been created - # by the old eselect - for l in $(find "${ROOT}/usr/bin" -mindepth 1 -maxdepth 1 -type l) ; do - if [[ $(${canonicalise} "${l}") == *postgresql-${SLOT}* ]] ; then - rm "${l}" || ewarn "Couldn't remove ${l}" - fi - done - - # Then move the symlinks created by the ebuild to their proper place. - for l in "${ED}"/usr/bin/*tmp ; do - mv "${l}" "${l%tmp}" \ - || ewarn "Couldn't rename $(basename ${l}) to $(basename ${l%tmp})" - done -} - -pkg_postinst() { - use server && use systemd && systemd_tmpfiles_create ${PN}-${SLOT}.conf - postgresql-config update - - elog "If you need a global psqlrc-file, you can place it in:" - elog " ${EROOT}/etc/postgresql-${SLOT}/" - - if use server ; then - elog - elog "Gentoo specific documentation:" - elog "https://wiki.gentoo.org/wiki/PostgreSQL" - elog - elog "Official documentation:" - elog "https://www.postgresql.org/docs/${SLOT}/static/index.html" - elog - elog "The default location of the Unix-domain socket is:" - elog " ${EROOT}/run/postgresql/" - elog - elog "Before initializing the database, you may want to edit PG_INITDB_OPTS" - elog "so that it contains your preferred locale in:" - elog " ${EROOT}/etc/conf.d/postgresql-${SLOT}" - elog - elog "Then, execute the following command to setup the initial database" - elog "environment:" - elog " emerge --config =${CATEGORY}/${PF}" - fi -} - -pkg_prerm() { - if use server && [[ -z ${REPLACED_BY_VERSION} ]] ; then - ewarn "Have you dumped and/or migrated the ${SLOT} database cluster?" - ewarn "\thttps://wiki.gentoo.org/wiki/PostgreSQL/QuickStart#Migrating_PostgreSQL" - - ebegin "Resuming removal in 10 seconds (Control-C to cancel)" - sleep 10 - eend 0 - fi -} - -pkg_postrm() { - postgresql-config update -} - -pkg_config() { - use server || die "USE flag 'server' not enabled. Nothing to configure." - - [[ -f "${EROOT}/etc/conf.d/postgresql-${SLOT}" ]] \ - && source "${EROOT}/etc/conf.d/postgresql-${SLOT}" - [[ -z "${PGDATA}" ]] && PGDATA="${EROOT}/etc/postgresql-${SLOT}/" - [[ -z "${DATA_DIR}" ]] \ - && DATA_DIR="${EROOT}/var/lib/postgresql/${SLOT}/data" - - # environment.bz2 may not contain the same locale as the current system - # locale. Unset and source from the current system locale. - if [ -f "${EROOT}/etc/env.d/02locale" ]; then - unset LANG - unset LC_CTYPE - unset LC_NUMERIC - unset LC_TIME - unset LC_COLLATE - unset LC_MONETARY - unset LC_MESSAGES - unset LC_ALL - source "${EROOT}/etc/env.d/02locale" - [ -n "${LANG}" ] && export LANG - [ -n "${LC_CTYPE}" ] && export LC_CTYPE - [ -n "${LC_NUMERIC}" ] && export LC_NUMERIC - [ -n "${LC_TIME}" ] && export LC_TIME - [ -n "${LC_COLLATE}" ] && export LC_COLLATE - [ -n "${LC_MONETARY}" ] && export LC_MONETARY - [ -n "${LC_MESSAGES}" ] && export LC_MESSAGES - [ -n "${LC_ALL}" ] && export LC_ALL - fi - - einfo "You can modify the paths and options passed to initdb by editing:" - einfo " ${EROOT}/etc/conf.d/postgresql-${SLOT}" - einfo - einfo "Information on options that can be passed to initdb are found at:" - einfo " https://www.postgresql.org/docs/${SLOT}/static/creating-cluster.html" - einfo " https://www.postgresql.org/docs/${SLOT}/static/app-initdb.html" - einfo - einfo "PG_INITDB_OPTS is currently set to:" - if [[ -z "${PG_INITDB_OPTS}" ]] ; then - einfo " (none)" - else - einfo " ${PG_INITDB_OPTS}" - fi - einfo - einfo "Configuration files will be installed to:" - einfo " ${PGDATA}" - einfo - einfo "The database cluster will be created in:" - einfo " ${DATA_DIR}" - einfo - - ebegin "Continuing initialization in 5 seconds (Control-C to cancel)" - sleep 5 - eend 0 - - if [ -n "$(ls -A ${DATA_DIR} 2> /dev/null)" ] ; then - eerror "The given directory, '${DATA_DIR}', is not empty." - eerror "Modify DATA_DIR to point to an empty directory." - die "${DATA_DIR} is not empty." - fi - - einfo "Creating the data directory ..." - if [[ ${EUID} == 0 ]] ; then - mkdir -p "${DATA_DIR}" - chown -Rf postgres:postgres "${DATA_DIR}" - chmod 0700 "${DATA_DIR}" - fi - - einfo "Initializing the database ..." - - if [[ ${EUID} == 0 ]] ; then - su postgres -c "${EROOT}/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -D \"${DATA_DIR}\" ${PG_INITDB_OPTS}" - else - "${EROOT}"/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -U postgres -D "${DATA_DIR}" ${PG_INITDB_OPTS} - fi - - if [[ "${DATA_DIR%/}" != "${PGDATA%/}" ]] ; then - mv "${DATA_DIR%/}"/{pg_{hba,ident},postgresql}.conf "${PGDATA}" - ln -s "${PGDATA%/}"/{pg_{hba,ident},postgresql}.conf "${DATA_DIR%/}" - fi - - # unix_socket_directory has no effect in postgresql.conf as it's - # overridden in the initscript - sed '/^#unix_socket_directories/,+1d' -i "${PGDATA%/}"/postgresql.conf - - cat <<- EOF >> "${PGDATA%/}"/postgresql.conf - # This is here because of https://bugs.gentoo.org/show_bug.cgi?id=518522 - # On the off-chance that you might need to work with UTF-8 encoded - # characters in PL/Perl - plperl.on_init = 'use utf8; use re; package utf8; require "utf8_heavy.pl";' - EOF - - einfo "The autovacuum function, which was in contrib, has been moved to the main" - einfo "PostgreSQL functions starting with 8.1, and starting with 8.4 is now enabled" - einfo "by default. You can disable it in the cluster's:" - einfo " ${PGDATA%/}/postgresql.conf" - einfo - einfo "The PostgreSQL server, by default, will log events to:" - einfo " ${DATA_DIR%/}/postmaster.log" - einfo - if use prefix ; then - einfo "The location of the configuration files have moved to:" - einfo " ${PGDATA}" - einfo "To start the server:" - einfo " pg_ctl start -D ${DATA_DIR} -o '-D ${PGDATA} --data-directory=${DATA_DIR}'" - einfo "To stop:" - einfo " pg_ctl stop -D ${DATA_DIR}" - einfo - einfo "Or move the configuration files back:" - einfo "mv ${PGDATA}*.conf ${DATA_DIR}" - else - einfo "You should use the '${EROOT}/etc/init.d/postgresql-${SLOT}' script to run PostgreSQL" - einfo "instead of 'pg_ctl'." - fi -} - -src_test() { - if use server && [[ ${UID} -ne 0 ]] ; then - emake check - - einfo "If you think other tests besides the regression tests are necessary, please" - einfo "submit a bug including a patch for this ebuild to enable them." - else - use server || \ - ewarn 'Tests cannot be run without the "server" use flag enabled.' - [[ ${UID} -eq 0 ]] || \ - ewarn 'Tests cannot be run as root. Enable "userpriv" in FEATURES.' - - ewarn 'Skipping.' - fi -} diff --git a/dev-db/postgresql/postgresql-9.4.24.ebuild b/dev-db/postgresql/postgresql-9.4.24.ebuild deleted file mode 100644 index 2f5d0dd70e4f..000000000000 --- a/dev-db/postgresql/postgresql-9.4.24.ebuild +++ /dev/null @@ -1,479 +0,0 @@ -# Copyright 1999-2020 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -PYTHON_COMPAT=( python3_{6,7} ) - -PLOCALES="af cs de en es fa fr hr hu it ko nb pl pt_BR ro ru sk sl sv tr zh_CN - zh_TW" - -inherit flag-o-matic l10n linux-info multilib pam prefix python-single-r1 \ - systemd user - -KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~ppc-macos ~x86-solaris" - -SLOT=$(ver_cut 1-2) - -SRC_URI="https://ftp.postgresql.org/pub/source/v${PV}/postgresql-${PV}.tar.bz2" - -LICENSE="POSTGRESQL GPL-2" -DESCRIPTION="PostgreSQL RDBMS" -HOMEPAGE="https://www.postgresql.org/" - -IUSE="debug doc kerberos kernel_linux ldap libressl nls pam perl - -pg_legacytimestamp python +readline selinux +server systemd ssl - static-libs tcl threads uuid xml zlib" - -REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" - -CDEPEND=" ->=app-eselect/eselect-postgresql-2.0 -sys-apps/less -virtual/libintl -kerberos? ( virtual/krb5 ) -ldap? ( net-nds/openldap ) -pam? ( sys-libs/pam ) -perl? ( >=dev-lang/perl-5.8:= ) -python? ( ${PYTHON_DEPS} ) -readline? ( sys-libs/readline:0= ) -ssl? ( - !libressl? ( >=dev-libs/openssl-0.9.6-r1:0= ) - libressl? ( dev-libs/libressl:= ) -) -tcl? ( >=dev-lang/tcl-8:0= ) -xml? ( dev-libs/libxml2 dev-libs/libxslt ) -zlib? ( sys-libs/zlib ) -" - -# uuid flags -- depend on sys-apps/util-linux for Linux libcs, or if no -# supported libc in use depend on dev-libs/ossp-uuid. For BSD systems, -# the libc includes UUID functions. -UTIL_LINUX_LIBC=( elibc_{glibc,uclibc,musl} ) -BSD_LIBC=( elibc_{Free,Net,Open}BSD ) - -nest_usedep() { - local front back - while [[ ${#} -gt 1 ]]; do - front+="${1}? ( " - back+=" )" - shift - done - echo "${front}${1}${back}" -} - -IUSE+=" ${UTIL_LINUX_LIBC[@]} ${BSD_LIBC[@]}" -CDEPEND+=" -uuid? ( - ${UTIL_LINUX_LIBC[@]/%/? ( sys-apps/util-linux )} - $(nest_usedep ${UTIL_LINUX_LIBC[@]/#/!} ${BSD_LIBC[@]/#/!} dev-libs/ossp-uuid) -)" - -DEPEND="${CDEPEND} -!!<sys-apps/sandbox-2.0 -sys-devel/bison -sys-devel/flex -nls? ( sys-devel/gettext ) -xml? ( virtual/pkgconfig ) -" - -RDEPEND="${CDEPEND} -!dev-db/postgresql-docs:${SLOT} -!dev-db/postgresql-base:${SLOT} -!dev-db/postgresql-server:${SLOT} -selinux? ( sec-policy/selinux-postgresql ) -" - -pkg_setup() { - use server && CONFIG_CHECK="~SYSVIPC" linux-info_pkg_setup - - enewgroup postgres 70 - enewuser postgres 70 /bin/sh /var/lib/postgresql postgres - - use python && python-single-r1_pkg_setup -} - -src_prepare() { - # Work around PPC{,64} compilation bug where bool is already defined - sed '/#ifndef __cplusplus/a #undef bool' -i src/include/c.h || die - - # Set proper run directory - sed "s|\(PGSOCKET_DIR\s\+\)\"/tmp\"|\1\"${EPREFIX}/run/postgresql\"|" \ - -i src/include/pg_config_manual.h || die - - # Rely on $PATH being in the proper order so that the correct - # install program is used for modules utilizing PGXS in both - # hardened and non-hardened environments. (Bug #528786) - sed 's/@install_bin@/install -c/' -i src/Makefile.global.in || die - - use server || eapply "${FILESDIR}/${PN}-9.4.10-no-server.patch" - - if use pam ; then - sed -e "s/\(#define PGSQL_PAM_SERVICE \"postgresql\)/\1-${SLOT}/" \ - -i src/backend/libpq/auth.c || \ - die 'PGSQL_PAM_SERVICE rename failed.' - fi - - eapply_user -} - -src_configure() { - case ${CHOST} in - *-darwin*|*-solaris*) - use nls && append-libs intl - ;; - esac - - export LDFLAGS_SL="${LDFLAGS}" - export LDFLAGS_EX="${LDFLAGS}" - - local PO="${EPREFIX}" - - local i uuid_config="" - if use uuid; then - for i in ${UTIL_LINUX_LIBC[@]}; do - use ${i} && uuid_config="--with-uuid=e2fs" - done - for i in ${BSD_LIBC[@]}; do - use ${i} && uuid_config="--with-uuid=bsd" - done - [[ -z $uuid_config ]] && uuid_config="--with-uuid=ossp" - fi - - econf \ - --prefix="${PO}/usr/$(get_libdir)/postgresql-${SLOT}" \ - --datadir="${PO}/usr/share/postgresql-${SLOT}" \ - --includedir="${PO}/usr/include/postgresql-${SLOT}" \ - --mandir="${PO}/usr/share/postgresql-${SLOT}/man" \ - --sysconfdir="${PO}/etc/postgresql-${SLOT}" \ - --with-system-tzdata="${PO}/usr/share/zoneinfo" \ - $(use_enable !pg_legacytimestamp integer-datetimes) \ - $(use_enable debug) \ - $(use_enable threads thread-safety) \ - $(use_with kerberos gssapi) \ - $(use_with ldap) \ - $(use_with pam) \ - $(use_with perl) \ - $(use_with python) \ - $(use_with readline) \ - $(use_with ssl openssl) \ - $(use_with tcl) \ - ${uuid_config} \ - $(use_with xml libxml) \ - $(use_with xml libxslt) \ - $(use_with zlib) \ - $(use_enable nls nls "'$(l10n_get_locales)'") -} - -src_compile() { - emake - emake -C contrib -} - -src_install() { - emake DESTDIR="${D}" install - emake DESTDIR="${D}" install -C contrib - - dodoc README HISTORY doc/{TODO,bug.template} - - # man pages are already built, but if we have the target make them, - # they'll be generated from source before being installed so we - # manually install man pages. - # We use ${SLOT} instead of doman for postgresql.eselect - insinto /usr/share/postgresql-${SLOT}/man/ - doins -r doc/src/sgml/man{1,3,7} - if ! use server; then - # Remove man pages for non-existent binaries - for m in {initdb,pg_{controldata,ctl,resetxlog},post{gres,master}}; do - rm "${ED}/usr/share/postgresql-${SLOT}/man/man1/${m}.1" - done - fi - docompress /usr/share/postgresql-${SLOT}/man/man{1,3,7} - - # Create slot specific man pages - local bn f mansec slotted_name - for mansec in 1 3 7 ; do - local rel_manpath="../../postgresql-${SLOT}/man/man${mansec}" - - mkdir -p "${ED}"/usr/share/man/man${mansec} || die "making man dir" - pushd "${ED}"/usr/share/man/man${mansec} > /dev/null || die "pushd failed" - - for f in "${ED}/usr/share/postgresql-${SLOT}/man/man${mansec}"/* ; do - bn=$(basename "${f}") - slotted_name=${bn%.${mansec}}${SLOT/.}.${mansec} - case ${bn} in - TABLE.7|WITH.7) - echo ".so ${rel_manpath}/SELECT.7" > ${slotted_name} - ;; - *) - echo ".so ${rel_manpath}/${bn}" > ${slotted_name} - ;; - esac - done - - popd > /dev/null - done - - insinto /etc/postgresql-${SLOT} - newins src/bin/psql/psqlrc.sample psqlrc - - # Don't delete libpg{port,common}.a (Bug #571046). They're always - # needed by extensions utilizing PGXS. - use static-libs || \ - find "${ED}" -name '*.a' ! -name libpgport.a ! -name libpgcommon.a \ - -delete - - local f bn - for f in $(find "${ED}/usr/$(get_libdir)/postgresql-${SLOT}/bin" \ - -mindepth 1 -maxdepth 1) - do - bn=$(basename "${f}") - # Temporarily tack on tmp to workaround a file collision - # issue. This is only necessary for 9.7 and earlier. 10 never - # had this issue. - dosym "../$(get_libdir)/postgresql-${SLOT}/bin/${bn}" \ - "/usr/bin/${bn}${SLOT/.}tmp" - done - - if use doc ; then - docinto html - dodoc doc/src/sgml/html/* - - docinto sgml - dodoc doc/src/sgml/*.{sgml,dsl} - fi - - if use server; then - sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \ - "${FILESDIR}/${PN}.confd-9.3" | newconfd - ${PN}-${SLOT} - - sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \ - "${FILESDIR}/${PN}.init-9.3-r1" | newinitd - ${PN}-${SLOT} - - if use systemd; then - sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \ - "${FILESDIR}/${PN}.service-9.2" | \ - systemd_newunit - ${PN}-${SLOT}.service - systemd_newtmpfilesd "${FILESDIR}"/${PN}.tmpfiles ${PN}-${SLOT}.conf - fi - - newbin "${FILESDIR}"/${PN}-check-db-dir ${PN}-${SLOT}-check-db-dir - - use pam && pamd_mimic system-auth ${PN}-${SLOT} auth account session - - if use prefix ; then - keepdir /run/postgresql - fperms 1775 /run/postgresql - fi - fi -} - -pkg_preinst() { - # Find all of the slot-specific symlinks, if any, in /usr/bin (e.g., - # /usr/bin/psql96). They may have been created by the - # postgresql.eselect module, but they're handled within this ebuild - # now. It's alright if we momentarily delete /usr/bin/psql as it - # will be recreated by the eselect module in pkg_ppostinst(). This - # is only necessary for 9.7 and earlier. 10 and later were never - # handled in this manner. - local canonicalise - if type -p realpath > /dev/null; then - canonicalise=realpath - elif type -p readlink > /dev/null; then - canonicalise='readlink -f' - else - # can't die, subshell - die "No readlink nor realpath found, cannot canonicalise" - fi - - local l - # First remove any symlinks in /usr/bin that may have been created - # by the old eselect - for l in $(find "${ROOT}/usr/bin" -mindepth 1 -maxdepth 1 -type l) ; do - if [[ $(${canonicalise} "${l}") == *postgresql-${SLOT}* ]] ; then - rm "${l}" || ewarn "Couldn't remove ${l}" - fi - done - - # Then move the symlinks created by the ebuild to their proper place. - for l in "${ED}"/usr/bin/*tmp ; do - mv "${l}" "${l%tmp}" \ - || ewarn "Couldn't rename $(basename ${l}) to $(basename ${l%tmp})" - done -} - -pkg_postinst() { - use server && use systemd && systemd_tmpfiles_create ${PN}-${SLOT}.conf - postgresql-config update - - elog "If you need a global psqlrc-file, you can place it in:" - elog " ${EROOT}/etc/postgresql-${SLOT}/" - - if use server ; then - elog - elog "Gentoo specific documentation:" - elog "https://wiki.gentoo.org/wiki/PostgreSQL" - elog - elog "Official documentation:" - elog "https://www.postgresql.org/docs/${SLOT}/static/index.html" - elog - elog "The default location of the Unix-domain socket is:" - elog " ${EROOT}/run/postgresql/" - elog - elog "Before initializing the database, you may want to edit PG_INITDB_OPTS" - elog "so that it contains your preferred locale in:" - elog " ${EROOT}/etc/conf.d/postgresql-${SLOT}" - elog - elog "Then, execute the following command to setup the initial database" - elog "environment:" - elog " emerge --config =${CATEGORY}/${PF}" - fi -} - -pkg_prerm() { - if use server && [[ -z ${REPLACED_BY_VERSION} ]] ; then - ewarn "Have you dumped and/or migrated the ${SLOT} database cluster?" - ewarn "\thttps://wiki.gentoo.org/wiki/PostgreSQL/QuickStart#Migrating_PostgreSQL" - - ebegin "Resuming removal in 10 seconds (Control-C to cancel)" - sleep 10 - eend 0 - fi -} - -pkg_postrm() { - postgresql-config update -} - -pkg_config() { - use server || die "USE flag 'server' not enabled. Nothing to configure." - - [[ -f "${EROOT}/etc/conf.d/postgresql-${SLOT}" ]] \ - && source "${EROOT}/etc/conf.d/postgresql-${SLOT}" - [[ -z "${PGDATA}" ]] && PGDATA="${EROOT}/etc/postgresql-${SLOT}/" - [[ -z "${DATA_DIR}" ]] \ - && DATA_DIR="${EROOT}/var/lib/postgresql/${SLOT}/data" - - # environment.bz2 may not contain the same locale as the current system - # locale. Unset and source from the current system locale. - if [ -f "${EROOT}/etc/env.d/02locale" ]; then - unset LANG - unset LC_CTYPE - unset LC_NUMERIC - unset LC_TIME - unset LC_COLLATE - unset LC_MONETARY - unset LC_MESSAGES - unset LC_ALL - source "${EROOT}/etc/env.d/02locale" - [ -n "${LANG}" ] && export LANG - [ -n "${LC_CTYPE}" ] && export LC_CTYPE - [ -n "${LC_NUMERIC}" ] && export LC_NUMERIC - [ -n "${LC_TIME}" ] && export LC_TIME - [ -n "${LC_COLLATE}" ] && export LC_COLLATE - [ -n "${LC_MONETARY}" ] && export LC_MONETARY - [ -n "${LC_MESSAGES}" ] && export LC_MESSAGES - [ -n "${LC_ALL}" ] && export LC_ALL - fi - - einfo "You can modify the paths and options passed to initdb by editing:" - einfo " ${EROOT}/etc/conf.d/postgresql-${SLOT}" - einfo - einfo "Information on options that can be passed to initdb are found at:" - einfo " https://www.postgresql.org/docs/${SLOT}/static/creating-cluster.html" - einfo " https://www.postgresql.org/docs/${SLOT}/static/app-initdb.html" - einfo - einfo "PG_INITDB_OPTS is currently set to:" - if [[ -z "${PG_INITDB_OPTS}" ]] ; then - einfo " (none)" - else - einfo " ${PG_INITDB_OPTS}" - fi - einfo - einfo "Configuration files will be installed to:" - einfo " ${PGDATA}" - einfo - einfo "The database cluster will be created in:" - einfo " ${DATA_DIR}" - einfo - - ebegin "Continuing initialization in 5 seconds (Control-C to cancel)" - sleep 5 - eend 0 - - if [ -n "$(ls -A ${DATA_DIR} 2> /dev/null)" ] ; then - eerror "The given directory, '${DATA_DIR}', is not empty." - eerror "Modify DATA_DIR to point to an empty directory." - die "${DATA_DIR} is not empty." - fi - - einfo "Creating the data directory ..." - if [[ ${EUID} == 0 ]] ; then - mkdir -p "${DATA_DIR}" - chown -Rf postgres:postgres "${DATA_DIR}" - chmod 0700 "${DATA_DIR}" - fi - - einfo "Initializing the database ..." - - if [[ ${EUID} == 0 ]] ; then - su postgres -c "${EROOT}/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -D \"${DATA_DIR}\" ${PG_INITDB_OPTS}" - else - "${EROOT}"/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -U postgres -D "${DATA_DIR}" ${PG_INITDB_OPTS} - fi - - if [[ "${DATA_DIR%/}" != "${PGDATA%/}" ]] ; then - mv "${DATA_DIR%/}"/{pg_{hba,ident},postgresql}.conf "${PGDATA}" - ln -s "${PGDATA%/}"/{pg_{hba,ident},postgresql}.conf "${DATA_DIR%/}" - fi - - # unix_socket_directory has no effect in postgresql.conf as it's - # overridden in the initscript - sed '/^#unix_socket_directories/,+1d' -i "${PGDATA%/}"/postgresql.conf - - cat <<- EOF >> "${PGDATA%/}"/postgresql.conf - # This is here because of https://bugs.gentoo.org/show_bug.cgi?id=518522 - # On the off-chance that you might need to work with UTF-8 encoded - # characters in PL/Perl - plperl.on_init = 'use utf8; use re; package utf8; require "utf8_heavy.pl";' - EOF - - einfo "The autovacuum function, which was in contrib, has been moved to the main" - einfo "PostgreSQL functions starting with 8.1, and starting with 8.4 is now enabled" - einfo "by default. You can disable it in the cluster's:" - einfo " ${PGDATA%/}/postgresql.conf" - einfo - einfo "The PostgreSQL server, by default, will log events to:" - einfo " ${DATA_DIR%/}/postmaster.log" - einfo - if use prefix ; then - einfo "The location of the configuration files have moved to:" - einfo " ${PGDATA}" - einfo "To start the server:" - einfo " pg_ctl start -D ${DATA_DIR} -o '-D ${PGDATA} --data-directory=${DATA_DIR}'" - einfo "To stop:" - einfo " pg_ctl stop -D ${DATA_DIR}" - einfo - einfo "Or move the configuration files back:" - einfo "mv ${PGDATA}*.conf ${DATA_DIR}" - else - einfo "You should use the '${EROOT}/etc/init.d/postgresql-${SLOT}' script to run PostgreSQL" - einfo "instead of 'pg_ctl'." - fi -} - -src_test() { - if use server && [[ ${UID} -ne 0 ]] ; then - emake check - - einfo "If you think other tests besides the regression tests are necessary, please" - einfo "submit a bug including a patch for this ebuild to enable them." - else - use server || \ - ewarn 'Tests cannot be run without the "server" use flag enabled.' - [[ ${UID} -eq 0 ]] || \ - ewarn 'Tests cannot be run as root. Enable "userpriv" in FEATURES.' - - ewarn 'Skipping.' - fi -} diff --git a/dev-db/postgresql/postgresql-9.4.25.ebuild b/dev-db/postgresql/postgresql-9.4.25.ebuild deleted file mode 100644 index 32bc19186d1e..000000000000 --- a/dev-db/postgresql/postgresql-9.4.25.ebuild +++ /dev/null @@ -1,479 +0,0 @@ -# Copyright 1999-2020 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -PYTHON_COMPAT=( python3_{6,7} ) - -PLOCALES="af cs de en es fa fr hr hu it ko nb pl pt_BR ro ru sk sl sv tr zh_CN - zh_TW" - -inherit flag-o-matic l10n linux-info multilib pam prefix python-single-r1 \ - systemd user - -KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~mips ppc ppc64 ~s390 sparc x86 ~ppc-macos ~x86-solaris" - -SLOT=$(ver_cut 1-2) - -SRC_URI="https://ftp.postgresql.org/pub/source/v${PV}/postgresql-${PV}.tar.bz2" - -LICENSE="POSTGRESQL GPL-2" -DESCRIPTION="PostgreSQL RDBMS" -HOMEPAGE="https://www.postgresql.org/" - -IUSE="debug doc kerberos kernel_linux ldap libressl nls pam perl - -pg_legacytimestamp python +readline selinux +server systemd ssl - static-libs tcl threads uuid xml zlib" - -REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" - -CDEPEND=" ->=app-eselect/eselect-postgresql-2.0 -sys-apps/less -virtual/libintl -kerberos? ( virtual/krb5 ) -ldap? ( net-nds/openldap ) -pam? ( sys-libs/pam ) -perl? ( >=dev-lang/perl-5.8:= ) -python? ( ${PYTHON_DEPS} ) -readline? ( sys-libs/readline:0= ) -ssl? ( - !libressl? ( >=dev-libs/openssl-0.9.6-r1:0= ) - libressl? ( dev-libs/libressl:= ) -) -tcl? ( >=dev-lang/tcl-8:0= ) -xml? ( dev-libs/libxml2 dev-libs/libxslt ) -zlib? ( sys-libs/zlib ) -" - -# uuid flags -- depend on sys-apps/util-linux for Linux libcs, or if no -# supported libc in use depend on dev-libs/ossp-uuid. For BSD systems, -# the libc includes UUID functions. -UTIL_LINUX_LIBC=( elibc_{glibc,uclibc,musl} ) -BSD_LIBC=( elibc_{Free,Net,Open}BSD ) - -nest_usedep() { - local front back - while [[ ${#} -gt 1 ]]; do - front+="${1}? ( " - back+=" )" - shift - done - echo "${front}${1}${back}" -} - -IUSE+=" ${UTIL_LINUX_LIBC[@]} ${BSD_LIBC[@]}" -CDEPEND+=" -uuid? ( - ${UTIL_LINUX_LIBC[@]/%/? ( sys-apps/util-linux )} - $(nest_usedep ${UTIL_LINUX_LIBC[@]/#/!} ${BSD_LIBC[@]/#/!} dev-libs/ossp-uuid) -)" - -DEPEND="${CDEPEND} -!!<sys-apps/sandbox-2.0 -sys-devel/bison -sys-devel/flex -nls? ( sys-devel/gettext ) -xml? ( virtual/pkgconfig ) -" - -RDEPEND="${CDEPEND} -!dev-db/postgresql-docs:${SLOT} -!dev-db/postgresql-base:${SLOT} -!dev-db/postgresql-server:${SLOT} -selinux? ( sec-policy/selinux-postgresql ) -" - -pkg_setup() { - use server && CONFIG_CHECK="~SYSVIPC" linux-info_pkg_setup - - enewgroup postgres 70 - enewuser postgres 70 /bin/sh /var/lib/postgresql postgres - - use python && python-single-r1_pkg_setup -} - -src_prepare() { - # Work around PPC{,64} compilation bug where bool is already defined - sed '/#ifndef __cplusplus/a #undef bool' -i src/include/c.h || die - - # Set proper run directory - sed "s|\(PGSOCKET_DIR\s\+\)\"/tmp\"|\1\"${EPREFIX}/run/postgresql\"|" \ - -i src/include/pg_config_manual.h || die - - # Rely on $PATH being in the proper order so that the correct - # install program is used for modules utilizing PGXS in both - # hardened and non-hardened environments. (Bug #528786) - sed 's/@install_bin@/install -c/' -i src/Makefile.global.in || die - - use server || eapply "${FILESDIR}/${PN}-9.4.10-no-server.patch" - - if use pam ; then - sed -e "s/\(#define PGSQL_PAM_SERVICE \"postgresql\)/\1-${SLOT}/" \ - -i src/backend/libpq/auth.c || \ - die 'PGSQL_PAM_SERVICE rename failed.' - fi - - eapply_user -} - -src_configure() { - case ${CHOST} in - *-darwin*|*-solaris*) - use nls && append-libs intl - ;; - esac - - export LDFLAGS_SL="${LDFLAGS}" - export LDFLAGS_EX="${LDFLAGS}" - - local PO="${EPREFIX}" - - local i uuid_config="" - if use uuid; then - for i in ${UTIL_LINUX_LIBC[@]}; do - use ${i} && uuid_config="--with-uuid=e2fs" - done - for i in ${BSD_LIBC[@]}; do - use ${i} && uuid_config="--with-uuid=bsd" - done - [[ -z $uuid_config ]] && uuid_config="--with-uuid=ossp" - fi - - econf \ - --prefix="${PO}/usr/$(get_libdir)/postgresql-${SLOT}" \ - --datadir="${PO}/usr/share/postgresql-${SLOT}" \ - --includedir="${PO}/usr/include/postgresql-${SLOT}" \ - --mandir="${PO}/usr/share/postgresql-${SLOT}/man" \ - --sysconfdir="${PO}/etc/postgresql-${SLOT}" \ - --with-system-tzdata="${PO}/usr/share/zoneinfo" \ - $(use_enable !pg_legacytimestamp integer-datetimes) \ - $(use_enable debug) \ - $(use_enable threads thread-safety) \ - $(use_with kerberos gssapi) \ - $(use_with ldap) \ - $(use_with pam) \ - $(use_with perl) \ - $(use_with python) \ - $(use_with readline) \ - $(use_with ssl openssl) \ - $(use_with tcl) \ - ${uuid_config} \ - $(use_with xml libxml) \ - $(use_with xml libxslt) \ - $(use_with zlib) \ - $(use_enable nls nls "'$(l10n_get_locales)'") -} - -src_compile() { - emake - emake -C contrib -} - -src_install() { - emake DESTDIR="${D}" install - emake DESTDIR="${D}" install -C contrib - - dodoc README HISTORY doc/{TODO,bug.template} - - # man pages are already built, but if we have the target make them, - # they'll be generated from source before being installed so we - # manually install man pages. - # We use ${SLOT} instead of doman for postgresql.eselect - insinto /usr/share/postgresql-${SLOT}/man/ - doins -r doc/src/sgml/man{1,3,7} - if ! use server; then - # Remove man pages for non-existent binaries - for m in {initdb,pg_{controldata,ctl,resetxlog},post{gres,master}}; do - rm "${ED}/usr/share/postgresql-${SLOT}/man/man1/${m}.1" - done - fi - docompress /usr/share/postgresql-${SLOT}/man/man{1,3,7} - - # Create slot specific man pages - local bn f mansec slotted_name - for mansec in 1 3 7 ; do - local rel_manpath="../../postgresql-${SLOT}/man/man${mansec}" - - mkdir -p "${ED}"/usr/share/man/man${mansec} || die "making man dir" - pushd "${ED}"/usr/share/man/man${mansec} > /dev/null || die "pushd failed" - - for f in "${ED}/usr/share/postgresql-${SLOT}/man/man${mansec}"/* ; do - bn=$(basename "${f}") - slotted_name=${bn%.${mansec}}${SLOT/.}.${mansec} - case ${bn} in - TABLE.7|WITH.7) - echo ".so ${rel_manpath}/SELECT.7" > ${slotted_name} - ;; - *) - echo ".so ${rel_manpath}/${bn}" > ${slotted_name} - ;; - esac - done - - popd > /dev/null - done - - insinto /etc/postgresql-${SLOT} - newins src/bin/psql/psqlrc.sample psqlrc - - # Don't delete libpg{port,common}.a (Bug #571046). They're always - # needed by extensions utilizing PGXS. - use static-libs || \ - find "${ED}" -name '*.a' ! -name libpgport.a ! -name libpgcommon.a \ - -delete - - local f bn - for f in $(find "${ED}/usr/$(get_libdir)/postgresql-${SLOT}/bin" \ - -mindepth 1 -maxdepth 1) - do - bn=$(basename "${f}") - # Temporarily tack on tmp to workaround a file collision - # issue. This is only necessary for 9.7 and earlier. 10 never - # had this issue. - dosym "../$(get_libdir)/postgresql-${SLOT}/bin/${bn}" \ - "/usr/bin/${bn}${SLOT/.}tmp" - done - - if use doc ; then - docinto html - dodoc doc/src/sgml/html/* - - docinto sgml - dodoc doc/src/sgml/*.{sgml,dsl} - fi - - if use server; then - sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \ - "${FILESDIR}/${PN}.confd-9.3" | newconfd - ${PN}-${SLOT} - - sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \ - "${FILESDIR}/${PN}.init-9.3-r1" | newinitd - ${PN}-${SLOT} - - if use systemd; then - sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \ - "${FILESDIR}/${PN}.service-9.2" | \ - systemd_newunit - ${PN}-${SLOT}.service - systemd_newtmpfilesd "${FILESDIR}"/${PN}.tmpfiles ${PN}-${SLOT}.conf - fi - - newbin "${FILESDIR}"/${PN}-check-db-dir ${PN}-${SLOT}-check-db-dir - - use pam && pamd_mimic system-auth ${PN}-${SLOT} auth account session - - if use prefix ; then - keepdir /run/postgresql - fperms 1775 /run/postgresql - fi - fi -} - -pkg_preinst() { - # Find all of the slot-specific symlinks, if any, in /usr/bin (e.g., - # /usr/bin/psql96). They may have been created by the - # postgresql.eselect module, but they're handled within this ebuild - # now. It's alright if we momentarily delete /usr/bin/psql as it - # will be recreated by the eselect module in pkg_ppostinst(). This - # is only necessary for 9.7 and earlier. 10 and later were never - # handled in this manner. - local canonicalise - if type -p realpath > /dev/null; then - canonicalise=realpath - elif type -p readlink > /dev/null; then - canonicalise='readlink -f' - else - # can't die, subshell - die "No readlink nor realpath found, cannot canonicalise" - fi - - local l - # First remove any symlinks in /usr/bin that may have been created - # by the old eselect - for l in $(find "${ROOT}/usr/bin" -mindepth 1 -maxdepth 1 -type l) ; do - if [[ $(${canonicalise} "${l}") == *postgresql-${SLOT}* ]] ; then - rm "${l}" || ewarn "Couldn't remove ${l}" - fi - done - - # Then move the symlinks created by the ebuild to their proper place. - for l in "${ED}"/usr/bin/*tmp ; do - mv "${l}" "${l%tmp}" \ - || ewarn "Couldn't rename $(basename ${l}) to $(basename ${l%tmp})" - done -} - -pkg_postinst() { - use server && use systemd && systemd_tmpfiles_create ${PN}-${SLOT}.conf - postgresql-config update - - elog "If you need a global psqlrc-file, you can place it in:" - elog " ${EROOT}/etc/postgresql-${SLOT}/" - - if use server ; then - elog - elog "Gentoo specific documentation:" - elog "https://wiki.gentoo.org/wiki/PostgreSQL" - elog - elog "Official documentation:" - elog "https://www.postgresql.org/docs/${SLOT}/static/index.html" - elog - elog "The default location of the Unix-domain socket is:" - elog " ${EROOT}/run/postgresql/" - elog - elog "Before initializing the database, you may want to edit PG_INITDB_OPTS" - elog "so that it contains your preferred locale in:" - elog " ${EROOT}/etc/conf.d/postgresql-${SLOT}" - elog - elog "Then, execute the following command to setup the initial database" - elog "environment:" - elog " emerge --config =${CATEGORY}/${PF}" - fi -} - -pkg_prerm() { - if use server && [[ -z ${REPLACED_BY_VERSION} ]] ; then - ewarn "Have you dumped and/or migrated the ${SLOT} database cluster?" - ewarn "\thttps://wiki.gentoo.org/wiki/PostgreSQL/QuickStart#Migrating_PostgreSQL" - - ebegin "Resuming removal in 10 seconds (Control-C to cancel)" - sleep 10 - eend 0 - fi -} - -pkg_postrm() { - postgresql-config update -} - -pkg_config() { - use server || die "USE flag 'server' not enabled. Nothing to configure." - - [[ -f "${EROOT}/etc/conf.d/postgresql-${SLOT}" ]] \ - && source "${EROOT}/etc/conf.d/postgresql-${SLOT}" - [[ -z "${PGDATA}" ]] && PGDATA="${EROOT}/etc/postgresql-${SLOT}/" - [[ -z "${DATA_DIR}" ]] \ - && DATA_DIR="${EROOT}/var/lib/postgresql/${SLOT}/data" - - # environment.bz2 may not contain the same locale as the current system - # locale. Unset and source from the current system locale. - if [ -f "${EROOT}/etc/env.d/02locale" ]; then - unset LANG - unset LC_CTYPE - unset LC_NUMERIC - unset LC_TIME - unset LC_COLLATE - unset LC_MONETARY - unset LC_MESSAGES - unset LC_ALL - source "${EROOT}/etc/env.d/02locale" - [ -n "${LANG}" ] && export LANG - [ -n "${LC_CTYPE}" ] && export LC_CTYPE - [ -n "${LC_NUMERIC}" ] && export LC_NUMERIC - [ -n "${LC_TIME}" ] && export LC_TIME - [ -n "${LC_COLLATE}" ] && export LC_COLLATE - [ -n "${LC_MONETARY}" ] && export LC_MONETARY - [ -n "${LC_MESSAGES}" ] && export LC_MESSAGES - [ -n "${LC_ALL}" ] && export LC_ALL - fi - - einfo "You can modify the paths and options passed to initdb by editing:" - einfo " ${EROOT}/etc/conf.d/postgresql-${SLOT}" - einfo - einfo "Information on options that can be passed to initdb are found at:" - einfo " https://www.postgresql.org/docs/${SLOT}/static/creating-cluster.html" - einfo " https://www.postgresql.org/docs/${SLOT}/static/app-initdb.html" - einfo - einfo "PG_INITDB_OPTS is currently set to:" - if [[ -z "${PG_INITDB_OPTS}" ]] ; then - einfo " (none)" - else - einfo " ${PG_INITDB_OPTS}" - fi - einfo - einfo "Configuration files will be installed to:" - einfo " ${PGDATA}" - einfo - einfo "The database cluster will be created in:" - einfo " ${DATA_DIR}" - einfo - - ebegin "Continuing initialization in 5 seconds (Control-C to cancel)" - sleep 5 - eend 0 - - if [ -n "$(ls -A ${DATA_DIR} 2> /dev/null)" ] ; then - eerror "The given directory, '${DATA_DIR}', is not empty." - eerror "Modify DATA_DIR to point to an empty directory." - die "${DATA_DIR} is not empty." - fi - - einfo "Creating the data directory ..." - if [[ ${EUID} == 0 ]] ; then - mkdir -p "${DATA_DIR}" - chown -Rf postgres:postgres "${DATA_DIR}" - chmod 0700 "${DATA_DIR}" - fi - - einfo "Initializing the database ..." - - if [[ ${EUID} == 0 ]] ; then - su postgres -c "${EROOT}/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -D \"${DATA_DIR}\" ${PG_INITDB_OPTS}" - else - "${EROOT}"/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -U postgres -D "${DATA_DIR}" ${PG_INITDB_OPTS} - fi - - if [[ "${DATA_DIR%/}" != "${PGDATA%/}" ]] ; then - mv "${DATA_DIR%/}"/{pg_{hba,ident},postgresql}.conf "${PGDATA}" - ln -s "${PGDATA%/}"/{pg_{hba,ident},postgresql}.conf "${DATA_DIR%/}" - fi - - # unix_socket_directory has no effect in postgresql.conf as it's - # overridden in the initscript - sed '/^#unix_socket_directories/,+1d' -i "${PGDATA%/}"/postgresql.conf - - cat <<- EOF >> "${PGDATA%/}"/postgresql.conf - # This is here because of https://bugs.gentoo.org/show_bug.cgi?id=518522 - # On the off-chance that you might need to work with UTF-8 encoded - # characters in PL/Perl - plperl.on_init = 'use utf8; use re; package utf8; require "utf8_heavy.pl";' - EOF - - einfo "The autovacuum function, which was in contrib, has been moved to the main" - einfo "PostgreSQL functions starting with 8.1, and starting with 8.4 is now enabled" - einfo "by default. You can disable it in the cluster's:" - einfo " ${PGDATA%/}/postgresql.conf" - einfo - einfo "The PostgreSQL server, by default, will log events to:" - einfo " ${DATA_DIR%/}/postmaster.log" - einfo - if use prefix ; then - einfo "The location of the configuration files have moved to:" - einfo " ${PGDATA}" - einfo "To start the server:" - einfo " pg_ctl start -D ${DATA_DIR} -o '-D ${PGDATA} --data-directory=${DATA_DIR}'" - einfo "To stop:" - einfo " pg_ctl stop -D ${DATA_DIR}" - einfo - einfo "Or move the configuration files back:" - einfo "mv ${PGDATA}*.conf ${DATA_DIR}" - else - einfo "You should use the '${EROOT}/etc/init.d/postgresql-${SLOT}' script to run PostgreSQL" - einfo "instead of 'pg_ctl'." - fi -} - -src_test() { - if use server && [[ ${UID} -ne 0 ]] ; then - emake check - - einfo "If you think other tests besides the regression tests are necessary, please" - einfo "submit a bug including a patch for this ebuild to enable them." - else - use server || \ - ewarn 'Tests cannot be run without the "server" use flag enabled.' - [[ ${UID} -eq 0 ]] || \ - ewarn 'Tests cannot be run as root. Enable "userpriv" in FEATURES.' - - ewarn 'Skipping.' - fi -} diff --git a/dev-db/postgresql/postgresql-9.4.26.ebuild b/dev-db/postgresql/postgresql-9.4.26.ebuild index b89c51a5f516..32bc19186d1e 100644 --- a/dev-db/postgresql/postgresql-9.4.26.ebuild +++ b/dev-db/postgresql/postgresql-9.4.26.ebuild @@ -11,7 +11,7 @@ PLOCALES="af cs de en es fa fr hr hu it ko nb pl pt_BR ro ru sk sl sv tr zh_CN inherit flag-o-matic l10n linux-info multilib pam prefix python-single-r1 \ systemd user -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~ppc-macos ~x86-solaris" +KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~mips ppc ppc64 ~s390 sparc x86 ~ppc-macos ~x86-solaris" SLOT=$(ver_cut 1-2) diff --git a/dev-db/postgresql/postgresql-9.5.17-r1.ebuild b/dev-db/postgresql/postgresql-9.5.17-r1.ebuild deleted file mode 100644 index 2616c4614cc5..000000000000 --- a/dev-db/postgresql/postgresql-9.5.17-r1.ebuild +++ /dev/null @@ -1,485 +0,0 @@ -# Copyright 1999-2020 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -PYTHON_COMPAT=( python3_{6,7} ) - -PLOCALES="af cs de en es fa fr hr hu it ko nb pl pt_BR ro ru sk sl sv tr zh_CN - zh_TW" - -inherit flag-o-matic l10n linux-info multilib pam prefix python-single-r1 \ - systemd user - -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~ppc-macos ~x86-solaris" - -SLOT=$(ver_cut 1-2) - -SRC_URI="https://ftp.postgresql.org/pub/source/v${PV}/postgresql-${PV}.tar.bz2" - -LICENSE="POSTGRESQL GPL-2" -DESCRIPTION="PostgreSQL RDBMS" -HOMEPAGE="https://www.postgresql.org/" - -IUSE="debug doc kerberos kernel_linux ldap libressl nls pam perl - -pg_legacytimestamp python +readline selinux +server systemd ssl - static-libs tcl threads uuid xml zlib" - -REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" - -CDEPEND=" ->=app-eselect/eselect-postgresql-2.0 -sys-apps/less -virtual/libintl -kerberos? ( virtual/krb5 ) -ldap? ( net-nds/openldap ) -pam? ( sys-libs/pam ) -perl? ( >=dev-lang/perl-5.8:= ) -python? ( ${PYTHON_DEPS} ) -readline? ( sys-libs/readline:0= ) -ssl? ( - !libressl? ( >=dev-libs/openssl-0.9.6-r1:0= ) - libressl? ( dev-libs/libressl:= ) -) -tcl? ( >=dev-lang/tcl-8:0= ) -xml? ( dev-libs/libxml2 dev-libs/libxslt ) -zlib? ( sys-libs/zlib ) -" - -# uuid flags -- depend on sys-apps/util-linux for Linux libcs, or if no -# supported libc in use depend on dev-libs/ossp-uuid. For BSD systems, -# the libc includes UUID functions. -UTIL_LINUX_LIBC=( elibc_{glibc,uclibc,musl} ) -BSD_LIBC=( elibc_{Free,Net,Open}BSD ) - -nest_usedep() { - local front back - while [[ ${#} -gt 1 ]]; do - front+="${1}? ( " - back+=" )" - shift - done - echo "${front}${1}${back}" -} - -IUSE+=" ${UTIL_LINUX_LIBC[@]} ${BSD_LIBC[@]}" -CDEPEND+=" -uuid? ( - ${UTIL_LINUX_LIBC[@]/%/? ( sys-apps/util-linux )} - $(nest_usedep ${UTIL_LINUX_LIBC[@]/#/!} ${BSD_LIBC[@]/#/!} dev-libs/ossp-uuid) -)" - -DEPEND="${CDEPEND} -!!<sys-apps/sandbox-2.0 -sys-devel/bison -sys-devel/flex -nls? ( sys-devel/gettext ) -xml? ( virtual/pkgconfig ) -" - -RDEPEND="${CDEPEND} -!dev-db/postgresql-docs:${SLOT} -!dev-db/postgresql-base:${SLOT} -!dev-db/postgresql-server:${SLOT} -selinux? ( sec-policy/selinux-postgresql ) -" - -pkg_setup() { - use server && CONFIG_CHECK="~SYSVIPC" linux-info_pkg_setup - - enewgroup postgres 70 - enewuser postgres 70 /bin/sh /var/lib/postgresql postgres - - use python && python-single-r1_pkg_setup -} - -src_prepare() { - # Work around PPC{,64} compilation bug where bool is already defined - sed '/#ifndef __cplusplus/a #undef bool' -i src/include/c.h || die - - # Set proper run directory - sed "s|\(PGSOCKET_DIR\s\+\)\"/tmp\"|\1\"${EPREFIX}/run/postgresql\"|" \ - -i src/include/pg_config_manual.h || die - - # Rely on $PATH being in the proper order so that the correct - # install program is used for modules utilizing PGXS in both - # hardened and non-hardened environments. (Bug #528786) - sed 's/@install_bin@/install -c/' -i src/Makefile.global.in || die - - use server || eapply "${FILESDIR}/${PN}-9.5.5-no-server.patch" - - if use pam ; then - sed -e "s/\(#define PGSQL_PAM_SERVICE \"postgresql\)/\1-${SLOT}/" \ - -i src/backend/libpq/auth.c || \ - die 'PGSQL_PAM_SERVICE rename failed.' - fi - - eapply_user -} - -src_configure() { - case ${CHOST} in - *-darwin*|*-solaris*) - use nls && append-libs intl - ;; - esac - - export LDFLAGS_SL="${LDFLAGS}" - export LDFLAGS_EX="${LDFLAGS}" - - local PO="${EPREFIX}" - - local i uuid_config="" - if use uuid; then - for i in ${UTIL_LINUX_LIBC[@]}; do - use ${i} && uuid_config="--with-uuid=e2fs" - done - for i in ${BSD_LIBC[@]}; do - use ${i} && uuid_config="--with-uuid=bsd" - done - [[ -z $uuid_config ]] && uuid_config="--with-uuid=ossp" - fi - - econf \ - --prefix="${PO}/usr/$(get_libdir)/postgresql-${SLOT}" \ - --datadir="${PO}/usr/share/postgresql-${SLOT}" \ - --includedir="${PO}/usr/include/postgresql-${SLOT}" \ - --mandir="${PO}/usr/share/postgresql-${SLOT}/man" \ - --sysconfdir="${PO}/etc/postgresql-${SLOT}" \ - --with-system-tzdata="${PO}/usr/share/zoneinfo" \ - $(use_enable !alpha spinlocks) \ - $(use_enable !pg_legacytimestamp integer-datetimes) \ - $(use_enable debug) \ - $(use_enable threads thread-safety) \ - $(use_with kerberos gssapi) \ - $(use_with ldap) \ - $(use_with pam) \ - $(use_with perl) \ - $(use_with python) \ - $(use_with readline) \ - $(use_with ssl openssl) \ - $(use_with tcl) \ - ${uuid_config} \ - $(use_with xml libxml) \ - $(use_with xml libxslt) \ - $(use_with zlib) \ - $(use_enable nls nls "'$(l10n_get_locales)'") -} - -src_compile() { - emake - emake -C contrib -} - -src_install() { - emake DESTDIR="${D}" install - emake DESTDIR="${D}" install -C contrib - - dodoc README HISTORY doc/{TODO,bug.template} - - # man pages are already built, but if we have the target make them, - # they'll be generated from source before being installed so we - # manually install man pages. - # We use ${SLOT} instead of doman for postgresql.eselect - insinto /usr/share/postgresql-${SLOT}/man/ - doins -r doc/src/sgml/man{1,3,7} - if ! use server; then - # Remove man pages for non-existent binaries - for m in {initdb,pg_{controldata,ctl,resetxlog},post{gres,master}}; do - rm "${ED}/usr/share/postgresql-${SLOT}/man/man1/${m}.1" - done - fi - docompress /usr/share/postgresql-${SLOT}/man/man{1,3,7} - - # Create slot specific man pages - local bn f mansec slotted_name - for mansec in 1 3 7 ; do - local rel_manpath="../../postgresql-${SLOT}/man/man${mansec}" - - mkdir -p "${ED}"/usr/share/man/man${mansec} || die "making man dir" - pushd "${ED}"/usr/share/man/man${mansec} > /dev/null || die "pushd failed" - - for f in "${ED}/usr/share/postgresql-${SLOT}/man/man${mansec}"/* ; do - bn=$(basename "${f}") - slotted_name=${bn%.${mansec}}${SLOT/.}.${mansec} - case ${bn} in - TABLE.7|WITH.7) - echo ".so ${rel_manpath}/SELECT.7" > ${slotted_name} - ;; - *) - echo ".so ${rel_manpath}/${bn}" > ${slotted_name} - ;; - esac - done - - popd > /dev/null - done - - insinto /etc/postgresql-${SLOT} - newins src/bin/psql/psqlrc.sample psqlrc - - # Don't delete libpg{port,common}.a (Bug #571046). They're always - # needed by extensions utilizing PGXS. - use static-libs || \ - find "${ED}" -name '*.a' ! -name libpgport.a ! -name libpgcommon.a \ - -delete - - local f bn - for f in $(find "${ED}/usr/$(get_libdir)/postgresql-${SLOT}/bin" \ - -mindepth 1 -maxdepth 1) - do - bn=$(basename "${f}") - # Temporarily tack on tmp to workaround a file collision - # issue. This is only necessary for 9.7 and earlier. 10 never - # had this issue. - dosym "../$(get_libdir)/postgresql-${SLOT}/bin/${bn}" \ - "/usr/bin/${bn}${SLOT/.}tmp" - done - - if use doc ; then - docinto html - dodoc doc/src/sgml/html/* - - docinto sgml - dodoc doc/src/sgml/*.{sgml,dsl} - fi - - if use server; then - sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \ - "${FILESDIR}/${PN}.confd-9.3" | newconfd - ${PN}-${SLOT} - - sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \ - "${FILESDIR}/${PN}.init-9.3-r1" | newinitd - ${PN}-${SLOT} - - if use systemd; then - sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \ - "${FILESDIR}/${PN}.service-9.2" | \ - systemd_newunit - ${PN}-${SLOT}.service - systemd_newtmpfilesd "${FILESDIR}"/${PN}.tmpfiles ${PN}-${SLOT}.conf - fi - - newbin "${FILESDIR}"/${PN}-check-db-dir ${PN}-${SLOT}-check-db-dir - - use pam && pamd_mimic system-auth ${PN}-${SLOT} auth account session - - if use prefix ; then - keepdir /run/postgresql - fperms 1775 /run/postgresql - fi - fi -} - -pkg_preinst() { - # Find all of the slot-specific symlinks, if any, in /usr/bin (e.g., - # /usr/bin/psql96). They may have been created by the - # postgresql.eselect module, but they're handled within this ebuild - # now. It's alright if we momentarily delete /usr/bin/psql as it - # will be recreated by the eselect module in pkg_ppostinst(). This - # is only necessary for 9.7 and earlier. 10 and later were never - # handled in this manner. - local canonicalise - if type -p realpath > /dev/null; then - canonicalise=realpath - elif type -p readlink > /dev/null; then - canonicalise='readlink -f' - else - # can't die, subshell - die "No readlink nor realpath found, cannot canonicalise" - fi - - local l - # First remove any symlinks in /usr/bin that may have been created - # by the old eselect - for l in $(find "${ROOT}/usr/bin" -mindepth 1 -maxdepth 1 -type l) ; do - if [[ $(${canonicalise} "${l}") == *postgresql-${SLOT}* ]] ; then - rm "${l}" || ewarn "Couldn't remove ${l}" - fi - done - - # Then move the symlinks created by the ebuild to their proper place. - for l in "${ED}"/usr/bin/*tmp ; do - mv "${l}" "${l%tmp}" \ - || ewarn "Couldn't rename $(basename ${l}) to $(basename ${l%tmp})" - done -} - -pkg_postinst() { - use server && use systemd && systemd_tmpfiles_create ${PN}-${SLOT}.conf - postgresql-config update - - if use alpha && use server ; then - ewarn "PostgreSQL 9.5+ no longer has native spinlock support on Alpha platforms." - ewarn "As a result, performance will be extremely degraded." - fi - - elog "If you need a global psqlrc-file, you can place it in:" - elog " ${EROOT}/etc/postgresql-${SLOT}/" - - if use server ; then - elog - elog "Gentoo specific documentation:" - elog "https://wiki.gentoo.org/wiki/PostgreSQL" - elog - elog "Official documentation:" - elog "https://www.postgresql.org/docs/${SLOT}/static/index.html" - elog - elog "The default location of the Unix-domain socket is:" - elog " ${EROOT}/run/postgresql/" - elog - elog "Before initializing the database, you may want to edit PG_INITDB_OPTS" - elog "so that it contains your preferred locale in:" - elog " ${EROOT}/etc/conf.d/postgresql-${SLOT}" - elog - elog "Then, execute the following command to setup the initial database" - elog "environment:" - elog " emerge --config =${CATEGORY}/${PF}" - fi -} - -pkg_prerm() { - if use server && [[ -z ${REPLACED_BY_VERSION} ]] ; then - ewarn "Have you dumped and/or migrated the ${SLOT} database cluster?" - ewarn "\thttps://wiki.gentoo.org/wiki/PostgreSQL/QuickStart#Migrating_PostgreSQL" - - ebegin "Resuming removal in 10 seconds (Control-C to cancel)" - sleep 10 - eend 0 - fi -} - -pkg_postrm() { - postgresql-config update -} - -pkg_config() { - use server || die "USE flag 'server' not enabled. Nothing to configure." - - [[ -f "${EROOT}/etc/conf.d/postgresql-${SLOT}" ]] \ - && source "${EROOT}/etc/conf.d/postgresql-${SLOT}" - [[ -z "${PGDATA}" ]] && PGDATA="${EROOT}/etc/postgresql-${SLOT}/" - [[ -z "${DATA_DIR}" ]] \ - && DATA_DIR="${EROOT}/var/lib/postgresql/${SLOT}/data" - - # environment.bz2 may not contain the same locale as the current system - # locale. Unset and source from the current system locale. - if [ -f "${EROOT}/etc/env.d/02locale" ]; then - unset LANG - unset LC_CTYPE - unset LC_NUMERIC - unset LC_TIME - unset LC_COLLATE - unset LC_MONETARY - unset LC_MESSAGES - unset LC_ALL - source "${EROOT}/etc/env.d/02locale" - [ -n "${LANG}" ] && export LANG - [ -n "${LC_CTYPE}" ] && export LC_CTYPE - [ -n "${LC_NUMERIC}" ] && export LC_NUMERIC - [ -n "${LC_TIME}" ] && export LC_TIME - [ -n "${LC_COLLATE}" ] && export LC_COLLATE - [ -n "${LC_MONETARY}" ] && export LC_MONETARY - [ -n "${LC_MESSAGES}" ] && export LC_MESSAGES - [ -n "${LC_ALL}" ] && export LC_ALL - fi - - einfo "You can modify the paths and options passed to initdb by editing:" - einfo " ${EROOT}/etc/conf.d/postgresql-${SLOT}" - einfo - einfo "Information on options that can be passed to initdb are found at:" - einfo " https://www.postgresql.org/docs/${SLOT}/static/creating-cluster.html" - einfo " https://www.postgresql.org/docs/${SLOT}/static/app-initdb.html" - einfo - einfo "PG_INITDB_OPTS is currently set to:" - if [[ -z "${PG_INITDB_OPTS}" ]] ; then - einfo " (none)" - else - einfo " ${PG_INITDB_OPTS}" - fi - einfo - einfo "Configuration files will be installed to:" - einfo " ${PGDATA}" - einfo - einfo "The database cluster will be created in:" - einfo " ${DATA_DIR}" - einfo - - ebegin "Continuing initialization in 5 seconds (Control-C to cancel)" - sleep 5 - eend 0 - - if [ -n "$(ls -A ${DATA_DIR} 2> /dev/null)" ] ; then - eerror "The given directory, '${DATA_DIR}', is not empty." - eerror "Modify DATA_DIR to point to an empty directory." - die "${DATA_DIR} is not empty." - fi - - einfo "Creating the data directory ..." - if [[ ${EUID} == 0 ]] ; then - mkdir -p "${DATA_DIR}" - chown -Rf postgres:postgres "${DATA_DIR}" - chmod 0700 "${DATA_DIR}" - fi - - einfo "Initializing the database ..." - - if [[ ${EUID} == 0 ]] ; then - su postgres -c "${EROOT}/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -D \"${DATA_DIR}\" ${PG_INITDB_OPTS}" - else - "${EROOT}"/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -U postgres -D "${DATA_DIR}" ${PG_INITDB_OPTS} - fi - - if [[ "${DATA_DIR%/}" != "${PGDATA%/}" ]] ; then - mv "${DATA_DIR%/}"/{pg_{hba,ident},postgresql}.conf "${PGDATA}" - ln -s "${PGDATA%/}"/{pg_{hba,ident},postgresql}.conf "${DATA_DIR%/}" - fi - - # unix_socket_directory has no effect in postgresql.conf as it's - # overridden in the initscript - sed '/^#unix_socket_directories/,+1d' -i "${PGDATA%/}"/postgresql.conf - - cat <<- EOF >> "${PGDATA%/}"/postgresql.conf - # This is here because of https://bugs.gentoo.org/show_bug.cgi?id=518522 - # On the off-chance that you might need to work with UTF-8 encoded - # characters in PL/Perl - plperl.on_init = 'use utf8; use re; package utf8; require "utf8_heavy.pl";' - EOF - - einfo "The autovacuum function, which was in contrib, has been moved to the main" - einfo "PostgreSQL functions starting with 8.1, and starting with 8.4 is now enabled" - einfo "by default. You can disable it in the cluster's:" - einfo " ${PGDATA%/}/postgresql.conf" - einfo - einfo "The PostgreSQL server, by default, will log events to:" - einfo " ${DATA_DIR%/}/postmaster.log" - einfo - if use prefix ; then - einfo "The location of the configuration files have moved to:" - einfo " ${PGDATA}" - einfo "To start the server:" - einfo " pg_ctl start -D ${DATA_DIR} -o '-D ${PGDATA} --data-directory=${DATA_DIR}'" - einfo "To stop:" - einfo " pg_ctl stop -D ${DATA_DIR}" - einfo - einfo "Or move the configuration files back:" - einfo "mv ${PGDATA}*.conf ${DATA_DIR}" - else - einfo "You should use the '${EROOT}/etc/init.d/postgresql-${SLOT}' script to run PostgreSQL" - einfo "instead of 'pg_ctl'." - fi -} - -src_test() { - if use server && [[ ${UID} -ne 0 ]] ; then - emake check - - einfo "If you think other tests besides the regression tests are necessary, please" - einfo "submit a bug including a patch for this ebuild to enable them." - else - use server || \ - ewarn 'Tests cannot be run without the "server" use flag enabled.' - [[ ${UID} -eq 0 ]] || \ - ewarn 'Tests cannot be run as root. Enable "userpriv" in FEATURES.' - - ewarn 'Skipping.' - fi -} diff --git a/dev-db/postgresql/postgresql-9.5.17.ebuild b/dev-db/postgresql/postgresql-9.5.17.ebuild deleted file mode 100644 index a9941bde026e..000000000000 --- a/dev-db/postgresql/postgresql-9.5.17.ebuild +++ /dev/null @@ -1,480 +0,0 @@ -# Copyright 1999-2020 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI="6" - -PYTHON_COMPAT=( python3_6 ) - -PLOCALES="af cs de en es fa fr hr hu it ko nb pl pt_BR ro ru sk sl sv tr zh_CN - zh_TW" - -inherit flag-o-matic l10n linux-info multilib pam prefix python-single-r1 \ - systemd user versionator - -KEYWORDS="~alpha amd64 arm ~arm64 hppa ~ia64 ~mips ppc ppc64 ~s390 sparc x86 ~ppc-macos ~x86-solaris" - -SLOT="$(get_version_component_range 1-2)" - -SRC_URI="https://ftp.postgresql.org/pub/source/v${PV}/postgresql-${PV}.tar.bz2" - -LICENSE="POSTGRESQL GPL-2" -DESCRIPTION="PostgreSQL RDBMS" -HOMEPAGE="https://www.postgresql.org/" - -IUSE="doc kerberos kernel_linux ldap libressl nls pam perl -pg_legacytimestamp - python +readline selinux +server systemd ssl static-libs tcl threads uuid - xml zlib" - -REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" - -CDEPEND=" ->=app-eselect/eselect-postgresql-2.0 -sys-apps/less -virtual/libintl -kerberos? ( virtual/krb5 ) -ldap? ( net-nds/openldap ) -pam? ( sys-libs/pam ) -perl? ( >=dev-lang/perl-5.8:= ) -python? ( ${PYTHON_DEPS} ) -readline? ( sys-libs/readline:0= ) -ssl? ( - !libressl? ( >=dev-libs/openssl-0.9.6-r1:0= ) - libressl? ( dev-libs/libressl:= ) -) -tcl? ( >=dev-lang/tcl-8:0= ) -xml? ( dev-libs/libxml2 dev-libs/libxslt ) -zlib? ( sys-libs/zlib ) -" - -# uuid flags -- depend on sys-apps/util-linux for Linux libcs, or if no -# supported libc in use depend on dev-libs/ossp-uuid. For BSD systems, -# the libc includes UUID functions. -UTIL_LINUX_LIBC=( elibc_{glibc,uclibc,musl} ) -BSD_LIBC=( elibc_{Free,Net,Open}BSD ) - -nest_usedep() { - local front back - while [[ ${#} -gt 1 ]]; do - front+="${1}? ( " - back+=" )" - shift - done - echo "${front}${1}${back}" -} - -IUSE+=" ${UTIL_LINUX_LIBC[@]} ${BSD_LIBC[@]}" -CDEPEND+=" -uuid? ( - ${UTIL_LINUX_LIBC[@]/%/? ( sys-apps/util-linux )} - $(nest_usedep ${UTIL_LINUX_LIBC[@]/#/!} ${BSD_LIBC[@]/#/!} dev-libs/ossp-uuid) -)" - -DEPEND="${CDEPEND} -!!<sys-apps/sandbox-2.0 -sys-devel/bison -sys-devel/flex -nls? ( sys-devel/gettext ) -xml? ( virtual/pkgconfig ) -" - -RDEPEND="${CDEPEND} -!dev-db/postgresql-docs:${SLOT} -!dev-db/postgresql-base:${SLOT} -!dev-db/postgresql-server:${SLOT} -selinux? ( sec-policy/selinux-postgresql ) -" - -pkg_setup() { - use server && CONFIG_CHECK="~SYSVIPC" linux-info_pkg_setup - - enewgroup postgres 70 - enewuser postgres 70 /bin/sh /var/lib/postgresql postgres - - use python && python-single-r1_pkg_setup -} - -src_prepare() { - # Work around PPC{,64} compilation bug where bool is already defined - sed '/#ifndef __cplusplus/a #undef bool' -i src/include/c.h || die - - # Set proper run directory - sed "s|\(PGSOCKET_DIR\s\+\)\"/tmp\"|\1\"${EPREFIX}/run/postgresql\"|" \ - -i src/include/pg_config_manual.h || die - - # Rely on $PATH being in the proper order so that the correct - # install program is used for modules utilizing PGXS in both - # hardened and non-hardened environments. (Bug #528786) - sed 's/@install_bin@/install -c/' -i src/Makefile.global.in || die - - use server || eapply "${FILESDIR}/${PN}-9.5.5-no-server.patch" - - if use pam ; then - sed -e "s/\(#define PGSQL_PAM_SERVICE \"postgresql\)/\1-${SLOT}/" \ - -i src/backend/libpq/auth.c || \ - die 'PGSQL_PAM_SERVICE rename failed.' - fi - - eapply_user -} - -src_configure() { - case ${CHOST} in - *-darwin*|*-solaris*) - use nls && append-libs intl - ;; - esac - - export LDFLAGS_SL="${LDFLAGS}" - export LDFLAGS_EX="${LDFLAGS}" - - local PO="${EPREFIX}" - - local i uuid_config="" - if use uuid; then - for i in ${UTIL_LINUX_LIBC[@]}; do - use ${i} && uuid_config="--with-uuid=e2fs" - done - for i in ${BSD_LIBC[@]}; do - use ${i} && uuid_config="--with-uuid=bsd" - done - [[ -z $uuid_config ]] && uuid_config="--with-uuid=ossp" - fi - - econf \ - --prefix="${PO}/usr/$(get_libdir)/postgresql-${SLOT}" \ - --datadir="${PO}/usr/share/postgresql-${SLOT}" \ - --includedir="${PO}/usr/include/postgresql-${SLOT}" \ - --mandir="${PO}/usr/share/postgresql-${SLOT}/man" \ - --sysconfdir="${PO}/etc/postgresql-${SLOT}" \ - --with-system-tzdata="${PO}/usr/share/zoneinfo" \ - $(use_enable !alpha spinlocks) \ - $(use_enable !pg_legacytimestamp integer-datetimes) \ - $(use_enable threads thread-safety) \ - $(use_with kerberos gssapi) \ - $(use_with ldap) \ - $(use_with pam) \ - $(use_with perl) \ - $(use_with python) \ - $(use_with readline) \ - $(use_with ssl openssl) \ - $(use_with tcl) \ - ${uuid_config} \ - $(use_with xml libxml) \ - $(use_with xml libxslt) \ - $(use_with zlib) \ - $(use_enable nls nls "'$(l10n_get_locales)'") -} - -src_compile() { - emake - emake -C contrib -} - -src_install() { - emake DESTDIR="${D}" install - emake DESTDIR="${D}" install -C contrib - - dodoc README HISTORY doc/{TODO,bug.template} - - # man pages are already built, but if we have the target make them, - # they'll be generated from source before being installed so we - # manually install man pages. - # We use ${SLOT} instead of doman for postgresql.eselect - insinto /usr/share/postgresql-${SLOT}/man/ - doins -r doc/src/sgml/man{1,3,7} - if ! use server; then - # Remove man pages for non-existent binaries - for m in {initdb,pg_{controldata,ctl,resetxlog},post{gres,master}}; do - rm "${ED}/usr/share/postgresql-${SLOT}/man/man1/${m}.1" - done - fi - docompress /usr/share/postgresql-${SLOT}/man/man{1,3,7} - - # Create slot specific man pages - local bn f mansec slotted_name - for mansec in 1 3 7 ; do - local rel_manpath="../../postgresql-${SLOT}/man/man${mansec}" - - mkdir -p "${ED}"/usr/share/man/man${mansec} || die "making man dir" - pushd "${ED}"/usr/share/man/man${mansec} > /dev/null || die "pushd failed" - - for f in "${ED}/usr/share/postgresql-${SLOT}/man/man${mansec}"/* ; do - bn=$(basename "${f}") - slotted_name=${bn%.${mansec}}${SLOT/.}.${mansec} - case ${bn} in - TABLE.7|WITH.7) - echo ".so ${rel_manpath}/SELECT.7" > ${slotted_name} - ;; - *) - echo ".so ${rel_manpath}/${bn}" > ${slotted_name} - ;; - esac - done - - popd > /dev/null - done - - insinto /etc/postgresql-${SLOT} - newins src/bin/psql/psqlrc.sample psqlrc - - use static-libs || find "${ED}" -name '*.a' -delete - - local f bn - for f in $(find "${ED}/usr/$(get_libdir)/postgresql-${SLOT}/bin" \ - -mindepth 1 -maxdepth 1) - do - bn=$(basename "${f}") - # Temporarily tack on tmp to workaround a file collision - # issue. This is only necessary for 9.7 and earlier. 10 never - # had this issue. - dosym "../$(get_libdir)/postgresql-${SLOT}/bin/${bn}" \ - "/usr/bin/${bn}${SLOT/.}tmp" - done - - if use doc ; then - docinto html - dodoc doc/src/sgml/html/* - - docinto sgml - dodoc doc/src/sgml/*.{sgml,dsl} - fi - - if use server; then - sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \ - "${FILESDIR}/${PN}.confd-9.3" | newconfd - ${PN}-${SLOT} - - sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \ - "${FILESDIR}/${PN}.init-9.3-r1" | newinitd - ${PN}-${SLOT} - - if use systemd; then - sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \ - "${FILESDIR}/${PN}.service-9.2" | \ - systemd_newunit - ${PN}-${SLOT}.service - systemd_newtmpfilesd "${FILESDIR}"/${PN}.tmpfiles ${PN}-${SLOT}.conf - fi - - newbin "${FILESDIR}"/${PN}-check-db-dir ${PN}-${SLOT}-check-db-dir - - use pam && pamd_mimic system-auth ${PN}-${SLOT} auth account session - - if use prefix ; then - keepdir /run/postgresql - fperms 1775 /run/postgresql - fi - fi -} - -pkg_preinst() { - # Find all of the slot-specific symlinks, if any, in /usr/bin (e.g., - # /usr/bin/psql96). They may have been created by the - # postgresql.eselect module, but they're handled within this ebuild - # now. It's alright if we momentarily delete /usr/bin/psql as it - # will be recreated by the eselect module in pkg_ppostinst(). This - # is only necessary for 9.7 and earlier. 10 and later were never - # handled in this manner. - local canonicalise - if type -p realpath > /dev/null; then - canonicalise=realpath - elif type -p readlink > /dev/null; then - canonicalise='readlink -f' - else - # can't die, subshell - die "No readlink nor realpath found, cannot canonicalise" - fi - - local l - # First remove any symlinks in /usr/bin that may have been created - # by the old eselect - for l in $(find "${ROOT%/}/usr/bin" -mindepth 1 -maxdepth 1 -type l) ; do - if [[ $(${canonicalise} "${l}") == *postgresql-${SLOT}* ]] ; then - rm "${l}" || ewarn "Couldn't remove ${l}" - fi - done - - # Then move the symlinks created by the ebuild to their proper place. - for l in "${ED}"/usr/bin/*tmp ; do - mv "${l}" "${l%tmp}" \ - || ewarn "Couldn't rename $(basename ${l}) to $(basename ${l%tmp})" - done -} - -pkg_postinst() { - use server && use systemd && systemd_tmpfiles_create ${PN}-${SLOT}.conf - postgresql-config update - - if use alpha && use server ; then - ewarn "PostgreSQL 9.5+ no longer has native spinlock support on Alpha platforms." - ewarn "As a result, performance will be extremely degraded." - fi - - elog "If you need a global psqlrc-file, you can place it in:" - elog " ${EROOT%/}/etc/postgresql-${SLOT}/" - - if use server ; then - elog - elog "Gentoo specific documentation:" - elog "https://wiki.gentoo.org/wiki/PostgreSQL" - elog - elog "Official documentation:" - elog "https://www.postgresql.org/docs/${SLOT}/static/index.html" - elog - elog "The default location of the Unix-domain socket is:" - elog " ${EROOT%/}/run/postgresql/" - elog - elog "Before initializing the database, you may want to edit PG_INITDB_OPTS" - elog "so that it contains your preferred locale in:" - elog " ${EROOT%/}/etc/conf.d/postgresql-${SLOT}" - elog - elog "Then, execute the following command to setup the initial database" - elog "environment:" - elog " emerge --config =${CATEGORY}/${PF}" - fi -} - -pkg_prerm() { - if use server && [[ -z ${REPLACED_BY_VERSION} ]] ; then - ewarn "Have you dumped and/or migrated the ${SLOT} database cluster?" - ewarn "\thttps://wiki.gentoo.org/wiki/PostgreSQL/QuickStart#Migrating_PostgreSQL" - - ebegin "Resuming removal in 10 seconds (Control-C to cancel)" - sleep 10 - eend 0 - fi -} - -pkg_postrm() { - postgresql-config update -} - -pkg_config() { - use server || die "USE flag 'server' not enabled. Nothing to configure." - - [[ -f "${EROOT%/}/etc/conf.d/postgresql-${SLOT}" ]] \ - && source "${EROOT%/}/etc/conf.d/postgresql-${SLOT}" - [[ -z "${PGDATA}" ]] && PGDATA="${EROOT%/}/etc/postgresql-${SLOT}/" - [[ -z "${DATA_DIR}" ]] \ - && DATA_DIR="${EROOT%/}/var/lib/postgresql/${SLOT}/data" - - # environment.bz2 may not contain the same locale as the current system - # locale. Unset and source from the current system locale. - if [ -f "${EROOT%/}/etc/env.d/02locale" ]; then - unset LANG - unset LC_CTYPE - unset LC_NUMERIC - unset LC_TIME - unset LC_COLLATE - unset LC_MONETARY - unset LC_MESSAGES - unset LC_ALL - source "${EROOT%/}/etc/env.d/02locale" - [ -n "${LANG}" ] && export LANG - [ -n "${LC_CTYPE}" ] && export LC_CTYPE - [ -n "${LC_NUMERIC}" ] && export LC_NUMERIC - [ -n "${LC_TIME}" ] && export LC_TIME - [ -n "${LC_COLLATE}" ] && export LC_COLLATE - [ -n "${LC_MONETARY}" ] && export LC_MONETARY - [ -n "${LC_MESSAGES}" ] && export LC_MESSAGES - [ -n "${LC_ALL}" ] && export LC_ALL - fi - - einfo "You can modify the paths and options passed to initdb by editing:" - einfo " ${EROOT%/}/etc/conf.d/postgresql-${SLOT}" - einfo - einfo "Information on options that can be passed to initdb are found at:" - einfo " https://www.postgresql.org/docs/${SLOT}/static/creating-cluster.html" - einfo " https://www.postgresql.org/docs/${SLOT}/static/app-initdb.html" - einfo - einfo "PG_INITDB_OPTS is currently set to:" - if [[ -z "${PG_INITDB_OPTS}" ]] ; then - einfo " (none)" - else - einfo " ${PG_INITDB_OPTS}" - fi - einfo - einfo "Configuration files will be installed to:" - einfo " ${PGDATA}" - einfo - einfo "The database cluster will be created in:" - einfo " ${DATA_DIR}" - einfo - - ebegin "Continuing initialization in 5 seconds (Control-C to cancel)" - sleep 5 - eend 0 - - if [ -n "$(ls -A ${DATA_DIR} 2> /dev/null)" ] ; then - eerror "The given directory, '${DATA_DIR}', is not empty." - eerror "Modify DATA_DIR to point to an empty directory." - die "${DATA_DIR} is not empty." - fi - - einfo "Creating the data directory ..." - if [[ ${EUID} == 0 ]] ; then - mkdir -p "${DATA_DIR}" - chown -Rf postgres:postgres "${DATA_DIR}" - chmod 0700 "${DATA_DIR}" - fi - - einfo "Initializing the database ..." - - if [[ ${EUID} == 0 ]] ; then - su postgres -c "${EROOT%/}/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -D \"${DATA_DIR}\" ${PG_INITDB_OPTS}" - else - "${EROOT%/}"/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -U postgres -D "${DATA_DIR}" ${PG_INITDB_OPTS} - fi - - if [[ "${DATA_DIR%/}" != "${PGDATA%/}" ]] ; then - mv "${DATA_DIR%/}"/{pg_{hba,ident},postgresql}.conf "${PGDATA}" - ln -s "${PGDATA%/}"/{pg_{hba,ident},postgresql}.conf "${DATA_DIR%/}" - fi - - # unix_socket_directory has no effect in postgresql.conf as it's - # overridden in the initscript - sed '/^#unix_socket_directories/,+1d' -i "${PGDATA%/}"/postgresql.conf - - cat <<- EOF >> "${PGDATA%/}"/postgresql.conf - # This is here because of https://bugs.gentoo.org/show_bug.cgi?id=518522 - # On the off-chance that you might need to work with UTF-8 encoded - # characters in PL/Perl - plperl.on_init = 'use utf8; use re; package utf8; require "utf8_heavy.pl";' - EOF - - einfo "The autovacuum function, which was in contrib, has been moved to the main" - einfo "PostgreSQL functions starting with 8.1, and starting with 8.4 is now enabled" - einfo "by default. You can disable it in the cluster's:" - einfo " ${PGDATA%/}/postgresql.conf" - einfo - einfo "The PostgreSQL server, by default, will log events to:" - einfo " ${DATA_DIR%/}/postmaster.log" - einfo - if use prefix ; then - einfo "The location of the configuration files have moved to:" - einfo " ${PGDATA}" - einfo "To start the server:" - einfo " pg_ctl start -D ${DATA_DIR} -o '-D ${PGDATA} --data-directory=${DATA_DIR}'" - einfo "To stop:" - einfo " pg_ctl stop -D ${DATA_DIR}" - einfo - einfo "Or move the configuration files back:" - einfo "mv ${PGDATA}*.conf ${DATA_DIR}" - else - einfo "You should use the '${EROOT%/}/etc/init.d/postgresql-${SLOT}' script to run PostgreSQL" - einfo "instead of 'pg_ctl'." - fi -} - -src_test() { - if use server && [[ ${UID} -ne 0 ]] ; then - emake check - - einfo "If you think other tests besides the regression tests are necessary, please" - einfo "submit a bug including a patch for this ebuild to enable them." - else - use server || \ - ewarn 'Tests cannot be run without the "server" use flag enabled.' - [[ ${UID} -eq 0 ]] || \ - ewarn 'Tests cannot be run as root. Enable "userpriv" in FEATURES.' - - ewarn 'Skipping.' - fi -} diff --git a/dev-db/postgresql/postgresql-9.5.18.ebuild b/dev-db/postgresql/postgresql-9.5.18.ebuild deleted file mode 100644 index 0c24bf6a2e3f..000000000000 --- a/dev-db/postgresql/postgresql-9.5.18.ebuild +++ /dev/null @@ -1,485 +0,0 @@ -# Copyright 1999-2020 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -PYTHON_COMPAT=( python3_{6,7} ) - -PLOCALES="af cs de en es fa fr hr hu it ko nb pl pt_BR ro ru sk sl sv tr zh_CN - zh_TW" - -inherit flag-o-matic l10n linux-info multilib pam prefix python-single-r1 \ - systemd user - -KEYWORDS="~alpha amd64 arm ~arm64 hppa ~ia64 ~mips ppc ppc64 ~s390 sparc x86 ~ppc-macos ~x86-solaris" - -SLOT=$(ver_cut 1-2) - -SRC_URI="https://ftp.postgresql.org/pub/source/v${PV}/postgresql-${PV}.tar.bz2" - -LICENSE="POSTGRESQL GPL-2" -DESCRIPTION="PostgreSQL RDBMS" -HOMEPAGE="https://www.postgresql.org/" - -IUSE="debug doc kerberos kernel_linux ldap libressl nls pam perl - -pg_legacytimestamp python +readline selinux +server systemd ssl - static-libs tcl threads uuid xml zlib" - -REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" - -CDEPEND=" ->=app-eselect/eselect-postgresql-2.0 -sys-apps/less -virtual/libintl -kerberos? ( virtual/krb5 ) -ldap? ( net-nds/openldap ) -pam? ( sys-libs/pam ) -perl? ( >=dev-lang/perl-5.8:= ) -python? ( ${PYTHON_DEPS} ) -readline? ( sys-libs/readline:0= ) -ssl? ( - !libressl? ( >=dev-libs/openssl-0.9.6-r1:0= ) - libressl? ( dev-libs/libressl:= ) -) -tcl? ( >=dev-lang/tcl-8:0= ) -xml? ( dev-libs/libxml2 dev-libs/libxslt ) -zlib? ( sys-libs/zlib ) -" - -# uuid flags -- depend on sys-apps/util-linux for Linux libcs, or if no -# supported libc in use depend on dev-libs/ossp-uuid. For BSD systems, -# the libc includes UUID functions. -UTIL_LINUX_LIBC=( elibc_{glibc,uclibc,musl} ) -BSD_LIBC=( elibc_{Free,Net,Open}BSD ) - -nest_usedep() { - local front back - while [[ ${#} -gt 1 ]]; do - front+="${1}? ( " - back+=" )" - shift - done - echo "${front}${1}${back}" -} - -IUSE+=" ${UTIL_LINUX_LIBC[@]} ${BSD_LIBC[@]}" -CDEPEND+=" -uuid? ( - ${UTIL_LINUX_LIBC[@]/%/? ( sys-apps/util-linux )} - $(nest_usedep ${UTIL_LINUX_LIBC[@]/#/!} ${BSD_LIBC[@]/#/!} dev-libs/ossp-uuid) -)" - -DEPEND="${CDEPEND} -!!<sys-apps/sandbox-2.0 -sys-devel/bison -sys-devel/flex -nls? ( sys-devel/gettext ) -xml? ( virtual/pkgconfig ) -" - -RDEPEND="${CDEPEND} -!dev-db/postgresql-docs:${SLOT} -!dev-db/postgresql-base:${SLOT} -!dev-db/postgresql-server:${SLOT} -selinux? ( sec-policy/selinux-postgresql ) -" - -pkg_setup() { - use server && CONFIG_CHECK="~SYSVIPC" linux-info_pkg_setup - - enewgroup postgres 70 - enewuser postgres 70 /bin/sh /var/lib/postgresql postgres - - use python && python-single-r1_pkg_setup -} - -src_prepare() { - # Work around PPC{,64} compilation bug where bool is already defined - sed '/#ifndef __cplusplus/a #undef bool' -i src/include/c.h || die - - # Set proper run directory - sed "s|\(PGSOCKET_DIR\s\+\)\"/tmp\"|\1\"${EPREFIX}/run/postgresql\"|" \ - -i src/include/pg_config_manual.h || die - - # Rely on $PATH being in the proper order so that the correct - # install program is used for modules utilizing PGXS in both - # hardened and non-hardened environments. (Bug #528786) - sed 's/@install_bin@/install -c/' -i src/Makefile.global.in || die - - use server || eapply "${FILESDIR}/${PN}-9.5.5-no-server.patch" - - if use pam ; then - sed -e "s/\(#define PGSQL_PAM_SERVICE \"postgresql\)/\1-${SLOT}/" \ - -i src/backend/libpq/auth.c || \ - die 'PGSQL_PAM_SERVICE rename failed.' - fi - - eapply_user -} - -src_configure() { - case ${CHOST} in - *-darwin*|*-solaris*) - use nls && append-libs intl - ;; - esac - - export LDFLAGS_SL="${LDFLAGS}" - export LDFLAGS_EX="${LDFLAGS}" - - local PO="${EPREFIX}" - - local i uuid_config="" - if use uuid; then - for i in ${UTIL_LINUX_LIBC[@]}; do - use ${i} && uuid_config="--with-uuid=e2fs" - done - for i in ${BSD_LIBC[@]}; do - use ${i} && uuid_config="--with-uuid=bsd" - done - [[ -z $uuid_config ]] && uuid_config="--with-uuid=ossp" - fi - - econf \ - --prefix="${PO}/usr/$(get_libdir)/postgresql-${SLOT}" \ - --datadir="${PO}/usr/share/postgresql-${SLOT}" \ - --includedir="${PO}/usr/include/postgresql-${SLOT}" \ - --mandir="${PO}/usr/share/postgresql-${SLOT}/man" \ - --sysconfdir="${PO}/etc/postgresql-${SLOT}" \ - --with-system-tzdata="${PO}/usr/share/zoneinfo" \ - $(use_enable !alpha spinlocks) \ - $(use_enable !pg_legacytimestamp integer-datetimes) \ - $(use_enable debug) \ - $(use_enable threads thread-safety) \ - $(use_with kerberos gssapi) \ - $(use_with ldap) \ - $(use_with pam) \ - $(use_with perl) \ - $(use_with python) \ - $(use_with readline) \ - $(use_with ssl openssl) \ - $(use_with tcl) \ - ${uuid_config} \ - $(use_with xml libxml) \ - $(use_with xml libxslt) \ - $(use_with zlib) \ - $(use_enable nls nls "'$(l10n_get_locales)'") -} - -src_compile() { - emake - emake -C contrib -} - -src_install() { - emake DESTDIR="${D}" install - emake DESTDIR="${D}" install -C contrib - - dodoc README HISTORY doc/{TODO,bug.template} - - # man pages are already built, but if we have the target make them, - # they'll be generated from source before being installed so we - # manually install man pages. - # We use ${SLOT} instead of doman for postgresql.eselect - insinto /usr/share/postgresql-${SLOT}/man/ - doins -r doc/src/sgml/man{1,3,7} - if ! use server; then - # Remove man pages for non-existent binaries - for m in {initdb,pg_{controldata,ctl,resetxlog},post{gres,master}}; do - rm "${ED}/usr/share/postgresql-${SLOT}/man/man1/${m}.1" - done - fi - docompress /usr/share/postgresql-${SLOT}/man/man{1,3,7} - - # Create slot specific man pages - local bn f mansec slotted_name - for mansec in 1 3 7 ; do - local rel_manpath="../../postgresql-${SLOT}/man/man${mansec}" - - mkdir -p "${ED}"/usr/share/man/man${mansec} || die "making man dir" - pushd "${ED}"/usr/share/man/man${mansec} > /dev/null || die "pushd failed" - - for f in "${ED}/usr/share/postgresql-${SLOT}/man/man${mansec}"/* ; do - bn=$(basename "${f}") - slotted_name=${bn%.${mansec}}${SLOT/.}.${mansec} - case ${bn} in - TABLE.7|WITH.7) - echo ".so ${rel_manpath}/SELECT.7" > ${slotted_name} - ;; - *) - echo ".so ${rel_manpath}/${bn}" > ${slotted_name} - ;; - esac - done - - popd > /dev/null - done - - insinto /etc/postgresql-${SLOT} - newins src/bin/psql/psqlrc.sample psqlrc - - # Don't delete libpg{port,common}.a (Bug #571046). They're always - # needed by extensions utilizing PGXS. - use static-libs || \ - find "${ED}" -name '*.a' ! -name libpgport.a ! -name libpgcommon.a \ - -delete - - local f bn - for f in $(find "${ED}/usr/$(get_libdir)/postgresql-${SLOT}/bin" \ - -mindepth 1 -maxdepth 1) - do - bn=$(basename "${f}") - # Temporarily tack on tmp to workaround a file collision - # issue. This is only necessary for 9.7 and earlier. 10 never - # had this issue. - dosym "../$(get_libdir)/postgresql-${SLOT}/bin/${bn}" \ - "/usr/bin/${bn}${SLOT/.}tmp" - done - - if use doc ; then - docinto html - dodoc doc/src/sgml/html/* - - docinto sgml - dodoc doc/src/sgml/*.{sgml,dsl} - fi - - if use server; then - sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \ - "${FILESDIR}/${PN}.confd-9.3" | newconfd - ${PN}-${SLOT} - - sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \ - "${FILESDIR}/${PN}.init-9.3-r1" | newinitd - ${PN}-${SLOT} - - if use systemd; then - sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \ - "${FILESDIR}/${PN}.service-9.2" | \ - systemd_newunit - ${PN}-${SLOT}.service - systemd_newtmpfilesd "${FILESDIR}"/${PN}.tmpfiles ${PN}-${SLOT}.conf - fi - - newbin "${FILESDIR}"/${PN}-check-db-dir ${PN}-${SLOT}-check-db-dir - - use pam && pamd_mimic system-auth ${PN}-${SLOT} auth account session - - if use prefix ; then - keepdir /run/postgresql - fperms 1775 /run/postgresql - fi - fi -} - -pkg_preinst() { - # Find all of the slot-specific symlinks, if any, in /usr/bin (e.g., - # /usr/bin/psql96). They may have been created by the - # postgresql.eselect module, but they're handled within this ebuild - # now. It's alright if we momentarily delete /usr/bin/psql as it - # will be recreated by the eselect module in pkg_ppostinst(). This - # is only necessary for 9.7 and earlier. 10 and later were never - # handled in this manner. - local canonicalise - if type -p realpath > /dev/null; then - canonicalise=realpath - elif type -p readlink > /dev/null; then - canonicalise='readlink -f' - else - # can't die, subshell - die "No readlink nor realpath found, cannot canonicalise" - fi - - local l - # First remove any symlinks in /usr/bin that may have been created - # by the old eselect - for l in $(find "${ROOT}/usr/bin" -mindepth 1 -maxdepth 1 -type l) ; do - if [[ $(${canonicalise} "${l}") == *postgresql-${SLOT}* ]] ; then - rm "${l}" || ewarn "Couldn't remove ${l}" - fi - done - - # Then move the symlinks created by the ebuild to their proper place. - for l in "${ED}"/usr/bin/*tmp ; do - mv "${l}" "${l%tmp}" \ - || ewarn "Couldn't rename $(basename ${l}) to $(basename ${l%tmp})" - done -} - -pkg_postinst() { - use server && use systemd && systemd_tmpfiles_create ${PN}-${SLOT}.conf - postgresql-config update - - if use alpha && use server ; then - ewarn "PostgreSQL 9.5+ no longer has native spinlock support on Alpha platforms." - ewarn "As a result, performance will be extremely degraded." - fi - - elog "If you need a global psqlrc-file, you can place it in:" - elog " ${EROOT}/etc/postgresql-${SLOT}/" - - if use server ; then - elog - elog "Gentoo specific documentation:" - elog "https://wiki.gentoo.org/wiki/PostgreSQL" - elog - elog "Official documentation:" - elog "https://www.postgresql.org/docs/${SLOT}/static/index.html" - elog - elog "The default location of the Unix-domain socket is:" - elog " ${EROOT}/run/postgresql/" - elog - elog "Before initializing the database, you may want to edit PG_INITDB_OPTS" - elog "so that it contains your preferred locale in:" - elog " ${EROOT}/etc/conf.d/postgresql-${SLOT}" - elog - elog "Then, execute the following command to setup the initial database" - elog "environment:" - elog " emerge --config =${CATEGORY}/${PF}" - fi -} - -pkg_prerm() { - if use server && [[ -z ${REPLACED_BY_VERSION} ]] ; then - ewarn "Have you dumped and/or migrated the ${SLOT} database cluster?" - ewarn "\thttps://wiki.gentoo.org/wiki/PostgreSQL/QuickStart#Migrating_PostgreSQL" - - ebegin "Resuming removal in 10 seconds (Control-C to cancel)" - sleep 10 - eend 0 - fi -} - -pkg_postrm() { - postgresql-config update -} - -pkg_config() { - use server || die "USE flag 'server' not enabled. Nothing to configure." - - [[ -f "${EROOT}/etc/conf.d/postgresql-${SLOT}" ]] \ - && source "${EROOT}/etc/conf.d/postgresql-${SLOT}" - [[ -z "${PGDATA}" ]] && PGDATA="${EROOT}/etc/postgresql-${SLOT}/" - [[ -z "${DATA_DIR}" ]] \ - && DATA_DIR="${EROOT}/var/lib/postgresql/${SLOT}/data" - - # environment.bz2 may not contain the same locale as the current system - # locale. Unset and source from the current system locale. - if [ -f "${EROOT}/etc/env.d/02locale" ]; then - unset LANG - unset LC_CTYPE - unset LC_NUMERIC - unset LC_TIME - unset LC_COLLATE - unset LC_MONETARY - unset LC_MESSAGES - unset LC_ALL - source "${EROOT}/etc/env.d/02locale" - [ -n "${LANG}" ] && export LANG - [ -n "${LC_CTYPE}" ] && export LC_CTYPE - [ -n "${LC_NUMERIC}" ] && export LC_NUMERIC - [ -n "${LC_TIME}" ] && export LC_TIME - [ -n "${LC_COLLATE}" ] && export LC_COLLATE - [ -n "${LC_MONETARY}" ] && export LC_MONETARY - [ -n "${LC_MESSAGES}" ] && export LC_MESSAGES - [ -n "${LC_ALL}" ] && export LC_ALL - fi - - einfo "You can modify the paths and options passed to initdb by editing:" - einfo " ${EROOT}/etc/conf.d/postgresql-${SLOT}" - einfo - einfo "Information on options that can be passed to initdb are found at:" - einfo " https://www.postgresql.org/docs/${SLOT}/static/creating-cluster.html" - einfo " https://www.postgresql.org/docs/${SLOT}/static/app-initdb.html" - einfo - einfo "PG_INITDB_OPTS is currently set to:" - if [[ -z "${PG_INITDB_OPTS}" ]] ; then - einfo " (none)" - else - einfo " ${PG_INITDB_OPTS}" - fi - einfo - einfo "Configuration files will be installed to:" - einfo " ${PGDATA}" - einfo - einfo "The database cluster will be created in:" - einfo " ${DATA_DIR}" - einfo - - ebegin "Continuing initialization in 5 seconds (Control-C to cancel)" - sleep 5 - eend 0 - - if [ -n "$(ls -A ${DATA_DIR} 2> /dev/null)" ] ; then - eerror "The given directory, '${DATA_DIR}', is not empty." - eerror "Modify DATA_DIR to point to an empty directory." - die "${DATA_DIR} is not empty." - fi - - einfo "Creating the data directory ..." - if [[ ${EUID} == 0 ]] ; then - mkdir -p "${DATA_DIR}" - chown -Rf postgres:postgres "${DATA_DIR}" - chmod 0700 "${DATA_DIR}" - fi - - einfo "Initializing the database ..." - - if [[ ${EUID} == 0 ]] ; then - su postgres -c "${EROOT}/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -D \"${DATA_DIR}\" ${PG_INITDB_OPTS}" - else - "${EROOT}"/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -U postgres -D "${DATA_DIR}" ${PG_INITDB_OPTS} - fi - - if [[ "${DATA_DIR%/}" != "${PGDATA%/}" ]] ; then - mv "${DATA_DIR%/}"/{pg_{hba,ident},postgresql}.conf "${PGDATA}" - ln -s "${PGDATA%/}"/{pg_{hba,ident},postgresql}.conf "${DATA_DIR%/}" - fi - - # unix_socket_directory has no effect in postgresql.conf as it's - # overridden in the initscript - sed '/^#unix_socket_directories/,+1d' -i "${PGDATA%/}"/postgresql.conf - - cat <<- EOF >> "${PGDATA%/}"/postgresql.conf - # This is here because of https://bugs.gentoo.org/show_bug.cgi?id=518522 - # On the off-chance that you might need to work with UTF-8 encoded - # characters in PL/Perl - plperl.on_init = 'use utf8; use re; package utf8; require "utf8_heavy.pl";' - EOF - - einfo "The autovacuum function, which was in contrib, has been moved to the main" - einfo "PostgreSQL functions starting with 8.1, and starting with 8.4 is now enabled" - einfo "by default. You can disable it in the cluster's:" - einfo " ${PGDATA%/}/postgresql.conf" - einfo - einfo "The PostgreSQL server, by default, will log events to:" - einfo " ${DATA_DIR%/}/postmaster.log" - einfo - if use prefix ; then - einfo "The location of the configuration files have moved to:" - einfo " ${PGDATA}" - einfo "To start the server:" - einfo " pg_ctl start -D ${DATA_DIR} -o '-D ${PGDATA} --data-directory=${DATA_DIR}'" - einfo "To stop:" - einfo " pg_ctl stop -D ${DATA_DIR}" - einfo - einfo "Or move the configuration files back:" - einfo "mv ${PGDATA}*.conf ${DATA_DIR}" - else - einfo "You should use the '${EROOT}/etc/init.d/postgresql-${SLOT}' script to run PostgreSQL" - einfo "instead of 'pg_ctl'." - fi -} - -src_test() { - if use server && [[ ${UID} -ne 0 ]] ; then - emake check - - einfo "If you think other tests besides the regression tests are necessary, please" - einfo "submit a bug including a patch for this ebuild to enable them." - else - use server || \ - ewarn 'Tests cannot be run without the "server" use flag enabled.' - [[ ${UID} -eq 0 ]] || \ - ewarn 'Tests cannot be run as root. Enable "userpriv" in FEATURES.' - - ewarn 'Skipping.' - fi -} diff --git a/dev-db/postgresql/postgresql-9.5.19.ebuild b/dev-db/postgresql/postgresql-9.5.19.ebuild deleted file mode 100644 index 2616c4614cc5..000000000000 --- a/dev-db/postgresql/postgresql-9.5.19.ebuild +++ /dev/null @@ -1,485 +0,0 @@ -# Copyright 1999-2020 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -PYTHON_COMPAT=( python3_{6,7} ) - -PLOCALES="af cs de en es fa fr hr hu it ko nb pl pt_BR ro ru sk sl sv tr zh_CN - zh_TW" - -inherit flag-o-matic l10n linux-info multilib pam prefix python-single-r1 \ - systemd user - -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~ppc-macos ~x86-solaris" - -SLOT=$(ver_cut 1-2) - -SRC_URI="https://ftp.postgresql.org/pub/source/v${PV}/postgresql-${PV}.tar.bz2" - -LICENSE="POSTGRESQL GPL-2" -DESCRIPTION="PostgreSQL RDBMS" -HOMEPAGE="https://www.postgresql.org/" - -IUSE="debug doc kerberos kernel_linux ldap libressl nls pam perl - -pg_legacytimestamp python +readline selinux +server systemd ssl - static-libs tcl threads uuid xml zlib" - -REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" - -CDEPEND=" ->=app-eselect/eselect-postgresql-2.0 -sys-apps/less -virtual/libintl -kerberos? ( virtual/krb5 ) -ldap? ( net-nds/openldap ) -pam? ( sys-libs/pam ) -perl? ( >=dev-lang/perl-5.8:= ) -python? ( ${PYTHON_DEPS} ) -readline? ( sys-libs/readline:0= ) -ssl? ( - !libressl? ( >=dev-libs/openssl-0.9.6-r1:0= ) - libressl? ( dev-libs/libressl:= ) -) -tcl? ( >=dev-lang/tcl-8:0= ) -xml? ( dev-libs/libxml2 dev-libs/libxslt ) -zlib? ( sys-libs/zlib ) -" - -# uuid flags -- depend on sys-apps/util-linux for Linux libcs, or if no -# supported libc in use depend on dev-libs/ossp-uuid. For BSD systems, -# the libc includes UUID functions. -UTIL_LINUX_LIBC=( elibc_{glibc,uclibc,musl} ) -BSD_LIBC=( elibc_{Free,Net,Open}BSD ) - -nest_usedep() { - local front back - while [[ ${#} -gt 1 ]]; do - front+="${1}? ( " - back+=" )" - shift - done - echo "${front}${1}${back}" -} - -IUSE+=" ${UTIL_LINUX_LIBC[@]} ${BSD_LIBC[@]}" -CDEPEND+=" -uuid? ( - ${UTIL_LINUX_LIBC[@]/%/? ( sys-apps/util-linux )} - $(nest_usedep ${UTIL_LINUX_LIBC[@]/#/!} ${BSD_LIBC[@]/#/!} dev-libs/ossp-uuid) -)" - -DEPEND="${CDEPEND} -!!<sys-apps/sandbox-2.0 -sys-devel/bison -sys-devel/flex -nls? ( sys-devel/gettext ) -xml? ( virtual/pkgconfig ) -" - -RDEPEND="${CDEPEND} -!dev-db/postgresql-docs:${SLOT} -!dev-db/postgresql-base:${SLOT} -!dev-db/postgresql-server:${SLOT} -selinux? ( sec-policy/selinux-postgresql ) -" - -pkg_setup() { - use server && CONFIG_CHECK="~SYSVIPC" linux-info_pkg_setup - - enewgroup postgres 70 - enewuser postgres 70 /bin/sh /var/lib/postgresql postgres - - use python && python-single-r1_pkg_setup -} - -src_prepare() { - # Work around PPC{,64} compilation bug where bool is already defined - sed '/#ifndef __cplusplus/a #undef bool' -i src/include/c.h || die - - # Set proper run directory - sed "s|\(PGSOCKET_DIR\s\+\)\"/tmp\"|\1\"${EPREFIX}/run/postgresql\"|" \ - -i src/include/pg_config_manual.h || die - - # Rely on $PATH being in the proper order so that the correct - # install program is used for modules utilizing PGXS in both - # hardened and non-hardened environments. (Bug #528786) - sed 's/@install_bin@/install -c/' -i src/Makefile.global.in || die - - use server || eapply "${FILESDIR}/${PN}-9.5.5-no-server.patch" - - if use pam ; then - sed -e "s/\(#define PGSQL_PAM_SERVICE \"postgresql\)/\1-${SLOT}/" \ - -i src/backend/libpq/auth.c || \ - die 'PGSQL_PAM_SERVICE rename failed.' - fi - - eapply_user -} - -src_configure() { - case ${CHOST} in - *-darwin*|*-solaris*) - use nls && append-libs intl - ;; - esac - - export LDFLAGS_SL="${LDFLAGS}" - export LDFLAGS_EX="${LDFLAGS}" - - local PO="${EPREFIX}" - - local i uuid_config="" - if use uuid; then - for i in ${UTIL_LINUX_LIBC[@]}; do - use ${i} && uuid_config="--with-uuid=e2fs" - done - for i in ${BSD_LIBC[@]}; do - use ${i} && uuid_config="--with-uuid=bsd" - done - [[ -z $uuid_config ]] && uuid_config="--with-uuid=ossp" - fi - - econf \ - --prefix="${PO}/usr/$(get_libdir)/postgresql-${SLOT}" \ - --datadir="${PO}/usr/share/postgresql-${SLOT}" \ - --includedir="${PO}/usr/include/postgresql-${SLOT}" \ - --mandir="${PO}/usr/share/postgresql-${SLOT}/man" \ - --sysconfdir="${PO}/etc/postgresql-${SLOT}" \ - --with-system-tzdata="${PO}/usr/share/zoneinfo" \ - $(use_enable !alpha spinlocks) \ - $(use_enable !pg_legacytimestamp integer-datetimes) \ - $(use_enable debug) \ - $(use_enable threads thread-safety) \ - $(use_with kerberos gssapi) \ - $(use_with ldap) \ - $(use_with pam) \ - $(use_with perl) \ - $(use_with python) \ - $(use_with readline) \ - $(use_with ssl openssl) \ - $(use_with tcl) \ - ${uuid_config} \ - $(use_with xml libxml) \ - $(use_with xml libxslt) \ - $(use_with zlib) \ - $(use_enable nls nls "'$(l10n_get_locales)'") -} - -src_compile() { - emake - emake -C contrib -} - -src_install() { - emake DESTDIR="${D}" install - emake DESTDIR="${D}" install -C contrib - - dodoc README HISTORY doc/{TODO,bug.template} - - # man pages are already built, but if we have the target make them, - # they'll be generated from source before being installed so we - # manually install man pages. - # We use ${SLOT} instead of doman for postgresql.eselect - insinto /usr/share/postgresql-${SLOT}/man/ - doins -r doc/src/sgml/man{1,3,7} - if ! use server; then - # Remove man pages for non-existent binaries - for m in {initdb,pg_{controldata,ctl,resetxlog},post{gres,master}}; do - rm "${ED}/usr/share/postgresql-${SLOT}/man/man1/${m}.1" - done - fi - docompress /usr/share/postgresql-${SLOT}/man/man{1,3,7} - - # Create slot specific man pages - local bn f mansec slotted_name - for mansec in 1 3 7 ; do - local rel_manpath="../../postgresql-${SLOT}/man/man${mansec}" - - mkdir -p "${ED}"/usr/share/man/man${mansec} || die "making man dir" - pushd "${ED}"/usr/share/man/man${mansec} > /dev/null || die "pushd failed" - - for f in "${ED}/usr/share/postgresql-${SLOT}/man/man${mansec}"/* ; do - bn=$(basename "${f}") - slotted_name=${bn%.${mansec}}${SLOT/.}.${mansec} - case ${bn} in - TABLE.7|WITH.7) - echo ".so ${rel_manpath}/SELECT.7" > ${slotted_name} - ;; - *) - echo ".so ${rel_manpath}/${bn}" > ${slotted_name} - ;; - esac - done - - popd > /dev/null - done - - insinto /etc/postgresql-${SLOT} - newins src/bin/psql/psqlrc.sample psqlrc - - # Don't delete libpg{port,common}.a (Bug #571046). They're always - # needed by extensions utilizing PGXS. - use static-libs || \ - find "${ED}" -name '*.a' ! -name libpgport.a ! -name libpgcommon.a \ - -delete - - local f bn - for f in $(find "${ED}/usr/$(get_libdir)/postgresql-${SLOT}/bin" \ - -mindepth 1 -maxdepth 1) - do - bn=$(basename "${f}") - # Temporarily tack on tmp to workaround a file collision - # issue. This is only necessary for 9.7 and earlier. 10 never - # had this issue. - dosym "../$(get_libdir)/postgresql-${SLOT}/bin/${bn}" \ - "/usr/bin/${bn}${SLOT/.}tmp" - done - - if use doc ; then - docinto html - dodoc doc/src/sgml/html/* - - docinto sgml - dodoc doc/src/sgml/*.{sgml,dsl} - fi - - if use server; then - sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \ - "${FILESDIR}/${PN}.confd-9.3" | newconfd - ${PN}-${SLOT} - - sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \ - "${FILESDIR}/${PN}.init-9.3-r1" | newinitd - ${PN}-${SLOT} - - if use systemd; then - sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \ - "${FILESDIR}/${PN}.service-9.2" | \ - systemd_newunit - ${PN}-${SLOT}.service - systemd_newtmpfilesd "${FILESDIR}"/${PN}.tmpfiles ${PN}-${SLOT}.conf - fi - - newbin "${FILESDIR}"/${PN}-check-db-dir ${PN}-${SLOT}-check-db-dir - - use pam && pamd_mimic system-auth ${PN}-${SLOT} auth account session - - if use prefix ; then - keepdir /run/postgresql - fperms 1775 /run/postgresql - fi - fi -} - -pkg_preinst() { - # Find all of the slot-specific symlinks, if any, in /usr/bin (e.g., - # /usr/bin/psql96). They may have been created by the - # postgresql.eselect module, but they're handled within this ebuild - # now. It's alright if we momentarily delete /usr/bin/psql as it - # will be recreated by the eselect module in pkg_ppostinst(). This - # is only necessary for 9.7 and earlier. 10 and later were never - # handled in this manner. - local canonicalise - if type -p realpath > /dev/null; then - canonicalise=realpath - elif type -p readlink > /dev/null; then - canonicalise='readlink -f' - else - # can't die, subshell - die "No readlink nor realpath found, cannot canonicalise" - fi - - local l - # First remove any symlinks in /usr/bin that may have been created - # by the old eselect - for l in $(find "${ROOT}/usr/bin" -mindepth 1 -maxdepth 1 -type l) ; do - if [[ $(${canonicalise} "${l}") == *postgresql-${SLOT}* ]] ; then - rm "${l}" || ewarn "Couldn't remove ${l}" - fi - done - - # Then move the symlinks created by the ebuild to their proper place. - for l in "${ED}"/usr/bin/*tmp ; do - mv "${l}" "${l%tmp}" \ - || ewarn "Couldn't rename $(basename ${l}) to $(basename ${l%tmp})" - done -} - -pkg_postinst() { - use server && use systemd && systemd_tmpfiles_create ${PN}-${SLOT}.conf - postgresql-config update - - if use alpha && use server ; then - ewarn "PostgreSQL 9.5+ no longer has native spinlock support on Alpha platforms." - ewarn "As a result, performance will be extremely degraded." - fi - - elog "If you need a global psqlrc-file, you can place it in:" - elog " ${EROOT}/etc/postgresql-${SLOT}/" - - if use server ; then - elog - elog "Gentoo specific documentation:" - elog "https://wiki.gentoo.org/wiki/PostgreSQL" - elog - elog "Official documentation:" - elog "https://www.postgresql.org/docs/${SLOT}/static/index.html" - elog - elog "The default location of the Unix-domain socket is:" - elog " ${EROOT}/run/postgresql/" - elog - elog "Before initializing the database, you may want to edit PG_INITDB_OPTS" - elog "so that it contains your preferred locale in:" - elog " ${EROOT}/etc/conf.d/postgresql-${SLOT}" - elog - elog "Then, execute the following command to setup the initial database" - elog "environment:" - elog " emerge --config =${CATEGORY}/${PF}" - fi -} - -pkg_prerm() { - if use server && [[ -z ${REPLACED_BY_VERSION} ]] ; then - ewarn "Have you dumped and/or migrated the ${SLOT} database cluster?" - ewarn "\thttps://wiki.gentoo.org/wiki/PostgreSQL/QuickStart#Migrating_PostgreSQL" - - ebegin "Resuming removal in 10 seconds (Control-C to cancel)" - sleep 10 - eend 0 - fi -} - -pkg_postrm() { - postgresql-config update -} - -pkg_config() { - use server || die "USE flag 'server' not enabled. Nothing to configure." - - [[ -f "${EROOT}/etc/conf.d/postgresql-${SLOT}" ]] \ - && source "${EROOT}/etc/conf.d/postgresql-${SLOT}" - [[ -z "${PGDATA}" ]] && PGDATA="${EROOT}/etc/postgresql-${SLOT}/" - [[ -z "${DATA_DIR}" ]] \ - && DATA_DIR="${EROOT}/var/lib/postgresql/${SLOT}/data" - - # environment.bz2 may not contain the same locale as the current system - # locale. Unset and source from the current system locale. - if [ -f "${EROOT}/etc/env.d/02locale" ]; then - unset LANG - unset LC_CTYPE - unset LC_NUMERIC - unset LC_TIME - unset LC_COLLATE - unset LC_MONETARY - unset LC_MESSAGES - unset LC_ALL - source "${EROOT}/etc/env.d/02locale" - [ -n "${LANG}" ] && export LANG - [ -n "${LC_CTYPE}" ] && export LC_CTYPE - [ -n "${LC_NUMERIC}" ] && export LC_NUMERIC - [ -n "${LC_TIME}" ] && export LC_TIME - [ -n "${LC_COLLATE}" ] && export LC_COLLATE - [ -n "${LC_MONETARY}" ] && export LC_MONETARY - [ -n "${LC_MESSAGES}" ] && export LC_MESSAGES - [ -n "${LC_ALL}" ] && export LC_ALL - fi - - einfo "You can modify the paths and options passed to initdb by editing:" - einfo " ${EROOT}/etc/conf.d/postgresql-${SLOT}" - einfo - einfo "Information on options that can be passed to initdb are found at:" - einfo " https://www.postgresql.org/docs/${SLOT}/static/creating-cluster.html" - einfo " https://www.postgresql.org/docs/${SLOT}/static/app-initdb.html" - einfo - einfo "PG_INITDB_OPTS is currently set to:" - if [[ -z "${PG_INITDB_OPTS}" ]] ; then - einfo " (none)" - else - einfo " ${PG_INITDB_OPTS}" - fi - einfo - einfo "Configuration files will be installed to:" - einfo " ${PGDATA}" - einfo - einfo "The database cluster will be created in:" - einfo " ${DATA_DIR}" - einfo - - ebegin "Continuing initialization in 5 seconds (Control-C to cancel)" - sleep 5 - eend 0 - - if [ -n "$(ls -A ${DATA_DIR} 2> /dev/null)" ] ; then - eerror "The given directory, '${DATA_DIR}', is not empty." - eerror "Modify DATA_DIR to point to an empty directory." - die "${DATA_DIR} is not empty." - fi - - einfo "Creating the data directory ..." - if [[ ${EUID} == 0 ]] ; then - mkdir -p "${DATA_DIR}" - chown -Rf postgres:postgres "${DATA_DIR}" - chmod 0700 "${DATA_DIR}" - fi - - einfo "Initializing the database ..." - - if [[ ${EUID} == 0 ]] ; then - su postgres -c "${EROOT}/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -D \"${DATA_DIR}\" ${PG_INITDB_OPTS}" - else - "${EROOT}"/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -U postgres -D "${DATA_DIR}" ${PG_INITDB_OPTS} - fi - - if [[ "${DATA_DIR%/}" != "${PGDATA%/}" ]] ; then - mv "${DATA_DIR%/}"/{pg_{hba,ident},postgresql}.conf "${PGDATA}" - ln -s "${PGDATA%/}"/{pg_{hba,ident},postgresql}.conf "${DATA_DIR%/}" - fi - - # unix_socket_directory has no effect in postgresql.conf as it's - # overridden in the initscript - sed '/^#unix_socket_directories/,+1d' -i "${PGDATA%/}"/postgresql.conf - - cat <<- EOF >> "${PGDATA%/}"/postgresql.conf - # This is here because of https://bugs.gentoo.org/show_bug.cgi?id=518522 - # On the off-chance that you might need to work with UTF-8 encoded - # characters in PL/Perl - plperl.on_init = 'use utf8; use re; package utf8; require "utf8_heavy.pl";' - EOF - - einfo "The autovacuum function, which was in contrib, has been moved to the main" - einfo "PostgreSQL functions starting with 8.1, and starting with 8.4 is now enabled" - einfo "by default. You can disable it in the cluster's:" - einfo " ${PGDATA%/}/postgresql.conf" - einfo - einfo "The PostgreSQL server, by default, will log events to:" - einfo " ${DATA_DIR%/}/postmaster.log" - einfo - if use prefix ; then - einfo "The location of the configuration files have moved to:" - einfo " ${PGDATA}" - einfo "To start the server:" - einfo " pg_ctl start -D ${DATA_DIR} -o '-D ${PGDATA} --data-directory=${DATA_DIR}'" - einfo "To stop:" - einfo " pg_ctl stop -D ${DATA_DIR}" - einfo - einfo "Or move the configuration files back:" - einfo "mv ${PGDATA}*.conf ${DATA_DIR}" - else - einfo "You should use the '${EROOT}/etc/init.d/postgresql-${SLOT}' script to run PostgreSQL" - einfo "instead of 'pg_ctl'." - fi -} - -src_test() { - if use server && [[ ${UID} -ne 0 ]] ; then - emake check - - einfo "If you think other tests besides the regression tests are necessary, please" - einfo "submit a bug including a patch for this ebuild to enable them." - else - use server || \ - ewarn 'Tests cannot be run without the "server" use flag enabled.' - [[ ${UID} -eq 0 ]] || \ - ewarn 'Tests cannot be run as root. Enable "userpriv" in FEATURES.' - - ewarn 'Skipping.' - fi -} diff --git a/dev-db/postgresql/postgresql-9.5.20.ebuild b/dev-db/postgresql/postgresql-9.5.20.ebuild deleted file mode 100644 index 00537608230f..000000000000 --- a/dev-db/postgresql/postgresql-9.5.20.ebuild +++ /dev/null @@ -1,485 +0,0 @@ -# Copyright 1999-2020 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -PYTHON_COMPAT=( python3_{6,7} ) - -PLOCALES="af cs de en es fa fr hr hu it ko nb pl pt_BR ro ru sk sl sv tr zh_CN - zh_TW" - -inherit flag-o-matic l10n linux-info multilib pam prefix python-single-r1 \ - systemd user - -KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~mips ppc ppc64 ~s390 sparc x86 ~ppc-macos ~x86-solaris" - -SLOT=$(ver_cut 1-2) - -SRC_URI="https://ftp.postgresql.org/pub/source/v${PV}/postgresql-${PV}.tar.bz2" - -LICENSE="POSTGRESQL GPL-2" -DESCRIPTION="PostgreSQL RDBMS" -HOMEPAGE="https://www.postgresql.org/" - -IUSE="debug doc kerberos kernel_linux ldap libressl nls pam perl - -pg_legacytimestamp python +readline selinux +server systemd ssl - static-libs tcl threads uuid xml zlib" - -REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" - -CDEPEND=" ->=app-eselect/eselect-postgresql-2.0 -sys-apps/less -virtual/libintl -kerberos? ( virtual/krb5 ) -ldap? ( net-nds/openldap ) -pam? ( sys-libs/pam ) -perl? ( >=dev-lang/perl-5.8:= ) -python? ( ${PYTHON_DEPS} ) -readline? ( sys-libs/readline:0= ) -ssl? ( - !libressl? ( >=dev-libs/openssl-0.9.6-r1:0= ) - libressl? ( dev-libs/libressl:= ) -) -tcl? ( >=dev-lang/tcl-8:0= ) -xml? ( dev-libs/libxml2 dev-libs/libxslt ) -zlib? ( sys-libs/zlib ) -" - -# uuid flags -- depend on sys-apps/util-linux for Linux libcs, or if no -# supported libc in use depend on dev-libs/ossp-uuid. For BSD systems, -# the libc includes UUID functions. -UTIL_LINUX_LIBC=( elibc_{glibc,uclibc,musl} ) -BSD_LIBC=( elibc_{Free,Net,Open}BSD ) - -nest_usedep() { - local front back - while [[ ${#} -gt 1 ]]; do - front+="${1}? ( " - back+=" )" - shift - done - echo "${front}${1}${back}" -} - -IUSE+=" ${UTIL_LINUX_LIBC[@]} ${BSD_LIBC[@]}" -CDEPEND+=" -uuid? ( - ${UTIL_LINUX_LIBC[@]/%/? ( sys-apps/util-linux )} - $(nest_usedep ${UTIL_LINUX_LIBC[@]/#/!} ${BSD_LIBC[@]/#/!} dev-libs/ossp-uuid) -)" - -DEPEND="${CDEPEND} -!!<sys-apps/sandbox-2.0 -sys-devel/bison -sys-devel/flex -nls? ( sys-devel/gettext ) -xml? ( virtual/pkgconfig ) -" - -RDEPEND="${CDEPEND} -!dev-db/postgresql-docs:${SLOT} -!dev-db/postgresql-base:${SLOT} -!dev-db/postgresql-server:${SLOT} -selinux? ( sec-policy/selinux-postgresql ) -" - -pkg_setup() { - use server && CONFIG_CHECK="~SYSVIPC" linux-info_pkg_setup - - enewgroup postgres 70 - enewuser postgres 70 /bin/sh /var/lib/postgresql postgres - - use python && python-single-r1_pkg_setup -} - -src_prepare() { - # Work around PPC{,64} compilation bug where bool is already defined - sed '/#ifndef __cplusplus/a #undef bool' -i src/include/c.h || die - - # Set proper run directory - sed "s|\(PGSOCKET_DIR\s\+\)\"/tmp\"|\1\"${EPREFIX}/run/postgresql\"|" \ - -i src/include/pg_config_manual.h || die - - # Rely on $PATH being in the proper order so that the correct - # install program is used for modules utilizing PGXS in both - # hardened and non-hardened environments. (Bug #528786) - sed 's/@install_bin@/install -c/' -i src/Makefile.global.in || die - - use server || eapply "${FILESDIR}/${PN}-9.5.5-no-server.patch" - - if use pam ; then - sed -e "s/\(#define PGSQL_PAM_SERVICE \"postgresql\)/\1-${SLOT}/" \ - -i src/backend/libpq/auth.c || \ - die 'PGSQL_PAM_SERVICE rename failed.' - fi - - eapply_user -} - -src_configure() { - case ${CHOST} in - *-darwin*|*-solaris*) - use nls && append-libs intl - ;; - esac - - export LDFLAGS_SL="${LDFLAGS}" - export LDFLAGS_EX="${LDFLAGS}" - - local PO="${EPREFIX}" - - local i uuid_config="" - if use uuid; then - for i in ${UTIL_LINUX_LIBC[@]}; do - use ${i} && uuid_config="--with-uuid=e2fs" - done - for i in ${BSD_LIBC[@]}; do - use ${i} && uuid_config="--with-uuid=bsd" - done - [[ -z $uuid_config ]] && uuid_config="--with-uuid=ossp" - fi - - econf \ - --prefix="${PO}/usr/$(get_libdir)/postgresql-${SLOT}" \ - --datadir="${PO}/usr/share/postgresql-${SLOT}" \ - --includedir="${PO}/usr/include/postgresql-${SLOT}" \ - --mandir="${PO}/usr/share/postgresql-${SLOT}/man" \ - --sysconfdir="${PO}/etc/postgresql-${SLOT}" \ - --with-system-tzdata="${PO}/usr/share/zoneinfo" \ - $(use_enable !alpha spinlocks) \ - $(use_enable !pg_legacytimestamp integer-datetimes) \ - $(use_enable debug) \ - $(use_enable threads thread-safety) \ - $(use_with kerberos gssapi) \ - $(use_with ldap) \ - $(use_with pam) \ - $(use_with perl) \ - $(use_with python) \ - $(use_with readline) \ - $(use_with ssl openssl) \ - $(use_with tcl) \ - ${uuid_config} \ - $(use_with xml libxml) \ - $(use_with xml libxslt) \ - $(use_with zlib) \ - $(use_enable nls nls "'$(l10n_get_locales)'") -} - -src_compile() { - emake - emake -C contrib -} - -src_install() { - emake DESTDIR="${D}" install - emake DESTDIR="${D}" install -C contrib - - dodoc README HISTORY doc/{TODO,bug.template} - - # man pages are already built, but if we have the target make them, - # they'll be generated from source before being installed so we - # manually install man pages. - # We use ${SLOT} instead of doman for postgresql.eselect - insinto /usr/share/postgresql-${SLOT}/man/ - doins -r doc/src/sgml/man{1,3,7} - if ! use server; then - # Remove man pages for non-existent binaries - for m in {initdb,pg_{controldata,ctl,resetxlog},post{gres,master}}; do - rm "${ED}/usr/share/postgresql-${SLOT}/man/man1/${m}.1" - done - fi - docompress /usr/share/postgresql-${SLOT}/man/man{1,3,7} - - # Create slot specific man pages - local bn f mansec slotted_name - for mansec in 1 3 7 ; do - local rel_manpath="../../postgresql-${SLOT}/man/man${mansec}" - - mkdir -p "${ED}"/usr/share/man/man${mansec} || die "making man dir" - pushd "${ED}"/usr/share/man/man${mansec} > /dev/null || die "pushd failed" - - for f in "${ED}/usr/share/postgresql-${SLOT}/man/man${mansec}"/* ; do - bn=$(basename "${f}") - slotted_name=${bn%.${mansec}}${SLOT/.}.${mansec} - case ${bn} in - TABLE.7|WITH.7) - echo ".so ${rel_manpath}/SELECT.7" > ${slotted_name} - ;; - *) - echo ".so ${rel_manpath}/${bn}" > ${slotted_name} - ;; - esac - done - - popd > /dev/null - done - - insinto /etc/postgresql-${SLOT} - newins src/bin/psql/psqlrc.sample psqlrc - - # Don't delete libpg{port,common}.a (Bug #571046). They're always - # needed by extensions utilizing PGXS. - use static-libs || \ - find "${ED}" -name '*.a' ! -name libpgport.a ! -name libpgcommon.a \ - -delete - - local f bn - for f in $(find "${ED}/usr/$(get_libdir)/postgresql-${SLOT}/bin" \ - -mindepth 1 -maxdepth 1) - do - bn=$(basename "${f}") - # Temporarily tack on tmp to workaround a file collision - # issue. This is only necessary for 9.7 and earlier. 10 never - # had this issue. - dosym "../$(get_libdir)/postgresql-${SLOT}/bin/${bn}" \ - "/usr/bin/${bn}${SLOT/.}tmp" - done - - if use doc ; then - docinto html - dodoc doc/src/sgml/html/* - - docinto sgml - dodoc doc/src/sgml/*.{sgml,dsl} - fi - - if use server; then - sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \ - "${FILESDIR}/${PN}.confd-9.3" | newconfd - ${PN}-${SLOT} - - sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \ - "${FILESDIR}/${PN}.init-9.3-r1" | newinitd - ${PN}-${SLOT} - - if use systemd; then - sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \ - "${FILESDIR}/${PN}.service-9.2" | \ - systemd_newunit - ${PN}-${SLOT}.service - systemd_newtmpfilesd "${FILESDIR}"/${PN}.tmpfiles ${PN}-${SLOT}.conf - fi - - newbin "${FILESDIR}"/${PN}-check-db-dir ${PN}-${SLOT}-check-db-dir - - use pam && pamd_mimic system-auth ${PN}-${SLOT} auth account session - - if use prefix ; then - keepdir /run/postgresql - fperms 1775 /run/postgresql - fi - fi -} - -pkg_preinst() { - # Find all of the slot-specific symlinks, if any, in /usr/bin (e.g., - # /usr/bin/psql96). They may have been created by the - # postgresql.eselect module, but they're handled within this ebuild - # now. It's alright if we momentarily delete /usr/bin/psql as it - # will be recreated by the eselect module in pkg_ppostinst(). This - # is only necessary for 9.7 and earlier. 10 and later were never - # handled in this manner. - local canonicalise - if type -p realpath > /dev/null; then - canonicalise=realpath - elif type -p readlink > /dev/null; then - canonicalise='readlink -f' - else - # can't die, subshell - die "No readlink nor realpath found, cannot canonicalise" - fi - - local l - # First remove any symlinks in /usr/bin that may have been created - # by the old eselect - for l in $(find "${ROOT}/usr/bin" -mindepth 1 -maxdepth 1 -type l) ; do - if [[ $(${canonicalise} "${l}") == *postgresql-${SLOT}* ]] ; then - rm "${l}" || ewarn "Couldn't remove ${l}" - fi - done - - # Then move the symlinks created by the ebuild to their proper place. - for l in "${ED}"/usr/bin/*tmp ; do - mv "${l}" "${l%tmp}" \ - || ewarn "Couldn't rename $(basename ${l}) to $(basename ${l%tmp})" - done -} - -pkg_postinst() { - use server && use systemd && systemd_tmpfiles_create ${PN}-${SLOT}.conf - postgresql-config update - - if use alpha && use server ; then - ewarn "PostgreSQL 9.5+ no longer has native spinlock support on Alpha platforms." - ewarn "As a result, performance will be extremely degraded." - fi - - elog "If you need a global psqlrc-file, you can place it in:" - elog " ${EROOT}/etc/postgresql-${SLOT}/" - - if use server ; then - elog - elog "Gentoo specific documentation:" - elog "https://wiki.gentoo.org/wiki/PostgreSQL" - elog - elog "Official documentation:" - elog "https://www.postgresql.org/docs/${SLOT}/static/index.html" - elog - elog "The default location of the Unix-domain socket is:" - elog " ${EROOT}/run/postgresql/" - elog - elog "Before initializing the database, you may want to edit PG_INITDB_OPTS" - elog "so that it contains your preferred locale in:" - elog " ${EROOT}/etc/conf.d/postgresql-${SLOT}" - elog - elog "Then, execute the following command to setup the initial database" - elog "environment:" - elog " emerge --config =${CATEGORY}/${PF}" - fi -} - -pkg_prerm() { - if use server && [[ -z ${REPLACED_BY_VERSION} ]] ; then - ewarn "Have you dumped and/or migrated the ${SLOT} database cluster?" - ewarn "\thttps://wiki.gentoo.org/wiki/PostgreSQL/QuickStart#Migrating_PostgreSQL" - - ebegin "Resuming removal in 10 seconds (Control-C to cancel)" - sleep 10 - eend 0 - fi -} - -pkg_postrm() { - postgresql-config update -} - -pkg_config() { - use server || die "USE flag 'server' not enabled. Nothing to configure." - - [[ -f "${EROOT}/etc/conf.d/postgresql-${SLOT}" ]] \ - && source "${EROOT}/etc/conf.d/postgresql-${SLOT}" - [[ -z "${PGDATA}" ]] && PGDATA="${EROOT}/etc/postgresql-${SLOT}/" - [[ -z "${DATA_DIR}" ]] \ - && DATA_DIR="${EROOT}/var/lib/postgresql/${SLOT}/data" - - # environment.bz2 may not contain the same locale as the current system - # locale. Unset and source from the current system locale. - if [ -f "${EROOT}/etc/env.d/02locale" ]; then - unset LANG - unset LC_CTYPE - unset LC_NUMERIC - unset LC_TIME - unset LC_COLLATE - unset LC_MONETARY - unset LC_MESSAGES - unset LC_ALL - source "${EROOT}/etc/env.d/02locale" - [ -n "${LANG}" ] && export LANG - [ -n "${LC_CTYPE}" ] && export LC_CTYPE - [ -n "${LC_NUMERIC}" ] && export LC_NUMERIC - [ -n "${LC_TIME}" ] && export LC_TIME - [ -n "${LC_COLLATE}" ] && export LC_COLLATE - [ -n "${LC_MONETARY}" ] && export LC_MONETARY - [ -n "${LC_MESSAGES}" ] && export LC_MESSAGES - [ -n "${LC_ALL}" ] && export LC_ALL - fi - - einfo "You can modify the paths and options passed to initdb by editing:" - einfo " ${EROOT}/etc/conf.d/postgresql-${SLOT}" - einfo - einfo "Information on options that can be passed to initdb are found at:" - einfo " https://www.postgresql.org/docs/${SLOT}/static/creating-cluster.html" - einfo " https://www.postgresql.org/docs/${SLOT}/static/app-initdb.html" - einfo - einfo "PG_INITDB_OPTS is currently set to:" - if [[ -z "${PG_INITDB_OPTS}" ]] ; then - einfo " (none)" - else - einfo " ${PG_INITDB_OPTS}" - fi - einfo - einfo "Configuration files will be installed to:" - einfo " ${PGDATA}" - einfo - einfo "The database cluster will be created in:" - einfo " ${DATA_DIR}" - einfo - - ebegin "Continuing initialization in 5 seconds (Control-C to cancel)" - sleep 5 - eend 0 - - if [ -n "$(ls -A ${DATA_DIR} 2> /dev/null)" ] ; then - eerror "The given directory, '${DATA_DIR}', is not empty." - eerror "Modify DATA_DIR to point to an empty directory." - die "${DATA_DIR} is not empty." - fi - - einfo "Creating the data directory ..." - if [[ ${EUID} == 0 ]] ; then - mkdir -p "${DATA_DIR}" - chown -Rf postgres:postgres "${DATA_DIR}" - chmod 0700 "${DATA_DIR}" - fi - - einfo "Initializing the database ..." - - if [[ ${EUID} == 0 ]] ; then - su postgres -c "${EROOT}/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -D \"${DATA_DIR}\" ${PG_INITDB_OPTS}" - else - "${EROOT}"/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -U postgres -D "${DATA_DIR}" ${PG_INITDB_OPTS} - fi - - if [[ "${DATA_DIR%/}" != "${PGDATA%/}" ]] ; then - mv "${DATA_DIR%/}"/{pg_{hba,ident},postgresql}.conf "${PGDATA}" - ln -s "${PGDATA%/}"/{pg_{hba,ident},postgresql}.conf "${DATA_DIR%/}" - fi - - # unix_socket_directory has no effect in postgresql.conf as it's - # overridden in the initscript - sed '/^#unix_socket_directories/,+1d' -i "${PGDATA%/}"/postgresql.conf - - cat <<- EOF >> "${PGDATA%/}"/postgresql.conf - # This is here because of https://bugs.gentoo.org/show_bug.cgi?id=518522 - # On the off-chance that you might need to work with UTF-8 encoded - # characters in PL/Perl - plperl.on_init = 'use utf8; use re; package utf8; require "utf8_heavy.pl";' - EOF - - einfo "The autovacuum function, which was in contrib, has been moved to the main" - einfo "PostgreSQL functions starting with 8.1, and starting with 8.4 is now enabled" - einfo "by default. You can disable it in the cluster's:" - einfo " ${PGDATA%/}/postgresql.conf" - einfo - einfo "The PostgreSQL server, by default, will log events to:" - einfo " ${DATA_DIR%/}/postmaster.log" - einfo - if use prefix ; then - einfo "The location of the configuration files have moved to:" - einfo " ${PGDATA}" - einfo "To start the server:" - einfo " pg_ctl start -D ${DATA_DIR} -o '-D ${PGDATA} --data-directory=${DATA_DIR}'" - einfo "To stop:" - einfo " pg_ctl stop -D ${DATA_DIR}" - einfo - einfo "Or move the configuration files back:" - einfo "mv ${PGDATA}*.conf ${DATA_DIR}" - else - einfo "You should use the '${EROOT}/etc/init.d/postgresql-${SLOT}' script to run PostgreSQL" - einfo "instead of 'pg_ctl'." - fi -} - -src_test() { - if use server && [[ ${UID} -ne 0 ]] ; then - emake check - - einfo "If you think other tests besides the regression tests are necessary, please" - einfo "submit a bug including a patch for this ebuild to enable them." - else - use server || \ - ewarn 'Tests cannot be run without the "server" use flag enabled.' - [[ ${UID} -eq 0 ]] || \ - ewarn 'Tests cannot be run as root. Enable "userpriv" in FEATURES.' - - ewarn 'Skipping.' - fi -} diff --git a/dev-db/postgresql/postgresql-9.5.21.ebuild b/dev-db/postgresql/postgresql-9.5.21.ebuild index 2616c4614cc5..00537608230f 100644 --- a/dev-db/postgresql/postgresql-9.5.21.ebuild +++ b/dev-db/postgresql/postgresql-9.5.21.ebuild @@ -11,7 +11,7 @@ PLOCALES="af cs de en es fa fr hr hu it ko nb pl pt_BR ro ru sk sl sv tr zh_CN inherit flag-o-matic l10n linux-info multilib pam prefix python-single-r1 \ systemd user -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~ppc-macos ~x86-solaris" +KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~mips ppc ppc64 ~s390 sparc x86 ~ppc-macos ~x86-solaris" SLOT=$(ver_cut 1-2) diff --git a/dev-db/postgresql/postgresql-9.6.13-r1.ebuild b/dev-db/postgresql/postgresql-9.6.13-r1.ebuild deleted file mode 100644 index 800e0b2727ef..000000000000 --- a/dev-db/postgresql/postgresql-9.6.13-r1.ebuild +++ /dev/null @@ -1,490 +0,0 @@ -# Copyright 1999-2020 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -PYTHON_COMPAT=( python3_{6,7} ) - -PLOCALES="af cs de en es fa fr hr hu it ko nb pl pt_BR ro ru sk sl sv tr zh_CN - zh_TW" - -inherit flag-o-matic l10n linux-info multilib pam prefix python-single-r1 \ - systemd user - -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" - -SLOT=$(ver_cut 1-2) - -MY_PV=${PV/_/} -S="${WORKDIR}/${PN}-${MY_PV}" - -SRC_URI="https://ftp.postgresql.org/pub/source/v${MY_PV}/postgresql-${MY_PV}.tar.bz2" - -LICENSE="POSTGRESQL GPL-2" -DESCRIPTION="PostgreSQL RDBMS" -HOMEPAGE="https://www.postgresql.org/" - -IUSE="debug doc kerberos kernel_linux ldap libressl nls pam perl - -pg_legacytimestamp python +readline selinux +server systemd ssl - static-libs tcl threads uuid xml zlib" - -REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" - -CDEPEND=" ->=app-eselect/eselect-postgresql-2.0 -sys-apps/less -virtual/libintl -kerberos? ( virtual/krb5 ) -ldap? ( net-nds/openldap ) -pam? ( sys-libs/pam ) -perl? ( >=dev-lang/perl-5.8:= ) -python? ( ${PYTHON_DEPS} ) -readline? ( sys-libs/readline:0= ) -ssl? ( - !libressl? ( >=dev-libs/openssl-0.9.6-r1:0= ) - libressl? ( dev-libs/libressl:= ) -) -server? ( systemd? ( sys-apps/systemd ) ) -tcl? ( >=dev-lang/tcl-8:0= ) -xml? ( dev-libs/libxml2 dev-libs/libxslt ) -zlib? ( sys-libs/zlib ) -" - -# uuid flags -- depend on sys-apps/util-linux for Linux libcs, or if no -# supported libc in use depend on dev-libs/ossp-uuid. For BSD systems, -# the libc includes UUID functions. -UTIL_LINUX_LIBC=( elibc_{glibc,uclibc,musl} ) -BSD_LIBC=( elibc_{Free,Net,Open}BSD ) - -nest_usedep() { - local front back - while [[ ${#} -gt 1 ]]; do - front+="${1}? ( " - back+=" )" - shift - done - echo "${front}${1}${back}" -} - -IUSE+=" ${UTIL_LINUX_LIBC[@]} ${BSD_LIBC[@]}" -CDEPEND+=" -uuid? ( - ${UTIL_LINUX_LIBC[@]/%/? ( sys-apps/util-linux )} - $(nest_usedep ${UTIL_LINUX_LIBC[@]/#/!} ${BSD_LIBC[@]/#/!} dev-libs/ossp-uuid) -)" - -DEPEND="${CDEPEND} -!!<sys-apps/sandbox-2.0 -sys-devel/bison -sys-devel/flex -nls? ( sys-devel/gettext ) -xml? ( virtual/pkgconfig ) -" - -RDEPEND="${CDEPEND} -!dev-db/postgresql-docs:${SLOT} -!dev-db/postgresql-base:${SLOT} -!dev-db/postgresql-server:${SLOT} -selinux? ( sec-policy/selinux-postgresql ) -" - -pkg_setup() { - use server && CONFIG_CHECK="~SYSVIPC" linux-info_pkg_setup - - enewgroup postgres 70 - enewuser postgres 70 /bin/sh /var/lib/postgresql postgres - - use python && python-single-r1_pkg_setup -} - -src_prepare() { - # Work around PPC{,64} compilation bug where bool is already defined - sed '/#ifndef __cplusplus/a #undef bool' -i src/include/c.h || die - - # Set proper run directory - sed "s|\(PGSOCKET_DIR\s\+\)\"/tmp\"|\1\"${EPREFIX}/run/postgresql\"|" \ - -i src/include/pg_config_manual.h || die - - # Rely on $PATH being in the proper order so that the correct - # install program is used for modules utilizing PGXS in both - # hardened and non-hardened environments. (Bug #528786) - sed 's/@install_bin@/install -c/' -i src/Makefile.global.in || die - - use server || eapply "${FILESDIR}/${PN}-${SLOT}.3-no-server.patch" - - if use pam ; then - sed -e "s/\(#define PGSQL_PAM_SERVICE \"postgresql\)/\1-${SLOT}/" \ - -i src/backend/libpq/auth.c || \ - die 'PGSQL_PAM_SERVICE rename failed.' - fi - - eapply_user -} - -src_configure() { - case ${CHOST} in - *-darwin*|*-solaris*) - use nls && append-libs intl - ;; - esac - - export LDFLAGS_SL="${LDFLAGS}" - export LDFLAGS_EX="${LDFLAGS}" - - local PO="${EPREFIX}" - - local i uuid_config="" - if use uuid; then - for i in ${UTIL_LINUX_LIBC[@]}; do - use ${i} && uuid_config="--with-uuid=e2fs" - done - for i in ${BSD_LIBC[@]}; do - use ${i} && uuid_config="--with-uuid=bsd" - done - [[ -z $uuid_config ]] && uuid_config="--with-uuid=ossp" - fi - - econf \ - --prefix="${PO}/usr/$(get_libdir)/postgresql-${SLOT}" \ - --datadir="${PO}/usr/share/postgresql-${SLOT}" \ - --includedir="${PO}/usr/include/postgresql-${SLOT}" \ - --mandir="${PO}/usr/share/postgresql-${SLOT}/man" \ - --sysconfdir="${PO}/etc/postgresql-${SLOT}" \ - --with-system-tzdata="${PO}/usr/share/zoneinfo" \ - $(use_enable !alpha spinlocks) \ - $(use_enable !pg_legacytimestamp integer-datetimes) \ - $(use_enable debug) \ - $(use_enable threads thread-safety) \ - $(use_with kerberos gssapi) \ - $(use_with ldap) \ - $(use_with pam) \ - $(use_with perl) \ - $(use_with python) \ - $(use_with readline) \ - $(use_with ssl openssl) \ - $(usex server "$(use_with systemd)" '--without-systemd') \ - $(use_with tcl) \ - ${uuid_config} \ - $(use_with xml libxml) \ - $(use_with xml libxslt) \ - $(use_with zlib) \ - $(use_enable nls nls "'$(l10n_get_locales)'") -} - -src_compile() { - emake - emake -C contrib -} - -src_install() { - emake DESTDIR="${D}" install - emake DESTDIR="${D}" install -C contrib - - dodoc README HISTORY doc/{TODO,bug.template} - - # man pages are already built, but if we have the target make them, - # they'll be generated from source before being installed so we - # manually install man pages. - # We use ${SLOT} instead of doman for postgresql.eselect - insinto /usr/share/postgresql-${SLOT}/man/ - doins -r doc/src/sgml/man{1,3,7} - if ! use server; then - # Remove man pages for non-existent binaries - for m in {initdb,pg_{controldata,ctl,resetxlog},post{gres,master}}; do - rm "${ED}/usr/share/postgresql-${SLOT}/man/man1/${m}.1" - done - fi - docompress /usr/share/postgresql-${SLOT}/man/man{1,3,7} - - # Create slot specific man pages - local bn f mansec slotted_name - for mansec in 1 3 7 ; do - local rel_manpath="../../postgresql-${SLOT}/man/man${mansec}" - - mkdir -p "${ED}"/usr/share/man/man${mansec} || die "making man dir" - pushd "${ED}"/usr/share/man/man${mansec} > /dev/null || die "pushd failed" - - for f in "${ED}/usr/share/postgresql-${SLOT}/man/man${mansec}"/* ; do - bn=$(basename "${f}") - slotted_name=${bn%.${mansec}}${SLOT/.}.${mansec} - case ${bn} in - TABLE.7|WITH.7) - echo ".so ${rel_manpath}/SELECT.7" > ${slotted_name} - ;; - *) - echo ".so ${rel_manpath}/${bn}" > ${slotted_name} - ;; - esac - done - - popd > /dev/null - done - - insinto /etc/postgresql-${SLOT} - newins src/bin/psql/psqlrc.sample psqlrc - - # Don't delete libpg{port,common}.a (Bug #571046). They're always - # needed by extensions utilizing PGXS. - use static-libs || \ - find "${ED}" -name '*.a' ! -name libpgport.a ! -name libpgcommon.a \ - -delete - - local f bn - for f in $(find "${ED}/usr/$(get_libdir)/postgresql-${SLOT}/bin" \ - -mindepth 1 -maxdepth 1) - do - bn=$(basename "${f}") - # Temporarily tack on tmp to workaround a file collision - # issue. This is only necessary for 9.7 and earlier. 10 never - # had this issue. - dosym "../$(get_libdir)/postgresql-${SLOT}/bin/${bn}" \ - "/usr/bin/${bn}${SLOT/.}tmp" - done - - if use doc ; then - docinto html - dodoc doc/src/sgml/html/* - - docinto sgml - dodoc doc/src/sgml/*.{sgml,dsl} - fi - - if use server; then - sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \ - "${FILESDIR}/${PN}.confd-9.3" | newconfd - ${PN}-${SLOT} - - sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \ - "${FILESDIR}/${PN}.init-9.3-r1" | newinitd - ${PN}-${SLOT} - - if use systemd; then - sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \ - "${FILESDIR}/${PN}.service-9.6-r1" | \ - systemd_newunit - ${PN}-${SLOT}.service - systemd_newtmpfilesd "${FILESDIR}"/${PN}.tmpfiles ${PN}-${SLOT}.conf - fi - - newbin "${FILESDIR}"/${PN}-check-db-dir ${PN}-${SLOT}-check-db-dir - - use pam && pamd_mimic system-auth ${PN}-${SLOT} auth account session - - if use prefix ; then - keepdir /run/postgresql - fperms 1775 /run/postgresql - fi - fi -} - -pkg_preinst() { - # Find all of the slot-specific symlinks, if any, in /usr/bin (e.g., - # /usr/bin/psql96). They may have been created by the - # postgresql.eselect module, but they're handled within this ebuild - # now. It's alright if we momentarily delete /usr/bin/psql as it - # will be recreated by the eselect module in pkg_ppostinst(). This - # is only necessary for 9.7 and earlier. 10 and later were never - # handled in this manner. - local canonicalise - if type -p realpath > /dev/null; then - canonicalise=realpath - elif type -p readlink > /dev/null; then - canonicalise='readlink -f' - else - # can't die, subshell - die "No readlink nor realpath found, cannot canonicalise" - fi - - local l - # First remove any symlinks in /usr/bin that may have been created - # by the old eselect - for l in $(find "${ROOT}/usr/bin" -mindepth 1 -maxdepth 1 -type l) ; do - if [[ $(${canonicalise} "${l}") == *postgresql-${SLOT}* ]] ; then - rm "${l}" || ewarn "Couldn't remove ${l}" - fi - done - - # Then move the symlinks created by the ebuild to their proper place. - for l in "${ED}"/usr/bin/*tmp ; do - mv "${l}" "${l%tmp}" \ - || ewarn "Couldn't rename $(basename ${l}) to $(basename ${l%tmp})" - done -} - -pkg_postinst() { - use server && use systemd && systemd_tmpfiles_create ${PN}-${SLOT}.conf - postgresql-config update - - elog "If you need a global psqlrc-file, you can place it in:" - elog " ${EROOT}/etc/postgresql-${SLOT}/" - - if use server ; then - elog - elog "Gentoo specific documentation:" - elog "https://wiki.gentoo.org/wiki/PostgreSQL" - elog - elog "Official documentation:" - elog "https://www.postgresql.org/docs/${SLOT}/static/index.html" - elog - elog "The default location of the Unix-domain socket is:" - elog " ${EROOT}/run/postgresql/" - elog - elog "Before initializing the database, you may want to edit PG_INITDB_OPTS" - elog "so that it contains your preferred locale in:" - elog " ${EROOT}/etc/conf.d/postgresql-${SLOT}" - elog - elog "Then, execute the following command to setup the initial database" - elog "environment:" - elog " emerge --config =${CATEGORY}/${PF}" - fi -} - -pkg_prerm() { - if use server && [[ -z ${REPLACED_BY_VERSION} ]] ; then - ewarn "Have you dumped and/or migrated the ${SLOT} database cluster?" - ewarn "\thttps://wiki.gentoo.org/wiki/PostgreSQL/QuickStart#Migrating_PostgreSQL" - - ebegin "Resuming removal in 10 seconds (Control-C to cancel)" - sleep 10 - eend 0 - fi -} - -pkg_postrm() { - postgresql-config update -} - -pkg_config() { - use server || die "USE flag 'server' not enabled. Nothing to configure." - - [[ -f "${EROOT}/etc/conf.d/postgresql-${SLOT}" ]] \ - && source "${EROOT}/etc/conf.d/postgresql-${SLOT}" - [[ -z "${PGDATA}" ]] && PGDATA="${EROOT}/etc/postgresql-${SLOT}/" - [[ -z "${DATA_DIR}" ]] \ - && DATA_DIR="${EROOT}/var/lib/postgresql/${SLOT}/data" - - # environment.bz2 may not contain the same locale as the current system - # locale. Unset and source from the current system locale. - if [ -f "${EROOT}/etc/env.d/02locale" ]; then - unset LANG - unset LC_CTYPE - unset LC_NUMERIC - unset LC_TIME - unset LC_COLLATE - unset LC_MONETARY - unset LC_MESSAGES - unset LC_ALL - source "${EROOT}/etc/env.d/02locale" - [ -n "${LANG}" ] && export LANG - [ -n "${LC_CTYPE}" ] && export LC_CTYPE - [ -n "${LC_NUMERIC}" ] && export LC_NUMERIC - [ -n "${LC_TIME}" ] && export LC_TIME - [ -n "${LC_COLLATE}" ] && export LC_COLLATE - [ -n "${LC_MONETARY}" ] && export LC_MONETARY - [ -n "${LC_MESSAGES}" ] && export LC_MESSAGES - [ -n "${LC_ALL}" ] && export LC_ALL - fi - - einfo "You can modify the paths and options passed to initdb by editing:" - einfo " ${EROOT}/etc/conf.d/postgresql-${SLOT}" - einfo - einfo "Information on options that can be passed to initdb are found at:" - einfo " https://www.postgresql.org/docs/${SLOT}/static/creating-cluster.html" - einfo " https://www.postgresql.org/docs/${SLOT}/static/app-initdb.html" - einfo - einfo "PG_INITDB_OPTS is currently set to:" - if [[ -z "${PG_INITDB_OPTS}" ]] ; then - einfo " (none)" - else - einfo " ${PG_INITDB_OPTS}" - fi - einfo - einfo "Configuration files will be installed to:" - einfo " ${PGDATA}" - einfo - einfo "The database cluster will be created in:" - einfo " ${DATA_DIR}" - einfo - - ebegin "Continuing initialization in 5 seconds (Control-C to cancel)" - sleep 5 - eend 0 - - if [ -n "$(ls -A ${DATA_DIR} 2> /dev/null)" ] ; then - eerror "The given directory, '${DATA_DIR}', is not empty." - eerror "Modify DATA_DIR to point to an empty directory." - die "${DATA_DIR} is not empty." - fi - - einfo "Creating the data directory ..." - if [[ ${EUID} == 0 ]] ; then - mkdir -p "${DATA_DIR}" - chown -Rf postgres:postgres "${DATA_DIR}" - chmod 0700 "${DATA_DIR}" - fi - - einfo "Initializing the database ..." - - if [[ ${EUID} == 0 ]] ; then - su postgres -c "${EROOT}/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -D \"${DATA_DIR}\" ${PG_INITDB_OPTS}" - else - "${EROOT}"/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -U postgres -D "${DATA_DIR}" ${PG_INITDB_OPTS} - fi - - if [[ "${DATA_DIR%/}" != "${PGDATA%/}" ]] ; then - mv "${DATA_DIR%/}"/{pg_{hba,ident},postgresql}.conf "${PGDATA}" - ln -s "${PGDATA%/}"/{pg_{hba,ident},postgresql}.conf "${DATA_DIR%/}" - fi - - # unix_socket_directory has no effect in postgresql.conf as it's - # overridden in the initscript - sed '/^#unix_socket_directories/,+1d' -i "${PGDATA%/}"/postgresql.conf - - cat <<- EOF >> "${PGDATA%/}"/postgresql.conf - # This is here because of https://bugs.gentoo.org/show_bug.cgi?id=518522 - # On the off-chance that you might need to work with UTF-8 encoded - # characters in PL/Perl - plperl.on_init = 'use utf8; use re; package utf8; require "utf8_heavy.pl";' - EOF - - einfo "The autovacuum function, which was in contrib, has been moved to the main" - einfo "PostgreSQL functions starting with 8.1, and starting with 8.4 is now enabled" - einfo "by default. You can disable it in the cluster's:" - einfo " ${PGDATA%/}/postgresql.conf" - einfo - if ! use systemd; then - einfo "The PostgreSQL server, by default, will log events to:" - einfo " ${DATA_DIR%/}/postmaster.log" - einfo - fi - if use prefix ; then - einfo "The location of the configuration files have moved to:" - einfo " ${PGDATA}" - einfo "To start the server:" - einfo " pg_ctl start -D ${DATA_DIR} -o '-D ${PGDATA} --data-directory=${DATA_DIR}'" - einfo "To stop:" - einfo " pg_ctl stop -D ${DATA_DIR}" - einfo - einfo "Or move the configuration files back:" - einfo "mv ${PGDATA}*.conf ${DATA_DIR}" - elif use systemd; then - einfo "You should use the 'postgresql-${SLOT}.service' unit to run PostgreSQL" - einfo "instead of 'pg_ctl'." - else - einfo "You should use the '${EROOT}/etc/init.d/postgresql-${SLOT}' script to run PostgreSQL" - einfo "instead of 'pg_ctl'." - fi -} - -src_test() { - if use server && [[ ${UID} -ne 0 ]] ; then - emake check - - einfo "If you think other tests besides the regression tests are necessary, please" - einfo "submit a bug including a patch for this ebuild to enable them." - else - use server || \ - ewarn 'Tests cannot be run without the "server" use flag enabled.' - [[ ${UID} -eq 0 ]] || \ - ewarn 'Tests cannot be run as root. Enable "userpriv" in FEATURES.' - - ewarn 'Skipping.' - fi -} diff --git a/dev-db/postgresql/postgresql-9.6.13.ebuild b/dev-db/postgresql/postgresql-9.6.13.ebuild deleted file mode 100644 index a47ab55a70b8..000000000000 --- a/dev-db/postgresql/postgresql-9.6.13.ebuild +++ /dev/null @@ -1,485 +0,0 @@ -# Copyright 1999-2020 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI="6" - -PYTHON_COMPAT=( python3_6 ) - -PLOCALES="af cs de en es fa fr hr hu it ko nb pl pt_BR ro ru sk sl sv tr zh_CN - zh_TW" - -inherit flag-o-matic l10n linux-info multilib pam prefix python-single-r1 \ - systemd user versionator - -KEYWORDS="~alpha amd64 arm ~arm64 hppa ~ia64 ~mips ppc ppc64 ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" - -SLOT="$(get_version_component_range 1-2)" - -MY_PV=${PV/_/} -S="${WORKDIR}/${PN}-${MY_PV}" - -SRC_URI="https://ftp.postgresql.org/pub/source/v${MY_PV}/postgresql-${MY_PV}.tar.bz2" - -LICENSE="POSTGRESQL GPL-2" -DESCRIPTION="PostgreSQL RDBMS" -HOMEPAGE="https://www.postgresql.org/" - -IUSE="doc kerberos kernel_linux ldap libressl nls pam perl -pg_legacytimestamp - python +readline selinux +server systemd ssl static-libs tcl threads uuid - xml zlib" - -REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" - -CDEPEND=" ->=app-eselect/eselect-postgresql-2.0 -sys-apps/less -virtual/libintl -kerberos? ( virtual/krb5 ) -ldap? ( net-nds/openldap ) -pam? ( sys-libs/pam ) -perl? ( >=dev-lang/perl-5.8:= ) -python? ( ${PYTHON_DEPS} ) -readline? ( sys-libs/readline:0= ) -ssl? ( - !libressl? ( >=dev-libs/openssl-0.9.6-r1:0= ) - libressl? ( dev-libs/libressl:= ) -) -server? ( systemd? ( sys-apps/systemd ) ) -tcl? ( >=dev-lang/tcl-8:0= ) -xml? ( dev-libs/libxml2 dev-libs/libxslt ) -zlib? ( sys-libs/zlib ) -" - -# uuid flags -- depend on sys-apps/util-linux for Linux libcs, or if no -# supported libc in use depend on dev-libs/ossp-uuid. For BSD systems, -# the libc includes UUID functions. -UTIL_LINUX_LIBC=( elibc_{glibc,uclibc,musl} ) -BSD_LIBC=( elibc_{Free,Net,Open}BSD ) - -nest_usedep() { - local front back - while [[ ${#} -gt 1 ]]; do - front+="${1}? ( " - back+=" )" - shift - done - echo "${front}${1}${back}" -} - -IUSE+=" ${UTIL_LINUX_LIBC[@]} ${BSD_LIBC[@]}" -CDEPEND+=" -uuid? ( - ${UTIL_LINUX_LIBC[@]/%/? ( sys-apps/util-linux )} - $(nest_usedep ${UTIL_LINUX_LIBC[@]/#/!} ${BSD_LIBC[@]/#/!} dev-libs/ossp-uuid) -)" - -DEPEND="${CDEPEND} -!!<sys-apps/sandbox-2.0 -sys-devel/bison -sys-devel/flex -nls? ( sys-devel/gettext ) -xml? ( virtual/pkgconfig ) -" - -RDEPEND="${CDEPEND} -!dev-db/postgresql-docs:${SLOT} -!dev-db/postgresql-base:${SLOT} -!dev-db/postgresql-server:${SLOT} -selinux? ( sec-policy/selinux-postgresql ) -" - -pkg_setup() { - use server && CONFIG_CHECK="~SYSVIPC" linux-info_pkg_setup - - enewgroup postgres 70 - enewuser postgres 70 /bin/sh /var/lib/postgresql postgres - - use python && python-single-r1_pkg_setup -} - -src_prepare() { - # Work around PPC{,64} compilation bug where bool is already defined - sed '/#ifndef __cplusplus/a #undef bool' -i src/include/c.h || die - - # Set proper run directory - sed "s|\(PGSOCKET_DIR\s\+\)\"/tmp\"|\1\"${EPREFIX}/run/postgresql\"|" \ - -i src/include/pg_config_manual.h || die - - # Rely on $PATH being in the proper order so that the correct - # install program is used for modules utilizing PGXS in both - # hardened and non-hardened environments. (Bug #528786) - sed 's/@install_bin@/install -c/' -i src/Makefile.global.in || die - - use server || eapply "${FILESDIR}/${PN}-${SLOT}.3-no-server.patch" - - if use pam ; then - sed -e "s/\(#define PGSQL_PAM_SERVICE \"postgresql\)/\1-${SLOT}/" \ - -i src/backend/libpq/auth.c || \ - die 'PGSQL_PAM_SERVICE rename failed.' - fi - - eapply_user -} - -src_configure() { - case ${CHOST} in - *-darwin*|*-solaris*) - use nls && append-libs intl - ;; - esac - - export LDFLAGS_SL="${LDFLAGS}" - export LDFLAGS_EX="${LDFLAGS}" - - local PO="${EPREFIX}" - - local i uuid_config="" - if use uuid; then - for i in ${UTIL_LINUX_LIBC[@]}; do - use ${i} && uuid_config="--with-uuid=e2fs" - done - for i in ${BSD_LIBC[@]}; do - use ${i} && uuid_config="--with-uuid=bsd" - done - [[ -z $uuid_config ]] && uuid_config="--with-uuid=ossp" - fi - - econf \ - --prefix="${PO}/usr/$(get_libdir)/postgresql-${SLOT}" \ - --datadir="${PO}/usr/share/postgresql-${SLOT}" \ - --includedir="${PO}/usr/include/postgresql-${SLOT}" \ - --mandir="${PO}/usr/share/postgresql-${SLOT}/man" \ - --sysconfdir="${PO}/etc/postgresql-${SLOT}" \ - --with-system-tzdata="${PO}/usr/share/zoneinfo" \ - $(use_enable !alpha spinlocks) \ - $(use_enable !pg_legacytimestamp integer-datetimes) \ - $(use_enable threads thread-safety) \ - $(use_with kerberos gssapi) \ - $(use_with ldap) \ - $(use_with pam) \ - $(use_with perl) \ - $(use_with python) \ - $(use_with readline) \ - $(use_with ssl openssl) \ - $(usex server "$(use_with systemd)" '--without-systemd') \ - $(use_with tcl) \ - ${uuid_config} \ - $(use_with xml libxml) \ - $(use_with xml libxslt) \ - $(use_with zlib) \ - $(use_enable nls nls "'$(l10n_get_locales)'") -} - -src_compile() { - emake - emake -C contrib -} - -src_install() { - emake DESTDIR="${D}" install - emake DESTDIR="${D}" install -C contrib - - dodoc README HISTORY doc/{TODO,bug.template} - - # man pages are already built, but if we have the target make them, - # they'll be generated from source before being installed so we - # manually install man pages. - # We use ${SLOT} instead of doman for postgresql.eselect - insinto /usr/share/postgresql-${SLOT}/man/ - doins -r doc/src/sgml/man{1,3,7} - if ! use server; then - # Remove man pages for non-existent binaries - for m in {initdb,pg_{controldata,ctl,resetxlog},post{gres,master}}; do - rm "${ED}/usr/share/postgresql-${SLOT}/man/man1/${m}.1" - done - fi - docompress /usr/share/postgresql-${SLOT}/man/man{1,3,7} - - # Create slot specific man pages - local bn f mansec slotted_name - for mansec in 1 3 7 ; do - local rel_manpath="../../postgresql-${SLOT}/man/man${mansec}" - - mkdir -p "${ED}"/usr/share/man/man${mansec} || die "making man dir" - pushd "${ED}"/usr/share/man/man${mansec} > /dev/null || die "pushd failed" - - for f in "${ED}/usr/share/postgresql-${SLOT}/man/man${mansec}"/* ; do - bn=$(basename "${f}") - slotted_name=${bn%.${mansec}}${SLOT/.}.${mansec} - case ${bn} in - TABLE.7|WITH.7) - echo ".so ${rel_manpath}/SELECT.7" > ${slotted_name} - ;; - *) - echo ".so ${rel_manpath}/${bn}" > ${slotted_name} - ;; - esac - done - - popd > /dev/null - done - - insinto /etc/postgresql-${SLOT} - newins src/bin/psql/psqlrc.sample psqlrc - - use static-libs || find "${ED}" -name '*.a' -delete - - local f bn - for f in $(find "${ED}/usr/$(get_libdir)/postgresql-${SLOT}/bin" \ - -mindepth 1 -maxdepth 1) - do - bn=$(basename "${f}") - # Temporarily tack on tmp to workaround a file collision - # issue. This is only necessary for 9.7 and earlier. 10 never - # had this issue. - dosym "../$(get_libdir)/postgresql-${SLOT}/bin/${bn}" \ - "/usr/bin/${bn}${SLOT/.}tmp" - done - - if use doc ; then - docinto html - dodoc doc/src/sgml/html/* - - docinto sgml - dodoc doc/src/sgml/*.{sgml,dsl} - fi - - if use server; then - sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \ - "${FILESDIR}/${PN}.confd-9.3" | newconfd - ${PN}-${SLOT} - - sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \ - "${FILESDIR}/${PN}.init-9.3-r1" | newinitd - ${PN}-${SLOT} - - if use systemd; then - sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \ - "${FILESDIR}/${PN}.service-9.6-r1" | \ - systemd_newunit - ${PN}-${SLOT}.service - systemd_newtmpfilesd "${FILESDIR}"/${PN}.tmpfiles ${PN}-${SLOT}.conf - fi - - newbin "${FILESDIR}"/${PN}-check-db-dir ${PN}-${SLOT}-check-db-dir - - use pam && pamd_mimic system-auth ${PN}-${SLOT} auth account session - - if use prefix ; then - keepdir /run/postgresql - fperms 1775 /run/postgresql - fi - fi -} - -pkg_preinst() { - # Find all of the slot-specific symlinks, if any, in /usr/bin (e.g., - # /usr/bin/psql96). They may have been created by the - # postgresql.eselect module, but they're handled within this ebuild - # now. It's alright if we momentarily delete /usr/bin/psql as it - # will be recreated by the eselect module in pkg_ppostinst(). This - # is only necessary for 9.7 and earlier. 10 and later were never - # handled in this manner. - local canonicalise - if type -p realpath > /dev/null; then - canonicalise=realpath - elif type -p readlink > /dev/null; then - canonicalise='readlink -f' - else - # can't die, subshell - die "No readlink nor realpath found, cannot canonicalise" - fi - - local l - # First remove any symlinks in /usr/bin that may have been created - # by the old eselect - for l in $(find "${ROOT%/}/usr/bin" -mindepth 1 -maxdepth 1 -type l) ; do - if [[ $(${canonicalise} "${l}") == *postgresql-${SLOT}* ]] ; then - rm "${l}" || ewarn "Couldn't remove ${l}" - fi - done - - # Then move the symlinks created by the ebuild to their proper place. - for l in "${ED}"/usr/bin/*tmp ; do - mv "${l}" "${l%tmp}" \ - || ewarn "Couldn't rename $(basename ${l}) to $(basename ${l%tmp})" - done -} - -pkg_postinst() { - use server && use systemd && systemd_tmpfiles_create ${PN}-${SLOT}.conf - postgresql-config update - - elog "If you need a global psqlrc-file, you can place it in:" - elog " ${EROOT%/}/etc/postgresql-${SLOT}/" - - if use server ; then - elog - elog "Gentoo specific documentation:" - elog "https://wiki.gentoo.org/wiki/PostgreSQL" - elog - elog "Official documentation:" - elog "https://www.postgresql.org/docs/${SLOT}/static/index.html" - elog - elog "The default location of the Unix-domain socket is:" - elog " ${EROOT%/}/run/postgresql/" - elog - elog "Before initializing the database, you may want to edit PG_INITDB_OPTS" - elog "so that it contains your preferred locale in:" - elog " ${EROOT%/}/etc/conf.d/postgresql-${SLOT}" - elog - elog "Then, execute the following command to setup the initial database" - elog "environment:" - elog " emerge --config =${CATEGORY}/${PF}" - fi -} - -pkg_prerm() { - if use server && [[ -z ${REPLACED_BY_VERSION} ]] ; then - ewarn "Have you dumped and/or migrated the ${SLOT} database cluster?" - ewarn "\thttps://wiki.gentoo.org/wiki/PostgreSQL/QuickStart#Migrating_PostgreSQL" - - ebegin "Resuming removal in 10 seconds (Control-C to cancel)" - sleep 10 - eend 0 - fi -} - -pkg_postrm() { - postgresql-config update -} - -pkg_config() { - use server || die "USE flag 'server' not enabled. Nothing to configure." - - [[ -f "${EROOT%/}/etc/conf.d/postgresql-${SLOT}" ]] \ - && source "${EROOT%/}/etc/conf.d/postgresql-${SLOT}" - [[ -z "${PGDATA}" ]] && PGDATA="${EROOT%/}/etc/postgresql-${SLOT}/" - [[ -z "${DATA_DIR}" ]] \ - && DATA_DIR="${EROOT%/}/var/lib/postgresql/${SLOT}/data" - - # environment.bz2 may not contain the same locale as the current system - # locale. Unset and source from the current system locale. - if [ -f "${EROOT%/}/etc/env.d/02locale" ]; then - unset LANG - unset LC_CTYPE - unset LC_NUMERIC - unset LC_TIME - unset LC_COLLATE - unset LC_MONETARY - unset LC_MESSAGES - unset LC_ALL - source "${EROOT%/}/etc/env.d/02locale" - [ -n "${LANG}" ] && export LANG - [ -n "${LC_CTYPE}" ] && export LC_CTYPE - [ -n "${LC_NUMERIC}" ] && export LC_NUMERIC - [ -n "${LC_TIME}" ] && export LC_TIME - [ -n "${LC_COLLATE}" ] && export LC_COLLATE - [ -n "${LC_MONETARY}" ] && export LC_MONETARY - [ -n "${LC_MESSAGES}" ] && export LC_MESSAGES - [ -n "${LC_ALL}" ] && export LC_ALL - fi - - einfo "You can modify the paths and options passed to initdb by editing:" - einfo " ${EROOT%/}/etc/conf.d/postgresql-${SLOT}" - einfo - einfo "Information on options that can be passed to initdb are found at:" - einfo " https://www.postgresql.org/docs/${SLOT}/static/creating-cluster.html" - einfo " https://www.postgresql.org/docs/${SLOT}/static/app-initdb.html" - einfo - einfo "PG_INITDB_OPTS is currently set to:" - if [[ -z "${PG_INITDB_OPTS}" ]] ; then - einfo " (none)" - else - einfo " ${PG_INITDB_OPTS}" - fi - einfo - einfo "Configuration files will be installed to:" - einfo " ${PGDATA}" - einfo - einfo "The database cluster will be created in:" - einfo " ${DATA_DIR}" - einfo - - ebegin "Continuing initialization in 5 seconds (Control-C to cancel)" - sleep 5 - eend 0 - - if [ -n "$(ls -A ${DATA_DIR} 2> /dev/null)" ] ; then - eerror "The given directory, '${DATA_DIR}', is not empty." - eerror "Modify DATA_DIR to point to an empty directory." - die "${DATA_DIR} is not empty." - fi - - einfo "Creating the data directory ..." - if [[ ${EUID} == 0 ]] ; then - mkdir -p "${DATA_DIR}" - chown -Rf postgres:postgres "${DATA_DIR}" - chmod 0700 "${DATA_DIR}" - fi - - einfo "Initializing the database ..." - - if [[ ${EUID} == 0 ]] ; then - su postgres -c "${EROOT%/}/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -D \"${DATA_DIR}\" ${PG_INITDB_OPTS}" - else - "${EROOT%/}"/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -U postgres -D "${DATA_DIR}" ${PG_INITDB_OPTS} - fi - - if [[ "${DATA_DIR%/}" != "${PGDATA%/}" ]] ; then - mv "${DATA_DIR%/}"/{pg_{hba,ident},postgresql}.conf "${PGDATA}" - ln -s "${PGDATA%/}"/{pg_{hba,ident},postgresql}.conf "${DATA_DIR%/}" - fi - - # unix_socket_directory has no effect in postgresql.conf as it's - # overridden in the initscript - sed '/^#unix_socket_directories/,+1d' -i "${PGDATA%/}"/postgresql.conf - - cat <<- EOF >> "${PGDATA%/}"/postgresql.conf - # This is here because of https://bugs.gentoo.org/show_bug.cgi?id=518522 - # On the off-chance that you might need to work with UTF-8 encoded - # characters in PL/Perl - plperl.on_init = 'use utf8; use re; package utf8; require "utf8_heavy.pl";' - EOF - - einfo "The autovacuum function, which was in contrib, has been moved to the main" - einfo "PostgreSQL functions starting with 8.1, and starting with 8.4 is now enabled" - einfo "by default. You can disable it in the cluster's:" - einfo " ${PGDATA%/}/postgresql.conf" - einfo - if ! use systemd; then - einfo "The PostgreSQL server, by default, will log events to:" - einfo " ${DATA_DIR%/}/postmaster.log" - einfo - fi - if use prefix ; then - einfo "The location of the configuration files have moved to:" - einfo " ${PGDATA}" - einfo "To start the server:" - einfo " pg_ctl start -D ${DATA_DIR} -o '-D ${PGDATA} --data-directory=${DATA_DIR}'" - einfo "To stop:" - einfo " pg_ctl stop -D ${DATA_DIR}" - einfo - einfo "Or move the configuration files back:" - einfo "mv ${PGDATA}*.conf ${DATA_DIR}" - elif use systemd; then - einfo "You should use the 'postgresql-${SLOT}.service' unit to run PostgreSQL" - einfo "instead of 'pg_ctl'." - else - einfo "You should use the '${EROOT%/}/etc/init.d/postgresql-${SLOT}' script to run PostgreSQL" - einfo "instead of 'pg_ctl'." - fi -} - -src_test() { - if use server && [[ ${UID} -ne 0 ]] ; then - emake check - - einfo "If you think other tests besides the regression tests are necessary, please" - einfo "submit a bug including a patch for this ebuild to enable them." - else - use server || \ - ewarn 'Tests cannot be run without the "server" use flag enabled.' - [[ ${UID} -eq 0 ]] || \ - ewarn 'Tests cannot be run as root. Enable "userpriv" in FEATURES.' - - ewarn 'Skipping.' - fi -} diff --git a/dev-db/postgresql/postgresql-9.6.14.ebuild b/dev-db/postgresql/postgresql-9.6.14.ebuild deleted file mode 100644 index 6d2db4730007..000000000000 --- a/dev-db/postgresql/postgresql-9.6.14.ebuild +++ /dev/null @@ -1,490 +0,0 @@ -# Copyright 1999-2020 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -PYTHON_COMPAT=( python3_{6,7} ) - -PLOCALES="af cs de en es fa fr hr hu it ko nb pl pt_BR ro ru sk sl sv tr zh_CN - zh_TW" - -inherit flag-o-matic l10n linux-info multilib pam prefix python-single-r1 \ - systemd user - -KEYWORDS="~alpha amd64 arm ~arm64 hppa ~ia64 ~mips ppc ppc64 ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" - -SLOT=$(ver_cut 1-2) - -MY_PV=${PV/_/} -S="${WORKDIR}/${PN}-${MY_PV}" - -SRC_URI="https://ftp.postgresql.org/pub/source/v${MY_PV}/postgresql-${MY_PV}.tar.bz2" - -LICENSE="POSTGRESQL GPL-2" -DESCRIPTION="PostgreSQL RDBMS" -HOMEPAGE="https://www.postgresql.org/" - -IUSE="debug doc kerberos kernel_linux ldap libressl nls pam perl - -pg_legacytimestamp python +readline selinux +server systemd ssl - static-libs tcl threads uuid xml zlib" - -REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" - -CDEPEND=" ->=app-eselect/eselect-postgresql-2.0 -sys-apps/less -virtual/libintl -kerberos? ( virtual/krb5 ) -ldap? ( net-nds/openldap ) -pam? ( sys-libs/pam ) -perl? ( >=dev-lang/perl-5.8:= ) -python? ( ${PYTHON_DEPS} ) -readline? ( sys-libs/readline:0= ) -ssl? ( - !libressl? ( >=dev-libs/openssl-0.9.6-r1:0= ) - libressl? ( dev-libs/libressl:= ) -) -server? ( systemd? ( sys-apps/systemd ) ) -tcl? ( >=dev-lang/tcl-8:0= ) -xml? ( dev-libs/libxml2 dev-libs/libxslt ) -zlib? ( sys-libs/zlib ) -" - -# uuid flags -- depend on sys-apps/util-linux for Linux libcs, or if no -# supported libc in use depend on dev-libs/ossp-uuid. For BSD systems, -# the libc includes UUID functions. -UTIL_LINUX_LIBC=( elibc_{glibc,uclibc,musl} ) -BSD_LIBC=( elibc_{Free,Net,Open}BSD ) - -nest_usedep() { - local front back - while [[ ${#} -gt 1 ]]; do - front+="${1}? ( " - back+=" )" - shift - done - echo "${front}${1}${back}" -} - -IUSE+=" ${UTIL_LINUX_LIBC[@]} ${BSD_LIBC[@]}" -CDEPEND+=" -uuid? ( - ${UTIL_LINUX_LIBC[@]/%/? ( sys-apps/util-linux )} - $(nest_usedep ${UTIL_LINUX_LIBC[@]/#/!} ${BSD_LIBC[@]/#/!} dev-libs/ossp-uuid) -)" - -DEPEND="${CDEPEND} -!!<sys-apps/sandbox-2.0 -sys-devel/bison -sys-devel/flex -nls? ( sys-devel/gettext ) -xml? ( virtual/pkgconfig ) -" - -RDEPEND="${CDEPEND} -!dev-db/postgresql-docs:${SLOT} -!dev-db/postgresql-base:${SLOT} -!dev-db/postgresql-server:${SLOT} -selinux? ( sec-policy/selinux-postgresql ) -" - -pkg_setup() { - use server && CONFIG_CHECK="~SYSVIPC" linux-info_pkg_setup - - enewgroup postgres 70 - enewuser postgres 70 /bin/sh /var/lib/postgresql postgres - - use python && python-single-r1_pkg_setup -} - -src_prepare() { - # Work around PPC{,64} compilation bug where bool is already defined - sed '/#ifndef __cplusplus/a #undef bool' -i src/include/c.h || die - - # Set proper run directory - sed "s|\(PGSOCKET_DIR\s\+\)\"/tmp\"|\1\"${EPREFIX}/run/postgresql\"|" \ - -i src/include/pg_config_manual.h || die - - # Rely on $PATH being in the proper order so that the correct - # install program is used for modules utilizing PGXS in both - # hardened and non-hardened environments. (Bug #528786) - sed 's/@install_bin@/install -c/' -i src/Makefile.global.in || die - - use server || eapply "${FILESDIR}/${PN}-${SLOT}.3-no-server.patch" - - if use pam ; then - sed -e "s/\(#define PGSQL_PAM_SERVICE \"postgresql\)/\1-${SLOT}/" \ - -i src/backend/libpq/auth.c || \ - die 'PGSQL_PAM_SERVICE rename failed.' - fi - - eapply_user -} - -src_configure() { - case ${CHOST} in - *-darwin*|*-solaris*) - use nls && append-libs intl - ;; - esac - - export LDFLAGS_SL="${LDFLAGS}" - export LDFLAGS_EX="${LDFLAGS}" - - local PO="${EPREFIX}" - - local i uuid_config="" - if use uuid; then - for i in ${UTIL_LINUX_LIBC[@]}; do - use ${i} && uuid_config="--with-uuid=e2fs" - done - for i in ${BSD_LIBC[@]}; do - use ${i} && uuid_config="--with-uuid=bsd" - done - [[ -z $uuid_config ]] && uuid_config="--with-uuid=ossp" - fi - - econf \ - --prefix="${PO}/usr/$(get_libdir)/postgresql-${SLOT}" \ - --datadir="${PO}/usr/share/postgresql-${SLOT}" \ - --includedir="${PO}/usr/include/postgresql-${SLOT}" \ - --mandir="${PO}/usr/share/postgresql-${SLOT}/man" \ - --sysconfdir="${PO}/etc/postgresql-${SLOT}" \ - --with-system-tzdata="${PO}/usr/share/zoneinfo" \ - $(use_enable !alpha spinlocks) \ - $(use_enable !pg_legacytimestamp integer-datetimes) \ - $(use_enable debug) \ - $(use_enable threads thread-safety) \ - $(use_with kerberos gssapi) \ - $(use_with ldap) \ - $(use_with pam) \ - $(use_with perl) \ - $(use_with python) \ - $(use_with readline) \ - $(use_with ssl openssl) \ - $(usex server "$(use_with systemd)" '--without-systemd') \ - $(use_with tcl) \ - ${uuid_config} \ - $(use_with xml libxml) \ - $(use_with xml libxslt) \ - $(use_with zlib) \ - $(use_enable nls nls "'$(l10n_get_locales)'") -} - -src_compile() { - emake - emake -C contrib -} - -src_install() { - emake DESTDIR="${D}" install - emake DESTDIR="${D}" install -C contrib - - dodoc README HISTORY doc/{TODO,bug.template} - - # man pages are already built, but if we have the target make them, - # they'll be generated from source before being installed so we - # manually install man pages. - # We use ${SLOT} instead of doman for postgresql.eselect - insinto /usr/share/postgresql-${SLOT}/man/ - doins -r doc/src/sgml/man{1,3,7} - if ! use server; then - # Remove man pages for non-existent binaries - for m in {initdb,pg_{controldata,ctl,resetxlog},post{gres,master}}; do - rm "${ED}/usr/share/postgresql-${SLOT}/man/man1/${m}.1" - done - fi - docompress /usr/share/postgresql-${SLOT}/man/man{1,3,7} - - # Create slot specific man pages - local bn f mansec slotted_name - for mansec in 1 3 7 ; do - local rel_manpath="../../postgresql-${SLOT}/man/man${mansec}" - - mkdir -p "${ED}"/usr/share/man/man${mansec} || die "making man dir" - pushd "${ED}"/usr/share/man/man${mansec} > /dev/null || die "pushd failed" - - for f in "${ED}/usr/share/postgresql-${SLOT}/man/man${mansec}"/* ; do - bn=$(basename "${f}") - slotted_name=${bn%.${mansec}}${SLOT/.}.${mansec} - case ${bn} in - TABLE.7|WITH.7) - echo ".so ${rel_manpath}/SELECT.7" > ${slotted_name} - ;; - *) - echo ".so ${rel_manpath}/${bn}" > ${slotted_name} - ;; - esac - done - - popd > /dev/null - done - - insinto /etc/postgresql-${SLOT} - newins src/bin/psql/psqlrc.sample psqlrc - - # Don't delete libpg{port,common}.a (Bug #571046). They're always - # needed by extensions utilizing PGXS. - use static-libs || \ - find "${ED}" -name '*.a' ! -name libpgport.a ! -name libpgcommon.a \ - -delete - - local f bn - for f in $(find "${ED}/usr/$(get_libdir)/postgresql-${SLOT}/bin" \ - -mindepth 1 -maxdepth 1) - do - bn=$(basename "${f}") - # Temporarily tack on tmp to workaround a file collision - # issue. This is only necessary for 9.7 and earlier. 10 never - # had this issue. - dosym "../$(get_libdir)/postgresql-${SLOT}/bin/${bn}" \ - "/usr/bin/${bn}${SLOT/.}tmp" - done - - if use doc ; then - docinto html - dodoc doc/src/sgml/html/* - - docinto sgml - dodoc doc/src/sgml/*.{sgml,dsl} - fi - - if use server; then - sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \ - "${FILESDIR}/${PN}.confd-9.3" | newconfd - ${PN}-${SLOT} - - sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \ - "${FILESDIR}/${PN}.init-9.3-r1" | newinitd - ${PN}-${SLOT} - - if use systemd; then - sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \ - "${FILESDIR}/${PN}.service-9.6-r1" | \ - systemd_newunit - ${PN}-${SLOT}.service - systemd_newtmpfilesd "${FILESDIR}"/${PN}.tmpfiles ${PN}-${SLOT}.conf - fi - - newbin "${FILESDIR}"/${PN}-check-db-dir ${PN}-${SLOT}-check-db-dir - - use pam && pamd_mimic system-auth ${PN}-${SLOT} auth account session - - if use prefix ; then - keepdir /run/postgresql - fperms 1775 /run/postgresql - fi - fi -} - -pkg_preinst() { - # Find all of the slot-specific symlinks, if any, in /usr/bin (e.g., - # /usr/bin/psql96). They may have been created by the - # postgresql.eselect module, but they're handled within this ebuild - # now. It's alright if we momentarily delete /usr/bin/psql as it - # will be recreated by the eselect module in pkg_ppostinst(). This - # is only necessary for 9.7 and earlier. 10 and later were never - # handled in this manner. - local canonicalise - if type -p realpath > /dev/null; then - canonicalise=realpath - elif type -p readlink > /dev/null; then - canonicalise='readlink -f' - else - # can't die, subshell - die "No readlink nor realpath found, cannot canonicalise" - fi - - local l - # First remove any symlinks in /usr/bin that may have been created - # by the old eselect - for l in $(find "${ROOT}/usr/bin" -mindepth 1 -maxdepth 1 -type l) ; do - if [[ $(${canonicalise} "${l}") == *postgresql-${SLOT}* ]] ; then - rm "${l}" || ewarn "Couldn't remove ${l}" - fi - done - - # Then move the symlinks created by the ebuild to their proper place. - for l in "${ED}"/usr/bin/*tmp ; do - mv "${l}" "${l%tmp}" \ - || ewarn "Couldn't rename $(basename ${l}) to $(basename ${l%tmp})" - done -} - -pkg_postinst() { - use server && use systemd && systemd_tmpfiles_create ${PN}-${SLOT}.conf - postgresql-config update - - elog "If you need a global psqlrc-file, you can place it in:" - elog " ${EROOT}/etc/postgresql-${SLOT}/" - - if use server ; then - elog - elog "Gentoo specific documentation:" - elog "https://wiki.gentoo.org/wiki/PostgreSQL" - elog - elog "Official documentation:" - elog "https://www.postgresql.org/docs/${SLOT}/static/index.html" - elog - elog "The default location of the Unix-domain socket is:" - elog " ${EROOT}/run/postgresql/" - elog - elog "Before initializing the database, you may want to edit PG_INITDB_OPTS" - elog "so that it contains your preferred locale in:" - elog " ${EROOT}/etc/conf.d/postgresql-${SLOT}" - elog - elog "Then, execute the following command to setup the initial database" - elog "environment:" - elog " emerge --config =${CATEGORY}/${PF}" - fi -} - -pkg_prerm() { - if use server && [[ -z ${REPLACED_BY_VERSION} ]] ; then - ewarn "Have you dumped and/or migrated the ${SLOT} database cluster?" - ewarn "\thttps://wiki.gentoo.org/wiki/PostgreSQL/QuickStart#Migrating_PostgreSQL" - - ebegin "Resuming removal in 10 seconds (Control-C to cancel)" - sleep 10 - eend 0 - fi -} - -pkg_postrm() { - postgresql-config update -} - -pkg_config() { - use server || die "USE flag 'server' not enabled. Nothing to configure." - - [[ -f "${EROOT}/etc/conf.d/postgresql-${SLOT}" ]] \ - && source "${EROOT}/etc/conf.d/postgresql-${SLOT}" - [[ -z "${PGDATA}" ]] && PGDATA="${EROOT}/etc/postgresql-${SLOT}/" - [[ -z "${DATA_DIR}" ]] \ - && DATA_DIR="${EROOT}/var/lib/postgresql/${SLOT}/data" - - # environment.bz2 may not contain the same locale as the current system - # locale. Unset and source from the current system locale. - if [ -f "${EROOT}/etc/env.d/02locale" ]; then - unset LANG - unset LC_CTYPE - unset LC_NUMERIC - unset LC_TIME - unset LC_COLLATE - unset LC_MONETARY - unset LC_MESSAGES - unset LC_ALL - source "${EROOT}/etc/env.d/02locale" - [ -n "${LANG}" ] && export LANG - [ -n "${LC_CTYPE}" ] && export LC_CTYPE - [ -n "${LC_NUMERIC}" ] && export LC_NUMERIC - [ -n "${LC_TIME}" ] && export LC_TIME - [ -n "${LC_COLLATE}" ] && export LC_COLLATE - [ -n "${LC_MONETARY}" ] && export LC_MONETARY - [ -n "${LC_MESSAGES}" ] && export LC_MESSAGES - [ -n "${LC_ALL}" ] && export LC_ALL - fi - - einfo "You can modify the paths and options passed to initdb by editing:" - einfo " ${EROOT}/etc/conf.d/postgresql-${SLOT}" - einfo - einfo "Information on options that can be passed to initdb are found at:" - einfo " https://www.postgresql.org/docs/${SLOT}/static/creating-cluster.html" - einfo " https://www.postgresql.org/docs/${SLOT}/static/app-initdb.html" - einfo - einfo "PG_INITDB_OPTS is currently set to:" - if [[ -z "${PG_INITDB_OPTS}" ]] ; then - einfo " (none)" - else - einfo " ${PG_INITDB_OPTS}" - fi - einfo - einfo "Configuration files will be installed to:" - einfo " ${PGDATA}" - einfo - einfo "The database cluster will be created in:" - einfo " ${DATA_DIR}" - einfo - - ebegin "Continuing initialization in 5 seconds (Control-C to cancel)" - sleep 5 - eend 0 - - if [ -n "$(ls -A ${DATA_DIR} 2> /dev/null)" ] ; then - eerror "The given directory, '${DATA_DIR}', is not empty." - eerror "Modify DATA_DIR to point to an empty directory." - die "${DATA_DIR} is not empty." - fi - - einfo "Creating the data directory ..." - if [[ ${EUID} == 0 ]] ; then - mkdir -p "${DATA_DIR}" - chown -Rf postgres:postgres "${DATA_DIR}" - chmod 0700 "${DATA_DIR}" - fi - - einfo "Initializing the database ..." - - if [[ ${EUID} == 0 ]] ; then - su postgres -c "${EROOT}/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -D \"${DATA_DIR}\" ${PG_INITDB_OPTS}" - else - "${EROOT}"/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -U postgres -D "${DATA_DIR}" ${PG_INITDB_OPTS} - fi - - if [[ "${DATA_DIR%/}" != "${PGDATA%/}" ]] ; then - mv "${DATA_DIR%/}"/{pg_{hba,ident},postgresql}.conf "${PGDATA}" - ln -s "${PGDATA%/}"/{pg_{hba,ident},postgresql}.conf "${DATA_DIR%/}" - fi - - # unix_socket_directory has no effect in postgresql.conf as it's - # overridden in the initscript - sed '/^#unix_socket_directories/,+1d' -i "${PGDATA%/}"/postgresql.conf - - cat <<- EOF >> "${PGDATA%/}"/postgresql.conf - # This is here because of https://bugs.gentoo.org/show_bug.cgi?id=518522 - # On the off-chance that you might need to work with UTF-8 encoded - # characters in PL/Perl - plperl.on_init = 'use utf8; use re; package utf8; require "utf8_heavy.pl";' - EOF - - einfo "The autovacuum function, which was in contrib, has been moved to the main" - einfo "PostgreSQL functions starting with 8.1, and starting with 8.4 is now enabled" - einfo "by default. You can disable it in the cluster's:" - einfo " ${PGDATA%/}/postgresql.conf" - einfo - if ! use systemd; then - einfo "The PostgreSQL server, by default, will log events to:" - einfo " ${DATA_DIR%/}/postmaster.log" - einfo - fi - if use prefix ; then - einfo "The location of the configuration files have moved to:" - einfo " ${PGDATA}" - einfo "To start the server:" - einfo " pg_ctl start -D ${DATA_DIR} -o '-D ${PGDATA} --data-directory=${DATA_DIR}'" - einfo "To stop:" - einfo " pg_ctl stop -D ${DATA_DIR}" - einfo - einfo "Or move the configuration files back:" - einfo "mv ${PGDATA}*.conf ${DATA_DIR}" - elif use systemd; then - einfo "You should use the 'postgresql-${SLOT}.service' unit to run PostgreSQL" - einfo "instead of 'pg_ctl'." - else - einfo "You should use the '${EROOT}/etc/init.d/postgresql-${SLOT}' script to run PostgreSQL" - einfo "instead of 'pg_ctl'." - fi -} - -src_test() { - if use server && [[ ${UID} -ne 0 ]] ; then - emake check - - einfo "If you think other tests besides the regression tests are necessary, please" - einfo "submit a bug including a patch for this ebuild to enable them." - else - use server || \ - ewarn 'Tests cannot be run without the "server" use flag enabled.' - [[ ${UID} -eq 0 ]] || \ - ewarn 'Tests cannot be run as root. Enable "userpriv" in FEATURES.' - - ewarn 'Skipping.' - fi -} diff --git a/dev-db/postgresql/postgresql-9.6.15.ebuild b/dev-db/postgresql/postgresql-9.6.15.ebuild deleted file mode 100644 index 800e0b2727ef..000000000000 --- a/dev-db/postgresql/postgresql-9.6.15.ebuild +++ /dev/null @@ -1,490 +0,0 @@ -# Copyright 1999-2020 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -PYTHON_COMPAT=( python3_{6,7} ) - -PLOCALES="af cs de en es fa fr hr hu it ko nb pl pt_BR ro ru sk sl sv tr zh_CN - zh_TW" - -inherit flag-o-matic l10n linux-info multilib pam prefix python-single-r1 \ - systemd user - -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" - -SLOT=$(ver_cut 1-2) - -MY_PV=${PV/_/} -S="${WORKDIR}/${PN}-${MY_PV}" - -SRC_URI="https://ftp.postgresql.org/pub/source/v${MY_PV}/postgresql-${MY_PV}.tar.bz2" - -LICENSE="POSTGRESQL GPL-2" -DESCRIPTION="PostgreSQL RDBMS" -HOMEPAGE="https://www.postgresql.org/" - -IUSE="debug doc kerberos kernel_linux ldap libressl nls pam perl - -pg_legacytimestamp python +readline selinux +server systemd ssl - static-libs tcl threads uuid xml zlib" - -REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" - -CDEPEND=" ->=app-eselect/eselect-postgresql-2.0 -sys-apps/less -virtual/libintl -kerberos? ( virtual/krb5 ) -ldap? ( net-nds/openldap ) -pam? ( sys-libs/pam ) -perl? ( >=dev-lang/perl-5.8:= ) -python? ( ${PYTHON_DEPS} ) -readline? ( sys-libs/readline:0= ) -ssl? ( - !libressl? ( >=dev-libs/openssl-0.9.6-r1:0= ) - libressl? ( dev-libs/libressl:= ) -) -server? ( systemd? ( sys-apps/systemd ) ) -tcl? ( >=dev-lang/tcl-8:0= ) -xml? ( dev-libs/libxml2 dev-libs/libxslt ) -zlib? ( sys-libs/zlib ) -" - -# uuid flags -- depend on sys-apps/util-linux for Linux libcs, or if no -# supported libc in use depend on dev-libs/ossp-uuid. For BSD systems, -# the libc includes UUID functions. -UTIL_LINUX_LIBC=( elibc_{glibc,uclibc,musl} ) -BSD_LIBC=( elibc_{Free,Net,Open}BSD ) - -nest_usedep() { - local front back - while [[ ${#} -gt 1 ]]; do - front+="${1}? ( " - back+=" )" - shift - done - echo "${front}${1}${back}" -} - -IUSE+=" ${UTIL_LINUX_LIBC[@]} ${BSD_LIBC[@]}" -CDEPEND+=" -uuid? ( - ${UTIL_LINUX_LIBC[@]/%/? ( sys-apps/util-linux )} - $(nest_usedep ${UTIL_LINUX_LIBC[@]/#/!} ${BSD_LIBC[@]/#/!} dev-libs/ossp-uuid) -)" - -DEPEND="${CDEPEND} -!!<sys-apps/sandbox-2.0 -sys-devel/bison -sys-devel/flex -nls? ( sys-devel/gettext ) -xml? ( virtual/pkgconfig ) -" - -RDEPEND="${CDEPEND} -!dev-db/postgresql-docs:${SLOT} -!dev-db/postgresql-base:${SLOT} -!dev-db/postgresql-server:${SLOT} -selinux? ( sec-policy/selinux-postgresql ) -" - -pkg_setup() { - use server && CONFIG_CHECK="~SYSVIPC" linux-info_pkg_setup - - enewgroup postgres 70 - enewuser postgres 70 /bin/sh /var/lib/postgresql postgres - - use python && python-single-r1_pkg_setup -} - -src_prepare() { - # Work around PPC{,64} compilation bug where bool is already defined - sed '/#ifndef __cplusplus/a #undef bool' -i src/include/c.h || die - - # Set proper run directory - sed "s|\(PGSOCKET_DIR\s\+\)\"/tmp\"|\1\"${EPREFIX}/run/postgresql\"|" \ - -i src/include/pg_config_manual.h || die - - # Rely on $PATH being in the proper order so that the correct - # install program is used for modules utilizing PGXS in both - # hardened and non-hardened environments. (Bug #528786) - sed 's/@install_bin@/install -c/' -i src/Makefile.global.in || die - - use server || eapply "${FILESDIR}/${PN}-${SLOT}.3-no-server.patch" - - if use pam ; then - sed -e "s/\(#define PGSQL_PAM_SERVICE \"postgresql\)/\1-${SLOT}/" \ - -i src/backend/libpq/auth.c || \ - die 'PGSQL_PAM_SERVICE rename failed.' - fi - - eapply_user -} - -src_configure() { - case ${CHOST} in - *-darwin*|*-solaris*) - use nls && append-libs intl - ;; - esac - - export LDFLAGS_SL="${LDFLAGS}" - export LDFLAGS_EX="${LDFLAGS}" - - local PO="${EPREFIX}" - - local i uuid_config="" - if use uuid; then - for i in ${UTIL_LINUX_LIBC[@]}; do - use ${i} && uuid_config="--with-uuid=e2fs" - done - for i in ${BSD_LIBC[@]}; do - use ${i} && uuid_config="--with-uuid=bsd" - done - [[ -z $uuid_config ]] && uuid_config="--with-uuid=ossp" - fi - - econf \ - --prefix="${PO}/usr/$(get_libdir)/postgresql-${SLOT}" \ - --datadir="${PO}/usr/share/postgresql-${SLOT}" \ - --includedir="${PO}/usr/include/postgresql-${SLOT}" \ - --mandir="${PO}/usr/share/postgresql-${SLOT}/man" \ - --sysconfdir="${PO}/etc/postgresql-${SLOT}" \ - --with-system-tzdata="${PO}/usr/share/zoneinfo" \ - $(use_enable !alpha spinlocks) \ - $(use_enable !pg_legacytimestamp integer-datetimes) \ - $(use_enable debug) \ - $(use_enable threads thread-safety) \ - $(use_with kerberos gssapi) \ - $(use_with ldap) \ - $(use_with pam) \ - $(use_with perl) \ - $(use_with python) \ - $(use_with readline) \ - $(use_with ssl openssl) \ - $(usex server "$(use_with systemd)" '--without-systemd') \ - $(use_with tcl) \ - ${uuid_config} \ - $(use_with xml libxml) \ - $(use_with xml libxslt) \ - $(use_with zlib) \ - $(use_enable nls nls "'$(l10n_get_locales)'") -} - -src_compile() { - emake - emake -C contrib -} - -src_install() { - emake DESTDIR="${D}" install - emake DESTDIR="${D}" install -C contrib - - dodoc README HISTORY doc/{TODO,bug.template} - - # man pages are already built, but if we have the target make them, - # they'll be generated from source before being installed so we - # manually install man pages. - # We use ${SLOT} instead of doman for postgresql.eselect - insinto /usr/share/postgresql-${SLOT}/man/ - doins -r doc/src/sgml/man{1,3,7} - if ! use server; then - # Remove man pages for non-existent binaries - for m in {initdb,pg_{controldata,ctl,resetxlog},post{gres,master}}; do - rm "${ED}/usr/share/postgresql-${SLOT}/man/man1/${m}.1" - done - fi - docompress /usr/share/postgresql-${SLOT}/man/man{1,3,7} - - # Create slot specific man pages - local bn f mansec slotted_name - for mansec in 1 3 7 ; do - local rel_manpath="../../postgresql-${SLOT}/man/man${mansec}" - - mkdir -p "${ED}"/usr/share/man/man${mansec} || die "making man dir" - pushd "${ED}"/usr/share/man/man${mansec} > /dev/null || die "pushd failed" - - for f in "${ED}/usr/share/postgresql-${SLOT}/man/man${mansec}"/* ; do - bn=$(basename "${f}") - slotted_name=${bn%.${mansec}}${SLOT/.}.${mansec} - case ${bn} in - TABLE.7|WITH.7) - echo ".so ${rel_manpath}/SELECT.7" > ${slotted_name} - ;; - *) - echo ".so ${rel_manpath}/${bn}" > ${slotted_name} - ;; - esac - done - - popd > /dev/null - done - - insinto /etc/postgresql-${SLOT} - newins src/bin/psql/psqlrc.sample psqlrc - - # Don't delete libpg{port,common}.a (Bug #571046). They're always - # needed by extensions utilizing PGXS. - use static-libs || \ - find "${ED}" -name '*.a' ! -name libpgport.a ! -name libpgcommon.a \ - -delete - - local f bn - for f in $(find "${ED}/usr/$(get_libdir)/postgresql-${SLOT}/bin" \ - -mindepth 1 -maxdepth 1) - do - bn=$(basename "${f}") - # Temporarily tack on tmp to workaround a file collision - # issue. This is only necessary for 9.7 and earlier. 10 never - # had this issue. - dosym "../$(get_libdir)/postgresql-${SLOT}/bin/${bn}" \ - "/usr/bin/${bn}${SLOT/.}tmp" - done - - if use doc ; then - docinto html - dodoc doc/src/sgml/html/* - - docinto sgml - dodoc doc/src/sgml/*.{sgml,dsl} - fi - - if use server; then - sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \ - "${FILESDIR}/${PN}.confd-9.3" | newconfd - ${PN}-${SLOT} - - sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \ - "${FILESDIR}/${PN}.init-9.3-r1" | newinitd - ${PN}-${SLOT} - - if use systemd; then - sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \ - "${FILESDIR}/${PN}.service-9.6-r1" | \ - systemd_newunit - ${PN}-${SLOT}.service - systemd_newtmpfilesd "${FILESDIR}"/${PN}.tmpfiles ${PN}-${SLOT}.conf - fi - - newbin "${FILESDIR}"/${PN}-check-db-dir ${PN}-${SLOT}-check-db-dir - - use pam && pamd_mimic system-auth ${PN}-${SLOT} auth account session - - if use prefix ; then - keepdir /run/postgresql - fperms 1775 /run/postgresql - fi - fi -} - -pkg_preinst() { - # Find all of the slot-specific symlinks, if any, in /usr/bin (e.g., - # /usr/bin/psql96). They may have been created by the - # postgresql.eselect module, but they're handled within this ebuild - # now. It's alright if we momentarily delete /usr/bin/psql as it - # will be recreated by the eselect module in pkg_ppostinst(). This - # is only necessary for 9.7 and earlier. 10 and later were never - # handled in this manner. - local canonicalise - if type -p realpath > /dev/null; then - canonicalise=realpath - elif type -p readlink > /dev/null; then - canonicalise='readlink -f' - else - # can't die, subshell - die "No readlink nor realpath found, cannot canonicalise" - fi - - local l - # First remove any symlinks in /usr/bin that may have been created - # by the old eselect - for l in $(find "${ROOT}/usr/bin" -mindepth 1 -maxdepth 1 -type l) ; do - if [[ $(${canonicalise} "${l}") == *postgresql-${SLOT}* ]] ; then - rm "${l}" || ewarn "Couldn't remove ${l}" - fi - done - - # Then move the symlinks created by the ebuild to their proper place. - for l in "${ED}"/usr/bin/*tmp ; do - mv "${l}" "${l%tmp}" \ - || ewarn "Couldn't rename $(basename ${l}) to $(basename ${l%tmp})" - done -} - -pkg_postinst() { - use server && use systemd && systemd_tmpfiles_create ${PN}-${SLOT}.conf - postgresql-config update - - elog "If you need a global psqlrc-file, you can place it in:" - elog " ${EROOT}/etc/postgresql-${SLOT}/" - - if use server ; then - elog - elog "Gentoo specific documentation:" - elog "https://wiki.gentoo.org/wiki/PostgreSQL" - elog - elog "Official documentation:" - elog "https://www.postgresql.org/docs/${SLOT}/static/index.html" - elog - elog "The default location of the Unix-domain socket is:" - elog " ${EROOT}/run/postgresql/" - elog - elog "Before initializing the database, you may want to edit PG_INITDB_OPTS" - elog "so that it contains your preferred locale in:" - elog " ${EROOT}/etc/conf.d/postgresql-${SLOT}" - elog - elog "Then, execute the following command to setup the initial database" - elog "environment:" - elog " emerge --config =${CATEGORY}/${PF}" - fi -} - -pkg_prerm() { - if use server && [[ -z ${REPLACED_BY_VERSION} ]] ; then - ewarn "Have you dumped and/or migrated the ${SLOT} database cluster?" - ewarn "\thttps://wiki.gentoo.org/wiki/PostgreSQL/QuickStart#Migrating_PostgreSQL" - - ebegin "Resuming removal in 10 seconds (Control-C to cancel)" - sleep 10 - eend 0 - fi -} - -pkg_postrm() { - postgresql-config update -} - -pkg_config() { - use server || die "USE flag 'server' not enabled. Nothing to configure." - - [[ -f "${EROOT}/etc/conf.d/postgresql-${SLOT}" ]] \ - && source "${EROOT}/etc/conf.d/postgresql-${SLOT}" - [[ -z "${PGDATA}" ]] && PGDATA="${EROOT}/etc/postgresql-${SLOT}/" - [[ -z "${DATA_DIR}" ]] \ - && DATA_DIR="${EROOT}/var/lib/postgresql/${SLOT}/data" - - # environment.bz2 may not contain the same locale as the current system - # locale. Unset and source from the current system locale. - if [ -f "${EROOT}/etc/env.d/02locale" ]; then - unset LANG - unset LC_CTYPE - unset LC_NUMERIC - unset LC_TIME - unset LC_COLLATE - unset LC_MONETARY - unset LC_MESSAGES - unset LC_ALL - source "${EROOT}/etc/env.d/02locale" - [ -n "${LANG}" ] && export LANG - [ -n "${LC_CTYPE}" ] && export LC_CTYPE - [ -n "${LC_NUMERIC}" ] && export LC_NUMERIC - [ -n "${LC_TIME}" ] && export LC_TIME - [ -n "${LC_COLLATE}" ] && export LC_COLLATE - [ -n "${LC_MONETARY}" ] && export LC_MONETARY - [ -n "${LC_MESSAGES}" ] && export LC_MESSAGES - [ -n "${LC_ALL}" ] && export LC_ALL - fi - - einfo "You can modify the paths and options passed to initdb by editing:" - einfo " ${EROOT}/etc/conf.d/postgresql-${SLOT}" - einfo - einfo "Information on options that can be passed to initdb are found at:" - einfo " https://www.postgresql.org/docs/${SLOT}/static/creating-cluster.html" - einfo " https://www.postgresql.org/docs/${SLOT}/static/app-initdb.html" - einfo - einfo "PG_INITDB_OPTS is currently set to:" - if [[ -z "${PG_INITDB_OPTS}" ]] ; then - einfo " (none)" - else - einfo " ${PG_INITDB_OPTS}" - fi - einfo - einfo "Configuration files will be installed to:" - einfo " ${PGDATA}" - einfo - einfo "The database cluster will be created in:" - einfo " ${DATA_DIR}" - einfo - - ebegin "Continuing initialization in 5 seconds (Control-C to cancel)" - sleep 5 - eend 0 - - if [ -n "$(ls -A ${DATA_DIR} 2> /dev/null)" ] ; then - eerror "The given directory, '${DATA_DIR}', is not empty." - eerror "Modify DATA_DIR to point to an empty directory." - die "${DATA_DIR} is not empty." - fi - - einfo "Creating the data directory ..." - if [[ ${EUID} == 0 ]] ; then - mkdir -p "${DATA_DIR}" - chown -Rf postgres:postgres "${DATA_DIR}" - chmod 0700 "${DATA_DIR}" - fi - - einfo "Initializing the database ..." - - if [[ ${EUID} == 0 ]] ; then - su postgres -c "${EROOT}/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -D \"${DATA_DIR}\" ${PG_INITDB_OPTS}" - else - "${EROOT}"/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -U postgres -D "${DATA_DIR}" ${PG_INITDB_OPTS} - fi - - if [[ "${DATA_DIR%/}" != "${PGDATA%/}" ]] ; then - mv "${DATA_DIR%/}"/{pg_{hba,ident},postgresql}.conf "${PGDATA}" - ln -s "${PGDATA%/}"/{pg_{hba,ident},postgresql}.conf "${DATA_DIR%/}" - fi - - # unix_socket_directory has no effect in postgresql.conf as it's - # overridden in the initscript - sed '/^#unix_socket_directories/,+1d' -i "${PGDATA%/}"/postgresql.conf - - cat <<- EOF >> "${PGDATA%/}"/postgresql.conf - # This is here because of https://bugs.gentoo.org/show_bug.cgi?id=518522 - # On the off-chance that you might need to work with UTF-8 encoded - # characters in PL/Perl - plperl.on_init = 'use utf8; use re; package utf8; require "utf8_heavy.pl";' - EOF - - einfo "The autovacuum function, which was in contrib, has been moved to the main" - einfo "PostgreSQL functions starting with 8.1, and starting with 8.4 is now enabled" - einfo "by default. You can disable it in the cluster's:" - einfo " ${PGDATA%/}/postgresql.conf" - einfo - if ! use systemd; then - einfo "The PostgreSQL server, by default, will log events to:" - einfo " ${DATA_DIR%/}/postmaster.log" - einfo - fi - if use prefix ; then - einfo "The location of the configuration files have moved to:" - einfo " ${PGDATA}" - einfo "To start the server:" - einfo " pg_ctl start -D ${DATA_DIR} -o '-D ${PGDATA} --data-directory=${DATA_DIR}'" - einfo "To stop:" - einfo " pg_ctl stop -D ${DATA_DIR}" - einfo - einfo "Or move the configuration files back:" - einfo "mv ${PGDATA}*.conf ${DATA_DIR}" - elif use systemd; then - einfo "You should use the 'postgresql-${SLOT}.service' unit to run PostgreSQL" - einfo "instead of 'pg_ctl'." - else - einfo "You should use the '${EROOT}/etc/init.d/postgresql-${SLOT}' script to run PostgreSQL" - einfo "instead of 'pg_ctl'." - fi -} - -src_test() { - if use server && [[ ${UID} -ne 0 ]] ; then - emake check - - einfo "If you think other tests besides the regression tests are necessary, please" - einfo "submit a bug including a patch for this ebuild to enable them." - else - use server || \ - ewarn 'Tests cannot be run without the "server" use flag enabled.' - [[ ${UID} -eq 0 ]] || \ - ewarn 'Tests cannot be run as root. Enable "userpriv" in FEATURES.' - - ewarn 'Skipping.' - fi -} diff --git a/dev-db/postgresql/postgresql-9.6.16.ebuild b/dev-db/postgresql/postgresql-9.6.16.ebuild deleted file mode 100644 index db31e5a8233d..000000000000 --- a/dev-db/postgresql/postgresql-9.6.16.ebuild +++ /dev/null @@ -1,490 +0,0 @@ -# Copyright 1999-2020 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -PYTHON_COMPAT=( python3_{6,7} ) - -PLOCALES="af cs de en es fa fr hr hu it ko nb pl pt_BR ro ru sk sl sv tr zh_CN - zh_TW" - -inherit flag-o-matic l10n linux-info multilib pam prefix python-single-r1 \ - systemd user - -KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~mips ppc ppc64 ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" - -SLOT=$(ver_cut 1-2) - -MY_PV=${PV/_/} -S="${WORKDIR}/${PN}-${MY_PV}" - -SRC_URI="https://ftp.postgresql.org/pub/source/v${MY_PV}/postgresql-${MY_PV}.tar.bz2" - -LICENSE="POSTGRESQL GPL-2" -DESCRIPTION="PostgreSQL RDBMS" -HOMEPAGE="https://www.postgresql.org/" - -IUSE="debug doc kerberos kernel_linux ldap libressl nls pam perl - -pg_legacytimestamp python +readline selinux +server systemd ssl - static-libs tcl threads uuid xml zlib" - -REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" - -CDEPEND=" ->=app-eselect/eselect-postgresql-2.0 -sys-apps/less -virtual/libintl -kerberos? ( virtual/krb5 ) -ldap? ( net-nds/openldap ) -pam? ( sys-libs/pam ) -perl? ( >=dev-lang/perl-5.8:= ) -python? ( ${PYTHON_DEPS} ) -readline? ( sys-libs/readline:0= ) -ssl? ( - !libressl? ( >=dev-libs/openssl-0.9.6-r1:0= ) - libressl? ( dev-libs/libressl:= ) -) -server? ( systemd? ( sys-apps/systemd ) ) -tcl? ( >=dev-lang/tcl-8:0= ) -xml? ( dev-libs/libxml2 dev-libs/libxslt ) -zlib? ( sys-libs/zlib ) -" - -# uuid flags -- depend on sys-apps/util-linux for Linux libcs, or if no -# supported libc in use depend on dev-libs/ossp-uuid. For BSD systems, -# the libc includes UUID functions. -UTIL_LINUX_LIBC=( elibc_{glibc,uclibc,musl} ) -BSD_LIBC=( elibc_{Free,Net,Open}BSD ) - -nest_usedep() { - local front back - while [[ ${#} -gt 1 ]]; do - front+="${1}? ( " - back+=" )" - shift - done - echo "${front}${1}${back}" -} - -IUSE+=" ${UTIL_LINUX_LIBC[@]} ${BSD_LIBC[@]}" -CDEPEND+=" -uuid? ( - ${UTIL_LINUX_LIBC[@]/%/? ( sys-apps/util-linux )} - $(nest_usedep ${UTIL_LINUX_LIBC[@]/#/!} ${BSD_LIBC[@]/#/!} dev-libs/ossp-uuid) -)" - -DEPEND="${CDEPEND} -!!<sys-apps/sandbox-2.0 -sys-devel/bison -sys-devel/flex -nls? ( sys-devel/gettext ) -xml? ( virtual/pkgconfig ) -" - -RDEPEND="${CDEPEND} -!dev-db/postgresql-docs:${SLOT} -!dev-db/postgresql-base:${SLOT} -!dev-db/postgresql-server:${SLOT} -selinux? ( sec-policy/selinux-postgresql ) -" - -pkg_setup() { - use server && CONFIG_CHECK="~SYSVIPC" linux-info_pkg_setup - - enewgroup postgres 70 - enewuser postgres 70 /bin/sh /var/lib/postgresql postgres - - use python && python-single-r1_pkg_setup -} - -src_prepare() { - # Work around PPC{,64} compilation bug where bool is already defined - sed '/#ifndef __cplusplus/a #undef bool' -i src/include/c.h || die - - # Set proper run directory - sed "s|\(PGSOCKET_DIR\s\+\)\"/tmp\"|\1\"${EPREFIX}/run/postgresql\"|" \ - -i src/include/pg_config_manual.h || die - - # Rely on $PATH being in the proper order so that the correct - # install program is used for modules utilizing PGXS in both - # hardened and non-hardened environments. (Bug #528786) - sed 's/@install_bin@/install -c/' -i src/Makefile.global.in || die - - use server || eapply "${FILESDIR}/${PN}-${SLOT}.3-no-server.patch" - - if use pam ; then - sed -e "s/\(#define PGSQL_PAM_SERVICE \"postgresql\)/\1-${SLOT}/" \ - -i src/backend/libpq/auth.c || \ - die 'PGSQL_PAM_SERVICE rename failed.' - fi - - eapply_user -} - -src_configure() { - case ${CHOST} in - *-darwin*|*-solaris*) - use nls && append-libs intl - ;; - esac - - export LDFLAGS_SL="${LDFLAGS}" - export LDFLAGS_EX="${LDFLAGS}" - - local PO="${EPREFIX}" - - local i uuid_config="" - if use uuid; then - for i in ${UTIL_LINUX_LIBC[@]}; do - use ${i} && uuid_config="--with-uuid=e2fs" - done - for i in ${BSD_LIBC[@]}; do - use ${i} && uuid_config="--with-uuid=bsd" - done - [[ -z $uuid_config ]] && uuid_config="--with-uuid=ossp" - fi - - econf \ - --prefix="${PO}/usr/$(get_libdir)/postgresql-${SLOT}" \ - --datadir="${PO}/usr/share/postgresql-${SLOT}" \ - --includedir="${PO}/usr/include/postgresql-${SLOT}" \ - --mandir="${PO}/usr/share/postgresql-${SLOT}/man" \ - --sysconfdir="${PO}/etc/postgresql-${SLOT}" \ - --with-system-tzdata="${PO}/usr/share/zoneinfo" \ - $(use_enable !alpha spinlocks) \ - $(use_enable !pg_legacytimestamp integer-datetimes) \ - $(use_enable debug) \ - $(use_enable threads thread-safety) \ - $(use_with kerberos gssapi) \ - $(use_with ldap) \ - $(use_with pam) \ - $(use_with perl) \ - $(use_with python) \ - $(use_with readline) \ - $(use_with ssl openssl) \ - $(usex server "$(use_with systemd)" '--without-systemd') \ - $(use_with tcl) \ - ${uuid_config} \ - $(use_with xml libxml) \ - $(use_with xml libxslt) \ - $(use_with zlib) \ - $(use_enable nls nls "'$(l10n_get_locales)'") -} - -src_compile() { - emake - emake -C contrib -} - -src_install() { - emake DESTDIR="${D}" install - emake DESTDIR="${D}" install -C contrib - - dodoc README HISTORY doc/{TODO,bug.template} - - # man pages are already built, but if we have the target make them, - # they'll be generated from source before being installed so we - # manually install man pages. - # We use ${SLOT} instead of doman for postgresql.eselect - insinto /usr/share/postgresql-${SLOT}/man/ - doins -r doc/src/sgml/man{1,3,7} - if ! use server; then - # Remove man pages for non-existent binaries - for m in {initdb,pg_{controldata,ctl,resetxlog},post{gres,master}}; do - rm "${ED}/usr/share/postgresql-${SLOT}/man/man1/${m}.1" - done - fi - docompress /usr/share/postgresql-${SLOT}/man/man{1,3,7} - - # Create slot specific man pages - local bn f mansec slotted_name - for mansec in 1 3 7 ; do - local rel_manpath="../../postgresql-${SLOT}/man/man${mansec}" - - mkdir -p "${ED}"/usr/share/man/man${mansec} || die "making man dir" - pushd "${ED}"/usr/share/man/man${mansec} > /dev/null || die "pushd failed" - - for f in "${ED}/usr/share/postgresql-${SLOT}/man/man${mansec}"/* ; do - bn=$(basename "${f}") - slotted_name=${bn%.${mansec}}${SLOT/.}.${mansec} - case ${bn} in - TABLE.7|WITH.7) - echo ".so ${rel_manpath}/SELECT.7" > ${slotted_name} - ;; - *) - echo ".so ${rel_manpath}/${bn}" > ${slotted_name} - ;; - esac - done - - popd > /dev/null - done - - insinto /etc/postgresql-${SLOT} - newins src/bin/psql/psqlrc.sample psqlrc - - # Don't delete libpg{port,common}.a (Bug #571046). They're always - # needed by extensions utilizing PGXS. - use static-libs || \ - find "${ED}" -name '*.a' ! -name libpgport.a ! -name libpgcommon.a \ - -delete - - local f bn - for f in $(find "${ED}/usr/$(get_libdir)/postgresql-${SLOT}/bin" \ - -mindepth 1 -maxdepth 1) - do - bn=$(basename "${f}") - # Temporarily tack on tmp to workaround a file collision - # issue. This is only necessary for 9.7 and earlier. 10 never - # had this issue. - dosym "../$(get_libdir)/postgresql-${SLOT}/bin/${bn}" \ - "/usr/bin/${bn}${SLOT/.}tmp" - done - - if use doc ; then - docinto html - dodoc doc/src/sgml/html/* - - docinto sgml - dodoc doc/src/sgml/*.{sgml,dsl} - fi - - if use server; then - sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \ - "${FILESDIR}/${PN}.confd-9.3" | newconfd - ${PN}-${SLOT} - - sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \ - "${FILESDIR}/${PN}.init-9.3-r1" | newinitd - ${PN}-${SLOT} - - if use systemd; then - sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \ - "${FILESDIR}/${PN}.service-9.6-r1" | \ - systemd_newunit - ${PN}-${SLOT}.service - systemd_newtmpfilesd "${FILESDIR}"/${PN}.tmpfiles ${PN}-${SLOT}.conf - fi - - newbin "${FILESDIR}"/${PN}-check-db-dir ${PN}-${SLOT}-check-db-dir - - use pam && pamd_mimic system-auth ${PN}-${SLOT} auth account session - - if use prefix ; then - keepdir /run/postgresql - fperms 1775 /run/postgresql - fi - fi -} - -pkg_preinst() { - # Find all of the slot-specific symlinks, if any, in /usr/bin (e.g., - # /usr/bin/psql96). They may have been created by the - # postgresql.eselect module, but they're handled within this ebuild - # now. It's alright if we momentarily delete /usr/bin/psql as it - # will be recreated by the eselect module in pkg_ppostinst(). This - # is only necessary for 9.7 and earlier. 10 and later were never - # handled in this manner. - local canonicalise - if type -p realpath > /dev/null; then - canonicalise=realpath - elif type -p readlink > /dev/null; then - canonicalise='readlink -f' - else - # can't die, subshell - die "No readlink nor realpath found, cannot canonicalise" - fi - - local l - # First remove any symlinks in /usr/bin that may have been created - # by the old eselect - for l in $(find "${ROOT}/usr/bin" -mindepth 1 -maxdepth 1 -type l) ; do - if [[ $(${canonicalise} "${l}") == *postgresql-${SLOT}* ]] ; then - rm "${l}" || ewarn "Couldn't remove ${l}" - fi - done - - # Then move the symlinks created by the ebuild to their proper place. - for l in "${ED}"/usr/bin/*tmp ; do - mv "${l}" "${l%tmp}" \ - || ewarn "Couldn't rename $(basename ${l}) to $(basename ${l%tmp})" - done -} - -pkg_postinst() { - use server && use systemd && systemd_tmpfiles_create ${PN}-${SLOT}.conf - postgresql-config update - - elog "If you need a global psqlrc-file, you can place it in:" - elog " ${EROOT}/etc/postgresql-${SLOT}/" - - if use server ; then - elog - elog "Gentoo specific documentation:" - elog "https://wiki.gentoo.org/wiki/PostgreSQL" - elog - elog "Official documentation:" - elog "https://www.postgresql.org/docs/${SLOT}/static/index.html" - elog - elog "The default location of the Unix-domain socket is:" - elog " ${EROOT}/run/postgresql/" - elog - elog "Before initializing the database, you may want to edit PG_INITDB_OPTS" - elog "so that it contains your preferred locale in:" - elog " ${EROOT}/etc/conf.d/postgresql-${SLOT}" - elog - elog "Then, execute the following command to setup the initial database" - elog "environment:" - elog " emerge --config =${CATEGORY}/${PF}" - fi -} - -pkg_prerm() { - if use server && [[ -z ${REPLACED_BY_VERSION} ]] ; then - ewarn "Have you dumped and/or migrated the ${SLOT} database cluster?" - ewarn "\thttps://wiki.gentoo.org/wiki/PostgreSQL/QuickStart#Migrating_PostgreSQL" - - ebegin "Resuming removal in 10 seconds (Control-C to cancel)" - sleep 10 - eend 0 - fi -} - -pkg_postrm() { - postgresql-config update -} - -pkg_config() { - use server || die "USE flag 'server' not enabled. Nothing to configure." - - [[ -f "${EROOT}/etc/conf.d/postgresql-${SLOT}" ]] \ - && source "${EROOT}/etc/conf.d/postgresql-${SLOT}" - [[ -z "${PGDATA}" ]] && PGDATA="${EROOT}/etc/postgresql-${SLOT}/" - [[ -z "${DATA_DIR}" ]] \ - && DATA_DIR="${EROOT}/var/lib/postgresql/${SLOT}/data" - - # environment.bz2 may not contain the same locale as the current system - # locale. Unset and source from the current system locale. - if [ -f "${EROOT}/etc/env.d/02locale" ]; then - unset LANG - unset LC_CTYPE - unset LC_NUMERIC - unset LC_TIME - unset LC_COLLATE - unset LC_MONETARY - unset LC_MESSAGES - unset LC_ALL - source "${EROOT}/etc/env.d/02locale" - [ -n "${LANG}" ] && export LANG - [ -n "${LC_CTYPE}" ] && export LC_CTYPE - [ -n "${LC_NUMERIC}" ] && export LC_NUMERIC - [ -n "${LC_TIME}" ] && export LC_TIME - [ -n "${LC_COLLATE}" ] && export LC_COLLATE - [ -n "${LC_MONETARY}" ] && export LC_MONETARY - [ -n "${LC_MESSAGES}" ] && export LC_MESSAGES - [ -n "${LC_ALL}" ] && export LC_ALL - fi - - einfo "You can modify the paths and options passed to initdb by editing:" - einfo " ${EROOT}/etc/conf.d/postgresql-${SLOT}" - einfo - einfo "Information on options that can be passed to initdb are found at:" - einfo " https://www.postgresql.org/docs/${SLOT}/static/creating-cluster.html" - einfo " https://www.postgresql.org/docs/${SLOT}/static/app-initdb.html" - einfo - einfo "PG_INITDB_OPTS is currently set to:" - if [[ -z "${PG_INITDB_OPTS}" ]] ; then - einfo " (none)" - else - einfo " ${PG_INITDB_OPTS}" - fi - einfo - einfo "Configuration files will be installed to:" - einfo " ${PGDATA}" - einfo - einfo "The database cluster will be created in:" - einfo " ${DATA_DIR}" - einfo - - ebegin "Continuing initialization in 5 seconds (Control-C to cancel)" - sleep 5 - eend 0 - - if [ -n "$(ls -A ${DATA_DIR} 2> /dev/null)" ] ; then - eerror "The given directory, '${DATA_DIR}', is not empty." - eerror "Modify DATA_DIR to point to an empty directory." - die "${DATA_DIR} is not empty." - fi - - einfo "Creating the data directory ..." - if [[ ${EUID} == 0 ]] ; then - mkdir -p "${DATA_DIR}" - chown -Rf postgres:postgres "${DATA_DIR}" - chmod 0700 "${DATA_DIR}" - fi - - einfo "Initializing the database ..." - - if [[ ${EUID} == 0 ]] ; then - su postgres -c "${EROOT}/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -D \"${DATA_DIR}\" ${PG_INITDB_OPTS}" - else - "${EROOT}"/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -U postgres -D "${DATA_DIR}" ${PG_INITDB_OPTS} - fi - - if [[ "${DATA_DIR%/}" != "${PGDATA%/}" ]] ; then - mv "${DATA_DIR%/}"/{pg_{hba,ident},postgresql}.conf "${PGDATA}" - ln -s "${PGDATA%/}"/{pg_{hba,ident},postgresql}.conf "${DATA_DIR%/}" - fi - - # unix_socket_directory has no effect in postgresql.conf as it's - # overridden in the initscript - sed '/^#unix_socket_directories/,+1d' -i "${PGDATA%/}"/postgresql.conf - - cat <<- EOF >> "${PGDATA%/}"/postgresql.conf - # This is here because of https://bugs.gentoo.org/show_bug.cgi?id=518522 - # On the off-chance that you might need to work with UTF-8 encoded - # characters in PL/Perl - plperl.on_init = 'use utf8; use re; package utf8; require "utf8_heavy.pl";' - EOF - - einfo "The autovacuum function, which was in contrib, has been moved to the main" - einfo "PostgreSQL functions starting with 8.1, and starting with 8.4 is now enabled" - einfo "by default. You can disable it in the cluster's:" - einfo " ${PGDATA%/}/postgresql.conf" - einfo - if ! use systemd; then - einfo "The PostgreSQL server, by default, will log events to:" - einfo " ${DATA_DIR%/}/postmaster.log" - einfo - fi - if use prefix ; then - einfo "The location of the configuration files have moved to:" - einfo " ${PGDATA}" - einfo "To start the server:" - einfo " pg_ctl start -D ${DATA_DIR} -o '-D ${PGDATA} --data-directory=${DATA_DIR}'" - einfo "To stop:" - einfo " pg_ctl stop -D ${DATA_DIR}" - einfo - einfo "Or move the configuration files back:" - einfo "mv ${PGDATA}*.conf ${DATA_DIR}" - elif use systemd; then - einfo "You should use the 'postgresql-${SLOT}.service' unit to run PostgreSQL" - einfo "instead of 'pg_ctl'." - else - einfo "You should use the '${EROOT}/etc/init.d/postgresql-${SLOT}' script to run PostgreSQL" - einfo "instead of 'pg_ctl'." - fi -} - -src_test() { - if use server && [[ ${UID} -ne 0 ]] ; then - emake check - - einfo "If you think other tests besides the regression tests are necessary, please" - einfo "submit a bug including a patch for this ebuild to enable them." - else - use server || \ - ewarn 'Tests cannot be run without the "server" use flag enabled.' - [[ ${UID} -eq 0 ]] || \ - ewarn 'Tests cannot be run as root. Enable "userpriv" in FEATURES.' - - ewarn 'Skipping.' - fi -} diff --git a/dev-db/qdbm/Manifest b/dev-db/qdbm/Manifest index b5339325299a..039c6e522db7 100644 --- a/dev-db/qdbm/Manifest +++ b/dev-db/qdbm/Manifest @@ -1,7 +1,7 @@ -AUX qdbm-configure.patch 3385 BLAKE2B e2ed0d851476efdec349b2a2c18f260f4da205d3ec3e9c869056e4606855ed3814358821812c420e9d471ad4fe77b03e55fe0c5283850a39c313c6d9f916fbdc SHA512 a6eeed36b87bdaf9bbddbc7aa641cfca89e72e2e6c2acaec66b0444db9bd39f57afae0c8fb065293875c45dbb14ff6826a4c93061b7457c32b42943e8113d89a +AUX qdbm-configure.patch 5913 BLAKE2B a899d4d281eddbe974afd5969e4766d5f2eb55dfa545e6187003c4bb12f3224ead704cc1b14fd33841c8a9788832763d641ef04b5e49eee307aa71412d1301a4 SHA512 a15c513243f2b4976acf9a27f8572726bbaa7e55c7314228fa9fbc5899454c12d8c7efbf7ab24f1b3af427e64daded8ace1a5e4af4a227cae7fbb436e875461c AUX qdbm-perl.patch 1260 BLAKE2B e180ba6c2d57f6d813bbc6ae01ed787f6262a290eb59253b8950ec6f80ed29964e41cd3297b063db62e8c726a8e57399fe4ee52e67887bcaa74fad829b0b372f SHA512 a7356c2f5a4313e7da2524a6276bca5720459858d8619bfd8e6514cd9c1cd9aa1a2f7f0592e5ad1ee8b05e7e34452761e26be351f8e933e79a75cb4d19c862f3 AUX qdbm-ruby19.patch 10116 BLAKE2B 9a15c5d2e0cf8237edb78e68b2f9fde4868841bcca6abc08a33d110b9f25283e37fcb306c18bcca5495c7e5cedc778e3a2de2fe8414ce46c661a7c40d517cddc SHA512 f3e6c320a600ad3355fc74a333c28fc2dd904a2a52ca91a51f21b3dd14c7527bf312f5040dbc3e4f61d2dbcc0ade185e226333c79f9a04fc05437a156befc0e7 AUX qdbm-runpath.patch 1133 BLAKE2B 9b1c8c211d8e4075a77a34f3d79ca15cb3d833801777bdb328293047539bdd1a51c08031b3400c11d10732aa7864078ca8db02713a95cd90704e1a9e26f5bd10 SHA512 de8bde4a614617d742131e8025fd661019ec81b803817ef32ffca461b2c8b60c20756f6e6f84d6f23124eed3947ab3573b8c4a05b254f8b4d3e53f0cf7bc8452 DIST qdbm-1.8.78.tar.gz 1015429 BLAKE2B 1b985d856ff18ddfeb2d779694ba9a76006908b4b2a7509d4e3668aded80e08bbde28bcc24762ec27048cdc01dc84f9872dbfc221e8eea6f1c68f5e81cdc69d3 SHA512 480549c56071bf82edf714a611aef863599c858ed63702820ae0890fd2c0029d1a231ed94a8090c74420dd648bd3625d270a5c078b113cbb86a12ef509e19037 -EBUILD qdbm-1.8.78-r2.ebuild 3338 BLAKE2B 52c7b47ff2005a8676a00f2a7f50c6568981c9cda90f9dfa0cc848cd5a867251f058d4ecf593c1a0e7f67ea7296adad73682bcf59815c22e082d622506e64158 SHA512 392db2b680d34a6eff986e77d7144c51503aaec30f4219c691ff9d620dff271026c74d2b4542edacfb9b96201158a10d946940e33dbd2a8daa5ebd86e94d01b5 +EBUILD qdbm-1.8.78-r2.ebuild 3331 BLAKE2B 8e25cd8be385f4a87b7d06f4ec49171bc6ee1d10d04c0b09cff343f00de6eedc5be95b3bfe3db1c4a7e0895ccd49483b44d6df6633f2538bbba619f6b784a07d SHA512 9f1b389f512718a00a32f9ad7932d98aad94556d284811dad35d3eca0364769f412a1e9b3ba47429eb6430ceeb4a3933d75f0ced71d9a36fd61fa33af36f6cd3 MISC metadata.xml 221 BLAKE2B 6fb71e3c82061054a0c2d88c1ce8e591d5742628fe53032c9efd2c371ce1e8b0135b00ac91fa1905df39a507d5faa5871fb3a30d167dd46cec581682ba17c8ff SHA512 a11e9bbbabc9ac96985c5dc247e601b065fa762f12bce74224896c27aee34eb908187622bfc849c39c6c722a8ef8ee72b248afc84da1b0eb72f1ff5eeb13bbf0 diff --git a/dev-db/qdbm/files/qdbm-configure.patch b/dev-db/qdbm/files/qdbm-configure.patch index 364c5c9f653e..4eb62949f32f 100644 --- a/dev-db/qdbm/files/qdbm-configure.patch +++ b/dev-db/qdbm/files/qdbm-configure.patch @@ -18,10 +18,13 @@ #================================================================ --- a/configure.in +++ b/configure.in -@@ -20,15 +20,6 @@ - LD="ld" - AR="ar" - +@@ -17,17 +17,6 @@ + MYDEFS="" + MYOPTS="" + MGWLIBS="" +-LD="ld" +-AR="ar" +- -# Building paths -pathtmp="$PATH" -PATH="$HOME/bin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin" @@ -30,16 +33,56 @@ -LD_LIBRARY_PATH="$HOME/lib:/usr/local/lib:$LD_LIBRARY_PATH" -CPATH="$HOME/include:/usr/local/include:$CPATH" -export PATH LIBRARY_PATH LD_LIBRARY_PATH CPATH -- - #================================================================ + +@@ -186,19 +175,15 @@ + then + MYOPTS="-O1 -fno-omit-frame-pointer -fno-force-addr" + fi +-if gcc --version | egrep -i '^2\.(8|9)' > /dev/null 2>&1 ++if $CC --version | egrep -i '^2\.(8|9)' > /dev/null 2>&1 + then + MYOPTS="-O1 -fno-omit-frame-pointer -fno-force-addr" + fi + + # Linker +-printf 'checking for ld... ' +-if which ld | grep '/ld$' > /dev/null 2>&1 ++AC_CHECK_TOOL(LD, ld, no) ++if test "$LD" = "no" + then +- LD=`which ld` +- printf '%s\n' "$LD" +-else +- printf 'no\n' + if test "$isnowarn" != "yes" + then + printf '#================================================================\n' 1>&2 +@@ -208,13 +193,9 @@ + fi + + # Archiver +-printf 'checking for ar... ' +-if which ar | grep '/ar$' > /dev/null 2>&1 ++AC_CHECK_TOOL(AR, ar, no) ++if test "$AR" = "no" + then +- AR=`which ar` +- printf '%s\n' "$AR" +-else +- printf 'no\n' + if test "$isnowarn" != "yes" + then + printf '#================================================================\n' 1>&2 --- a/java/configure.in +++ b/java/configure.in -@@ -25,15 +25,6 @@ +@@ -23,16 +23,6 @@ + JAVARUN="java" + MYDEFS="" MYOPTS="" - LD="ld" - +-LD="ld" +- -# Building paths -pathtmp="$PATH" -PATH="$HOME/bin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin" @@ -48,10 +91,32 @@ -LD_LIBRARY_PATH="$HOME/lib:/usr/local/lib:$LD_LIBRARY_PATH" -CPATH="$HOME/include:/usr/local/include:$CPATH" -export PATH LIBRARY_PATH LD_LIBRARY_PATH CPATH -- - #================================================================ + +@@ -162,19 +152,15 @@ + then + MYOPTS="-O1" + fi +-if gcc --version | egrep -i '^2\.(8|9)' > /dev/null 2>&1 ++if $CC --version | egrep -i '^2\.(8|9)' > /dev/null 2>&1 + then + MYOPTS="-O1" + fi + + # Linker +-printf 'checking for ld... ' +-if which ld | grep '/ld$' > /dev/null 2>&1 ++AC_CHECK_TOOL(LD, ld, no) ++if test "$LD" = "no" + then +- LD=`which ld` +- printf '%s\n' "$LD" +-else +- printf 'no\n' + printf '#================================================================\n' 1>&2 + printf '# WARNING: ld is not found in PATH.\n' 1>&2 + printf '#================================================================\n' 1>&2 --- a/perl/configure.in +++ b/perl/configure.in @@ -5,15 +5,6 @@ @@ -72,10 +137,13 @@ then --- a/plus/configure.in +++ b/plus/configure.in -@@ -19,15 +19,6 @@ - LD="ld" - AR="ar" - +@@ -16,17 +16,6 @@ + TARGETS="all" + MYDEFS="" + MYOPTS="" +-LD="ld" +-AR="ar" +- -# Building paths -pathtmp="$PATH" -PATH="$HOME/bin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin" @@ -84,10 +152,47 @@ -LD_LIBRARY_PATH="$HOME/lib:/usr/local/lib:$LD_LIBRARY_PATH" -CPATH="$HOME/include:/usr/local/include:$CPATH" -export PATH LIBRARY_PATH LD_LIBRARY_PATH CPATH -- - #================================================================ + +@@ -75,32 +64,24 @@ + then + MYOPTS="-O1" + fi +-if gcc --version | egrep -i '^2\.(8|9)' > /dev/null 2>&1 ++if $CXX --version | egrep -i '^2\.(8|9)' > /dev/null 2>&1 + then + MYOPTS="-O1" + fi + + # Linker +-printf 'checking for ld... ' +-if which ld | grep '/ld$' > /dev/null 2>&1 ++AC_CHECK_TOOL(LD, ld, no) ++if test "$LD" = "no" + then +- LD=`which ld` +- printf '%s\n' "$LD" +-else +- printf 'no\n' + printf '#================================================================\n' 1>&2 + printf '# WARNING: ld is not found in PATH.\n' 1>&2 + printf '#================================================================\n' 1>&2 + fi + + # Archiver +-printf 'checking for ar... ' +-if which ar | grep '/ar$' > /dev/null 2>&1 ++AC_CHECK_TOOL(AR, ar, no) ++if test "$AR" = "no" + then +- AR=`which ar` +- printf '%s\n' "$AR" +-else +- printf 'no\n' + printf '#================================================================\n' 1>&2 + printf '# WARNING: ar is not found in PATH.\n' 1>&2 + printf '#================================================================\n' 1>&2 --- a/ruby/configure.in +++ b/ruby/configure.in @@ -5,15 +5,6 @@ diff --git a/dev-db/qdbm/qdbm-1.8.78-r2.ebuild b/dev-db/qdbm/qdbm-1.8.78-r2.ebuild index dc3d6dfc8c02..034733d2ae95 100644 --- a/dev-db/qdbm/qdbm-1.8.78-r2.ebuild +++ b/dev-db/qdbm/qdbm-1.8.78-r2.ebuild @@ -1,8 +1,8 @@ # Copyright 1999-2020 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI="6" -USE_RUBY="ruby21 ruby22 ruby23 ruby24" +EAPI="7" +USE_RUBY="ruby24 ruby25 ruby26" RUBY_OPTIONAL="yes" inherit autotools flag-o-matic java-pkg-opt-2 perl-functions ruby-ng diff --git a/dev-db/rqlite/Manifest b/dev-db/rqlite/Manifest index ac908a1e7426..e299f6e4331f 100644 --- a/dev-db/rqlite/Manifest +++ b/dev-db/rqlite/Manifest @@ -1,31 +1,81 @@ -DIST github.com-Bowery-prompt-fa8279994f75f982bdae3c827a3afffd78a6fe0d.tar.gz 11507 BLAKE2B 65e575ca929f642dc583ef8b7857437ef35a1f4f8a00d978e62187d7c8e781ec50f102c35f8c62f8bbe41c9ce6bd0347aaf017a5fa727d37e9124fa691e04d9f SHA512 6096c29ecc0adf02bb563c5b92f79a7d57b0d028f332cf5cd214317918a19618b394be88a5acab86c561c13994f6bdda94c80cd67f28cb87ac371097664ff0f0 -DIST github.com-armon-go-metrics-ec5e00d3c878b2a97bbe0884ef45ffd1b4f669f5.tar.gz 27423 BLAKE2B 48344146241205d76ae35407e4e5131db7277a7bcd2b44c966ed2c8fbfcd7bd628dcedb7538c28b9106643f8c0f2af4bf0985ada6cb58db0bff739583435b306 SHA512 bf28c4df0927296214f4e89263e30a6ab7c2f5fb62c20177e597890bb878f68df4aaf5445ff9af629864b38da8f506fb530f09ff22d5d8509ad7b5f4ca20a395 -DIST github.com-armon-go-metrics-v0.3.0.tar.gz 28377 BLAKE2B c2cc9e146b44098367dd7dee62dc57bd374c052c91317894f4ac0fc0338e77f4acb9d0a44de84c6b1fb8d1f4eae384b6b2db0db45bbeada856782946160643a6 SHA512 753d2e3eb41e93ed8f3b1b9b1f54ee05ad894e70bba431f84a69e939acd02fa5ae47811bb56a08b8769e05c0573de5db26df6235d6dc23958e82e98e22444d18 -DIST github.com-boltdb-bolt-v1.3.1.tar.gz 83437 BLAKE2B 460123b8a7a4edf489707bed8f4aab02b259fe472662770181df0bfde67d73014b8978ff2f0bcff74fc682b2c16f8841a683fbf8cd0234c112e7930375f89420 SHA512 35b57d4a0c1d8bf66ebb61635d99bc09cf446e41a3c513302b3b2f5e711d2b75f743db88fed26569407d21d9f3a7e0a4ba282ea32f94add9f21f8bc4fdfacaa8 -DIST github.com-golang-crypto-b544559bb6d1b5c62fba4af5e843ff542174f079.tar.gz 1712189 BLAKE2B c543b13f82ae1353f7efc053b27efdce4e5f817edac5ae8104652566dc3d9e3ffcdc6afbc9a403b2903e0e10f2a4f8f83c0f40eb29d1a619f78be775243fa5b7 SHA512 5521b2c37a70261de01e37e4a13c13a4c31cb1013ac42747e716086197cad92baecf6c2bd4850c307cd81fafb4e87d5839de6f4d427aa3b3ab12a65558b1b18c -DIST github.com-golang-crypto-becbf705a91575484002d598f87d74f0002801e7.tar.gz 1721384 BLAKE2B 201a2d4ad024ec443fc1ca51a99efe934fbb1f78c605eccaa850b34e6f0251e8de1ccdb423f91f62883fd664096e208a8e2a90c989f635e50cb1f62c3ea39252 SHA512 b3ee6c3899a9c1c623e0ed188ae39eb9c8171312f2c916e726d4b06436717f93acd53c3592462255db73de95e1f094b8bfbeb5fe79442f8c8023c7dc0d310bd4 -DIST github.com-golang-sys-33540a1f603772f9d4b761f416f5c10dade23e96.tar.gz 1500062 BLAKE2B 055c4eb37817dc15feffd6f42c1850cdfdd771f7512cb6b83d1917756ff0188c4155d78992d07d4183b165da81966bfce59d9e9e8a1c429594ebc0b82f9c6407 SHA512 6682c2a7ccfd7bdbc373c5ca9678a0b9a1a60c588e4758a82de8d295914392560d0eca00b8e4e5521af9a68e12c8ec216211a93bd98f76cdc860a5c573c7b2e1 -DIST github.com-golang-sys-6d18c012aee9febd81bbf9806760c8c4480e870d.tar.gz 1532865 BLAKE2B 35294c250562b5338ab9367cdd1f1b536e83914b915981cf503997456be45efcc1567ac0309d4b41a5918f0fb3735e256a5496056db618b67745ffc8423383fe SHA512 18a6556545687f54b637c4631189419272c3664f48c283c8cb011aed36fad8ab297b5301b0ee268e5841781b0e6d01f2296e9746a7627196633a69b15f96b7ea -DIST github.com-hashicorp-go-hclog-v0.9.1.tar.gz 26325 BLAKE2B 996e433c5241743ffbb76fd8f8ee9a10e73467a3ef945568bbc8bebf9ec09caada399436336d82fc458f2d2b531c06fba841690b32da08f54dc4496e09e365e6 SHA512 860ca7080571e96784b28b738e8ceaa8b6587dedafdfc15fa7f0ff03234fee4edb38858119980f0be73933c94e2601e455f7465d499a6ec4fc09a1b7775c619c -DIST github.com-hashicorp-go-immutable-radix-v1.0.0.tar.gz 19305 BLAKE2B a5f482b5694305fb7d2cf767135737a4b16c1d9e248c71a5c24f0d9439319f1d7a1a939683cc9bde84333010d050116b41ad99631170b90d05da075024093d37 SHA512 93c71dd8d1682b9d4f7940c1189e3569f16629bb8c4cfc25c2309bff933b8830168be320a3e6754355e885a681e61c7748f635d9930d6f1e8166630e4e5f4f80 -DIST github.com-hashicorp-go-immutable-radix-v1.1.0.tar.gz 22073 BLAKE2B 13961a0b78b894d72d33575eb58e11e98394952504fd62a0ccab70bb3d86dc7d6faa1fe314b0fcd8c835c004c056a23c59d137494df423c2470b938204c5f7b3 SHA512 85e4754e7d4cb19c00717d4273b5d8f5c68aa3349a6f28dfbd2f879be26b7d3711a2b5d092512a720946d5209d47ccfeb76d0e007b22354b2b9733daf90aa45d -DIST github.com-hashicorp-go-msgpack-v0.5.5.tar.gz 50069 BLAKE2B aae96b54b58b0eeab45956431cd3b5ce2115e5ff82a66e3b803bf2413aff2ebbaf9da9d6e9069639ee9828b0a9ba967888248d658c93c0085a920f8d9e408812 SHA512 956fb5839348587bc85385a2d822824001b5f08ab30c5e3fb5f82c1536021c8e2b429a736e04ffd6b338e7128caba63284cf9cae955451aa8444615937754cfc -DIST github.com-hashicorp-golang-lru-v0.5.0.tar.gz 12942 BLAKE2B e66204e963dae33e1d8a2494f79d477b71125f49c6cbd77a2cf7c960331baacdd0c1888ba454bb507c86884b5949e9c96cab25a6db868b4fad4608d11e8ed42e SHA512 16bce6d29adef579076465346455e850b84fd0418cf443d7825938c7d4b0e26232628bbed679a47786906c2933fc0df36edc26b65c7a94812691848ef59a0f1d -DIST github.com-hashicorp-golang-lru-v0.5.3.tar.gz 13348 BLAKE2B 598db380ae34bfc568d5a048e991e9bdd6d486800caa4c7d27ea96877f47e5fa5448b3bc30aa9d800a41755f9a17189c36ec738b8e7c00a51f2a80db3c270a1e SHA512 8775349e1c9df60a57a425f506ff53a1849aa4877a878583b59bc53f3e746f5b6c482ded9bed9182c68e1d12c5acc4bacebe7a6d41440234d4b40361bddb805d -DIST github.com-hashicorp-raft-boltdb-4207f1bf061751378aee6cdfe697965a13ab49d7.tar.gz 12593 BLAKE2B 5c0a5f6cbdc5eea057929fc089ccc5933769363eb7170e020d05e1ee55bcbf22497d7edbb493ce017352493fad139135c6e80c33d1089f814def3cecc8c5ab34 SHA512 680824f99ab9d35ad77367f26090ce2e73d70386167f340a7ba014cf286846475746c53439242434d6ddc8b82f066620bc72775887b4763a39542371e06c088a -DIST github.com-hashicorp-raft-v1.1.1.tar.gz 123392 BLAKE2B 6c367eed511cc040643188263850e792e1ef63ddeafc9de2779d1919f30a16c410b174524f37289782be143041373407cf7ebac39db3b9b78040149ee0bed7e0 SHA512 05d094e42d0f07b2e28060710e8fa46836ecb9d3851969d66d991e0d4c4979f4ae406d6810bdb686e0c0698428e492bca7513ddf3da6dcb2fb11a43b086715e3 -DIST github.com-labstack-gommon-v0.3.0.tar.gz 11426 BLAKE2B eb3b985c0da3dfff30c77d831c8d105d50175915693f7798428645ef8b7484038ce87a07b1eda7b7a2e7f2d43e510ddca1c7fce77f79dcd1edb011194dd2f425 SHA512 e52a4d954db07658d28f36b85466d09bcd14842e88a4d8c3c19d4c20011c33f2de892a01dc58585ee032749e1e22dd603854ae89a2fe7abd09ebc060c50dcbc9 -DIST github.com-mattn-go-colorable-v0.1.4.tar.gz 8981 BLAKE2B fc4f16bf9cc9f4e235b1313bb83c8e8df8509d200616c440b4edb8dd945e4c48cd97b0e999e6d181fa6e586f18a391e2e16c8a176ba1935372c6fb6e68205907 SHA512 a1050a0fc8cce89c874275a827e8643785ca9324dfc0b98230557134688c4a2ad0272d14b2a2d9c3afbde981ae0f4ea40b1527bab1762ea86a4b317d367ddac1 -DIST github.com-mattn-go-isatty-v0.0.10.tar.gz 4465 BLAKE2B 7da424fd365096386e752780fcda8403a93754bb030c564f5d6df705b931d8385b00d8226155370ed5ebff86c700e9aa2b2bab33fe72a1fd3f6a91c36124dc1a SHA512 76545b77aaa04effd15d2ffb450c19b9a4091f65833323fb7138d6a2dbcc37197a66a8782aeafdd54ed9171e07a0e5c0160d39cdeb2d067182fb4d7e339c8c95 -DIST github.com-mattn-go-isatty-v0.0.11.tar.gz 4396 BLAKE2B 302970e6579f3ba108c6366c5b2fa024f565416cee4ef08fd6c0e0699dd69dd328b5e393c7e5d726aa832609beb8328360970e940cf653848a5a9eac6cf5ccd1 SHA512 09d4098f6770aba747b977c0406fb0fe8424b3d10da716d16013a3088e25d86726430cab2957b411507a60400c38cfc3d8b0161db0a7245c14368edca12fe1a8 -DIST github.com-mattn-go-sqlite3-v1.13.0.tar.gz 2297510 BLAKE2B 04178518c27204cf7c549487c7dc08721532f5876c51acf6a8eabaf67bca943f1986dc8f7081c4f49362a0e54970c66056bb2d703c096f8220b7efbdb69e8ea4 SHA512 293dcd49724b06d51ffd3548df15573e07b155a62a910d90101c0515febb5bac7902afd8a68a002424bc77164f3ad5e00bc8f0c50361705674e88120be542338 -DIST github.com-mattn-go-sqlite3-v2.0.2.tar.gz 2298065 BLAKE2B c3afac24fb29b6d9f89306443fb406e51b0e5844f9a01a46d60ff9d739bdf13a9fc7cfea746f5e61902ef66b2b5b05bb07629eb8d15edd5acc16cb120fe2fcf5 SHA512 b5a2da7349efed145d77e8d3110d6406a6a78095d27653cba6ddd2374b0e99cbe2865a275bdc92517ecb93b5f5f784578bfc447d5b6bd805f3400e449b7854a4 -DIST github.com-mkideal-cli-v0.0.3.tar.gz 47485 BLAKE2B ee9f9847001bd0e792ee65cbfd57c7d4c61880b97110d40142ea75ebeb97ce690634801604f2952b02483e421617c51d0f83ff71651209a3bcae5635019b2f78 SHA512 aa86b0d59c61f58b7a64a7f58906be0adeeab6c6de55ca70574a862e07bde52871cc50f359c469b78154a2ab097555c02ea2796969f8a4d1bda96260b8b3cbf8 -DIST github.com-mkideal-pkg-3e188c9e7ecc83d0fe7040a9161ce3c67885470d.tar.gz 69219 BLAKE2B 6df0a553da3a225352c4e712c2fb7f12b73850e0e1c9d0aaf9eb0dc917c36a026a10db1b8b23d45070567d209a6298fef84e794347fdd1951d0ec421fa1c72d4 SHA512 1c6b5cd345da17f8c2691a4f132bcb8ce1e794db54ecdcf2bf20392bb2f3195db6c1579ffd220bb21f121ccbec0c8c9ea4160a4a6c38734c68d1e163622ec1cd -DIST rqlite-4.6.0.tar.gz 371493 BLAKE2B ac4699cae56602c66222909ecad734ff6ad3059c6b4d19e869bcec05e54cc9ad8a6c0f1e310f0dcedda22a86e985b8267aeda61e9b037b1bed832668eb18c4a8 SHA512 791f20d1a148169cf4c25a5f491c89ddd95885892ac0ad61586d52dd6d288291992b144edb5167ecd9e238038efffb7c7adbc786ac1d13b525452517d7dd1c0e -DIST rqlite-5.0.0.tar.gz 297648 BLAKE2B 734b26fdd4785cb6e59fdfd07c3f4303d9f0fdbf5d0801ea07b0c166d6f572351ea7d0eadb6a9767dc179a94a6d6e1425db10211a9d958bc5a48ac3e5f3ff3df SHA512 ca8182f0e8785d4cfbd2b2ecb25f6856ed65db9267502e6b37a848a0095415a201dcf6564eebfdd6ee0f802dca0b3f8abe7091c1aa282058eb675a4cb407b227 -DIST rqlite-5.1.0.tar.gz 300915 BLAKE2B 554b85fc01d2051cd13d5920196f59e59c6395eadddaa4e5920cbecb49f36575e284bef60c2d324db0b465a6ee4a6e4af1ee2a96b2d0eb7048402f87fa6cf258 SHA512 3a7279af09bbbdbc9ab37a0ebe4f39edc7a50b5b50231356fe8a96791b11876acd05cad0493c8a4d709c2358ae32a00146f5155765f6c300febaf2e07ccef15e -EBUILD rqlite-4.6.0.ebuild 1819 BLAKE2B ab536331490387d5230fb63fd2427cc12a694e52dd7b32a82ecea803c1678c4eea256e110f8b49b57e3c773eb9dd9fb5e4c248110d41fbec6aacdd874e6e2c0d SHA512 0886337d2932d9c1173679c631842c46163f8494a4bbace1fd059ec03b8bdfd44f11870bb09ac5b2cc28434d76398ff424e7ddb908b3c6d6f4ff68b9e06b4ea6 -EBUILD rqlite-5.0.0.ebuild 1779 BLAKE2B fa9b6e4b46aeab8b23fab8fc4a22066c9a894ac80bacd4fb3fec2d91827089ff7834093307b49f5e2e62064a8d28bb526b61a415d6374664889bf787851ac9e3 SHA512 b9bdd209f688d187da9b92c4ee832bdf9af9d71d65597f36343f24b1be3a7ae66ca294e262e989cff48e3f7d67d93fd01e3c55f90aed660225f48ab59ebb4190 -EBUILD rqlite-5.1.0.ebuild 1779 BLAKE2B 8f4240164dd5bd6a082e9dd54e8f4d46024d456931687b449e95ab5791f8e865b5472b7f5953244ea74c1e7c164a3f203bcae890b1e2564de1884730e0ef5610 SHA512 cedd2fbccc86155b179d693677d4b19cb282a473f164a503720eb8867a4e46e5baa6c195deed50ac12e527d50dbd55b6c3658277bf48bd06d3887c8bcd303a0b +DIST github.com%2F!bowery%2Fprompt%2F@v%2Fv0.0.0-20190916142128-fa8279994f75.mod 32 BLAKE2B 1993101cf60d3e6cb8eb318b265bdb167109bd5b0c5a446c155e19c7e36730268091bcd90e9b72a560fe421e8911ce38ea3045f2f903666a6714609ad254e4fa SHA512 c8e0182aa59575ecad31b0c9be0517ae55fc3daa8daa700252e4dc866def7ac16344bcfe9f081b941a3a2a837be262cee672855fe744efcfa447a43a6cd1bc61 +DIST github.com%2F!bowery%2Fprompt%2F@v%2Fv0.0.0-20190916142128-fa8279994f75.zip 19490 BLAKE2B 99ac55ccfb212ef98eb5ea2235dbedaccd46643b34e2fa963e31940b1553871abfd3e2223d807a557a92b97652877855870b390346b0e3441bf8bf521b49cfc1 SHA512 e7bda215393a6d5b4025566167f4b567dfe1da07baaa75b734afca117e24c9614f244c7452650d71e9a80b1f11299e64a0157cf8d8179c578148a9ae1dd6834d +DIST github.com%2F!data!dog%2Fdatadog-go%2F@v%2Fv2.2.0+incompatible.mod 37 BLAKE2B 74a94066231395cbd85f1dbbb68408161ef74781c0c686746f97365dceb3ca69e3b924a86e6639b5e4cbcf64928fa21245e6828339105a779a86bc4f132a5bf5 SHA512 da3a3499834784b7ace8158659956206fdb113000fdc84d54b6525805727e37029bdcf263afcbabe724d8b10f6601f1f38a985e6ac10fd0466907ae56da3edd7 +DIST github.com%2Farmon%2Fgo-metrics%2F@v%2Fv0.0.0-20190430140413-ec5e00d3c878.mod 582 BLAKE2B 92aab40d86d733eb8f751fb23e40621b5b3bbfbd8b1d194bc6e689b6df763b4030aa83ab78654dc8e536274af6de247b8fc7e4e35e6cbf2f6fb5532291deec6b SHA512 aa43d2e262a603661ac3dc7aef111aea6e348e11c5384840d2be06224a6c2c580fcc0e3c6645a0d48b48826b0aff92562f0c6504eae980ff5610d2ffd2255d88 +DIST github.com%2Farmon%2Fgo-metrics%2F@v%2Fv0.0.0-20190430140413-ec5e00d3c878.zip 41353 BLAKE2B 850ec7d356246c8b47c8594aaba8db95d979ca7fb50b383ec02c6802faf089bb170ea7e86f7e1fe8f95fbed4208c6f39c307871d74b8052de5ccd9d6ae29d49e SHA512 b533a51ecc7709cb74da88cd3dea70b3605e75a88b93d16aca5aafa100352002f5b1c1c6d9c33d6c93ce74663d27b7cf82c8fa8db7aadca4d42e8a7f6354f78e +DIST github.com%2Fbeorn7%2Fperks%2F@v%2Fv0.0.0-20180321164747-3a771d992973.mod 31 BLAKE2B f69b0989e51b0b649f81b044169fe4309f130eba5bcc6ff33aa9666b1b754aa0e524b8c7a627a91000ccc4f93bf93cdee3e97bd3b2184b050878bc3f413f0c72 SHA512 f21fd002853e4435421f8396e6be016f65be1537815c60d23940caf26e3f14dd6f2caac802cb64cd586b1b1f1220b2727de347b3d1816b8e741f68d87ebcf03f +DIST github.com%2Fboltdb%2Fbolt%2F@v%2Fv1.3.1.mod 30 BLAKE2B bf7d457fdd333781e403b93aac891f5a0a8e202c62983ec6e34ab559ea5624c3e6cc525416fe400c7a0af20a3f647b49eac5717aa749d9ff79b02fe994c36d42 SHA512 7a1ef7d0fc6d5a3a8530b44dd5aa23d4248d952fd573b9f0f6f630b1bc38fa5c9c65ecc4894734c7115a8a0c7c71e8d0e2da0773ed4c5779c23f7f294e1e7d5f +DIST github.com%2Fboltdb%2Fbolt%2F@v%2Fv1.3.1.zip 99852 BLAKE2B 9151e6475685ff3b550d1ae1291778a01793f691a3ddb007d64fa49f02ee85927c834ad709dee5fcba0f071630cd62504a65fd4344d4ea5b9fb713787bf6b725 SHA512 837cbbdb0a91efd765e697e01bc64f0206897d6363b303c96ba53062d674623b19d8c86d96a867529f1dfd6689240e18ae7c25dee268542d46e2877dcbf83848 +DIST github.com%2Fcirconus-labs%2Fcirconus-gometrics%2F@v%2Fv2.3.1+incompatible.mod 51 BLAKE2B 3d0af1f8d7979de88067539579b73ce3d5d81a477ff042831692c738e9b4c99de13a3beb20fde003df06145e26d472621a2ff2857fd584aa1527df3730fc5efd SHA512 d1c83d2dbd4e242bfa9d8b9b58cddbd4a1ad112d1f5d1ca757fc31c6a31bf460d08cc3c9bf14c977fa74d2099ec83d5e45c05fd6121f800e26da6a837d862ccd +DIST github.com%2Fcirconus-labs%2Fcirconusllhist%2F@v%2Fv0.1.3.mod 47 BLAKE2B ef512f7530c4c3fc3319129afa2fdb655d40af9aca697d22e4470528cc41ef9dd5ffea2258792d0efc7e1e5de2de2fe760651df84c3d39989c4d96b58e85371c SHA512 027b177fb04d5bcfaa0e524e6682b639bd91f7aad9ba14e22cc1b4f352e2c3bcd4d93348ed013cd839eccdb01449db40170243e7895c2cfa3f6980279faf39e3 +DIST github.com%2Fdavecgh%2Fgo-spew%2F@v%2Fv1.1.0.mod 34 BLAKE2B 7e09c2779bf7a84a9271e31522ebbe600a1c11b107d651d91f58c8373e4336332a3a881f3e12b382543d75f20398af66085fcb3e780eed341e870e9c30f29267 SHA512 5e079462f7e0dff0efda71f580aa185700cfa936b718a19d0e2a8c63212e47a07022dca0c282832d48e5165aae8e82aeeeb2ac3664268f1148fc772010fb860e +DIST github.com%2Fdavecgh%2Fgo-spew%2F@v%2Fv1.1.1.mod 34 BLAKE2B 7e09c2779bf7a84a9271e31522ebbe600a1c11b107d651d91f58c8373e4336332a3a881f3e12b382543d75f20398af66085fcb3e780eed341e870e9c30f29267 SHA512 5e079462f7e0dff0efda71f580aa185700cfa936b718a19d0e2a8c63212e47a07022dca0c282832d48e5165aae8e82aeeeb2ac3664268f1148fc772010fb860e +DIST github.com%2Fgolang%2Fprotobuf%2F@v%2Fv1.2.0.mod 34 BLAKE2B a4239cba934b6e80714b93d47e88f22ad28ce41d1d984c4261cc3f5f3b857fb28785223fa911b258e2665be2a9d24ffbd925e9e0f374452a2aacd712ad9d5f75 SHA512 e059a34363bb826bbcb8981adbfc10da90e04b86dc5376ab20bdfe1fab135953cff41ef1daa116aff10e9f3e6503168f6baf902f09aa0e8cd9a0da96b932f4b6 +DIST github.com%2Fhashicorp%2Fgo-cleanhttp%2F@v%2Fv0.5.0.mod 41 BLAKE2B 927bedbe012a3bba2fb1363bf0157795f58be7dde5d303332f72ae6d7bd13775e9e1e034db821821857801b21b2366a92a28bcb84c00704a12925db0ce19a4e4 SHA512 302b6f472b54597aaeb4b43528098b5a5264acc97abf2228d8cb62bf32e6a29a7171ec6fb8898b494ffe837ee044e58f5596bff425214985aacd2b8b69934341 +DIST github.com%2Fhashicorp%2Fgo-hclog%2F@v%2Fv0.9.1.mod 183 BLAKE2B dceb26b60f2c77dd17451ba54fbf981f8033b7a1a840f938fd56454cb0af56273e260b1fadf2f708072dcda4cb26a1bc3b10497790ae128efaaefcd326c84520 SHA512 84dafac5d0770fdf20eae443ab6262dd3a32737c62908830a941b2593f683f35b0c33c009cfd2b24d3cf86a3701b9c3ffba84b77e66840201348591277ea6f8c +DIST github.com%2Fhashicorp%2Fgo-hclog%2F@v%2Fv0.9.1.zip 34982 BLAKE2B 182c247773cc6c2ad4ae42f255fb4e1c7f2e9664b07141e36bd763e498afa315e34e24007b6a8e857422dae46a99c199666effa09d1935888d2c96fd2fcc5bd9 SHA512 98eb544687e67eecfca40a285133e306402cade215b9776f5276c16113c0da1484795195894b0b0eb6a965909c1658ce0acafd3d98864cf2d2fa246fe5b18d94 +DIST github.com%2Fhashicorp%2Fgo-immutable-radix%2F@v%2Fv1.0.0.mod 137 BLAKE2B ca790b5dd3ebd80c7fa24936acad0e033a7376302440c349d53debe64672d75703e83086fdaab607bb87dca35fe7640b2ed941069692dfc9ae37d4a256c7be3e SHA512 aadecf34782d4b40af684ef29e5e45f560d3593b52d5b6ac6b95664c02c04565fd29dc2d48bf1519091129b86856aec732fde408a8acdba41ff9a7ca12bab140 +DIST github.com%2Fhashicorp%2Fgo-immutable-radix%2F@v%2Fv1.0.0.zip 23003 BLAKE2B fa553bc49f3f28624830aa0323b0c668db17d7628ca24b280eb718711c240e67fa6ec86b61c7fb5799b63085b570238d07c925a8cbc13e95b9d73d00e4a2ff65 SHA512 91c7b40e4125c3350ac4700bab85547840a8cc848f01bab06bde2eb51693a6dfd584fff718bd2425c67b15757e6e3f8a779cdbb051afff2094444f4bcb080ba8 +DIST github.com%2Fhashicorp%2Fgo-msgpack%2F@v%2Fv0.5.5.mod 39 BLAKE2B c5b445c060258545233b5453482e0c739f815c1ff605b539610f3b0bdbadb6da88954c6a408084f171354256bb8521b528573f56080d4125f4fac474ff9bde83 SHA512 45b4424a023ea15d95167322e022269e32f7a718dbeaf192d0cee9f6bd136f5b4a26827d6d041a8103a95f622a0dc92123b32e6463254199893f360ad8680de0 +DIST github.com%2Fhashicorp%2Fgo-msgpack%2F@v%2Fv0.5.5.zip 63182 BLAKE2B 6f6ca7aef3a60232a715cecb6f2a4f642fc32388229890699371d7a901498726bace0e37c800db4096769c65cebef01dc4abff9a111daa3cae8fd8352ff18174 SHA512 a50702f312dc7b0a9dc95c3415980e51d082e0c36820917b7ff5bc0965e06d5ead6d7749cf8c87c7671456e9c07e9625e342b644aa6f49a10b4483a198f845b4 +DIST github.com%2Fhashicorp%2Fgo-retryablehttp%2F@v%2Fv0.5.3.mod 95 BLAKE2B 66af3c20daaa7307f453ab70f7f8db429de6202fef7ad27c4c54f6a37d5c06c253df6ea24ed2315fa8208107187615b7e5d7a5aeae2cd1fcfd3be407e8f67fe7 SHA512 472addc2b61db4d72d356e2033b0963352d5baed7e2c28a567ec4f4f8a4cdf199d50de2022d136f9ef85ee5e0329c2e4b9a6797e4ef07e348fe7976aec56088b +DIST github.com%2Fhashicorp%2Fgo-uuid%2F@v%2Fv1.0.0.mod 36 BLAKE2B 8596defaedca9def85f29cb25a0ae25f8d2ec8eb64d64bd143a237d54d4d23b6851cad71a580667127188cc22d499be07628ce9c916dba946e7b189b612cfc76 SHA512 900755decba72d81cb348184648aa676c4a4c7359cc88ba3b41ebdd7691eeff401a41a495bdca7747e82274b3b2b61499b599e67b5c7369caaf766ea3e488d0e +DIST github.com%2Fhashicorp%2Fgolang-lru%2F@v%2Fv0.5.0.mod 39 BLAKE2B 13f90f934356dd1daefd27a94bb7a8c31f09835ea69f3fc83d343004858c6728bdd6bfaaa919331f7ee04744d18ac37f46a13be9feaa20e24e88ee364991a9b0 SHA512 bc3e0c3b16454e0f079bef539857c22f09ebf11e78ac1744a22f5af87d7297979b7ccdd48e4f59605cac562c268c3cacdbf2745f65be5c934f73f216707120e1 +DIST github.com%2Fhashicorp%2Fgolang-lru%2F@v%2Fv0.5.0.zip 19501 BLAKE2B 6c60c3832f5bd1d3c50b058611c9896a3db90dd727401506bdcb656966368cc9af7d8384a714e370dd69714856b63351db4485716dff566c3518434919cc4035 SHA512 02cde99c414bb38d5586ce722128e6c9a940583c9c4a99f1ec30787988235de6a3a1c516c150aa2bc94dab7723a9988c7efa2d8b151d05c9c36c04af6d145168 +DIST github.com%2Fhashicorp%2Fraft%2F@v%2Fv1.1.0.mod 233 BLAKE2B 5a1324854b1f65cb37077cee6097e04e24f099eb48355d84f8df7b82f5bc8b0ecf01021c63591cb83363c1b8156455ce86a0a2599f9ba6ec2a94fafd107df1ad SHA512 a687048d5ba12f826081a5c4c39501e0dfe949b98e7c8b4b4bfa2b9be27fb650d6fe8ec31ca379ab0c13b79909a1edbe1f410500651f7226206bd4e0d21eb296 +DIST github.com%2Fhashicorp%2Fraft%2F@v%2Fv1.1.1.mod 410 BLAKE2B 192e571d096d665a55c29da1dc35ba17c52d6f5b0c3f522c80b355bf881ffe269b27a62fe44761143966aaa5bede99800918999a313869c1a81dba98b710a1ad SHA512 e44c233e6bf407eac6a4eb6f7a72dc0118575b6dfe48a9d0afb95d99a847ad30f75b11e6d008238b7761965182df56e52ec183bb0905e054a638c76898368e6d +DIST github.com%2Fhashicorp%2Fraft%2F@v%2Fv1.1.1.zip 151101 BLAKE2B 41c638b0934f697256c87b5d034010ee49bf42740a5152005effcba78d29911ee2e981e6e6643df6f804bf38675b2dcb961161f2a8c912d514d007dd349512f4 SHA512 d4aaa571f5f30c87a37f70ce4b190665386e943bf107931cb0650eb54b2480b9acf31e8b83a66b1a8bef11d088a80c522ee70a4b85ee25ab1b28d7cc44d0e131 +DIST github.com%2Fhashicorp%2Fraft-boltdb%2F@v%2Fv0.0.0-20171010151810-6e5ba93211ea.mod 40 BLAKE2B 77f35128903a84139dfc23055bf87c4fd8b4843953c764f0ec004a8a2b10599de19bd767a569080422179bd8ad66218d3639025cf1d83eb5cab22599b5da2c3a SHA512 76ce93f04caa8045ed49fccbbbfe76fc278bb7d94c973e408d0695e8c9c5e569b3dc9d4af8722f13c4718753aa72fea76a238dc8243aff34bbfd10d4b684e38a +DIST github.com%2Fhashicorp%2Fraft-boltdb%2F@v%2Fv0.0.0-20191021154308-4207f1bf0617.mod 232 BLAKE2B 8404f0438360f34a406d86a852fc15ac2941ef34a859041d198d56878bef4e8e4896c960ffbe02690bf5debad6c0dc23d8a75bb2e943a624784643111c290ea9 SHA512 b0171397f8a45df46dfa4962e4d2520b8c2fcfaeb90f990dc26ddfb825525201a8139fbc56f8f1108d82788b1ab1a10fbf99c72fcac1b34c6feed48ebb1d3ba6 +DIST github.com%2Fhashicorp%2Fraft-boltdb%2F@v%2Fv0.0.0-20191021154308-4207f1bf0617.zip 15107 BLAKE2B 8cd0e37800a81dc40d2d4ad380483df6cbb96862c1900ef2c24f22c28bffacdedf4dda733698e3afb70462aa302aaf0b20ae1efcd4fef1433f39eb438b622090 SHA512 a780cc5d38b200bd8bcd3bc9b4178ebe2d6486b229fc42142a0739cf5f5075053b359624282e9b2154790841445c11fc43757f36a2e9f806108284c743ca936e +DIST github.com%2Flabstack%2Fgommon%2F@v%2Fv0.3.0.mod 205 BLAKE2B eef043d3215773a25c3caa1b744edf92fed91eb6574ee5e41affb1575779404de9247fe0197a9653055ee53d7133c91daae259adf62f0863bd2804e2cab36fc2 SHA512 55556ccd01e407be90eaf0818419d88be225e0296c4cd7610cc48e753f990bee5dc0f77f40ac824def0574f6f396f1401a3ab5130e1d4edc606a8d0cc09632e8 +DIST github.com%2Flabstack%2Fgommon%2F@v%2Fv0.3.0.zip 16495 BLAKE2B 0685bc1a8735d96d8d6b6c4131561f42cd4a181ecd41468b5045d3d92755253fdce9152a18b554c70b63eeca982e93ccb21691231eec20709fe17c39b814951b SHA512 68a6bbc146314b0ff55fbaddf18ae453081e5f9379f3cff037ae6baaf747d390767d056eee66c7a38f31b3926df2ea400508c2ce6be73c36ce80dfcad75bdc27 +DIST github.com%2Fmattn%2Fgo-colorable%2F@v%2Fv0.1.2.mod 80 BLAKE2B 486156a648d66786de2a05b45b054ffbc6ccbb45ffe98230d3b3126ff533fd546af1b348fdcf67b1b3ae9310918869355fc39390a4f67b99cd7a1bbd1c6cf891 SHA512 f69ecc2e8097c17a9c0002181451d56a8a7496f62e87f437802420e9af27c5f80da2be189597759f2a5ee2656dca8c1cf91a5374b8e46919f7a6e0f9579d2526 +DIST github.com%2Fmattn%2Fgo-colorable%2F@v%2Fv0.1.4.mod 80 BLAKE2B 486156a648d66786de2a05b45b054ffbc6ccbb45ffe98230d3b3126ff533fd546af1b348fdcf67b1b3ae9310918869355fc39390a4f67b99cd7a1bbd1c6cf891 SHA512 f69ecc2e8097c17a9c0002181451d56a8a7496f62e87f437802420e9af27c5f80da2be189597759f2a5ee2656dca8c1cf91a5374b8e46919f7a6e0f9579d2526 +DIST github.com%2Fmattn%2Fgo-colorable%2F@v%2Fv0.1.4.zip 12838 BLAKE2B 668586a4df02fa2d5db174a4ada1245a463946d4bccdef2599b791414af4f10eb07f56c61484977eeb21499db7f9b46f8fea03feebbaae5511504c13e3f7a64d SHA512 c3104e921a94b1a424cbf6936e8e5cdf5823947132f41190c211e050c9c8b7135c7b319eee0667a2b958c9f4fda27b9cbad4436d37b512e269716249dbfbef65 +DIST github.com%2Fmattn%2Fgo-isatty%2F@v%2Fv0.0.11.mod 104 BLAKE2B b8d6df41ff2e8952e12f0518d455969d7a496b8318052ca37ffabc663d9602b9df70385274818af8bf1b50e70a44ade59b0436133e08818ceb385d34a3b44c03 SHA512 218110264da1c7396295627414259fcc65cc9823216d6c03f2a6d7499e17205e540821add3216ba673efda92f1e5bfbb817416874fc745ed1d926c43fdd9bc99 +DIST github.com%2Fmattn%2Fgo-isatty%2F@v%2Fv0.0.11.zip 8885 BLAKE2B a9d15d5bb4264391abb906ef4b8ec929ecf61d0bbc781ad37aa36e236cf92f5a97f2035c0c08bb49c85142df10ba129c4c1755ede5bc8ec71743300f60af3d47 SHA512 4430b33d70f0fe35d07aefd6320ca0d8e49b71689d93b49e021e1893f8f9f043f8a6d16705e5517a600a538b3f35fed8f14a69a985b2955e8b6f34c19605c83f +DIST github.com%2Fmattn%2Fgo-isatty%2F@v%2Fv0.0.8.mod 95 BLAKE2B bb0de423d1270e7ec38c7ee345c788b23e2083b05e4f745832327358c4c054ef8d2f3f48d9bb7bc669ddc67796ca0abae164c1d40b2def5f38749d8ee4bd6f32 SHA512 923114bfd285393d06f681ba57db69f042f57d8cd7817a1611c7719121c812de8023a049024165e10112bda31a7f99d3bfe0d4c4f419557ba8909a2d005be405 +DIST github.com%2Fmattn%2Fgo-isatty%2F@v%2Fv0.0.9.mod 95 BLAKE2B 21f86775ef310fa5f1cbd773890d231e9dc64fbf2dfabaa3b7dab027f5cb1ee9880adaadf6b8a9a2b181db838e5fe26d7349442b591d925ca24ec7788d887ef5 SHA512 64b61a0f9ba20ae004a305963046d91b7b66e3659b67fc15350a0afa625ecf4892854e1829dabd589482d844a248aa73a56dc970784f2a03f6492a0010c5c665 +DIST github.com%2Fmattn%2Fgo-sqlite3%2F@v%2Fv2.0.2+incompatible.mod 35 BLAKE2B dfade1d4d17af2380cb103ad9a0c91ce0eb7e570f9ab98d32c8d74a9056b1ba89c44c6fbceb4a2d5e5d45bb552a18e5845b1c40d8d1efbe5a9aa87e4af0ae2cd SHA512 c929334b82e3174b98a22bcc58dffd1291e3bcea6c5f789ab36296353cafe0b09640ba7015ff559acdaef58a9212b0367bada54aa89f563c6dd4773f3220c04e +DIST github.com%2Fmattn%2Fgo-sqlite3%2F@v%2Fv2.0.2+incompatible.zip 2361860 BLAKE2B 6420b95ece069525858fe5e3aa75b0df800fd2dd550cd13b2038273a49d9c2b7564cdbbc43ac95c7fc54d3de595ce7100027983f0aaf12040aa6364479ab2842 SHA512 65f289de2498d947152eacf0de984f6a1366665dd0aaf957af34327b606d9d96a4ad22adc60ac625226a46982e35c9ab2f0949641f74679876bee6c37a75f042 +DIST github.com%2Fmatttproud%2Fgolang_protobuf_extensions%2F@v%2Fv1.0.1.mod 56 BLAKE2B 50d2d6dc9c1ee92d629af8c9aae9fe5f70a0c6fe270a95a8232cee3c50132ef90c68218ac64a3b5b72d94e23ecbea5f567fef39a81be3d4585bae3f4f5348545 SHA512 5235188477921a263176fefaffccdaca4bf8175a2e248356a06596e37fa868400203172c7fe9fb80d0a65d335d23d80edefd242657de0eb83d9360589e063bba +DIST github.com%2Fmkideal%2Fcli%2F@v%2Fv0.0.3.mod 30 BLAKE2B 15a777a1125c102b5d3e25b1c478cfd9612a39b5240bc84864acd2b421cc5825f11d72312bd6fe9b61f0538ca49be08a7533755b6d48a6b5466b9a6c14e12489 SHA512 d539c09d037675b742f5993040f4c6474f4a927f5b2f84b9bd20e76f5b1cc8a3f85dbb23f88feff7d98faafae0d6e8db21886f88429ce9d8137d6e8d2fb86b3c +DIST github.com%2Fmkideal%2Fcli%2F@v%2Fv0.0.3.zip 80501 BLAKE2B 43ddf3dae35f3d4140f14dbb9888e0bce93b96d149ebe480d49b393407304c189e747f13e57c3c03236c209b5668e5d58ef3caf6acbd585fc84b0ee9468db2c5 SHA512 4d722e560fb0b94280c748567569f6dbb467c0492414dada3ed249d69fed2908bd6389b454527a0ae261252816a368d5566f9dba58337588a55c2b21816dfd10 +DIST github.com%2Fmkideal%2Fpkg%2F@v%2Fv0.0.0-20170503154153-3e188c9e7ecc.mod 30 BLAKE2B be0d67c172ff76b8c4576e2e76e3c56418280ab4e8981e832f11f0105e22440e1a881c7b928752edd9596eccc62d478d87e210e9b1207ff65227d8ca16e7a69b SHA512 a4c91adb03651c89f0954d03648876fc0738a879fe0d13aab60e8b645897a1f1d6f6954aa42761e95a079946a9f072b0c8d4d0b8b34b9978dab9cebb72e12ea8 +DIST github.com%2Fmkideal%2Fpkg%2F@v%2Fv0.0.0-20170503154153-3e188c9e7ecc.zip 112591 BLAKE2B a67b96f3d477b6522a6df1d39223e7c9f53baebf657c6e321771ee4409cca356c7e6a0ca7eb36a0370cb1bb9fc27cfb4e60401ee967968e56b28adc999a451d0 SHA512 b4986d45c9390796b1cc4bb173e2c2e441751439004663e04b4f3fb05064620fdfa998fb85a6797b9f5cd06bebe9b85cded46eca38860bd09d588c456b0cae15 +DIST github.com%2Fpascaldekloe%2Fgoe%2F@v%2Fv0.1.0.mod 35 BLAKE2B 3db6c40257f2c4b0254a26c6e414fdc87c037f6312d4bf7bbd39420d6df70f50eab84c387b54cc71fe16068e1b25e3fc63a833e11cf5b4346f842bc61328b0dc SHA512 0b378d1e15db4fc5a3d7d711b63dedefd141d607192344c8d1ab2ac755ab9c6e91b2c320378ac8a485cf94deee59e6628e7930017c6d659bead6ba89cd78a802 +DIST github.com%2Fpkg%2Ferrors%2F@v%2Fv0.8.1.mod 29 BLAKE2B 7fb53b19bd1be0e783039647b42ecbe2070f51af102e473ec6d3544eea0ffa5863f1874ca1615348d5f8abbaa39c841b4fe18d43a8a615fa648cf22f35955e38 SHA512 0c156e21d35c45a89c1a1b69ff1976b4f7511b3870bf96126121f5a5effa3723eb45bf080e840d5c8b96898c65207dba83eb3e1a23668dd8a5e20ee6be775cc0 +DIST github.com%2Fpmezard%2Fgo-difflib%2F@v%2Fv1.0.0.mod 37 BLAKE2B 94636062c94f8ff68cdcab7593a3acae7b9ffff616cad7b1d5c9cd147a4a1042d33666cbeed6fd816d6793113abfb595183097dcc46de7a3dfadc1423ed43e79 SHA512 c3d5c48cdb8ba6af7071a07cfede06e0ab67e3726d9de592a952fad40167dcbdd9621dc2c4df1bd3c28eb99d70b1b6d8d812441237c35bf492e5b7f07bd33902 +DIST github.com%2Fprometheus%2Fclient_golang%2F@v%2Fv0.9.2.mod 540 BLAKE2B 4d43a0901fa46da74e62fa22f61dfebdf6468f2766bd43dfd487d7a5434f961d181ecf26015ff9134e8d3f9c2dc03da6abbcd0030348facda3a499af9a04665d SHA512 9add81238044589ae2cf38042b963953d507e40945118fd62ac1cbf41bde1b001a69423c50b7045b721488b3d53489b4ce3c544b68f6c4e31e340d2581f7c8a6 +DIST github.com%2Fprometheus%2Fclient_model%2F@v%2Fv0.0.0-20180712105110-5c3871d89910.mod 42 BLAKE2B 5519896b44b7bc3089a8965dc61aae63745c64ba1a390d3fff1202be7f8dd34f59862c04b49e377d6616a93a0341662becce65d431d445703a160ba49eda208b SHA512 c84dfe43954b19c1e4ac5ff8738e79db469f3bc1dc55e69b12503d0a5cf125cc74f4797ddbfe64b2a1bd1e2940575c32678671d51f67161c4f5b53b2a85ac46a +DIST github.com%2Fprometheus%2Fcommon%2F@v%2Fv0.0.0-20181126121408-4724e9255275.mod 36 BLAKE2B 39120b6af83d45857c990115ff52d8828278a9ce158b01621d8dcc517c23ff139532a2c2e53ec97616f0c65a2e0db3ede7c5fe59eb33be277e2c60650362b232 SHA512 1b262da0100655c3a56c0e551866491b81d2b88fd5fed9cc43a57bce3634c88c82c798ed1a823237011f6be68b5f0e1fe8284526cd68204851de30a44fc34fbf +DIST github.com%2Fprometheus%2Fprocfs%2F@v%2Fv0.0.0-20181204211112-1dc9a6cbc91a.mod 36 BLAKE2B 3c6acbd1022261065a321c6f3cfa2946b58011f45fae9b98761397eb7e5e0984dae4ea34c4f837f798ab29ca8e26ed3f07771be10e500a99ce7e5e9f4c401b5c SHA512 05f032eba0c264b186936c2b9831624a01999972d4f1bba6aa15c452407eb10d402f1ac674eb41e2d24fa66e85ae2e56efd2326fc4ecc741169b9908d7935335 +DIST github.com%2Fstretchr%2Fobjx%2F@v%2Fv0.1.0.mod 32 BLAKE2B d698910da1ef00a70a1673b8c74105de195020ccd95d1e70c5dd1e1615210886ff9acbc9cfd03f46e99f5223b60b04695b8d362b9e0edd4e485480f802bd229a SHA512 4e366e5a60559a8863cb2a50280deb307d8bf885ca5440cce1b49a084b4cc4583b3481240125f35f161226592a43f2c0a426152f117d79b68c92c72a93f751d5 +DIST github.com%2Fstretchr%2Ftestify%2F@v%2Fv1.2.2.mod 35 BLAKE2B 0357260904c9ba41892132c7e07d2add9b10ce4a09e8db4966219d1f515f917581e2afa0987094c90759634bc2aeb66e758074e023ff331a8337f5090c0102f6 SHA512 5b7ce867497852e4918b8cde5f75ecf2f24b9c95ad112478ac132322e904243f1cea3d16f5731646efb669256dbefc129ac70a499c8b1d25403a14c7e4fad10b +DIST github.com%2Fstretchr%2Ftestify%2F@v%2Fv1.3.0.mod 154 BLAKE2B 60cd7801e7cd33746305cd636b048b25a86270ec3b29a21c3c078c7e95b769bce7e80c2c7c5474113786bd788c7f88f3719e34f02141038e0d161b36e32f39b9 SHA512 bb808fad059f5abd0171e4bdc724411eff2c7e8d303a4ffb3608a00e21bb3cfafe9e83b4b4e9bccd42c9a4331f67ddc6043e3dd5eaa9a122c86626eed43a8383 +DIST github.com%2Fstretchr%2Ftestify%2F@v%2Fv1.4.0.mod 179 BLAKE2B 3bb7cee3118f0d335ade107dfefc3a594dc3883564fe4c9e96d615e179d394a49a3d6cd6584ba9c684772bc3dc6479af6a168dd3841c03957252667384f6ba11 SHA512 243bf1f69c146252164ad72f853773dcc77f15d7c9e9b731bee26a95e7c8f4ce9ed9738db601b01edb82f4b3808873e1f153a6d4a0c97be0babbe65abc0f8d52 +DIST github.com%2Ftv42%2Fhttpunix%2F@v%2Fv0.0.0-20150427012821-b75d8614f926.mod 32 BLAKE2B c5bd918ed79f8ad33509bee3028b85da9941f721e12735da810f7cf4238ddf83d3c5b7634c01944ebbe9d0c77fea36d5480d945d2dad9d9126cdb5ceb1cc1d11 SHA512 4168487b908d7fbec0813e5ac4d1cc854216d2355fd2843c2856ce81ee7bc399d9fc2b0811b5fbf1f0f1f26e92d327aab3d54b30809ffed621aff37a706e3417 +DIST github.com%2Fvalyala%2Fbytebufferpool%2F@v%2Fv1.0.0.mod 41 BLAKE2B b7c7dfaa36f45deedb2b403a7a0f09577321cdcd86d714724f9d8dd8044c05aae91dbee433deec1dc094d8af6ceb8d01924bf4a9812b7521ce52ffe5678e4a22 SHA512 887a7529d78ca53e5e8822ac041705ae20c34c337b1bb94d3f6b671e4afd2dbdcce3a52aac4a42defe3da92fde14eef180bc01293040f6150c362f23408e3fa3 +DIST github.com%2Fvalyala%2Ffasttemplate%2F@v%2Fv1.0.1.mod 89 BLAKE2B 6dd7632179015369088b8e1271127271daac6a3af65032e723691e1d19ae50428b705a8f417950dd1b86c6aae63a0518636029f589eb4ef722e1c21ef0d0aa9a SHA512 02820d9107d43b1d41e74fb2281edb421bd95f852ae1062536d3f2ad9d6e97e2154b90a831f4618a0f83f9c4a828c176759132c0565a7a4d99dfe3b76e5f6d10 +DIST golang.org%2Fx%2Fcrypto%2F@v%2Fv0.0.0-20190308221718-c2843e01d9a2.mod 88 BLAKE2B aec7d0eea1278eb3d1568d5bfb4041267501ad14457ebfcbdbc5fe21473170b8616ca4028f52af2edbfd85922cbe04540b4b0df7f69f63197698143cc5557a7a SHA512 2df49895053b36fed7ea905aa73f86568fbafd79ff0a7976679d8c77cf15025129435d9dbfd89367b611b1aadbea4f4bd1835eb4efa9ea702466e443638d379e +DIST golang.org%2Fx%2Fcrypto%2F@v%2Fv0.0.0-20191219195013-becbf705a915.mod 155 BLAKE2B 8bba3353db8ceb3b9fe40b8fd59aacde169776a4a553a069a04836bbf15e5a9a8d7a2d39feed98dac6cb890198180fda39f26b528ff95f24c5b2bbf6601b45c3 SHA512 7c5a755a03063d47d259fda0a6c2faa63c2f30b98dbac583e106aaa817d6cde3e07551e0b5e08f3a25db4c4ca45a23cebe993ae6f3d39c88deeaf2c7d8086a06 +DIST golang.org%2Fx%2Fcrypto%2F@v%2Fv0.0.0-20191219195013-becbf705a915.zip 1861363 BLAKE2B ee9b24e4db030aca81dde9b7c3e8e9cf8834be2ccff243da43198fc414d088f7a2d36dc3a6ad7269f07f3186fe183d04a6643474f1d0973272657920e190d13a SHA512 75cbea0d611fc561e0ec8632afb5078892a54aaf39390c6cd79ec71e099622c437a644844597f4d1305eb66fcd0a2182caeb864c4613d0f47d7d9cbf5e87c96f +DIST golang.org%2Fx%2Fnet%2F@v%2Fv0.0.0-20181201002055-351d144fa1fc.mod 24 BLAKE2B dad51d0aff48ef669f448f7b41bcdb153dbdc48863761ba1cac6aa3e3eaeec838e22733e6c61796b22bcc95d9e0a274085676bf191a8072717a398a067fe9e62 SHA512 d7446d3dd844b97512470f7ff05fce72d099f7800396e2738a54d41796f0f76be07e7aea1f638fee0190c7d8ce65eefc54eebe6917a06d14da04d0c9c8f9891a +DIST golang.org%2Fx%2Fnet%2F@v%2Fv0.0.0-20190404232315-eb5bcb51f2a3.mod 119 BLAKE2B e042b2716739483252c3340451b2c3c7b421fdf8d6b3e0333e979802fca66159596982ea63a24b6a64457b2757a0ad24cbb9ea032bab4c5377edf84a3ea18b97 SHA512 26b6c92eecd2208967336d4d23f8a71f77f9a73643ad1e5cd84dee36b2f626fffc806e4dd33acc284831a0961e2b363d898a747903235945fbfb665c5b4d5ef2 +DIST golang.org%2Fx%2Fsync%2F@v%2Fv0.0.0-20181108010431-42b317875d0f.mod 25 BLAKE2B 01f7f78a0324ca728efd4d662ea130d7e200ab25805125e472720ca01feaaf2625b15bf53f51837a6913e35e060a19018928a38851d7445f39e6e42e237dfda2 SHA512 a9dd073f69c5be1153aaab6e84dd3bb1610a0df8b9882ca4c486c6625d4b5201e5032f86e5014421358dff564d93c4e67f20e5fd1d21ed5e259ddfbc90af43c0 +DIST golang.org%2Fx%2Fsys%2F@v%2Fv0.0.0-20190215142949-d0b11bdaac8a.mod 24 BLAKE2B 64a70c4594f5d3c37d962c1ed07630fba8abeaf534242f8f1509af271684499252af9a2320d5bac8e44064dba344b807535e4e9dd085fc0fb47bd9304120601a SHA512 ffe50fccf7f1d200f2ebc805b190e3f10c5a3184458a38f4590e520d7ce115e1520fbabe56651bbdc2e08da4a8db5ac86d0e88728efde3ab26c64ab4e0cd604c +DIST golang.org%2Fx%2Fsys%2F@v%2Fv0.0.0-20190222072716-a9d3bda3a223.mod 24 BLAKE2B 64a70c4594f5d3c37d962c1ed07630fba8abeaf534242f8f1509af271684499252af9a2320d5bac8e44064dba344b807535e4e9dd085fc0fb47bd9304120601a SHA512 ffe50fccf7f1d200f2ebc805b190e3f10c5a3184458a38f4590e520d7ce115e1520fbabe56651bbdc2e08da4a8db5ac86d0e88728efde3ab26c64ab4e0cd604c +DIST golang.org%2Fx%2Fsys%2F@v%2Fv0.0.0-20190412213103-97732733099d.mod 33 BLAKE2B 8be160de26713fd50f15adfb6fd7fff2643ee587aa17de9385b1e315869d0ecf102fc567294666bf232aa677d1ab04ba8341157f3d9b66a0f53543a7a47cf148 SHA512 0c7b940d567c7685dcb55c76c69aedeaab2170f4f3bde458994c879bf344169f34fb3f3ca899b0f138a8b0b8be5031217b57a6edf5980e6066ff5cb92d1ff9ab +DIST golang.org%2Fx%2Fsys%2F@v%2Fv0.0.0-20190523142557-0e01d883c5c5.mod 33 BLAKE2B 8be160de26713fd50f15adfb6fd7fff2643ee587aa17de9385b1e315869d0ecf102fc567294666bf232aa677d1ab04ba8341157f3d9b66a0f53543a7a47cf148 SHA512 0c7b940d567c7685dcb55c76c69aedeaab2170f4f3bde458994c879bf344169f34fb3f3ca899b0f138a8b0b8be5031217b57a6edf5980e6066ff5cb92d1ff9ab +DIST golang.org%2Fx%2Fsys%2F@v%2Fv0.0.0-20190602015325-4c4f7f33c9ed.mod 33 BLAKE2B 8be160de26713fd50f15adfb6fd7fff2643ee587aa17de9385b1e315869d0ecf102fc567294666bf232aa677d1ab04ba8341157f3d9b66a0f53543a7a47cf148 SHA512 0c7b940d567c7685dcb55c76c69aedeaab2170f4f3bde458994c879bf344169f34fb3f3ca899b0f138a8b0b8be5031217b57a6edf5980e6066ff5cb92d1ff9ab +DIST golang.org%2Fx%2Fsys%2F@v%2Fv0.0.0-20190602015325-4c4f7f33c9ed.zip 1784999 BLAKE2B 53d1fff8c1f3427dd91a5c6052e671dc97c646c267448a18beaad4b5c3108aa08a94c6cf2adbae4be847238e2bc02189a2c59f29500fe1be904f66c2daaa0ada SHA512 f63a04e8a940a998a028bd9489af913d2e47948bb927f669046d03a90765806da33ba45c53550d7b9a553c6b58257320486b5b0211854a8cb894e4cde4e59a3a +DIST golang.org%2Fx%2Fsys%2F@v%2Fv0.0.0-20190813064441-fde4db37ae7a.mod 33 BLAKE2B 8be160de26713fd50f15adfb6fd7fff2643ee587aa17de9385b1e315869d0ecf102fc567294666bf232aa677d1ab04ba8341157f3d9b66a0f53543a7a47cf148 SHA512 0c7b940d567c7685dcb55c76c69aedeaab2170f4f3bde458994c879bf344169f34fb3f3ca899b0f138a8b0b8be5031217b57a6edf5980e6066ff5cb92d1ff9ab +DIST golang.org%2Fx%2Fsys%2F@v%2Fv0.0.0-20191026070338-33540a1f6037.mod 33 BLAKE2B 8be160de26713fd50f15adfb6fd7fff2643ee587aa17de9385b1e315869d0ecf102fc567294666bf232aa677d1ab04ba8341157f3d9b66a0f53543a7a47cf148 SHA512 0c7b940d567c7685dcb55c76c69aedeaab2170f4f3bde458994c879bf344169f34fb3f3ca899b0f138a8b0b8be5031217b57a6edf5980e6066ff5cb92d1ff9ab +DIST golang.org%2Fx%2Fsys%2F@v%2Fv0.0.0-20191026070338-33540a1f6037.zip 1867927 BLAKE2B bd890b16f2adb601f5655ca3f4815bbb335fe48c961b06f316ec579ff6efa2fc8f360d7c0bf272dc2d35e9a0470235c36cee331399ed01d8c455172f39921194 SHA512 59a4db96e438a1f03af9b00070f4d3772f1eeeff72334e6bc8ad1774bf202d39f7129572cd75fb9e1ecdfc7a532c5cd91bfdbfab3ebd10228bc6733e9556f70c +DIST golang.org%2Fx%2Ftext%2F@v%2Fv0.3.0.mod 25 BLAKE2B 31009af0fdcd0f8730c9985287e6e364ec4e5183e57e92560dbc80a2010eced51b8a90f01a82b49384268c8a0adbf69d179c205d3f68e0eb459169d2ea9528f0 SHA512 ca081ef7cccd7bbedc6843fbe0c452352661a07e1298cd02ff338ed79d807c6401d613a3cf20011189d2f98a794ffa410547b3e352eb58a6f0a84822285d391d +DIST gopkg.in%2Fcheck.v1%2F@v%2Fv0.0.0-20161208181325-20d25e280405.mod 25 BLAKE2B 6470f3d94700c4d8b3176d692bdb91646750f2c6a866ff2ef4183aff1de01f024a8757f97b4626ec0355092e5f25e7ded91cd5be845f627d107c58b1daf400d7 SHA512 9ac0f80ef05881387cb2f48f81560f3207fe586ea16495383662e6d62e43d93fac01dfe72e1d0063d3ab065331dab3a8098d7da4f1830ba1aff6f27f8e1bc1b2 +DIST gopkg.in%2Fyaml.v2%2F@v%2Fv2.2.2.mod 95 BLAKE2B adb3684980f1d8e6c23444e91028f8db55f1bc496114eb3508dbecf9917dbc8a0a4bed7c0d761123335a75b9ffe727e180f2d6aa5f84312edb05a798185c8362 SHA512 916ff67ddb6c2ba39905db4277ce42596d9ca5a42f8aa7f47f16335e78d91a1b30419fd1b7b6967b37e248363397ec527b38d2f500b3546edda5d2bce1944379 +DIST rqlite-5.2.0.tar.gz 304914 BLAKE2B eb455a1f30c5f431c657fa04a09fdadbd471c34788b3a86e0440c1fb0301c51318e0d9e96e9d948d3093665e1aff612f8429acbf9c572f7497f691d3ee49665f SHA512 80f0af92c9f3af158094d728a032c87e2cd3fc7631207e5aa300ef1866a8bfd5915ad652de09874b75bf9ef155a8795d736aba275414a9d6ae912b01082a0aa2 +EBUILD rqlite-5.2.0.ebuild 5047 BLAKE2B 40d7bbf44cf38f436bdddddac496ae6e73ab510e57d85934720f2f9bfd7c6dc7cb51f92df40a33c2b5d3a9c97e23cdb7d9664a4f499ddebafb0833f8e1e31cf5 SHA512 7e21c2795676da8434ebe592ef7d46ac9a4ab4a9c786749694168ce59dd2da3120c76dc6d6ed2676eefd0a34a88efa1d792dbe822cbfd28ff8a1af3433638c59 MISC metadata.xml 304 BLAKE2B aa848abaaeaf54cb85ddb9600c6044a9ed2f3e446f3131f3725431b3a3eefa0058a8c962c708f1735dd97caee1c25a461da3f6fd622b521ad36234157580f6f4 SHA512 3e536da8ed6a50cbffad3574074029e67b25627d80050f388742e7b086ffa73e6fd93fa307cc267bc23b4eca080ddefa7845a3ac90ad3736862362f9c0e29c92 diff --git a/dev-db/rqlite/rqlite-4.6.0.ebuild b/dev-db/rqlite/rqlite-4.6.0.ebuild deleted file mode 100644 index 78e22f2cc221..000000000000 --- a/dev-db/rqlite/rqlite-4.6.0.ebuild +++ /dev/null @@ -1,57 +0,0 @@ -# Copyright 1999-2019 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -EGO_PN="github.com/rqlite/rqlite" -EGO_VENDOR=( - "github.com/Bowery/prompt fa8279994f75f982bdae3c827a3afffd78a6fe0d" - "github.com/armon/go-metrics v0.3.0" - "github.com/boltdb/bolt v1.3.1" - "github.com/hashicorp/go-immutable-radix v1.1.0" - "github.com/hashicorp/go-msgpack v0.5.5" - "github.com/hashicorp/golang-lru v0.5.3" - "github.com/labstack/gommon v0.3.0" - "github.com/mattn/go-colorable v0.1.4" - "github.com/mattn/go-isatty v0.0.10" - "github.com/mattn/go-sqlite3 v1.13.0" - "github.com/mkideal/cli v0.0.3" - "github.com/mkideal/pkg 3e188c9e7ecc83d0fe7040a9161ce3c67885470d" - "golang.org/x/crypto b544559bb6d1b5c62fba4af5e843ff542174f079 github.com/golang/crypto" - "golang.org/x/sys 6d18c012aee9febd81bbf9806760c8c4480e870d github.com/golang/sys" -) - -inherit golang-vcs-snapshot - -KEYWORDS="~amd64" -DESCRIPTION="Replicated SQLite using the Raft consensus protocol" - -HOMEPAGE="https://github.com/rqlite/rqlite http://www.philipotoole.com/tag/rqlite/" -LICENSE="MIT BSD MPL-2.0" -SLOT="0" -IUSE="" -EGIT_REPO_URI="https://${EGO_PN}.git" -EGIT_COMMIT="085d2d23d88728fbf03855f4fd213815397ed9f4" -SRC_URI="https://${EGO_PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz - ${EGO_VENDOR_URI}" -S="${WORKDIR}/${P}/src/${EGO_PN}" - -src_compile() { - export -n GOCACHE XDG_CACHE_HOME #678966 - GOPATH="${WORKDIR}/${P}" \ - GOBIN="${WORKDIR}/${P}/bin" \ - go install \ - -ldflags="-X main.version=v${PV} -X main.branch=master -X main.commit=${EGIT_COMMIT} -X main.buildtime=$(date +%Y-%m-%dT%T%z)" \ - -v -work -x ${EGO_BUILD_FLAGS} ${EGO_PN}/cmd/... || die -} - -src_test() { - GOPATH="${WORKDIR}/${P}" \ - GOBIN="${WORKDIR}/${P}/bin" \ - go test -v ./... || die -} - -src_install() { - dobin "${WORKDIR}/${P}/bin"/${PN}{,d} - dodoc -r *.md DOC -} diff --git a/dev-db/rqlite/rqlite-5.0.0.ebuild b/dev-db/rqlite/rqlite-5.0.0.ebuild deleted file mode 100644 index d61190428bd5..000000000000 --- a/dev-db/rqlite/rqlite-5.0.0.ebuild +++ /dev/null @@ -1,57 +0,0 @@ -# Copyright 1999-2019 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -inherit go-module - -KEYWORDS="~amd64" -DESCRIPTION="Replicated SQLite using the Raft consensus protocol" - -HOMEPAGE="https://github.com/rqlite/rqlite http://www.philipotoole.com/tag/rqlite/" -LICENSE="MIT BSD MPL-2.0" -SLOT="0" -IUSE="" - -EGIT_COMMIT="dd61a7a221bc3f8b0841dc298cdccc4fe4a81c6b" - -EGO_VENDOR=( - "github.com/Bowery/prompt fa8279994f75f982bdae3c827a3afffd78a6fe0d" - "github.com/armon/go-metrics ec5e00d3c878b2a97bbe0884ef45ffd1b4f669f5" - "github.com/boltdb/bolt v1.3.1" - "github.com/hashicorp/go-hclog v0.9.1" - "github.com/hashicorp/go-immutable-radix v1.0.0" - "github.com/hashicorp/go-msgpack v0.5.5" - "github.com/hashicorp/golang-lru v0.5.0" - "github.com/hashicorp/raft v1.1.1" - "github.com/hashicorp/raft-boltdb 4207f1bf061751378aee6cdfe697965a13ab49d7" - "github.com/labstack/gommon v0.3.0" - "github.com/mattn/go-colorable v0.1.4" - "github.com/mattn/go-isatty v0.0.11" - "github.com/mattn/go-sqlite3 v2.0.2" - "github.com/mkideal/cli v0.0.3" - "github.com/mkideal/pkg 3e188c9e7ecc83d0fe7040a9161ce3c67885470d" - "golang.org/x/crypto becbf705a91575484002d598f87d74f0002801e7 github.com/golang/crypto" - "golang.org/x/sys 33540a1f603772f9d4b761f416f5c10dade23e96 github.com/golang/sys" -) - -SRC_URI="https://github.com/rqlite/rqlite/archive/v${PV}.tar.gz -> ${P}.tar.gz - $(go-module_vendor_uris)" - -src_compile() { - export -n GOCACHE XDG_CACHE_HOME #678966 - GOBIN="${S}/bin" \ - go install \ - -ldflags="-X main.version=v${PV} -X main.branch=master -X main.commit=${EGIT_COMMIT} -X main.buildtime=$(date +%Y-%m-%dT%T%z)" \ - -v -work -x ./cmd/... || die -} - -src_test() { - GOBIN="${S}/bin" \ - go test ./... || die -} - -src_install() { - dobin bin/* - dodoc -r *.md DOC -} diff --git a/dev-db/rqlite/rqlite-5.1.0.ebuild b/dev-db/rqlite/rqlite-5.1.0.ebuild deleted file mode 100644 index e1a56c014d24..000000000000 --- a/dev-db/rqlite/rqlite-5.1.0.ebuild +++ /dev/null @@ -1,57 +0,0 @@ -# Copyright 1999-2020 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -inherit go-module - -KEYWORDS="~amd64" -DESCRIPTION="Replicated SQLite using the Raft consensus protocol" - -HOMEPAGE="https://github.com/rqlite/rqlite http://www.philipotoole.com/tag/rqlite/" -LICENSE="MIT BSD MPL-2.0" -SLOT="0" -IUSE="" - -EGIT_COMMIT="7ec6fcefe45072a67329a991757f81e3c566fda5" - -EGO_VENDOR=( - "github.com/Bowery/prompt fa8279994f75f982bdae3c827a3afffd78a6fe0d" - "github.com/armon/go-metrics ec5e00d3c878b2a97bbe0884ef45ffd1b4f669f5" - "github.com/boltdb/bolt v1.3.1" - "github.com/hashicorp/go-hclog v0.9.1" - "github.com/hashicorp/go-immutable-radix v1.0.0" - "github.com/hashicorp/go-msgpack v0.5.5" - "github.com/hashicorp/golang-lru v0.5.0" - "github.com/hashicorp/raft v1.1.1" - "github.com/hashicorp/raft-boltdb 4207f1bf061751378aee6cdfe697965a13ab49d7" - "github.com/labstack/gommon v0.3.0" - "github.com/mattn/go-colorable v0.1.4" - "github.com/mattn/go-isatty v0.0.11" - "github.com/mattn/go-sqlite3 v2.0.2" - "github.com/mkideal/cli v0.0.3" - "github.com/mkideal/pkg 3e188c9e7ecc83d0fe7040a9161ce3c67885470d" - "golang.org/x/crypto becbf705a91575484002d598f87d74f0002801e7 github.com/golang/crypto" - "golang.org/x/sys 33540a1f603772f9d4b761f416f5c10dade23e96 github.com/golang/sys" -) - -SRC_URI="https://github.com/rqlite/rqlite/archive/v${PV}.tar.gz -> ${P}.tar.gz - $(go-module_vendor_uris)" - -src_compile() { - export -n GOCACHE XDG_CACHE_HOME #678966 - GOBIN="${S}/bin" \ - go install \ - -ldflags="-X main.version=v${PV} -X main.branch=master -X main.commit=${EGIT_COMMIT} -X main.buildtime=$(date +%Y-%m-%dT%T%z)" \ - -v -work -x ./cmd/... || die -} - -src_test() { - GOBIN="${S}/bin" \ - go test ./... || die -} - -src_install() { - dobin bin/* - dodoc -r *.md DOC -} diff --git a/dev-db/rqlite/rqlite-5.2.0.ebuild b/dev-db/rqlite/rqlite-5.2.0.ebuild new file mode 100644 index 000000000000..b0f87c9c7b35 --- /dev/null +++ b/dev-db/rqlite/rqlite-5.2.0.ebuild @@ -0,0 +1,118 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +inherit go-module +EGIT_COMMIT=77863e5a13110f1fca87b6fce84a7169c3aa58f5 + +DESCRIPTION="Replicated SQLite using the Raft consensus protocol" +HOMEPAGE="https://github.com/rqlite/rqlite http://www.philipotoole.com/tag/rqlite/" + +EGO_SUM=( + "github.com/Bowery/prompt v0.0.0-20190916142128-fa8279994f75" + "github.com/Bowery/prompt v0.0.0-20190916142128-fa8279994f75/go.mod" + "github.com/DataDog/datadog-go v2.2.0+incompatible/go.mod" + "github.com/armon/go-metrics v0.0.0-20190430140413-ec5e00d3c878" + "github.com/armon/go-metrics v0.0.0-20190430140413-ec5e00d3c878/go.mod" + "github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod" + "github.com/boltdb/bolt v1.3.1" + "github.com/boltdb/bolt v1.3.1/go.mod" + "github.com/circonus-labs/circonus-gometrics v2.3.1+incompatible/go.mod" + "github.com/circonus-labs/circonusllhist v0.1.3/go.mod" + "github.com/davecgh/go-spew v1.1.0/go.mod" + "github.com/davecgh/go-spew v1.1.1/go.mod" + "github.com/golang/protobuf v1.2.0/go.mod" + "github.com/hashicorp/go-cleanhttp v0.5.0/go.mod" + "github.com/hashicorp/go-hclog v0.9.1" + "github.com/hashicorp/go-hclog v0.9.1/go.mod" + "github.com/hashicorp/go-immutable-radix v1.0.0" + "github.com/hashicorp/go-immutable-radix v1.0.0/go.mod" + "github.com/hashicorp/go-msgpack v0.5.5" + "github.com/hashicorp/go-msgpack v0.5.5/go.mod" + "github.com/hashicorp/go-retryablehttp v0.5.3/go.mod" + "github.com/hashicorp/go-uuid v1.0.0/go.mod" + "github.com/hashicorp/golang-lru v0.5.0" + "github.com/hashicorp/golang-lru v0.5.0/go.mod" + "github.com/hashicorp/raft v1.1.0/go.mod" + "github.com/hashicorp/raft v1.1.1" + "github.com/hashicorp/raft v1.1.1/go.mod" + "github.com/hashicorp/raft-boltdb v0.0.0-20171010151810-6e5ba93211ea/go.mod" + "github.com/hashicorp/raft-boltdb v0.0.0-20191021154308-4207f1bf0617" + "github.com/hashicorp/raft-boltdb v0.0.0-20191021154308-4207f1bf0617/go.mod" + "github.com/labstack/gommon v0.3.0" + "github.com/labstack/gommon v0.3.0/go.mod" + "github.com/mattn/go-colorable v0.1.2/go.mod" + "github.com/mattn/go-colorable v0.1.4" + "github.com/mattn/go-colorable v0.1.4/go.mod" + "github.com/mattn/go-isatty v0.0.8/go.mod" + "github.com/mattn/go-isatty v0.0.9/go.mod" + "github.com/mattn/go-isatty v0.0.11" + "github.com/mattn/go-isatty v0.0.11/go.mod" + "github.com/mattn/go-sqlite3 v2.0.2+incompatible" + "github.com/mattn/go-sqlite3 v2.0.2+incompatible/go.mod" + "github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod" + "github.com/mkideal/cli v0.0.3" + "github.com/mkideal/cli v0.0.3/go.mod" + "github.com/mkideal/pkg v0.0.0-20170503154153-3e188c9e7ecc" + "github.com/mkideal/pkg v0.0.0-20170503154153-3e188c9e7ecc/go.mod" + "github.com/pascaldekloe/goe v0.1.0/go.mod" + "github.com/pkg/errors v0.8.1/go.mod" + "github.com/pmezard/go-difflib v1.0.0/go.mod" + "github.com/prometheus/client_golang v0.9.2/go.mod" + "github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod" + "github.com/prometheus/common v0.0.0-20181126121408-4724e9255275/go.mod" + "github.com/prometheus/procfs v0.0.0-20181204211112-1dc9a6cbc91a/go.mod" + "github.com/stretchr/objx v0.1.0/go.mod" + "github.com/stretchr/testify v1.2.2/go.mod" + "github.com/stretchr/testify v1.3.0/go.mod" + "github.com/stretchr/testify v1.4.0/go.mod" + "github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod" + "github.com/valyala/bytebufferpool v1.0.0/go.mod" + "github.com/valyala/fasttemplate v1.0.1/go.mod" + "golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod" + "golang.org/x/crypto v0.0.0-20191219195013-becbf705a915" + "golang.org/x/crypto v0.0.0-20191219195013-becbf705a915/go.mod" + "golang.org/x/net v0.0.0-20181201002055-351d144fa1fc/go.mod" + "golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod" + "golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod" + "golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod" + "golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod" + "golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod" + "golang.org/x/sys v0.0.0-20190523142557-0e01d883c5c5/go.mod" + "golang.org/x/sys v0.0.0-20190602015325-4c4f7f33c9ed" + "golang.org/x/sys v0.0.0-20190602015325-4c4f7f33c9ed/go.mod" + "golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a/go.mod" + "golang.org/x/sys v0.0.0-20191026070338-33540a1f6037" + "golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod" + "golang.org/x/text v0.3.0/go.mod" + "gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod" + "gopkg.in/yaml.v2 v2.2.2/go.mod" + ) +go-module_set_globals +SRC_URI="https://github.com/rqlite/rqlite/archive/v${PV}.tar.gz -> ${P}.tar.gz + ${EGO_SUM_SRC_URI}" + +LICENSE="MIT BSD MPL-2.0" +SLOT="0" +KEYWORDS="~amd64" +IUSE="" + +src_compile() { + GOBIN="${S}/bin" \ + go install \ + -ldflags="-X main.version=v${PV} + -X main.branch=master + -X main.commit=${EGIT_COMMIT} + -X main.buildtime=$(date +%Y-%m-%dT%T%z)" \ + ./cmd/... || die +} + +src_test() { + GOBIN="${S}/bin" \ + go test ./... || die +} + +src_install() { + dobin bin/* + dodoc -r *.md DOC +} |