diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2018-03-23 04:19:44 +0000 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2018-03-23 04:19:44 +0000 |
commit | c5283d322accc6097afec74eab24550829788bab (patch) | |
tree | b99ce668128d82a026eaa31461643f9173f9b77b /dev-db/postgresql | |
parent | 5510d9d7d1c93c2ea71a2bd6f0666168808d5dd6 (diff) |
gentoo resync : 23.03.2018
Diffstat (limited to 'dev-db/postgresql')
19 files changed, 2 insertions, 5350 deletions
diff --git a/dev-db/postgresql/Manifest b/dev-db/postgresql/Manifest index 459740c6a348..46bae5cf636b 100644 --- a/dev-db/postgresql/Manifest +++ b/dev-db/postgresql/Manifest @@ -1,68 +1,41 @@ AUX postgresql-10.2-no-server.patch 3317 BLAKE2B 133a9e80c4ad82f8b121d8f2e9907fbc5a94f791f0972e604b1c54aa2bfb71b18e246ac8e65f7b917cbdb19222c78273d3e5ed96a7569bfd796045c4dac9f610 SHA512 6a9f6dbbece2364cbae200cca5c468ae99b78815ee3af6e90d8f637cb75b5755971b0582cedfb6569c0dc79cb6701a29712e3c99feb814fe7575a31e194e9b7a AUX postgresql-10beta2-no-server.patch 3586 BLAKE2B 6d4472d389fd7b36a59c978b37b64535b715ee8d2e9c24b762849e0e6fcb351b03ff6e5a8316bbc4e9ff77b25d9a4dcef74b10c25e520cd0b86392921debcaf8 SHA512 d4be4ed02c62586aa8d2c3452eb4b804783e73d8200d484052bf82bf1b15c503a3328b19792a270912ed7ccc5c63c1f055946e32421547c95f47f1264eb085ee -AUX postgresql-9.2-9.4-tz-dir-overflow.patch 695 BLAKE2B f865cc4e56bd75400a19b6388924079bff57eed9092dcee0ed08ffdcb238d59aacf458974bad23bcbcd1b850db323aaaf8aada5a1c4033ed08cc4d4a33db706f SHA512 079aec61cc88996f9f25e1b6241cdf62587c51b110f989c7ad167eb3770569e857a1704777915c9e1db1cc8259b897a0472de2a43a331b7a6002b2e0bcdcc52e AUX postgresql-9.2-no-server.patch 4219 BLAKE2B ed7b3794e09d59b78640602a29e9ca8fb3727c0b0b567bf23d900d2a7e2c0736d7a0fc491b8674d724eb01231caf5922d21a69d1c1e63125562ca0bcd576756a SHA512 e657389bd8d34ce3a5daa7f8432158758ee7a05e5a149e5257c88366dbc1b4f571a312f2934cf29ea8e5069ecf9726c9bf0fa5c908ba3e3e850d906d66d5b4a9 AUX postgresql-9.3-no-server.patch 4293 BLAKE2B 3224f3a7a82529ba710ff31ed02418f91cd394cee50c8cad10dbe6aff3260c08bd5958f91812fe16ea4820238bdd1cc4898b36f1dde09a2e54b6e3e94f2c6bfb SHA512 20117afa5a6999c6ae7f2b9adbdcfd2394a56c61d9c5d8c7ab2554a8de869d3aeaa4230a7dc4322fe585591277eb6ae47a594a7e605b811ed2c089d91cad6d4c AUX postgresql-9.4.10-no-server.patch 4356 BLAKE2B 97ca2424a854ac0efd2b5947e0efe183dd2b0171db07be92e4389b639fac707c3cba2957469996481e5d4ad5cac4fa686a193efc774e14ec0ad8f897713a5a19 SHA512 1abfb624b01b925a834c1c4f292246fd676cb7f2241a4e26bf52ce9b8c4dc2e4beeb4eea326c44f758d45034d5f18370280a8b18114bffaba1841e9ddac45174 AUX postgresql-9.5.5-no-server.patch 4498 BLAKE2B eb874ac58ddd3a9c0b6ed97cf6616c5a2480df4cf708fb77496ab5cc459da423eb77986cb99824cf24131918eb4844320cd9353a04d41f696471b4b3c2d59071 SHA512 c961c7f1935b064e402e6c73dc6b087cdbea23d8038ef5e5aa5e625f7f1e87bb8d5986b95bbf9ed7c1abc40eeb89cda3b7aa4571d4a75ad6dd6c6d847de77c7d AUX postgresql-9.6.3-no-server.patch 3555 BLAKE2B 905bdfe6b084d775755cc88f7f11262d6bd04df7b2eb9a8230aef0fbb079d0431c9335b5219f8867cf1ce3cf858c8c0e964208713876ebfe13ae6138f5d4f35a SHA512 c70a4df16d865ceff7474f1a1ccc72d4e82e73a09792edc787a7907aa419985495871d07830390982bc82c82723fe668fb42b0dd239973804532499f39696dfe AUX postgresql-check-db-dir 1013 BLAKE2B 2be45942d0442822113879708c11dfde267938b6e7118bd225f567ca9fdacb11082792eabcb40b8a39cd6017fdedb18100576fea0895dae2dcda83c2d51de34d SHA512 2f34ee0cb6a889500ccfca7621ada6ee1bb06dc146f3c556938152dd3d7c0312266bb4db5f4099838d93ade26e2b8866dfddb3576cb5a737431ea2befd0cec6f -AUX postgresql.confd 2202 BLAKE2B d95e350dcb65ad62eb415df991a5a1845d9f136e72d07b80bdf9b5d71d5dc8de264d107cb756ec5df39a71e14b5e243cb5c298841cbcc4e6a8a176358a8d1143 SHA512 ad4e66196f70d543d396ae72db6b0beb2cf8861f612dceaa1a1333b139475262e84bcf40774155254ed1cda7ada830d76f60b27982d0cb840360cc13fbbcecbc AUX postgresql.confd-9.2 2450 BLAKE2B 267c6c388533d597d90285497fece703a4a5db088811eedd1a9507d400e9a16041211baf4af1f16fefd74cb0b2b83db5f037939da17e73ef04ef313c5701fb90 SHA512 a4aae13cc0312707d77d3164da6f573c78360cf039bd81e8e0dccd19cedf701a227315aded0a412531217398426e357bffffcf9d374614bcb5bfa398c946bf0b AUX postgresql.confd-9.3 2477 BLAKE2B dbe2fea6befdcdfe4a8a65cb68d040996986553be78615115070f14cd966d517b36a09366a431c774df119501fb933caf056abe0c5131e3327484ef557db3d14 SHA512 c928364b2b8a555443db8c1ac2a7336cd5e32ac860f3238a0a791cfcdfdce941837d72dfa44f3f08704d528590f9f3bb479e25b7db9f32cdde76f216819baa9d -AUX postgresql.init 4162 BLAKE2B 7c6eb5f028c95391031440253d13e36937c0ea81e6ac057e8c31a37c41b12828e27999e55d1bea68fa877b51bc1cfc16b679236b311a982ea88cdfd828010741 SHA512 e0052fda5d71b9ba06ad7a4517c7bb2d6bb186acf3686095d7217b63e4f5b45f21e3f90c1ac9b0238143d458081eedc36167af6abefe95e197c31f9e429d87a8 AUX postgresql.init-9.2 4911 BLAKE2B 9e679849eb6422df72fabc0e0202e9353fdcbab5f1eb419f5ff49a3e3e05acac127d39a67c5ef66bd57679fc91e0790107dcf60b7da90f9173af11040525ae46 SHA512 bf51e7fbe02344f74a76c250c9804206ec7d3b988f99ad3476d00422ef2eea9c6ead7133a5adb9fb23aa7c0820f450ecab48f0c1a1a12a4e5ef5fe2bef48a0c0 -AUX postgresql.init-9.3 4187 BLAKE2B 93f1853aac201835e64d09191c97cd7894dac9b67dbbffd62bd52eb61c2a23f62e4a05540ad12ebee578f31470094024d9b3f5b1d31690a73c637cc7d3af3df5 SHA512 dde933a673b86f5ff9355acff036c07ce9c4b572b127e909044e0c0502477d9d7e8ea5655cf9a53c198c15787d83ade231c6f33e3ecdec45f330f4a6da24da30 AUX postgresql.init-9.3-r1 4999 BLAKE2B 77e231e5ca62a8b845ee02b1f27f13e12ab2c7577d3385a533bf61f988e6209586b75d3ddbaef71f0141b3bdee458179dea77180008f751bd77d656adc2d44de SHA512 cd181bb6d3ed72f786cd21a5c0c012bac3847adcf9da2e0b78eb212c9515953b2f1a2006faf475bfaa9a8c91371bda34f558f83ae010daa7cd670923526e39a0 -AUX postgresql.service 1768 BLAKE2B d15ad80cf142d3286e6a8c1938885368a272506bec5a9fa5a3b491b94719cdcedfd068154acc3ffc840ba72d33ed3add2d2b13653545cc8661e0d074a76d1a0c SHA512 92c60a21ac87a298742d0aa0f4180218cebfa5644762c32a27b1314d92a581eb4f6cbcf41b20f29509c6eec9f6f236a57d2c944aa1eca35d7f8d29e2865b47d7 AUX postgresql.service-9.2 1666 BLAKE2B d4b81415539db3d78e0f5908185f903b70966ce3a27feed9bdf80eb6a9065ca6bd4b49e4bb822c41548b7efa9de37656378c395a8bd00a7a3daaa52911a2f674 SHA512 8c64b59f1e80096382a7166e1e8f183a5b9cf14c75138c15a39de74b983bfbed2f41cf9b33b2c72c3b9c79130c10104836a3505c96cb18ac1be1297c0fce1af0 -AUX postgresql.service-9.6 1579 BLAKE2B 961d5820ea8c0757bf888384dd71ec2e92584e5c2fd113e516b41e51f1a26e2847f81920d084a9a07b0d912e76f32f1226cb5f8b17d1efe15a4f0fec974b10c9 SHA512 e56abca735c4ac21ddf39b15ed16b2ccd1d0a2eec9be05ac1d12ef9a4972309206b0e551dc04bd9238e6c1c4e2b7601c8caef796cc9bdaff28357b928bbf0d85 AUX postgresql.service-9.6-r1 1477 BLAKE2B 2a652d5b2892f3a52f484fcc0b4f4dad09cf4b46c3739c3f805072040a26128cb2ad9a25d4a7c9f109a95696d739538d379af6bac53c656f5c41af45b6110de5 SHA512 9e2b04923f6ebec1424c0f276c58a6a0c4933f2de5e2a9776169227729afd06ce5284461be8b6ed70e5aaff2a68b9f96c6893d867d35761c9977f9847ccfe93d AUX postgresql.tmpfiles 39 BLAKE2B 25a5725af53c8e4e4009887e998172dd863ce218a5438351194548c4fc8ea15308dfba3602d5a922cf49b46015198268a4a4528119d8a74dcef4cc4c1767c052 SHA512 498060f2a597cf374f4fb31deaa2d6c5b00edef68efc0e71b82bfc20b717ae12518ba18fcb455a0c518ebba1a0868f38321470616151d02fa79b889a66dcb9f8 DIST postgresql-10.1.tar.bz2 19669989 BLAKE2B 2fbe782023b6d55c6fadaba38e517c60038b3b7b0a14fa8793043f7b9c4719a692440f286bb1f898045b5f56ef1c064f97f36e821990755077dc8d9bb0dbd639 SHA512 06050d353aa43f32e0de0199d833d8a4652aff893b718b1c40ed31837838f73fe4d977ac0f2164ab97b3eeff4aae3409f440601740898a893877d96bc0ed1882 -DIST postgresql-10.2.tar.bz2 19901836 BLAKE2B ea626774dc11463418b3d0126d04bd2d8eb7e8bb299551bff0c30c7f999f37a1f48e6bbfcde1ee15c0e0519e222bfe14f14d985503fe517a06f127009148ae98 SHA512 bac61644c12c31e2dce97ec0134902a2a7141e922619015425961b963961b21210ca840f59ba585d3d75c7e34cb640f2ebeaa2b25c4a866db68f5e73a8f8a448 DIST postgresql-10.3.tar.bz2 19959653 BLAKE2B ba3b05f53b0f879b18d6d0649bf819697c77a066b49d941a96d13a4741854b01aeb0c8b868d6550a08ad52572c9463c968660aa83c16cbaa5b4bf7a89387a524 SHA512 05cf82d3483bdf38734e6ff0fef6b80e7f8fd3cb5ea6792ffe222a599d97d1a29638970bf28ebf5bd1f877e8dcd9986d88f5c5e5379e74fe79ce83e20d2babba -DIST postgresql-9.2.19.tar.bz2 16466698 BLAKE2B ca5e84ac33923b36639bee403935c14c87bf37cd8061eb1d82bc1816449910ebe1373f74c2467850650fb7c3cadfe049a168ddc4a7e64ce54515731df552992a SHA512 d3b4c5578bf6d6580028e775bff81a921258cb53b6b06567d96a352d14f3b63063adb480b2f5e2029baf8a034e14b5cd75eebc04f1ed7b16c849e1a5ec1f4867 -DIST postgresql-9.2.22.tar.bz2 16531224 BLAKE2B 2d3b73db5c3082872df824b8e14e65c6cf4f7389f88b7ed577ddf59570294e74a6392a27f78e77c5da2c974566b38deaa979511649a6e95f5323d3961c587f78 SHA512 3e5ab04c2be2719579b2ebbf64b220522acfd9ea74029dd2ed699f60230da224bdc99de4ee5529b513e5586de0377764c4e54deb3dd93d5c53c4d666dce2b6b7 -DIST postgresql-9.2.23.tar.bz2 16531436 BLAKE2B df12276856e17693f0f1b2623a96ca15cfea95dc6e67e349391a60ba49d9a252ee94448bc07cbc0290f29546ba8b87fa24f62ca8f27cde41d4400c3aa275d778 SHA512 9715cb9aa34921f7d246837c6c516d588f88fda543ad635520e9575a5ea448ad39062f2c89c086c7f129cc5f61f4dca33e4f5fd94e1df39da428507c56a81ba3 DIST postgresql-9.2.24.tar.bz2 16552576 BLAKE2B 15e1fcc72830630c6c919113ed53c30c08f97c2543e678cac914b86456434d036f2efc262810e8f7ca0be714a8f690592a271ea5f6fb39777e73e94a9555e0ee SHA512 a6f043e5ef5e12e23c1c43b26a5ecafce62f3a86f38b5b85e7cb0cb7aa376d40e460a526baf67ae40de40525e4744fb5e48650ee5e007db4ce9742fcf548bd56 -DIST postgresql-9.3.15.tar.bz2 17059932 BLAKE2B c5afbdf3b1ffe457e137495001eb2f570adcf7844b909b62f3d077336d50b75d9fac456430c99df6449f1ea016252e9a99d96922fc3b5f21796c1361803312d6 SHA512 35c30cdb5599f99c94ab921f9f5e7671a8c0b7bca8fe3b616630ae13d6eda8d329e77e7e802da6a83cb09c3c9ca10fa8ce0de8a184e6fff471130e1cd68ce762 DIST postgresql-9.3.20.tar.bz2 17197360 BLAKE2B 2b07f6ee78294a490a8902d0129ac6b5e729e2d9a30631becc193cb7561294354a779ffc62bd61e807b1f540f01ce095e8ae4ad77adf2ea135389143809c9d48 SHA512 40098661bf00b64ad2d773b242613c44fe269b5ae984ad8990f85ce705b27138b127493c507103052fb6705d52f2e63a1df6692c7024d43c3c6b18154f2ef407 -DIST postgresql-9.3.21.tar.bz2 17014472 BLAKE2B 7735e7150c0418f979110cef083235959d22f4b63756cf76b9715862cc409b89f51b3e49bad9a33771b4df3ed39c515cf356c2ed69b77a3c7cb8d3448c83a024 SHA512 4c34ddf140a28b7095f8853f85c85cdc4ac44e4e5062ef66542c3082ada8509a201e0037e75d880e7909e1b41d0e3577713ad981cea8e693fb87644a0dce9929 DIST postgresql-9.3.22.tar.bz2 17022938 BLAKE2B 198705e438717d0d9e12c73e0c0e3eff0ba89ea50a1b183de70f065e13c153c164890fe56bc6ec13b0cb9617df4f66894c122eeddaf9303b9a02b8e08b19b085 SHA512 667ff496172626d2fe35c6795935fb07f4f7967a3b0631dd3b96278f8dc00b3d08794f091a5ab060a45d6f2a861e0f10f0e9660f9e343ab34eeabd693104c47f -DIST postgresql-9.4.10.tar.bz2 17802812 BLAKE2B 6f93a348ef51979b02c096d2c8fe980ce00e9fd1f9cf0766f3b06fa1ba9f52a146cffc205e7708c7bd16e0686486b21118734f4a1cd9823837abeee2e6fc9175 SHA512 2fcf47769b22c69bc82c9d6edc317e18dfcb4a96534e012bae4355e5088afa83da98b21e08a07766794f0a166888acbd16705a806464ea11711ed97c3b4012fb DIST postgresql-9.4.15.tar.bz2 17921677 BLAKE2B a41c81c7acc92265a6558c26370ff2afd258922a7158bbf40f8b1d6c7a3dbfb548502f42d646c96982dd5a87e5991f9d03046ae91e216704b97691666966d795 SHA512 be69f184cf18fb4c611d31a128f3593dc537551606f1db84a3ce9899b72f546876f05b29792435c3780c6c2b571759f4db2c172d62b2c012bd58574df80b4eb1 -DIST postgresql-9.4.16.tar.bz2 17778763 BLAKE2B 6051bbf042df6f7523ad5f27443c5c4fa8d3405813d40b281883df30f1f6a1709696cb1c0ff981bbe961eb6ba1ff1c49953736b730030111d106c700641954a5 SHA512 2e2bf14e2e63dec7254813e3c3a902a39cbd0aae89d8b3da5f75c6dead5d413a4f260fda6e87c9f84e4378df350c6531e67d972201f731a848b60bacef5b2bc8 DIST postgresql-9.4.17.tar.bz2 17807762 BLAKE2B 7640c29a71c6aeff47d9b43dd1e4f52edac4295b646b34da3a0ed9c26a8a826061bfd892e9907b62f31b7f01ee3aaf437c88d79b84d1d786d608dcd088309ecf SHA512 9ac03d460e521dcd142ac463dd5bb0f3e3f47333367bf8d61499ec7e8d0129d338c6f111667d0006df0c8ced9ae8a337d4c1b40eb5f55e6bc8dd5a24dfd376f0 DIST postgresql-9.5.10.tar.bz2 18701419 BLAKE2B bdd9a191f4de2ba1cb501476a5eabb377b60899b524f50e5baa1f47b95ce491634b7e69a9c37017614f48789d2b97fdff98e0b12ea06611d1ca76988a8db62c8 SHA512 24e31adabb0b88be882ab0440c560f0e4d5d69203be0581ca0ce22316555d92219ea0a2fd5254f12b2508bd3e58bbe0f1a7c8837228c96d9d5f00caac45af95a -DIST postgresql-9.5.11.tar.bz2 18572811 BLAKE2B 7b825d472e3bd6711eb3b4d5b1b5a03098d8d7ec7d0fc35cf7a5a12830bed9ca69922b75ab039fb6f0fcf1865a9fc37d3505d9eb129d03910ae1fa5e74f0a5db SHA512 c196709ddb953fe7ebdcee6e1d4624fc8136b83c5f0f6f010c29036a32f29f73763bdf64613dd57919d4be128e95a7f179c1c69a82f5951593c2fa0c2315fe83 DIST postgresql-9.5.12.tar.bz2 18589538 BLAKE2B 4246eb2bf5fe2e3bb48bdc411ebd3c87015570f0be4d8b1ed2a0f2ed20a8374e3244fa0aa17f9145f4f951c88f5b0717a4dd2186bf1621ce3334789f5f8dd50f SHA512 ab81bc95fd587f76a1986db5616b63d861b84da0eb9e54478f5298248a81d7a608d1bb1a9e30662c8190d05630106ddb3bb6413c34b003de948417214d342654 -DIST postgresql-9.5.5.tar.bz2 18525082 BLAKE2B 1a8e81b1f5b530c670863cfb08e47541c372e62f7ec6083da80b895cf015a80fc8bd3ffc9c7968e288303c71083ceda8ca54bcd3e2cb66c4f20b13396dc16fac SHA512 727ab57796cd393ec3755e9aabf515ebbdc3152b4062c20e64511e866a7e7038ba5c5e2843f13f3a79e2263296451f0e93108346b6f638611fba2449394e338e DIST postgresql-9.6.6.tar.bz2 19605724 BLAKE2B efdb13a4e32133b31a0ee368aed9bf76f0511596a2d77ade60129c2c76b0ba2c7dafad532cf09ae007d7110175a153968cfa151cf8aa7008b59d36ed00ed18ed SHA512 ac2f0fe6ef7c4e14f85cd7592d1306d9657b7f35efa6f43a089d7785ab970b8c25aa1e66d83df056c23513d6dbac0a9f54717b3d85758560d02e7f8141914ebc DIST postgresql-9.6.7.tar.bz2 19504886 BLAKE2B 04ed26987f3a38826b7e04bf364d8f59fc93aa700fdf74b4fc6afdb2fcf12697945c8354e49507af9c4d48fcc05173182cb164778c97845bf84250fd9e5ad882 SHA512 6a66cdd5b74ea6dc95628b89bb7663555370be56b3e938f635950628ad5d77443ac8f40c747be1fc1cfc19ca8b0a27f41e52fe4db83a43c7a7bab9bb076c7844 DIST postgresql-9.6.8.tar.bz2 19528927 BLAKE2B 6aab5dbe4b13e1624befc33c2fa5241804dff71879e2d60c166db19c2fe015cd19cfc35054e6aede82bfe6b83a7146b6d2eedaabb94111c163da732526ff1723 SHA512 6b7595c0046308c725d77360b156e979d6bc469b78ac6500f631112f19b2607ca2d816781f8c5fd3bd835c48e079e79ada7af687fbd306a8fec5e160f20dd211 EBUILD postgresql-10.1.ebuild 13697 BLAKE2B d356373a27d27fdd2447f93691847816fd089019206d7371cbd6c84a513b6d490b20278232769fe1de63d60d6bdd1e0ff9afce5fbf7b0da66296a57167d689df SHA512 65bbb3d9d6e64dbf46d8d24c0aacaa930c417b262fa01442cdb09820bf47d37e81fa272e5afe808cb96bd5a3fdad3d23540c1d08a2d5a8de8bb6e8f4b0a3db11 -EBUILD postgresql-10.2.ebuild 13694 BLAKE2B 9b4bab58754dce659e2c6c0c6b9e93a8af9097dfdff9efdab74eb6ed5f1533d04920a4b2bea58beba224ee38114c0cffd4e995879f0431fe8a6c66cc13a25dd9 SHA512 ecf4fdb9532135052036b6b94742be2d4d92bcfdd46b517f4882b46cff6962cabff0b3ec8ac8cf71303e44c67d433deff7e4d541a25d5909204f15919faab099 EBUILD postgresql-10.3.ebuild 13691 BLAKE2B 8414d44a4af307caa14e06d3b34e631ff4a1ae5a1a5c9311dc57f5d97998f3743c9bab734d03d8246f6966b3e57f0df94f1c403e6247213fe160d65da781ffeb SHA512 582ae144d826eaf3bda9a8a170caf5b75d7e7fdf362e2f38e605e150b4978fea72be0f4b0e28b9a531aa3f88c3b4ed317e2fa1fa5f397b463a431f295964fb72 -EBUILD postgresql-9.2.19.ebuild 11686 BLAKE2B f925064291b78586507d974cf47f850cdcd900dc6a8b60432ca02f242582ff876a13033a093200f4936898d48eb2ff47d74f808c84908962cac0f8b767a9c199 SHA512 886faf3fe74308c908e8c49e7a65cac36e55932eafee581ab021ef66ab3cc7fe2e37c5e4011b33239f6c11935465a6875e8f6d5b86fe4f64e5ead807a1e73164 -EBUILD postgresql-9.2.22.ebuild 13296 BLAKE2B da5e5cb771bbd20396f1621b7af93052a5e2fb022073286aa023245c083c146cad4d911d8754a94a33f9960ab91c8219c76bc624d15e2fbb385b54ac10f34558 SHA512 e16dca2871f2ede54993d9a81768ebc5ad3391041916d42108db09617c7d5577bf0f8daabc30b4d7a6851e991886e3155320a0a1c384c55eb248de12b3f7894e -EBUILD postgresql-9.2.23-r1.ebuild 13492 BLAKE2B 912b67da2be82aa402ff4cb684f273a1630a6b551adb66d92125bfae9c81b66a48fb7eace28086525ee1bfffa1072a2f756b374a2d9ff10018ace257ab8643fb SHA512 cfb518dd4033579b2fe7f459555809c7d141bc0e15d80d308afa0ad1d3ec92e8809f81d92b855b97d76b299b2e6ec7a48971f2a6fc052da2ec82f048aa22c009 -EBUILD postgresql-9.2.23.ebuild 13304 BLAKE2B f6e73d69d67cafc83186920d4a6d9eaf171de7e9da604a7b7320f3272734ade7f3de09255bd7a979ff7c8a901cbe083cdf41a583020946dfbaf18d626ba39efb SHA512 7f66c1cf3ab6c9843c9ba4d36eb4752c9647a016500aa0e77a1ea30265fe9dafdb19eda53350c506d306123d17814f75de1ff124bc2672828bcc4b8bb22ce952 EBUILD postgresql-9.2.24.ebuild 13483 BLAKE2B ef135a71dfb8f2349c106ddfa34c164058567dbc516d269487dba7b686200ea43e22ca18d5259d6ec321bbff4eb3c369faab14bdce558ecbaed424469732f53e SHA512 0220041ff150b574f7b2a7de0aa902813251abc192521e343f17d8b4aba1cdfb4c95545c8432372dd6bbf0b16c9f0628079dcfadd1c519f840be9b51bbca5444 -EBUILD postgresql-9.3.15.ebuild 11941 BLAKE2B 33410678e64b27a4802e11c1a5fcacadacb0b1332abdf61dfd64e0d6173b0be91ae9d457b58255dd56e410e13c9b5f778b7094acc8e1ddc1e265f685cff6a60b SHA512 3372d3801726ea6509713d79393ee59fc30eb2d832f17805f3d990308813064a59f42b7930d3342639475eeb37bdadc4952cf945e574f47c8ab7f0e9013b83d9 EBUILD postgresql-9.3.20.ebuild 13742 BLAKE2B 8c6a98061068a6ee781f77fa994c683d80c2c7a1fc4ba7b7cf08a8a4932ff6b7d2522563a9da03b537034da7ecc84b3ab4974b5d1cbdbdab9d64f0e24779cc9c SHA512 21a54b6e8d4483bd15b464e6ab23cc04dbfe2b38fda30131b0d5c26a6cb156aca3ddd09b7228b32b64e4edadd9f24fe0a779efa9f04e633078a4153fcb11086f -EBUILD postgresql-9.3.21.ebuild 13747 BLAKE2B eba1e76731b756897b9cd8b357f3f355cc70c0350cbde5648ae78705bc15255a9568d20b1e3bc6fbfde3886f34222a590073238146c9a7b618dd07c2a711aa39 SHA512 7a30b8dcb6c198b4a8e7a29bec5c6cd4c86b9886b505e72749adf826a656c0a1d83dd6e22883ac444ae54e43d908c2f415b2c87b04319b0115c2dfaabb3eaf6f EBUILD postgresql-9.3.22.ebuild 13744 BLAKE2B 18192645bd6ca52355673ab8f9567293250fdc4c802165d78c61ba1d1a3a1b92e7e6c2a67fa1754e1ad800d792030d358bcdda99b52159d9cfaeb58e20ac4122 SHA512 3b5143ae3600b936124ca2a008c538e0563d08ccc589a3177fe0dc5d25c35b379b9d704dbede0cfedb0ffbb293515f4625701291df6f31cff376fcf39f6393ea -EBUILD postgresql-9.4.10.ebuild 12751 BLAKE2B b90abd3b620ce5020b6c9af6e26856026c43204d7f15943a04c33c6dbe75c6b8aab8e4a59022a76913baa8596e0e44ffb454d8d98d7b1fad3747955d0e867ec3 SHA512 ccf11b56f79cd334fb67c13b549506c5c1bfe09b9496466d5d4d4dc976a9e5275cf9e9c1d0e579d615716f1abf320953126d531591439d5d1f777cdac8e4f70e EBUILD postgresql-9.4.15.ebuild 14552 BLAKE2B 5e343b4b7c24bfe2cab725491f41c4ec7eb12ca81595e268325adedad80e1266737ce3a18b5d4bd2dae8b3ebaf11b0ae55bed298aa9263eade7e2e7da00b3ff7 SHA512 afa0b8c349c8bd9c10b512f02c8dd16e6857d1a52acaa3ec7d695eb4ca3b7273c2cdcdc7b4b20f7c005570e4bdfd78126c890b6eaa60088ff9170cb5ec1b9595 -EBUILD postgresql-9.4.16.ebuild 14557 BLAKE2B c9478cf449e3de5e7de82ee121318e5fd5ba69932aa2a8d7f7f0071d716a77baf13e51611add88c36f645e6d79313dd49618a4bca89594d5e7534ec03892b58f SHA512 b10739ecf8688da66d712d0bcd99897128aec40f42ece1082de2bd3da5c63ca56f3bbb189c7e62fd67d3fead991be69da465ca1151b56f1e9bf5d4a6b65f7ccb EBUILD postgresql-9.4.17.ebuild 14554 BLAKE2B e24143470f9844174c241473671f9b422a3080d740048b532e9dda0cc8f347cd087845b01014b8ca3f6a3f96ed8389ed5cffd9f83c0bde6adc95ad02361da842 SHA512 4a5fc54ceb68528483bac90469ce1fa009e49a4f5148426633fff9f9b96799c1cd18aeb514931963905cd81d876d9c952fddd84405562b1dfbf8054e4cacd76c EBUILD postgresql-9.5.10.ebuild 14780 BLAKE2B 988e6270060614715936959b06867137f0629884d98cb50643d7d0fc4314c8192fa4205125bb376b3d9ac8d0b17cbceabd89b79671e9bd78017ca13a7c40ecc2 SHA512 26f93ac88c51609e62ea3d2dce5dbbc63cf8ad52ac76f029a437befd907d17d5b343a77a651c362b3292f8cb81784c480febe3909431a2f24ac51b9335d0b149 -EBUILD postgresql-9.5.11.ebuild 14785 BLAKE2B b10e25f8d4586c076f49cd9e7b7874c7a7892215a316f65685b5014bbc855485f932cb7684a8bc9c77ac4b3e5bcaf33915e58b6a98b3f2902fd1b9d791556438 SHA512 d55f33f3a7a9137ab6a923212d90cea54473f35115179f19d3be9f9863a8baa5875ef6647b7cb862288e304d5da91dd20e8a2b0f134f17c80d016eb9fa43be80 EBUILD postgresql-9.5.12.ebuild 14782 BLAKE2B 778b7eddd38fbd46b772d4b8c26d131d5ba74c2aed3a3b601151f97548947759b546b58d9d926c3e5309c0dfb29acad4cb5ae4c207c33ec6ef85b59af6fb590a SHA512 fc2d167d0058c1134d0e40b57e7ba22846307aa56e091467ed8ea339235c5728b9ed969aac6c55196201af83ebc38f4739f531a5e069e19ecb82ebfcf723072b -EBUILD postgresql-9.5.5.ebuild 13090 BLAKE2B cdcc7cfae7249c37a72bdb0a5c91362bc926170bc47d046f2023ac34ea925281d2f136500c1cae288b4ca2d4c9c8f90b490ddb648c26b3fbcbbf9fcdbabfc2b7 SHA512 957a4a494eb13d125867531c004193746cac0c3197ae3f45b191f78c7c02941400bd02f18af8f954ffbb45523688f5dc3cb4d804f5504020e0304083395cf8d0 EBUILD postgresql-9.6.6.ebuild 14922 BLAKE2B 25182d0ccbf475123d876bc4ad825b9b5049b7bd8edd8e96ef7390ab8d371515df12cc95426ba503366e81fe04be01c3a4c40a688caeb60fdb972f8f5e7c8ec4 SHA512 385e3c883cfe4926be01f760205a4c0827f6f20c0e465a082cd474e7b68c2a9977a2ebe4acc90c04171ff32f265abedcd12d225dcc3215981fe59216b1dbf6a2 EBUILD postgresql-9.6.7.ebuild 14927 BLAKE2B 1cba06e2425db4f19790ca672da27626850f16ca33b372ea140b561c65b8d5523657c4e88d82281cb551390f6247a79d3bbc2d859a28812d85c752fba1d2dc57 SHA512 6ba1b0fead0c121700f090c73e3d1b05faa8d69c4cb6f3fb73ec90fef20f0c7610c5adf0fea0c2934689ee9310aa2f975594198a5d434ab9ccf6f6a1159024cd -EBUILD postgresql-9.6.8.ebuild 14925 BLAKE2B a2aacec2f8168d697f93df9f285b8b063b6ec122c8184625e283c52628d4d675d93941c3a37c654d08f9e153631f4eaba79ad444adcdb8d8f9fd38f16f5cba94 SHA512 0675f2bd25bdf6dd83997ebd8ed7536a3a93fbe4b44ab28cb9a4b6b844a6f779da446316ef7a9c5015dd8b0501d1014e6f42bb0f3c837676dbc74c80dc6f7c75 +EBUILD postgresql-9.6.8.ebuild 14924 BLAKE2B 8d176dcd6d821460338ee10e7ffcde99b7a41f65b934f0c71c4402239e848098af82fd81b3b37b0cc115b8c15378019028a5e8c7b5cc13cfbeb6e3cdc25ddc0b SHA512 23f6c89751d424c85b9babecd74a552af3d2edb65c6db079d2c3502aa7ecb42c476cb689fc1986fd65bffba52908fb13f3b36646417dc8174a50bb51ba6778f5 EBUILD postgresql-9999.ebuild 13544 BLAKE2B 2a1f9c50e21e7b9981adb38d18d4814903578a461d81f8a250fccc73b5680232f9d53d3c56486e65007b90a954f31939775ce5e4bcc621672e8b29e0ee332b0d SHA512 7c579c0a60b1e10e2d0c254fc9f60f2908db3634371d359c88ebf0acf581eaadf24ba5e8d3ee0ebd4aa05d840a97d0df74385578c0d792ee7ba87402b6931813 MISC metadata.xml 751 BLAKE2B 4628a6d379a41b4646be34dfcfca2be58bc93b883ccd6f4d21a426aacb34dd7d5347c5f9d61f9211f4f91bff67d2d5935b203959ab0790c74031944a9ab799f6 SHA512 726f30ec991194427b2dbcdf650778dbe0f169cb305d569918404d403deef397aef7ec3f1a5269c15f7ec7fc5506dc534203323379f1d0acc475eeb8d75d0cf1 diff --git a/dev-db/postgresql/files/postgresql-9.2-9.4-tz-dir-overflow.patch b/dev-db/postgresql/files/postgresql-9.2-9.4-tz-dir-overflow.patch deleted file mode 100644 index 59e43c5384e7..000000000000 --- a/dev-db/postgresql/files/postgresql-9.2-9.4-tz-dir-overflow.patch +++ /dev/null @@ -1,16 +0,0 @@ ---- a/src/timezone/pgtz.c 2015-02-02 15:45:23.000000000 -0500 -+++ b/src/timezone/pgtz.c 2015-04-07 14:21:22.341832190 -0400 -@@ -1615,6 +1615,13 @@ - if (direntry->d_name[0] == '.') - continue; - -+ /* copy current working directory so that there is no risk of modification by basename(), -+ * and compare to current direntry name; skip if they are the same as this is a recursive fs loop -+ */ -+ snprintf(fullname, MAXPGPATH, "%s", dir->dirname[dir->depth]); -+ if (strncmp(direntry->d_name,basename(fullname),strlen(direntry->d_name)) == 0) -+ continue; -+ - snprintf(fullname, MAXPGPATH, "%s/%s", - dir->dirname[dir->depth], direntry->d_name); - if (stat(fullname, &statbuf) != 0) diff --git a/dev-db/postgresql/files/postgresql.confd b/dev-db/postgresql/files/postgresql.confd deleted file mode 100644 index 07b465d9b61a..000000000000 --- a/dev-db/postgresql/files/postgresql.confd +++ /dev/null @@ -1,58 +0,0 @@ -# Which port and socket to bind PostgreSQL -PGPORT="5432" - -# How long to wait for server to start in seconds -START_TIMEOUT=10 - -# NICE_QUIT ignores new connections and wait for clients to disconnect from -# server before shutting down. NICE_TIMEOUT in seconds determines how long to -# wait for this to succeed. -NICE_TIMEOUT=60 - -# Forecfully disconnect clients from server and shut down. This is performed -# after NICE_QUIT. Terminated client connections have their open transactions -# rolled back. -# Set RUDE_QUIT to "NO" to disable. RUDE_TIMEOUT in seconds. -RUDE_QUIT="YES" -RUDE_TIMEOUT=30 - -# If the server still fails to shutdown, you can force it to quit by setting -# this to YES and a recover-run will execute on the next startup. -# Set FORCE_QUIT to "YES" to enable. FORCE_TIMEOUT in seconds. -FORCE_QUIT="NO" -FORCE_TIMEOUT=2 - -# Extra options to run postmaster with, e.g.: -# -N is the maximal number of client connections -# -B is the number of shared buffers and has to be at least 2x the value for -N -# Please read the man-page to postmaster for more options. Many of these -# options can be set directly in the configuration file. -#PGOPTS="-N 512 -B 1024" - -# Pass extra environment variables. If you have to export environment variables -# for the database process, this can be done here. -# Don't forget to escape quotes. -#PG_EXTRA_ENV="PGPASSFILE=\"/path/to/.pgpass\"" - -############################################################################## -# -# The following values should not be arbitrarily changed. -# -# `emerge --config dev-db/postgresql:@SLOT@' uses these values to -# determine where to create the data directory, where to place the -# configuration files, and any additional options to pass to initdb. -# -# The initscript also uses these variables to inform PostgreSQL where to find -# its data directory and configuration files. -# -############################################################################## - -# Location of configuration files -PGDATA="/etc/postgresql-@SLOT@/" - -# Where the data directory is located/to be created -DATA_DIR="/var/lib/postgresql/@SLOT@/data" - -# Additional options to pass to initdb. -# See `man initdb' for available options. -PG_INITDB_OPTS="--encoding=UTF8" diff --git a/dev-db/postgresql/files/postgresql.init b/dev-db/postgresql/files/postgresql.init deleted file mode 100644 index 35dd316e9604..000000000000 --- a/dev-db/postgresql/files/postgresql.init +++ /dev/null @@ -1,137 +0,0 @@ -#!/sbin/openrc-run -# Copyright 1999-2014 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -extra_started_commands="reload" - -get_config() { - [ -f ${PGDATA%/}/postgresql.conf ] || return 1 - - eval echo $(sed -e 's:#.*::' ${PGDATA%/}/postgresql.conf \ - | awk '$1 == "'$1'" { print ($2 == "=" ? $3 : $2) }') -} - -depend() { - use net - provide postgresql - - if [ "$(get_config log_destination)" = "syslog" ]; then - use logger - fi -} - -configured_port=$(get_config port) -: ${configured_port:=${PGPORT}} -socket_path=$(get_config unix_socket_directory) -: ${socket_path:=/run/postgresql} - -checkconfig() { - # Check that DATA_DIR has been set - if [ -z ${DATA_DIR} ] ; then - eerror "DATA_DIR not set" - eerror "HINT: Perhaps you need to update /etc/conf.d/postgresql-@SLOT@" - return 1 - fi - - # Check that DATA_DIR exists - if [ ! -d ${DATA_DIR} ] ; then - eerror "Directory not found: ${DATA_DIR}" - eerror "HINT: Ensure that DATA_DIR points to the right path." - eerror "HINT: Or perhaps you need to create the database cluster:" - eerror " emerge --config dev-db/postgresql:@SLOT@" - return 1 - fi - - # Check for the existence of PostgreSQL's config files, and set the - # proper mode and ownership. - # Only three files should be checked as potentially other files - # may be in PGDATA that should not be touched. - local file - for file in postgresql pg_hba pg_ident ; do - file="${PGDATA%/}/${file}.conf" - if [ -f ${file} ] ; then - checkpath -f -m 0600 -o postgres:postgres ${file} - else - eerror "${file} not found" - eerror "HINT: mv ${DATA_DIR%/}/*.conf ${PGDATA}" - return 1 - fi - done - - # Set the proper permission for the socket path and create it if - # it doesn't exist. - checkpath -d -m 1775 -o postgres:postgres ${socket_path} - if [ -e ${socket_path%/}/.s.PGSQL.${configured_port} ] ; then - eerror "Socket conflict." - eerror "A server is already listening on:" - eerror " ${socket_path%/}/.s.PGSQL.${configured_port}" - eerror "HINT: Change PGPORT to listen on a different socket." - return 1 - fi -} - -start() { - checkconfig || return 1 - - ebegin "Starting PostgreSQL" - - rm -f ${DATA_DIR%/}/postmaster.pid - - local extraenv - local x - for x in ${PG_EXTRA_ENV} ; do - extraenv="${extraenv} --env ${x}" - done - - start-stop-daemon --start \ - --user postgres \ - --env "PGPORT=${configured_port}" \ - ${extraenv} \ - --pidfile ${DATA_DIR%/}/postmaster.pid \ - --exec /usr/@LIBDIR@/postgresql-@SLOT@/bin/pg_ctl \ - -- start -s -w -t ${START_TIMEOUT} -l ${DATA_DIR%/}/postmaster.log \ - -D ${PGDATA} -o "--data-directory=${DATA_DIR} ${PGOPTS}" - local retval=$? - - if [ $retval -ne 0 ] ; then - eerror "Check the log for a possible explanation of the above error. The log may be" - eerror " ${DATA_DIR%/}/postmaster.log" - eerror "Or wherever you configured PostgreSQL @SLOT@ log messages to be sent." - eend $retval - return $retval - fi - - eend $retval -} - -stop() { - local seconds=$(( ${NICE_TIMEOUT} + ${RUDE_TIMEOUT} + ${FORCE_TIMEOUT} )) - ebegin "Stopping PostgreSQL (this can take up to ${seconds} seconds)" - - local retval - local retries=SIGTERM/${NICE_TIMEOUT} - - if [ "${RUDE_QUIT}" != "NO" ] ; then - einfo "RUDE_QUIT enabled." - retries="${retries}/SIGINT/${RUDE_TIMEOUT}" - fi - if [ "${FORCE_QUIT}" = "YES" ] ; then - einfo "FORCE_QUIT enabled." - ewarn "A recover-run might be executed on next startup." - retries="${retries}/SIGQUIT/${FORCE_TIMEOUT}" - fi - - # Loops through nice, rude, and force quit in one go. - start-stop-daemon --stop \ - --exec /usr/@LIBDIR@/postgresql-@SLOT@/bin/postgres \ - --retry ${retries} \ - --pidfile ${DATA_DIR%/}/postmaster.pid - - eend -} - -reload() { - ebegin "Reloading PostgreSQL configuration" - kill -HUP $(head -n1 ${DATA_DIR%/}/postmaster.pid) - eend $? -} diff --git a/dev-db/postgresql/files/postgresql.init-9.3 b/dev-db/postgresql/files/postgresql.init-9.3 deleted file mode 100644 index ffecea7a757c..000000000000 --- a/dev-db/postgresql/files/postgresql.init-9.3 +++ /dev/null @@ -1,142 +0,0 @@ -#!/sbin/openrc-run -# Copyright 1999-2015 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -extra_started_commands="reload" - -get_config() { - [ -f ${PGDATA%/}/postgresql.conf ] || return 1 - - eval echo $(sed -e 's:#.*::' ${PGDATA%/}/postgresql.conf \ - | awk '$1 == "'$1'" { print ($2 == "=" ? $3 : $2) }') -} - -depend() { - use net - provide postgresql - - if [ "$(get_config log_destination)" = "syslog" ]; then - use logger - fi -} - -configured_port=$(get_config port) -: ${configured_port:=${PGPORT}} -socket_paths=$(get_config unix_socket_directories) -: ${socket_paths:=/run/postgresql} - -checkconfig() { - # Check that DATA_DIR has been set - if [ -z ${DATA_DIR} ] ; then - eerror "DATA_DIR not set" - eerror "HINT: Perhaps you need to update /etc/conf.d/postgresql-@SLOT@" - return 1 - fi - - # Check that DATA_DIR exists - if [ ! -d ${DATA_DIR} ] ; then - eerror "Directory not found: ${DATA_DIR}" - eerror "HINT: Ensure that DATA_DIR points to the right path." - eerror "HINT: Or perhaps you need to create the database cluster:" - eerror " emerge --config dev-db/postgresql:@SLOT@" - return 1 - fi - - # Check for the existence of PostgreSQL's config files, and set the - # proper mode and ownership. - # Only three files should be checked as potentially other files - # may be in PGDATA that should not be touched. - local file - for file in postgresql pg_hba pg_ident ; do - file="${PGDATA%/}/${file}.conf" - if [ -f ${file} ] ; then - checkpath -f -m 0600 -o postgres:postgres ${file} - else - eerror "${file} not found" - eerror "HINT: mv ${DATA_DIR%/}/*.conf ${PGDATA}" - return 1 - fi - done - - # Set the proper permission for the socket paths and create it if - # it doesn't exist. - set -f; IFS=',' - local s - for s in ${socket_paths}; do - checkpath -d -m 1775 -o postgres:postgres ${s} - if [ -e ${s%/}/.s.PGSQL.${configured_port} ] ; then - eerror "Socket conflict." - eerror "A server is already listening on:" - eerror " ${s%/}/.s.PGSQL.${configured_port}" - eerror "HINT: Change PGPORT to listen on a different socket." - return 1 - fi - done - set +f; unset IFS -} - -start() { - checkconfig || return 1 - - ebegin "Starting PostgreSQL" - - rm -f ${DATA_DIR%/}/postmaster.pid - - local extraenv - local x - for x in ${PG_EXTRA_ENV} ; do - extraenv="${extraenv} --env ${x}" - done - - start-stop-daemon --start \ - --user postgres \ - --env "PGPORT=${configured_port}" \ - ${extraenv} \ - --pidfile ${DATA_DIR%/}/postmaster.pid \ - --exec /usr/@LIBDIR@/postgresql-@SLOT@/bin/pg_ctl \ - -- start -s -w -t ${START_TIMEOUT} -l ${DATA_DIR%/}/postmaster.log \ - -D ${PGDATA} -o "--data-directory=${DATA_DIR} ${PGOPTS}" - local retval=$? - - if [ $retval -ne 0 ] ; then - eerror "Check the log for a possible explanation of the above error. The log may be" - eerror " ${DATA_DIR%/}/postmaster.log" - eerror "Or wherever you configured PostgreSQL @SLOT@ log messages to be sent." - eend $retval - return $retval - fi - - eend $retval -} - -stop() { - local seconds=$(( ${NICE_TIMEOUT} + ${RUDE_TIMEOUT} + ${FORCE_TIMEOUT} )) - ebegin "Stopping PostgreSQL (this can take up to ${seconds} seconds)" - - local retval - local retries=SIGTERM/${NICE_TIMEOUT} - - if [ "${RUDE_QUIT}" != "NO" ] ; then - einfo "RUDE_QUIT enabled." - retries="${retries}/SIGINT/${RUDE_TIMEOUT}" - fi - if [ "${FORCE_QUIT}" = "YES" ] ; then - einfo "FORCE_QUIT enabled." - ewarn "A recover-run might be executed on next startup." - retries="${retries}/SIGQUIT/${FORCE_TIMEOUT}" - fi - - # Loops through nice, rude, and force quit in one go. - start-stop-daemon --stop \ - --exec /usr/@LIBDIR@/postgresql-@SLOT@/bin/postgres \ - --retry ${retries} \ - --pidfile ${DATA_DIR%/}/postmaster.pid - - eend -} - -reload() { - ebegin "Reloading PostgreSQL configuration" - kill -HUP $(head -n1 ${DATA_DIR%/}/postmaster.pid) - eend $? -} diff --git a/dev-db/postgresql/files/postgresql.service b/dev-db/postgresql/files/postgresql.service deleted file mode 100644 index a607169d22f4..000000000000 --- a/dev-db/postgresql/files/postgresql.service +++ /dev/null @@ -1,55 +0,0 @@ -# It's not recommended to modify this file in-place, because it will be -# overwritten during package upgrades. If you want to customize, the -# best way is to create file -# "/etc/systemd/system/postgresql-@SLOT@.service.d/*.conf" -# containing your changes - -# For example, if you want to change the server's port number to 5433, -# create a file named -# "/etc/systemd/system/postgresql-@SLOT@.service.d/port.conf" -# containing: -# [Service] -# Environment=PGPORT=5433 -# This will override the setting appearing below. - -[Unit] -Description=PostgreSQL database server -After=network.target - -[Service] -Type=forking - -User=postgres -Group=postgres - -# Port number for server to listen on -Environment=PGPORT=5432 - -# Location of configuration files -Environment=PGDATA=/etc/postgresql-@SLOT@ - -# Where the data directory is located -Environment=DATA_DIR=/var/lib/postgresql/@SLOT@/data - -# Where to send early-startup messages from the server (before the logging -# options of postgresql.conf take effect) -# This is normally controlled by the global default set by systemd -# StandardOutput=syslog - -ExecStartPre=/usr/bin/postgresql-@SLOT@-check-db-dir -ExecStart=/usr/@LIBDIR@/postgresql-@SLOT@/bin/pg_ctl start -D ${DATA_DIR} -s -l ${DATA_DIR}/postmaster.log -o "-p ${PGPORT} -D ${PGDATA} --data-directory=${DATA_DIR}" -w -t 300 -ExecStop=/usr/@LIBDIR@/postgresql-@SLOT@/bin/pg_ctl stop -D ${DATA_DIR} -s -m fast -ExecReload=/usr/@LIBDIR@/postgresql-@SLOT@/bin/pg_ctl reload -D ${DATA_DIR} -s - -# Give a reasonable amount of time for the server to start up/shut down -TimeoutSec=300 - -# Disable OOM kill on the postmaster -OOMScoreAdjust=-1000 - -# Make sure the required runtimedir is present -RuntimeDirectory=postgresql -RuntimeDirectoryMode=1775 - -[Install] -WantedBy=multi-user.target diff --git a/dev-db/postgresql/files/postgresql.service-9.6 b/dev-db/postgresql/files/postgresql.service-9.6 deleted file mode 100644 index 89ec2d5cf7c0..000000000000 --- a/dev-db/postgresql/files/postgresql.service-9.6 +++ /dev/null @@ -1,56 +0,0 @@ -# It's not recommended to modify this file in-place, because it will be -# overwritten during package upgrades. If you want to customize, the -# best way is to create file -# "/etc/systemd/system/postgresql-@SLOT@.service.d/*.conf" -# containing your changes - -# For example, if you want to change the server's port number to 5433, -# create a file named -# "/etc/systemd/system/postgresql-@SLOT@.service.d/port.conf" -# containing: -# [Service] -# Environment=PGPORT=5433 -# This will override the setting appearing below. - -[Unit] -Description=PostgreSQL database server -After=network.target - -[Service] -Type=notify - -User=postgres -Group=postgres - -# Port number for server to listen on -Environment=PGPORT=5432 - -# Location of configuration files -Environment=PGDATA=/etc/postgresql-@SLOT@ - -# Where the data directory is located -Environment=DATA_DIR=/var/lib/postgresql/@SLOT@/data - -# Where to send early-startup messages from the server (before the logging -# options of postgresql.conf take effect) -# This is normally controlled by the global default set by systemd -# StandardOutput=syslog - -ExecStartPre=/usr/bin/postgresql-@SLOT@-check-db-dir -ExecStart=/usr/@LIBDIR@/postgresql-@SLOT@/bin/postgres -p ${PGPORT} -D ${DATA_DIR} -ExecReload=/bin/kill -HUP $MAINPID -KillMode=mixed -KillSignal=SIGINT - -# Give a reasonable amount of time for the server to start up/shut down -TimeoutSec=300 - -# Disable OOM kill on the postmaster -OOMScoreAdjust=-1000 - -# Make sure the required runtimedir is present -RuntimeDirectory=postgresql -RuntimeDirectoryMode=1775 - -[Install] -WantedBy=multi-user.target diff --git a/dev-db/postgresql/postgresql-10.2.ebuild b/dev-db/postgresql/postgresql-10.2.ebuild deleted file mode 100644 index 3606fab49166..000000000000 --- a/dev-db/postgresql/postgresql-10.2.ebuild +++ /dev/null @@ -1,460 +0,0 @@ -# Copyright 1999-2018 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI="6" - -PYTHON_COMPAT=( python2_7 python3_{4,5,6} ) - -inherit eutils flag-o-matic linux-info multilib pam prefix python-single-r1 \ - systemd user versionator - -KEYWORDS="alpha amd64 ~arm ~arm64 ~hppa ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc x86 ~amd64-fbsd ~x86-fbsd ~ppc-macos ~x86-solaris" - -SLOT=$(get_major_version) - -MY_PV=${PV/_/} -S="${WORKDIR}/${PN}-${MY_PV}" - -SRC_URI="mirror://postgresql/source/v${MY_PV}/postgresql-${MY_PV}.tar.bz2" - -LICENSE="POSTGRESQL GPL-2" -DESCRIPTION="PostgreSQL RDBMS" -HOMEPAGE="http://www.postgresql.org/" - -IUSE="doc 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} )" - -wanted_languages() { - local linguas="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" - local enable_langs lingua - - for lingua in ${linguas} ; do - has ${lingua} ${LINGUAS-${lingua}} && enable_langs+="${lingua} " - done - - echo -n ${enable_langs} -} - -CDEPEND=" ->=app-eselect/eselect-postgresql-2.0 -sys-apps/less -virtual/libintl -kerberos? ( virtual/krb5 ) -ldap? ( net-nds/openldap ) -pam? ( virtual/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}" \ - --docdir="${PO}/usr/share/doc/${PF}" \ - --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 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 "$(wanted_languages)")" -} - -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 - - 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/.}" - 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}" - 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 "${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.2.19.ebuild b/dev-db/postgresql/postgresql-9.2.19.ebuild deleted file mode 100644 index 54d1c48fa585..000000000000 --- a/dev-db/postgresql/postgresql-9.2.19.ebuild +++ /dev/null @@ -1,390 +0,0 @@ -# Copyright 1999-2018 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI="5" - -PYTHON_COMPAT=( python{2_7,3_4} ) - -inherit eutils flag-o-matic linux-info multilib pam prefix python-single-r1 \ - systemd user versionator - -KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd ~ppc-macos ~x86-solaris" - -SLOT="$(get_version_component_range 1-2)" - -SRC_URI="mirror://postgresql/source/v${PV}/postgresql-${PV}.tar.bz2" - -LICENSE="POSTGRESQL GPL-2" -DESCRIPTION="PostgreSQL RDBMS" -HOMEPAGE="http://www.postgresql.org/" - -IUSE="doc kerberos kernel_linux ldap libressl nls pam perl -pg_legacytimestamp python - +readline selinux +server ssl static-libs tcl threads uuid xml zlib" -REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" - -wanted_languages() { - local linguas="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" - local enable_langs lingua - - for lingua in ${linguas} ; do - has ${lingua} ${LINGUAS-${lingua}} && enable_langs+="${lingua} " - done - - echo -n ${enable_langs} -} - -CDEPEND=" ->=app-eselect/eselect-postgresql-1.2.0 -sys-apps/less -virtual/libintl -kerberos? ( virtual/krb5 ) -ldap? ( net-nds/openldap ) -pam? ( virtual/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= ) -uuid? ( dev-libs/ossp-uuid ) -xml? ( dev-libs/libxml2 dev-libs/libxslt ) -zlib? ( sys-libs/zlib ) -" - -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 - - use server || epatch "${FILESDIR}/${PN}-${SLOT}-no-server.patch" - - # Fix bug 486556 where the server would crash at start up because of - # an infinite loop caused by a self-referencing symlink. - epatch "${FILESDIR}/postgresql-9.2-9.4-tz-dir-overflow.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 - - epatch_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%/}" - - econf \ - --prefix="${PO}/usr/$(get_libdir)/postgresql-${SLOT}" \ - --datadir="${PO}/usr/share/postgresql-${SLOT}" \ - --docdir="${PO}/usr/share/doc/${PF}" \ - --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 kerberos krb5) \ - $(use_with ldap) \ - $(use_with pam) \ - $(use_with perl) \ - $(use_with python) \ - $(use_with readline) \ - $(use_with ssl openssl) \ - $(use_with tcl) \ - $(use_with uuid ossp-uuid) \ - $(use_with xml libxml) \ - $(use_with xml libxslt) \ - $(use_with zlib) \ - "$(use_enable nls nls "$(wanted_languages)")" -} - -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} - - insinto /etc/postgresql-${SLOT} - newins src/bin/psql/psqlrc.sample psqlrc - - dodir /etc/eselect/postgresql/slots/${SLOT} - echo "postgres_ebuilds=\"\${postgres_ebuilds} ${PF}\"" > \ - "${ED}/etc/eselect/postgresql/slots/${SLOT}/base" - - use static-libs || find "${ED}" -name '*.a' -delete - - 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" | newconfd - ${PN}-${SLOT} - - sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \ - "${FILESDIR}/${PN}.init" | newinitd - ${PN}-${SLOT} - - sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \ - "${FILESDIR}/${PN}.service" | \ - systemd_newunit - ${PN}-${SLOT}.service - - 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 0775 /run/postgresql - fi - fi -} - -pkg_postinst() { - postgresql-config update - - elog "If you need a global psqlrc-file, you can place it in:" - elog " ${EROOT%/}/etc/postgresql-${SLOT}/" - - if [[ -z ${REPLACING_VERSIONS} ]] ; then - elog - elog "It looks like this is your first time installing PostgreSQL. Run the" - elog "following command in all active shells to pick up changes to the default" - elog "environment:" - elog " source /etc/profile" - fi - - 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}" - 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 - while [ "$correct" != "true" ] ; do - einfo "Are you ready to continue? (y/n)" - read answer - if [[ $answer =~ ^[Yy]([Ee][Ss])?$ ]] ; then - correct="true" - elif [[ $answer =~ ^[Nn]([Oo])?$ ]] ; then - die "Aborting initialization." - else - echo "Answer not recognized" - fi - done - - 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 - - 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.2.22.ebuild b/dev-db/postgresql/postgresql-9.2.22.ebuild deleted file mode 100644 index f68ece459c13..000000000000 --- a/dev-db/postgresql/postgresql-9.2.22.ebuild +++ /dev/null @@ -1,441 +0,0 @@ -# Copyright 1999-2018 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI="6" - -PYTHON_COMPAT=( python2_7 python3_{4,5,6} ) - -inherit eutils flag-o-matic linux-info multilib pam prefix python-single-r1 \ - systemd user versionator - -KEYWORDS="alpha amd64 arm ~hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd ~ppc-macos ~x86-solaris" - -SLOT="$(get_version_component_range 1-2)" - -SRC_URI="mirror://postgresql/source/v${PV}/postgresql-${PV}.tar.bz2" - -LICENSE="POSTGRESQL GPL-2" -DESCRIPTION="PostgreSQL RDBMS" -HOMEPAGE="http://www.postgresql.org/" - -IUSE="doc kerberos kernel_linux ldap libressl nls pam perl -pg_legacytimestamp python - +readline selinux +server ssl static-libs tcl threads uuid xml zlib" -REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" - -wanted_languages() { - local linguas="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" - local enable_langs lingua - - for lingua in ${linguas} ; do - has ${lingua} ${LINGUAS-${lingua}} && enable_langs+="${lingua} " - done - - echo -n ${enable_langs} -} - -CDEPEND=" ->=app-eselect/eselect-postgresql-2.0 -sys-apps/less -virtual/libintl -kerberos? ( virtual/krb5 ) -ldap? ( net-nds/openldap ) -pam? ( virtual/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= ) -uuid? ( dev-libs/ossp-uuid ) -xml? ( dev-libs/libxml2 dev-libs/libxslt ) -zlib? ( sys-libs/zlib ) -" - -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 - - use server || eapply "${FILESDIR}/${PN}-${SLOT}-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%/}" - - econf \ - --prefix="${PO}/usr/$(get_libdir)/postgresql-${SLOT}" \ - --datadir="${PO}/usr/share/postgresql-${SLOT}" \ - --docdir="${PO}/usr/share/doc/${PF}" \ - --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 kerberos krb5) \ - $(use_with ldap) \ - $(use_with pam) \ - $(use_with perl) \ - $(use_with python) \ - $(use_with readline) \ - $(use_with ssl openssl) \ - $(use_with tcl) \ - $(use_with uuid ossp-uuid) \ - $(use_with xml libxml) \ - $(use_with xml libxslt) \ - $(use_with zlib) \ - "$(use_enable nls nls "$(wanted_languages)")" -} - -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.2" | newconfd - ${PN}-${SLOT} - - sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \ - "${FILESDIR}/${PN}.init-9.2" | newinitd - ${PN}-${SLOT} - - sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \ - "${FILESDIR}/${PN}.service" | \ - systemd_newunit - ${PN}-${SLOT}.service - - 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 0775 /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() { - 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}" - 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 "${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_directory/d' -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.2.23-r1.ebuild b/dev-db/postgresql/postgresql-9.2.23-r1.ebuild deleted file mode 100644 index 9eae7d8feef2..000000000000 --- a/dev-db/postgresql/postgresql-9.2.23-r1.ebuild +++ /dev/null @@ -1,445 +0,0 @@ -# Copyright 1999-2018 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI="6" - -PYTHON_COMPAT=( python2_7 python3_{4,5,6} ) - -inherit eutils flag-o-matic linux-info multilib pam prefix python-single-r1 \ - systemd user versionator - -KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~ppc-macos ~x86-solaris" - -SLOT="$(get_version_component_range 1-2)" - -SRC_URI="mirror://postgresql/source/v${PV}/postgresql-${PV}.tar.bz2" - -LICENSE="POSTGRESQL GPL-2" -DESCRIPTION="PostgreSQL RDBMS" -HOMEPAGE="http://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} )" - -wanted_languages() { - local linguas="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" - local enable_langs lingua - - for lingua in ${linguas} ; do - has ${lingua} ${LINGUAS-${lingua}} && enable_langs+="${lingua} " - done - - echo -n ${enable_langs} -} - -CDEPEND=" ->=app-eselect/eselect-postgresql-2.0 -sys-apps/less -virtual/libintl -kerberos? ( virtual/krb5 ) -ldap? ( net-nds/openldap ) -pam? ( virtual/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= ) -uuid? ( dev-libs/ossp-uuid ) -xml? ( dev-libs/libxml2 dev-libs/libxslt ) -zlib? ( sys-libs/zlib ) -" - -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 - - use server || eapply "${FILESDIR}/${PN}-${SLOT}-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%/}" - - econf \ - --prefix="${PO}/usr/$(get_libdir)/postgresql-${SLOT}" \ - --datadir="${PO}/usr/share/postgresql-${SLOT}" \ - --docdir="${PO}/usr/share/doc/${PF}" \ - --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 kerberos krb5) \ - $(use_with ldap) \ - $(use_with pam) \ - $(use_with perl) \ - $(use_with python) \ - $(use_with readline) \ - $(use_with ssl openssl) \ - $(use_with tcl) \ - $(use_with uuid ossp-uuid) \ - $(use_with xml libxml) \ - $(use_with xml libxslt) \ - $(use_with zlib) \ - "$(use_enable nls nls "$(wanted_languages)")" -} - -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.2" | newconfd - ${PN}-${SLOT} - - sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \ - "${FILESDIR}/${PN}.init-9.2" | 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 "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}" - 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 "${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_directory/d' -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.2.23.ebuild b/dev-db/postgresql/postgresql-9.2.23.ebuild deleted file mode 100644 index bc6bfbfbf3de..000000000000 --- a/dev-db/postgresql/postgresql-9.2.23.ebuild +++ /dev/null @@ -1,441 +0,0 @@ -# Copyright 1999-2018 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI="6" - -PYTHON_COMPAT=( python2_7 python3_{4,5,6} ) - -inherit eutils flag-o-matic linux-info multilib pam prefix python-single-r1 \ - systemd user versionator - -KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~ppc-macos ~x86-solaris" - -SLOT="$(get_version_component_range 1-2)" - -SRC_URI="mirror://postgresql/source/v${PV}/postgresql-${PV}.tar.bz2" - -LICENSE="POSTGRESQL GPL-2" -DESCRIPTION="PostgreSQL RDBMS" -HOMEPAGE="http://www.postgresql.org/" - -IUSE="doc kerberos kernel_linux ldap libressl nls pam perl -pg_legacytimestamp python - +readline selinux +server ssl static-libs tcl threads uuid xml zlib" -REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" - -wanted_languages() { - local linguas="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" - local enable_langs lingua - - for lingua in ${linguas} ; do - has ${lingua} ${LINGUAS-${lingua}} && enable_langs+="${lingua} " - done - - echo -n ${enable_langs} -} - -CDEPEND=" ->=app-eselect/eselect-postgresql-2.0 -sys-apps/less -virtual/libintl -kerberos? ( virtual/krb5 ) -ldap? ( net-nds/openldap ) -pam? ( virtual/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= ) -uuid? ( dev-libs/ossp-uuid ) -xml? ( dev-libs/libxml2 dev-libs/libxslt ) -zlib? ( sys-libs/zlib ) -" - -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 - - use server || eapply "${FILESDIR}/${PN}-${SLOT}-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%/}" - - econf \ - --prefix="${PO}/usr/$(get_libdir)/postgresql-${SLOT}" \ - --datadir="${PO}/usr/share/postgresql-${SLOT}" \ - --docdir="${PO}/usr/share/doc/${PF}" \ - --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 kerberos krb5) \ - $(use_with ldap) \ - $(use_with pam) \ - $(use_with perl) \ - $(use_with python) \ - $(use_with readline) \ - $(use_with ssl openssl) \ - $(use_with tcl) \ - $(use_with uuid ossp-uuid) \ - $(use_with xml libxml) \ - $(use_with xml libxslt) \ - $(use_with zlib) \ - "$(use_enable nls nls "$(wanted_languages)")" -} - -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.2" | newconfd - ${PN}-${SLOT} - - sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \ - "${FILESDIR}/${PN}.init-9.2" | newinitd - ${PN}-${SLOT} - - sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \ - "${FILESDIR}/${PN}.service" | \ - systemd_newunit - ${PN}-${SLOT}.service - - 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 0775 /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() { - 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}" - 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 "${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_directory/d' -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.3.15.ebuild b/dev-db/postgresql/postgresql-9.3.15.ebuild deleted file mode 100644 index 2a15daf099fc..000000000000 --- a/dev-db/postgresql/postgresql-9.3.15.ebuild +++ /dev/null @@ -1,395 +0,0 @@ -# Copyright 1999-2018 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI="5" - -PYTHON_COMPAT=( python{2_7,3_4} ) - -inherit eutils flag-o-matic linux-info multilib pam prefix python-single-r1 \ - systemd user versionator - -KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd ~ppc-macos ~x86-solaris" - -SLOT="$(get_version_component_range 1-2)" - -SRC_URI="mirror://postgresql/source/v${PV}/postgresql-${PV}.tar.bz2" - -LICENSE="POSTGRESQL GPL-2" -DESCRIPTION="PostgreSQL RDBMS" -HOMEPAGE="http://www.postgresql.org/" - -IUSE="doc kerberos kernel_linux ldap libressl nls pam perl -pg_legacytimestamp python - +readline selinux +server ssl static-libs tcl threads uuid xml zlib" -REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" - -wanted_languages() { - local linguas="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" - local enable_langs lingua - - for lingua in ${linguas} ; do - has ${lingua} ${LINGUAS-${lingua}} && enable_langs+="${lingua} " - done - - echo -n ${enable_langs} -} - -CDEPEND=" ->=app-eselect/eselect-postgresql-1.2.0 -sys-apps/less -virtual/libintl -kerberos? ( virtual/krb5 ) -ldap? ( net-nds/openldap ) -pam? ( virtual/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= ) -uuid? ( dev-libs/ossp-uuid ) -xml? ( dev-libs/libxml2 dev-libs/libxslt ) -zlib? ( sys-libs/zlib ) -" - -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 || epatch "${FILESDIR}/${PN}-${SLOT}-no-server.patch" - - # Fix bug 486556 where the server would crash at start up because of - # an infinite loop caused by a self-referencing symlink. - epatch "${FILESDIR}/postgresql-9.2-9.4-tz-dir-overflow.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 - - epatch_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%/}" - - econf \ - --prefix="${PO}/usr/$(get_libdir)/postgresql-${SLOT}" \ - --datadir="${PO}/usr/share/postgresql-${SLOT}" \ - --docdir="${PO}/usr/share/doc/${PF}" \ - --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 kerberos krb5) \ - $(use_with ldap) \ - $(use_with pam) \ - $(use_with perl) \ - $(use_with python) \ - $(use_with readline) \ - $(use_with ssl openssl) \ - $(use_with tcl) \ - $(use_with uuid ossp-uuid) \ - $(use_with xml libxml) \ - $(use_with xml libxslt) \ - $(use_with zlib) \ - "$(use_enable nls nls "$(wanted_languages)")" -} - -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} - - insinto /etc/postgresql-${SLOT} - newins src/bin/psql/psqlrc.sample psqlrc - - dodir /etc/eselect/postgresql/slots/${SLOT} - echo "postgres_ebuilds=\"\${postgres_ebuilds} ${PF}\"" > \ - "${ED}/etc/eselect/postgresql/slots/${SLOT}/base" - - use static-libs || find "${ED}" -name '*.a' -delete - - 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" | newconfd - ${PN}-${SLOT} - - sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \ - "${FILESDIR}/${PN}.init-9.3" | newinitd - ${PN}-${SLOT} - - sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \ - "${FILESDIR}/${PN}.service" | \ - systemd_newunit - ${PN}-${SLOT}.service - - 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 0775 /run/postgresql - fi - fi -} - -pkg_postinst() { - postgresql-config update - - elog "If you need a global psqlrc-file, you can place it in:" - elog " ${EROOT%/}/etc/postgresql-${SLOT}/" - - if [[ -z ${REPLACING_VERSIONS} ]] ; then - elog - elog "It looks like this is your first time installing PostgreSQL. Run the" - elog "following command in all active shells to pick up changes to the default" - elog "environment:" - elog " source /etc/profile" - fi - - 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}" - 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 - while [ "$correct" != "true" ] ; do - einfo "Are you ready to continue? (y/n)" - read answer - if [[ $answer =~ ^[Yy]([Ee][Ss])?$ ]] ; then - correct="true" - elif [[ $answer =~ ^[Nn]([Oo])?$ ]] ; then - die "Aborting initialization." - else - echo "Answer not recognized" - fi - done - - 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 - - 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.3.21.ebuild b/dev-db/postgresql/postgresql-9.3.21.ebuild deleted file mode 100644 index 08f19cc0a961..000000000000 --- a/dev-db/postgresql/postgresql-9.3.21.ebuild +++ /dev/null @@ -1,450 +0,0 @@ -# Copyright 1999-2018 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI="6" - -PYTHON_COMPAT=( python2_7 python3_{4,5,6} ) - -inherit eutils flag-o-matic linux-info multilib pam prefix python-single-r1 \ - systemd user versionator - -KEYWORDS="alpha amd64 ~arm ~hppa ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc x86 ~amd64-fbsd ~x86-fbsd ~ppc-macos ~x86-solaris" - -SLOT="$(get_version_component_range 1-2)" - -SRC_URI="mirror://postgresql/source/v${PV}/postgresql-${PV}.tar.bz2" - -LICENSE="POSTGRESQL GPL-2" -DESCRIPTION="PostgreSQL RDBMS" -HOMEPAGE="http://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} )" - -wanted_languages() { - local linguas="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" - local enable_langs lingua - - for lingua in ${linguas} ; do - has ${lingua} ${LINGUAS-${lingua}} && enable_langs+="${lingua} " - done - - echo -n ${enable_langs} -} - -CDEPEND=" ->=app-eselect/eselect-postgresql-2.0 -sys-apps/less -virtual/libintl -kerberos? ( virtual/krb5 ) -ldap? ( net-nds/openldap ) -pam? ( virtual/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= ) -uuid? ( dev-libs/ossp-uuid ) -xml? ( dev-libs/libxml2 dev-libs/libxslt ) -zlib? ( sys-libs/zlib ) -" - -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}-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%/}" - - econf \ - --prefix="${PO}/usr/$(get_libdir)/postgresql-${SLOT}" \ - --datadir="${PO}/usr/share/postgresql-${SLOT}" \ - --docdir="${PO}/usr/share/doc/${PF}" \ - --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 kerberos krb5) \ - $(use_with ldap) \ - $(use_with pam) \ - $(use_with perl) \ - $(use_with python) \ - $(use_with readline) \ - $(use_with ssl openssl) \ - $(use_with tcl) \ - $(use_with uuid ossp-uuid) \ - $(use_with xml libxml) \ - $(use_with xml libxslt) \ - $(use_with zlib) \ - "$(use_enable nls nls "$(wanted_languages)")" -} - -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 "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}" - 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 "${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.10.ebuild b/dev-db/postgresql/postgresql-9.4.10.ebuild deleted file mode 100644 index 0c0626e267cc..000000000000 --- a/dev-db/postgresql/postgresql-9.4.10.ebuild +++ /dev/null @@ -1,427 +0,0 @@ -# Copyright 1999-2018 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI="5" - -PYTHON_COMPAT=( python{2_7,3_4} ) - -inherit eutils flag-o-matic linux-info multilib pam prefix python-single-r1 \ - systemd user versionator - -KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd ~ppc-macos ~x86-solaris" - -SLOT="$(get_version_component_range 1-2)" - -SRC_URI="mirror://postgresql/source/v${PV}/postgresql-${PV}.tar.bz2" - -LICENSE="POSTGRESQL GPL-2" -DESCRIPTION="PostgreSQL RDBMS" -HOMEPAGE="http://www.postgresql.org/" - -IUSE="doc kerberos kernel_linux ldap libressl nls pam perl -pg_legacytimestamp python - +readline selinux +server ssl static-libs tcl threads uuid xml zlib" -REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" - -wanted_languages() { - local linguas="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" - local enable_langs lingua - - for lingua in ${linguas} ; do - has ${lingua} ${LINGUAS-${lingua}} && enable_langs+="${lingua} " - done - - echo -n ${enable_langs} -} - -CDEPEND=" ->=app-eselect/eselect-postgresql-1.2.0 -sys-apps/less -virtual/libintl -kerberos? ( virtual/krb5 ) -ldap? ( net-nds/openldap ) -pam? ( virtual/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 || epatch "${FILESDIR}/${PN}-9.4.10-no-server.patch" - - # Fix bug 486556 where the server would crash at start up because of - # an infinite loop caused by a self-referencing symlink. - epatch "${FILESDIR}/postgresql-9.2-9.4-tz-dir-overflow.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 - - epatch_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}" \ - --docdir="${PO}/usr/share/doc/${PF}" \ - --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 "$(wanted_languages)")" -} - -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} - - insinto /etc/postgresql-${SLOT} - newins src/bin/psql/psqlrc.sample psqlrc - - dodir /etc/eselect/postgresql/slots/${SLOT} - echo "postgres_ebuilds=\"\${postgres_ebuilds} ${PF}\"" > \ - "${ED}/etc/eselect/postgresql/slots/${SLOT}/base" - - use static-libs || find "${ED}" -name '*.a' -delete - - 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" | newconfd - ${PN}-${SLOT} - - sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \ - "${FILESDIR}/${PN}.init-9.3" | newinitd - ${PN}-${SLOT} - - sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \ - "${FILESDIR}/${PN}.service" | \ - systemd_newunit - ${PN}-${SLOT}.service - - 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 0775 /run/postgresql - fi - fi -} - -pkg_postinst() { - postgresql-config update - - elog "If you need a global psqlrc-file, you can place it in:" - elog " ${EROOT%/}/etc/postgresql-${SLOT}/" - - if [[ -z ${REPLACING_VERSIONS} ]] ; then - elog - elog "It looks like this is your first time installing PostgreSQL. Run the" - elog "following command in all active shells to pick up changes to the default" - elog "environment:" - elog " source /etc/profile" - fi - - 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}" - 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 - while [ "$correct" != "true" ] ; do - einfo "Are you ready to continue? (y/n)" - read answer - if [[ $answer =~ ^[Yy]([Ee][Ss])?$ ]] ; then - correct="true" - elif [[ $answer =~ ^[Nn]([Oo])?$ ]] ; then - die "Aborting initialization." - else - echo "Answer not recognized" - fi - done - - 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 - - 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.16.ebuild b/dev-db/postgresql/postgresql-9.4.16.ebuild deleted file mode 100644 index a1248b747bfe..000000000000 --- a/dev-db/postgresql/postgresql-9.4.16.ebuild +++ /dev/null @@ -1,482 +0,0 @@ -# Copyright 1999-2018 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI="6" - -PYTHON_COMPAT=( python2_7 python3_{4,5,6} ) - -inherit eutils flag-o-matic linux-info multilib pam prefix python-single-r1 \ - systemd user versionator - -KEYWORDS="alpha amd64 ~arm ~hppa ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc x86 ~amd64-fbsd ~x86-fbsd ~ppc-macos ~x86-solaris" - -SLOT="$(get_version_component_range 1-2)" - -SRC_URI="mirror://postgresql/source/v${PV}/postgresql-${PV}.tar.bz2" - -LICENSE="POSTGRESQL GPL-2" -DESCRIPTION="PostgreSQL RDBMS" -HOMEPAGE="http://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} )" - -wanted_languages() { - local linguas="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" - local enable_langs lingua - - for lingua in ${linguas} ; do - has ${lingua} ${LINGUAS-${lingua}} && enable_langs+="${lingua} " - done - - echo -n ${enable_langs} -} - -CDEPEND=" ->=app-eselect/eselect-postgresql-2.0 -sys-apps/less -virtual/libintl -kerberos? ( virtual/krb5 ) -ldap? ( net-nds/openldap ) -pam? ( virtual/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}" \ - --docdir="${PO}/usr/share/doc/${PF}" \ - --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 "$(wanted_languages)")" -} - -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 "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}" - 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 "${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.11.ebuild b/dev-db/postgresql/postgresql-9.5.11.ebuild deleted file mode 100644 index b00eaaaff86f..000000000000 --- a/dev-db/postgresql/postgresql-9.5.11.ebuild +++ /dev/null @@ -1,488 +0,0 @@ -# Copyright 1999-2018 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI="6" - -PYTHON_COMPAT=( python2_7 python3_{4,5,6} ) - -inherit eutils flag-o-matic linux-info multilib pam prefix python-single-r1 \ - systemd user versionator - -KEYWORDS="alpha amd64 ~arm ~arm64 ~hppa ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc x86 ~amd64-fbsd ~x86-fbsd ~ppc-macos ~x86-solaris" - -SLOT="$(get_version_component_range 1-2)" - -SRC_URI="mirror://postgresql/source/v${PV}/postgresql-${PV}.tar.bz2" - -LICENSE="POSTGRESQL GPL-2" -DESCRIPTION="PostgreSQL RDBMS" -HOMEPAGE="http://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} )" - -wanted_languages() { - local linguas="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" - local enable_langs lingua - - for lingua in ${linguas} ; do - has ${lingua} ${LINGUAS-${lingua}} && enable_langs+="${lingua} " - done - - echo -n ${enable_langs} -} - -CDEPEND=" ->=app-eselect/eselect-postgresql-2.0 -sys-apps/less -virtual/libintl -kerberos? ( virtual/krb5 ) -ldap? ( net-nds/openldap ) -pam? ( virtual/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}" \ - --docdir="${PO}/usr/share/doc/${PF}" \ - --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 "$(wanted_languages)")" -} - -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 "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}" - 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 "${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.5.ebuild b/dev-db/postgresql/postgresql-9.5.5.ebuild deleted file mode 100644 index 18ae5023750e..000000000000 --- a/dev-db/postgresql/postgresql-9.5.5.ebuild +++ /dev/null @@ -1,438 +0,0 @@ -# Copyright 1999-2018 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI="5" - -PYTHON_COMPAT=( python2_7 python3_{4,5,6} ) - -inherit eutils flag-o-matic linux-info multilib pam prefix python-single-r1 \ - systemd user versionator - -KEYWORDS="~alpha amd64 arm ~arm64 hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd ~ppc-macos ~x86-solaris" - -SLOT="$(get_version_component_range 1-2)" - -SRC_URI="mirror://postgresql/source/v${PV}/postgresql-${PV}.tar.bz2" - -LICENSE="POSTGRESQL GPL-2" -DESCRIPTION="PostgreSQL RDBMS" -HOMEPAGE="http://www.postgresql.org/" - -IUSE="doc kerberos kernel_linux ldap libressl nls pam perl -pg_legacytimestamp python - +readline selinux +server ssl static-libs tcl threads uuid xml zlib" -REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" - -wanted_languages() { - local linguas="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" - local enable_langs lingua - - for lingua in ${linguas} ; do - has ${lingua} ${LINGUAS-${lingua}} && enable_langs+="${lingua} " - done - - echo -n ${enable_langs} -} - -CDEPEND=" ->=app-eselect/eselect-postgresql-1.2.0 -sys-apps/less -virtual/libintl -kerberos? ( virtual/krb5 ) -ldap? ( net-nds/openldap ) -pam? ( virtual/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 || epatch "${FILESDIR}/${PN}-9.5.5-no-server.patch" - - # Fix bug 486556 where the server would crash at start up because of - # an infinite loop caused by a self-referencing symlink. - epatch "${FILESDIR}/postgresql-9.2-9.4-tz-dir-overflow.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 - - epatch_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}" \ - --docdir="${PO}/usr/share/doc/${PF}" \ - --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 "$(wanted_languages)")" -} - -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} - - insinto /etc/postgresql-${SLOT} - newins src/bin/psql/psqlrc.sample psqlrc - - dodir /etc/eselect/postgresql/slots/${SLOT} - echo "postgres_ebuilds=\"\${postgres_ebuilds} ${PF}\"" > \ - "${ED}/etc/eselect/postgresql/slots/${SLOT}/base" - - use static-libs || find "${ED}" -name '*.a' -delete - - 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" | newconfd - ${PN}-${SLOT} - - sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \ - "${FILESDIR}/${PN}.init-9.3" | newinitd - ${PN}-${SLOT} - - sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \ - "${FILESDIR}/${PN}.service" | \ - systemd_newunit - ${PN}-${SLOT}.service - - 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 0775 /run/postgresql - fi - fi -} - -pkg_postinst() { - 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 [[ -z ${REPLACING_VERSIONS} ]] ; then - elog - elog "It looks like this is your first time installing PostgreSQL. Run the" - elog "following command in all active shells to pick up changes to the default" - elog "environment:" - elog " source /etc/profile" - fi - - 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}" - 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 - - if [ -z "$PG_AUTOCONFIG" ] ; then - while [ "$correct" != "true" ] ; do - einfo "Are you ready to continue? (y/n)" - read answer - if [[ $answer =~ ^[Yy]([Ee][Ss])?$ ]] ; then - correct="true" - elif [[ $answer =~ ^[Nn]([Oo])?$ ]] ; then - die "Aborting initialization." - else - echo "Answer not recognized" - fi - done - else - einfo "PG_AUTOCONFIG set, not prompting" - fi - - 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 - - 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.6.8.ebuild b/dev-db/postgresql/postgresql-9.6.8.ebuild index fce21d7b454f..8527319e7d6e 100644 --- a/dev-db/postgresql/postgresql-9.6.8.ebuild +++ b/dev-db/postgresql/postgresql-9.6.8.ebuild @@ -8,7 +8,7 @@ PYTHON_COMPAT=( python2_7 python3_{4,5,6} ) inherit eutils flag-o-matic linux-info multilib pam prefix python-single-r1 \ systemd user versionator -KEYWORDS="~alpha amd64 arm ~arm64 ~hppa ia64 ~mips ppc ppc64 ~s390 ~sh ~sparc x86 ~amd64-fbsd ~x86-fbsd ~ppc-macos ~x86-solaris" +KEYWORDS="alpha amd64 arm ~arm64 ~hppa ia64 ~mips ppc ppc64 ~s390 ~sh ~sparc x86 ~amd64-fbsd ~x86-fbsd ~ppc-macos ~x86-solaris" SLOT="$(get_version_component_range 1-2)" |