diff options
author | Aaron Swenson <titanofold@gentoo.org> | 2012-09-25 16:05:39 +0000 |
---|---|---|
committer | Aaron Swenson <titanofold@gentoo.org> | 2012-09-25 16:05:39 +0000 |
commit | e0dba6184f4e4f5964b9e79e77e097cccbb1aff9 (patch) | |
tree | 2e74a7be9cbe2a060e2296dc5e77fe17fd78e593 /dev-db | |
parent | Fix hang in test suite when an incompatible screenrc is found. (diff) | |
download | historical-e0dba6184f4e4f5964b9e79e77e097cccbb1aff9.tar.gz historical-e0dba6184f4e4f5964b9e79e77e097cccbb1aff9.tar.bz2 historical-e0dba6184f4e4f5964b9e79e77e097cccbb1aff9.zip |
Cleaning out insecure versions.
Package-Manager: portage-2.1.11.9/cvs/Linux x86_64
Diffstat (limited to 'dev-db')
15 files changed, 21 insertions, 4513 deletions
diff --git a/dev-db/postgresql-server/ChangeLog b/dev-db/postgresql-server/ChangeLog index 7f20c7742acb..bfd996476f95 100644 --- a/dev-db/postgresql-server/ChangeLog +++ b/dev-db/postgresql-server/ChangeLog @@ -1,6 +1,15 @@ # ChangeLog for dev-db/postgresql-server # Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-db/postgresql-server/ChangeLog,v 1.214 2012/09/24 17:37:46 patrick Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-db/postgresql-server/ChangeLog,v 1.215 2012/09/25 16:05:39 titanofold Exp $ + + 25 Sep 2012; <titan@gentoo.org> -postgresql-server-8.3.18.ebuild, + -postgresql-server-8.3.19.ebuild, -postgresql-server-8.3.19-r1.ebuild, + -postgresql-server-8.4.11.ebuild, -postgresql-server-8.4.12.ebuild, + -postgresql-server-8.4.12-r1.ebuild, -postgresql-server-9.0.7.ebuild, + -postgresql-server-9.0.8.ebuild, -postgresql-server-9.0.8-r1.ebuild, + -postgresql-server-9.1.3.ebuild, -postgresql-server-9.1.4.ebuild, + -postgresql-server-9.1.4-r1.ebuild, -postgresql-server-9.2.0.ebuild: + Cleaning out insecure versions. *postgresql-server-8.4.14 (24 Sep 2012) *postgresql-server-8.3.21 (24 Sep 2012) diff --git a/dev-db/postgresql-server/Manifest b/dev-db/postgresql-server/Manifest index 96d352941b21..fc735ef8426d 100644 --- a/dev-db/postgresql-server/Manifest +++ b/dev-db/postgresql-server/Manifest @@ -1,23 +1,16 @@ -DIST postgresql-8.3.18.tar.bz2 14563583 SHA256 5db4904a8959f09274e1e0ee7f21c354128d5dbb4e946b78391f6bc4723c3746 SHA512 ac371d0ca7ec69782393345b5b3b9e3edf0fd6c3d3b8fbed86db6661dc11b54b6de991597a517181bba685d9cda5203b1c7dab586ef85df415b6f9cf49e290fd WHIRLPOOL d6ed681aecaf9261507f243e568ca8c38f35260b871ff9d5d9cb7d8b80251a5d08fe76233a7318f66d96a0c6447d354d0fceeae3aae2396cbc1790ed8c1a215d -DIST postgresql-8.3.19.tar.bz2 14570746 SHA256 986f0d4b7edc633be1d210f27dfd1e47d416b642659e568895218466e50b58d5 SHA512 ffa07dd68c9de9a6c1fd9547181dbc252a300407e850e163e4d234aeab1e794f2c721ad4f676712e02ac5733ee566efe4b0fd4652b39b8ae885a3e478a66ef24 WHIRLPOOL 16ea02fa6ef4fb2088f5a677a5f4cb3f44049ef2f4564af3340b1a967cced561adc476ed09dd516bd8cb6b9bf9b3ed9fbc85b0346e835b5bd474052da35a9ae6 +-----BEGIN PGP SIGNED MESSAGE----- +Hash: SHA256 + DIST postgresql-8.3.20.tar.bz2 14624435 SHA256 922b6165dc21739356e22ba4d53e08f3b26cd38d8fb9569d5f8fa6d239611163 SHA512 e709632db165f543e510334adfa191ecff6fbe5ae6726578cbb5e4858de62fda53e67b19171c302492361c580bf6894af84dc97ee81e1146a04aec2984d4f91f WHIRLPOOL beee4643d4c2212d9d49390bf1f3ff279f54f2d3c90743610ee59d7e8b93a1e61136654a1f5abe5d49a7826afdea8166ae047f7f2eb2f461c543bf3111f294d5 DIST postgresql-8.3.21.tar.bz2 14626010 SHA256 a64b6de9f8067b803f2ed46a025bfd2a16a5ae270db60e440a698f2c07e234f8 SHA512 6da6fab655412fb2cc59ba6228596d6d3caff1a0c6bbd574b61c807bc18941b8d3db6824ffb7da1ad78d89c61d4407402bdb0904bf7b60c49959f40cb2bf3191 WHIRLPOOL 1bb3afefa2610537a35d148ccf2b65d6fe2915774aa61e92afeaadb3c6e923bf1771be7a5828c8ac67d2a0dac94f8bad3330cb38fa2f3b6993ebe493998f11a0 -DIST postgresql-8.4.11.tar.bz2 14502434 SHA256 5bbc9ff1d16282b592600d7c6b9cb1a93049d4aa9a961e3c2c8d5fb13b189c8f SHA512 3f2c6015781a7bc218a5b0fa9135163d5adf21ff41ab952d0f0ad0586762f0f95bf0d7c6738d122cdc1d8506924814d8b4c6659ff9c79daa926f4ee9a95e7a41 WHIRLPOOL 712e600fe175972cd8b1ad4ce0124de7e2e108e8952b3c5d003cf3044be6a732fb02186d689d618452df68e0bfdf38aff76c266d9f85c7f3a45de995e4658da6 -DIST postgresql-8.4.12.tar.bz2 14509007 SHA256 99b7b330ec183828988c7e8ec1b675393f24b10017a2e1d03b8ff48c4dfc0f77 SHA512 5e21ff30208296fc98033d6d4c0bb9491bed000bd8a00853c36be74feaf1ed7698561dccbf98596a920edf1f77801e8c15e79dbaec1d882c289c70905399c23e WHIRLPOOL c0f86598396f9d439d4e1d63790af2a92ffb3afa259f6e3369f5a92d8a93d42e50ca70713c467da6c7fde78a01041aaf24b5fd0a441060a06800a87c9a85694b DIST postgresql-8.4.13.tar.bz2 14666613 SHA256 20dd3442a3fa3a4fb1813b58f969ce4bbc54d73194fd4fe20d6f1313edc48cb9 SHA512 c6294846bf9adf39d5d57d2df26023ed4aa83464a773789eaaf5823a6dd6005eeb756f3835caaffde72729edd5b1f0ab300309417a4f9b570d6110b62096f1e4 WHIRLPOOL 1a9cbbdf1d651e49d85b7edee5da70fcadcef20a10fbc4340bd43679144662c68bede5c68b38933aaed8cc1a9a4db8c0b48e2a183140f901e07f09055e958e96 DIST postgresql-8.4.14.tar.bz2 14679559 SHA256 1172e7735beea8a933eab0a4c01f9ad49fe872d8786af12a7fe596346b1d133a SHA512 bf9ddb393de08bbff92708b83697b907fbf34229a2ce66e1bf97c1deb9630c37c9a363f9305889e1f6ce4671d116a2c267302b7681281bb0482575ac81d6f28e WHIRLPOOL 8fe681ce8d263116fb2d3554adb2f45c1b21f7d6b840396fee532f7f200809dacc5127df7102b97be88193cd39148b40c81d781ec73ffc508e4908b0af2426bf DIST postgresql-9.0.10.tar.bz2 15015826 SHA256 4394184b0099e8c86a482f7d62930aa31b50fb23e7dfb8fe9e1d93eb828dc729 SHA512 93a6d63d89800f9fc2eeef694c55afcdb8b8a255a2952a69b1816a31b831d0f86ed8b8fc88ad68cbc27f322eb1aba24e2cc9d891a5487217753b3f196fa5b754 WHIRLPOOL e5161e09c636f6a48d72de4befb967575a94b429129e72e4eb6013dc074bfe4f8ad43e4a15c40ec7e00b64d790cdd8da0eeb8a0555db44ce59fb336b0153799e -DIST postgresql-9.0.7.tar.bz2 14977437 SHA256 dabe26d71d8b595f9514da1363dc20c3f4b90b6908026dd06984cac448a6d833 SHA512 25fe1b20c0f172e3d2ff4dcbbbcd5a49be5a25e15ae74324cf9c0a3e6be0e760a81e65fbf9cae39aa2588794fb55953c59c750182a151473e959a375aba75322 WHIRLPOOL ff506c7495aba5087b6df867d3e25a1c0c58908845a59e0ae4ab1ebba5dee26d1c977fd0cfd530c8ffe6b3a3b27aba807329b77329904f4d2da5777d906753bc -DIST postgresql-9.0.8.tar.bz2 14998065 SHA256 a2981ba8a64b396e2111fee5a9216275e49a2e79e839152a5e4367afd44c0bc2 SHA512 49a4bfb7a197b2a58da717b4edd7900c6ee8bbeeed42549fe155b89a44c500c3aa1a9b90986234ae797058a378bfafafc5600cc679767e17897d001189dcdad5 WHIRLPOOL 22ea138bb2ee846a5ce4951c6f1fe1890ed3759302485c79fb60f19222ee4a7cd535f47edf86d93a29dc093990e3f335c3d1e8d75b7ef51ce4c1e3cddd144a7e DIST postgresql-9.0.9.tar.bz2 15008401 SHA256 87417d181a0f534fa96ba1d315a62b721f5bc22b7bb70af3f674bc1a68a5da8a SHA512 1d0c1f38f7872402b3011a624c7fb11cae79d165432c2134e37d078bfcbf836e5d55f2e9c92770d0a4c7db1680b2287ca55d981b8cffc0dc8b1a291c4ec4877b WHIRLPOOL 4d8c3e987ea1c07e4550d8b79eaee8cce2fec4cf39aab70bb69f364796c3ff472f5e0e953bddf3f1dc3878b4db458c2ca14073df8925e57b614974496476c921 -DIST postgresql-9.1.3.tar.bz2 15582454 SHA256 7a79800a624031c1d9bc9cdce73cb40050100ac50a82050cbf7bbbd16ac4d5d5 SHA512 411b9ed2d5cb4c38388710bc6186c8ccc3bddb9a607a933539bfc8b77df81d45c6f0b8ad9117960b0c5756bab51958f47c1e95943a488713841bd400da27a2e9 WHIRLPOOL b4d13c687cfd45cc8f3d575d46154e75d5a8a86c3c2d5d634fb0d6077724d2f73069a651bc7633c0cb5c100be8076647800757097d727938807d170668c5f7c3 -DIST postgresql-9.1.4.tar.bz2 15631894 SHA256 a0795a8eb3ae2d1a2914b63bf143d20182835d90699915ff43567c041d3c9712 SHA512 c49937ada0b011d08b8cfd9b7ac5d593dc5c3e36e97c19b2c6e08bb4f14332854b2c64eb1b77a78d6da9612f3cee2a857644b7bd6aedb7a4cd507c5bc64c4a62 WHIRLPOOL 4f03364a260f3ae27d763b3eca4326663d59fa2a09f238210d15de848869cf3599c1dbea6b031b82a64d912c162a1842173c0d5779eab78cbef288f58d7b2aa8 DIST postgresql-9.1.5.tar.bz2 15602594 SHA256 0b889c132426fc68d8c2eb1bf112bf99cc653e9c95b5f4bbebc55cd9a8d6ce44 SHA512 63998808c8a5ad7a4712d6639a7d77d01bfdfee1ea41a40e7db1c4c469e3ecdf3af78a0451907aaf856f2e76e5166de15fb9009143fca8b4d36c964291402930 WHIRLPOOL 1d89227d7801e7d45465130e90c6f1ede8cca459e3879a9f641c5d90a6ffbd8a77cd6f8b489d7a8273246ef9d51c7c5218f611b9816351a7f4562bf7ac0112d2 DIST postgresql-9.1.6.tar.bz2 15621370 SHA256 6e396aca621a95b9f5f7292a79ebe6ce892e36c7f7021814e1bd94bcfc6c31e7 SHA512 80fbb62734ac20a500ef9f0a307543011a376c3162304cd8996cba3ea4aba32681dfa556ba06450bdc400971efb65cc9ce2635844950e4f6f31badaa93fe25a4 WHIRLPOOL 1cc8953beb9cc0cf8461147a7c4fa1b5312293625375568240e25ebcefe95334c1e4192df412a7ae8f5d018ded57478763b0921e62602c17c7b3ef81db688e65 -DIST postgresql-9.2.0.tar.bz2 16106558 SHA256 3731c607df492bbb57f37917b49f57719c0d6f823720426431fff10d82b1fe33 SHA512 40e0538dca5bb795a8e5c8efd28c57e7db80ee1724ccdb3bc190e0f179b1c09e2363204303c443768b213c1d8e7cccab0d59e5d94038e63d8014cfe1a8940e1d WHIRLPOOL b4eb1f18deb35282ec2bd1768b401037a9da40139050d314aebecf7e8968b3011cd32c979385ae24d6cdc99208dc2238329ca21c784739767289db3f973b93c2 DIST postgresql-9.2.1.tar.bz2 16113737 SHA256 db61d498105a7d5fe46185e67ac830c878cdd7dc1f82a87f06b842217924c461 SHA512 37e5c193006c548d0b1e200e9dca18ca918a0fe7d5dcea1615ce6240b7f13d9ea30913ef3b309abac3a4c15f65202aa1e72b1a3cc0b22321854fd6187dbac8d0 WHIRLPOOL 97872b8354ed0efd0aa7bd2afa5c127e9aecfce5d44d8a10e02d62050321bf4a948e7d3a4ab7f830afa4f8c2257adc96408c09bd09c8dade8d9c32ea5181f8c1 DIST postgresql-initscript-2.1.1.tbz2 2604 SHA256 e7e9f18a48272a6210ef3b433bb910e3ffeffe92f798aaf1ea503ce1fc1f5dfb SHA512 002d2121ffd15a327e573a53d2abd460321718dcca1e58bfce87100ee44bd19ed376b84b14f93696ac7998ee7699e04a4797a6a4db0520ee6bfa9ff53ab41975 WHIRLPOOL 891bd0602cf1470179a5683e4a3fea657dec7e924c7919f8f1964b395b0b08cf13d4462e37dcce05ad5f547d3ec18ff83e50f9f29ca87ca7fb8eaca65e5ddf9f -DIST postgresql-initscript-2.1.tbz2 2603 SHA256 42ee83d0bfd1e1733bbc191b065bc70b2b5966f743f692e5133f6c676c8b1c24 SHA512 4ec220f414c73c5d8a65ef95df7111a9703f1f82abbc0a3b6f70938440cf72069e3497fc7e8606502329aea8737bb60aa15d578d47cda68669289acbc7b3e7a9 WHIRLPOOL a5f27742da7bc7404dd4f1a8936b0a9291c199412c0c1048d5f217a41b12b247057a99f41bfd1b3041821be2d159d6976eaa01148860664cfaf722903c9f4d2f DIST postgresql-initscript-2.3.tbz2 2611 SHA256 72a2805048c3027996c41b9d3342ccf56406393bab7086af745d87b5b5edd4a7 SHA512 0803a833507c91e5c76a5804a787c159b3a00f7f9761a9e5c3bc7c721b14f5c6e9587027c102c430feb6e72a0bb011a0bf4903a136b7e648488a45adf2a99275 WHIRLPOOL e56b1e6e2f4cc27641411f26896508df6566f19f197f811f426995d86ae6ac97737b4f60cf5d6f763c8306a3043d31c59d3da89291fdbf837a4c9bf38b4ba5d2 DIST postgresql-patches-8.3-r2.tbz2 5501 SHA256 adae4c048745de04fd44f0408e8ab85aa5cae283cb3ddc2962e0379905cca73f SHA512 6f7f3f3e7bb22da3fad237b2f14e2723004b818d6555031054dc3d03fb51d922eefdee90d053673a8e0ceefe06868d9a6427046a4da80d44a439aa3114c54819 WHIRLPOOL dd25124acfbcc717f0e908787c690f35f905adc4fdee5349d09924371f66bad281a89be60d90be98a2824608c105c7767e5f2b75d95587bd346cc2869366e140 DIST postgresql-patches-8.4-r2.tbz2 4822 SHA256 9920097ff5243df28788a6f3bdf6cdad38e6c42885f38da84b0f2c8c242954d7 SHA512 e074509ea8246ac74deae98507d29c30e0def6b88cb0c578294ef58f165681f4c2927d8e6392e34f57751ddb21e3c50852da3d3f5ca40f95a8ce89d65412e1f9 WHIRLPOOL 225336ce3e4323e9a9c16892def1065556d4c324e14a48553e3bb9a4ad6048d16731088adf4bc4b29ce3d692bd0e900afa1440ab2ae0a2710034422941a9e14b @@ -25,28 +18,22 @@ DIST postgresql-patches-9.0-r3.tbz2 4503 SHA256 2d454575423f0e56f23d540fbc865309 DIST postgresql-patches-9.1-r1.tbz2 4547 SHA256 50cefff4a6f6e1fd38b99dde4793dc5f153b9691ff5c59fbb2b97864f1f7d727 SHA512 d6baafb0b6980b860157cd8b557a2d1f696e0a4b1f34ad46185fd0204df1fc66972398f9f8f47a49b6623cec2f790d98adcd45bf59329d126c45f07ee15b3542 WHIRLPOOL 12cb3a028e204c6da3e44e9c9c6388d5650a42fc35c9d25cf18f928bbc896d854ddabd9012b76c84fe74d3f6ccbd94742a3dc53e5a1101f536a5c9a31ec04a35 DIST postgresql-patches-9.2beta2.tbz2 4466 SHA256 7033657bf66255fda3881ee6797ad0aa920e1910619228206b174065e5e348d2 SHA512 64150e055aabe04e1a298170a992c607313299d3990c05ac4146c05e6bb2a55e29999d45cf29d7111df5fda0f135980665c4c6c6c83d3f1df26c27334daf17bb WHIRLPOOL f67a99b39e99ab26e8d1125886493b53a3589908433618e7601281735dee4d2e54fdaed84e4608961264723cf27284e9ead798087f9b896a5ada8bdc70c51f9d DIST postgresql-patches-9.2beta3.tbz2 4466 SHA256 7033657bf66255fda3881ee6797ad0aa920e1910619228206b174065e5e348d2 SHA512 64150e055aabe04e1a298170a992c607313299d3990c05ac4146c05e6bb2a55e29999d45cf29d7111df5fda0f135980665c4c6c6c83d3f1df26c27334daf17bb WHIRLPOOL f67a99b39e99ab26e8d1125886493b53a3589908433618e7601281735dee4d2e54fdaed84e4608961264723cf27284e9ead798087f9b896a5ada8bdc70c51f9d -EBUILD postgresql-server-8.3.18.ebuild 11533 SHA256 c4316f8978325b8883b4ecdb03cb1d81d261b7a664e7c25691f392ff821f05d6 SHA512 5fc93df7c799a69a3eba327a6f3cba310f07c197c71b5f844ddfbae8e63000ef6824ef1bedfac761be89d9afe51724c0a82808b5c3f4ef93936b06c6d0f866fe WHIRLPOOL 89e7273eb77c34d4472aad5903dbb34caaa10c7d9bf47c31f0e9fb16294ce9b2ecc659299100d1dee1b2e151f999baa9e8de8554aa1458dbdcf5a90717838b22 -EBUILD postgresql-server-8.3.19-r1.ebuild 11548 SHA256 766ee7eb9621e46025f1fcbb07a05312ea9b4fe3a439091821dc3a0654580768 SHA512 179a9a65118f7c42e9b6cef7503cbb9965ac939014352f1281c7eba5f9f39517a342ad488ce607deab06ba7c0717b25200f69612df44164a0bc4f960a991de4e WHIRLPOOL d97191a051cf5c20089294d9a263b5b4f67685e6d1d9a8af74439d70aa881adf72cefbad526880b252ebb8184824d81ee2cbd5b743c1a784e1dc582e42100a45 -EBUILD postgresql-server-8.3.19.ebuild 11533 SHA256 09d46b0801fd89febaea8fe3cfbe5ac6d3c4b917a7fc115e7c0dff461903389d SHA512 fb2436579c7c6f1732e61773f5935fb4b2afc6b28ff650d6f933c261dcb75f3264fbc30060ef402d04a365d15496fe070ddf30d71886d984ec83c5cb86f74866 WHIRLPOOL ddf10a7731b7f99c6eb0773b3442e4526fd300c5fe0943e77e18a5af7dc4bc84f0e15172878c871b4a88b713ad73f8c5879bc9458d7678604ff56cf66a497ba4 EBUILD postgresql-server-8.3.20.ebuild 11532 SHA256 474276253d356cecbc7ec413270180665755a905e8308bd84498ee77c7dd88f9 SHA512 779effa4e9451dc79aa108bca2922472452f98a3219107c5d1f8fc9b4a43cdbc3317d223bbb0a599f409993d5675d0e2090d0c3b7e07cca01e63cd435f528ca1 WHIRLPOOL 40f32112022f9ac4529ffdf770c540e0c746cd1b948ab4fc773f2f6606836fed9c97e3d4901f876c49020a7cde7c6574e20badde82434ddb6234b8b9ca74a99b EBUILD postgresql-server-8.3.21.ebuild 11542 SHA256 5b58238b8b814d1064e35e4931f79ed4b6c26e7dbbe21b639589309d0d8a69ea SHA512 5b03d136099545fd8a98c68474bac3f72c358a705ea6836eb5da5948c8c30f76b7f2937de3227776ec352228e00b8d979dc5746e968fb66717aade5ab354a4c5 WHIRLPOOL 7089ad3c88f8cf0b46440a0a5ab1c38f33359f619bae7015570ba77811a5f06d967c2640443818bb5d44f53b37991bef9ee891128521bc2c128e87f0c9f8e489 -EBUILD postgresql-server-8.4.11.ebuild 11828 SHA256 a4db5db3fcbf172cef0b66adb4229b77d641a15d5677451e90eadacf9421b0c6 SHA512 8f0be72017bf8ceff11064c69ab0e2d8dce0075665ce1ef596ec311303cc682a8e9584b82fed11bdd02f7e5d40d78a07e26fc8402bb2e606ddb58a5ee7c62508 WHIRLPOOL d7c9fcf72ce3e2373a89ab0751ec74669cbd61b562e899f09baac35652727d1a71699a308dbc6f9fcea8abe385bfbd6c6e092b4aa897d69a99d04cc01268f91d -EBUILD postgresql-server-8.4.12-r1.ebuild 11843 SHA256 81d335a4141b8ca843e0d7c14b2db6e06e75c7b8f55e3c9cdde4d290d7c12841 SHA512 6c9e21f05fd97d32a073315ba49ad4cbc2526b8f337d0c513c8fc712f1947d9a44bf8ccbf463ad4a6a9ba4d84243451206bd5129cfa78b89955be812f0bcc375 WHIRLPOOL 1e5804f9d787b430d8be9ac99906f91e5ba063917f5f310cbd8b6235df7c2b8bfff0ff1b29a06cdcdea1f1d44ece0594394216cd866a00523c0dd12265c3c2c0 -EBUILD postgresql-server-8.4.12.ebuild 11828 SHA256 c1d127cd5f66238119342dc6ff211caaf3c4e3d62f426696acd402e43677099a SHA512 8504d3aa7ddcbc04dc3e9a31d0ec188f45ef9953d41c566c0ad06bf61c39e6c583534de6870a9c42b54755e55fd0ddd10cd4dc5b196facc70c14cddebe18fc42 WHIRLPOOL 633407c9aa66af17df036bd0a5fef809aa4ac0aaba8bbb8620fc67f27b1072008f9cef0b92282bc287027dc59246fc075684b1071d8f6ad0d62eb3a93dfedd36 EBUILD postgresql-server-8.4.13.ebuild 11827 SHA256 258a524a034f10b1eefa7261652a89eecab08a500ff3cca2de0479ba2c1c8de7 SHA512 41e45ed282c52927188a437d5ea043d9a3a14af60f836a2d66d6d0eb7e96c6068dfe26329466f420e863b84c8b30de18ae46966a70b6cecda076105a67cb0f02 WHIRLPOOL 889c43408e8dd5d3897a25dca67db9950652a9a04d84760a819d21fb3c3d36d25401935309358aa2141d3e6c2079f7773a5ab159b41e84045d351737aff1df8b EBUILD postgresql-server-8.4.14.ebuild 11837 SHA256 2fae1a7c635800d1b52e13738ca9d167dc8165f28ad09d0dda16cd4a62b0d779 SHA512 e04b545c965901e75dd6010a177c20e839e7ccacb08a72b50eae0beecad76e8a9e9a8a1bf2cd736c2865b79313319514f4990b765fc12976ed5957c5b1580230 WHIRLPOOL 24103a17ea243a88372b895260944b09e24a1cad4bdb808c76a56246252b5f876bb87a632025fc2c75575dd5cbb8d4955e3519b74b5e151d11fd6bb9e85e3150 EBUILD postgresql-server-9.0.10.ebuild 11438 SHA256 cb3ecef1ffa2213e1f6be28ff29e8ed81edbab1db3391e23e2e0b9e5e9f99f10 SHA512 9907621808722b737823dc14b535c7ec300ff2fda94a1479a798e2765b3d7ae4239c986e794cfb4dd13d5ad753a04f7c691420432dfff917473236f653b3fb5e WHIRLPOOL 3c6be7d4e06b815ac07abcd415e6d62d90adbad9efa648966af9eab9517f8e0dd8c99cafd3f49f2c2bf0e9125379ab2364e52e71683877cfe9653bdaff2b8627 -EBUILD postgresql-server-9.0.7.ebuild 11428 SHA256 56e439bfd3f68ad3f6123513f6aa3e23f1d85d788cbd98aa5b59c6c31fd061f8 SHA512 479836385e93b2f83fc6e18dc32eb1bae9e8094d331ae28fb92af7903f68ecdc3c6454fb35d11781c5de63bf5e093560956963de316e376c3f99c6ac1ece4b82 WHIRLPOOL d7dfeeda085639beb811383fc6b25abd43d76d8e8a85aa8cda6ceee8782f1d1f4ead0a68111954460dfe1588b97c8506b1b2b5533ffb11694de5fee7c259caf1 -EBUILD postgresql-server-9.0.8-r1.ebuild 11443 SHA256 61a1905b8ede1e41d4eacf6c6bd6fda0542f7064c7e56b7a89770a003070638e SHA512 e09c3b47dcfdeaab450a5251d5dadca24c3fff4c8980cb8f66d0a9703b216e0dc2b366fb50ea6334d644b3ce3f2d29849349462553f1ffe5bb1ecbe7f5e55c98 WHIRLPOOL c1fb445f98462c53648f68acccd5e7b83dd9fc81a7ee1bc80d33bd7ef5fb78859c53ed7d2abfb13524b9f5ca54802a21e8bd7f97d11a87b9dfccd8956e6f4269 -EBUILD postgresql-server-9.0.8.ebuild 11428 SHA256 2a7e8b3501e2b47178077a810d918b74790d347e41f4e63ddbaf6653064b74d2 SHA512 9bcd6d7f108f9523795ef98ec35c1f4392662dcafa41c33d7ec4909939cb76ed882e92ce6e22ee9ae10b8b268ac78a336c0ea6780a9571c86dd506c4b54ffd9e WHIRLPOOL ec75f0617e6b782c15eccc8297c05ea4890b3f4dbaff099cee5120b50f3a46406be8b2447ce21674ef9da9d165d45eddc38fb82198f5f42be607ca57ac504f86 EBUILD postgresql-server-9.0.9.ebuild 11427 SHA256 13713210db51f05bb9bcbe6cbfee9b6bb45e23664106273ea9c28b029237b071 SHA512 6260aee417ec01c40de85316e28b472d31c9a3fd7e344eef0ce0a45b7b0be35882cfd7a8660db49444439d758900c69dadd2d4545cdc00d43fdadc405514bd83 WHIRLPOOL d6d67db479c480cdd0dd9d59309ec16fab1a81beacbd0c7d0f67f9abaa7b9771b8a9a5711f87cd0b58fc69fa546f7805381f37060388c54c39f501ac4a125bfa -EBUILD postgresql-server-9.1.3.ebuild 11457 SHA256 c456afbc151fb592197d13830d84f19954fb644a9e2d397d7c6eb9157919aa72 SHA512 bbdb7504bb713b6704e6689e224f039a007bd9b6cb4d4ea4fd73ec41f4fe9d960adafa74b7562726f870794a0ec2ff13867c185674c5de2ad149cb2c1a566256 WHIRLPOOL 77d32ba4faea1b9c339df8ebeb6c47e8526362ea9faa2583b018cde3c6cedfef34df3b6a9bbc6b607e34354ca0d0e4875f186699f1ee60b3c6825b9691e31ffd -EBUILD postgresql-server-9.1.4-r1.ebuild 11472 SHA256 60102a34222e0581da78de98306978eefe8da59c59cde46f545c9827172a9298 SHA512 0a2f8e4d48b935826d56f1af6f4907df5416750fbf80bc42968217a7b52babd5d376e0a4d58f6cccde5705f249239d13c807e58a94de73d11bd0ebb4f6373293 WHIRLPOOL 5dcf92a2670aa074e773df9714a304b7d94c78241a4ae219d497d473b2dcb26b5cd32631b165337c4b720890ec99511cd7b34fcb7fbfcd1478ec1e85164426d7 -EBUILD postgresql-server-9.1.4.ebuild 11457 SHA256 16ff8526710a244c1f7e22471e8c0486728f05abde12a1f4f56829f6e84b9d62 SHA512 64d1263b91b6c3854126374760f94915e55c436c90447f89a74ffc2c744460cc0376ccbc505682da5ea75dfb94534e5d4d6b08ec164fe75cf1d8a61fb8ca7038 WHIRLPOOL 398babf71abdee230c87753e0dcf6a76cb4a155fb3d46d336bcb74cc8c73f3d8d69bdf3e8fa4a14e8333565e27c749068e4c77a77581bbc7fc8f23e9e5f856eb EBUILD postgresql-server-9.1.5.ebuild 11456 SHA256 284b1ed957661d5115574e0722ad05171e4ffdbf4df12b135428ca191848ac0b SHA512 ffbc1174e8de5ba081dfc0d63cc2e7bc30e298dedb9c8edfa01e218f15d9987af9399a0ac3b7c6f10aa04f799faa433f84028dc69c92cdeb890aa4d89cde5a93 WHIRLPOOL 11b99e401a8844018cc46344143233fa7637dcb7ae72ec9c718fc826494e26698892a97fdd2ebaad93bdb4108bd378c5bd35ef6ec8052b494903eab46603492e EBUILD postgresql-server-9.1.6.ebuild 11466 SHA256 36e1961d6bba3b08a06e2c0b81eed91c0138c5386b2ea39c8ddb886280d2d84c SHA512 40ccbc901cb4605385884374ad8494a3368f649a2403d47e168921f130cd5f19633dcab075caa1b4aacb2161effb4c8692a2a045e9e9b1a84e7e70a7a8eb235a WHIRLPOOL ed37c831224edc89bbba8734bbbdea6d375a2d4ed403a6a2e4f0c7a6622c43f3ef9b17c0240fbaf0aebb101524ff1b9a2adf8c5e0e834214153d091925844c26 -EBUILD postgresql-server-9.2.0.ebuild 11882 SHA256 3ce4006f11f2c60f2d428bd05b7b31bf37f591b6c6a5d844188ef6062e85f083 SHA512 9e7437378e57ba4a44d7970facb5d86f66e8590bcd1772c794852f77c7e1d2f9b295b8968c4613354de237d2f292d200b6bd40d96afad5daef87120436ea10b3 WHIRLPOOL c840c8d729f7bf8731636b31cb536b0c5945479019864dac2446dd1d9e5d807631ec87f5554b24779ef99fb5794da289a464a4316d9dbe9ca591892e0692a813 EBUILD postgresql-server-9.2.1.ebuild 11882 SHA256 4543403513046f3d2a092e4f24ae34cb4aae9e1d81aeaea39c3c1aab163e87c9 SHA512 6e5025f27621cecd289de14b33e3935bb9487cd77ddb752c5af7f57ea9ba196f58b51ede11d9978fe742e53db55e6b9430303c0c87c63a6ee7cc5448b5b99732 WHIRLPOOL 35cc0f9827d38834006d4bb6cc2e46e9952530bdfc9bf4cf04408c8152f97ee263f28a1e51e71458041dbd207d916f54a6ecdba119594715d6554473a02efbe7 EBUILD postgresql-server-9999.ebuild 11992 SHA256 cc87a091d8987d38c77f16301c79d0deacaf65e4c152bb08d24ff35af68923df SHA512 a2e2ae2c73c71540a840b17a2ad4e0c5a1a1a492736ce60e91d749cd951c2f0fc1cc5221c5ee195f9102374e3dc95760ba6939f2aaa97f0cd2b67a73f28b8165 WHIRLPOOL 36f4adf2a5cc1f2965983272a5beffcc2699c406956cb1514b78303520fbb94d457962e0ff6c9ae4e6fbade94281fbaa02ebcb6267654321901fd00db8bb6bbb -MISC ChangeLog 63187 SHA256 89d8212649ab6413db37b9a1341431dcc1e4de47a03884250f12d0358aac6330 SHA512 5ee399c3fb370b78122b7df9ff98bb9a15703980ca75118afc45c92d4d61913c5a80086033e6ac04a07d5146bba83607df89767dc03efc47bafe895facea5f0d WHIRLPOOL f0755a42bee94db72f56f5087ab7cc8efc57bc32f9a06166fcd39e6476435ca55c3b16dd92f28eb118f1cc1d2dc6dc883e574f6629e99ebb17862d5bd3bc6225 +MISC ChangeLog 63718 SHA256 a51521a6d91aeda2c70defd621123b432340596c36196fc6e49377c79ebfd08a SHA512 d832e1a82be3e80f89c04cc7bf429550d5368a0834beaa017cbec78539aa2e5886f9810753b8a90fcb173f507893c730a98156f15b531177fd424ee9b937eb76 WHIRLPOOL 4e37ab9020960b0c925712c05ce09f95c9da78a77e3ec16f01ba39a41986b76b5b02473581ee3c568825fb32df6a98aad15ce655cb62dac06aa3cd56a9462938 MISC metadata.xml 420 SHA256 ac37a5084450a782d02510149d030bd0d4a63164f2ffb7bdda3ddf344606ca62 SHA512 1731bced1ac398d90c6aca6ec209a9ea42deb0f7033d49952a6216349aeb992479c3e868b33cc1be2434cdead6185026503a58e779965455d0198edd87bf5b4c WHIRLPOOL 3bbd5598492cb7d90f4199fac80f27bcba281e1188f7f1d40ee3dd1561e530de13de109142f0add7221b49ec3a9c6a0bdb3add1446b1cc5a6cb3909fd193d19b +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v2.0.19 (GNU/Linux) + +iF4EAREIAAYFAlBhct4ACgkQVxOqA9G7/aCh3gD9Hj6B7eSiQGVY87rCe41snSAQ +kDPUsoEC7rfcD697jdABAJOPkRE5/CIafHfdw01IQ7EMZz9QP0qoCS33GpVbKZZO +=4P82 +-----END PGP SIGNATURE----- diff --git a/dev-db/postgresql-server/postgresql-server-8.3.18.ebuild b/dev-db/postgresql-server/postgresql-server-8.3.18.ebuild deleted file mode 100644 index bcbd79166474..000000000000 --- a/dev-db/postgresql-server/postgresql-server-8.3.18.ebuild +++ /dev/null @@ -1,339 +0,0 @@ -# Copyright 1999-2012 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-db/postgresql-server/postgresql-server-8.3.18.ebuild,v 1.12 2012/07/28 12:34:49 titanofold Exp $ - -EAPI="4" - -WANT_AUTOMAKE="none" -inherit autotools eutils multilib pam prefix user versionator - -SLOT="$(get_version_component_range 1-2)" - -KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 s390 sh sparc x86 ~x86-fbsd" - -DESCRIPTION="PostgreSQL server" -HOMEPAGE="http://www.postgresql.org/" -SRC_URI="mirror://postgresql/source/v${PV}/postgresql-${PV}.tar.bz2 - http://dev.gentoo.org/~titanofold/postgresql-patches-8.3-r2.tbz2 - http://dev.gentoo.org/~titanofold/postgresql-initscript-2.1.tbz2" -LICENSE="POSTGRESQL GPL-2" - -S="${WORKDIR}/postgresql-${PV}" - -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" -IUSE="doc kernel_linux nls pam perl python selinux tcl uuid xml" - -for lingua in ${LINGUAS} ; do - IUSE+=" linguas_${lingua}" -done - -wanted_languages() { - local enable_langs - - for lingua in ${LINGUAS} ; do - use linguas_${lingua} && enable_langs+="${lingua} " - done - - echo -n ${enable_langs} -} - -RDEPEND="~dev-db/postgresql-base-${PV}:${SLOT}[pam?,nls=] - perl? ( >=dev-lang/perl-5.8 ) - selinux? ( sec-policy/selinux-postgresql ) - tcl? ( >=dev-lang/tcl-8 ) - uuid? ( dev-libs/ossp-uuid ) - xml? ( dev-libs/libxml2 dev-libs/libxslt )" - -DEPEND="${RDEPEND} - sys-devel/flex - xml? ( virtual/pkgconfig )" - -PDEPEND="doc? ( ~dev-db/postgresql-docs-${PV} )" - -# Support /var/run or /run for the socket directory -[[ ! -d /run ]] && RUNDIR=/var - -pkg_setup() { - enewgroup postgres 70 - enewuser postgres 70 /bin/bash /var/lib/postgresql postgres -} - -src_prepare() { - epatch "${WORKDIR}/autoconf.patch" \ - "${WORKDIR}/bool.patch" \ - "${WORKDIR}/darwin.patch" \ - "${WORKDIR}/pg_ctl-exit-status.patch" \ - "${WORKDIR}/server.patch" \ - "${WORKDIR}/SuperH.patch" - - eprefixify src/include/pg_config_manual.h - - if use test ; then - epatch "${WORKDIR}/regress.patch" - sed -e "s|@SOCKETDIR@|${T}|g" -i src/test/regress/pg_regress{,_main}.c - sed -e "s|/no/such/location|${S}/src/test/regress/tmp_check/no/such/location|g" \ - -i src/test/regress/{input,output}/tablespace.source - else - echo "all install:" > "${S}/src/test/regress/GNUmakefile" - fi - - sed -e "s|@RUNDIR@|${RUNDIR}|g" \ - -i src/include/pg_config_manual.h "${WORKDIR}/postgresql.init" || \ - die "RUNDIR sed failed" - sed -e "s|@SLOT@|${SLOT}|g" \ - -i "${WORKDIR}/postgresql.init" "${WORKDIR}/postgresql.confd" || \ - die "SLOT sed failed" - - eautoconf -} - -src_configure() { - # eval is needed to get along with pg_config quotation of space-rich entities. - eval econf "$(${EPREFIX%/}/usr/$(get_libdir)/postgresql-${SLOT}/bin/pg_config --configure)" \ - --with-includes="${EPREFIX%/}/usr/include/postgresql-${SLOT}/" \ - --with-system-tzdata="${EPREFIX%/}/usr/share/zoneinfo" \ - $(use_with perl) \ - $(use_with python) \ - $(use_with tcl) \ - $(use_with xml libxml) \ - $(use_with xml libxslt) \ - $(use_with uuid ossp-uuid) \ - "$(has_version ~dev-db/postgresql-base-${PV}[nls] && use_enable nls nls "$(wanted_languages)")" -} - -src_compile() { - local bd - for bd in . contrib $(use xml && echo contrib/xml2); do - PATH="${EROOT%/}/usr/$(get_libdir)/postgresql-${SLOT}/bin:${PATH}" \ - emake -C $bd -j1 \ - PGXS=$(${EROOT%/}/usr/$(get_libdir)/postgresql-${SLOT}/bin/pg_config --pgxs) \ - PGXS_IN_SERVER=1 PGXS_WITH_SERVER="${S}/src/backend/postgres" \ - NO_PGXS=0 USE_PGXS=1 docdir=${EROOT%/}/usr/share/doc/${PF} - done -} - -src_install() { - if use perl ; then - mv -f "${S}/src/pl/plperl/GNUmakefile" "${S}/src/pl/plperl/GNUmakefile_orig" - sed -e "s:\$(DESTDIR)\$(plperl_installdir):\$(plperl_installdir):" \ - "${S}/src/pl/plperl/GNUmakefile_orig" \ - > "${S}/src/pl/plperl/GNUmakefile" - fi - - local bd - for bd in . contrib $(use xml && echo contrib/xml2) ; do - PATH="${EROOT%/}/usr/$(get_libdir)/postgresql-${SLOT}/bin:${PATH}" \ - emake install -C $bd -j1 DESTDIR="${D}" \ - PGXS_IN_SERVER=1 PGXS_WITH_SERVER="${S}/src/backend/postgres" \ - PGXS=$(${EROOT%/}/usr/$(get_libdir)/postgresql-${SLOT}/bin/pg_config --pgxs) \ - NO_PGXS=0 USE_PGXS=1 docdir=${EROOT%/}/usr/share/doc/${PF} - done - - rm -r "${ED}/usr/share/postgresql-${SLOT}/man/man7/" \ - "${ED}/usr/share/doc/${PF}/html" - rm "${ED}"/usr/share/postgresql-${SLOT}/man/man1/{clusterdb,create{db,lang,user},drop{db,lang,user},ecpg,pg_{config,dump,dumpall,restore},psql,reindexdb,vacuumdb}.1 - docompress /usr/share/postgresql-${SLOT}/man/man1 - - dodoc README HISTORY doc/{README.*,TODO,bug.template} - - dodir /etc/eselect/postgresql/slots/${SLOT} - echo "postgres_ebuilds=\"\${postgres_ebuilds} ${PF}\"" \ - > "${ED}/etc/eselect/postgresql/slots/${SLOT}/server" - - newconfd "${WORKDIR}/postgresql.confd" postgresql-${SLOT} - newinitd "${WORKDIR}/postgresql.init" postgresql-${SLOT} - - use pam && pamd_mimic system-auth postgresql auth account session - - if use prefix ; then - keepdir ${RUNDIR}/run/postgresql - fperms 0770 ${RUNDIR}/run/postgresql - fi -} - -pkg_postinst() { - postgresql-config update - - elog "Gentoo specific documentation:" - elog "http://www.gentoo.org/doc/en/postgres-howto.xml" - 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%/}${RUNDIR}/run/postgresql/" - elog - elog "If you have users and/or services that you would like to utilize the" - elog "socket, you must add them to the 'postgres' system group:" - elog " usermod -a -G postgres <user>" - 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}" -} - -pkg_postrm() { - postgresql-config update -} - -pkg_config() { - [[ -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 - - [[ -z ${PG_MAX_CONNECTIONS} ]] && PG_MAX_CONNECTIONS=128 - einfo "Checking system parameters..." - - if ! use kernel_linux ; then - einfo "Skipped." - einfo "Tests not supported on this OS (yet)." - else - if [[ -z ${SKIP_SYSTEM_TESTS} ]] ; then - ebegin "Checking whether your system supports at least ${PG_MAX_CONNECTIONS} connections" - - local SEMMSL=$(sysctl -n kernel.sem | cut -f1) - local SEMMNS=$(sysctl -n kernel.sem | cut -f2) - local SEMMNI=$(sysctl -n kernel.sem | cut -f4) - local SHMMAX=$(sysctl -n kernel.shmmax) - - local SEMMSL_MIN=17 - local SEMMNS_MIN=$(( ( ${PG_MAX_CONNECTIONS}/16 ) * 17 )) - local SEMMNI_MIN=$(( ( ${PG_MAX_CONNECTIONS}+15 ) / 16 )) - local SHMMAX_MIN=$(( 500000 + ( 30600 * ${PG_MAX_CONNECTIONS} ) )) - - for p in SEMMSL SEMMNS SEMMNI SHMMAX ; do - if [[ $(eval echo \$$p) -lt $(eval echo \$${p}_MIN) ]] ; then - eerror "The value for ${p} $(eval echo \$$p) is below the recommended value $(eval echo \$${p}_MIN)" - eerror "You have now several options:" - eerror " - Change the mentioned system parameter" - eerror " - Lower the number of max connections by setting PG_MAX_CONNECTIONS to a" - eerror " value lower than ${PG_MAX_CONNECTIONS}" - eerror " - Set SKIP_SYSTEM_TESTS in case you want to ignore this test completely" - eerror "More information can be found here:" - eerror " http://www.postgresql.org/docs/${SLOT}/static/kernel-resources.html" - die "System test failed." - fi - done - eend - else - ewarn "SKIP_SYSTEM_TESTS is set, so skipping." - fi - fi - - if [[ ${EUID} == 0 ]] ; then - einfo "Creating the data directory ..." - 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 - mv "${DATA_DIR%/}"/*.conf "${PGDATA}" - - einfo "The autovacuum function, which was in contrib, has been moved to the main" - einfo "PostgreSQL functions starting with 8.1. You can enable it in the clusters" - einfo "postgresql.conf." - einfo - if use prefix ; then - einfo "The location of the configuration files have moved to:" - einfo " ${PGDATA}" - einfo - einfo "To start the server:" - einfo " pg_ctl start -D ${DATA_DIR} -o '-D ${PGDATA} --data-directory=${DATA_DIR}'" - einfo - 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() { - einfo ">>> Test phase [check]: ${CATEGORY}/${PF}" - - if [[ ${UID} != 0 ]] ; then - PATH="${EROOT%/}/usr/$(get_libdir)/postgresql-${SLOT}/bin/:${PATH}" \ - emake check \ - PGXS=$(${EROOT%/}/usr/$(get_libdir)/postgresql-${SLOT}/bin/pg_config --pgxs) \ - NO_PGXS=0 USE_PGXS=1 SLOT=${SLOT} - - 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 - ewarn "Tests cannot be run as root. Skipping." - ewarn "HINT: FEATURES=\"userpriv\"" - fi -} diff --git a/dev-db/postgresql-server/postgresql-server-8.3.19-r1.ebuild b/dev-db/postgresql-server/postgresql-server-8.3.19-r1.ebuild deleted file mode 100644 index aa25a490e036..000000000000 --- a/dev-db/postgresql-server/postgresql-server-8.3.19-r1.ebuild +++ /dev/null @@ -1,339 +0,0 @@ -# Copyright 1999-2012 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-db/postgresql-server/postgresql-server-8.3.19-r1.ebuild,v 1.2 2012/07/28 12:34:49 titanofold Exp $ - -EAPI="4" - -WANT_AUTOMAKE="none" -inherit autotools eutils multilib pam prefix user versionator - -SLOT="$(get_version_component_range 1-2)" - -KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd" - -DESCRIPTION="PostgreSQL server" -HOMEPAGE="http://www.postgresql.org/" -SRC_URI="mirror://postgresql/source/v${PV}/postgresql-${PV}.tar.bz2 - http://dev.gentoo.org/~titanofold/postgresql-patches-8.3-r2.tbz2 - http://dev.gentoo.org/~titanofold/postgresql-initscript-2.1.1.tbz2" -LICENSE="POSTGRESQL GPL-2" - -S="${WORKDIR}/postgresql-${PV}" - -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" -IUSE="doc kernel_linux nls pam perl python selinux tcl uuid xml" - -for lingua in ${LINGUAS} ; do - IUSE+=" linguas_${lingua}" -done - -wanted_languages() { - local enable_langs - - for lingua in ${LINGUAS} ; do - use linguas_${lingua} && enable_langs+="${lingua} " - done - - echo -n ${enable_langs} -} - -RDEPEND="~dev-db/postgresql-base-${PV}:${SLOT}[pam?,nls=] - perl? ( >=dev-lang/perl-5.8 ) - selinux? ( sec-policy/selinux-postgresql ) - tcl? ( >=dev-lang/tcl-8 ) - uuid? ( dev-libs/ossp-uuid ) - xml? ( dev-libs/libxml2 dev-libs/libxslt )" - -DEPEND="${RDEPEND} - sys-devel/flex - xml? ( virtual/pkgconfig )" - -PDEPEND="doc? ( ~dev-db/postgresql-docs-${PV} )" - -# Support /var/run or /run for the socket directory -[[ ! -d /run ]] && RUNDIR=/var - -pkg_setup() { - enewgroup postgres 70 - enewuser postgres 70 /bin/bash /var/lib/postgresql postgres -} - -src_prepare() { - epatch "${WORKDIR}/autoconf.patch" \ - "${WORKDIR}/bool.patch" \ - "${WORKDIR}/darwin.patch" \ - "${WORKDIR}/pg_ctl-exit-status.patch" \ - "${WORKDIR}/server.patch" \ - "${WORKDIR}/SuperH.patch" - - eprefixify src/include/pg_config_manual.h - - if use test ; then - epatch "${WORKDIR}/regress.patch" - sed -e "s|@SOCKETDIR@|${T}|g" -i src/test/regress/pg_regress{,_main}.c - sed -e "s|/no/such/location|${S}/src/test/regress/tmp_check/no/such/location|g" \ - -i src/test/regress/{input,output}/tablespace.source - else - echo "all install:" > "${S}/src/test/regress/GNUmakefile" - fi - - sed -e "s|@RUNDIR@|${RUNDIR}|g" \ - -i src/include/pg_config_manual.h "${WORKDIR}/postgresql.init" || \ - die "RUNDIR sed failed" - sed -e "s|@SLOT@|${SLOT}|g" \ - -i "${WORKDIR}/postgresql.init" "${WORKDIR}/postgresql.confd" || \ - die "SLOT sed failed" - - eautoconf -} - -src_configure() { - # eval is needed to get along with pg_config quotation of space-rich entities. - eval econf "$(${EPREFIX%/}/usr/$(get_libdir)/postgresql-${SLOT}/bin/pg_config --configure)" \ - --with-includes="${EPREFIX%/}/usr/include/postgresql-${SLOT}/" \ - --with-system-tzdata="${EPREFIX%/}/usr/share/zoneinfo" \ - $(use_with perl) \ - $(use_with python) \ - $(use_with tcl) \ - $(use_with xml libxml) \ - $(use_with xml libxslt) \ - $(use_with uuid ossp-uuid) \ - "$(has_version ~dev-db/postgresql-base-${PV}[nls] && use_enable nls nls "$(wanted_languages)")" -} - -src_compile() { - local bd - for bd in . contrib $(use xml && echo contrib/xml2); do - PATH="${EROOT%/}/usr/$(get_libdir)/postgresql-${SLOT}/bin:${PATH}" \ - emake -C $bd -j1 \ - PGXS=$(${EROOT%/}/usr/$(get_libdir)/postgresql-${SLOT}/bin/pg_config --pgxs) \ - PGXS_IN_SERVER=1 PGXS_WITH_SERVER="${S}/src/backend/postgres" \ - NO_PGXS=0 USE_PGXS=1 docdir=${EROOT%/}/usr/share/doc/${PF} - done -} - -src_install() { - if use perl ; then - mv -f "${S}/src/pl/plperl/GNUmakefile" "${S}/src/pl/plperl/GNUmakefile_orig" - sed -e "s:\$(DESTDIR)\$(plperl_installdir):\$(plperl_installdir):" \ - "${S}/src/pl/plperl/GNUmakefile_orig" \ - > "${S}/src/pl/plperl/GNUmakefile" - fi - - local bd - for bd in . contrib $(use xml && echo contrib/xml2) ; do - PATH="${EROOT%/}/usr/$(get_libdir)/postgresql-${SLOT}/bin:${PATH}" \ - emake install -C $bd -j1 DESTDIR="${D}" \ - PGXS_IN_SERVER=1 PGXS_WITH_SERVER="${S}/src/backend/postgres" \ - PGXS=$(${EROOT%/}/usr/$(get_libdir)/postgresql-${SLOT}/bin/pg_config --pgxs) \ - NO_PGXS=0 USE_PGXS=1 docdir=${EROOT%/}/usr/share/doc/${PF} - done - - rm -r "${ED}/usr/share/postgresql-${SLOT}/man/man7/" \ - "${ED}/usr/share/doc/${PF}/html" - rm "${ED}"/usr/share/postgresql-${SLOT}/man/man1/{clusterdb,create{db,lang,user},drop{db,lang,user},ecpg,pg_{config,dump,dumpall,restore},psql,reindexdb,vacuumdb}.1 - docompress /usr/share/postgresql-${SLOT}/man/man1 - - dodoc README HISTORY doc/{README.*,TODO,bug.template} - - dodir /etc/eselect/postgresql/slots/${SLOT} - echo "postgres_ebuilds=\"\${postgres_ebuilds} ${PF}\"" \ - > "${ED}/etc/eselect/postgresql/slots/${SLOT}/server" - - newconfd "${WORKDIR}/postgresql.confd" postgresql-${SLOT} - newinitd "${WORKDIR}/postgresql.init" postgresql-${SLOT} - - use pam && pamd_mimic system-auth postgresql auth account session - - if use prefix ; then - keepdir ${RUNDIR}/run/postgresql - fperms 0770 ${RUNDIR}/run/postgresql - fi -} - -pkg_postinst() { - postgresql-config update - - elog "Gentoo specific documentation:" - elog "http://www.gentoo.org/doc/en/postgres-howto.xml" - 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%/}${RUNDIR}/run/postgresql/" - elog - elog "If you have users and/or services that you would like to utilize the" - elog "socket, you must add them to the 'postgres' system group:" - elog " usermod -a -G postgres <user>" - 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}" -} - -pkg_postrm() { - postgresql-config update -} - -pkg_config() { - [[ -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 - - [[ -z ${PG_MAX_CONNECTIONS} ]] && PG_MAX_CONNECTIONS=128 - einfo "Checking system parameters..." - - if ! use kernel_linux ; then - einfo "Skipped." - einfo "Tests not supported on this OS (yet)." - else - if [[ -z ${SKIP_SYSTEM_TESTS} ]] ; then - ebegin "Checking whether your system supports at least ${PG_MAX_CONNECTIONS} connections" - - local SEMMSL=$(sysctl -n kernel.sem | cut -f1) - local SEMMNS=$(sysctl -n kernel.sem | cut -f2) - local SEMMNI=$(sysctl -n kernel.sem | cut -f4) - local SHMMAX=$(sysctl -n kernel.shmmax) - - local SEMMSL_MIN=17 - local SEMMNS_MIN=$(( ( ${PG_MAX_CONNECTIONS}/16 ) * 17 )) - local SEMMNI_MIN=$(( ( ${PG_MAX_CONNECTIONS}+15 ) / 16 )) - local SHMMAX_MIN=$(( 500000 + ( 30600 * ${PG_MAX_CONNECTIONS} ) )) - - for p in SEMMSL SEMMNS SEMMNI SHMMAX ; do - if [[ $(eval echo \$$p) -lt $(eval echo \$${p}_MIN) ]] ; then - eerror "The value for ${p} $(eval echo \$$p) is below the recommended value $(eval echo \$${p}_MIN)" - eerror "You have now several options:" - eerror " - Change the mentioned system parameter" - eerror " - Lower the number of max connections by setting PG_MAX_CONNECTIONS to a" - eerror " value lower than ${PG_MAX_CONNECTIONS}" - eerror " - Set SKIP_SYSTEM_TESTS in case you want to ignore this test completely" - eerror "More information can be found here:" - eerror " http://www.postgresql.org/docs/${SLOT}/static/kernel-resources.html" - die "System test failed." - fi - done - eend - else - ewarn "SKIP_SYSTEM_TESTS is set, so skipping." - fi - fi - - if [[ ${EUID} == 0 ]] ; then - einfo "Creating the data directory ..." - 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 - mv "${DATA_DIR%/}"/*.conf "${PGDATA}" - - einfo "The autovacuum function, which was in contrib, has been moved to the main" - einfo "PostgreSQL functions starting with 8.1. You can enable it in the clusters" - einfo "postgresql.conf." - einfo - if use prefix ; then - einfo "The location of the configuration files have moved to:" - einfo " ${PGDATA}" - einfo - einfo "To start the server:" - einfo " pg_ctl start -D ${DATA_DIR} -o '-D ${PGDATA} --data-directory=${DATA_DIR}'" - einfo - 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() { - einfo ">>> Test phase [check]: ${CATEGORY}/${PF}" - - if [[ ${UID} != 0 ]] ; then - PATH="${EROOT%/}/usr/$(get_libdir)/postgresql-${SLOT}/bin/:${PATH}" \ - emake check \ - PGXS=$(${EROOT%/}/usr/$(get_libdir)/postgresql-${SLOT}/bin/pg_config --pgxs) \ - NO_PGXS=0 USE_PGXS=1 SLOT=${SLOT} - - 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 - ewarn "Tests cannot be run as root. Skipping." - ewarn "HINT: FEATURES=\"userpriv\"" - fi -} diff --git a/dev-db/postgresql-server/postgresql-server-8.3.19.ebuild b/dev-db/postgresql-server/postgresql-server-8.3.19.ebuild deleted file mode 100644 index c5f1751bca25..000000000000 --- a/dev-db/postgresql-server/postgresql-server-8.3.19.ebuild +++ /dev/null @@ -1,339 +0,0 @@ -# Copyright 1999-2012 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-db/postgresql-server/postgresql-server-8.3.19.ebuild,v 1.8 2012/07/28 12:34:49 titanofold Exp $ - -EAPI="4" - -WANT_AUTOMAKE="none" -inherit autotools eutils multilib pam prefix user versionator - -SLOT="$(get_version_component_range 1-2)" - -KEYWORDS="alpha amd64 arm hppa ia64 ~mips ~ppc ppc64 s390 sh sparc x86 ~x86-fbsd" - -DESCRIPTION="PostgreSQL server" -HOMEPAGE="http://www.postgresql.org/" -SRC_URI="mirror://postgresql/source/v${PV}/postgresql-${PV}.tar.bz2 - http://dev.gentoo.org/~titanofold/postgresql-patches-8.3-r2.tbz2 - http://dev.gentoo.org/~titanofold/postgresql-initscript-2.1.tbz2" -LICENSE="POSTGRESQL GPL-2" - -S="${WORKDIR}/postgresql-${PV}" - -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" -IUSE="doc kernel_linux nls pam perl python selinux tcl uuid xml" - -for lingua in ${LINGUAS} ; do - IUSE+=" linguas_${lingua}" -done - -wanted_languages() { - local enable_langs - - for lingua in ${LINGUAS} ; do - use linguas_${lingua} && enable_langs+="${lingua} " - done - - echo -n ${enable_langs} -} - -RDEPEND="~dev-db/postgresql-base-${PV}:${SLOT}[pam?,nls=] - perl? ( >=dev-lang/perl-5.8 ) - selinux? ( sec-policy/selinux-postgresql ) - tcl? ( >=dev-lang/tcl-8 ) - uuid? ( dev-libs/ossp-uuid ) - xml? ( dev-libs/libxml2 dev-libs/libxslt )" - -DEPEND="${RDEPEND} - sys-devel/flex - xml? ( virtual/pkgconfig )" - -PDEPEND="doc? ( ~dev-db/postgresql-docs-${PV} )" - -# Support /var/run or /run for the socket directory -[[ ! -d /run ]] && RUNDIR=/var - -pkg_setup() { - enewgroup postgres 70 - enewuser postgres 70 /bin/bash /var/lib/postgresql postgres -} - -src_prepare() { - epatch "${WORKDIR}/autoconf.patch" \ - "${WORKDIR}/bool.patch" \ - "${WORKDIR}/darwin.patch" \ - "${WORKDIR}/pg_ctl-exit-status.patch" \ - "${WORKDIR}/server.patch" \ - "${WORKDIR}/SuperH.patch" - - eprefixify src/include/pg_config_manual.h - - if use test ; then - epatch "${WORKDIR}/regress.patch" - sed -e "s|@SOCKETDIR@|${T}|g" -i src/test/regress/pg_regress{,_main}.c - sed -e "s|/no/such/location|${S}/src/test/regress/tmp_check/no/such/location|g" \ - -i src/test/regress/{input,output}/tablespace.source - else - echo "all install:" > "${S}/src/test/regress/GNUmakefile" - fi - - sed -e "s|@RUNDIR@|${RUNDIR}|g" \ - -i src/include/pg_config_manual.h "${WORKDIR}/postgresql.init" || \ - die "RUNDIR sed failed" - sed -e "s|@SLOT@|${SLOT}|g" \ - -i "${WORKDIR}/postgresql.init" "${WORKDIR}/postgresql.confd" || \ - die "SLOT sed failed" - - eautoconf -} - -src_configure() { - # eval is needed to get along with pg_config quotation of space-rich entities. - eval econf "$(${EPREFIX%/}/usr/$(get_libdir)/postgresql-${SLOT}/bin/pg_config --configure)" \ - --with-includes="${EPREFIX%/}/usr/include/postgresql-${SLOT}/" \ - --with-system-tzdata="${EPREFIX%/}/usr/share/zoneinfo" \ - $(use_with perl) \ - $(use_with python) \ - $(use_with tcl) \ - $(use_with xml libxml) \ - $(use_with xml libxslt) \ - $(use_with uuid ossp-uuid) \ - "$(has_version ~dev-db/postgresql-base-${PV}[nls] && use_enable nls nls "$(wanted_languages)")" -} - -src_compile() { - local bd - for bd in . contrib $(use xml && echo contrib/xml2); do - PATH="${EROOT%/}/usr/$(get_libdir)/postgresql-${SLOT}/bin:${PATH}" \ - emake -C $bd -j1 \ - PGXS=$(${EROOT%/}/usr/$(get_libdir)/postgresql-${SLOT}/bin/pg_config --pgxs) \ - PGXS_IN_SERVER=1 PGXS_WITH_SERVER="${S}/src/backend/postgres" \ - NO_PGXS=0 USE_PGXS=1 docdir=${EROOT%/}/usr/share/doc/${PF} - done -} - -src_install() { - if use perl ; then - mv -f "${S}/src/pl/plperl/GNUmakefile" "${S}/src/pl/plperl/GNUmakefile_orig" - sed -e "s:\$(DESTDIR)\$(plperl_installdir):\$(plperl_installdir):" \ - "${S}/src/pl/plperl/GNUmakefile_orig" \ - > "${S}/src/pl/plperl/GNUmakefile" - fi - - local bd - for bd in . contrib $(use xml && echo contrib/xml2) ; do - PATH="${EROOT%/}/usr/$(get_libdir)/postgresql-${SLOT}/bin:${PATH}" \ - emake install -C $bd -j1 DESTDIR="${D}" \ - PGXS_IN_SERVER=1 PGXS_WITH_SERVER="${S}/src/backend/postgres" \ - PGXS=$(${EROOT%/}/usr/$(get_libdir)/postgresql-${SLOT}/bin/pg_config --pgxs) \ - NO_PGXS=0 USE_PGXS=1 docdir=${EROOT%/}/usr/share/doc/${PF} - done - - rm -r "${ED}/usr/share/postgresql-${SLOT}/man/man7/" \ - "${ED}/usr/share/doc/${PF}/html" - rm "${ED}"/usr/share/postgresql-${SLOT}/man/man1/{clusterdb,create{db,lang,user},drop{db,lang,user},ecpg,pg_{config,dump,dumpall,restore},psql,reindexdb,vacuumdb}.1 - docompress /usr/share/postgresql-${SLOT}/man/man1 - - dodoc README HISTORY doc/{README.*,TODO,bug.template} - - dodir /etc/eselect/postgresql/slots/${SLOT} - echo "postgres_ebuilds=\"\${postgres_ebuilds} ${PF}\"" \ - > "${ED}/etc/eselect/postgresql/slots/${SLOT}/server" - - newconfd "${WORKDIR}/postgresql.confd" postgresql-${SLOT} - newinitd "${WORKDIR}/postgresql.init" postgresql-${SLOT} - - use pam && pamd_mimic system-auth postgresql auth account session - - if use prefix ; then - keepdir ${RUNDIR}/run/postgresql - fperms 0770 ${RUNDIR}/run/postgresql - fi -} - -pkg_postinst() { - postgresql-config update - - elog "Gentoo specific documentation:" - elog "http://www.gentoo.org/doc/en/postgres-howto.xml" - 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%/}${RUNDIR}/run/postgresql/" - elog - elog "If you have users and/or services that you would like to utilize the" - elog "socket, you must add them to the 'postgres' system group:" - elog " usermod -a -G postgres <user>" - 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}" -} - -pkg_postrm() { - postgresql-config update -} - -pkg_config() { - [[ -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 - - [[ -z ${PG_MAX_CONNECTIONS} ]] && PG_MAX_CONNECTIONS=128 - einfo "Checking system parameters..." - - if ! use kernel_linux ; then - einfo "Skipped." - einfo "Tests not supported on this OS (yet)." - else - if [[ -z ${SKIP_SYSTEM_TESTS} ]] ; then - ebegin "Checking whether your system supports at least ${PG_MAX_CONNECTIONS} connections" - - local SEMMSL=$(sysctl -n kernel.sem | cut -f1) - local SEMMNS=$(sysctl -n kernel.sem | cut -f2) - local SEMMNI=$(sysctl -n kernel.sem | cut -f4) - local SHMMAX=$(sysctl -n kernel.shmmax) - - local SEMMSL_MIN=17 - local SEMMNS_MIN=$(( ( ${PG_MAX_CONNECTIONS}/16 ) * 17 )) - local SEMMNI_MIN=$(( ( ${PG_MAX_CONNECTIONS}+15 ) / 16 )) - local SHMMAX_MIN=$(( 500000 + ( 30600 * ${PG_MAX_CONNECTIONS} ) )) - - for p in SEMMSL SEMMNS SEMMNI SHMMAX ; do - if [[ $(eval echo \$$p) -lt $(eval echo \$${p}_MIN) ]] ; then - eerror "The value for ${p} $(eval echo \$$p) is below the recommended value $(eval echo \$${p}_MIN)" - eerror "You have now several options:" - eerror " - Change the mentioned system parameter" - eerror " - Lower the number of max connections by setting PG_MAX_CONNECTIONS to a" - eerror " value lower than ${PG_MAX_CONNECTIONS}" - eerror " - Set SKIP_SYSTEM_TESTS in case you want to ignore this test completely" - eerror "More information can be found here:" - eerror " http://www.postgresql.org/docs/${SLOT}/static/kernel-resources.html" - die "System test failed." - fi - done - eend - else - ewarn "SKIP_SYSTEM_TESTS is set, so skipping." - fi - fi - - if [[ ${EUID} == 0 ]] ; then - einfo "Creating the data directory ..." - 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 - mv "${DATA_DIR%/}"/*.conf "${PGDATA}" - - einfo "The autovacuum function, which was in contrib, has been moved to the main" - einfo "PostgreSQL functions starting with 8.1. You can enable it in the clusters" - einfo "postgresql.conf." - einfo - if use prefix ; then - einfo "The location of the configuration files have moved to:" - einfo " ${PGDATA}" - einfo - einfo "To start the server:" - einfo " pg_ctl start -D ${DATA_DIR} -o '-D ${PGDATA} --data-directory=${DATA_DIR}'" - einfo - 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() { - einfo ">>> Test phase [check]: ${CATEGORY}/${PF}" - - if [[ ${UID} != 0 ]] ; then - PATH="${EROOT%/}/usr/$(get_libdir)/postgresql-${SLOT}/bin/:${PATH}" \ - emake check \ - PGXS=$(${EROOT%/}/usr/$(get_libdir)/postgresql-${SLOT}/bin/pg_config --pgxs) \ - NO_PGXS=0 USE_PGXS=1 SLOT=${SLOT} - - 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 - ewarn "Tests cannot be run as root. Skipping." - ewarn "HINT: FEATURES=\"userpriv\"" - fi -} diff --git a/dev-db/postgresql-server/postgresql-server-8.4.11.ebuild b/dev-db/postgresql-server/postgresql-server-8.4.11.ebuild deleted file mode 100644 index 503ea839f214..000000000000 --- a/dev-db/postgresql-server/postgresql-server-8.4.11.ebuild +++ /dev/null @@ -1,348 +0,0 @@ -# Copyright 1999-2012 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-db/postgresql-server/postgresql-server-8.4.11.ebuild,v 1.12 2012/07/28 12:34:49 titanofold Exp $ - -EAPI="4" -PYTHON_DEPEND="python? 2" - -WANT_AUTOMAKE="none" -inherit autotools eutils multilib pam prefix python user versionator - -SLOT="$(get_version_component_range 1-2)" - -KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 s390 sh sparc x86 ~x86-fbsd" - -DESCRIPTION="PostgreSQL server" -HOMEPAGE="http://www.postgresql.org/" -SRC_URI="mirror://postgresql/source/v${PV}/postgresql-${PV}.tar.bz2 - http://dev.gentoo.org/~titanofold/postgresql-patches-8.4-r2.tbz2 - http://dev.gentoo.org/~titanofold/postgresql-initscript-2.1.tbz2" -LICENSE="POSTGRESQL GPL-2" - -S="${WORKDIR}/postgresql-${PV}" - -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" -IUSE="doc kernel_linux nls pam perl -pg_legacytimestamp python selinux tcl uuid xml" - -for lingua in ${LINGUAS} ; do - IUSE+=" linguas_${lingua}" -done - -wanted_languages() { - local enable_langs - - for lingua in ${LINGUAS} ; do - use linguas_${lingua} && enable_langs+="${lingua} " - done - - echo -n ${enable_langs} -} - -RDEPEND="~dev-db/postgresql-base-${PV}:${SLOT}[pam?,pg_legacytimestamp=,nls=] - perl? ( >=dev-lang/perl-5.8 ) - selinux? ( sec-policy/selinux-postgresql ) - tcl? ( >=dev-lang/tcl-8 ) - uuid? ( dev-libs/ossp-uuid ) - xml? ( dev-libs/libxml2 dev-libs/libxslt )" - -DEPEND="${RDEPEND} - sys-devel/flex - xml? ( virtual/pkgconfig )" - -PDEPEND="doc? ( ~dev-db/postgresql-docs-${PV} )" - -# Support /var/run or /run for the socket directory -[[ ! -d /run ]] && RUNDIR=/var - -pkg_setup() { - enewgroup postgres 70 - enewuser postgres 70 /bin/bash /var/lib/postgresql postgres - - use python && python_set_active_version 2 -} - -src_prepare() { - epatch "${WORKDIR}/autoconf.patch" \ - "${WORKDIR}/bool.patch" \ - "${WORKDIR}/darwin.patch" \ - "${WORKDIR}/ldflags.patch" \ - "${WORKDIR}/pg_ctl-exit-status.patch" \ - "${WORKDIR}/server.patch" \ - "${WORKDIR}/SuperH.patch" - - eprefixify src/include/pg_config_manual.h - - if use test ; then - epatch "${WORKDIR}/regress.patch" - sed -e "s|@SOCKETDIR@|${T}|g" -i src/test/regress/pg_regress{,_main}.c - sed -e "s|/no/such/location|${S}/src/test/regress/tmp_check/no/such/location|g" \ - -i src/test/regress/{input,output}/tablespace.source - else - echo "all install:" > "${S}/src/test/regress/GNUmakefile" - fi - - sed -e "s|@RUNDIR@|${RUNDIR}|g" \ - -i src/include/pg_config_manual.h "${WORKDIR}/postgresql.init" || \ - die "RUNDIR sed failed" - sed -e "s|@SLOT@|${SLOT}|g" \ - -i "${WORKDIR}/postgresql.init" "${WORKDIR}/postgresql.confd" || \ - die "SLOT sed failed" - - eautoconf -} - -src_configure() { - # eval is needed to get along with pg_config quotation of space-rich entities. - eval econf "$(${EPREFIX%/}/usr/$(get_libdir)/postgresql-${SLOT}/bin/pg_config --configure)" \ - --with-includes="${EPREFIX%/}/usr/include/postgresql-${SLOT}/" \ - --with-libraries="${EPREFIX%/}/usr/$(get_libdir)/postgresql-${SLOT}/$(get_libdir)" \ - --with-system-tzdata="${EPREFIX%/}/usr/share/zoneinfo" \ - $(use_with perl) \ - $(use_with python) \ - $(use_with tcl) \ - $(use_with xml libxml) \ - $(use_with xml libxslt) \ - $(use_with uuid ossp-uuid) \ - "$(has_version ~dev-db/postgresql-base-${PV}[nls] && use_enable nls nls "$(wanted_languages)")" -} - -src_compile() { - local bd - for bd in . contrib $(use xml && echo contrib/xml2) ; do - PATH="${EROOT%/}/usr/$(get_libdir)/postgresql-${SLOT}/bin:${PATH}" \ - emake -C $bd -j1 || die "emake in $bd failed" - done -} - -src_install() { - if use perl ; then - mv -f "${S}/src/pl/plperl/GNUmakefile" \ - "${S}/src/pl/plperl/GNUmakefile_orig" - sed -e "s:\$(DESTDIR)\$(plperl_installdir):\$(plperl_installdir):" \ - "${S}/src/pl/plperl/GNUmakefile_orig" \ - > "${S}/src/pl/plperl/GNUmakefile" - fi - - local bd - for bd in . contrib $(use xml && echo contrib/xml2) ; do - PATH="${EROOT%/}/usr/$(get_libdir)/postgresql-${SLOT}/bin:${PATH}" \ - emake install -C $bd -j1 DESTDIR="${D}" \ - || die "emake install in $bd failed" - done - - rm -r "${ED}/usr/share/postgresql-${SLOT}/man/man7/" \ - "${ED}/usr/share/doc/postgresql-${SLOT}/html" - rm "${ED}"/usr/share/postgresql-${SLOT}/man/man1/{clusterdb,create{db,lang,user},drop{db,lang,user},ecpg,pg_{config,dump,dumpall,restore},psql,reindexdb,vacuumdb}.1 - - dodoc README HISTORY doc/{README.*,TODO,bug.template} - - dodir /etc/eselect/postgresql/slots/${SLOT} - echo "postgres_ebuilds=\"\${postgres_ebuilds} ${PF}\"" \ - > "${ED}/etc/eselect/postgresql/slots/${SLOT}/server" - - newconfd "${WORKDIR}"/postgresql.confd postgresql-${SLOT} \ - || die "Inserting conf.d file failed" - - newinitd "${WORKDIR}"/postgresql.init postgresql-${SLOT} \ - || die "Inserting init.d file failed" - - use pam && pamd_mimic system-auth postgresql auth account session - - if use prefix ; then - keepdir ${RUNDIR}/run/postgresql - fperms 0770 ${RUNDIR}/run/postgresql - fi -} - -pkg_postinst() { - postgresql-config update - - elog "The time stamp format is 64 bit integers now. If you upgrade from older" - elog "databases, this may force you to either do a dump and reload of enable" - elog "pg_legacytimestamp until you find time to do so. If the database can't start" - elog "please try enabling pg_legacytimestamp and rebuild." - elog - elog "Gentoo specific documentation:" - elog "http://www.gentoo.org/doc/en/postgres-howto.xml" - 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%/}${RUNDIR}/run/postgresql/" - elog - elog "If you have users and/or services that you would like to utilize the" - elog "socket, you must add them to the 'postgres' system group:" - elog " usermod -a -G postgres <user>" - 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}" -} - -pkg_postrm() { - postgresql-config update -} - -pkg_config() { - [[ -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 - - [[ -z ${PG_MAX_CONNECTIONS} ]] && PG_MAX_CONNECTIONS=128 - einfo "Checking system parameters..." - - if ! use kernel_linux ; then - einfo "Skipped." - einfo " Tests not supported on this OS (yet)" - else - if [[ -z ${SKIP_SYSTEM_TESTS} ]] ; then - einfo "Checking whether your system supports at least ${PG_MAX_CONNECTIONS} connections..." - - local SEMMSL=$(sysctl -n kernel.sem | cut -f1) - local SEMMNS=$(sysctl -n kernel.sem | cut -f2) - local SEMMNI=$(sysctl -n kernel.sem | cut -f4) - local SHMMAX=$(sysctl -n kernel.shmmax) - - local SEMMSL_MIN=17 - local SEMMNS_MIN=$(( ( ${PG_MAX_CONNECTIONS}/16 ) * 17 )) - local SEMMNI_MIN=$(( ( ${PG_MAX_CONNECTIONS}+15 ) / 16 )) - local SHMMAX_MIN=$(( 500000 + ( 30600 * ${PG_MAX_CONNECTIONS} ) )) - - for p in SEMMSL SEMMNS SEMMNI SHMMAX ; do - if [[ $(eval echo \$$p) -lt $(eval echo \$${p}_MIN) ]] ; then - eerror "The value for ${p} $(eval echo \$$p) is below the recommended value $(eval echo \$${p}_MIN)" - eerror "You have now several options:" - eerror " - Change the mentioned system parameter" - eerror " - Lower the number of max.connections by setting PG_MAX_CONNECTIONS to a" - eerror " value lower than ${PG_MAX_CONNECTIONS}" - eerror " - Set SKIP_SYSTEM_TESTS in case you want to ignore this test completely" - eerror "More information can be found here:" - eerror " http://www.postgresql.org/docs/${SLOT}/static/kernel-resources.html" - die "System test failed." - fi - done - einfo "Passed." - else - ewarn "SKIP_SYSTEM_TESTS set, so skipping." - fi - fi - - if [[ ${EUID} == 0 ]] ; then - einfo "Creating the data directory ..." - 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 - mv "${DATA_DIR%/}"/*.conf "${PGDATA}" - - 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 by" - einfo "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 - einfo "To start the server:" - einfo " pg_ctl start -D ${DATA_DIR} -o '-D ${PGDATA} --data-directory=${DATA_DIR}'" - einfo - 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() { - einfo ">>> Test phase [check]: ${CATEGORY}/${PF}" - - if [[ ${UID} != 0 ]] ; then - emake check || die "Make check failed. See above for details." - - 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 - ewarn "Tests cannot be run as root. Skipping." - ewarn "HINT: FEATURES=\"userpriv\"" - fi -} diff --git a/dev-db/postgresql-server/postgresql-server-8.4.12-r1.ebuild b/dev-db/postgresql-server/postgresql-server-8.4.12-r1.ebuild deleted file mode 100644 index 4f408516bd42..000000000000 --- a/dev-db/postgresql-server/postgresql-server-8.4.12-r1.ebuild +++ /dev/null @@ -1,348 +0,0 @@ -# Copyright 1999-2012 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-db/postgresql-server/postgresql-server-8.4.12-r1.ebuild,v 1.2 2012/07/28 12:34:49 titanofold Exp $ - -EAPI="4" -PYTHON_DEPEND="python? 2" - -WANT_AUTOMAKE="none" -inherit autotools eutils multilib pam prefix python user versionator - -SLOT="$(get_version_component_range 1-2)" - -KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd" - -DESCRIPTION="PostgreSQL server" -HOMEPAGE="http://www.postgresql.org/" -SRC_URI="mirror://postgresql/source/v${PV}/postgresql-${PV}.tar.bz2 - http://dev.gentoo.org/~titanofold/postgresql-patches-8.4-r2.tbz2 - http://dev.gentoo.org/~titanofold/postgresql-initscript-2.1.1.tbz2" -LICENSE="POSTGRESQL GPL-2" - -S="${WORKDIR}/postgresql-${PV}" - -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" -IUSE="doc kernel_linux nls pam perl -pg_legacytimestamp python selinux tcl uuid xml" - -for lingua in ${LINGUAS} ; do - IUSE+=" linguas_${lingua}" -done - -wanted_languages() { - local enable_langs - - for lingua in ${LINGUAS} ; do - use linguas_${lingua} && enable_langs+="${lingua} " - done - - echo -n ${enable_langs} -} - -RDEPEND="~dev-db/postgresql-base-${PV}:${SLOT}[pam?,pg_legacytimestamp=,nls=] - perl? ( >=dev-lang/perl-5.8 ) - selinux? ( sec-policy/selinux-postgresql ) - tcl? ( >=dev-lang/tcl-8 ) - uuid? ( dev-libs/ossp-uuid ) - xml? ( dev-libs/libxml2 dev-libs/libxslt )" - -DEPEND="${RDEPEND} - sys-devel/flex - xml? ( virtual/pkgconfig )" - -PDEPEND="doc? ( ~dev-db/postgresql-docs-${PV} )" - -# Support /var/run or /run for the socket directory -[[ ! -d /run ]] && RUNDIR=/var - -pkg_setup() { - enewgroup postgres 70 - enewuser postgres 70 /bin/bash /var/lib/postgresql postgres - - use python && python_set_active_version 2 -} - -src_prepare() { - epatch "${WORKDIR}/autoconf.patch" \ - "${WORKDIR}/bool.patch" \ - "${WORKDIR}/darwin.patch" \ - "${WORKDIR}/ldflags.patch" \ - "${WORKDIR}/pg_ctl-exit-status.patch" \ - "${WORKDIR}/server.patch" \ - "${WORKDIR}/SuperH.patch" - - eprefixify src/include/pg_config_manual.h - - if use test ; then - epatch "${WORKDIR}/regress.patch" - sed -e "s|@SOCKETDIR@|${T}|g" -i src/test/regress/pg_regress{,_main}.c - sed -e "s|/no/such/location|${S}/src/test/regress/tmp_check/no/such/location|g" \ - -i src/test/regress/{input,output}/tablespace.source - else - echo "all install:" > "${S}/src/test/regress/GNUmakefile" - fi - - sed -e "s|@RUNDIR@|${RUNDIR}|g" \ - -i src/include/pg_config_manual.h "${WORKDIR}/postgresql.init" || \ - die "RUNDIR sed failed" - sed -e "s|@SLOT@|${SLOT}|g" \ - -i "${WORKDIR}/postgresql.init" "${WORKDIR}/postgresql.confd" || \ - die "SLOT sed failed" - - eautoconf -} - -src_configure() { - # eval is needed to get along with pg_config quotation of space-rich entities. - eval econf "$(${EPREFIX%/}/usr/$(get_libdir)/postgresql-${SLOT}/bin/pg_config --configure)" \ - --with-includes="${EPREFIX%/}/usr/include/postgresql-${SLOT}/" \ - --with-libraries="${EPREFIX%/}/usr/$(get_libdir)/postgresql-${SLOT}/$(get_libdir)" \ - --with-system-tzdata="${EPREFIX%/}/usr/share/zoneinfo" \ - $(use_with perl) \ - $(use_with python) \ - $(use_with tcl) \ - $(use_with xml libxml) \ - $(use_with xml libxslt) \ - $(use_with uuid ossp-uuid) \ - "$(has_version ~dev-db/postgresql-base-${PV}[nls] && use_enable nls nls "$(wanted_languages)")" -} - -src_compile() { - local bd - for bd in . contrib $(use xml && echo contrib/xml2) ; do - PATH="${EROOT%/}/usr/$(get_libdir)/postgresql-${SLOT}/bin:${PATH}" \ - emake -C $bd -j1 || die "emake in $bd failed" - done -} - -src_install() { - if use perl ; then - mv -f "${S}/src/pl/plperl/GNUmakefile" \ - "${S}/src/pl/plperl/GNUmakefile_orig" - sed -e "s:\$(DESTDIR)\$(plperl_installdir):\$(plperl_installdir):" \ - "${S}/src/pl/plperl/GNUmakefile_orig" \ - > "${S}/src/pl/plperl/GNUmakefile" - fi - - local bd - for bd in . contrib $(use xml && echo contrib/xml2) ; do - PATH="${EROOT%/}/usr/$(get_libdir)/postgresql-${SLOT}/bin:${PATH}" \ - emake install -C $bd -j1 DESTDIR="${D}" \ - || die "emake install in $bd failed" - done - - rm -r "${ED}/usr/share/postgresql-${SLOT}/man/man7/" \ - "${ED}/usr/share/doc/postgresql-${SLOT}/html" - rm "${ED}"/usr/share/postgresql-${SLOT}/man/man1/{clusterdb,create{db,lang,user},drop{db,lang,user},ecpg,pg_{config,dump,dumpall,restore},psql,reindexdb,vacuumdb}.1 - - dodoc README HISTORY doc/{README.*,TODO,bug.template} - - dodir /etc/eselect/postgresql/slots/${SLOT} - echo "postgres_ebuilds=\"\${postgres_ebuilds} ${PF}\"" \ - > "${ED}/etc/eselect/postgresql/slots/${SLOT}/server" - - newconfd "${WORKDIR}"/postgresql.confd postgresql-${SLOT} \ - || die "Inserting conf.d file failed" - - newinitd "${WORKDIR}"/postgresql.init postgresql-${SLOT} \ - || die "Inserting init.d file failed" - - use pam && pamd_mimic system-auth postgresql auth account session - - if use prefix ; then - keepdir ${RUNDIR}/run/postgresql - fperms 0770 ${RUNDIR}/run/postgresql - fi -} - -pkg_postinst() { - postgresql-config update - - elog "The time stamp format is 64 bit integers now. If you upgrade from older" - elog "databases, this may force you to either do a dump and reload of enable" - elog "pg_legacytimestamp until you find time to do so. If the database can't start" - elog "please try enabling pg_legacytimestamp and rebuild." - elog - elog "Gentoo specific documentation:" - elog "http://www.gentoo.org/doc/en/postgres-howto.xml" - 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%/}${RUNDIR}/run/postgresql/" - elog - elog "If you have users and/or services that you would like to utilize the" - elog "socket, you must add them to the 'postgres' system group:" - elog " usermod -a -G postgres <user>" - 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}" -} - -pkg_postrm() { - postgresql-config update -} - -pkg_config() { - [[ -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 - - [[ -z ${PG_MAX_CONNECTIONS} ]] && PG_MAX_CONNECTIONS=128 - einfo "Checking system parameters..." - - if ! use kernel_linux ; then - einfo "Skipped." - einfo " Tests not supported on this OS (yet)" - else - if [[ -z ${SKIP_SYSTEM_TESTS} ]] ; then - einfo "Checking whether your system supports at least ${PG_MAX_CONNECTIONS} connections..." - - local SEMMSL=$(sysctl -n kernel.sem | cut -f1) - local SEMMNS=$(sysctl -n kernel.sem | cut -f2) - local SEMMNI=$(sysctl -n kernel.sem | cut -f4) - local SHMMAX=$(sysctl -n kernel.shmmax) - - local SEMMSL_MIN=17 - local SEMMNS_MIN=$(( ( ${PG_MAX_CONNECTIONS}/16 ) * 17 )) - local SEMMNI_MIN=$(( ( ${PG_MAX_CONNECTIONS}+15 ) / 16 )) - local SHMMAX_MIN=$(( 500000 + ( 30600 * ${PG_MAX_CONNECTIONS} ) )) - - for p in SEMMSL SEMMNS SEMMNI SHMMAX ; do - if [[ $(eval echo \$$p) -lt $(eval echo \$${p}_MIN) ]] ; then - eerror "The value for ${p} $(eval echo \$$p) is below the recommended value $(eval echo \$${p}_MIN)" - eerror "You have now several options:" - eerror " - Change the mentioned system parameter" - eerror " - Lower the number of max.connections by setting PG_MAX_CONNECTIONS to a" - eerror " value lower than ${PG_MAX_CONNECTIONS}" - eerror " - Set SKIP_SYSTEM_TESTS in case you want to ignore this test completely" - eerror "More information can be found here:" - eerror " http://www.postgresql.org/docs/${SLOT}/static/kernel-resources.html" - die "System test failed." - fi - done - einfo "Passed." - else - ewarn "SKIP_SYSTEM_TESTS set, so skipping." - fi - fi - - if [[ ${EUID} == 0 ]] ; then - einfo "Creating the data directory ..." - 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 - mv "${DATA_DIR%/}"/*.conf "${PGDATA}" - - 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 by" - einfo "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 - einfo "To start the server:" - einfo " pg_ctl start -D ${DATA_DIR} -o '-D ${PGDATA} --data-directory=${DATA_DIR}'" - einfo - 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() { - einfo ">>> Test phase [check]: ${CATEGORY}/${PF}" - - if [[ ${UID} != 0 ]] ; then - emake check || die "Make check failed. See above for details." - - 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 - ewarn "Tests cannot be run as root. Skipping." - ewarn "HINT: FEATURES=\"userpriv\"" - fi -} diff --git a/dev-db/postgresql-server/postgresql-server-8.4.12.ebuild b/dev-db/postgresql-server/postgresql-server-8.4.12.ebuild deleted file mode 100644 index a89787c1831e..000000000000 --- a/dev-db/postgresql-server/postgresql-server-8.4.12.ebuild +++ /dev/null @@ -1,348 +0,0 @@ -# Copyright 1999-2012 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-db/postgresql-server/postgresql-server-8.4.12.ebuild,v 1.8 2012/07/28 12:34:49 titanofold Exp $ - -EAPI="4" -PYTHON_DEPEND="python? 2" - -WANT_AUTOMAKE="none" -inherit autotools eutils multilib pam prefix python user versionator - -SLOT="$(get_version_component_range 1-2)" - -KEYWORDS="alpha amd64 arm hppa ia64 ~mips ~ppc ppc64 s390 sh sparc x86 ~x86-fbsd" - -DESCRIPTION="PostgreSQL server" -HOMEPAGE="http://www.postgresql.org/" -SRC_URI="mirror://postgresql/source/v${PV}/postgresql-${PV}.tar.bz2 - http://dev.gentoo.org/~titanofold/postgresql-patches-8.4-r2.tbz2 - http://dev.gentoo.org/~titanofold/postgresql-initscript-2.1.tbz2" -LICENSE="POSTGRESQL GPL-2" - -S="${WORKDIR}/postgresql-${PV}" - -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" -IUSE="doc kernel_linux nls pam perl -pg_legacytimestamp python selinux tcl uuid xml" - -for lingua in ${LINGUAS} ; do - IUSE+=" linguas_${lingua}" -done - -wanted_languages() { - local enable_langs - - for lingua in ${LINGUAS} ; do - use linguas_${lingua} && enable_langs+="${lingua} " - done - - echo -n ${enable_langs} -} - -RDEPEND="~dev-db/postgresql-base-${PV}:${SLOT}[pam?,pg_legacytimestamp=,nls=] - perl? ( >=dev-lang/perl-5.8 ) - selinux? ( sec-policy/selinux-postgresql ) - tcl? ( >=dev-lang/tcl-8 ) - uuid? ( dev-libs/ossp-uuid ) - xml? ( dev-libs/libxml2 dev-libs/libxslt )" - -DEPEND="${RDEPEND} - sys-devel/flex - xml? ( virtual/pkgconfig )" - -PDEPEND="doc? ( ~dev-db/postgresql-docs-${PV} )" - -# Support /var/run or /run for the socket directory -[[ ! -d /run ]] && RUNDIR=/var - -pkg_setup() { - enewgroup postgres 70 - enewuser postgres 70 /bin/bash /var/lib/postgresql postgres - - use python && python_set_active_version 2 -} - -src_prepare() { - epatch "${WORKDIR}/autoconf.patch" \ - "${WORKDIR}/bool.patch" \ - "${WORKDIR}/darwin.patch" \ - "${WORKDIR}/ldflags.patch" \ - "${WORKDIR}/pg_ctl-exit-status.patch" \ - "${WORKDIR}/server.patch" \ - "${WORKDIR}/SuperH.patch" - - eprefixify src/include/pg_config_manual.h - - if use test ; then - epatch "${WORKDIR}/regress.patch" - sed -e "s|@SOCKETDIR@|${T}|g" -i src/test/regress/pg_regress{,_main}.c - sed -e "s|/no/such/location|${S}/src/test/regress/tmp_check/no/such/location|g" \ - -i src/test/regress/{input,output}/tablespace.source - else - echo "all install:" > "${S}/src/test/regress/GNUmakefile" - fi - - sed -e "s|@RUNDIR@|${RUNDIR}|g" \ - -i src/include/pg_config_manual.h "${WORKDIR}/postgresql.init" || \ - die "RUNDIR sed failed" - sed -e "s|@SLOT@|${SLOT}|g" \ - -i "${WORKDIR}/postgresql.init" "${WORKDIR}/postgresql.confd" || \ - die "SLOT sed failed" - - eautoconf -} - -src_configure() { - # eval is needed to get along with pg_config quotation of space-rich entities. - eval econf "$(${EPREFIX%/}/usr/$(get_libdir)/postgresql-${SLOT}/bin/pg_config --configure)" \ - --with-includes="${EPREFIX%/}/usr/include/postgresql-${SLOT}/" \ - --with-libraries="${EPREFIX%/}/usr/$(get_libdir)/postgresql-${SLOT}/$(get_libdir)" \ - --with-system-tzdata="${EPREFIX%/}/usr/share/zoneinfo" \ - $(use_with perl) \ - $(use_with python) \ - $(use_with tcl) \ - $(use_with xml libxml) \ - $(use_with xml libxslt) \ - $(use_with uuid ossp-uuid) \ - "$(has_version ~dev-db/postgresql-base-${PV}[nls] && use_enable nls nls "$(wanted_languages)")" -} - -src_compile() { - local bd - for bd in . contrib $(use xml && echo contrib/xml2) ; do - PATH="${EROOT%/}/usr/$(get_libdir)/postgresql-${SLOT}/bin:${PATH}" \ - emake -C $bd -j1 || die "emake in $bd failed" - done -} - -src_install() { - if use perl ; then - mv -f "${S}/src/pl/plperl/GNUmakefile" \ - "${S}/src/pl/plperl/GNUmakefile_orig" - sed -e "s:\$(DESTDIR)\$(plperl_installdir):\$(plperl_installdir):" \ - "${S}/src/pl/plperl/GNUmakefile_orig" \ - > "${S}/src/pl/plperl/GNUmakefile" - fi - - local bd - for bd in . contrib $(use xml && echo contrib/xml2) ; do - PATH="${EROOT%/}/usr/$(get_libdir)/postgresql-${SLOT}/bin:${PATH}" \ - emake install -C $bd -j1 DESTDIR="${D}" \ - || die "emake install in $bd failed" - done - - rm -r "${ED}/usr/share/postgresql-${SLOT}/man/man7/" \ - "${ED}/usr/share/doc/postgresql-${SLOT}/html" - rm "${ED}"/usr/share/postgresql-${SLOT}/man/man1/{clusterdb,create{db,lang,user},drop{db,lang,user},ecpg,pg_{config,dump,dumpall,restore},psql,reindexdb,vacuumdb}.1 - - dodoc README HISTORY doc/{README.*,TODO,bug.template} - - dodir /etc/eselect/postgresql/slots/${SLOT} - echo "postgres_ebuilds=\"\${postgres_ebuilds} ${PF}\"" \ - > "${ED}/etc/eselect/postgresql/slots/${SLOT}/server" - - newconfd "${WORKDIR}"/postgresql.confd postgresql-${SLOT} \ - || die "Inserting conf.d file failed" - - newinitd "${WORKDIR}"/postgresql.init postgresql-${SLOT} \ - || die "Inserting init.d file failed" - - use pam && pamd_mimic system-auth postgresql auth account session - - if use prefix ; then - keepdir ${RUNDIR}/run/postgresql - fperms 0770 ${RUNDIR}/run/postgresql - fi -} - -pkg_postinst() { - postgresql-config update - - elog "The time stamp format is 64 bit integers now. If you upgrade from older" - elog "databases, this may force you to either do a dump and reload of enable" - elog "pg_legacytimestamp until you find time to do so. If the database can't start" - elog "please try enabling pg_legacytimestamp and rebuild." - elog - elog "Gentoo specific documentation:" - elog "http://www.gentoo.org/doc/en/postgres-howto.xml" - 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%/}${RUNDIR}/run/postgresql/" - elog - elog "If you have users and/or services that you would like to utilize the" - elog "socket, you must add them to the 'postgres' system group:" - elog " usermod -a -G postgres <user>" - 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}" -} - -pkg_postrm() { - postgresql-config update -} - -pkg_config() { - [[ -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 - - [[ -z ${PG_MAX_CONNECTIONS} ]] && PG_MAX_CONNECTIONS=128 - einfo "Checking system parameters..." - - if ! use kernel_linux ; then - einfo "Skipped." - einfo " Tests not supported on this OS (yet)" - else - if [[ -z ${SKIP_SYSTEM_TESTS} ]] ; then - einfo "Checking whether your system supports at least ${PG_MAX_CONNECTIONS} connections..." - - local SEMMSL=$(sysctl -n kernel.sem | cut -f1) - local SEMMNS=$(sysctl -n kernel.sem | cut -f2) - local SEMMNI=$(sysctl -n kernel.sem | cut -f4) - local SHMMAX=$(sysctl -n kernel.shmmax) - - local SEMMSL_MIN=17 - local SEMMNS_MIN=$(( ( ${PG_MAX_CONNECTIONS}/16 ) * 17 )) - local SEMMNI_MIN=$(( ( ${PG_MAX_CONNECTIONS}+15 ) / 16 )) - local SHMMAX_MIN=$(( 500000 + ( 30600 * ${PG_MAX_CONNECTIONS} ) )) - - for p in SEMMSL SEMMNS SEMMNI SHMMAX ; do - if [[ $(eval echo \$$p) -lt $(eval echo \$${p}_MIN) ]] ; then - eerror "The value for ${p} $(eval echo \$$p) is below the recommended value $(eval echo \$${p}_MIN)" - eerror "You have now several options:" - eerror " - Change the mentioned system parameter" - eerror " - Lower the number of max.connections by setting PG_MAX_CONNECTIONS to a" - eerror " value lower than ${PG_MAX_CONNECTIONS}" - eerror " - Set SKIP_SYSTEM_TESTS in case you want to ignore this test completely" - eerror "More information can be found here:" - eerror " http://www.postgresql.org/docs/${SLOT}/static/kernel-resources.html" - die "System test failed." - fi - done - einfo "Passed." - else - ewarn "SKIP_SYSTEM_TESTS set, so skipping." - fi - fi - - if [[ ${EUID} == 0 ]] ; then - einfo "Creating the data directory ..." - 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 - mv "${DATA_DIR%/}"/*.conf "${PGDATA}" - - 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 by" - einfo "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 - einfo "To start the server:" - einfo " pg_ctl start -D ${DATA_DIR} -o '-D ${PGDATA} --data-directory=${DATA_DIR}'" - einfo - 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() { - einfo ">>> Test phase [check]: ${CATEGORY}/${PF}" - - if [[ ${UID} != 0 ]] ; then - emake check || die "Make check failed. See above for details." - - 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 - ewarn "Tests cannot be run as root. Skipping." - ewarn "HINT: FEATURES=\"userpriv\"" - fi -} diff --git a/dev-db/postgresql-server/postgresql-server-9.0.7.ebuild b/dev-db/postgresql-server/postgresql-server-9.0.7.ebuild deleted file mode 100644 index edeccb8a793f..000000000000 --- a/dev-db/postgresql-server/postgresql-server-9.0.7.ebuild +++ /dev/null @@ -1,342 +0,0 @@ -# Copyright 1999-2012 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-db/postgresql-server/postgresql-server-9.0.7.ebuild,v 1.12 2012/07/28 12:34:49 titanofold Exp $ - -EAPI="4" -PYTHON_DEPEND="python? 2" - -WANT_AUTOMAKE="none" -inherit autotools eutils multilib pam prefix python user versionator - -SLOT="$(get_version_component_range 1-2)" - -KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 s390 sh sparc x86 ~x86-fbsd ~ppc-macos ~x86-solaris" - -DESCRIPTION="PostgreSQL server" -HOMEPAGE="http://www.postgresql.org/" -SRC_URI="mirror://postgresql/source/v${PV}/postgresql-${PV}.tar.bz2 - http://dev.gentoo.org/~titanofold/postgresql-patches-9.0-r3.tbz2 - http://dev.gentoo.org/~titanofold/postgresql-initscript-2.1.tbz2" -LICENSE="POSTGRESQL GPL-2" - -S="${WORKDIR}/postgresql-${PV}" - -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" -IUSE="doc kernel_linux nls pam perl -pg_legacytimestamp python selinux tcl uuid xml" - -for lingua in ${LINGUAS}; do - IUSE+=" linguas_${lingua}" -done - -wanted_languages() { - local enable_langs - - for lingua in ${LINGUAS} ; do - use linguas_${lingua} && enable_langs+="${lingua} " - done - - echo -n ${enable_langs} -} - -RDEPEND="~dev-db/postgresql-base-${PV}:${SLOT}[pam?,pg_legacytimestamp=,nls=] - perl? ( >=dev-lang/perl-5.8 ) - selinux? ( sec-policy/selinux-postgresql ) - tcl? ( >=dev-lang/tcl-8 ) - uuid? ( dev-libs/ossp-uuid ) - xml? ( dev-libs/libxml2 dev-libs/libxslt )" - -DEPEND="${RDEPEND} - sys-devel/flex - xml? ( virtual/pkgconfig )" - -PDEPEND="doc? ( ~dev-db/postgresql-docs-${PV} )" - -# Support /var/run or /run for the socket directory -[[ ! -d /run ]] && RUNDIR=/var - -pkg_setup() { - enewgroup postgres 70 - enewuser postgres 70 /bin/bash /var/lib/postgresql postgres - - use python && python_set_active_version 2 -} - -src_prepare() { - epatch "${WORKDIR}/autoconf.patch" \ - "${WORKDIR}/bool.patch" \ - "${WORKDIR}/pg_ctl-exit-status.patch" \ - "${WORKDIR}/server.patch" - - eprefixify src/include/pg_config_manual.h - - if use test ; then - epatch "${WORKDIR}/regress.patch" - sed -e "s|@SOCKETDIR@|${T}|g" -i src/test/regress/pg_regress{,_main}.c - sed -e "s|/no/such/location|${S}/src/test/regress/tmp_check/no/such/location|g" \ - -i src/test/regress/{input,output}/tablespace.source - else - echo "all install:" > "${S}/src/test/regress/GNUmakefile" - fi - - sed -e "s|@RUNDIR@|${RUNDIR}|g" \ - -i src/include/pg_config_manual.h "${WORKDIR}/postgresql.init" || \ - die "RUNDIR sed failed" - sed -e "s|@SLOT@|${SLOT}|g" \ - -i "${WORKDIR}/postgresql.init" "${WORKDIR}/postgresql.confd" || \ - die "SLOT sed failed" - - eautoconf -} - -src_configure() { - # eval is needed to get along with pg_config quotation of space-rich entities. - eval econf "$(${EPREFIX%/}/usr/$(get_libdir)/postgresql-${SLOT}/bin/pg_config --configure)" \ - --with-includes="${EPREFIX%/}/usr/include/postgresql-${SLOT}/" \ - --with-libraries="${EPREFIX%/}/usr/$(get_libdir)/postgresql-${SLOT}/$(get_libdir)" \ - --with-system-tzdata="${EPREFIX%/}/usr/share/zoneinfo" \ - $(use_with perl) \ - $(use_with python) \ - $(use_with tcl) \ - $(use_with xml libxml) \ - $(use_with xml libxslt) \ - $(use_with uuid ossp-uuid) \ - "$(use_enable nls nls "$(wanted_languages)")" -} - -src_compile() { - local bd - for bd in . contrib $(use xml && echo contrib/xml2); do - PATH="${EROOT%/}/usr/$(get_libdir)/postgresql-${SLOT}/bin:${PATH}" \ - emake -C $bd -j1 || die "emake in $bd failed" - done -} - -src_install() { - if use perl ; then - mv -f "${S}/src/pl/plperl/GNUmakefile" "${S}/src/pl/plperl/GNUmakefile_orig" - sed -e "s:\$(DESTDIR)\$(plperl_installdir):\$(plperl_installdir):" \ - "${S}/src/pl/plperl/GNUmakefile_orig" > "${S}/src/pl/plperl/GNUmakefile" - fi - - local bd - for bd in . contrib $(use xml && echo contrib/xml2) ; do - PATH="${EROOT%/}/usr/$(get_libdir)/postgresql-${SLOT}/bin:${PATH}" \ - emake install -C $bd -j1 DESTDIR="${D}" || die "emake install in $bd failed" - done - - dodir /usr/share/postgresql-${SLOT}/man/man1/ - cp "${S}"/doc/src/sgml/man1/{initdb,pg_controldata,pg_ctl,pg_resetxlog,post{gres,master}}.1 \ - "${ED}"/usr/share/postgresql-${SLOT}/man/man1/ || die - - dodoc README HISTORY doc/{README.*,TODO,bug.template} - - dodir /etc/eselect/postgresql/slots/${SLOT} - echo "postgres_ebuilds=\"\${postgres_ebuilds} ${PF}\"" \ - > "${ED}/etc/eselect/postgresql/slots/${SLOT}/server" - - newconfd "${WORKDIR}/postgresql.confd" postgresql-${SLOT} \ - || die "Inserting conf.d file failed" - - newinitd "${WORKDIR}/postgresql.init" postgresql-${SLOT} \ - || die "Inserting init.d file failed" - - use pam && pamd_mimic system-auth postgresql auth account session - - if use prefix ; then - keepdir ${RUNDIR}/run/postgresql - fperms 0770 ${RUNDIR}/run/postgresql - fi -} - -pkg_postinst() { - postgresql-config update - - elog "Gentoo specific documentation:" - elog "http://www.gentoo.org/doc/en/postgres-howto.xml" - 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%/}${RUNDIR}/run/postgresql/" - elog - elog "If you have users and/or services that you would like to utilize the" - elog "socket, you must add them to the 'postgres' system group:" - elog " usermod -a -G postgres <user>" - 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}" -} - -pkg_postrm() { - postgresql-config update -} - -pkg_config() { - [[ -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 - - [[ -z ${PG_MAX_CONNECTIONS} ]] && PG_MAX_CONNECTIONS=128 - einfo "Checking system parameters..." - - if ! use kernel_linux ; then - einfo "Skipped." - einfo " Tests not supported on this OS (yet)" - else - if [[ -z ${SKIP_SYSTEM_TESTS} ]] ; then - einfo "Checking whether your system supports at least ${PG_MAX_CONNECTIONS} connections..." - - local SEMMSL=$(sysctl -n kernel.sem | cut -f1) - local SEMMNS=$(sysctl -n kernel.sem | cut -f2) - local SEMMNI=$(sysctl -n kernel.sem | cut -f4) - local SHMMAX=$(sysctl -n kernel.shmmax) - - local SEMMSL_MIN=17 - local SEMMNS_MIN=$(( ( ${PG_MAX_CONNECTIONS}/16 ) * 17 )) - local SEMMNI_MIN=$(( ( ${PG_MAX_CONNECTIONS}+15 ) / 16 )) - local SHMMAX_MIN=$(( 500000 + ( 30600 * ${PG_MAX_CONNECTIONS} ) )) - - for p in SEMMSL SEMMNS SEMMNI SHMMAX ; do - if [[ $(eval echo \$$p) -lt $(eval echo \$${p}_MIN) ]] ; then - eerror "The value for ${p} $(eval echo \$$p) is below the recommended value $(eval echo \$${p}_MIN)" - eerror "You have now several options:" - eerror " - Change the mentioned system parameter" - eerror " - Lower the number of max connections by setting PG_MAX_CONNECTIONS to a" - eerror " value lower than ${PG_MAX_CONNECTIONS}" - eerror " - Set SKIP_SYSTEM_TESTS in case you want to ignore this test completely" - eerror "More information can be found here:" - eerror " http://www.postgresql.org/docs/${SLOT}/static/kernel-resources.html" - die "System test failed." - fi - done - einfo "Passed." - else - ewarn "SKIP_SYSTEM_TESTS set, so skipping." - fi - fi - - if [[ ${EUID} == 0 ]] ; then - einfo "Creating the data directory ..." - 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}' -L '${EROOT%/}/usr/share/postgresql-${SLOT}/' ${PG_INITDB_OPTS}" - else - "${EROOT%/}"/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb \ - -U postgres -D "${DATA_DIR}" \ - -L "${EROOT%/}/usr/share/postgresql-${SLOT}/" ${PG_INITDB_OPTS} - fi - - mv "${DATA_DIR%/}"/*.conf "${PGDATA}" - - 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 - einfo "To start the server:" - einfo " pg_ctl start -D ${DATA_DIR} -o '-D ${PGDATA} --data-directory=${DATA_DIR}'" - einfo - 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() { - einfo ">>> Test phase [check]: ${CATEGORY}/${PF}" - - if [[ ${UID} != 0 ]] ; then - emake check || die "Make check failed. See above for details." - - 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 - ewarn "Tests cannot be run as root. Skipping." - ewarn "HINT: FEATURES=\"userpriv\"" - fi -} diff --git a/dev-db/postgresql-server/postgresql-server-9.0.8-r1.ebuild b/dev-db/postgresql-server/postgresql-server-9.0.8-r1.ebuild deleted file mode 100644 index f3ee7ff10beb..000000000000 --- a/dev-db/postgresql-server/postgresql-server-9.0.8-r1.ebuild +++ /dev/null @@ -1,342 +0,0 @@ -# Copyright 1999-2012 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-db/postgresql-server/postgresql-server-9.0.8-r1.ebuild,v 1.2 2012/07/28 12:34:49 titanofold Exp $ - -EAPI="4" -PYTHON_DEPEND="python? 2" - -WANT_AUTOMAKE="none" -inherit autotools eutils multilib pam prefix python user versionator - -SLOT="$(get_version_component_range 1-2)" - -KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd ~ppc-macos ~x86-solaris" - -DESCRIPTION="PostgreSQL server" -HOMEPAGE="http://www.postgresql.org/" -SRC_URI="mirror://postgresql/source/v${PV}/postgresql-${PV}.tar.bz2 - http://dev.gentoo.org/~titanofold/postgresql-patches-9.0-r3.tbz2 - http://dev.gentoo.org/~titanofold/postgresql-initscript-2.1.1.tbz2" -LICENSE="POSTGRESQL GPL-2" - -S="${WORKDIR}/postgresql-${PV}" - -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" -IUSE="doc kernel_linux nls pam perl -pg_legacytimestamp python selinux tcl uuid xml" - -for lingua in ${LINGUAS}; do - IUSE+=" linguas_${lingua}" -done - -wanted_languages() { - local enable_langs - - for lingua in ${LINGUAS} ; do - use linguas_${lingua} && enable_langs+="${lingua} " - done - - echo -n ${enable_langs} -} - -RDEPEND="~dev-db/postgresql-base-${PV}:${SLOT}[pam?,pg_legacytimestamp=,nls=] - perl? ( >=dev-lang/perl-5.8 ) - selinux? ( sec-policy/selinux-postgresql ) - tcl? ( >=dev-lang/tcl-8 ) - uuid? ( dev-libs/ossp-uuid ) - xml? ( dev-libs/libxml2 dev-libs/libxslt )" - -DEPEND="${RDEPEND} - sys-devel/flex - xml? ( virtual/pkgconfig )" - -PDEPEND="doc? ( ~dev-db/postgresql-docs-${PV} )" - -# Support /var/run or /run for the socket directory -[[ ! -d /run ]] && RUNDIR=/var - -pkg_setup() { - enewgroup postgres 70 - enewuser postgres 70 /bin/bash /var/lib/postgresql postgres - - use python && python_set_active_version 2 -} - -src_prepare() { - epatch "${WORKDIR}/autoconf.patch" \ - "${WORKDIR}/bool.patch" \ - "${WORKDIR}/pg_ctl-exit-status.patch" \ - "${WORKDIR}/server.patch" - - eprefixify src/include/pg_config_manual.h - - if use test ; then - epatch "${WORKDIR}/regress.patch" - sed -e "s|@SOCKETDIR@|${T}|g" -i src/test/regress/pg_regress{,_main}.c - sed -e "s|/no/such/location|${S}/src/test/regress/tmp_check/no/such/location|g" \ - -i src/test/regress/{input,output}/tablespace.source - else - echo "all install:" > "${S}/src/test/regress/GNUmakefile" - fi - - sed -e "s|@RUNDIR@|${RUNDIR}|g" \ - -i src/include/pg_config_manual.h "${WORKDIR}/postgresql.init" || \ - die "RUNDIR sed failed" - sed -e "s|@SLOT@|${SLOT}|g" \ - -i "${WORKDIR}/postgresql.init" "${WORKDIR}/postgresql.confd" || \ - die "SLOT sed failed" - - eautoconf -} - -src_configure() { - # eval is needed to get along with pg_config quotation of space-rich entities. - eval econf "$(${EPREFIX%/}/usr/$(get_libdir)/postgresql-${SLOT}/bin/pg_config --configure)" \ - --with-includes="${EPREFIX%/}/usr/include/postgresql-${SLOT}/" \ - --with-libraries="${EPREFIX%/}/usr/$(get_libdir)/postgresql-${SLOT}/$(get_libdir)" \ - --with-system-tzdata="${EPREFIX%/}/usr/share/zoneinfo" \ - $(use_with perl) \ - $(use_with python) \ - $(use_with tcl) \ - $(use_with xml libxml) \ - $(use_with xml libxslt) \ - $(use_with uuid ossp-uuid) \ - "$(use_enable nls nls "$(wanted_languages)")" -} - -src_compile() { - local bd - for bd in . contrib $(use xml && echo contrib/xml2); do - PATH="${EROOT%/}/usr/$(get_libdir)/postgresql-${SLOT}/bin:${PATH}" \ - emake -C $bd -j1 || die "emake in $bd failed" - done -} - -src_install() { - if use perl ; then - mv -f "${S}/src/pl/plperl/GNUmakefile" "${S}/src/pl/plperl/GNUmakefile_orig" - sed -e "s:\$(DESTDIR)\$(plperl_installdir):\$(plperl_installdir):" \ - "${S}/src/pl/plperl/GNUmakefile_orig" > "${S}/src/pl/plperl/GNUmakefile" - fi - - local bd - for bd in . contrib $(use xml && echo contrib/xml2) ; do - PATH="${EROOT%/}/usr/$(get_libdir)/postgresql-${SLOT}/bin:${PATH}" \ - emake install -C $bd -j1 DESTDIR="${D}" || die "emake install in $bd failed" - done - - dodir /usr/share/postgresql-${SLOT}/man/man1/ - cp "${S}"/doc/src/sgml/man1/{initdb,pg_controldata,pg_ctl,pg_resetxlog,post{gres,master}}.1 \ - "${ED}"/usr/share/postgresql-${SLOT}/man/man1/ || die - - dodoc README HISTORY doc/{README.*,TODO,bug.template} - - dodir /etc/eselect/postgresql/slots/${SLOT} - echo "postgres_ebuilds=\"\${postgres_ebuilds} ${PF}\"" \ - > "${ED}/etc/eselect/postgresql/slots/${SLOT}/server" - - newconfd "${WORKDIR}/postgresql.confd" postgresql-${SLOT} \ - || die "Inserting conf.d file failed" - - newinitd "${WORKDIR}/postgresql.init" postgresql-${SLOT} \ - || die "Inserting init.d file failed" - - use pam && pamd_mimic system-auth postgresql auth account session - - if use prefix ; then - keepdir ${RUNDIR}/run/postgresql - fperms 0770 ${RUNDIR}/run/postgresql - fi -} - -pkg_postinst() { - postgresql-config update - - elog "Gentoo specific documentation:" - elog "http://www.gentoo.org/doc/en/postgres-howto.xml" - 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%/}${RUNDIR}/run/postgresql/" - elog - elog "If you have users and/or services that you would like to utilize the" - elog "socket, you must add them to the 'postgres' system group:" - elog " usermod -a -G postgres <user>" - 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}" -} - -pkg_postrm() { - postgresql-config update -} - -pkg_config() { - [[ -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 - - [[ -z ${PG_MAX_CONNECTIONS} ]] && PG_MAX_CONNECTIONS=128 - einfo "Checking system parameters..." - - if ! use kernel_linux ; then - einfo "Skipped." - einfo " Tests not supported on this OS (yet)" - else - if [[ -z ${SKIP_SYSTEM_TESTS} ]] ; then - einfo "Checking whether your system supports at least ${PG_MAX_CONNECTIONS} connections..." - - local SEMMSL=$(sysctl -n kernel.sem | cut -f1) - local SEMMNS=$(sysctl -n kernel.sem | cut -f2) - local SEMMNI=$(sysctl -n kernel.sem | cut -f4) - local SHMMAX=$(sysctl -n kernel.shmmax) - - local SEMMSL_MIN=17 - local SEMMNS_MIN=$(( ( ${PG_MAX_CONNECTIONS}/16 ) * 17 )) - local SEMMNI_MIN=$(( ( ${PG_MAX_CONNECTIONS}+15 ) / 16 )) - local SHMMAX_MIN=$(( 500000 + ( 30600 * ${PG_MAX_CONNECTIONS} ) )) - - for p in SEMMSL SEMMNS SEMMNI SHMMAX ; do - if [[ $(eval echo \$$p) -lt $(eval echo \$${p}_MIN) ]] ; then - eerror "The value for ${p} $(eval echo \$$p) is below the recommended value $(eval echo \$${p}_MIN)" - eerror "You have now several options:" - eerror " - Change the mentioned system parameter" - eerror " - Lower the number of max connections by setting PG_MAX_CONNECTIONS to a" - eerror " value lower than ${PG_MAX_CONNECTIONS}" - eerror " - Set SKIP_SYSTEM_TESTS in case you want to ignore this test completely" - eerror "More information can be found here:" - eerror " http://www.postgresql.org/docs/${SLOT}/static/kernel-resources.html" - die "System test failed." - fi - done - einfo "Passed." - else - ewarn "SKIP_SYSTEM_TESTS set, so skipping." - fi - fi - - if [[ ${EUID} == 0 ]] ; then - einfo "Creating the data directory ..." - 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}' -L '${EROOT%/}/usr/share/postgresql-${SLOT}/' ${PG_INITDB_OPTS}" - else - "${EROOT%/}"/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb \ - -U postgres -D "${DATA_DIR}" \ - -L "${EROOT%/}/usr/share/postgresql-${SLOT}/" ${PG_INITDB_OPTS} - fi - - mv "${DATA_DIR%/}"/*.conf "${PGDATA}" - - 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 - einfo "To start the server:" - einfo " pg_ctl start -D ${DATA_DIR} -o '-D ${PGDATA} --data-directory=${DATA_DIR}'" - einfo - 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() { - einfo ">>> Test phase [check]: ${CATEGORY}/${PF}" - - if [[ ${UID} != 0 ]] ; then - emake check || die "Make check failed. See above for details." - - 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 - ewarn "Tests cannot be run as root. Skipping." - ewarn "HINT: FEATURES=\"userpriv\"" - fi -} diff --git a/dev-db/postgresql-server/postgresql-server-9.0.8.ebuild b/dev-db/postgresql-server/postgresql-server-9.0.8.ebuild deleted file mode 100644 index ba2ab95d2ba3..000000000000 --- a/dev-db/postgresql-server/postgresql-server-9.0.8.ebuild +++ /dev/null @@ -1,342 +0,0 @@ -# Copyright 1999-2012 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-db/postgresql-server/postgresql-server-9.0.8.ebuild,v 1.7 2012/07/28 12:34:49 titanofold Exp $ - -EAPI="4" -PYTHON_DEPEND="python? 2" - -WANT_AUTOMAKE="none" -inherit autotools eutils multilib pam prefix python user versionator - -SLOT="$(get_version_component_range 1-2)" - -KEYWORDS="alpha amd64 arm hppa ia64 ~mips ~ppc ppc64 s390 sh sparc x86 ~x86-fbsd ~ppc-macos ~x86-solaris" - -DESCRIPTION="PostgreSQL server" -HOMEPAGE="http://www.postgresql.org/" -SRC_URI="mirror://postgresql/source/v${PV}/postgresql-${PV}.tar.bz2 - http://dev.gentoo.org/~titanofold/postgresql-patches-9.0-r3.tbz2 - http://dev.gentoo.org/~titanofold/postgresql-initscript-2.1.tbz2" -LICENSE="POSTGRESQL GPL-2" - -S="${WORKDIR}/postgresql-${PV}" - -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" -IUSE="doc kernel_linux nls pam perl -pg_legacytimestamp python selinux tcl uuid xml" - -for lingua in ${LINGUAS}; do - IUSE+=" linguas_${lingua}" -done - -wanted_languages() { - local enable_langs - - for lingua in ${LINGUAS} ; do - use linguas_${lingua} && enable_langs+="${lingua} " - done - - echo -n ${enable_langs} -} - -RDEPEND="~dev-db/postgresql-base-${PV}:${SLOT}[pam?,pg_legacytimestamp=,nls=] - perl? ( >=dev-lang/perl-5.8 ) - selinux? ( sec-policy/selinux-postgresql ) - tcl? ( >=dev-lang/tcl-8 ) - uuid? ( dev-libs/ossp-uuid ) - xml? ( dev-libs/libxml2 dev-libs/libxslt )" - -DEPEND="${RDEPEND} - sys-devel/flex - xml? ( virtual/pkgconfig )" - -PDEPEND="doc? ( ~dev-db/postgresql-docs-${PV} )" - -# Support /var/run or /run for the socket directory -[[ ! -d /run ]] && RUNDIR=/var - -pkg_setup() { - enewgroup postgres 70 - enewuser postgres 70 /bin/bash /var/lib/postgresql postgres - - use python && python_set_active_version 2 -} - -src_prepare() { - epatch "${WORKDIR}/autoconf.patch" \ - "${WORKDIR}/bool.patch" \ - "${WORKDIR}/pg_ctl-exit-status.patch" \ - "${WORKDIR}/server.patch" - - eprefixify src/include/pg_config_manual.h - - if use test ; then - epatch "${WORKDIR}/regress.patch" - sed -e "s|@SOCKETDIR@|${T}|g" -i src/test/regress/pg_regress{,_main}.c - sed -e "s|/no/such/location|${S}/src/test/regress/tmp_check/no/such/location|g" \ - -i src/test/regress/{input,output}/tablespace.source - else - echo "all install:" > "${S}/src/test/regress/GNUmakefile" - fi - - sed -e "s|@RUNDIR@|${RUNDIR}|g" \ - -i src/include/pg_config_manual.h "${WORKDIR}/postgresql.init" || \ - die "RUNDIR sed failed" - sed -e "s|@SLOT@|${SLOT}|g" \ - -i "${WORKDIR}/postgresql.init" "${WORKDIR}/postgresql.confd" || \ - die "SLOT sed failed" - - eautoconf -} - -src_configure() { - # eval is needed to get along with pg_config quotation of space-rich entities. - eval econf "$(${EPREFIX%/}/usr/$(get_libdir)/postgresql-${SLOT}/bin/pg_config --configure)" \ - --with-includes="${EPREFIX%/}/usr/include/postgresql-${SLOT}/" \ - --with-libraries="${EPREFIX%/}/usr/$(get_libdir)/postgresql-${SLOT}/$(get_libdir)" \ - --with-system-tzdata="${EPREFIX%/}/usr/share/zoneinfo" \ - $(use_with perl) \ - $(use_with python) \ - $(use_with tcl) \ - $(use_with xml libxml) \ - $(use_with xml libxslt) \ - $(use_with uuid ossp-uuid) \ - "$(use_enable nls nls "$(wanted_languages)")" -} - -src_compile() { - local bd - for bd in . contrib $(use xml && echo contrib/xml2); do - PATH="${EROOT%/}/usr/$(get_libdir)/postgresql-${SLOT}/bin:${PATH}" \ - emake -C $bd -j1 || die "emake in $bd failed" - done -} - -src_install() { - if use perl ; then - mv -f "${S}/src/pl/plperl/GNUmakefile" "${S}/src/pl/plperl/GNUmakefile_orig" - sed -e "s:\$(DESTDIR)\$(plperl_installdir):\$(plperl_installdir):" \ - "${S}/src/pl/plperl/GNUmakefile_orig" > "${S}/src/pl/plperl/GNUmakefile" - fi - - local bd - for bd in . contrib $(use xml && echo contrib/xml2) ; do - PATH="${EROOT%/}/usr/$(get_libdir)/postgresql-${SLOT}/bin:${PATH}" \ - emake install -C $bd -j1 DESTDIR="${D}" || die "emake install in $bd failed" - done - - dodir /usr/share/postgresql-${SLOT}/man/man1/ - cp "${S}"/doc/src/sgml/man1/{initdb,pg_controldata,pg_ctl,pg_resetxlog,post{gres,master}}.1 \ - "${ED}"/usr/share/postgresql-${SLOT}/man/man1/ || die - - dodoc README HISTORY doc/{README.*,TODO,bug.template} - - dodir /etc/eselect/postgresql/slots/${SLOT} - echo "postgres_ebuilds=\"\${postgres_ebuilds} ${PF}\"" \ - > "${ED}/etc/eselect/postgresql/slots/${SLOT}/server" - - newconfd "${WORKDIR}/postgresql.confd" postgresql-${SLOT} \ - || die "Inserting conf.d file failed" - - newinitd "${WORKDIR}/postgresql.init" postgresql-${SLOT} \ - || die "Inserting init.d file failed" - - use pam && pamd_mimic system-auth postgresql auth account session - - if use prefix ; then - keepdir ${RUNDIR}/run/postgresql - fperms 0770 ${RUNDIR}/run/postgresql - fi -} - -pkg_postinst() { - postgresql-config update - - elog "Gentoo specific documentation:" - elog "http://www.gentoo.org/doc/en/postgres-howto.xml" - 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%/}${RUNDIR}/run/postgresql/" - elog - elog "If you have users and/or services that you would like to utilize the" - elog "socket, you must add them to the 'postgres' system group:" - elog " usermod -a -G postgres <user>" - 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}" -} - -pkg_postrm() { - postgresql-config update -} - -pkg_config() { - [[ -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 - - [[ -z ${PG_MAX_CONNECTIONS} ]] && PG_MAX_CONNECTIONS=128 - einfo "Checking system parameters..." - - if ! use kernel_linux ; then - einfo "Skipped." - einfo " Tests not supported on this OS (yet)" - else - if [[ -z ${SKIP_SYSTEM_TESTS} ]] ; then - einfo "Checking whether your system supports at least ${PG_MAX_CONNECTIONS} connections..." - - local SEMMSL=$(sysctl -n kernel.sem | cut -f1) - local SEMMNS=$(sysctl -n kernel.sem | cut -f2) - local SEMMNI=$(sysctl -n kernel.sem | cut -f4) - local SHMMAX=$(sysctl -n kernel.shmmax) - - local SEMMSL_MIN=17 - local SEMMNS_MIN=$(( ( ${PG_MAX_CONNECTIONS}/16 ) * 17 )) - local SEMMNI_MIN=$(( ( ${PG_MAX_CONNECTIONS}+15 ) / 16 )) - local SHMMAX_MIN=$(( 500000 + ( 30600 * ${PG_MAX_CONNECTIONS} ) )) - - for p in SEMMSL SEMMNS SEMMNI SHMMAX ; do - if [[ $(eval echo \$$p) -lt $(eval echo \$${p}_MIN) ]] ; then - eerror "The value for ${p} $(eval echo \$$p) is below the recommended value $(eval echo \$${p}_MIN)" - eerror "You have now several options:" - eerror " - Change the mentioned system parameter" - eerror " - Lower the number of max connections by setting PG_MAX_CONNECTIONS to a" - eerror " value lower than ${PG_MAX_CONNECTIONS}" - eerror " - Set SKIP_SYSTEM_TESTS in case you want to ignore this test completely" - eerror "More information can be found here:" - eerror " http://www.postgresql.org/docs/${SLOT}/static/kernel-resources.html" - die "System test failed." - fi - done - einfo "Passed." - else - ewarn "SKIP_SYSTEM_TESTS set, so skipping." - fi - fi - - if [[ ${EUID} == 0 ]] ; then - einfo "Creating the data directory ..." - 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}' -L '${EROOT%/}/usr/share/postgresql-${SLOT}/' ${PG_INITDB_OPTS}" - else - "${EROOT%/}"/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb \ - -U postgres -D "${DATA_DIR}" \ - -L "${EROOT%/}/usr/share/postgresql-${SLOT}/" ${PG_INITDB_OPTS} - fi - - mv "${DATA_DIR%/}"/*.conf "${PGDATA}" - - 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 - einfo "To start the server:" - einfo " pg_ctl start -D ${DATA_DIR} -o '-D ${PGDATA} --data-directory=${DATA_DIR}'" - einfo - 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() { - einfo ">>> Test phase [check]: ${CATEGORY}/${PF}" - - if [[ ${UID} != 0 ]] ; then - emake check || die "Make check failed. See above for details." - - 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 - ewarn "Tests cannot be run as root. Skipping." - ewarn "HINT: FEATURES=\"userpriv\"" - fi -} diff --git a/dev-db/postgresql-server/postgresql-server-9.1.3.ebuild b/dev-db/postgresql-server/postgresql-server-9.1.3.ebuild deleted file mode 100644 index 54d29aa54a07..000000000000 --- a/dev-db/postgresql-server/postgresql-server-9.1.3.ebuild +++ /dev/null @@ -1,348 +0,0 @@ -# Copyright 1999-2012 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-db/postgresql-server/postgresql-server-9.1.3.ebuild,v 1.13 2012/07/28 12:34:49 titanofold Exp $ - -EAPI="4" -PYTHON_DEPEND="python? 2" - -WANT_AUTOMAKE="none" -inherit autotools eutils flag-o-matic multilib pam prefix python 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)" -S="${WORKDIR}/postgresql-${PV}" - -DESCRIPTION="PostgreSQL server" -HOMEPAGE="http://www.postgresql.org/" -SRC_URI="mirror://postgresql/source/v${PV}/postgresql-${PV}.tar.bz2 - http://dev.gentoo.org/~titanofold/postgresql-patches-9.1-r1.tbz2 - http://dev.gentoo.org/~titanofold/postgresql-initscript-2.1.tbz2" -LICENSE="POSTGRESQL GPL-2" - -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" -IUSE="doc kernel_linux nls pam perl -pg_legacytimestamp python selinux tcl uuid xml" - -for lingua in ${LINGUAS}; do - IUSE+=" linguas_${lingua}" -done - -wanted_languages() { - local enable_langs - - for lingua in ${LINGUAS} ; do - use linguas_${lingua} && enable_langs+="${lingua} " - done - - echo -n ${enable_langs} -} - -RDEPEND="~dev-db/postgresql-base-${PV}:${SLOT}[pam?,pg_legacytimestamp=,nls=] - perl? ( >=dev-lang/perl-5.8 ) - selinux? ( sec-policy/selinux-postgresql ) - tcl? ( >=dev-lang/tcl-8 ) - uuid? ( dev-libs/ossp-uuid ) - xml? ( dev-libs/libxml2 dev-libs/libxslt )" -DEPEND="${RDEPEND} - sys-devel/flex - xml? ( virtual/pkgconfig )" -PDEPEND="doc? ( ~dev-db/postgresql-docs-${PV} )" - -# Support /var/run or /run for the socket directory -[[ ! -d /run ]] && RUNDIR=/var - -pkg_setup() { - enewgroup postgres 70 - enewuser postgres 70 /bin/bash /var/lib/postgresql postgres - - use python && python_set_active_version 2 -} - -src_prepare() { - epatch "${WORKDIR}/autoconf.patch" \ - "${WORKDIR}/bool.patch" \ - "${WORKDIR}/pg_ctl-exit-status.patch" \ - "${WORKDIR}/server.patch" - - eprefixify src/include/pg_config_manual.h - - if use test ; then - epatch "${WORKDIR}/regress.patch" - sed -e "s|@SOCKETDIR@|${T}|g" -i src/test/regress/pg_regress{,_main}.c - sed -e "s|/no/such/location|${S}/src/test/regress/tmp_check/no/such/location|g" \ - -i src/test/regress/{input,output}/tablespace.source - else - echo "all install:" > "${S}/src/test/regress/GNUmakefile" - fi - - sed -e "s|@RUNDIR@|${RUNDIR}|g" \ - -i src/include/pg_config_manual.h "${WORKDIR}/postgresql.init" || \ - die "RUNDIR sed failed" - sed -e "s|@SLOT@|${SLOT}|g" \ - -i "${WORKDIR}/postgresql.init" "${WORKDIR}/postgresql.confd" || \ - die "SLOT sed failed" - - eautoconf -} - -src_configure() { - case ${CHOST} in - *-darwin*|*-solaris*) - use nls && append-libs intl - ;; - esac - - local PO="${EPREFIX%/}" - - # eval is needed to get along with pg_config quotation of space-rich entities. - eval econf "$(${PO}/usr/$(get_libdir)/postgresql-${SLOT}/bin/pg_config --configure)" \ - $(use_with perl) \ - $(use_with python) \ - $(use_with tcl) \ - $(use_with xml libxml) \ - $(use_with xml libxslt) \ - $(use_with uuid ossp-uuid) \ - --with-system-tzdata="${PO}/usr/share/zoneinfo" \ - --with-includes="${PO}/usr/include/postgresql-${SLOT}/" \ - --with-libraries="${PO}/usr/$(get_libdir)/postgresql-${SLOT}/$(get_libdir)" \ - "$(use_enable nls nls "$(wanted_languages)")" -} - -src_compile() { - local bd - for bd in . contrib $(use xml && echo contrib/xml2); do - PATH="${EROOT%/}/usr/$(get_libdir)/postgresql-${SLOT}/bin:${PATH}" \ - emake -C $bd || die "emake in $bd failed" - done -} - -src_install() { - if use perl ; then - mv -f "${S}/src/pl/plperl/GNUmakefile" "${S}/src/pl/plperl/GNUmakefile_orig" - sed -e "s:\$(DESTDIR)\$(plperl_installdir):\$(plperl_installdir):" \ - "${S}/src/pl/plperl/GNUmakefile_orig" > "${S}/src/pl/plperl/GNUmakefile" - fi - - local bd - for bd in . contrib $(use xml && echo contrib/xml2) ; do - PATH="${EROOT%/}/usr/$(get_libdir)/postgresql-${SLOT}/bin:${PATH}" \ - emake install -C $bd DESTDIR="${D}" || die "emake install in $bd failed" - done - - dodoc README HISTORY doc/{TODO,bug.template} - - dodir /etc/eselect/postgresql/slots/${SLOT} - echo "postgres_ebuilds=\"\${postgres_ebuilds} ${PF}\"" > \ - "${ED}/etc/eselect/postgresql/slots/${SLOT}/server" - - newconfd "${WORKDIR}/postgresql.confd" postgresql-${SLOT} || \ - die "Inserting conf failed" - newinitd "${WORKDIR}/postgresql.init" postgresql-${SLOT} || \ - die "Inserting conf failed" - - use pam && pamd_mimic system-auth postgresql auth account session - - if use prefix ; then - keepdir ${RUNDIR}/run/postgresql - fperms 0770 ${RUNDIR}/run/postgresql - fi -} - -pkg_postinst() { - postgresql-config update - - elog "Gentoo specific documentation:" - elog "http://www.gentoo.org/doc/en/postgres-howto.xml" - 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%/}${RUNDIR}/run/postgresql/" - elog - elog "If you have users and/or services that you would like to utilize the" - elog "socket, you must add them to the 'postgres' system group:" - elog " usermod -a -G postgres <user>" - 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}" -} - -pkg_prerm() { - if [[ -z ${REPLACED_BY_VERSION} ]] ; then - ewarn "Have you dumped and/or migrated the ${SLOT} database cluster?" - ewarn "\thttp://www.gentoo.org/doc/en/postgres-howto.xml#doc_chap5" - - ebegin "Resuming removal 10 seconds. Control-C to cancel" - sleep 10 - eend 0 - fi -} - -pkg_postrm() { - postgresql-config update -} - -pkg_config() { - [[ -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 - - [ -z "${PG_MAX_CONNECTIONS}" ] && PG_MAX_CONNECTIONS="128" - einfo "Checking system parameters..." - - if ! use kernel_linux ; then - einfo "Skipped." - einfo " Tests not supported on this OS (yet)" - else - if [ -z ${SKIP_SYSTEM_TESTS} ] ; then - einfo "Checking whether your system supports at least ${PG_MAX_CONNECTIONS} connections..." - - local SEMMSL=$(sysctl -n kernel.sem | cut -f1) - local SEMMNS=$(sysctl -n kernel.sem | cut -f2) - local SEMMNI=$(sysctl -n kernel.sem | cut -f4) - local SHMMAX=$(sysctl -n kernel.shmmax) - - local SEMMSL_MIN=17 - local SEMMNS_MIN=$(( ( ${PG_MAX_CONNECTIONS}/16 ) * 17 )) - local SEMMNI_MIN=$(( ( ${PG_MAX_CONNECTIONS}+15 ) / 16 )) - local SHMMAX_MIN=$(( 500000 + ( 30600 * ${PG_MAX_CONNECTIONS} ) )) - - for p in SEMMSL SEMMNS SEMMNI SHMMAX ; do - if [ $(eval echo \$$p) -lt $(eval echo \$${p}_MIN) ] ; then - eerror "The value for ${p} $(eval echo \$$p) is below the recommended value $(eval echo \$${p}_MIN)" - eerror "You have now several options:" - eerror " - Change the mentioned system parameter" - eerror " - Lower the number of max.connections by setting PG_MAX_CONNECTIONS to a" - eerror " value lower than ${PG_MAX_CONNECTIONS}" - eerror " - Set SKIP_SYSTEM_TESTS in case you want to ignore this test completely" - eerror "More information can be found here:" - eerror " http://www.postgresql.org/docs/${SLOT}/static/kernel-resources.html" - die "System test failed." - fi - done - einfo "Passed." - else - ewarn "SKIP_SYSTEM_TESTS set, so skipping." - fi - 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 - - mv "${DATA_DIR%/}"/*.conf "${PGDATA}" - - 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() { - einfo ">>> Test phase [check]: ${CATEGORY}/${PF}" - - if [ ${UID} -ne 0 ] ; then - emake -j1 check || die "Make check failed. See above for details." - - 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 - ewarn "Tests cannot be run as root. Skipping." - ewarn "HINT: FEATURES=\"userpriv\"" - fi -} diff --git a/dev-db/postgresql-server/postgresql-server-9.1.4-r1.ebuild b/dev-db/postgresql-server/postgresql-server-9.1.4-r1.ebuild deleted file mode 100644 index 4a4b2a1aaf97..000000000000 --- a/dev-db/postgresql-server/postgresql-server-9.1.4-r1.ebuild +++ /dev/null @@ -1,348 +0,0 @@ -# Copyright 1999-2012 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-db/postgresql-server/postgresql-server-9.1.4-r1.ebuild,v 1.2 2012/07/28 12:34:49 titanofold Exp $ - -EAPI="4" -PYTHON_DEPEND="python? 2" - -WANT_AUTOMAKE="none" -inherit autotools eutils flag-o-matic multilib pam prefix python 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)" -S="${WORKDIR}/postgresql-${PV}" - -DESCRIPTION="PostgreSQL server" -HOMEPAGE="http://www.postgresql.org/" -SRC_URI="mirror://postgresql/source/v${PV}/postgresql-${PV}.tar.bz2 - http://dev.gentoo.org/~titanofold/postgresql-patches-9.1-r1.tbz2 - http://dev.gentoo.org/~titanofold/postgresql-initscript-2.1.1.tbz2" -LICENSE="POSTGRESQL GPL-2" - -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" -IUSE="doc kernel_linux nls pam perl -pg_legacytimestamp python selinux tcl uuid xml" - -for lingua in ${LINGUAS}; do - IUSE+=" linguas_${lingua}" -done - -wanted_languages() { - local enable_langs - - for lingua in ${LINGUAS} ; do - use linguas_${lingua} && enable_langs+="${lingua} " - done - - echo -n ${enable_langs} -} - -RDEPEND="~dev-db/postgresql-base-${PV}:${SLOT}[pam?,pg_legacytimestamp=,nls=] - perl? ( >=dev-lang/perl-5.8 ) - selinux? ( sec-policy/selinux-postgresql ) - tcl? ( >=dev-lang/tcl-8 ) - uuid? ( dev-libs/ossp-uuid ) - xml? ( dev-libs/libxml2 dev-libs/libxslt )" -DEPEND="${RDEPEND} - sys-devel/flex - xml? ( virtual/pkgconfig )" -PDEPEND="doc? ( ~dev-db/postgresql-docs-${PV} )" - -# Support /var/run or /run for the socket directory -[[ ! -d /run ]] && RUNDIR=/var - -pkg_setup() { - enewgroup postgres 70 - enewuser postgres 70 /bin/bash /var/lib/postgresql postgres - - use python && python_set_active_version 2 -} - -src_prepare() { - epatch "${WORKDIR}/autoconf.patch" \ - "${WORKDIR}/bool.patch" \ - "${WORKDIR}/pg_ctl-exit-status.patch" \ - "${WORKDIR}/server.patch" - - eprefixify src/include/pg_config_manual.h - - if use test ; then - epatch "${WORKDIR}/regress.patch" - sed -e "s|@SOCKETDIR@|${T}|g" -i src/test/regress/pg_regress{,_main}.c - sed -e "s|/no/such/location|${S}/src/test/regress/tmp_check/no/such/location|g" \ - -i src/test/regress/{input,output}/tablespace.source - else - echo "all install:" > "${S}/src/test/regress/GNUmakefile" - fi - - sed -e "s|@RUNDIR@|${RUNDIR}|g" \ - -i src/include/pg_config_manual.h "${WORKDIR}/postgresql.init" || \ - die "RUNDIR sed failed" - sed -e "s|@SLOT@|${SLOT}|g" \ - -i "${WORKDIR}/postgresql.init" "${WORKDIR}/postgresql.confd" || \ - die "SLOT sed failed" - - eautoconf -} - -src_configure() { - case ${CHOST} in - *-darwin*|*-solaris*) - use nls && append-libs intl - ;; - esac - - local PO="${EPREFIX%/}" - - # eval is needed to get along with pg_config quotation of space-rich entities. - eval econf "$(${PO}/usr/$(get_libdir)/postgresql-${SLOT}/bin/pg_config --configure)" \ - $(use_with perl) \ - $(use_with python) \ - $(use_with tcl) \ - $(use_with xml libxml) \ - $(use_with xml libxslt) \ - $(use_with uuid ossp-uuid) \ - --with-system-tzdata="${PO}/usr/share/zoneinfo" \ - --with-includes="${PO}/usr/include/postgresql-${SLOT}/" \ - --with-libraries="${PO}/usr/$(get_libdir)/postgresql-${SLOT}/$(get_libdir)" \ - "$(use_enable nls nls "$(wanted_languages)")" -} - -src_compile() { - local bd - for bd in . contrib $(use xml && echo contrib/xml2); do - PATH="${EROOT%/}/usr/$(get_libdir)/postgresql-${SLOT}/bin:${PATH}" \ - emake -C $bd || die "emake in $bd failed" - done -} - -src_install() { - if use perl ; then - mv -f "${S}/src/pl/plperl/GNUmakefile" "${S}/src/pl/plperl/GNUmakefile_orig" - sed -e "s:\$(DESTDIR)\$(plperl_installdir):\$(plperl_installdir):" \ - "${S}/src/pl/plperl/GNUmakefile_orig" > "${S}/src/pl/plperl/GNUmakefile" - fi - - local bd - for bd in . contrib $(use xml && echo contrib/xml2) ; do - PATH="${EROOT%/}/usr/$(get_libdir)/postgresql-${SLOT}/bin:${PATH}" \ - emake install -C $bd DESTDIR="${D}" || die "emake install in $bd failed" - done - - dodoc README HISTORY doc/{TODO,bug.template} - - dodir /etc/eselect/postgresql/slots/${SLOT} - echo "postgres_ebuilds=\"\${postgres_ebuilds} ${PF}\"" > \ - "${ED}/etc/eselect/postgresql/slots/${SLOT}/server" - - newconfd "${WORKDIR}/postgresql.confd" postgresql-${SLOT} || \ - die "Inserting conf failed" - newinitd "${WORKDIR}/postgresql.init" postgresql-${SLOT} || \ - die "Inserting conf failed" - - use pam && pamd_mimic system-auth postgresql auth account session - - if use prefix ; then - keepdir ${RUNDIR}/run/postgresql - fperms 0770 ${RUNDIR}/run/postgresql - fi -} - -pkg_postinst() { - postgresql-config update - - elog "Gentoo specific documentation:" - elog "http://www.gentoo.org/doc/en/postgres-howto.xml" - 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%/}${RUNDIR}/run/postgresql/" - elog - elog "If you have users and/or services that you would like to utilize the" - elog "socket, you must add them to the 'postgres' system group:" - elog " usermod -a -G postgres <user>" - 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}" -} - -pkg_prerm() { - if [[ -z ${REPLACED_BY_VERSION} ]] ; then - ewarn "Have you dumped and/or migrated the ${SLOT} database cluster?" - ewarn "\thttp://www.gentoo.org/doc/en/postgres-howto.xml#doc_chap5" - - ebegin "Resuming removal 10 seconds. Control-C to cancel" - sleep 10 - eend 0 - fi -} - -pkg_postrm() { - postgresql-config update -} - -pkg_config() { - [[ -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 - - [ -z "${PG_MAX_CONNECTIONS}" ] && PG_MAX_CONNECTIONS="128" - einfo "Checking system parameters..." - - if ! use kernel_linux ; then - einfo "Skipped." - einfo " Tests not supported on this OS (yet)" - else - if [ -z ${SKIP_SYSTEM_TESTS} ] ; then - einfo "Checking whether your system supports at least ${PG_MAX_CONNECTIONS} connections..." - - local SEMMSL=$(sysctl -n kernel.sem | cut -f1) - local SEMMNS=$(sysctl -n kernel.sem | cut -f2) - local SEMMNI=$(sysctl -n kernel.sem | cut -f4) - local SHMMAX=$(sysctl -n kernel.shmmax) - - local SEMMSL_MIN=17 - local SEMMNS_MIN=$(( ( ${PG_MAX_CONNECTIONS}/16 ) * 17 )) - local SEMMNI_MIN=$(( ( ${PG_MAX_CONNECTIONS}+15 ) / 16 )) - local SHMMAX_MIN=$(( 500000 + ( 30600 * ${PG_MAX_CONNECTIONS} ) )) - - for p in SEMMSL SEMMNS SEMMNI SHMMAX ; do - if [ $(eval echo \$$p) -lt $(eval echo \$${p}_MIN) ] ; then - eerror "The value for ${p} $(eval echo \$$p) is below the recommended value $(eval echo \$${p}_MIN)" - eerror "You have now several options:" - eerror " - Change the mentioned system parameter" - eerror " - Lower the number of max.connections by setting PG_MAX_CONNECTIONS to a" - eerror " value lower than ${PG_MAX_CONNECTIONS}" - eerror " - Set SKIP_SYSTEM_TESTS in case you want to ignore this test completely" - eerror "More information can be found here:" - eerror " http://www.postgresql.org/docs/${SLOT}/static/kernel-resources.html" - die "System test failed." - fi - done - einfo "Passed." - else - ewarn "SKIP_SYSTEM_TESTS set, so skipping." - fi - 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 - - mv "${DATA_DIR%/}"/*.conf "${PGDATA}" - - 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() { - einfo ">>> Test phase [check]: ${CATEGORY}/${PF}" - - if [ ${UID} -ne 0 ] ; then - emake -j1 check || die "Make check failed. See above for details." - - 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 - ewarn "Tests cannot be run as root. Skipping." - ewarn "HINT: FEATURES=\"userpriv\"" - fi -} diff --git a/dev-db/postgresql-server/postgresql-server-9.1.4.ebuild b/dev-db/postgresql-server/postgresql-server-9.1.4.ebuild deleted file mode 100644 index e62a328da866..000000000000 --- a/dev-db/postgresql-server/postgresql-server-9.1.4.ebuild +++ /dev/null @@ -1,348 +0,0 @@ -# Copyright 1999-2012 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-db/postgresql-server/postgresql-server-9.1.4.ebuild,v 1.7 2012/07/28 12:34:49 titanofold Exp $ - -EAPI="4" -PYTHON_DEPEND="python? 2" - -WANT_AUTOMAKE="none" -inherit autotools eutils flag-o-matic multilib pam prefix python 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)" -S="${WORKDIR}/postgresql-${PV}" - -DESCRIPTION="PostgreSQL server" -HOMEPAGE="http://www.postgresql.org/" -SRC_URI="mirror://postgresql/source/v${PV}/postgresql-${PV}.tar.bz2 - http://dev.gentoo.org/~titanofold/postgresql-patches-9.1-r1.tbz2 - http://dev.gentoo.org/~titanofold/postgresql-initscript-2.1.tbz2" -LICENSE="POSTGRESQL GPL-2" - -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" -IUSE="doc kernel_linux nls pam perl -pg_legacytimestamp python selinux tcl uuid xml" - -for lingua in ${LINGUAS}; do - IUSE+=" linguas_${lingua}" -done - -wanted_languages() { - local enable_langs - - for lingua in ${LINGUAS} ; do - use linguas_${lingua} && enable_langs+="${lingua} " - done - - echo -n ${enable_langs} -} - -RDEPEND="~dev-db/postgresql-base-${PV}:${SLOT}[pam?,pg_legacytimestamp=,nls=] - perl? ( >=dev-lang/perl-5.8 ) - selinux? ( sec-policy/selinux-postgresql ) - tcl? ( >=dev-lang/tcl-8 ) - uuid? ( dev-libs/ossp-uuid ) - xml? ( dev-libs/libxml2 dev-libs/libxslt )" -DEPEND="${RDEPEND} - sys-devel/flex - xml? ( virtual/pkgconfig )" -PDEPEND="doc? ( ~dev-db/postgresql-docs-${PV} )" - -# Support /var/run or /run for the socket directory -[[ ! -d /run ]] && RUNDIR=/var - -pkg_setup() { - enewgroup postgres 70 - enewuser postgres 70 /bin/bash /var/lib/postgresql postgres - - use python && python_set_active_version 2 -} - -src_prepare() { - epatch "${WORKDIR}/autoconf.patch" \ - "${WORKDIR}/bool.patch" \ - "${WORKDIR}/pg_ctl-exit-status.patch" \ - "${WORKDIR}/server.patch" - - eprefixify src/include/pg_config_manual.h - - if use test ; then - epatch "${WORKDIR}/regress.patch" - sed -e "s|@SOCKETDIR@|${T}|g" -i src/test/regress/pg_regress{,_main}.c - sed -e "s|/no/such/location|${S}/src/test/regress/tmp_check/no/such/location|g" \ - -i src/test/regress/{input,output}/tablespace.source - else - echo "all install:" > "${S}/src/test/regress/GNUmakefile" - fi - - sed -e "s|@RUNDIR@|${RUNDIR}|g" \ - -i src/include/pg_config_manual.h "${WORKDIR}/postgresql.init" || \ - die "RUNDIR sed failed" - sed -e "s|@SLOT@|${SLOT}|g" \ - -i "${WORKDIR}/postgresql.init" "${WORKDIR}/postgresql.confd" || \ - die "SLOT sed failed" - - eautoconf -} - -src_configure() { - case ${CHOST} in - *-darwin*|*-solaris*) - use nls && append-libs intl - ;; - esac - - local PO="${EPREFIX%/}" - - # eval is needed to get along with pg_config quotation of space-rich entities. - eval econf "$(${PO}/usr/$(get_libdir)/postgresql-${SLOT}/bin/pg_config --configure)" \ - $(use_with perl) \ - $(use_with python) \ - $(use_with tcl) \ - $(use_with xml libxml) \ - $(use_with xml libxslt) \ - $(use_with uuid ossp-uuid) \ - --with-system-tzdata="${PO}/usr/share/zoneinfo" \ - --with-includes="${PO}/usr/include/postgresql-${SLOT}/" \ - --with-libraries="${PO}/usr/$(get_libdir)/postgresql-${SLOT}/$(get_libdir)" \ - "$(use_enable nls nls "$(wanted_languages)")" -} - -src_compile() { - local bd - for bd in . contrib $(use xml && echo contrib/xml2); do - PATH="${EROOT%/}/usr/$(get_libdir)/postgresql-${SLOT}/bin:${PATH}" \ - emake -C $bd || die "emake in $bd failed" - done -} - -src_install() { - if use perl ; then - mv -f "${S}/src/pl/plperl/GNUmakefile" "${S}/src/pl/plperl/GNUmakefile_orig" - sed -e "s:\$(DESTDIR)\$(plperl_installdir):\$(plperl_installdir):" \ - "${S}/src/pl/plperl/GNUmakefile_orig" > "${S}/src/pl/plperl/GNUmakefile" - fi - - local bd - for bd in . contrib $(use xml && echo contrib/xml2) ; do - PATH="${EROOT%/}/usr/$(get_libdir)/postgresql-${SLOT}/bin:${PATH}" \ - emake install -C $bd DESTDIR="${D}" || die "emake install in $bd failed" - done - - dodoc README HISTORY doc/{TODO,bug.template} - - dodir /etc/eselect/postgresql/slots/${SLOT} - echo "postgres_ebuilds=\"\${postgres_ebuilds} ${PF}\"" > \ - "${ED}/etc/eselect/postgresql/slots/${SLOT}/server" - - newconfd "${WORKDIR}/postgresql.confd" postgresql-${SLOT} || \ - die "Inserting conf failed" - newinitd "${WORKDIR}/postgresql.init" postgresql-${SLOT} || \ - die "Inserting conf failed" - - use pam && pamd_mimic system-auth postgresql auth account session - - if use prefix ; then - keepdir ${RUNDIR}/run/postgresql - fperms 0770 ${RUNDIR}/run/postgresql - fi -} - -pkg_postinst() { - postgresql-config update - - elog "Gentoo specific documentation:" - elog "http://www.gentoo.org/doc/en/postgres-howto.xml" - 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%/}${RUNDIR}/run/postgresql/" - elog - elog "If you have users and/or services that you would like to utilize the" - elog "socket, you must add them to the 'postgres' system group:" - elog " usermod -a -G postgres <user>" - 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}" -} - -pkg_prerm() { - if [[ -z ${REPLACED_BY_VERSION} ]] ; then - ewarn "Have you dumped and/or migrated the ${SLOT} database cluster?" - ewarn "\thttp://www.gentoo.org/doc/en/postgres-howto.xml#doc_chap5" - - ebegin "Resuming removal 10 seconds. Control-C to cancel" - sleep 10 - eend 0 - fi -} - -pkg_postrm() { - postgresql-config update -} - -pkg_config() { - [[ -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 - - [ -z "${PG_MAX_CONNECTIONS}" ] && PG_MAX_CONNECTIONS="128" - einfo "Checking system parameters..." - - if ! use kernel_linux ; then - einfo "Skipped." - einfo " Tests not supported on this OS (yet)" - else - if [ -z ${SKIP_SYSTEM_TESTS} ] ; then - einfo "Checking whether your system supports at least ${PG_MAX_CONNECTIONS} connections..." - - local SEMMSL=$(sysctl -n kernel.sem | cut -f1) - local SEMMNS=$(sysctl -n kernel.sem | cut -f2) - local SEMMNI=$(sysctl -n kernel.sem | cut -f4) - local SHMMAX=$(sysctl -n kernel.shmmax) - - local SEMMSL_MIN=17 - local SEMMNS_MIN=$(( ( ${PG_MAX_CONNECTIONS}/16 ) * 17 )) - local SEMMNI_MIN=$(( ( ${PG_MAX_CONNECTIONS}+15 ) / 16 )) - local SHMMAX_MIN=$(( 500000 + ( 30600 * ${PG_MAX_CONNECTIONS} ) )) - - for p in SEMMSL SEMMNS SEMMNI SHMMAX ; do - if [ $(eval echo \$$p) -lt $(eval echo \$${p}_MIN) ] ; then - eerror "The value for ${p} $(eval echo \$$p) is below the recommended value $(eval echo \$${p}_MIN)" - eerror "You have now several options:" - eerror " - Change the mentioned system parameter" - eerror " - Lower the number of max.connections by setting PG_MAX_CONNECTIONS to a" - eerror " value lower than ${PG_MAX_CONNECTIONS}" - eerror " - Set SKIP_SYSTEM_TESTS in case you want to ignore this test completely" - eerror "More information can be found here:" - eerror " http://www.postgresql.org/docs/${SLOT}/static/kernel-resources.html" - die "System test failed." - fi - done - einfo "Passed." - else - ewarn "SKIP_SYSTEM_TESTS set, so skipping." - fi - 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 - - mv "${DATA_DIR%/}"/*.conf "${PGDATA}" - - 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() { - einfo ">>> Test phase [check]: ${CATEGORY}/${PF}" - - if [ ${UID} -ne 0 ] ; then - emake -j1 check || die "Make check failed. See above for details." - - 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 - ewarn "Tests cannot be run as root. Skipping." - ewarn "HINT: FEATURES=\"userpriv\"" - fi -} diff --git a/dev-db/postgresql-server/postgresql-server-9.2.0.ebuild b/dev-db/postgresql-server/postgresql-server-9.2.0.ebuild deleted file mode 100644 index 330cad6ff91f..000000000000 --- a/dev-db/postgresql-server/postgresql-server-9.2.0.ebuild +++ /dev/null @@ -1,357 +0,0 @@ -# Copyright 1999-2012 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-db/postgresql-server/postgresql-server-9.2.0.ebuild,v 1.1 2012/09/10 11:28:37 patrick Exp $ - -EAPI="4" -PYTHON_DEPEND="python? 2" - -WANT_AUTOMAKE="none" -inherit autotools eutils flag-o-matic multilib pam prefix python 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)" - -# Comment the following six lines when not a beta or rc. -#MY_PV="${PV//_}" -#MY_FILE_PV="${SLOT}$(get_version_component_range 4)" -#S="${WORKDIR}/postgresql-${MY_FILE_PV}" -#SRC_URI="mirror://postgresql/source/v${MY_FILE_PV}/postgresql-${MY_FILE_PV}.tar.bz2 -# http://dev.gentoo.org/~titanofold/postgresql-patches-${SLOT}beta3.tbz2 -# http://dev.gentoo.org/~titanofold/postgresql-initscript-2.3.tbz2" - -# Comment the following four lines when a beta or rc. -S="${WORKDIR}/postgresql-${PV}" -SRC_URI="mirror://postgresql/source/v${PV}/postgresql-${PV}.tar.bz2 - http://dev.gentoo.org/~titanofold/postgresql-patches-${SLOT}beta3.tbz2 - http://dev.gentoo.org/~titanofold/postgresql-initscript-2.3.tbz2" - -LICENSE="POSTGRESQL GPL-2" -DESCRIPTION="PostgreSQL server" -HOMEPAGE="http://www.postgresql.org/" - -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" -IUSE="doc kernel_linux nls pam perl -pg_legacytimestamp python selinux tcl uuid xml" - -for lingua in ${LINGUAS}; do - IUSE+=" linguas_${lingua}" -done - -wanted_languages() { - local enable_langs - - for lingua in ${LINGUAS} ; do - use linguas_${lingua} && enable_langs+="${lingua} " - done - - echo -n ${enable_langs} -} - -RDEPEND="~dev-db/postgresql-base-${PV}:${SLOT}[pam?,pg_legacytimestamp=,nls=] - perl? ( >=dev-lang/perl-5.8 ) - selinux? ( sec-policy/selinux-postgresql ) - tcl? ( >=dev-lang/tcl-8 ) - uuid? ( dev-libs/ossp-uuid ) - xml? ( dev-libs/libxml2 dev-libs/libxslt )" -DEPEND="${RDEPEND} - sys-devel/flex - xml? ( virtual/pkgconfig )" -PDEPEND="doc? ( ~dev-db/postgresql-docs-${PV} )" - -# Support /var/run or /run for the socket directory -[[ ! -d /run ]] && RUNDIR=/var - -pkg_setup() { - enewgroup postgres 70 - enewuser postgres 70 /bin/bash /var/lib/postgresql postgres - - use python && python_set_active_version 2 -} - -src_prepare() { - epatch "${WORKDIR}/autoconf.patch" \ - "${WORKDIR}/bool.patch" \ - "${WORKDIR}/server.patch" - - eprefixify src/include/pg_config_manual.h - - if use test ; then - epatch "${WORKDIR}/regress.patch" - sed -e "s|@SOCKETDIR@|${T}|g" -i src/test/regress/pg_regress{,_main}.c -# sed -e "s|/no/such/location|${S}/src/test/regress/tmp_check/no/such/location|g" \ -# -i src/test/regress/{input,output}/tablespace.source - else - echo "all install:" > "${S}/src/test/regress/GNUmakefile" - fi - - sed -e "s|@RUNDIR@|${RUNDIR}|g" \ - -i src/include/pg_config_manual.h "${WORKDIR}/postgresql.init" || \ - die "RUNDIR sed failed" - sed -e "s|@SLOT@|${SLOT}|g" \ - -i "${WORKDIR}/postgresql.init" "${WORKDIR}/postgresql.confd" || \ - die "SLOT sed failed" - - eautoconf -} - -src_configure() { - case ${CHOST} in - *-darwin*|*-solaris*) - use nls && append-libs intl - ;; - esac - - local PO="${EPREFIX%/}" - - # eval is needed to get along with pg_config quotation of space-rich entities. - eval econf "$(${PO}/usr/$(get_libdir)/postgresql-${SLOT}/bin/pg_config --configure)" \ - $(use_with perl) \ - $(use_with python) \ - $(use_with tcl) \ - $(use_with xml libxml) \ - $(use_with xml libxslt) \ - $(use_with uuid ossp-uuid) \ - --with-system-tzdata="${PO}/usr/share/zoneinfo" \ - --with-includes="${PO}/usr/include/postgresql-${SLOT}/" \ - --with-libraries="${PO}/usr/$(get_libdir)/postgresql-${SLOT}/$(get_libdir)" \ - "$(use_enable nls nls "$(wanted_languages)")" -} - -src_compile() { - local bd - for bd in . contrib $(use xml && echo contrib/xml2); do - PATH="${EROOT%/}/usr/$(get_libdir)/postgresql-${SLOT}/bin:${PATH}" \ - emake -C $bd || die "emake in $bd failed" - done -} - -src_install() { - if use perl ; then - mv -f "${S}/src/pl/plperl/GNUmakefile" "${S}/src/pl/plperl/GNUmakefile_orig" - sed -e "s:\$(DESTDIR)\$(plperl_installdir):\$(plperl_installdir):" \ - "${S}/src/pl/plperl/GNUmakefile_orig" > "${S}/src/pl/plperl/GNUmakefile" - fi - - local bd - for bd in . contrib $(use xml && echo contrib/xml2) ; do - PATH="${EROOT%/}/usr/$(get_libdir)/postgresql-${SLOT}/bin:${PATH}" \ - emake install -C $bd DESTDIR="${D}" || die "emake install in $bd failed" - done - - dodoc README HISTORY doc/{TODO,bug.template} - - dodir /etc/eselect/postgresql/slots/${SLOT} - echo "postgres_ebuilds=\"\${postgres_ebuilds} ${PF}\"" > \ - "${ED}/etc/eselect/postgresql/slots/${SLOT}/server" - - newconfd "${WORKDIR}/postgresql.confd" postgresql-${SLOT} || \ - die "Inserting conf failed" - newinitd "${WORKDIR}/postgresql.init" postgresql-${SLOT} || \ - die "Inserting conf failed" - - use pam && pamd_mimic system-auth postgresql auth account session - - if use prefix ; then - keepdir ${RUNDIR}/run/postgresql - fperms 0770 ${RUNDIR}/run/postgresql - fi -} - -pkg_postinst() { - postgresql-config update - - elog "Gentoo specific documentation:" - elog "http://www.gentoo.org/doc/en/postgres-howto.xml" - 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%/}${RUNDIR}/run/postgresql/" - elog - elog "If you have users and/or services that you would like to utilize the" - elog "socket, you must add them to the 'postgres' system group:" - elog " usermod -a -G postgres <user>" - 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}" -} - -pkg_prerm() { - if [[ -z ${REPLACED_BY_VERSION} ]] ; then - ewarn "Have you dumped and/or migrated the ${SLOT} database cluster?" - ewarn "\thttp://www.gentoo.org/doc/en/postgres-howto.xml#doc_chap5" - - ebegin "Resuming removal 10 seconds. Control-C to cancel" - sleep 10 - eend 0 - fi -} - -pkg_postrm() { - postgresql-config update -} - -pkg_config() { - [[ -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 - - [ -z "${PG_MAX_CONNECTIONS}" ] && PG_MAX_CONNECTIONS="128" - einfo "Checking system parameters..." - - if ! use kernel_linux ; then - einfo "Skipped." - einfo " Tests not supported on this OS (yet)" - else - if [ -z ${SKIP_SYSTEM_TESTS} ] ; then - einfo "Checking whether your system supports at least ${PG_MAX_CONNECTIONS} connections..." - - local SEMMSL=$(sysctl -n kernel.sem | cut -f1) - local SEMMNS=$(sysctl -n kernel.sem | cut -f2) - local SEMMNI=$(sysctl -n kernel.sem | cut -f4) - local SHMMAX=$(sysctl -n kernel.shmmax) - - local SEMMSL_MIN=17 - local SEMMNS_MIN=$(( ( ${PG_MAX_CONNECTIONS}/16 ) * 17 )) - local SEMMNI_MIN=$(( ( ${PG_MAX_CONNECTIONS}+15 ) / 16 )) - local SHMMAX_MIN=$(( 500000 + ( 30600 * ${PG_MAX_CONNECTIONS} ) )) - - for p in SEMMSL SEMMNS SEMMNI SHMMAX ; do - if [ $(eval echo \$$p) -lt $(eval echo \$${p}_MIN) ] ; then - eerror "The value for ${p} $(eval echo \$$p) is below the recommended value $(eval echo \$${p}_MIN)" - eerror "You have now several options:" - eerror " - Change the mentioned system parameter" - eerror " - Lower the number of max.connections by setting PG_MAX_CONNECTIONS to a" - eerror " value lower than ${PG_MAX_CONNECTIONS}" - eerror " - Set SKIP_SYSTEM_TESTS in case you want to ignore this test completely" - eerror "More information can be found here:" - eerror " http://www.postgresql.org/docs/${SLOT}/static/kernel-resources.html" - die "System test failed." - fi - done - einfo "Passed." - else - ewarn "SKIP_SYSTEM_TESTS set, so skipping." - fi - 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 - - mv "${DATA_DIR%/}"/*.conf "${PGDATA}" - - 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() { - einfo ">>> Test phase [check]: ${CATEGORY}/${PF}" - - if [ ${UID} -ne 0 ] ; then - emake check || die "Make check failed. See above for details." - - 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 - ewarn "Tests cannot be run as root. Skipping." - ewarn "HINT: FEATURES=\"userpriv\"" - fi -} |