public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: net-im/ejabberd/files/, net-im/ejabberd/
@ 2016-02-15 21:49 Amadeusz Piotr Żołnowski
  0 siblings, 0 replies; 12+ messages in thread
From: Amadeusz Piotr Żołnowski @ 2016-02-15 21:49 UTC (permalink / raw
  To: gentoo-commits

commit:     2235a555a140fa024b657bb57ee8fac5832ab58b
Author:     Amadeusz Żołnowski <aidecoe <AT> gentoo <DOT> org>
AuthorDate: Mon Feb 15 21:15:19 2016 +0000
Commit:     Amadeusz Piotr Żołnowski <aidecoe <AT> gentoo <DOT> org>
CommitDate: Mon Feb 15 21:49:01 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2235a555

net-im/ejabberd: Bump version

Commit on behalf of Vadim Efimov <evadim <AT> evadim.ru>.  Clean up a bit the
ebuild attached to the bug report. Rebase ejabberdctl patch from
previous version over the new version.

Gentoo-Bug: 549724

Package-Manager: portage-2.2.27

 net-im/ejabberd/Manifest                           |  29 ++
 net-im/ejabberd/ejabberd-16.01.ebuild              | 346 +++++++++++++++++++++
 .../files/ejabberd-16.01-ejabberdctl.patch         |  49 +++
 net-im/ejabberd/metadata.xml                       |   7 +-
 4 files changed, 430 insertions(+), 1 deletion(-)

diff --git a/net-im/ejabberd/Manifest b/net-im/ejabberd/Manifest
index b3e9e08..d0c30fc 100644
--- a/net-im/ejabberd/Manifest
+++ b/net-im/ejabberd/Manifest
@@ -1,3 +1,32 @@
+DIST cache_tab-1.0.1.zip 16719 SHA256 149eff4dfb01f633cab643f368e5f96825c26c85ae9e6c22de3f5792e5d3dc28 SHA512 ada72a578359909201d62ad775ca85969aed5cab9be31d38bd505f726434d08bb311f06654f3f26a3b639b9ae2742dd1950ba527489aef84f2ac0dfdb7fba0c8 WHIRLPOOL d026a7452274cb8cfd536da4c5dbabaf0414ddaa5fe835aa80d825d1afae9f952a71e61eaa825d89ee65f6a1d4db9714c3710e7ed36c8fac1be73730e732f362
+DIST eiconv-0.9.0.zip 101407 SHA256 fdaa09bcc79b556f2250c4693bc57c89ce474a5ea6ea12429cbb6c2d4ed3619b SHA512 44d0af378b9873dede92657c53557a565050cd4259598a1fe92e1c9bddc8219922ff093bfc20e380f3e39fc0d5648d6d6f72766a5847781cf2101dbd4b922fb6 WHIRLPOOL 97d97f527aaf4d0fb0176723bde464ab003b49b12acca1f657efe83f8c03186e6b4819f4aadedebb8e703e16cc4af23d317b6ebebe96a9a794e6aa78c8e6fc80
 DIST ejabberd-15.03.tar.xz 6274856 SHA256 3a6fd6e94d6f24575dcaff1aa7ca319944eb76970a9d3b6bf5f30819824143fc SHA512 b292b596094aeab576d9d4aadea47042eeda130881de5dd523985dc60cd0644726dae8d525364ec72992c0c45ba9e0673b7a6ffc2bc20613ba0092e2b285e16f WHIRLPOOL 630feba542f5d4bac1e4c17f453b2298a500c0d18159e8f09a4f11e9d372f7ffbf6e2e600c0ee849c689868872644404c03ebfb375d4852f3bbbd966417d951e
+DIST ejabberd-16.01.tgz 1651587 SHA256 e2cc479d5870539b2e6756690b227969c88a541d464d1fc6e1cbf7270ad7d681 SHA512 f0614db0d0eaf6d4f25b75b8eefbcf93260549876535fd5d82498c75779d182b19ec249ffb9b1b168cb5a887e8e6933eb868892b4aa5cd2933b739d263adca8a WHIRLPOOL 65bc13ba5e380a999ed2ae9c816856f90e24393343d16ae52349350687dfdb15857a3358d856de5694c30718cefc5513b9d3c75871bb368cac54547becc1607a
 DIST ejabberd-2.1.13.tgz 1999853 SHA256 a80d1c72e435da31758261cb0c04fe750ac71fc3e33a3b606123efd3b3abc86d SHA512 9348271f0cf1d9a7e6c53204121568e77820afc50fff1271e7b7ef66c5c5d7d067034c46472250423c4e9052046b18c1c8178f09eda0b0bfe25a1eac465fd07b WHIRLPOOL 2c366d2f7c4371db56f47f5492ef27028a589186eeddb7a6b4e8aac0537b1b80ee31a9760f0551063ce2c2a658b9b5eafb7ed25294e00eb69480231a599a7b10
 DIST ejabberd-mod_statsdx-1118.patch.gz 13989 SHA256 5e5d975e44248cf2b0d6dd0ecf4c477e8479b2b4d0bd531e80f4623fd787320e SHA512 99399323150990cda15e707385f0f26fa790d4ba188a97ac46daaaab9c25e72a7ec72a875573136f17a18648017074d76e4e267b544dc4c95a5101ed9ad6815d WHIRLPOOL 05997f03bb70136ee5e829ea9c55e3aeb0704150f1ed54f11c6cce382a82106129fc1a6ef35a62780837cd2b59fbb384fa10f3bb49813acaee8c5edc22ae3702
+DIST elixir-f2a9c7016633ca63541a8160c63a53eb7edbccdb.zip 1335681 SHA256 4ef8cd93e68a314bb4702547629f9be7a6bb840f6b7956aead6f51700e73c41a SHA512 a6e5170f8d3efc1d31aa82477f4ff377ea7205d106bbf633075df5bef0b22a276cc6897c2a8b7fcbbff269c9fe8378f4802876e0e2aecb90012c0c2165c2b8e8 WHIRLPOOL 716e45804df24b7a4a55e0ad81f72c9961e4066dd3e24b1e3cd1ba041c6c1dc8426d0feaf97580eaf9b369d0fee33cb9e3c26b71eaf6c91d318590e9e6b5ab0c
+DIST epam-1.0.0.zip 47889 SHA256 6704010b14034881d8c60f52d1a82d8125f20cdf1e52a7113c838f1db6be7e81 SHA512 710919ff2883a5e1a99703f3b72ad8a0d61c612b2af66b57b88a6bd9faddc64c61b8b44998feb37d3d3338d24d4c1d8d6a73d6836e254b8f8452249b41427c78 WHIRLPOOL 48a9fedc2fa52a7d5dc1cdcf11a48096798cd87d37987b709ffd0c6cf49881f9afec7fd85b3f8d84020e41920e129534d5f8d6adce92916370ab3a413d4919c9
+DIST eredis-cbc013f516e464706493c01662e5e9dd82d1db01.zip 133223 SHA256 707c54c568b6d07a4a1ac82a528cabef73469136cc14b4f69457e28de9827227 SHA512 fbaa323da0d668fc7147bc406dd4f00bd132d592d4fd3d61c2bee59f4b1c9390784a4c03737d6efd3b004855a92911878bfb11a966dc1853a785c9b10714f34f WHIRLPOOL d6713eef9328f70d6f003c4a27b560715d7a4c433d522dde3a99731e7b868353082b2ba62060fcefc6241977713627b57353ba47919553fe6eb47a554d3b7264
+DIST erlang-sqlite3-cbc3505f7a131254265d3ef56191b2581b8cc172.zip 1843206 SHA256 10db9c7f1a8b8fe16e5e5695a3085584c63dc6d074e56d5e8595e2cc82d0679d SHA512 37f0530e83d69efa02ad1bbc98a4da760d93a8fe764086832bc838a0905843e635d342917c6c6784d1cb3f87f8af8a27189d87a25096bfccf36a561bd66e9696 WHIRLPOOL f25270e56bfd0a168c4a20ce0eb016ec3ee8313d5a78de221134e34ccc7cfa6c4a59d78374c9ae08daf1cdc8f76f26028a796b4b8065664b1a47df7450d0883e
+DIST erlang_protobuffs-6e7fc924506e2dc166a6170e580ce1d95ebbd5bd.zip 255081 SHA256 a8d329ca06631951e8dd723ee07a28d84056efdfcf107ffc4390773de2c2652d SHA512 58d01ef598ca4b1894353a57cc561889b4b80f032df3bee1a0661edcb1f02775177a3655e85526ac855af128700a528987ad64854e3a4e6bf885778d0c76cc85 WHIRLPOOL 5f221d1bfe61f23290bbd5067a1c60a15e302cfb484df592bd92a27788803e7b66ca560a0ef575c592ab33a684f8fa0a5eeed31d6a2281fa388fd6d1eebc3871
+DIST goldrush-212299233c7e7eb63a97be2777e1c05ebaa58dbe.zip 36124 SHA256 529fd62c47a995e6efa4e96a015402177bc54d6f6c68e035799025679223f359 SHA512 af9999a8e687e3f06b2cbbdac2cc2933e4a136698661da350e16b1ecac34bbccdae9175d5a4e1ce2a4e237d0d8e846fcfb00d3a7143a5ac0c230a73dfef6c660 WHIRLPOOL 5cff5953b8c4096d8ec402f3be6ee94e839e50d3c087468d48c63ce914a50f35c80f93f2920564cdd74faeaa5047eb8a7176045c834347ffcc2566333540f4b8
+DIST hamcrest-erlang-908a24fda4a46776a5135db60ca071e3d783f9f6.zip 174732 SHA256 74c28779da72861132cc4c641dcafd1185e0579280b092fd2eeee6089e02cfcf SHA512 0110f69640cdd762a0d939fcda9d3a3da5942335f31b580dd7712c2c50ba53ec97b43f6d5f059db075597d7978e3b089f83dce1d86eb586cad80832ef8612406 WHIRLPOOL 1fff0a6d979309c657a139d37b26e8ccf3e3f0b779c55d1db0bd5e27a557733a9d95e4f63714a495e5926176aa37410df2eb68adf268b9e27fde7eb7fa8c5475
+DIST jiffy-0.14.5.zip 1899711 SHA256 80e7bc14aab3e9dbfb6b930eb99807843bce9902c37cba145f601e1d47e3633b SHA512 f8a021111501db2646b1b806a9260f2eda40d7aa4d58454fb445e75dbaeb9efcda74403b0c2a1d00a7d102ee9133abb813980692842fd4c899c42a2588f07e5f WHIRLPOOL 7f55d12e016058ad0c126a6721f8e05215518c49e088d4c6ca861073174c0de1f9ef599fc1278584ce4f120581072525ed9b6b312a882c7260a77137fe9be0e6
+DIST lager-3.0.2.zip 254249 SHA256 ccb4811774b847fa31b35dbd85edde0560406b1a0dc9c3f2dc71d69ccf687e61 SHA512 69143704067a5a757713d9fb127bac0ef799bb4d6a06e47d9426f1893a0156ad31289b42f55b8ff5a5b15ec8b3b82548485989eae75ef84641e5b4728a89811e WHIRLPOOL d91d106c8fea377e9a30df4d55c74f9b4768c0f3f265f19a69c50465b6479fcd836b9a4b203b2feeb69d00da83ce83b63b7e1e8649a4c29e63c3f779a7301799
+DIST meck-0.8.2.zip 222637 SHA256 c6ba50da30d30e904067f9ea661028dbea3b33c4c5f7631c1fb893ac264f91ec SHA512 58b98b665f56c1b0416e47e7f7e7b94cfbcaca2dc26571802ebb6cdb6fb79ab6207e27a0ee981efa25ed034b602f0abcac33ee4ac23ffef19ba2c02aa845d4e3 WHIRLPOOL d104084426cda735758a8ad4e46819a926431826bb1f32dfbaede39ce5acda920992ea744f852b39cf608bb69c350e7b42b143c7d248adb09f7b45fd0c5dbf39
+DIST mysql-1.0.0.zip 21330 SHA256 3d240192062ee8e78be218b7f365ff5ade5beeef16bd8315077338f4cb2c20b9 SHA512 554573b8d570bb001998196e44d71ae7fc0c87f35badaa3dc2a39695fb847d49ef95e140bf0668843e5593a78e35cc8ababb8cd9f181718c4434bc965f7eea0e WHIRLPOOL 7f3b6ac53e504cd311251fce1eeb3854f333c073b13b65e333139d4071cfac2df3cd9afb943f57a0f5de6468bc7d06e8da63134643ae09c7106fcdc7b7073b40
+DIST oauth2-8d129fbf8866930b4ffa6dd84e65bd2b32b9acb8.zip 225059 SHA256 8e043e96eabd4ced74f7f5b6c4ff6606c3027bc9ca9d807f6a348f4e0e4c66b3 SHA512 c9257054f579badfa78653b9deaabdd4fa71f84b742bdfb2dab1fb0fffa52d40b6236f01523c67ecc61068d9dbfd4a2ab2c19b9b90fa926dc359f76cfa18085b WHIRLPOOL 2e35022969739844a9b08cbd3149c204cd6798d6f8f009134a3c0d2cc14e46d6c3ef06f9d87a8f65a2cbb6915087be643a7040498ee4c1698d1a14978381ecb4
+DIST p1_logger-1.0.0.zip 21168 SHA256 416026a99ee3ae739d1cb7cccfe0546635e441b16433cd8e5ff0a76e8f72a9c0 SHA512 11dafee5ba7d726a5f526583533d8ce1a5cf247c16b1ed4c2617a8cc46fcb3dc9358c70e6924c4b7b5b6911d99fa8a57adfc8b3b40ade6cc798f0f5c2b040810 WHIRLPOOL c4cb246c0d9121f2d9097b5cf63372f14a32f3b147202763a605e519f80fa60e1331a1ad5a03ca32445df2555aeaaa5f6fd79d44b2cf4ebdce0ebc514a9b1713
+DIST p1_sip-1.0.0.zip 268267 SHA256 d21b4468f32483817ddd81aef1896e112939118c6c93768a241ab37a10649171 SHA512 987051968696a04969e00e5a43e5787cfdd52c453829b822b2ed065fa31e265ddef4e367ec5bb0d1ed260e3b46a5085efbc845195c29b6d8c14e2a85a31204b3 WHIRLPOOL e5254cbb8fb57324da3fab5708f390d6ef52e29f47da72707b4f6f27d87c55d7963dd6669c96dfe58be44578b0cec38f95efc3dcff3dc60d44c405a601a4c0bb
+DIST p1_utils-1.0.2.zip 41661 SHA256 9fd24f82aecbe6681a4cff9d3e515847afc77d1562ace5b704f2b566de0ffc8d SHA512 836db43bec11405bc229c4b6e7aff4d17869d32b9d51b523447b3fe53523d527db9aeb5b69d3c1fc010ebed1f597814d1b403331aadae5bfca97845082aa3d0b WHIRLPOOL cf0e8b1b5a8b4b70ebb3a6041bab1c90ac953c678cd7e6c9cf0519c2c9a5e416ad0fbb3be53d79170073f71603f7607261ce6e35c50890297a0ae9cd26fcdc38
+DIST p1_yaml-1.0.0.zip 196536 SHA256 02d60f14b5510469bdff8a9ce091035cde6b87ee44e896ec11c18c3479f09ebe SHA512 105cc9c29db5bf6635c24b1be44a06e4c982b8d03de56655a6a7ed7c24343d47652279243f3fc28417dde023cc570c519d5f2bbf9ba57f343459a61225e7476e WHIRLPOOL 8893fd98a00170fc8f1f7f51212f48027fefa068d61b75ef15d4785d6735d81e35c74bf98f30e7f6f693dcb6b4016a399ac692d8249fef0d2c2006712f35fccf
+DIST pgsql-1.0.0.zip 19384 SHA256 470bfee28dc0ce4d93fb7bf4d59e782e49dc03a040db5471d9f1e09c37f8a0c2 SHA512 9b637a337a14cd0175c3f64d34056e28957d8c38b2f151b0f4be489667ebc7231b7295523f7bf6328a0cd565a2b00b1ec81b8e885e33b2a79c3298fce908b517 WHIRLPOOL 281c13ac3151b70b56a07f172451c7af746e2a26c349126fc720a0588b35f86f66c1649b9122449468614d3158654991b3c257ce0a06a53194a893ddbdc1033c
+DIST rebar_elixir_plugin-0.1.0.zip 6553 SHA256 b9760890b74827805a35899c9c2e237c1b3e0f651446871b5095bb49e98bd09d SHA512 e4733c76fdb1f09222cbbbf61dbf274c39b3ec9ca286502782cbf6f967afcb6047e0d0f5464f4821f8ae8df7e7f156c21014c719147da029dbff29197047b7bf WHIRLPOOL cf003c2f232f70d5879561c8de13b6b5d8c238085b17d6dfcb7a71ea3728d687b8f4c5f1f114ec0d2934c0b52fe3de472aae7efb6ec42f5ef446f932c7decbbb
+DIST riak-erlang-client-527722d12d0433b837cdb92a60900c2cb5df8942.zip 242131 SHA256 ef3539206f774b1680a36c4ae50dc764b9b87a60efa2225d0b69c7064b24140e SHA512 e228be58754867a2f2084683c326ebc973b4e520d3ef33171b49833c33be8dda7749c09f8368a7cc92b67b866185efada1062a172515cf69340a75d50e97f35d WHIRLPOOL 651b3e3eedbcae36c21bdfe551623945be709a2890da28b352ba74f5a96c6d23eefe756fe9f6652c7dbfbb3e40330dd3fdf319eafa7372fe26e6bfc3590ab4a6
+DIST riak_pb-1a43334c03cfe81712c71c6f166b68fe9270f008.zip 235172 SHA256 485295f8123c163d43767ead3c66e58c4bc7e4f13a2dd55be6de263b51c42a4a SHA512 5c56bfbccd6c6bfa82f1772cbbf7228ed46ee23078c7eda2d2251ec0c97dae46786df8f17aa65fe672f89f425e86cfe07a37bf50a3a8f0c0747a9604c43d1d1a WHIRLPOOL d28aff0cc311dd9345a705b8e8d4066b26e8b25d6896c98e96098b5649bafced51b2b6437f282017a61c653efc54777d794834318da468ec2e10bb02c1d9a187
+DIST stringprep-1.0.0.zip 101552 SHA256 e2a71b59084f9556133a9c99ba4a6621f4853abfb902fa1301224d2fd6791aef SHA512 7b724c8eb888e3683b421220c823553ba695fb4d94225fcc968f2f8f1386a5090a0e2fd85113ebb7d67c50f687011ad461802cb89a52b4a26c02b03c9e72f123 WHIRLPOOL 46a1ceb7db35d7c231c12e47c0ea9599c9809bc763b90aa241b6b0dfca71d0d04f0b933c99c002805dc9f70f776585ed2e7b62ba47bf0cf61f05ae086d5dc97a
+DIST stun-0.9.0.zip 38634 SHA256 c99f2965f8832488abc8ad753afd538f6f492dd5bea1889cb4a787ed4bc2b7c6 SHA512 d4210ad5563aae291a6239256090c1dab4e98b62ece7474f25107a4bf6ba2e65d1c9858b26967a9546f81b64386979e4c020142a089be04d1b12f2f09353a38e WHIRLPOOL 564a14fbbf09ad6f9709d0b57004628105c63f35d9533c84bbb831c93eb392b914fa9cab419569a433d63f48ddd72d3f2b612d3260b22bcc1f08f02feaffca68
+DIST tls-1.0.0.zip 66622 SHA256 1434a7f580839f427b455b4f49ac504d26d97e9836f3bbdf59a130611a37c0f4 SHA512 84533d13e3aa631359e962597d3ea63d899a4bc4c776f05fcc78e46e3de9319ecbc653363c809f0a98c0a27e685f332cde64587b86bc9bb5a968058352beab06 WHIRLPOOL 89862f08f68e6bf478c1e25b168ae57c7fb7d253e953a3609f768f8aee8d42fb83ef09d317f05d4e6b7984a2da7a35ca735dfa4b5a3940ac10f4818caa238f04
+DIST xml-1.1.1.zip 94306 SHA256 2a9013ca2756dcd4c8b3387fcfa21ecc36b3e8cf50dd27afc8b80776f4c0892d SHA512 ccfd6929498b2f9ed17c4b7a1d0be13172b9a8304b00c3cbdfb49cc7df054c76cdf06844fa29fef7d17d45e5e2717c8fea22cd1eac61cf8293545310fe9098e7 WHIRLPOOL 1fb22cb2845c699a5fc8a8291d1ec804fa22e2c169b65f00ade151484a4c4d0d38a4cb9f1e90f3adad8eefb38c425823579d0b3ff90987b343b246607c19bae8
+DIST xmlrpc-1.15.zip 139769 SHA256 841488a5405f4a32182cae863c7305464daba7ed150dca55ec5b04f198df503a SHA512 a96fa31422e95b75afcdecd844fe020bb1be9144fc31d957a238658498d8ae4b8ed069d27e06ed105230b42a4fd4c37d95b4a09c96dbffd60e6a49faae94eead WHIRLPOOL cba32ff8c0024de1fff30620bbb0d93c1a49beb74ec1f58eeffc4de683ce1ad3743e2e30217834b285016a9cc4a7de596dfc8f6597a22fb5eb74478d12e2c7e0
+DIST zlib-1.0.0.zip 48754 SHA256 82f934a5ea146195a3046e56b38ef7bbdb3f04dbc6c5c05bec4245384f010a15 SHA512 f4598dd2e4dd5b27b9599d3aecdba690368d684a81309838655bf8dfc338573cf227f49aa0976940b7fd9ea97f7e881fdf88fea128fdc7bc99f2d78ffe42264a WHIRLPOOL def5ec392f3ba133a3b7462cc10edee41585c2f1d8580ccfbd4bb74f2fb327aa1d7a10b4a3fbe3b21c56aeab224861ea91e632758fd2e36f7f89ed0d8f2790be

diff --git a/net-im/ejabberd/ejabberd-16.01.ebuild b/net-im/ejabberd/ejabberd-16.01.ebuild
new file mode 100644
index 0000000..3415ae6
--- /dev/null
+++ b/net-im/ejabberd/ejabberd-16.01.ebuild
@@ -0,0 +1,346 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+declare -A PLUGINS{_REPO_NAME,_COMMIT,_URL,_PV}
+declare -A mods
+
+# regenerate url list
+#for i in *; do pushd $i > /dev/null; name="$i"; rev=`git show-ref -s HEAD`; url=`git config remote.origin.url`; repo_base=`dirname "$url"`; repo_name=`basename "$url"`; echo "PLUGINS_REPO_NAME[$name]=$repo_name"; echo "PLUGINS_COMMIT[$name]=$rev"; echo "PLUGINS_PV[$name]=\"\${PLUGINS_REPO_NAME[$name]}-\${PLUGINS_COMMIT[$name]}\""; echo "PLUGINS_URL[$name]=\"$repo_base/\${PLUGINS_REPO_NAME[$name]}/archive/\${PLUGINS_COMMIT[$name]}.zip\""; echo; popd > /dev/null; done
+
+PLUGINS_REPO_NAME[cache_tab]=cache_tab
+PLUGINS_COMMIT[cache_tab]=1.0.1
+PLUGINS_PV[cache_tab]="${PLUGINS_REPO_NAME[cache_tab]}-${PLUGINS_COMMIT[cache_tab]}"
+PLUGINS_URL[cache_tab]="https://github.com/processone/${PLUGINS_REPO_NAME[cache_tab]}/archive/${PLUGINS_COMMIT[cache_tab]}.zip"
+
+PLUGINS_REPO_NAME[elixir]=elixir
+PLUGINS_COMMIT[elixir]=f2a9c7016633ca63541a8160c63a53eb7edbccdb
+PLUGINS_PV[elixir]="${PLUGINS_REPO_NAME[elixir]}-${PLUGINS_COMMIT[elixir]}"
+PLUGINS_URL[elixir]="https://github.com/elixir-lang/${PLUGINS_REPO_NAME[elixir]}/archive/${PLUGINS_COMMIT[elixir]}.zip"
+
+PLUGINS_REPO_NAME[eredis]=eredis
+PLUGINS_COMMIT[eredis]=cbc013f516e464706493c01662e5e9dd82d1db01
+PLUGINS_PV[eredis]="${PLUGINS_REPO_NAME[eredis]}-${PLUGINS_COMMIT[eredis]}"
+PLUGINS_URL[eredis]="https://github.com/wooga/${PLUGINS_REPO_NAME[eredis]}/archive/${PLUGINS_COMMIT[eredis]}.zip"
+
+PLUGINS_REPO_NAME[esip]=p1_sip
+PLUGINS_COMMIT[esip]=1.0.0
+PLUGINS_PV[esip]="${PLUGINS_REPO_NAME[esip]}-${PLUGINS_COMMIT[esip]}"
+PLUGINS_URL[esip]="https://github.com/processone/${PLUGINS_REPO_NAME[esip]}/archive/${PLUGINS_COMMIT[esip]}.zip"
+
+PLUGINS_REPO_NAME[goldrush]=goldrush
+PLUGINS_COMMIT[goldrush]=212299233c7e7eb63a97be2777e1c05ebaa58dbe
+PLUGINS_PV[goldrush]="${PLUGINS_REPO_NAME[goldrush]}-${PLUGINS_COMMIT[goldrush]}"
+PLUGINS_URL[goldrush]="https://github.com/DeadZen/${PLUGINS_REPO_NAME[goldrush]}/archive/${PLUGINS_COMMIT[goldrush]}.zip"
+
+PLUGINS_REPO_NAME[hamcrest]=hamcrest-erlang
+PLUGINS_COMMIT[hamcrest]=908a24fda4a46776a5135db60ca071e3d783f9f6
+PLUGINS_PV[hamcrest]="${PLUGINS_REPO_NAME[hamcrest]}-${PLUGINS_COMMIT[hamcrest]}"
+PLUGINS_URL[hamcrest]="https://github.com/hyperthunk/${PLUGINS_REPO_NAME[hamcrest]}/archive/${PLUGINS_COMMIT[hamcrest]}.zip"
+
+PLUGINS_REPO_NAME[jiffy]=jiffy
+PLUGINS_COMMIT[jiffy]=0.14.5
+PLUGINS_PV[jiffy]="${PLUGINS_REPO_NAME[jiffy]}-${PLUGINS_COMMIT[jiffy]}"
+PLUGINS_URL[jiffy]="https://github.com/davisp/${PLUGINS_REPO_NAME[jiffy]}/archive/${PLUGINS_COMMIT[jiffy]}.zip"
+
+PLUGINS_REPO_NAME[lager]=lager
+PLUGINS_COMMIT[lager]=3.0.2
+PLUGINS_PV[lager]="${PLUGINS_REPO_NAME[lager]}-${PLUGINS_COMMIT[lager]}"
+PLUGINS_URL[lager]="https://github.com/basho/${PLUGINS_REPO_NAME[lager]}/archive/${PLUGINS_COMMIT[lager]}.zip"
+
+PLUGINS_REPO_NAME[meck]=meck
+PLUGINS_COMMIT[meck]=0.8.2
+PLUGINS_PV[meck]="${PLUGINS_REPO_NAME[meck]}-${PLUGINS_COMMIT[meck]}"
+PLUGINS_URL[meck]="https://github.com/eproxus/${PLUGINS_REPO_NAME[meck]}/archive/${PLUGINS_COMMIT[meck]}.zip"
+
+PLUGINS_REPO_NAME[oauth2]=oauth2
+PLUGINS_COMMIT[oauth2]=8d129fbf8866930b4ffa6dd84e65bd2b32b9acb8
+PLUGINS_PV[oauth2]="${PLUGINS_REPO_NAME[oauth2]}-${PLUGINS_COMMIT[oauth2]}"
+PLUGINS_URL[oauth2]="https://github.com/kivra/${PLUGINS_REPO_NAME[oauth2]}/archive/${PLUGINS_COMMIT[oauth2]}.zip"
+
+PLUGINS_REPO_NAME[p1_iconv]=eiconv
+PLUGINS_COMMIT[p1_iconv]=0.9.0
+PLUGINS_PV[p1_iconv]="${PLUGINS_REPO_NAME[p1_iconv]}-${PLUGINS_COMMIT[p1_iconv]}"
+PLUGINS_URL[p1_iconv]="https://github.com/processone/${PLUGINS_REPO_NAME[p1_iconv]}/archive/${PLUGINS_COMMIT[p1_iconv]}.zip"
+
+PLUGINS_REPO_NAME[p1_logger]=p1_logger
+PLUGINS_COMMIT[p1_logger]=1.0.0
+PLUGINS_PV[p1_logger]="${PLUGINS_REPO_NAME[p1_logger]}-${PLUGINS_COMMIT[p1_logger]}"
+PLUGINS_URL[p1_logger]="https://github.com/processone/${PLUGINS_REPO_NAME[p1_logger]}/archive/${PLUGINS_COMMIT[p1_logger]}.zip"
+
+PLUGINS_REPO_NAME[p1_mysql]=mysql
+PLUGINS_COMMIT[p1_mysql]=1.0.0
+PLUGINS_PV[p1_mysql]="${PLUGINS_REPO_NAME[p1_mysql]}-${PLUGINS_COMMIT[p1_mysql]}"
+PLUGINS_URL[p1_mysql]="https://github.com/processone/${PLUGINS_REPO_NAME[p1_mysql]}/archive/${PLUGINS_COMMIT[p1_mysql]}.zip"
+
+PLUGINS_REPO_NAME[p1_pam]=epam
+PLUGINS_COMMIT[p1_pam]=1.0.0
+PLUGINS_PV[p1_pam]="${PLUGINS_REPO_NAME[p1_pam]}-${PLUGINS_COMMIT[p1_pam]}"
+PLUGINS_URL[p1_pam]="https://github.com/processone/${PLUGINS_REPO_NAME[p1_pam]}/archive/${PLUGINS_COMMIT[p1_pam]}.zip"
+
+PLUGINS_REPO_NAME[p1_pgsql]=pgsql
+PLUGINS_COMMIT[p1_pgsql]=1.0.0
+PLUGINS_PV[p1_pgsql]="${PLUGINS_REPO_NAME[p1_pgsql]}-${PLUGINS_COMMIT[p1_pgsql]}"
+PLUGINS_URL[p1_pgsql]="https://github.com/processone/${PLUGINS_REPO_NAME[p1_pgsql]}/archive/${PLUGINS_COMMIT[p1_pgsql]}.zip"
+
+PLUGINS_REPO_NAME[p1_stringprep]=stringprep
+PLUGINS_COMMIT[p1_stringprep]=1.0.0
+PLUGINS_PV[p1_stringprep]="${PLUGINS_REPO_NAME[p1_stringprep]}-${PLUGINS_COMMIT[p1_stringprep]}"
+PLUGINS_URL[p1_stringprep]="https://github.com/processone/${PLUGINS_REPO_NAME[p1_stringprep]}/archive/${PLUGINS_COMMIT[p1_stringprep]}.zip"
+
+PLUGINS_REPO_NAME[p1_stun]=stun
+PLUGINS_COMMIT[p1_stun]=0.9.0
+PLUGINS_PV[p1_stun]="${PLUGINS_REPO_NAME[p1_stun]}-${PLUGINS_COMMIT[p1_stun]}"
+PLUGINS_URL[p1_stun]="https://github.com/processone/${PLUGINS_REPO_NAME[p1_stun]}/archive/${PLUGINS_COMMIT[p1_stun]}.zip"
+
+PLUGINS_REPO_NAME[p1_tls]=tls
+PLUGINS_COMMIT[p1_tls]=1.0.0
+PLUGINS_PV[p1_tls]="${PLUGINS_REPO_NAME[p1_tls]}-${PLUGINS_COMMIT[p1_tls]}"
+PLUGINS_URL[p1_tls]="https://github.com/processone/${PLUGINS_REPO_NAME[p1_tls]}/archive/${PLUGINS_COMMIT[p1_tls]}.zip"
+
+PLUGINS_REPO_NAME[p1_utils]=p1_utils
+PLUGINS_COMMIT[p1_utils]=1.0.2
+PLUGINS_PV[p1_utils]="${PLUGINS_REPO_NAME[p1_utils]}-${PLUGINS_COMMIT[p1_utils]}"
+PLUGINS_URL[p1_utils]="https://github.com/processone/${PLUGINS_REPO_NAME[p1_utils]}/archive/${PLUGINS_COMMIT[p1_utils]}.zip"
+
+PLUGINS_REPO_NAME[p1_xml]=xml
+PLUGINS_COMMIT[p1_xml]=1.1.1
+PLUGINS_PV[p1_xml]="${PLUGINS_REPO_NAME[p1_xml]}-${PLUGINS_COMMIT[p1_xml]}"
+PLUGINS_URL[p1_xml]="https://github.com/processone/${PLUGINS_REPO_NAME[p1_xml]}/archive/${PLUGINS_COMMIT[p1_xml]}.zip"
+
+PLUGINS_REPO_NAME[p1_yaml]=p1_yaml
+PLUGINS_COMMIT[p1_yaml]=1.0.0
+PLUGINS_PV[p1_yaml]="${PLUGINS_REPO_NAME[p1_yaml]}-${PLUGINS_COMMIT[p1_yaml]}"
+PLUGINS_URL[p1_yaml]="https://github.com/processone/${PLUGINS_REPO_NAME[p1_yaml]}/archive/${PLUGINS_COMMIT[p1_yaml]}.zip"
+
+PLUGINS_REPO_NAME[p1_zlib]=zlib
+PLUGINS_COMMIT[p1_zlib]=1.0.0
+PLUGINS_PV[p1_zlib]="${PLUGINS_REPO_NAME[p1_zlib]}-${PLUGINS_COMMIT[p1_zlib]}"
+PLUGINS_URL[p1_zlib]="https://github.com/processone/${PLUGINS_REPO_NAME[p1_zlib]}/archive/${PLUGINS_COMMIT[p1_zlib]}.zip"
+
+PLUGINS_REPO_NAME[protobuffs]=erlang_protobuffs
+PLUGINS_COMMIT[protobuffs]=6e7fc924506e2dc166a6170e580ce1d95ebbd5bd
+PLUGINS_PV[protobuffs]="${PLUGINS_REPO_NAME[protobuffs]}-${PLUGINS_COMMIT[protobuffs]}"
+PLUGINS_URL[protobuffs]="https://github.com/basho/${PLUGINS_REPO_NAME[protobuffs]}/archive/${PLUGINS_COMMIT[protobuffs]}.zip"
+
+PLUGINS_REPO_NAME[rebar_elixir_plugin]=rebar_elixir_plugin
+PLUGINS_COMMIT[rebar_elixir_plugin]=0.1.0
+PLUGINS_PV[rebar_elixir_plugin]="${PLUGINS_REPO_NAME[rebar_elixir_plugin]}-${PLUGINS_COMMIT[rebar_elixir_plugin]}"
+PLUGINS_URL[rebar_elixir_plugin]="https://github.com/processone/${PLUGINS_REPO_NAME[rebar_elixir_plugin]}/archive/${PLUGINS_COMMIT[rebar_elixir_plugin]}.zip"
+
+PLUGINS_REPO_NAME[riakc]=riak-erlang-client
+PLUGINS_COMMIT[riakc]=527722d12d0433b837cdb92a60900c2cb5df8942
+PLUGINS_PV[riakc]="${PLUGINS_REPO_NAME[riakc]}-${PLUGINS_COMMIT[riakc]}"
+PLUGINS_URL[riakc]="https://github.com/basho/${PLUGINS_REPO_NAME[riakc]}/archive/${PLUGINS_COMMIT[riakc]}.zip"
+
+PLUGINS_REPO_NAME[riak_pb]=riak_pb
+PLUGINS_COMMIT[riak_pb]=1a43334c03cfe81712c71c6f166b68fe9270f008
+PLUGINS_PV[riak_pb]="${PLUGINS_REPO_NAME[riak_pb]}-${PLUGINS_COMMIT[riak_pb]}"
+PLUGINS_URL[riak_pb]="https://github.com/basho/${PLUGINS_REPO_NAME[riak_pb]}/archive/${PLUGINS_COMMIT[riak_pb]}.zip"
+
+PLUGINS_REPO_NAME[sqlite3]=erlang-sqlite3
+PLUGINS_COMMIT[sqlite3]=cbc3505f7a131254265d3ef56191b2581b8cc172
+PLUGINS_PV[sqlite3]="${PLUGINS_REPO_NAME[sqlite3]}-${PLUGINS_COMMIT[sqlite3]}"
+PLUGINS_URL[sqlite3]="https://github.com/alexeyr/${PLUGINS_REPO_NAME[sqlite3]}/archive/${PLUGINS_COMMIT[sqlite3]}.zip"
+
+PLUGINS_REPO_NAME[xmlrpc]=xmlrpc
+PLUGINS_COMMIT[xmlrpc]=1.15
+PLUGINS_PV[xmlrpc]="${PLUGINS_REPO_NAME[xmlrpc]}-${PLUGINS_COMMIT[xmlrpc]}"
+PLUGINS_URL[xmlrpc]="https://github.com/rds13/${PLUGINS_REPO_NAME[xmlrpc]}/archive/${PLUGINS_COMMIT[xmlrpc]}.zip"
+
+inherit eutils multilib pam ssl-cert systemd
+
+DESCRIPTION="The Erlang Jabber Daemon"
+HOMEPAGE="http://www.ejabberd.im/ https://github.com/processone/ejabberd/"
+SRC_URI="http://www.process-one.net/downloads/${PN}/${PV}/${P}.tgz
+	mysql?	( "${PLUGINS_URL[p1_mysql]}" -> "${PLUGINS_PV[p1_mysql]}.zip" )
+	postgres? ( "${PLUGINS_URL[p1_pgsql]}" -> "${PLUGINS_PV[p1_pgsql]}.zip" )
+	sqlite?	( "${PLUGINS_URL[sqlite3]}" -> "${PLUGINS_PV[sqlite3]}.zip" )
+	pam?	( "${PLUGINS_URL[p1_pam]}" -> "${PLUGINS_PV[p1_pam]}.zip" )
+	zlib?	( "${PLUGINS_URL[p1_zlib]}" -> "${PLUGINS_PV[p1_zlib]}.zip" )
+	riak?	( "${PLUGINS_URL[riakc]}" -> "${PLUGINS_PV[riakc]}.zip"
+		  "${PLUGINS_URL[riak_pb]}" -> "${PLUGINS_PV[riak_pb]}.zip"
+		  "${PLUGINS_URL[hamcrest]}" -> "${PLUGINS_PV[hamcrest]}.zip"
+		  "${PLUGINS_URL[protobuffs]}" -> "${PLUGINS_PV[protobuffs]}.zip" )
+	elixir?	( "${PLUGINS_URL[rebar_elixir_plugin]}" -> "${PLUGINS_PV[rebar_elixir_plugin]}.zip"
+		  "${PLUGINS_URL[elixir]}" -> "${PLUGINS_PV[elixir]}.zip" )
+	iconv?	( "${PLUGINS_URL[p1_iconv]}" -> "${PLUGINS_PV[p1_iconv]}.zip" )
+	lager?	( "${PLUGINS_URL[lager]}" -> "${PLUGINS_PV[lager]}.zip"
+		  "${PLUGINS_URL[goldrush]}" -> "${PLUGINS_PV[goldrush]}.zip" )
+	!lager?	( "${PLUGINS_URL[p1_logger]}" -> "${PLUGINS_PV[p1_logger]}.zip" )
+	tools?	( "${PLUGINS_URL[meck]}" -> "${PLUGINS_PV[meck]}.zip" )
+	redis?	( "${PLUGINS_URL[eredis]}" -> "${PLUGINS_PV[eredis]}.zip" )
+"
+
+mods[core]="p1_tls p1_stringprep p1_xml esip p1_stun p1_yaml p1_utils cache_tab jiffy oauth2 xmlrpc"
+
+for plugin in ${mods[core]} ; do
+	SRC_URI+=" ${PLUGINS_URL[$plugin]} -> ${PLUGINS_PV[$plugin]}.zip" ; done
+
+RESTRICT="mirror"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~ia64 ~ppc ~sparc ~x86"
+EJABBERD_MODULES="mod_bosh mod_irc mod_muc mod_proxy65 mod_pubsub"
+IUSE="captcha debug elixir +iconv +lager ldap mssql mysql odbc pam postgres redis riak sqlite ssl tools +zlib ${EJABBERD_MODULES}"
+
+DEPEND=">=net-im/jabber-base-0.01
+	>=dev-libs/expat-1.95
+	>=dev-libs/libyaml-0.1.4
+	>=dev-lang/erlang-17.1[ssl]
+	odbc? ( dev-db/unixODBC[-minimal] )
+	ldap? ( =net-nds/openldap-2* )
+	dev-libs/openssl:0
+	captcha? ( media-gfx/imagemagick[truetype,png] )
+	zlib? ( >=sys-libs/zlib-1.2.3 )"
+RDEPEND="${DEPEND}
+	>=sys-apps/shadow-4.1.4.2-r3
+	elixir? ( !dev-lang/elixir )
+	pam? ( virtual/pam )"
+
+REQUIRED_USE="mssql? ( odbc )"
+
+# paths in net-im/jabber-base
+JABBER_ETC="${EPREFIX}/etc/jabber"
+#JABBER_RUN="/var/run/jabber"
+JABBER_SPOOL="${EPREFIX}/var/spool/jabber"
+JABBER_LOG="${EPREFIX}/var/log/jabber"
+JABBER_DOC="${EPREFIX}/usr/share/doc/${PF}"
+
+src_prepare() {
+	epatch "${FILESDIR}"/${P}-ejabberdctl.patch
+
+	#emulate rebar unpack
+	mkdir "${S}/deps"
+	for plugin in ${!PLUGINS_COMMIT[@]}; do
+	    mv "$WORKDIR/${PLUGINS_PV[$plugin]}" "$S/deps/${plugin}" 2>/dev/null
+	done
+	touch "${S}"/deps/.got
+
+	#patch rebar dependency checks
+	sed -e "s/vsn, git/vsn, \"0.14.4\"/" \
+		-i deps/jiffy/src/jiffy.app.src || die
+
+	if use riak; then
+	sed -e "s/vsn, git/vsn, \"2.1.1\"/" \
+		-i deps/riakc/src/riakc.app.src || die
+	sed -e "s/vsn, git/vsn, \"2.1.0.7\"/" \
+		-i deps/riak_pb/src/riak_pb.app.src || die
+	sed -e "s/vsn, git/vsn, \"0.8.2\"/" \
+		-i deps/protobuffs/src/protobuffs.app.src || die
+	fi
+
+#	if use elixir; then
+#	sed -e "s/vsn, git/vsn, \"0.1.0\"/" \
+#		-i deps/rebar_elixir_plugin/src/rebar_elixir_plugin.app.src || die
+#	fi
+
+	# don't install release notes (we'll do this manually)
+	sed '/install .* [.][.]\/doc\/[*][.]txt $(DOCDIR)/d' -i Makefile.in || die
+	# Set correct paths from jabber-base package
+	sed -e "/^EJABBERDDIR[[:space:]]*=/{s:ejabberd:${PF}:}" \
+		-e "/^ETCDIR[[:space:]]*=/{s:@sysconfdir@/ejabberd:${JABBER_ETC}:}" \
+		-e "/^LOGDIR[[:space:]]*=/{s:@localstatedir@/log/ejabberd:${JABBER_LOG}:}" \
+		-e "/^SPOOLDIR[[:space:]]*=/{s:@localstatedir@/lib/ejabberd:${JABBER_SPOOL}:}" \
+			-i Makefile.in || die
+	sed -e "/EJABBERDDIR=/{s:ejabberd:${PF}:}" \
+		-e "s|\(ETC_DIR=\){{sysconfdir}}.*|\1${JABBER_ETC}|" \
+		-e "s|\(LOGS_DIR=\){{localstatedir}}.*|\1${JABBER_LOG}|" \
+		-e "s|\(SPOOL_DIR=\){{localstatedir}}.*|\1${JABBER_SPOOL}|" \
+			-i ejabberdctl.template || die
+
+	# fix up the ssl cert paths in ejabberd.yml to use our cert and
+	# also use the correct pam service name
+	sed -e "s:/path/to/ssl.pem:/etc/ssl/ejabberd/server.pem:g" \
+		-e "s:pamservicename:xmpp:" \
+		-i ejabberd.yml.example || die
+
+	# correct path to captcha script in default ejabberd.yml
+	sed -e 's|\(captcha_cmd:[[:space:]]*"\).\+"|\1/usr/'$(get_libdir)'/erlang/lib/'${PN}'/'${P}'/priv/bin/captcha.sh"}|' \
+		-i ejabberd.yml.example || die
+
+	# disable mod_irc in ejabberd.yml
+	if ! use mod_irc; then
+		sed -e "s/{mod_irc,/%{mod_irc,/" \
+			-i ejabberd.yml.example || die
+	fi
+
+	epatch_user
+}
+
+src_configure() {
+	econf \
+		--docdir="${EPREFIX}/usr/share/doc/${PF}/html" \
+		--libdir="${EPREFIX}/usr/$(get_libdir)/erlang/lib/${PN}/" \
+		$(use_enable tools) \
+		$(use_enable odbc) \
+		$(use_enable mysql) \
+		$(use_enable mssql) \
+		$(use_enable pam) \
+		$(use_enable postgres pgsql) \
+		$(use_enable zlib) \
+		$(use_enable sqlite) \
+		$(use_enable riak) \
+		$(use_enable redis) \
+		$(use_enable iconv) \
+		$(use_enable elixir) \
+		$(use_enable debug) \
+		$(use_enable lager) \
+		--enable-user=jabber
+}
+
+src_compile() {
+	emake $(use debug && echo debug=true ejabberd_debug=true)
+}
+
+src_install() {
+	default
+
+	# Pam helper module permissions
+	# http://docs.ejabberd.im/admin/guide/configuration/#pam-authentication
+	if use pam; then
+		pamd_mimic_system xmpp auth account || die "Cannot create pam.d file"
+		local epamdir="p1_pam-${PLUGINS_COMMIT[p1_pam]}"
+		fowners root:jabber "/usr/$(get_libdir)/erlang/lib/${PN}/${epamdir}/priv/bin/epam"
+		fperms 4750 "/usr/$(get_libdir)/erlang/lib/${PN}/${epamdir}/priv/bin/epam"
+	fi
+
+	newinitd "${FILESDIR}"/${PN}-3.initd ${PN}
+	newconfd "${FILESDIR}"/${PN}-3.confd ${PN}
+	systemd_dounit "${FILESDIR}"/${PN}.service
+	systemd_dotmpfilesd "${FILESDIR}"/${PN}.tmpfiles.conf
+
+	insinto /etc/logrotate.d
+	newins "${FILESDIR}"/${PN}.logrotate ${PN}
+}
+
+pkg_postinst() {
+	if [[ -z ${REPLACING_VERSIONS} ]] ; then
+		elog "For configuration instructions, please see"
+		elog "/usr/share/doc/${PF}/html/guide.html, or the online version at"
+		elog "http://docs.ejabberd.im/admin/guide/"
+	else
+		elog "Ejabberd now defaults to using a YAML format for its config file."
+		elog "The old ejabberd.cfg file can be converted using the following instructions:"
+		echo
+		elog "1. Make sure all processes related to the previous version of ejabberd aren't running."
+		elog "   Usually this just means the ejabberd daemon and possibly the pam-related processes"
+		elog "   (epmd and epam) if pam support is enabled."
+		elog "2. Run \`ejabberdctl start\` with sufficient permissions. Note that this can fail to"
+		elog "   start ejabberd properly for various reasons. Check ejabberd's main log file"
+		elog "   at /var/log/jabber/ejabberd.log to confirm it started successfully."
+		elog "3. Run \`ejabberdctl convert_to_yaml /etc/jabber/ejabberd.cfg /etc/jabber/ejabberd.yml.new\`"
+		elog "   with sufficient permissions, edit and rename /etc/jabber/ejabberd.yml.new to"
+		elog "   /etc/jabber/ejabberd.yml, and finally restart ejabberd with the new config file."
+		echo
+	fi
+
+	SSL_ORGANIZATION="${SSL_ORGANIZATION:-Ejabberd XMPP Server}"
+	install_cert /etc/ssl/ejabberd/server
+	# Fix ssl cert permissions bug #369809
+	chown root:jabber "${EROOT}/etc/ssl/ejabberd/server.pem"
+	chmod 0440 "${EROOT}/etc/ssl/ejabberd/server.pem"
+}

diff --git a/net-im/ejabberd/files/ejabberd-16.01-ejabberdctl.patch b/net-im/ejabberd/files/ejabberd-16.01-ejabberdctl.patch
new file mode 100644
index 0000000..7a1c9e6
--- /dev/null
+++ b/net-im/ejabberd/files/ejabberd-16.01-ejabberdctl.patch
@@ -0,0 +1,49 @@
+Set SHELL since the generic jabber user used on Gentoo for jabber servers
+doesn't have a valid shell set by default and fix EXEC_CMD otherwise it fails
+with "This account is currently not available" again due to jabber not having
+a valid shell.
+
+Also, workaround the assumption that jabber's $HOME is a directory when instead
+it defaults to /dev/null on Gentoo.
+
+--- ejabberdctl.template	2016-01-12 11:07:58.000000000 +0000
++++ ejabberdctl.template.new	2016-02-15 21:36:27.508297627 +0000
+@@ -16,6 +16,7 @@
+ EPMD={{bindir}}/epmd
+ INSTALLUSER={{installuser}}
+ ERL_LIBS={{libdir}}
++SHELL=/bin/sh
+ 
+ # check the proper system user is used if defined
+ if [ "$INSTALLUSER" != "" ] ; then
+@@ -23,11 +24,11 @@
+     for GID in `id -G`; do
+         if [ $GID -eq 0 ] ; then
+             INSTALLUSER_HOME=$(getent passwd "$INSTALLUSER" | cut -d: -f6)
+-            if [ -n "$INSTALLUSER_HOME" ] && [ ! -d "$INSTALLUSER_HOME" ] ; then
++            if [ -n "$INSTALLUSER_HOME" ] && [ ! -e "$INSTALLUSER_HOME" ] ; then
+                 mkdir -p "$INSTALLUSER_HOME"
+                 chown "$INSTALLUSER" "$INSTALLUSER_HOME"
+             fi
+-            EXEC_CMD="su $INSTALLUSER -c"
++            EXEC_CMD="su $INSTALLUSER -p -c"
+         fi
+     done
+     if [ `id -g` -eq `id -g $INSTALLUSER` ] ; then
+@@ -100,6 +101,7 @@
+ DATETIME=`date "+%Y%m%d-%H%M%S"`
+ ERL_CRASH_DUMP=$LOGS_DIR/erl_crash_$DATETIME.dump
+ ERL_INETRC=$ETC_DIR/inetrc
++HOME=$SPOOL_DIR
+ 
+ # define mnesia options
+ MNESIA_OPTS="-mnesia dir \"\\\"$SPOOL_DIR\\\"\" $MNESIA_OPTIONS"
+@@ -159,6 +161,8 @@
+ export CONTRIB_MODULES_PATH
+ export CONTRIB_MODULES_CONF_DIR
+ export ERL_LIBS
++export HOME
++export SHELL
+ 
+ shell_escape()
+ {

diff --git a/net-im/ejabberd/metadata.xml b/net-im/ejabberd/metadata.xml
index 8f5537e..45ac1e3 100644
--- a/net-im/ejabberd/metadata.xml
+++ b/net-im/ejabberd/metadata.xml
@@ -17,11 +17,16 @@
 		<flag name="captcha">Support for CAPTCHA Forms (XEP-158)</flag>
 		<flag name="mod_proxy65">Support for SOCKS5 Bytestreams (XEP-0065)</flag>
 		<flag name="mod_statsdx">Measures several statistics, and provides a new section in ejabberd Web Admin to view them.</flag>
-		<flag name="elixir">Enable Elixir language support (http://elixir-lang.org/)</flag>
+		<flag name="elixir">Enable Elixir language support (http://elixir-lang.org/). Use bundled plugin instead of dev-lang/elixir.</flag>
+		<flag name="lager">Use lager Erlang logging tool instead of standard error logger</flag>
 		<flag name="mod_bosh">Enable support for XMPP over BOSH (XEP-0206)</flag>
 		<flag name="mod_irc">Build irc gateway</flag>
 		<flag name="mod_muc">Build Multi User Chat module</flag>
 		<flag name="mod_pubsub">Build Pubsub module</flag>
+		<flag name="mssql">Build Microsoft SQL Server support</flag>
+		<flag name="mysql">Build Native MySQL support</flag>
+		<flag name="odbc">Build ODBC data storage support</flag>
+		<flag name="postgres">Build Native PostgreSQL support</flag>
 		<flag name="redis">Enable Redis support</flag>
 		<flag name="riak">Enable Riak support</flag>
 		<flag name="tools">Build development tools</flag>


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: net-im/ejabberd/files/, net-im/ejabberd/
@ 2016-08-21 10:49 Amadeusz Piotr Żołnowski
  0 siblings, 0 replies; 12+ messages in thread
From: Amadeusz Piotr Żołnowski @ 2016-08-21 10:49 UTC (permalink / raw
  To: gentoo-commits

commit:     c8542b3bce05ec947f3c3b0a1718624acb54791e
Author:     Amadeusz Żołnowski <aidecoe <AT> gentoo <DOT> org>
AuthorDate: Sun Aug 21 10:49:14 2016 +0000
Commit:     Amadeusz Piotr Żołnowski <aidecoe <AT> gentoo <DOT> org>
CommitDate: Sun Aug 21 10:49:14 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c8542b3b

net-im/ejabberd: Remove older, bundled version of ejabberd

Clean up unused flags in metadata.xml.

Package-Manager: portage-2.3.0

 net-im/ejabberd/Manifest                           |  29 --
 net-im/ejabberd/ejabberd-16.01-r1.ebuild           | 348 ---------------------
 .../files/ejabberd-16.01-ejabberdctl.patch         |  49 ---
 net-im/ejabberd/metadata.xml                       |  10 +-
 4 files changed, 1 insertion(+), 435 deletions(-)

diff --git a/net-im/ejabberd/Manifest b/net-im/ejabberd/Manifest
index b2fcc5e..bba25e2 100644
--- a/net-im/ejabberd/Manifest
+++ b/net-im/ejabberd/Manifest
@@ -1,30 +1 @@
-DIST cache_tab-1.0.1.zip 16719 SHA256 149eff4dfb01f633cab643f368e5f96825c26c85ae9e6c22de3f5792e5d3dc28 SHA512 ada72a578359909201d62ad775ca85969aed5cab9be31d38bd505f726434d08bb311f06654f3f26a3b639b9ae2742dd1950ba527489aef84f2ac0dfdb7fba0c8 WHIRLPOOL d026a7452274cb8cfd536da4c5dbabaf0414ddaa5fe835aa80d825d1afae9f952a71e61eaa825d89ee65f6a1d4db9714c3710e7ed36c8fac1be73730e732f362
-DIST eiconv-0.9.0.zip 101407 SHA256 fdaa09bcc79b556f2250c4693bc57c89ce474a5ea6ea12429cbb6c2d4ed3619b SHA512 44d0af378b9873dede92657c53557a565050cd4259598a1fe92e1c9bddc8219922ff093bfc20e380f3e39fc0d5648d6d6f72766a5847781cf2101dbd4b922fb6 WHIRLPOOL 97d97f527aaf4d0fb0176723bde464ab003b49b12acca1f657efe83f8c03186e6b4819f4aadedebb8e703e16cc4af23d317b6ebebe96a9a794e6aa78c8e6fc80
-DIST ejabberd-16.01.tgz 1651587 SHA256 e2cc479d5870539b2e6756690b227969c88a541d464d1fc6e1cbf7270ad7d681 SHA512 f0614db0d0eaf6d4f25b75b8eefbcf93260549876535fd5d82498c75779d182b19ec249ffb9b1b168cb5a887e8e6933eb868892b4aa5cd2933b739d263adca8a WHIRLPOOL 65bc13ba5e380a999ed2ae9c816856f90e24393343d16ae52349350687dfdb15857a3358d856de5694c30718cefc5513b9d3c75871bb368cac54547becc1607a
 DIST ejabberd-16.04.tar.gz 1715963 SHA256 3d964fe74e438253c64c8498eb7465d2440823614a23df8d33bdf40126d72cc3 SHA512 5975d5a164060cca59b6d92de2c432f063061e832b2e03cae351fe3c16b178259489dc0b82ea800f1c2388eeb7e3aa4340630ad3c10a22cc6d6f0b4eef8fa0f2 WHIRLPOOL d9018835aaa736040f63222c73b54ea65385532989390c007f4cb736b474da40d9fdceb6c377a251398fb6de87869a13dec0ac160fe9a0d081337efd35dc66b4
-DIST elixir-f2a9c7016633ca63541a8160c63a53eb7edbccdb.zip 1335681 SHA256 4ef8cd93e68a314bb4702547629f9be7a6bb840f6b7956aead6f51700e73c41a SHA512 a6e5170f8d3efc1d31aa82477f4ff377ea7205d106bbf633075df5bef0b22a276cc6897c2a8b7fcbbff269c9fe8378f4802876e0e2aecb90012c0c2165c2b8e8 WHIRLPOOL 716e45804df24b7a4a55e0ad81f72c9961e4066dd3e24b1e3cd1ba041c6c1dc8426d0feaf97580eaf9b369d0fee33cb9e3c26b71eaf6c91d318590e9e6b5ab0c
-DIST epam-1.0.0.zip 47889 SHA256 6704010b14034881d8c60f52d1a82d8125f20cdf1e52a7113c838f1db6be7e81 SHA512 710919ff2883a5e1a99703f3b72ad8a0d61c612b2af66b57b88a6bd9faddc64c61b8b44998feb37d3d3338d24d4c1d8d6a73d6836e254b8f8452249b41427c78 WHIRLPOOL 48a9fedc2fa52a7d5dc1cdcf11a48096798cd87d37987b709ffd0c6cf49881f9afec7fd85b3f8d84020e41920e129534d5f8d6adce92916370ab3a413d4919c9
-DIST eredis-cbc013f516e464706493c01662e5e9dd82d1db01.zip 133223 SHA256 707c54c568b6d07a4a1ac82a528cabef73469136cc14b4f69457e28de9827227 SHA512 fbaa323da0d668fc7147bc406dd4f00bd132d592d4fd3d61c2bee59f4b1c9390784a4c03737d6efd3b004855a92911878bfb11a966dc1853a785c9b10714f34f WHIRLPOOL d6713eef9328f70d6f003c4a27b560715d7a4c433d522dde3a99731e7b868353082b2ba62060fcefc6241977713627b57353ba47919553fe6eb47a554d3b7264
-DIST erlang-sqlite3-cbc3505f7a131254265d3ef56191b2581b8cc172.zip 1843206 SHA256 10db9c7f1a8b8fe16e5e5695a3085584c63dc6d074e56d5e8595e2cc82d0679d SHA512 37f0530e83d69efa02ad1bbc98a4da760d93a8fe764086832bc838a0905843e635d342917c6c6784d1cb3f87f8af8a27189d87a25096bfccf36a561bd66e9696 WHIRLPOOL f25270e56bfd0a168c4a20ce0eb016ec3ee8313d5a78de221134e34ccc7cfa6c4a59d78374c9ae08daf1cdc8f76f26028a796b4b8065664b1a47df7450d0883e
-DIST erlang_protobuffs-6e7fc924506e2dc166a6170e580ce1d95ebbd5bd.zip 255081 SHA256 a8d329ca06631951e8dd723ee07a28d84056efdfcf107ffc4390773de2c2652d SHA512 58d01ef598ca4b1894353a57cc561889b4b80f032df3bee1a0661edcb1f02775177a3655e85526ac855af128700a528987ad64854e3a4e6bf885778d0c76cc85 WHIRLPOOL 5f221d1bfe61f23290bbd5067a1c60a15e302cfb484df592bd92a27788803e7b66ca560a0ef575c592ab33a684f8fa0a5eeed31d6a2281fa388fd6d1eebc3871
-DIST goldrush-212299233c7e7eb63a97be2777e1c05ebaa58dbe.zip 36124 SHA256 529fd62c47a995e6efa4e96a015402177bc54d6f6c68e035799025679223f359 SHA512 af9999a8e687e3f06b2cbbdac2cc2933e4a136698661da350e16b1ecac34bbccdae9175d5a4e1ce2a4e237d0d8e846fcfb00d3a7143a5ac0c230a73dfef6c660 WHIRLPOOL 5cff5953b8c4096d8ec402f3be6ee94e839e50d3c087468d48c63ce914a50f35c80f93f2920564cdd74faeaa5047eb8a7176045c834347ffcc2566333540f4b8
-DIST hamcrest-erlang-908a24fda4a46776a5135db60ca071e3d783f9f6.zip 174732 SHA256 74c28779da72861132cc4c641dcafd1185e0579280b092fd2eeee6089e02cfcf SHA512 0110f69640cdd762a0d939fcda9d3a3da5942335f31b580dd7712c2c50ba53ec97b43f6d5f059db075597d7978e3b089f83dce1d86eb586cad80832ef8612406 WHIRLPOOL 1fff0a6d979309c657a139d37b26e8ccf3e3f0b779c55d1db0bd5e27a557733a9d95e4f63714a495e5926176aa37410df2eb68adf268b9e27fde7eb7fa8c5475
-DIST jiffy-0.14.5.zip 1899711 SHA256 80e7bc14aab3e9dbfb6b930eb99807843bce9902c37cba145f601e1d47e3633b SHA512 f8a021111501db2646b1b806a9260f2eda40d7aa4d58454fb445e75dbaeb9efcda74403b0c2a1d00a7d102ee9133abb813980692842fd4c899c42a2588f07e5f WHIRLPOOL 7f55d12e016058ad0c126a6721f8e05215518c49e088d4c6ca861073174c0de1f9ef599fc1278584ce4f120581072525ed9b6b312a882c7260a77137fe9be0e6
-DIST lager-3.0.2.zip 254249 SHA256 ccb4811774b847fa31b35dbd85edde0560406b1a0dc9c3f2dc71d69ccf687e61 SHA512 69143704067a5a757713d9fb127bac0ef799bb4d6a06e47d9426f1893a0156ad31289b42f55b8ff5a5b15ec8b3b82548485989eae75ef84641e5b4728a89811e WHIRLPOOL d91d106c8fea377e9a30df4d55c74f9b4768c0f3f265f19a69c50465b6479fcd836b9a4b203b2feeb69d00da83ce83b63b7e1e8649a4c29e63c3f779a7301799
-DIST meck-0.8.2.zip 222637 SHA256 c6ba50da30d30e904067f9ea661028dbea3b33c4c5f7631c1fb893ac264f91ec SHA512 58b98b665f56c1b0416e47e7f7e7b94cfbcaca2dc26571802ebb6cdb6fb79ab6207e27a0ee981efa25ed034b602f0abcac33ee4ac23ffef19ba2c02aa845d4e3 WHIRLPOOL d104084426cda735758a8ad4e46819a926431826bb1f32dfbaede39ce5acda920992ea744f852b39cf608bb69c350e7b42b143c7d248adb09f7b45fd0c5dbf39
-DIST mysql-1.0.0.zip 21330 SHA256 3d240192062ee8e78be218b7f365ff5ade5beeef16bd8315077338f4cb2c20b9 SHA512 554573b8d570bb001998196e44d71ae7fc0c87f35badaa3dc2a39695fb847d49ef95e140bf0668843e5593a78e35cc8ababb8cd9f181718c4434bc965f7eea0e WHIRLPOOL 7f3b6ac53e504cd311251fce1eeb3854f333c073b13b65e333139d4071cfac2df3cd9afb943f57a0f5de6468bc7d06e8da63134643ae09c7106fcdc7b7073b40
-DIST oauth2-8d129fbf8866930b4ffa6dd84e65bd2b32b9acb8.zip 225059 SHA256 8e043e96eabd4ced74f7f5b6c4ff6606c3027bc9ca9d807f6a348f4e0e4c66b3 SHA512 c9257054f579badfa78653b9deaabdd4fa71f84b742bdfb2dab1fb0fffa52d40b6236f01523c67ecc61068d9dbfd4a2ab2c19b9b90fa926dc359f76cfa18085b WHIRLPOOL 2e35022969739844a9b08cbd3149c204cd6798d6f8f009134a3c0d2cc14e46d6c3ef06f9d87a8f65a2cbb6915087be643a7040498ee4c1698d1a14978381ecb4
-DIST p1_logger-1.0.0.zip 21168 SHA256 416026a99ee3ae739d1cb7cccfe0546635e441b16433cd8e5ff0a76e8f72a9c0 SHA512 11dafee5ba7d726a5f526583533d8ce1a5cf247c16b1ed4c2617a8cc46fcb3dc9358c70e6924c4b7b5b6911d99fa8a57adfc8b3b40ade6cc798f0f5c2b040810 WHIRLPOOL c4cb246c0d9121f2d9097b5cf63372f14a32f3b147202763a605e519f80fa60e1331a1ad5a03ca32445df2555aeaaa5f6fd79d44b2cf4ebdce0ebc514a9b1713
-DIST p1_sip-1.0.0.zip 268267 SHA256 d21b4468f32483817ddd81aef1896e112939118c6c93768a241ab37a10649171 SHA512 987051968696a04969e00e5a43e5787cfdd52c453829b822b2ed065fa31e265ddef4e367ec5bb0d1ed260e3b46a5085efbc845195c29b6d8c14e2a85a31204b3 WHIRLPOOL e5254cbb8fb57324da3fab5708f390d6ef52e29f47da72707b4f6f27d87c55d7963dd6669c96dfe58be44578b0cec38f95efc3dcff3dc60d44c405a601a4c0bb
-DIST p1_utils-1.0.2.zip 41661 SHA256 9fd24f82aecbe6681a4cff9d3e515847afc77d1562ace5b704f2b566de0ffc8d SHA512 836db43bec11405bc229c4b6e7aff4d17869d32b9d51b523447b3fe53523d527db9aeb5b69d3c1fc010ebed1f597814d1b403331aadae5bfca97845082aa3d0b WHIRLPOOL cf0e8b1b5a8b4b70ebb3a6041bab1c90ac953c678cd7e6c9cf0519c2c9a5e416ad0fbb3be53d79170073f71603f7607261ce6e35c50890297a0ae9cd26fcdc38
-DIST p1_yaml-1.0.0.zip 196536 SHA256 02d60f14b5510469bdff8a9ce091035cde6b87ee44e896ec11c18c3479f09ebe SHA512 105cc9c29db5bf6635c24b1be44a06e4c982b8d03de56655a6a7ed7c24343d47652279243f3fc28417dde023cc570c519d5f2bbf9ba57f343459a61225e7476e WHIRLPOOL 8893fd98a00170fc8f1f7f51212f48027fefa068d61b75ef15d4785d6735d81e35c74bf98f30e7f6f693dcb6b4016a399ac692d8249fef0d2c2006712f35fccf
-DIST pgsql-1.0.0.zip 19384 SHA256 470bfee28dc0ce4d93fb7bf4d59e782e49dc03a040db5471d9f1e09c37f8a0c2 SHA512 9b637a337a14cd0175c3f64d34056e28957d8c38b2f151b0f4be489667ebc7231b7295523f7bf6328a0cd565a2b00b1ec81b8e885e33b2a79c3298fce908b517 WHIRLPOOL 281c13ac3151b70b56a07f172451c7af746e2a26c349126fc720a0588b35f86f66c1649b9122449468614d3158654991b3c257ce0a06a53194a893ddbdc1033c
-DIST rebar_elixir_plugin-0.1.0.zip 6553 SHA256 b9760890b74827805a35899c9c2e237c1b3e0f651446871b5095bb49e98bd09d SHA512 e4733c76fdb1f09222cbbbf61dbf274c39b3ec9ca286502782cbf6f967afcb6047e0d0f5464f4821f8ae8df7e7f156c21014c719147da029dbff29197047b7bf WHIRLPOOL cf003c2f232f70d5879561c8de13b6b5d8c238085b17d6dfcb7a71ea3728d687b8f4c5f1f114ec0d2934c0b52fe3de472aae7efb6ec42f5ef446f932c7decbbb
-DIST riak-erlang-client-527722d12d0433b837cdb92a60900c2cb5df8942.zip 242131 SHA256 ef3539206f774b1680a36c4ae50dc764b9b87a60efa2225d0b69c7064b24140e SHA512 e228be58754867a2f2084683c326ebc973b4e520d3ef33171b49833c33be8dda7749c09f8368a7cc92b67b866185efada1062a172515cf69340a75d50e97f35d WHIRLPOOL 651b3e3eedbcae36c21bdfe551623945be709a2890da28b352ba74f5a96c6d23eefe756fe9f6652c7dbfbb3e40330dd3fdf319eafa7372fe26e6bfc3590ab4a6
-DIST riak_pb-1a43334c03cfe81712c71c6f166b68fe9270f008.zip 235172 SHA256 485295f8123c163d43767ead3c66e58c4bc7e4f13a2dd55be6de263b51c42a4a SHA512 5c56bfbccd6c6bfa82f1772cbbf7228ed46ee23078c7eda2d2251ec0c97dae46786df8f17aa65fe672f89f425e86cfe07a37bf50a3a8f0c0747a9604c43d1d1a WHIRLPOOL d28aff0cc311dd9345a705b8e8d4066b26e8b25d6896c98e96098b5649bafced51b2b6437f282017a61c653efc54777d794834318da468ec2e10bb02c1d9a187
-DIST stringprep-1.0.0.zip 101552 SHA256 e2a71b59084f9556133a9c99ba4a6621f4853abfb902fa1301224d2fd6791aef SHA512 7b724c8eb888e3683b421220c823553ba695fb4d94225fcc968f2f8f1386a5090a0e2fd85113ebb7d67c50f687011ad461802cb89a52b4a26c02b03c9e72f123 WHIRLPOOL 46a1ceb7db35d7c231c12e47c0ea9599c9809bc763b90aa241b6b0dfca71d0d04f0b933c99c002805dc9f70f776585ed2e7b62ba47bf0cf61f05ae086d5dc97a
-DIST stun-0.9.0.zip 38634 SHA256 c99f2965f8832488abc8ad753afd538f6f492dd5bea1889cb4a787ed4bc2b7c6 SHA512 d4210ad5563aae291a6239256090c1dab4e98b62ece7474f25107a4bf6ba2e65d1c9858b26967a9546f81b64386979e4c020142a089be04d1b12f2f09353a38e WHIRLPOOL 564a14fbbf09ad6f9709d0b57004628105c63f35d9533c84bbb831c93eb392b914fa9cab419569a433d63f48ddd72d3f2b612d3260b22bcc1f08f02feaffca68
-DIST tls-1.0.0.zip 66622 SHA256 1434a7f580839f427b455b4f49ac504d26d97e9836f3bbdf59a130611a37c0f4 SHA512 84533d13e3aa631359e962597d3ea63d899a4bc4c776f05fcc78e46e3de9319ecbc653363c809f0a98c0a27e685f332cde64587b86bc9bb5a968058352beab06 WHIRLPOOL 89862f08f68e6bf478c1e25b168ae57c7fb7d253e953a3609f768f8aee8d42fb83ef09d317f05d4e6b7984a2da7a35ca735dfa4b5a3940ac10f4818caa238f04
-DIST xml-1.1.1.zip 94306 SHA256 2a9013ca2756dcd4c8b3387fcfa21ecc36b3e8cf50dd27afc8b80776f4c0892d SHA512 ccfd6929498b2f9ed17c4b7a1d0be13172b9a8304b00c3cbdfb49cc7df054c76cdf06844fa29fef7d17d45e5e2717c8fea22cd1eac61cf8293545310fe9098e7 WHIRLPOOL 1fb22cb2845c699a5fc8a8291d1ec804fa22e2c169b65f00ade151484a4c4d0d38a4cb9f1e90f3adad8eefb38c425823579d0b3ff90987b343b246607c19bae8
-DIST xmlrpc-1.15.zip 139769 SHA256 841488a5405f4a32182cae863c7305464daba7ed150dca55ec5b04f198df503a SHA512 a96fa31422e95b75afcdecd844fe020bb1be9144fc31d957a238658498d8ae4b8ed069d27e06ed105230b42a4fd4c37d95b4a09c96dbffd60e6a49faae94eead WHIRLPOOL cba32ff8c0024de1fff30620bbb0d93c1a49beb74ec1f58eeffc4de683ce1ad3743e2e30217834b285016a9cc4a7de596dfc8f6597a22fb5eb74478d12e2c7e0
-DIST zlib-1.0.0.zip 48754 SHA256 82f934a5ea146195a3046e56b38ef7bbdb3f04dbc6c5c05bec4245384f010a15 SHA512 f4598dd2e4dd5b27b9599d3aecdba690368d684a81309838655bf8dfc338573cf227f49aa0976940b7fd9ea97f7e881fdf88fea128fdc7bc99f2d78ffe42264a WHIRLPOOL def5ec392f3ba133a3b7462cc10edee41585c2f1d8580ccfbd4bb74f2fb327aa1d7a10b4a3fbe3b21c56aeab224861ea91e632758fd2e36f7f89ed0d8f2790be

diff --git a/net-im/ejabberd/ejabberd-16.01-r1.ebuild b/net-im/ejabberd/ejabberd-16.01-r1.ebuild
deleted file mode 100644
index 641239d..0000000
--- a/net-im/ejabberd/ejabberd-16.01-r1.ebuild
+++ /dev/null
@@ -1,348 +0,0 @@
-# Copyright 1999-2016 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI=5
-
-declare -A PLUGINS{_REPO_NAME,_COMMIT,_URL,_PV}
-declare -A mods
-
-# regenerate url list
-#for i in *; do pushd $i > /dev/null; name="$i"; rev=`git show-ref -s HEAD`; url=`git config remote.origin.url`; repo_base=`dirname "$url"`; repo_name=`basename "$url"`; echo "PLUGINS_REPO_NAME[$name]=$repo_name"; echo "PLUGINS_COMMIT[$name]=$rev"; echo "PLUGINS_PV[$name]=\"\${PLUGINS_REPO_NAME[$name]}-\${PLUGINS_COMMIT[$name]}\""; echo "PLUGINS_URL[$name]=\"$repo_base/\${PLUGINS_REPO_NAME[$name]}/archive/\${PLUGINS_COMMIT[$name]}.zip\""; echo; popd > /dev/null; done
-
-PLUGINS_REPO_NAME[cache_tab]=cache_tab
-PLUGINS_COMMIT[cache_tab]=1.0.1
-PLUGINS_PV[cache_tab]="${PLUGINS_REPO_NAME[cache_tab]}-${PLUGINS_COMMIT[cache_tab]}"
-PLUGINS_URL[cache_tab]="https://github.com/processone/${PLUGINS_REPO_NAME[cache_tab]}/archive/${PLUGINS_COMMIT[cache_tab]}.zip"
-
-PLUGINS_REPO_NAME[elixir]=elixir
-PLUGINS_COMMIT[elixir]=f2a9c7016633ca63541a8160c63a53eb7edbccdb
-PLUGINS_PV[elixir]="${PLUGINS_REPO_NAME[elixir]}-${PLUGINS_COMMIT[elixir]}"
-PLUGINS_URL[elixir]="https://github.com/elixir-lang/${PLUGINS_REPO_NAME[elixir]}/archive/${PLUGINS_COMMIT[elixir]}.zip"
-
-PLUGINS_REPO_NAME[eredis]=eredis
-PLUGINS_COMMIT[eredis]=cbc013f516e464706493c01662e5e9dd82d1db01
-PLUGINS_PV[eredis]="${PLUGINS_REPO_NAME[eredis]}-${PLUGINS_COMMIT[eredis]}"
-PLUGINS_URL[eredis]="https://github.com/wooga/${PLUGINS_REPO_NAME[eredis]}/archive/${PLUGINS_COMMIT[eredis]}.zip"
-
-PLUGINS_REPO_NAME[esip]=p1_sip
-PLUGINS_COMMIT[esip]=1.0.0
-PLUGINS_PV[esip]="${PLUGINS_REPO_NAME[esip]}-${PLUGINS_COMMIT[esip]}"
-PLUGINS_URL[esip]="https://github.com/processone/${PLUGINS_REPO_NAME[esip]}/archive/${PLUGINS_COMMIT[esip]}.zip"
-
-PLUGINS_REPO_NAME[goldrush]=goldrush
-PLUGINS_COMMIT[goldrush]=212299233c7e7eb63a97be2777e1c05ebaa58dbe
-PLUGINS_PV[goldrush]="${PLUGINS_REPO_NAME[goldrush]}-${PLUGINS_COMMIT[goldrush]}"
-PLUGINS_URL[goldrush]="https://github.com/DeadZen/${PLUGINS_REPO_NAME[goldrush]}/archive/${PLUGINS_COMMIT[goldrush]}.zip"
-
-PLUGINS_REPO_NAME[hamcrest]=hamcrest-erlang
-PLUGINS_COMMIT[hamcrest]=908a24fda4a46776a5135db60ca071e3d783f9f6
-PLUGINS_PV[hamcrest]="${PLUGINS_REPO_NAME[hamcrest]}-${PLUGINS_COMMIT[hamcrest]}"
-PLUGINS_URL[hamcrest]="https://github.com/hyperthunk/${PLUGINS_REPO_NAME[hamcrest]}/archive/${PLUGINS_COMMIT[hamcrest]}.zip"
-
-PLUGINS_REPO_NAME[jiffy]=jiffy
-PLUGINS_COMMIT[jiffy]=0.14.5
-PLUGINS_PV[jiffy]="${PLUGINS_REPO_NAME[jiffy]}-${PLUGINS_COMMIT[jiffy]}"
-PLUGINS_URL[jiffy]="https://github.com/davisp/${PLUGINS_REPO_NAME[jiffy]}/archive/${PLUGINS_COMMIT[jiffy]}.zip"
-
-PLUGINS_REPO_NAME[lager]=lager
-PLUGINS_COMMIT[lager]=3.0.2
-PLUGINS_PV[lager]="${PLUGINS_REPO_NAME[lager]}-${PLUGINS_COMMIT[lager]}"
-PLUGINS_URL[lager]="https://github.com/basho/${PLUGINS_REPO_NAME[lager]}/archive/${PLUGINS_COMMIT[lager]}.zip"
-
-PLUGINS_REPO_NAME[meck]=meck
-PLUGINS_COMMIT[meck]=0.8.2
-PLUGINS_PV[meck]="${PLUGINS_REPO_NAME[meck]}-${PLUGINS_COMMIT[meck]}"
-PLUGINS_URL[meck]="https://github.com/eproxus/${PLUGINS_REPO_NAME[meck]}/archive/${PLUGINS_COMMIT[meck]}.zip"
-
-PLUGINS_REPO_NAME[oauth2]=oauth2
-PLUGINS_COMMIT[oauth2]=8d129fbf8866930b4ffa6dd84e65bd2b32b9acb8
-PLUGINS_PV[oauth2]="${PLUGINS_REPO_NAME[oauth2]}-${PLUGINS_COMMIT[oauth2]}"
-PLUGINS_URL[oauth2]="https://github.com/kivra/${PLUGINS_REPO_NAME[oauth2]}/archive/${PLUGINS_COMMIT[oauth2]}.zip"
-
-PLUGINS_REPO_NAME[p1_iconv]=eiconv
-PLUGINS_COMMIT[p1_iconv]=0.9.0
-PLUGINS_PV[p1_iconv]="${PLUGINS_REPO_NAME[p1_iconv]}-${PLUGINS_COMMIT[p1_iconv]}"
-PLUGINS_URL[p1_iconv]="https://github.com/processone/${PLUGINS_REPO_NAME[p1_iconv]}/archive/${PLUGINS_COMMIT[p1_iconv]}.zip"
-
-PLUGINS_REPO_NAME[p1_logger]=p1_logger
-PLUGINS_COMMIT[p1_logger]=1.0.0
-PLUGINS_PV[p1_logger]="${PLUGINS_REPO_NAME[p1_logger]}-${PLUGINS_COMMIT[p1_logger]}"
-PLUGINS_URL[p1_logger]="https://github.com/processone/${PLUGINS_REPO_NAME[p1_logger]}/archive/${PLUGINS_COMMIT[p1_logger]}.zip"
-
-PLUGINS_REPO_NAME[p1_mysql]=mysql
-PLUGINS_COMMIT[p1_mysql]=1.0.0
-PLUGINS_PV[p1_mysql]="${PLUGINS_REPO_NAME[p1_mysql]}-${PLUGINS_COMMIT[p1_mysql]}"
-PLUGINS_URL[p1_mysql]="https://github.com/processone/${PLUGINS_REPO_NAME[p1_mysql]}/archive/${PLUGINS_COMMIT[p1_mysql]}.zip"
-
-PLUGINS_REPO_NAME[p1_pam]=epam
-PLUGINS_COMMIT[p1_pam]=1.0.0
-PLUGINS_PV[p1_pam]="${PLUGINS_REPO_NAME[p1_pam]}-${PLUGINS_COMMIT[p1_pam]}"
-PLUGINS_URL[p1_pam]="https://github.com/processone/${PLUGINS_REPO_NAME[p1_pam]}/archive/${PLUGINS_COMMIT[p1_pam]}.zip"
-
-PLUGINS_REPO_NAME[p1_pgsql]=pgsql
-PLUGINS_COMMIT[p1_pgsql]=1.0.0
-PLUGINS_PV[p1_pgsql]="${PLUGINS_REPO_NAME[p1_pgsql]}-${PLUGINS_COMMIT[p1_pgsql]}"
-PLUGINS_URL[p1_pgsql]="https://github.com/processone/${PLUGINS_REPO_NAME[p1_pgsql]}/archive/${PLUGINS_COMMIT[p1_pgsql]}.zip"
-
-PLUGINS_REPO_NAME[p1_stringprep]=stringprep
-PLUGINS_COMMIT[p1_stringprep]=1.0.0
-PLUGINS_PV[p1_stringprep]="${PLUGINS_REPO_NAME[p1_stringprep]}-${PLUGINS_COMMIT[p1_stringprep]}"
-PLUGINS_URL[p1_stringprep]="https://github.com/processone/${PLUGINS_REPO_NAME[p1_stringprep]}/archive/${PLUGINS_COMMIT[p1_stringprep]}.zip"
-
-PLUGINS_REPO_NAME[p1_stun]=stun
-PLUGINS_COMMIT[p1_stun]=0.9.0
-PLUGINS_PV[p1_stun]="${PLUGINS_REPO_NAME[p1_stun]}-${PLUGINS_COMMIT[p1_stun]}"
-PLUGINS_URL[p1_stun]="https://github.com/processone/${PLUGINS_REPO_NAME[p1_stun]}/archive/${PLUGINS_COMMIT[p1_stun]}.zip"
-
-PLUGINS_REPO_NAME[p1_tls]=tls
-PLUGINS_COMMIT[p1_tls]=1.0.0
-PLUGINS_PV[p1_tls]="${PLUGINS_REPO_NAME[p1_tls]}-${PLUGINS_COMMIT[p1_tls]}"
-PLUGINS_URL[p1_tls]="https://github.com/processone/${PLUGINS_REPO_NAME[p1_tls]}/archive/${PLUGINS_COMMIT[p1_tls]}.zip"
-
-PLUGINS_REPO_NAME[p1_utils]=p1_utils
-PLUGINS_COMMIT[p1_utils]=1.0.2
-PLUGINS_PV[p1_utils]="${PLUGINS_REPO_NAME[p1_utils]}-${PLUGINS_COMMIT[p1_utils]}"
-PLUGINS_URL[p1_utils]="https://github.com/processone/${PLUGINS_REPO_NAME[p1_utils]}/archive/${PLUGINS_COMMIT[p1_utils]}.zip"
-
-PLUGINS_REPO_NAME[p1_xml]=xml
-PLUGINS_COMMIT[p1_xml]=1.1.1
-PLUGINS_PV[p1_xml]="${PLUGINS_REPO_NAME[p1_xml]}-${PLUGINS_COMMIT[p1_xml]}"
-PLUGINS_URL[p1_xml]="https://github.com/processone/${PLUGINS_REPO_NAME[p1_xml]}/archive/${PLUGINS_COMMIT[p1_xml]}.zip"
-
-PLUGINS_REPO_NAME[p1_yaml]=p1_yaml
-PLUGINS_COMMIT[p1_yaml]=1.0.0
-PLUGINS_PV[p1_yaml]="${PLUGINS_REPO_NAME[p1_yaml]}-${PLUGINS_COMMIT[p1_yaml]}"
-PLUGINS_URL[p1_yaml]="https://github.com/processone/${PLUGINS_REPO_NAME[p1_yaml]}/archive/${PLUGINS_COMMIT[p1_yaml]}.zip"
-
-PLUGINS_REPO_NAME[p1_zlib]=zlib
-PLUGINS_COMMIT[p1_zlib]=1.0.0
-PLUGINS_PV[p1_zlib]="${PLUGINS_REPO_NAME[p1_zlib]}-${PLUGINS_COMMIT[p1_zlib]}"
-PLUGINS_URL[p1_zlib]="https://github.com/processone/${PLUGINS_REPO_NAME[p1_zlib]}/archive/${PLUGINS_COMMIT[p1_zlib]}.zip"
-
-PLUGINS_REPO_NAME[protobuffs]=erlang_protobuffs
-PLUGINS_COMMIT[protobuffs]=6e7fc924506e2dc166a6170e580ce1d95ebbd5bd
-PLUGINS_PV[protobuffs]="${PLUGINS_REPO_NAME[protobuffs]}-${PLUGINS_COMMIT[protobuffs]}"
-PLUGINS_URL[protobuffs]="https://github.com/basho/${PLUGINS_REPO_NAME[protobuffs]}/archive/${PLUGINS_COMMIT[protobuffs]}.zip"
-
-PLUGINS_REPO_NAME[rebar_elixir_plugin]=rebar_elixir_plugin
-PLUGINS_COMMIT[rebar_elixir_plugin]=0.1.0
-PLUGINS_PV[rebar_elixir_plugin]="${PLUGINS_REPO_NAME[rebar_elixir_plugin]}-${PLUGINS_COMMIT[rebar_elixir_plugin]}"
-PLUGINS_URL[rebar_elixir_plugin]="https://github.com/processone/${PLUGINS_REPO_NAME[rebar_elixir_plugin]}/archive/${PLUGINS_COMMIT[rebar_elixir_plugin]}.zip"
-
-PLUGINS_REPO_NAME[riakc]=riak-erlang-client
-PLUGINS_COMMIT[riakc]=527722d12d0433b837cdb92a60900c2cb5df8942
-PLUGINS_PV[riakc]="${PLUGINS_REPO_NAME[riakc]}-${PLUGINS_COMMIT[riakc]}"
-PLUGINS_URL[riakc]="https://github.com/basho/${PLUGINS_REPO_NAME[riakc]}/archive/${PLUGINS_COMMIT[riakc]}.zip"
-
-PLUGINS_REPO_NAME[riak_pb]=riak_pb
-PLUGINS_COMMIT[riak_pb]=1a43334c03cfe81712c71c6f166b68fe9270f008
-PLUGINS_PV[riak_pb]="${PLUGINS_REPO_NAME[riak_pb]}-${PLUGINS_COMMIT[riak_pb]}"
-PLUGINS_URL[riak_pb]="https://github.com/basho/${PLUGINS_REPO_NAME[riak_pb]}/archive/${PLUGINS_COMMIT[riak_pb]}.zip"
-
-PLUGINS_REPO_NAME[sqlite3]=erlang-sqlite3
-PLUGINS_COMMIT[sqlite3]=cbc3505f7a131254265d3ef56191b2581b8cc172
-PLUGINS_PV[sqlite3]="${PLUGINS_REPO_NAME[sqlite3]}-${PLUGINS_COMMIT[sqlite3]}"
-PLUGINS_URL[sqlite3]="https://github.com/alexeyr/${PLUGINS_REPO_NAME[sqlite3]}/archive/${PLUGINS_COMMIT[sqlite3]}.zip"
-
-PLUGINS_REPO_NAME[xmlrpc]=xmlrpc
-PLUGINS_COMMIT[xmlrpc]=1.15
-PLUGINS_PV[xmlrpc]="${PLUGINS_REPO_NAME[xmlrpc]}-${PLUGINS_COMMIT[xmlrpc]}"
-PLUGINS_URL[xmlrpc]="https://github.com/rds13/${PLUGINS_REPO_NAME[xmlrpc]}/archive/${PLUGINS_COMMIT[xmlrpc]}.zip"
-
-inherit eutils multilib pam ssl-cert systemd
-
-DESCRIPTION="The Erlang Jabber Daemon"
-HOMEPAGE="http://www.ejabberd.im/ https://github.com/processone/ejabberd/"
-SRC_URI="http://www.process-one.net/downloads/${PN}/${PV}/${P}.tgz
-	mysql?	( "${PLUGINS_URL[p1_mysql]}" -> "${PLUGINS_PV[p1_mysql]}.zip" )
-	postgres? ( "${PLUGINS_URL[p1_pgsql]}" -> "${PLUGINS_PV[p1_pgsql]}.zip" )
-	sqlite?	( "${PLUGINS_URL[sqlite3]}" -> "${PLUGINS_PV[sqlite3]}.zip" )
-	pam?	( "${PLUGINS_URL[p1_pam]}" -> "${PLUGINS_PV[p1_pam]}.zip" )
-	zlib?	( "${PLUGINS_URL[p1_zlib]}" -> "${PLUGINS_PV[p1_zlib]}.zip" )
-	riak?	( "${PLUGINS_URL[riakc]}" -> "${PLUGINS_PV[riakc]}.zip"
-		  "${PLUGINS_URL[riak_pb]}" -> "${PLUGINS_PV[riak_pb]}.zip"
-		  "${PLUGINS_URL[hamcrest]}" -> "${PLUGINS_PV[hamcrest]}.zip"
-		  "${PLUGINS_URL[protobuffs]}" -> "${PLUGINS_PV[protobuffs]}.zip" )
-	elixir?	( "${PLUGINS_URL[rebar_elixir_plugin]}" -> "${PLUGINS_PV[rebar_elixir_plugin]}.zip"
-		  "${PLUGINS_URL[elixir]}" -> "${PLUGINS_PV[elixir]}.zip" )
-	iconv?	( "${PLUGINS_URL[p1_iconv]}" -> "${PLUGINS_PV[p1_iconv]}.zip" )
-	lager?	( "${PLUGINS_URL[lager]}" -> "${PLUGINS_PV[lager]}.zip"
-		  "${PLUGINS_URL[goldrush]}" -> "${PLUGINS_PV[goldrush]}.zip" )
-	!lager?	( "${PLUGINS_URL[p1_logger]}" -> "${PLUGINS_PV[p1_logger]}.zip" )
-	tools?	( "${PLUGINS_URL[meck]}" -> "${PLUGINS_PV[meck]}.zip" )
-	redis?	( "${PLUGINS_URL[eredis]}" -> "${PLUGINS_PV[eredis]}.zip" )
-"
-
-mods[core]="p1_tls p1_stringprep p1_xml esip p1_stun p1_yaml p1_utils cache_tab jiffy oauth2 xmlrpc"
-
-for plugin in ${mods[core]} ; do
-	SRC_URI+=" ${PLUGINS_URL[$plugin]} -> ${PLUGINS_PV[$plugin]}.zip" ; done
-
-RESTRICT="mirror"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="~amd64 ~arm ~ia64 ~ppc ~sparc ~x86"
-EJABBERD_MODULES="mod_bosh mod_irc mod_muc mod_proxy65 mod_pubsub"
-IUSE="captcha debug elixir +iconv +lager ldap libressl mssql mysql odbc pam postgres redis riak sqlite ssl tools +zlib ${EJABBERD_MODULES}"
-
-DEPEND=">=net-im/jabber-base-0.01
-	>=dev-libs/expat-1.95
-	>=dev-libs/libyaml-0.1.4
-	>=dev-lang/erlang-17.1[ssl]
-	<dev-lang/erlang-19
-	odbc? ( dev-db/unixODBC[-minimal] )
-	ldap? ( =net-nds/openldap-2* )
-	!libressl? ( dev-libs/openssl:0= )
-	libressl? ( dev-libs/libressl:0= )
-	captcha? ( media-gfx/imagemagick[truetype,png] )
-	zlib? ( >=sys-libs/zlib-1.2.3 )"
-RDEPEND="${DEPEND}
-	>=sys-apps/shadow-4.1.4.2-r3
-	elixir? ( !dev-lang/elixir )
-	pam? ( virtual/pam )"
-
-REQUIRED_USE="mssql? ( odbc )"
-
-# paths in net-im/jabber-base
-JABBER_ETC="${EPREFIX}/etc/jabber"
-#JABBER_RUN="/var/run/jabber"
-JABBER_SPOOL="${EPREFIX}/var/spool/jabber"
-JABBER_LOG="${EPREFIX}/var/log/jabber"
-JABBER_DOC="${EPREFIX}/usr/share/doc/${PF}"
-
-src_prepare() {
-	epatch "${FILESDIR}"/${P}-ejabberdctl.patch
-
-	#emulate rebar unpack
-	mkdir "${S}/deps"
-	for plugin in ${!PLUGINS_COMMIT[@]}; do
-	    mv "$WORKDIR/${PLUGINS_PV[$plugin]}" "$S/deps/${plugin}" 2>/dev/null
-	done
-	touch "${S}"/deps/.got
-
-	#patch rebar dependency checks
-	sed -e "s/vsn, git/vsn, \"0.14.4\"/" \
-		-i deps/jiffy/src/jiffy.app.src || die
-
-	if use riak; then
-	sed -e "s/vsn, git/vsn, \"2.1.1\"/" \
-		-i deps/riakc/src/riakc.app.src || die
-	sed -e "s/vsn, git/vsn, \"2.1.0.7\"/" \
-		-i deps/riak_pb/src/riak_pb.app.src || die
-	sed -e "s/vsn, git/vsn, \"0.8.2\"/" \
-		-i deps/protobuffs/src/protobuffs.app.src || die
-	fi
-
-#	if use elixir; then
-#	sed -e "s/vsn, git/vsn, \"0.1.0\"/" \
-#		-i deps/rebar_elixir_plugin/src/rebar_elixir_plugin.app.src || die
-#	fi
-
-	# don't install release notes (we'll do this manually)
-	sed '/install .* [.][.]\/doc\/[*][.]txt $(DOCDIR)/d' -i Makefile.in || die
-	# Set correct paths from jabber-base package
-	sed -e "/^EJABBERDDIR[[:space:]]*=/{s:ejabberd:${PF}:}" \
-		-e "/^ETCDIR[[:space:]]*=/{s:@sysconfdir@/ejabberd:${JABBER_ETC}:}" \
-		-e "/^LOGDIR[[:space:]]*=/{s:@localstatedir@/log/ejabberd:${JABBER_LOG}:}" \
-		-e "/^SPOOLDIR[[:space:]]*=/{s:@localstatedir@/lib/ejabberd:${JABBER_SPOOL}:}" \
-			-i Makefile.in || die
-	sed -e "/EJABBERDDIR=/{s:ejabberd:${PF}:}" \
-		-e "s|\(ETC_DIR=\){{sysconfdir}}.*|\1${JABBER_ETC}|" \
-		-e "s|\(LOGS_DIR=\){{localstatedir}}.*|\1${JABBER_LOG}|" \
-		-e "s|\(SPOOL_DIR=\){{localstatedir}}.*|\1${JABBER_SPOOL}|" \
-			-i ejabberdctl.template || die
-
-	# fix up the ssl cert paths in ejabberd.yml to use our cert and
-	# also use the correct pam service name
-	sed -e "s:/path/to/ssl.pem:/etc/ssl/ejabberd/server.pem:g" \
-		-e "s:pamservicename:xmpp:" \
-		-i ejabberd.yml.example || die
-
-	# correct path to captcha script in default ejabberd.yml
-	sed -e 's|\(captcha_cmd:[[:space:]]*"\).\+"|\1/usr/'$(get_libdir)'/erlang/lib/'${PN}'/'${P}'/priv/bin/captcha.sh"}|' \
-		-i ejabberd.yml.example || die
-
-	# disable mod_irc in ejabberd.yml
-	if ! use mod_irc; then
-		sed -e "s/{mod_irc,/%{mod_irc,/" \
-			-i ejabberd.yml.example || die
-	fi
-
-	epatch_user
-}
-
-src_configure() {
-	econf \
-		--docdir="${EPREFIX}/usr/share/doc/${PF}/html" \
-		--libdir="${EPREFIX}/usr/$(get_libdir)/erlang/lib/${PN}/" \
-		$(use_enable tools) \
-		$(use_enable odbc) \
-		$(use_enable mysql) \
-		$(use_enable mssql) \
-		$(use_enable pam) \
-		$(use_enable postgres pgsql) \
-		$(use_enable zlib) \
-		$(use_enable sqlite) \
-		$(use_enable riak) \
-		$(use_enable redis) \
-		$(use_enable iconv) \
-		$(use_enable elixir) \
-		$(use_enable debug) \
-		$(use_enable lager) \
-		--enable-user=jabber
-}
-
-src_compile() {
-	emake $(use debug && echo debug=true ejabberd_debug=true)
-}
-
-src_install() {
-	default
-
-	# Pam helper module permissions
-	# http://docs.ejabberd.im/admin/guide/configuration/#pam-authentication
-	if use pam; then
-		pamd_mimic_system xmpp auth account || die "Cannot create pam.d file"
-		local epamdir="p1_pam-${PLUGINS_COMMIT[p1_pam]}"
-		fowners root:jabber "/usr/$(get_libdir)/erlang/lib/${PN}/${epamdir}/priv/bin/epam"
-		fperms 4750 "/usr/$(get_libdir)/erlang/lib/${PN}/${epamdir}/priv/bin/epam"
-	fi
-
-	newinitd "${FILESDIR}"/${PN}-3.initd ${PN}
-	newconfd "${FILESDIR}"/${PN}-3.confd ${PN}
-	systemd_dounit "${FILESDIR}"/${PN}.service
-	systemd_dotmpfilesd "${FILESDIR}"/${PN}.tmpfiles.conf
-
-	insinto /etc/logrotate.d
-	newins "${FILESDIR}"/${PN}.logrotate ${PN}
-}
-
-pkg_postinst() {
-	if [[ -z ${REPLACING_VERSIONS} ]] ; then
-		elog "For configuration instructions, please see"
-		elog "/usr/share/doc/${PF}/html/guide.html, or the online version at"
-		elog "http://docs.ejabberd.im/admin/guide/"
-	else
-		elog "Ejabberd now defaults to using a YAML format for its config file."
-		elog "The old ejabberd.cfg file can be converted using the following instructions:"
-		echo
-		elog "1. Make sure all processes related to the previous version of ejabberd aren't running."
-		elog "   Usually this just means the ejabberd daemon and possibly the pam-related processes"
-		elog "   (epmd and epam) if pam support is enabled."
-		elog "2. Run \`ejabberdctl start\` with sufficient permissions. Note that this can fail to"
-		elog "   start ejabberd properly for various reasons. Check ejabberd's main log file"
-		elog "   at /var/log/jabber/ejabberd.log to confirm it started successfully."
-		elog "3. Run \`ejabberdctl convert_to_yaml /etc/jabber/ejabberd.cfg /etc/jabber/ejabberd.yml.new\`"
-		elog "   with sufficient permissions, edit and rename /etc/jabber/ejabberd.yml.new to"
-		elog "   /etc/jabber/ejabberd.yml, and finally restart ejabberd with the new config file."
-		echo
-	fi
-
-	SSL_ORGANIZATION="${SSL_ORGANIZATION:-Ejabberd XMPP Server}"
-	install_cert /etc/ssl/ejabberd/server
-	# Fix ssl cert permissions bug #369809
-	chown root:jabber "${EROOT}/etc/ssl/ejabberd/server.pem"
-	chmod 0440 "${EROOT}/etc/ssl/ejabberd/server.pem"
-}

diff --git a/net-im/ejabberd/files/ejabberd-16.01-ejabberdctl.patch b/net-im/ejabberd/files/ejabberd-16.01-ejabberdctl.patch
deleted file mode 100644
index 7a1c9e6..0000000
--- a/net-im/ejabberd/files/ejabberd-16.01-ejabberdctl.patch
+++ /dev/null
@@ -1,49 +0,0 @@
-Set SHELL since the generic jabber user used on Gentoo for jabber servers
-doesn't have a valid shell set by default and fix EXEC_CMD otherwise it fails
-with "This account is currently not available" again due to jabber not having
-a valid shell.
-
-Also, workaround the assumption that jabber's $HOME is a directory when instead
-it defaults to /dev/null on Gentoo.
-
---- ejabberdctl.template	2016-01-12 11:07:58.000000000 +0000
-+++ ejabberdctl.template.new	2016-02-15 21:36:27.508297627 +0000
-@@ -16,6 +16,7 @@
- EPMD={{bindir}}/epmd
- INSTALLUSER={{installuser}}
- ERL_LIBS={{libdir}}
-+SHELL=/bin/sh
- 
- # check the proper system user is used if defined
- if [ "$INSTALLUSER" != "" ] ; then
-@@ -23,11 +24,11 @@
-     for GID in `id -G`; do
-         if [ $GID -eq 0 ] ; then
-             INSTALLUSER_HOME=$(getent passwd "$INSTALLUSER" | cut -d: -f6)
--            if [ -n "$INSTALLUSER_HOME" ] && [ ! -d "$INSTALLUSER_HOME" ] ; then
-+            if [ -n "$INSTALLUSER_HOME" ] && [ ! -e "$INSTALLUSER_HOME" ] ; then
-                 mkdir -p "$INSTALLUSER_HOME"
-                 chown "$INSTALLUSER" "$INSTALLUSER_HOME"
-             fi
--            EXEC_CMD="su $INSTALLUSER -c"
-+            EXEC_CMD="su $INSTALLUSER -p -c"
-         fi
-     done
-     if [ `id -g` -eq `id -g $INSTALLUSER` ] ; then
-@@ -100,6 +101,7 @@
- DATETIME=`date "+%Y%m%d-%H%M%S"`
- ERL_CRASH_DUMP=$LOGS_DIR/erl_crash_$DATETIME.dump
- ERL_INETRC=$ETC_DIR/inetrc
-+HOME=$SPOOL_DIR
- 
- # define mnesia options
- MNESIA_OPTS="-mnesia dir \"\\\"$SPOOL_DIR\\\"\" $MNESIA_OPTIONS"
-@@ -159,6 +161,8 @@
- export CONTRIB_MODULES_PATH
- export CONTRIB_MODULES_CONF_DIR
- export ERL_LIBS
-+export HOME
-+export SHELL
- 
- shell_escape()
- {

diff --git a/net-im/ejabberd/metadata.xml b/net-im/ejabberd/metadata.xml
index 1abb244..e8a19e0 100644
--- a/net-im/ejabberd/metadata.xml
+++ b/net-im/ejabberd/metadata.xml
@@ -30,15 +30,7 @@
 		<flag name="roster-gw">Turn on workaround for processing gateway subscriptions</flag>
 		<flag name="sqlite">Enable SQLite database support</flag>
 		<flag name="zlib">Enable Stream Compression (XEP-0138) using zlib</flag>
-
-		<flag name="mod_proxy65">Support for SOCKS5 Bytestreams (XEP-0065)</flag>
-		<flag name="elixir">Enable Elixir language support (http://elixir-lang.org/). Use bundled plugin instead of dev-lang/elixir.</flag>
-		<flag name="lager">Use lager Erlang logging tool instead of standard error logger</flag>
-		<flag name="mod_bosh">Enable support for XMPP over BOSH (XEP-0206)</flag>
-		<flag name="mod_irc">Build irc gateway</flag>
-		<flag name="mod_muc">Build Multi User Chat module</flag>
-		<flag name="mod_pubsub">Build Pubsub module</flag>
-		<flag name="tools">Build development tools</flag>
+		<!-- TODO Add later: flag name="tools">Build development tools</flag -->
 	</use>
 	<upstream>
 		<remote-id type="github">processone/ejabberd</remote-id>


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: net-im/ejabberd/files/, net-im/ejabberd/
@ 2017-04-01 19:46 Amadeusz Piotr Żołnowski
  0 siblings, 0 replies; 12+ messages in thread
From: Amadeusz Piotr Żołnowski @ 2017-04-01 19:46 UTC (permalink / raw
  To: gentoo-commits

commit:     246c1cdb477293986857e262bdfba111a86e3ed6
Author:     Amadeusz Żołnowski <aidecoe <AT> gentoo <DOT> org>
AuthorDate: Wed Mar 29 22:18:35 2017 +0000
Commit:     Amadeusz Piotr Żołnowski <aidecoe <AT> gentoo <DOT> org>
CommitDate: Sat Apr  1 19:46:32 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=246c1cdb

net-im/ejabberd: Bump version

Package-Manager: Portage-2.3.5, Repoman-2.3.2

 net-im/ejabberd/Manifest                           |   1 +
 net-im/ejabberd/ejabberd-17.01.ebuild              | 296 +++++++++++++++++++++
 .../files/ejabberd-17.01-ejabberdctl.patch         |  62 +++++
 3 files changed, 359 insertions(+)

diff --git a/net-im/ejabberd/Manifest b/net-im/ejabberd/Manifest
index 786180d6484..c0f2fe3a01a 100644
--- a/net-im/ejabberd/Manifest
+++ b/net-im/ejabberd/Manifest
@@ -1,3 +1,4 @@
 DIST ejabberd-16.04.tar.gz 1715963 SHA256 3d964fe74e438253c64c8498eb7465d2440823614a23df8d33bdf40126d72cc3 SHA512 5975d5a164060cca59b6d92de2c432f063061e832b2e03cae351fe3c16b178259489dc0b82ea800f1c2388eeb7e3aa4340630ad3c10a22cc6d6f0b4eef8fa0f2 WHIRLPOOL d9018835aaa736040f63222c73b54ea65385532989390c007f4cb736b474da40d9fdceb6c377a251398fb6de87869a13dec0ac160fe9a0d081337efd35dc66b4
 DIST ejabberd-16.08.tar.gz 1739542 SHA256 b45598a6f2f1b398a19f23e3280b45eccc833d3339b1aeb6ec08ded7c19b1137 SHA512 661bf33e6d7f4c53d0c3679d1a9428fba11c22bad7d8bd535b49d7eeeff4de215a7a94f8300683e1dbaf2e68ea908f6e54cfe0ed2f1dc82326a46659e7c70f55 WHIRLPOOL 41f5ae825997818671d6db94ac62108a0b02f8eb6eed07ebaa04287ee2d7955dc4d15c3ce18cbf20240e4b2a14d48ccb8bf383b510851be12326131c4c829788
 DIST ejabberd-16.09.tar.gz 1687485 SHA256 7b44ab3af3310ca73624c47b65cf30a651d5a1398413e8af51c610d788fb8f14 SHA512 506365eff83f9ab97c9a632c4b8b2428aacbfc570c34ca65a78903d95c64755489ff7327be3efa2172c9d05d7891f83986b1ff3928a7ce806c0ab2aa5dbb647f WHIRLPOOL 6c56ad58b4e247cedf29cf247fdadddf727270311a0ba21eef88f84ee6b997ad8be75448e3bfdaa67d978ea167e2feb21bc9ce0839741a62fb60fa045e45edf2
+DIST ejabberd-17.01.tar.gz 1638418 SHA256 7efa8f25fe01bce876f9379ba7b4f49752a0fddc6a78e5ae82196fdc7f70c90b SHA512 d64125f81efbf841eded140d877c950439c11e65377e167994d25f85fa66437aad771d94548d063900bd3c472922e6bfa8f8bbe65413f18e7b641f0ed32db566 WHIRLPOOL 7b670b087cccc6b4fb804410730571175c253e094fab6fc8c9412eae4e14b844ad38596426b4334bd751a056f940dfd60c1c06d2560af5b36061eb54553886fb

diff --git a/net-im/ejabberd/ejabberd-17.01.ebuild b/net-im/ejabberd/ejabberd-17.01.ebuild
new file mode 100644
index 00000000000..ad8edb6a765
--- /dev/null
+++ b/net-im/ejabberd/ejabberd-17.01.ebuild
@@ -0,0 +1,296 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+SSL_CERT_MANDATORY=1
+
+inherit eutils pam rebar ssl-cert systemd
+
+DESCRIPTION="Robust, scalable and extensible XMPP server"
+HOMEPAGE="http://www.ejabberd.im/ https://github.com/processone/ejabberd/"
+SRC_URI="http://www.process-one.net/downloads/${PN}/${PV}/${P}.tgz
+	-> ${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~ia64 ~ppc ~sparc ~x86"
+REQUIRED_USE="mssql? ( odbc )"
+# TODO: Add 'tools' flag.
+IUSE="captcha debug full-xml hipe ldap mssql mysql nls odbc pam postgres redis
+	riak roster-gw sqlite zlib"
+
+RESTRICT="test"
+
+# TODO: Add dependencies for 'tools' flag enabled.
+# TODO: tools? (
+# TODO: 	>=dev-erlang/meck-0.8.4
+# TODO: 	>=dev-erlang/moka-1.0.5b
+# TODO: )
+CDEPEND="
+	>=dev-erlang/cache_tab-1.0.6
+	>=dev-erlang/esip-1.0.10
+	>=dev-erlang/fast_tls-1.0.10
+	>=dev-erlang/fast_xml-1.1.19
+	>=dev-erlang/fast_yaml-1.0.8
+	>=dev-erlang/jiffy-0.14.8
+	>=dev-erlang/lager-3.2.1
+	>=dev-erlang/luerl-0.2
+	>=dev-erlang/p1_oauth2-0.6.1
+	>=dev-erlang/p1_utils-1.0.6
+	>=dev-erlang/stringprep-1.0.7
+	>=dev-erlang/stun-1.0.9
+	>=dev-lang/erlang-17.1[hipe?,odbc?,ssl]
+	>=net-im/jabber-base-0.01
+	ldap? ( =net-nds/openldap-2* )
+	mysql? ( >=dev-erlang/p1_mysql-1.0.2 )
+	nls? ( >=dev-erlang/iconv-1.0.3 )
+	odbc? ( dev-db/unixODBC )
+	pam? ( >=dev-erlang/p1_pam-1.0.0 )
+	postgres? ( >=dev-erlang/p1_pgsql-1.1.2 )
+	redis? ( >=dev-erlang/eredis-1.0.8 )
+	riak? (
+		>=dev-erlang/hamcrest-0.1.0_p20150103
+		>=dev-erlang/riakc-2.4.1
+	)
+	sqlite? ( >=dev-erlang/sqlite3-1.1.5 )
+	zlib? ( >=dev-erlang/ezlib-1.0.2 )"
+DEPEND="${CDEPEND}
+	>=sys-apps/gawk-4.1"
+RDEPEND="${CDEPEND}
+	captcha? ( media-gfx/imagemagick[truetype,png] )"
+
+DOCS=( README )
+PATCHES=( "${FILESDIR}/${P}-ejabberdctl.patch" )
+
+EJABBERD_CERT="${EPREFIX}/etc/ssl/ejabberd/server.pem"
+# Paths in net-im/jabber-base
+JABBER_ETC="${EPREFIX}/etc/jabber"
+JABBER_LOG="${EPREFIX}/var/log/jabber"
+JABBER_SPOOL="${EPREFIX}/var/spool/jabber"
+
+# Adjust example configuration file to Gentoo.
+# - Use our sample certificates.
+# - Correct PAM service name.
+adjust_config() {
+	sed -e "s|\"/path/to/ssl.pem\"|\"${EJABBERD_CERT}\"|g" \
+		-e "s|\"pamservicename\"|\"xmpp\"|" \
+		-i "${S}/ejabberd.yml.example" \
+		|| die 'failed to adjust example config'
+}
+
+# Set paths to ejabberd lib directory consistently to point always to directory
+# suffixed with version.
+correct_ejabberd_paths() {
+	sed -e "/^EJABBERDDIR[[:space:]]*=/{s:ejabberd:${P}:}" \
+		-i "${S}/Makefile.in" \
+		|| die 'failed to set ejabberd path in Makefile.in'
+	sed -e "/EJABBERD_BIN_PATH=/{s:ejabberd:${P}:}" \
+		-i "${S}/ejabberdctl.template" \
+		|| die 'failed to set ejabberd path in ejabberdctl.template'
+	sed -e 's|\(captcha_cmd:[[:space:]]*"\).\+"|\1'$(get_ejabberd_path)'/priv/bin/captcha.sh"|' \
+		-i "${S}/ejabberd.yml.example" \
+		|| die 'failed to correct path to captcha.sh in example config'
+}
+
+# Get epam-wrapper from 'files' directory and correct path to lib directory in
+# it. epam-wrapper is placed into work directory. It is assumed no epam-wrapper
+# file exists there already.
+customize_epam_wrapper() {
+	local epam_wrapper_src="$1"
+	local epam_wrapper_dst="${S}/epam-wrapper"
+
+	[[ -e ${epam_wrapper_dst} ]] && die 'epam-wrapper already exists'
+	sed -r -e "s@^(ERL_LIBS=).*\$@\1${EPREFIX}$(get_erl_libs)@" \
+		"${epam_wrapper_src}" >"${epam_wrapper_dst}" \
+		|| die 'failed to install epam-wrapper'
+}
+
+# Check if there already exists a certificate.
+ejabberd_cert_exists() {
+	local cert
+
+	for cert in $(gawk -- \
+			'match($0, /^[[:space:]]*certfile: "([^"]+)"/, m) {print m[1];}' \
+			"${EROOT%/}${JABBER_ETC}/ejabberd.yml"); do
+		[[ -f ${cert} ]] && return 0
+	done
+
+	return 1
+}
+
+# Generate and install sample ejabberd certificate. It's installed into
+# EJABBERD_CERT path.
+ejabberd_cert_install() {
+	SSL_ORGANIZATION="${SSL_ORGANIZATION:-ejabberd XMPP Server}"
+	install_cert "${EJABBERD_CERT%.*}"
+	chown root:jabber "${EROOT%/}${EJABBERD_CERT}" || die
+	chmod 0440 "${EROOT%/}${EJABBERD_CERT}" || die
+}
+
+# Get path to ejabberd lib directory.
+#
+# This is the path ./configure script Base for this path is path set in
+# ./configure script which is /usr/lib by default. If libdir is explicitely set
+# to something else than this should be adjusted here as well.
+get_ejabberd_path() {
+	echo "/usr/$(get_libdir)/${P}"
+}
+
+# Make ejabberd.service for systemd from upstream provided template.
+make_ejabberd_service() {
+	sed -r \
+		-e 's!@ctlscriptpath@!/usr/sbin!' \
+		-e 's!(User|Group)=(.*)!\1=jabber!' \
+		"${PN}.service.template" >"${PN}.service" \
+		|| die 'failed to make ejabberd.service'
+}
+
+# Set paths to defined by net-im/jabber-base.
+set_jabberbase_paths() {
+	sed -e "/^ETCDIR[[:space:]]*=/{s:@sysconfdir@/ejabberd:${JABBER_ETC}:}" \
+		-e "/^LOGDIR[[:space:]]*=/{s:@localstatedir@/log/ejabberd:${JABBER_LOG}:}" \
+		-e "/^SPOOLDIR[[:space:]]*=/{s:@localstatedir@/lib/ejabberd:${JABBER_SPOOL}:}" \
+		-i "${S}/Makefile.in" \
+		|| die 'failed to set paths in Makefile.in'
+	sed -e "s|\(ETC_DIR=\){{sysconfdir}}.*|\1${JABBER_ETC}|" \
+		-e "s|\(LOGS_DIR=\){{localstatedir}}.*|\1${JABBER_LOG}|" \
+		-e "s|\(SPOOL_DIR=\){{localstatedir}}.*|\1${JABBER_SPOOL}|" \
+		-i "${S}/ejabberdctl.template" \
+		|| die 'failed to set paths ejabberdctl.template'
+}
+
+# Skip installing docs because it's only COPYING that's installed by Makefile.
+skip_docs() {
+	gawk -i inplace '
+/# Documentation/, /^[[:space:]]*#?[[:space:]]*$/ {
+	if ($0 ~ /^[[:space:]]*#?[[:space:]]*$/) {
+		print $0;
+	} else {
+		next;
+	}
+}
+1
+' "${S}/Makefile.in" || die 'failed to remove docs section from Makefile.in'
+}
+
+src_prepare() {
+	default
+
+	rebar_remove_deps
+	correct_ejabberd_paths
+	set_jabberbase_paths
+	make_ejabberd_service
+	skip_docs
+	adjust_config
+	customize_epam_wrapper "${FILESDIR}/epam-wrapper"
+
+	# Fix bug #591862. ERL_LIBS should point directly to ejabberd directory
+	# rather than its parent which is default. That way ejabberd directory
+	# takes precedence is module lookup.
+	local ejabberd_erl_libs="$(get_ejabberd_path):$(get_erl_libs)"
+	sed -e "s|\(ERL_LIBS=\){{libdir}}.*|\1${ejabberd_erl_libs}|" \
+		-i "${S}/ejabberdctl.template" \
+		|| die 'failed to set ERL_LIBS in ejabberdctl.template'
+}
+
+src_configure() {
+	econf \
+		--docdir="${EPREFIX}/usr/share/doc/${PF}/html" \
+		--enable-user=jabber \
+		$(use_enable debug) \
+		$(use_enable full-xml) \
+		$(use_enable hipe) \
+		$(use_enable mssql) \
+		$(use_enable mysql) \
+		$(use_enable nls iconv) \
+		$(use_enable odbc) \
+		$(use_enable pam) \
+		$(use_enable postgres pgsql) \
+		$(use_enable redis) \
+		$(use_enable riak) \
+		$(use_enable roster-gw roster-gateway-workaround) \
+		$(use_enable sqlite) \
+		$(use_enable zlib)
+}
+
+src_compile() {
+	emake REBAR='rebar -v' src
+}
+
+src_install() {
+	default
+
+	if use pam; then
+		local epam_path="$(get_ejabberd_path)/priv/bin/epam"
+
+		pamd_mimic_system xmpp auth account || die "cannot create pam.d file"
+		into "$(get_ejabberd_path)/priv"
+		newbin epam-wrapper epam
+		# PAM helper module permissions
+		# https://www.process-one.net/docs/ejabberd/guide_en.html#pam
+		fowners root:jabber "${epam_path}"
+		fperms 4750 "${epam_path}"
+	fi
+
+	newconfd "${FILESDIR}/${PN}.confd" "${PN}"
+	newinitd "${FILESDIR}/${PN}.initd" "${PN}"
+	systemd_dounit "${PN}.service"
+	systemd_dotmpfilesd "${FILESDIR}/${PN}.tmpfiles.conf"
+
+	insinto /etc/logrotate.d
+	newins "${FILESDIR}/${PN}.logrotate" "${PN}"
+}
+
+pkg_postinst() {
+	if [[ ! ${REPLACING_VERSIONS} ]]; then
+		echo
+		elog "For configuration instructions, please see"
+		elog "  http://www.process-one.net/en/ejabberd/docs/"
+		echo
+		if [[ " ${REPLACING_VERSIONS} " =~ \ 2\. ]]; then
+			ewarn "If you have used pubsub in ejabberd-2.* you may encounter issues after"
+			ewarn "migration to ${PV}. pubsub data may not be migrated automatically and"
+			ewarn "you may need to run migration script manually, see:"
+			ewarn
+			ewarn "  https://github.com/processone/ejabberd/issues/479#issuecomment-124497456"
+			ewarn
+			ewarn "In case you don't care about all stored moods, activities, geoinfo and you"
+			ewarn "know you don't store in pubsub anything important, you can just remove"
+			ewarn "pubsub tables:"
+			ewarn
+			ewarn "  rm ${EROOT%/}${JABBER_SPOOL}/pubsub_*"
+			ewarn
+			ewarn "See also: https://bugs.gentoo.org/show_bug.cgi?id=588244"
+			echo
+		fi
+	elif [[ -f ${EROOT}etc/jabber/ejabberd.cfg ]]; then
+		elog "Ejabberd now defaults to using a YAML format for its config file."
+		elog "The old ejabberd.cfg file can be converted using the following instructions:"
+		echo
+		elog "1. Make sure all processes related to the previous version of ejabberd aren't"
+		elog "   running. Usually this just means the ejabberd and epmd daemons and possibly"
+		elog "   the pam-related process (epam) if pam support is enabled."
+		elog "2. Run \`ejabberdctl start\` with sufficient permissions. Note that this can"
+		elog "   fail to start ejabberd properly for various reasons. Check ejabberd's main"
+		elog "   log file at /var/log/jabber/ejabberd.log to confirm it started successfully."
+		elog "3. Run"
+		elog "     \`ejabberdctl convert_to_yaml /etc/jabber/ejabberd.cfg /etc/jabber/ejabberd.yml.new\`"
+		elog "   with sufficient permissions, edit and rename /etc/jabber/ejabberd.yml.new to"
+		elog "   /etc/jabber/ejabberd.yml, and finally restart ejabberd with the new config"
+		elog "   file."
+		echo
+	fi
+
+	if ! ejabberd_cert_exists; then
+		ejabberd_cert_install
+	fi
+
+	if use pam; then
+		# sfperms drops read bit from files with suid. Reapply it.
+		# Fix bug #592218.
+		local epam_path="$(get_ejabberd_path)/priv/bin/epam"
+		chmod g+r "${EROOT%/}${epam_path}" \
+			|| die "failed to correct ${epam_path} permissions"
+	fi
+}

diff --git a/net-im/ejabberd/files/ejabberd-17.01-ejabberdctl.patch b/net-im/ejabberd/files/ejabberd-17.01-ejabberdctl.patch
new file mode 100644
index 00000000000..6001c651f5d
--- /dev/null
+++ b/net-im/ejabberd/files/ejabberd-17.01-ejabberdctl.patch
@@ -0,0 +1,62 @@
+From 185923a3c5f11c2d29599416a52b6594bc94d8c9 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Amadeusz=20=C5=BBo=C5=82nowski?= <aidecoe@aidecoe.name>
+Date: Mon, 29 Aug 2016 22:29:41 +0100
+Subject: [PATCH] Adjust ejabberdctl for Gentoo jabberbase setup
+
+Set SHELL since the generic jabber user used on Gentoo for jabber
+servers doesn't have a valid shell set by default and fix EXEC_CMD
+otherwise it fails with "This account is currently not available" again
+due to jabber not having a valid shell.
+
+Also, workaround the assumption that jabber's $HOME is a directory when
+instead it defaults to /dev/null on Gentoo.
+---
+ ejabberdctl.template | 8 ++++++--
+ 1 file changed, 6 insertions(+), 2 deletions(-)
+
+diff --git a/ejabberdctl.template b/ejabberdctl.template
+index 5b34ebe..3c080fd 100755
+--- a/ejabberdctl.template
++++ b/ejabberdctl.template
+@@ -16,6 +16,7 @@ IEX={{bindir}}/iex
+ EPMD={{epmd}}
+ INSTALLUSER={{installuser}}
+ ERL_LIBS={{libdir}}
++SHELL=/bin/sh
+ 
+ # check the proper system user is used if defined
+ if [ "$INSTALLUSER" != "" ] ; then
+@@ -23,11 +24,11 @@ if [ "$INSTALLUSER" != "" ] ; then
+     for GID in `id -G`; do
+         if [ $GID -eq 0 ] ; then
+             INSTALLUSER_HOME=$(getent passwd "$INSTALLUSER" | cut -d: -f6)
+-            if [ -n "$INSTALLUSER_HOME" ] && [ ! -d "$INSTALLUSER_HOME" ] ; then
++            if [ -n "$INSTALLUSER_HOME" ] && [ ! -e "$INSTALLUSER_HOME" ] ; then
+                 mkdir -p "$INSTALLUSER_HOME"
+                 chown "$INSTALLUSER" "$INSTALLUSER_HOME"
+             fi
+-            EXEC_CMD="su $INSTALLUSER -c"
++            EXEC_CMD="su $INSTALLUSER -p -c"
+         fi
+     done
+     if [ `id -g` -eq `id -g $INSTALLUSER` ] ; then
+@@ -91,6 +92,7 @@ EJABBERD_LOG_PATH=$LOGS_DIR/ejabberd.log
+ DATETIME=`date "+%Y%m%d-%H%M%S"`
+ ERL_CRASH_DUMP=$LOGS_DIR/erl_crash_$DATETIME.dump
+ ERL_INETRC=$ETC_DIR/inetrc
++HOME=$SPOOL_DIR
+ 
+ # define mnesia options
+ MNESIA_OPTS="-mnesia dir \"\\\"$SPOOL_DIR\\\"\" $MNESIA_OPTIONS"
+@@ -149,6 +151,8 @@ export ERL_MAX_ETS_TABLES
+ export CONTRIB_MODULES_PATH
+ export CONTRIB_MODULES_CONF_DIR
+ export ERL_LIBS
++export HOME
++export SHELL
+ 
+ shell_escape_str()
+ {
+-- 
+2.9.2
+


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: net-im/ejabberd/files/, net-im/ejabberd/
@ 2017-05-27 20:55 Amadeusz Piotr Żołnowski
  0 siblings, 0 replies; 12+ messages in thread
From: Amadeusz Piotr Żołnowski @ 2017-05-27 20:55 UTC (permalink / raw
  To: gentoo-commits

commit:     8be8ae98b60da239244a5378f12999b6ce4c353f
Author:     Amadeusz Żołnowski <aidecoe <AT> gentoo <DOT> org>
AuthorDate: Sat May 27 19:48:33 2017 +0000
Commit:     Amadeusz Piotr Żołnowski <aidecoe <AT> gentoo <DOT> org>
CommitDate: Sat May 27 20:55:01 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8be8ae98

net-im/ejabberd: Remove older versions

Package-Manager: Portage-2.3.5, Repoman-2.3.2

 net-im/ejabberd/Manifest                           |   2 -
 net-im/ejabberd/ejabberd-16.04-r1.ebuild           | 299 ---------------------
 net-im/ejabberd/ejabberd-16.04.ebuild              | 280 -------------------
 net-im/ejabberd/ejabberd-16.08.ebuild              | 298 --------------------
 .../files/ejabberd-16.04-ejabberdctl.patch         |  49 ----
 .../files/ejabberd-16.08-ejabberdctl.patch         |  62 -----
 6 files changed, 990 deletions(-)

diff --git a/net-im/ejabberd/Manifest b/net-im/ejabberd/Manifest
index c0f2fe3a01a..fcc89f207ce 100644
--- a/net-im/ejabberd/Manifest
+++ b/net-im/ejabberd/Manifest
@@ -1,4 +1,2 @@
-DIST ejabberd-16.04.tar.gz 1715963 SHA256 3d964fe74e438253c64c8498eb7465d2440823614a23df8d33bdf40126d72cc3 SHA512 5975d5a164060cca59b6d92de2c432f063061e832b2e03cae351fe3c16b178259489dc0b82ea800f1c2388eeb7e3aa4340630ad3c10a22cc6d6f0b4eef8fa0f2 WHIRLPOOL d9018835aaa736040f63222c73b54ea65385532989390c007f4cb736b474da40d9fdceb6c377a251398fb6de87869a13dec0ac160fe9a0d081337efd35dc66b4
-DIST ejabberd-16.08.tar.gz 1739542 SHA256 b45598a6f2f1b398a19f23e3280b45eccc833d3339b1aeb6ec08ded7c19b1137 SHA512 661bf33e6d7f4c53d0c3679d1a9428fba11c22bad7d8bd535b49d7eeeff4de215a7a94f8300683e1dbaf2e68ea908f6e54cfe0ed2f1dc82326a46659e7c70f55 WHIRLPOOL 41f5ae825997818671d6db94ac62108a0b02f8eb6eed07ebaa04287ee2d7955dc4d15c3ce18cbf20240e4b2a14d48ccb8bf383b510851be12326131c4c829788
 DIST ejabberd-16.09.tar.gz 1687485 SHA256 7b44ab3af3310ca73624c47b65cf30a651d5a1398413e8af51c610d788fb8f14 SHA512 506365eff83f9ab97c9a632c4b8b2428aacbfc570c34ca65a78903d95c64755489ff7327be3efa2172c9d05d7891f83986b1ff3928a7ce806c0ab2aa5dbb647f WHIRLPOOL 6c56ad58b4e247cedf29cf247fdadddf727270311a0ba21eef88f84ee6b997ad8be75448e3bfdaa67d978ea167e2feb21bc9ce0839741a62fb60fa045e45edf2
 DIST ejabberd-17.01.tar.gz 1638418 SHA256 7efa8f25fe01bce876f9379ba7b4f49752a0fddc6a78e5ae82196fdc7f70c90b SHA512 d64125f81efbf841eded140d877c950439c11e65377e167994d25f85fa66437aad771d94548d063900bd3c472922e6bfa8f8bbe65413f18e7b641f0ed32db566 WHIRLPOOL 7b670b087cccc6b4fb804410730571175c253e094fab6fc8c9412eae4e14b844ad38596426b4334bd751a056f940dfd60c1c06d2560af5b36061eb54553886fb

diff --git a/net-im/ejabberd/ejabberd-16.04-r1.ebuild b/net-im/ejabberd/ejabberd-16.04-r1.ebuild
deleted file mode 100644
index 84354c2c2a2..00000000000
--- a/net-im/ejabberd/ejabberd-16.04-r1.ebuild
+++ /dev/null
@@ -1,299 +0,0 @@
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-SSL_CERT_MANDATORY=1
-
-inherit eutils pam rebar ssl-cert systemd
-
-DESCRIPTION="Robust, scalable and extensible XMPP server"
-HOMEPAGE="http://www.ejabberd.im/ https://github.com/processone/ejabberd/"
-SRC_URI="http://www.process-one.net/downloads/${PN}/${PV}/${P}.tgz
-	-> ${P}.tar.gz"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="~amd64 ~arm ~ia64 ~ppc ~sparc ~x86"
-REQUIRED_USE="mssql? ( odbc )"
-# TODO: Add 'tools' flag.
-IUSE="captcha debug full-xml hipe ldap mssql mysql nls odbc pam postgres redis
-	riak roster-gw sqlite zlib"
-
-RESTRICT="test"
-
-# TODO: Add dependencies for 'tools' flag enabled.
-# TODO: tools? (
-# TODO: 	>=dev-erlang/meck-0.8.4
-# TODO: 	>=dev-erlang/moka-1.0.5b
-# TODO: )
-CDEPEND="
-	>=dev-erlang/cache_tab-1.0.2
-	>=dev-erlang/esip-1.0.4
-	>=dev-erlang/fast_tls-1.0.3
-	>=dev-erlang/fast_xml-1.1.3
-	>=dev-erlang/fast_yaml-1.0.3
-	>=dev-erlang/jiffy-0.14.7
-	>=dev-erlang/lager-3.0.2
-	>=dev-erlang/luerl-0.2
-	>=dev-erlang/p1_oauth2-0.6.1
-	>=dev-erlang/p1_utils-1.0.4
-	>=dev-erlang/p1_xmlrpc-1.15.1
-	>=dev-erlang/stringprep-1.0.3
-	>=dev-erlang/stun-1.0.3
-	>=dev-lang/erlang-17.1[hipe?,odbc?,ssl]
-	<dev-lang/erlang-19
-	>=net-im/jabber-base-0.01
-	ldap? ( =net-nds/openldap-2* )
-	mysql? ( >=dev-erlang/p1_mysql-1.0.1 )
-	nls? ( >=dev-erlang/iconv-1.0.0 )
-	odbc? ( dev-db/unixODBC )
-	pam? ( >=dev-erlang/epam-1.0.0
-		<dev-erlang/epam-1.0.1 )
-	postgres? ( >=dev-erlang/p1_pgsql-1.1.0 )
-	redis? ( >=dev-erlang/eredis-1.0.8 )
-	riak? (
-		>=dev-erlang/hamcrest-0.1.0_p20150103
-		>=dev-erlang/riakc-2.1.1_p20151111
-	)
-	sqlite? ( >=dev-erlang/sqlite3-1.1.5 )
-	zlib? ( >=dev-erlang/ezlib-1.0.1 )"
-DEPEND="${CDEPEND}
-	>=sys-apps/gawk-4.1"
-RDEPEND="${CDEPEND}
-	captcha? ( media-gfx/imagemagick[truetype,png] )"
-
-DOCS=( README )
-PATCHES=( "${FILESDIR}/${P}-ejabberdctl.patch" )
-
-EJABBERD_CERT="${EPREFIX}/etc/ssl/ejabberd/server.pem"
-# Paths in net-im/jabber-base
-JABBER_ETC="${EPREFIX}/etc/jabber"
-JABBER_LOG="${EPREFIX}/var/log/jabber"
-JABBER_SPOOL="${EPREFIX}/var/spool/jabber"
-
-# Adjust example configuration file to Gentoo.
-# - Use our sample certificates.
-# - Correct PAM service name.
-adjust_config() {
-	sed -e "s|\"/path/to/ssl.pem\"|\"${EJABBERD_CERT}\"|g" \
-		-e "s|\"pamservicename\"|\"xmpp\"|" \
-		-i "${S}/ejabberd.yml.example" \
-		|| die 'failed to adjust example config'
-}
-
-# Set paths to ejabberd lib directory consistently to point always to directory
-# suffixed with version.
-correct_ejabberd_paths() {
-	sed -e "/^EJABBERDDIR[[:space:]]*=/{s:ejabberd:${P}:}" \
-		-i "${S}/Makefile.in" \
-		|| die 'failed to set ejabberd path in Makefile.in'
-	sed -e "/EJABBERD_BIN_PATH=/{s:ejabberd:${P}:}" \
-		-i "${S}/ejabberdctl.template" \
-		|| die 'failed to set ejabberd path in ejabberdctl.template'
-	sed -e 's|\(captcha_cmd:[[:space:]]*"\).\+"|\1'$(get_ejabberd_path)'/priv/bin/captcha.sh"|' \
-		-i "${S}/ejabberd.yml.example" \
-		|| die 'failed to correct path to captcha.sh in example config'
-}
-
-# Get epam-wrapper from 'files' directory and correct path to lib directory in
-# it. epam-wrapper is placed into work directory. It is assumed no epam-wrapper
-# file exists there already.
-customize_epam_wrapper() {
-	local epam_wrapper_src="$1"
-	local epam_wrapper_dst="${S}/epam-wrapper"
-
-	[[ -e ${epam_wrapper_dst} ]] && die 'epam-wrapper already exists'
-	sed -r -e "s@^(ERL_LIBS=).*\$@\1${EPREFIX}$(get_erl_libs)@" \
-		"${epam_wrapper_src}" >"${epam_wrapper_dst}" \
-		|| die 'failed to install epam-wrapper'
-}
-
-# Check if there already exists a certificate.
-ejabberd_cert_exists() {
-	local cert
-
-	for cert in $(gawk -- \
-			'match($0, /^[[:space:]]*certfile: "([^"]+)"/, m) {print m[1];}' \
-			"${EROOT%/}${JABBER_ETC}/ejabberd.yml"); do
-		[[ -f ${cert} ]] && return 0
-	done
-
-	return 1
-}
-
-# Generate and install sample ejabberd certificate. It's installed into
-# EJABBERD_CERT path.
-ejabberd_cert_install() {
-	SSL_ORGANIZATION="${SSL_ORGANIZATION:-ejabberd XMPP Server}"
-	install_cert "${EJABBERD_CERT%.*}"
-	chown root:jabber "${EROOT%/}${EJABBERD_CERT}" || die
-	chmod 0440 "${EROOT%/}${EJABBERD_CERT}" || die
-}
-
-# Get path to ejabberd lib directory.
-#
-# This is the path ./configure script Base for this path is path set in
-# ./configure script which is /usr/lib by default. If libdir is explicitely set
-# to something else than this should be adjusted here as well.
-get_ejabberd_path() {
-	echo "/usr/$(get_libdir)/${P}"
-}
-
-# Make ejabberd.service for systemd from upstream provided template.
-make_ejabberd_service() {
-	sed -r \
-		-e 's!@ctlscriptpath@!/usr/sbin!' \
-		-e 's!(User|Group)=(.*)!\1=jabber!' \
-		"${PN}.service.template" >"${PN}.service" \
-		|| die 'failed to make ejabberd.service'
-}
-
-# Set paths to defined by net-im/jabber-base.
-set_jabberbase_paths() {
-	sed -e "/^ETCDIR[[:space:]]*=/{s:@sysconfdir@/ejabberd:${JABBER_ETC}:}" \
-		-e "/^LOGDIR[[:space:]]*=/{s:@localstatedir@/log/ejabberd:${JABBER_LOG}:}" \
-		-e "/^SPOOLDIR[[:space:]]*=/{s:@localstatedir@/lib/ejabberd:${JABBER_SPOOL}:}" \
-		-i "${S}/Makefile.in" \
-		|| die 'failed to set paths in Makefile.in'
-	sed -e "s|\(ETC_DIR=\){{sysconfdir}}.*|\1${JABBER_ETC}|" \
-		-e "s|\(LOGS_DIR=\){{localstatedir}}.*|\1${JABBER_LOG}|" \
-		-e "s|\(SPOOL_DIR=\){{localstatedir}}.*|\1${JABBER_SPOOL}|" \
-		-i "${S}/ejabberdctl.template" \
-		|| die 'failed to set paths ejabberdctl.template'
-}
-
-# Skip installing docs because it's only COPYING that's installed by Makefile.
-skip_docs() {
-	gawk -i inplace '
-/# Documentation/, /^[[:space:]]*#?[[:space:]]*$/ {
-	if ($0 ~ /^[[:space:]]*#?[[:space:]]*$/) {
-		print $0;
-	} else {
-		next;
-	}
-}
-1
-' "${S}/Makefile.in" || die 'failed to remove docs section from Makefile.in'
-}
-
-src_prepare() {
-	default
-
-	rebar_remove_deps
-	correct_ejabberd_paths
-	set_jabberbase_paths
-	make_ejabberd_service
-	skip_docs
-	adjust_config
-	customize_epam_wrapper "${FILESDIR}/epam-wrapper"
-
-	# Fix bug #591862. ERL_LIBS should point directly to ejabberd directory
-	# rather than its parent which is default. That way ejabberd directory
-	# takes precedence is module lookup.
-	local ejabberd_erl_libs="$(get_ejabberd_path):$(get_erl_libs)"
-	sed -e "s|\(ERL_LIBS=\){{libdir}}.*|\1${ejabberd_erl_libs}|" \
-		-i "${S}/ejabberdctl.template" \
-		|| die 'failed to set ERL_LIBS in ejabberdctl.template'
-}
-
-src_configure() {
-	econf \
-		--docdir="${EPREFIX}/usr/share/doc/${PF}/html" \
-		--enable-user=jabber \
-		$(use_enable debug) \
-		$(use_enable full-xml) \
-		$(use_enable hipe) \
-		$(use_enable mssql) \
-		$(use_enable mysql) \
-		$(use_enable nls iconv) \
-		$(use_enable odbc) \
-		$(use_enable pam) \
-		$(use_enable postgres pgsql) \
-		$(use_enable redis) \
-		$(use_enable riak) \
-		$(use_enable roster-gw roster-gateway-workaround) \
-		$(use_enable sqlite) \
-		$(use_enable zlib)
-}
-
-src_compile() {
-	emake REBAR='rebar -v' src
-}
-
-src_install() {
-	default
-
-	if use pam; then
-		local epam_path="$(get_ejabberd_path)/priv/bin/epam"
-
-		pamd_mimic_system xmpp auth account || die "cannot create pam.d file"
-		into "$(get_ejabberd_path)/priv"
-		newbin epam-wrapper epam
-		# PAM helper module permissions
-		# https://www.process-one.net/docs/ejabberd/guide_en.html#pam
-		fowners root:jabber "${epam_path}"
-		fperms 4750 "${epam_path}"
-	fi
-
-	newconfd "${FILESDIR}/${PN}.confd" "${PN}"
-	newinitd "${FILESDIR}/${PN}.initd" "${PN}"
-	systemd_dounit "${PN}.service"
-	systemd_dotmpfilesd "${FILESDIR}/${PN}.tmpfiles.conf"
-
-	insinto /etc/logrotate.d
-	newins "${FILESDIR}/${PN}.logrotate" "${PN}"
-}
-
-pkg_postinst() {
-	if [[ ! ${REPLACING_VERSIONS} ]]; then
-		echo
-		elog "For configuration instructions, please see"
-		elog "  http://www.process-one.net/en/ejabberd/docs/"
-		echo
-		if [[ " ${REPLACING_VERSIONS} " =~ \ 2\. ]]; then
-			ewarn "If you have used pubsub in ejabberd-2.* you may encounter issues after"
-			ewarn "migration to ${PV}. pubsub data may not be migrated automatically and"
-			ewarn "you may need to run migration script manually, see:"
-			ewarn
-			ewarn "  https://github.com/processone/ejabberd/issues/479#issuecomment-124497456"
-			ewarn
-			ewarn "In case you don't care about all stored moods, activities, geoinfo and you"
-			ewarn "know you don't store in pubsub anything important, you can just remove"
-			ewarn "pubsub tables:"
-			ewarn
-			ewarn "  rm ${EROOT%/}${JABBER_SPOOL}/pubsub_*"
-			ewarn
-			ewarn "See also: https://bugs.gentoo.org/show_bug.cgi?id=588244"
-			echo
-		fi
-	elif [[ -f ${EROOT}etc/jabber/ejabberd.cfg ]]; then
-		elog "Ejabberd now defaults to using a YAML format for its config file."
-		elog "The old ejabberd.cfg file can be converted using the following instructions:"
-		echo
-		elog "1. Make sure all processes related to the previous version of ejabberd aren't"
-		elog "   running. Usually this just means the ejabberd and epmd daemons and possibly"
-		elog "   the pam-related process (epam) if pam support is enabled."
-		elog "2. Run \`ejabberdctl start\` with sufficient permissions. Note that this can"
-		elog "   fail to start ejabberd properly for various reasons. Check ejabberd's main"
-		elog "   log file at /var/log/jabber/ejabberd.log to confirm it started successfully."
-		elog "3. Run"
-		elog "     \`ejabberdctl convert_to_yaml /etc/jabber/ejabberd.cfg /etc/jabber/ejabberd.yml.new\`"
-		elog "   with sufficient permissions, edit and rename /etc/jabber/ejabberd.yml.new to"
-		elog "   /etc/jabber/ejabberd.yml, and finally restart ejabberd with the new config"
-		elog "   file."
-		echo
-	fi
-
-	if ! ejabberd_cert_exists; then
-		ejabberd_cert_install
-	fi
-
-	if use pam; then
-		# sfperms drops read bit from files with suid. Reapply it.
-		# Fix bug #592218.
-		local epam_path="$(get_ejabberd_path)/priv/bin/epam"
-		chmod g+r "${EROOT%/}${epam_path}" \
-			|| die "failed to correct ${epam_path} permissions"
-	fi
-}

diff --git a/net-im/ejabberd/ejabberd-16.04.ebuild b/net-im/ejabberd/ejabberd-16.04.ebuild
deleted file mode 100644
index 50a0dab8e14..00000000000
--- a/net-im/ejabberd/ejabberd-16.04.ebuild
+++ /dev/null
@@ -1,280 +0,0 @@
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-SSL_CERT_MANDATORY=1
-
-inherit eutils pam rebar ssl-cert systemd
-
-DESCRIPTION="Robust, scalable and extensible XMPP server"
-HOMEPAGE="http://www.ejabberd.im/ https://github.com/processone/ejabberd/"
-SRC_URI="http://www.process-one.net/downloads/${PN}/${PV}/${P}.tgz
-	-> ${P}.tar.gz"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="amd64 ~arm ~ia64 ppc ~sparc x86"
-REQUIRED_USE="mssql? ( odbc )"
-# TODO: Add 'tools' flag.
-IUSE="captcha debug full-xml hipe ldap mssql mysql nls odbc pam postgres redis
-	riak roster-gw sqlite zlib"
-
-RESTRICT="test"
-
-# TODO: Add dependencies for 'tools' flag enabled.
-# TODO: tools? (
-# TODO: 	>=dev-erlang/meck-0.8.4
-# TODO: 	>=dev-erlang/moka-1.0.5b
-# TODO: )
-CDEPEND="
-	>=dev-erlang/cache_tab-1.0.2
-	>=dev-erlang/esip-1.0.4
-	>=dev-erlang/fast_tls-1.0.3
-	>=dev-erlang/fast_xml-1.1.3
-	>=dev-erlang/fast_yaml-1.0.3
-	>=dev-erlang/jiffy-0.14.7
-	>=dev-erlang/lager-3.0.2
-	>=dev-erlang/luerl-0.2
-	>=dev-erlang/p1_oauth2-0.6.1
-	>=dev-erlang/p1_utils-1.0.4
-	>=dev-erlang/p1_xmlrpc-1.15.1
-	>=dev-erlang/stringprep-1.0.3
-	>=dev-erlang/stun-1.0.3
-	>=dev-lang/erlang-17.1[hipe?,odbc?,ssl]
-	<dev-lang/erlang-19
-	>=net-im/jabber-base-0.01
-	ldap? ( =net-nds/openldap-2* )
-	mysql? ( >=dev-erlang/p1_mysql-1.0.1 )
-	nls? ( >=dev-erlang/iconv-1.0.0 )
-	odbc? ( dev-db/unixODBC )
-	pam? ( >=dev-erlang/epam-1.0.0
-		<dev-erlang/epam-1.0.1 )
-	postgres? ( >=dev-erlang/p1_pgsql-1.1.0 )
-	redis? ( >=dev-erlang/eredis-1.0.8 )
-	riak? (
-		>=dev-erlang/hamcrest-0.1.0_p20150103
-		>=dev-erlang/riakc-2.1.1_p20151111
-	)
-	sqlite? ( >=dev-erlang/sqlite3-1.1.5 )
-	zlib? ( >=dev-erlang/ezlib-1.0.1 )"
-DEPEND="${CDEPEND}
-	>=sys-apps/gawk-4.1"
-RDEPEND="${CDEPEND}
-	captcha? ( media-gfx/imagemagick[truetype,png] )"
-
-DOCS=( README )
-PATCHES=( "${FILESDIR}/${P}-ejabberdctl.patch" )
-
-EJABBERD_CERT="${EPREFIX}/etc/ssl/ejabberd/server.pem"
-# Paths in net-im/jabber-base
-JABBER_ETC="${EPREFIX}/etc/jabber"
-JABBER_LOG="${EPREFIX}/var/log/jabber"
-JABBER_SPOOL="${EPREFIX}/var/spool/jabber"
-
-# Adjust example configuration file to Gentoo.
-# - Use our sample certificates.
-# - Correct PAM service name.
-adjust_config() {
-	sed -e "s|\"/path/to/ssl.pem\"|\"${EJABBERD_CERT}\"|g" \
-		-e "s|\"pamservicename\"|\"xmpp\"|" \
-		-i "${S}/ejabberd.yml.example" \
-		|| die 'failed to adjust example config'
-}
-
-# Set paths to ejabberd lib directory consistently to point always to directory
-# suffixed with version.
-correct_ejabberd_paths() {
-	sed -e "/^EJABBERDDIR[[:space:]]*=/{s:ejabberd:${P}:}" \
-		-i "${S}/Makefile.in" \
-		|| die 'failed to set ejabberd path in Makefile.in'
-	sed -e "/EJABBERD_BIN_PATH=/{s:ejabberd:${P}:}" \
-		-i "${S}/ejabberdctl.template" \
-		|| die 'failed to set ejabberd path in ejabberdctl.template'
-	sed -e 's|\(captcha_cmd:[[:space:]]*"\).\+"|\1'$(get_ejabberd_path)'/priv/bin/captcha.sh"|' \
-		-i "${S}/ejabberd.yml.example" \
-		|| die 'failed to correct path to captcha.sh in example config'
-}
-
-# Get epam-wrapper from 'files' directory and correct path to lib directory in
-# it. epam-wrapper is placed into work directory. It is assumed no epam-wrapper
-# file exists there already.
-customize_epam_wrapper() {
-	local epam_wrapper_src="$1"
-	local epam_wrapper_dst="${S}/epam-wrapper"
-
-	[[ -e ${epam_wrapper_dst} ]] && die 'epam-wrapper already exists'
-	sed -r -e "s@^(ERL_LIBS=).*\$@\1${EPREFIX}$(get_erl_libs)@" \
-		"${epam_wrapper_src}" >"${epam_wrapper_dst}" \
-		|| die 'failed to install epam-wrapper'
-}
-
-# Check if there already exists a certificate.
-ejabberd_cert_exists() {
-	local cert
-
-	for cert in $(gawk -- \
-			'match($0, /^[[:space:]]*certfile: "([^"]+)"/, m) {print m[1];}' \
-			"${EROOT%/}${JABBER_ETC}/ejabberd.yml"); do
-		[[ -f ${cert} ]] && return 0
-	done
-
-	return 1
-}
-
-# Generate and install sample ejabberd certificate. It's installed into
-# EJABBERD_CERT path.
-ejabberd_cert_install() {
-	SSL_ORGANIZATION="${SSL_ORGANIZATION:-ejabberd XMPP Server}"
-	install_cert "${EJABBERD_CERT%.*}"
-	chown root:jabber "${EROOT%/}${EJABBERD_CERT}" || die
-	chmod 0440 "${EROOT%/}${EJABBERD_CERT}" || die
-}
-
-# Get path to ejabberd lib directory.
-get_ejabberd_path() {
-	echo "$(get_erl_libs)/${P}"
-}
-
-# Make ejabberd.service for systemd from upstream provided template.
-make_ejabberd_service() {
-	sed -r \
-		-e 's!@ctlscriptpath@!/usr/sbin!' \
-		-e 's!(User|Group)=(.*)!\1=jabber!' \
-		"${PN}.service.template" >"${PN}.service" \
-		|| die 'failed to make ejabberd.service'
-}
-
-# Set paths to defined by net-im/jabber-base.
-set_jabberbase_paths() {
-	sed -e "/^ETCDIR[[:space:]]*=/{s:@sysconfdir@/ejabberd:${JABBER_ETC}:}" \
-		-e "/^LOGDIR[[:space:]]*=/{s:@localstatedir@/log/ejabberd:${JABBER_LOG}:}" \
-		-e "/^SPOOLDIR[[:space:]]*=/{s:@localstatedir@/lib/ejabberd:${JABBER_SPOOL}:}" \
-		-i "${S}/Makefile.in" \
-		|| die 'failed to set paths in Makefile.in'
-	sed -e "s|\(ETC_DIR=\){{sysconfdir}}.*|\1${JABBER_ETC}|" \
-		-e "s|\(LOGS_DIR=\){{localstatedir}}.*|\1${JABBER_LOG}|" \
-		-e "s|\(SPOOL_DIR=\){{localstatedir}}.*|\1${JABBER_SPOOL}|" \
-		-i "${S}/ejabberdctl.template" \
-		|| die 'failed to set paths ejabberdctl.template'
-}
-
-# Skip installing docs because it's only COPYING that's installed by Makefile.
-skip_docs() {
-	gawk -i inplace '
-/# Documentation/, /^[[:space:]]*#?[[:space:]]*$/ {
-	if ($0 ~ /^[[:space:]]*#?[[:space:]]*$/) {
-		print $0;
-	} else {
-		next;
-	}
-}
-1
-' "${S}/Makefile.in" || die 'failed to remove docs section from Makefile.in'
-}
-
-src_prepare() {
-	default
-
-	rebar_remove_deps
-	correct_ejabberd_paths
-	set_jabberbase_paths
-	make_ejabberd_service
-	skip_docs
-	adjust_config
-	customize_epam_wrapper "${FILESDIR}/epam-wrapper"
-}
-
-src_configure() {
-	econf \
-		--docdir="${EPREFIX}/usr/share/doc/${PF}/html" \
-		--libdir="${EPREFIX}$(get_erl_libs)" \
-		--enable-user=jabber \
-		$(use_enable debug) \
-		$(use_enable full-xml) \
-		$(use_enable hipe) \
-		$(use_enable mssql) \
-		$(use_enable mysql) \
-		$(use_enable nls iconv) \
-		$(use_enable odbc) \
-		$(use_enable pam) \
-		$(use_enable postgres pgsql) \
-		$(use_enable redis) \
-		$(use_enable riak) \
-		$(use_enable roster-gw roster-gateway-workaround) \
-		$(use_enable sqlite) \
-		$(use_enable zlib)
-}
-
-src_compile() {
-	emake REBAR='rebar -v' src
-}
-
-src_install() {
-	default
-
-	if use pam; then
-		local epam_path="$(get_ejabberd_path)/priv/bin/epam"
-
-		pamd_mimic_system xmpp auth account || die "cannot create pam.d file"
-		into "$(get_ejabberd_path)/priv"
-		newbin epam-wrapper epam
-		# PAM helper module permissions
-		# https://www.process-one.net/docs/ejabberd/guide_en.html#pam
-		fowners root:jabber "${epam_path}"
-		fperms 4750 "${epam_path}"
-	fi
-
-	newconfd "${FILESDIR}/${PN}.confd" "${PN}"
-	newinitd "${FILESDIR}/${PN}.initd" "${PN}"
-	systemd_dounit "${PN}.service"
-	systemd_dotmpfilesd "${FILESDIR}/${PN}.tmpfiles.conf"
-
-	insinto /etc/logrotate.d
-	newins "${FILESDIR}/${PN}.logrotate" "${PN}"
-}
-
-pkg_postinst() {
-	if [[ ! ${REPLACING_VERSIONS} ]]; then
-		echo
-		elog "For configuration instructions, please see"
-		elog "  http://www.process-one.net/en/ejabberd/docs/"
-		echo
-		if [[ " ${REPLACING_VERSIONS} " =~ \ 2\. ]]; then
-			ewarn "If you have used pubsub in ejabberd-2.* you may encounter issues after"
-			ewarn "migration to ${PV}. pubsub data may not be migrated automatically and"
-			ewarn "you may need to run migration script manually, see:"
-			ewarn
-			ewarn "  https://github.com/processone/ejabberd/issues/479#issuecomment-124497456"
-			ewarn
-			ewarn "In case you don't care about all stored moods, activities, geoinfo and you"
-			ewarn "know you don't store in pubsub anything important, you can just remove"
-			ewarn "pubsub tables:"
-			ewarn
-			ewarn "  rm ${EROOT%/}${JABBER_SPOOL}/pubsub_*"
-			ewarn
-			ewarn "See also: https://bugs.gentoo.org/show_bug.cgi?id=588244"
-			echo
-		fi
-	elif [[ -f ${EROOT}etc/jabber/ejabberd.cfg ]]; then
-		elog "Ejabberd now defaults to using a YAML format for its config file."
-		elog "The old ejabberd.cfg file can be converted using the following instructions:"
-		echo
-		elog "1. Make sure all processes related to the previous version of ejabberd aren't"
-		elog "   running. Usually this just means the ejabberd and epmd daemons and possibly"
-		elog "   the pam-related process (epam) if pam support is enabled."
-		elog "2. Run \`ejabberdctl start\` with sufficient permissions. Note that this can"
-		elog "   fail to start ejabberd properly for various reasons. Check ejabberd's main"
-		elog "   log file at /var/log/jabber/ejabberd.log to confirm it started successfully."
-		elog "3. Run"
-		elog "     \`ejabberdctl convert_to_yaml /etc/jabber/ejabberd.cfg /etc/jabber/ejabberd.yml.new\`"
-		elog "   with sufficient permissions, edit and rename /etc/jabber/ejabberd.yml.new to"
-		elog "   /etc/jabber/ejabberd.yml, and finally restart ejabberd with the new config"
-		elog "   file."
-		echo
-	fi
-
-	if ! ejabberd_cert_exists; then
-		ejabberd_cert_install
-	fi
-}

diff --git a/net-im/ejabberd/ejabberd-16.08.ebuild b/net-im/ejabberd/ejabberd-16.08.ebuild
deleted file mode 100644
index 947f907b904..00000000000
--- a/net-im/ejabberd/ejabberd-16.08.ebuild
+++ /dev/null
@@ -1,298 +0,0 @@
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-SSL_CERT_MANDATORY=1
-
-inherit eutils pam rebar ssl-cert systemd
-
-DESCRIPTION="Robust, scalable and extensible XMPP server"
-HOMEPAGE="http://www.ejabberd.im/ https://github.com/processone/ejabberd/"
-SRC_URI="http://www.process-one.net/downloads/${PN}/${PV}/${P}.tgz
-	-> ${P}.tar.gz"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="~amd64 ~arm ~ia64 ~ppc ~sparc ~x86"
-REQUIRED_USE="mssql? ( odbc )"
-# TODO: Add 'tools' flag.
-IUSE="captcha debug full-xml hipe ldap mssql mysql nls odbc pam postgres redis
-	riak roster-gw sqlite zlib"
-
-RESTRICT="test"
-
-# TODO: Add dependencies for 'tools' flag enabled.
-# TODO: tools? (
-# TODO: 	>=dev-erlang/meck-0.8.4
-# TODO: 	>=dev-erlang/moka-1.0.5b
-# TODO: )
-CDEPEND="
-	>=dev-erlang/cache_tab-1.0.3
-	>=dev-erlang/esip-1.0.7
-	>=dev-erlang/fast_tls-1.0.6
-	>=dev-erlang/fast_xml-1.1.14
-	>=dev-erlang/fast_yaml-1.0.5
-	>=dev-erlang/jiffy-0.14.7
-	>=dev-erlang/lager-3.2.1
-	>=dev-erlang/luerl-0.2
-	>=dev-erlang/p1_oauth2-0.6.1
-	>=dev-erlang/p1_utils-1.0.5
-	>=dev-erlang/p1_xmlrpc-1.15.1
-	>=dev-erlang/stringprep-1.0.5
-	>=dev-erlang/stun-1.0.6
-	>=dev-lang/erlang-17.1[hipe?,odbc?,ssl]
-	>=net-im/jabber-base-0.01
-	ldap? ( =net-nds/openldap-2* )
-	mysql? ( >=dev-erlang/p1_mysql-1.0.1 )
-	nls? ( >=dev-erlang/iconv-1.0.1 )
-	odbc? ( dev-db/unixODBC )
-	pam? ( >=dev-erlang/epam-1.0.0
-		<dev-erlang/epam-1.0.1 )
-	postgres? ( >=dev-erlang/p1_pgsql-1.1.0 )
-	redis? ( >=dev-erlang/eredis-1.0.8 )
-	riak? (
-		>=dev-erlang/hamcrest-0.1.0_p20150103
-		>=dev-erlang/riakc-2.1.1_p20151111
-	)
-	sqlite? ( >=dev-erlang/sqlite3-1.1.5 )
-	zlib? ( >=dev-erlang/ezlib-1.0.1 )"
-DEPEND="${CDEPEND}
-	>=sys-apps/gawk-4.1"
-RDEPEND="${CDEPEND}
-	captcha? ( media-gfx/imagemagick[truetype,png] )"
-
-DOCS=( README )
-PATCHES=( "${FILESDIR}/${P}-ejabberdctl.patch" )
-
-EJABBERD_CERT="${EPREFIX}/etc/ssl/ejabberd/server.pem"
-# Paths in net-im/jabber-base
-JABBER_ETC="${EPREFIX}/etc/jabber"
-JABBER_LOG="${EPREFIX}/var/log/jabber"
-JABBER_SPOOL="${EPREFIX}/var/spool/jabber"
-
-# Adjust example configuration file to Gentoo.
-# - Use our sample certificates.
-# - Correct PAM service name.
-adjust_config() {
-	sed -e "s|\"/path/to/ssl.pem\"|\"${EJABBERD_CERT}\"|g" \
-		-e "s|\"pamservicename\"|\"xmpp\"|" \
-		-i "${S}/ejabberd.yml.example" \
-		|| die 'failed to adjust example config'
-}
-
-# Set paths to ejabberd lib directory consistently to point always to directory
-# suffixed with version.
-correct_ejabberd_paths() {
-	sed -e "/^EJABBERDDIR[[:space:]]*=/{s:ejabberd:${P}:}" \
-		-i "${S}/Makefile.in" \
-		|| die 'failed to set ejabberd path in Makefile.in'
-	sed -e "/EJABBERD_BIN_PATH=/{s:ejabberd:${P}:}" \
-		-i "${S}/ejabberdctl.template" \
-		|| die 'failed to set ejabberd path in ejabberdctl.template'
-	sed -e 's|\(captcha_cmd:[[:space:]]*"\).\+"|\1'$(get_ejabberd_path)'/priv/bin/captcha.sh"|' \
-		-i "${S}/ejabberd.yml.example" \
-		|| die 'failed to correct path to captcha.sh in example config'
-}
-
-# Get epam-wrapper from 'files' directory and correct path to lib directory in
-# it. epam-wrapper is placed into work directory. It is assumed no epam-wrapper
-# file exists there already.
-customize_epam_wrapper() {
-	local epam_wrapper_src="$1"
-	local epam_wrapper_dst="${S}/epam-wrapper"
-
-	[[ -e ${epam_wrapper_dst} ]] && die 'epam-wrapper already exists'
-	sed -r -e "s@^(ERL_LIBS=).*\$@\1${EPREFIX}$(get_erl_libs)@" \
-		"${epam_wrapper_src}" >"${epam_wrapper_dst}" \
-		|| die 'failed to install epam-wrapper'
-}
-
-# Check if there already exists a certificate.
-ejabberd_cert_exists() {
-	local cert
-
-	for cert in $(gawk -- \
-			'match($0, /^[[:space:]]*certfile: "([^"]+)"/, m) {print m[1];}' \
-			"${EROOT%/}${JABBER_ETC}/ejabberd.yml"); do
-		[[ -f ${cert} ]] && return 0
-	done
-
-	return 1
-}
-
-# Generate and install sample ejabberd certificate. It's installed into
-# EJABBERD_CERT path.
-ejabberd_cert_install() {
-	SSL_ORGANIZATION="${SSL_ORGANIZATION:-ejabberd XMPP Server}"
-	install_cert "${EJABBERD_CERT%.*}"
-	chown root:jabber "${EROOT%/}${EJABBERD_CERT}" || die
-	chmod 0440 "${EROOT%/}${EJABBERD_CERT}" || die
-}
-
-# Get path to ejabberd lib directory.
-#
-# This is the path ./configure script Base for this path is path set in
-# ./configure script which is /usr/lib by default. If libdir is explicitely set
-# to something else than this should be adjusted here as well.
-get_ejabberd_path() {
-	echo "/usr/$(get_libdir)/${P}"
-}
-
-# Make ejabberd.service for systemd from upstream provided template.
-make_ejabberd_service() {
-	sed -r \
-		-e 's!@ctlscriptpath@!/usr/sbin!' \
-		-e 's!(User|Group)=(.*)!\1=jabber!' \
-		"${PN}.service.template" >"${PN}.service" \
-		|| die 'failed to make ejabberd.service'
-}
-
-# Set paths to defined by net-im/jabber-base.
-set_jabberbase_paths() {
-	sed -e "/^ETCDIR[[:space:]]*=/{s:@sysconfdir@/ejabberd:${JABBER_ETC}:}" \
-		-e "/^LOGDIR[[:space:]]*=/{s:@localstatedir@/log/ejabberd:${JABBER_LOG}:}" \
-		-e "/^SPOOLDIR[[:space:]]*=/{s:@localstatedir@/lib/ejabberd:${JABBER_SPOOL}:}" \
-		-i "${S}/Makefile.in" \
-		|| die 'failed to set paths in Makefile.in'
-	sed -e "s|\(ETC_DIR=\){{sysconfdir}}.*|\1${JABBER_ETC}|" \
-		-e "s|\(LOGS_DIR=\){{localstatedir}}.*|\1${JABBER_LOG}|" \
-		-e "s|\(SPOOL_DIR=\){{localstatedir}}.*|\1${JABBER_SPOOL}|" \
-		-i "${S}/ejabberdctl.template" \
-		|| die 'failed to set paths ejabberdctl.template'
-}
-
-# Skip installing docs because it's only COPYING that's installed by Makefile.
-skip_docs() {
-	gawk -i inplace '
-/# Documentation/, /^[[:space:]]*#?[[:space:]]*$/ {
-	if ($0 ~ /^[[:space:]]*#?[[:space:]]*$/) {
-		print $0;
-	} else {
-		next;
-	}
-}
-1
-' "${S}/Makefile.in" || die 'failed to remove docs section from Makefile.in'
-}
-
-src_prepare() {
-	default
-
-	rebar_remove_deps
-	correct_ejabberd_paths
-	set_jabberbase_paths
-	make_ejabberd_service
-	skip_docs
-	adjust_config
-	customize_epam_wrapper "${FILESDIR}/epam-wrapper"
-
-	# Fix bug #591862. ERL_LIBS should point directly to ejabberd directory
-	# rather than its parent which is default. That way ejabberd directory
-	# takes precedence is module lookup.
-	local ejabberd_erl_libs="$(get_ejabberd_path):$(get_erl_libs)"
-	sed -e "s|\(ERL_LIBS=\){{libdir}}.*|\1${ejabberd_erl_libs}|" \
-		-i "${S}/ejabberdctl.template" \
-		|| die 'failed to set ERL_LIBS in ejabberdctl.template'
-}
-
-src_configure() {
-	econf \
-		--docdir="${EPREFIX}/usr/share/doc/${PF}/html" \
-		--enable-user=jabber \
-		$(use_enable debug) \
-		$(use_enable full-xml) \
-		$(use_enable hipe) \
-		$(use_enable mssql) \
-		$(use_enable mysql) \
-		$(use_enable nls iconv) \
-		$(use_enable odbc) \
-		$(use_enable pam) \
-		$(use_enable postgres pgsql) \
-		$(use_enable redis) \
-		$(use_enable riak) \
-		$(use_enable roster-gw roster-gateway-workaround) \
-		$(use_enable sqlite) \
-		$(use_enable zlib)
-}
-
-src_compile() {
-	emake REBAR='rebar -v' src
-}
-
-src_install() {
-	default
-
-	if use pam; then
-		local epam_path="$(get_ejabberd_path)/priv/bin/epam"
-
-		pamd_mimic_system xmpp auth account || die "cannot create pam.d file"
-		into "$(get_ejabberd_path)/priv"
-		newbin epam-wrapper epam
-		# PAM helper module permissions
-		# https://www.process-one.net/docs/ejabberd/guide_en.html#pam
-		fowners root:jabber "${epam_path}"
-		fperms 4750 "${epam_path}"
-	fi
-
-	newconfd "${FILESDIR}/${PN}.confd" "${PN}"
-	newinitd "${FILESDIR}/${PN}.initd" "${PN}"
-	systemd_dounit "${PN}.service"
-	systemd_dotmpfilesd "${FILESDIR}/${PN}.tmpfiles.conf"
-
-	insinto /etc/logrotate.d
-	newins "${FILESDIR}/${PN}.logrotate" "${PN}"
-}
-
-pkg_postinst() {
-	if [[ ! ${REPLACING_VERSIONS} ]]; then
-		echo
-		elog "For configuration instructions, please see"
-		elog "  http://www.process-one.net/en/ejabberd/docs/"
-		echo
-		if [[ " ${REPLACING_VERSIONS} " =~ \ 2\. ]]; then
-			ewarn "If you have used pubsub in ejabberd-2.* you may encounter issues after"
-			ewarn "migration to ${PV}. pubsub data may not be migrated automatically and"
-			ewarn "you may need to run migration script manually, see:"
-			ewarn
-			ewarn "  https://github.com/processone/ejabberd/issues/479#issuecomment-124497456"
-			ewarn
-			ewarn "In case you don't care about all stored moods, activities, geoinfo and you"
-			ewarn "know you don't store in pubsub anything important, you can just remove"
-			ewarn "pubsub tables:"
-			ewarn
-			ewarn "  rm ${EROOT%/}${JABBER_SPOOL}/pubsub_*"
-			ewarn
-			ewarn "See also: https://bugs.gentoo.org/show_bug.cgi?id=588244"
-			echo
-		fi
-	elif [[ -f ${EROOT}etc/jabber/ejabberd.cfg ]]; then
-		elog "Ejabberd now defaults to using a YAML format for its config file."
-		elog "The old ejabberd.cfg file can be converted using the following instructions:"
-		echo
-		elog "1. Make sure all processes related to the previous version of ejabberd aren't"
-		elog "   running. Usually this just means the ejabberd and epmd daemons and possibly"
-		elog "   the pam-related process (epam) if pam support is enabled."
-		elog "2. Run \`ejabberdctl start\` with sufficient permissions. Note that this can"
-		elog "   fail to start ejabberd properly for various reasons. Check ejabberd's main"
-		elog "   log file at /var/log/jabber/ejabberd.log to confirm it started successfully."
-		elog "3. Run"
-		elog "     \`ejabberdctl convert_to_yaml /etc/jabber/ejabberd.cfg /etc/jabber/ejabberd.yml.new\`"
-		elog "   with sufficient permissions, edit and rename /etc/jabber/ejabberd.yml.new to"
-		elog "   /etc/jabber/ejabberd.yml, and finally restart ejabberd with the new config"
-		elog "   file."
-		echo
-	fi
-
-	if ! ejabberd_cert_exists; then
-		ejabberd_cert_install
-	fi
-
-	if use pam; then
-		# sfperms drops read bit from files with suid. Reapply it.
-		# Fix bug #592218.
-		local epam_path="$(get_ejabberd_path)/priv/bin/epam"
-		chmod g+r "${EROOT%/}${epam_path}" \
-			|| die "failed to correct ${epam_path} permissions"
-	fi
-}

diff --git a/net-im/ejabberd/files/ejabberd-16.04-ejabberdctl.patch b/net-im/ejabberd/files/ejabberd-16.04-ejabberdctl.patch
deleted file mode 100644
index de2acd5aa01..00000000000
--- a/net-im/ejabberd/files/ejabberd-16.04-ejabberdctl.patch
+++ /dev/null
@@ -1,49 +0,0 @@
-Set SHELL since the generic jabber user used on Gentoo for jabber servers
-doesn't have a valid shell set by default and fix EXEC_CMD otherwise it fails
-with "This account is currently not available" again due to jabber not having
-a valid shell.
-
-Also, workaround the assumption that jabber's $HOME is a directory when instead
-it defaults to /dev/null on Gentoo.
-
---- a/ejabberdctl.template	2016-01-12 11:07:58.000000000 +0000
-+++ b/ejabberdctl.template	2016-02-15 21:36:27.508297627 +0000
-@@ -16,6 +16,7 @@
- EPMD={{bindir}}/epmd
- INSTALLUSER={{installuser}}
- ERL_LIBS={{libdir}}
-+SHELL=/bin/sh
- 
- # check the proper system user is used if defined
- if [ "$INSTALLUSER" != "" ] ; then
-@@ -23,11 +24,11 @@
-     for GID in `id -G`; do
-         if [ $GID -eq 0 ] ; then
-             INSTALLUSER_HOME=$(getent passwd "$INSTALLUSER" | cut -d: -f6)
--            if [ -n "$INSTALLUSER_HOME" ] && [ ! -d "$INSTALLUSER_HOME" ] ; then
-+            if [ -n "$INSTALLUSER_HOME" ] && [ ! -e "$INSTALLUSER_HOME" ] ; then
-                 mkdir -p "$INSTALLUSER_HOME"
-                 chown "$INSTALLUSER" "$INSTALLUSER_HOME"
-             fi
--            EXEC_CMD="su $INSTALLUSER -c"
-+            EXEC_CMD="su $INSTALLUSER -p -c"
-         fi
-     done
-     if [ `id -g` -eq `id -g $INSTALLUSER` ] ; then
-@@ -100,6 +101,7 @@
- DATETIME=`date "+%Y%m%d-%H%M%S"`
- ERL_CRASH_DUMP=$LOGS_DIR/erl_crash_$DATETIME.dump
- ERL_INETRC=$ETC_DIR/inetrc
-+HOME=$SPOOL_DIR
- 
- # define mnesia options
- MNESIA_OPTS="-mnesia dir \"\\\"$SPOOL_DIR\\\"\" $MNESIA_OPTIONS"
-@@ -159,6 +161,8 @@
- export CONTRIB_MODULES_PATH
- export CONTRIB_MODULES_CONF_DIR
- export ERL_LIBS
-+export HOME
-+export SHELL
- 
- shell_escape()
- {

diff --git a/net-im/ejabberd/files/ejabberd-16.08-ejabberdctl.patch b/net-im/ejabberd/files/ejabberd-16.08-ejabberdctl.patch
deleted file mode 100644
index 6001c651f5d..00000000000
--- a/net-im/ejabberd/files/ejabberd-16.08-ejabberdctl.patch
+++ /dev/null
@@ -1,62 +0,0 @@
-From 185923a3c5f11c2d29599416a52b6594bc94d8c9 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Amadeusz=20=C5=BBo=C5=82nowski?= <aidecoe@aidecoe.name>
-Date: Mon, 29 Aug 2016 22:29:41 +0100
-Subject: [PATCH] Adjust ejabberdctl for Gentoo jabberbase setup
-
-Set SHELL since the generic jabber user used on Gentoo for jabber
-servers doesn't have a valid shell set by default and fix EXEC_CMD
-otherwise it fails with "This account is currently not available" again
-due to jabber not having a valid shell.
-
-Also, workaround the assumption that jabber's $HOME is a directory when
-instead it defaults to /dev/null on Gentoo.
----
- ejabberdctl.template | 8 ++++++--
- 1 file changed, 6 insertions(+), 2 deletions(-)
-
-diff --git a/ejabberdctl.template b/ejabberdctl.template
-index 5b34ebe..3c080fd 100755
---- a/ejabberdctl.template
-+++ b/ejabberdctl.template
-@@ -16,6 +16,7 @@ IEX={{bindir}}/iex
- EPMD={{epmd}}
- INSTALLUSER={{installuser}}
- ERL_LIBS={{libdir}}
-+SHELL=/bin/sh
- 
- # check the proper system user is used if defined
- if [ "$INSTALLUSER" != "" ] ; then
-@@ -23,11 +24,11 @@ if [ "$INSTALLUSER" != "" ] ; then
-     for GID in `id -G`; do
-         if [ $GID -eq 0 ] ; then
-             INSTALLUSER_HOME=$(getent passwd "$INSTALLUSER" | cut -d: -f6)
--            if [ -n "$INSTALLUSER_HOME" ] && [ ! -d "$INSTALLUSER_HOME" ] ; then
-+            if [ -n "$INSTALLUSER_HOME" ] && [ ! -e "$INSTALLUSER_HOME" ] ; then
-                 mkdir -p "$INSTALLUSER_HOME"
-                 chown "$INSTALLUSER" "$INSTALLUSER_HOME"
-             fi
--            EXEC_CMD="su $INSTALLUSER -c"
-+            EXEC_CMD="su $INSTALLUSER -p -c"
-         fi
-     done
-     if [ `id -g` -eq `id -g $INSTALLUSER` ] ; then
-@@ -91,6 +92,7 @@ EJABBERD_LOG_PATH=$LOGS_DIR/ejabberd.log
- DATETIME=`date "+%Y%m%d-%H%M%S"`
- ERL_CRASH_DUMP=$LOGS_DIR/erl_crash_$DATETIME.dump
- ERL_INETRC=$ETC_DIR/inetrc
-+HOME=$SPOOL_DIR
- 
- # define mnesia options
- MNESIA_OPTS="-mnesia dir \"\\\"$SPOOL_DIR\\\"\" $MNESIA_OPTIONS"
-@@ -149,6 +151,8 @@ export ERL_MAX_ETS_TABLES
- export CONTRIB_MODULES_PATH
- export CONTRIB_MODULES_CONF_DIR
- export ERL_LIBS
-+export HOME
-+export SHELL
- 
- shell_escape_str()
- {
--- 
-2.9.2
-


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: net-im/ejabberd/files/, net-im/ejabberd/
@ 2017-05-28 13:30 Amadeusz Piotr Żołnowski
  0 siblings, 0 replies; 12+ messages in thread
From: Amadeusz Piotr Żołnowski @ 2017-05-28 13:30 UTC (permalink / raw
  To: gentoo-commits

commit:     f7e77ea56eaafd2422d50090000d52cae79ef264
Author:     Amadeusz Żołnowski <aidecoe <AT> gentoo <DOT> org>
AuthorDate: Sun May 28 13:29:55 2017 +0000
Commit:     Amadeusz Piotr Żołnowski <aidecoe <AT> gentoo <DOT> org>
CommitDate: Sun May 28 13:29:55 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f7e77ea5

net-im/ejabberd: Bump version

Package-Manager: Portage-2.3.5, Repoman-2.3.2

 net-im/ejabberd/ejabberd-17.04.ebuild              |  3 +-
 ...7.04-0001-Don-t-configure-or-compile-deps.patch | 53 ++++++++++++++++++++++
 2 files changed, 55 insertions(+), 1 deletion(-)

diff --git a/net-im/ejabberd/ejabberd-17.04.ebuild b/net-im/ejabberd/ejabberd-17.04.ebuild
index 75726aedb77..8b82f975af8 100644
--- a/net-im/ejabberd/ejabberd-17.04.ebuild
+++ b/net-im/ejabberd/ejabberd-17.04.ebuild
@@ -62,7 +62,8 @@ RDEPEND="${CDEPEND}
 	captcha? ( media-gfx/imagemagick[truetype,png] )"
 
 DOCS=( README )
-PATCHES=( "${FILESDIR}/${P}-ejabberdctl.patch" )
+PATCHES=( "${FILESDIR}/${P}-ejabberdctl.patch"
+	"${FILESDIR}/${P}-0001-Don-t-configure-or-compile-deps.patch" )
 
 EJABBERD_CERT="${EPREFIX}/etc/ssl/ejabberd/server.pem"
 # Paths in net-im/jabber-base

diff --git a/net-im/ejabberd/files/ejabberd-17.04-0001-Don-t-configure-or-compile-deps.patch b/net-im/ejabberd/files/ejabberd-17.04-0001-Don-t-configure-or-compile-deps.patch
new file mode 100644
index 00000000000..0a42f549b58
--- /dev/null
+++ b/net-im/ejabberd/files/ejabberd-17.04-0001-Don-t-configure-or-compile-deps.patch
@@ -0,0 +1,53 @@
+From 4086249e78cde107df84e6ad022e9d9821cecc40 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Amadeusz=20=C5=BBo=C5=82nowski?= <aidecoe@aidecoe.name>
+Date: Sun, 28 May 2017 14:22:08 +0100
+Subject: [PATCH] Don't configure or compile deps
+
+---
+ rebar.config.script | 23 -----------------------
+ 1 file changed, 23 deletions(-)
+
+diff --git a/rebar.config.script b/rebar.config.script
+index 19142b9e..04f8b310 100644
+--- a/rebar.config.script
++++ b/rebar.config.script
+@@ -242,27 +242,6 @@ CtParams = fun(CompileOpts) ->
+ 		    TestConfig]
+ 	   end,
+ 
+-GenDepConfigureLine =
+-fun(DepPath, Flags) ->
+-	["sh -c 'if test ! -f ",DepPath,"config.status -o ",
+-	 "config.status -nt ",DepPath,"config.status; ",
+-	 "then (cd ", DepPath, " && ",
+-	 "CFLAGS=\"", CFlags,"\" ",
+-	 "CPPFLAGS=\"", CPPFlags, "\" "
+-	 "LDFLAGS=\"", LDFlags, "\"",
+-	 " ./configure ", string:join(Flags, " "),
+-	 "); fi'"]
+-end,
+-
+-GenDepsConfigure =
+-fun(Hooks) ->
+-	lists:map(fun({Pkg, Flags}) ->
+-			  DepPath = ResolveDepPath("deps/" ++ Pkg ++ "/"),
+-			  {'compile',
+-			   lists:flatten(GenDepConfigureLine(DepPath, Flags))}
+-		  end, Hooks)
+-end,
+-
+ ProcessErlOpt = fun(Vals) ->
+ 			lists:map(
+ 			  fun({i, Path}) ->
+@@ -315,8 +294,6 @@ Rules = [
+ 	  AppendList([{coveralls, ".*", {git, "https://github.com/markusn/coveralls-erl.git", "master"}}]), []},
+ 	 {[post_hooks], [cover_enabled], os:getenv("TRAVIS") == "true",
+ 	  AppendList2(TravisPostHooks), [], false},
+-	 {[pre_hooks], [post_hook_configure], true,
+-	  AppendList2(GenDepsConfigure), [], []},
+ 	 {[ct_extra_params], [eunit_compile_opts], true,
+ 	  AppendStr2(CtParams), "", []},
+ 	 {[erl_opts], true,
+-- 
+2.12.2
+


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: net-im/ejabberd/files/, net-im/ejabberd/
@ 2017-05-28 13:30 Amadeusz Piotr Żołnowski
  0 siblings, 0 replies; 12+ messages in thread
From: Amadeusz Piotr Żołnowski @ 2017-05-28 13:30 UTC (permalink / raw
  To: gentoo-commits

commit:     3f1724d261577a5eebdd7cc64605c41baa7a4f48
Author:     Amadeusz Żołnowski <aidecoe <AT> gentoo <DOT> org>
AuthorDate: Sun May 28 13:08:41 2017 +0000
Commit:     Amadeusz Piotr Żołnowski <aidecoe <AT> gentoo <DOT> org>
CommitDate: Sun May 28 13:08:41 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3f1724d2

net-im/ejabberd: Bump version

Package-Manager: Portage-2.3.5, Repoman-2.3.2

 net-im/ejabberd/Manifest                           |   1 +
 net-im/ejabberd/ejabberd-17.04.ebuild              | 302 +++++++++++++++++++++
 .../files/ejabberd-17.04-ejabberdctl.patch         |  62 +++++
 3 files changed, 365 insertions(+)

diff --git a/net-im/ejabberd/Manifest b/net-im/ejabberd/Manifest
index fcc89f207ce..c5017485df3 100644
--- a/net-im/ejabberd/Manifest
+++ b/net-im/ejabberd/Manifest
@@ -1,2 +1,3 @@
 DIST ejabberd-16.09.tar.gz 1687485 SHA256 7b44ab3af3310ca73624c47b65cf30a651d5a1398413e8af51c610d788fb8f14 SHA512 506365eff83f9ab97c9a632c4b8b2428aacbfc570c34ca65a78903d95c64755489ff7327be3efa2172c9d05d7891f83986b1ff3928a7ce806c0ab2aa5dbb647f WHIRLPOOL 6c56ad58b4e247cedf29cf247fdadddf727270311a0ba21eef88f84ee6b997ad8be75448e3bfdaa67d978ea167e2feb21bc9ce0839741a62fb60fa045e45edf2
 DIST ejabberd-17.01.tar.gz 1638418 SHA256 7efa8f25fe01bce876f9379ba7b4f49752a0fddc6a78e5ae82196fdc7f70c90b SHA512 d64125f81efbf841eded140d877c950439c11e65377e167994d25f85fa66437aad771d94548d063900bd3c472922e6bfa8f8bbe65413f18e7b641f0ed32db566 WHIRLPOOL 7b670b087cccc6b4fb804410730571175c253e094fab6fc8c9412eae4e14b844ad38596426b4334bd751a056f940dfd60c1c06d2560af5b36061eb54553886fb
+DIST ejabberd-17.04.tar.gz 1690441 SHA256 b8395bc65b09f135a60320b62338258acd6056cc241e9e245fde267fb18dd3c9 SHA512 03467434dba92bd1ff2f70d78aa8fcf86fc73cb52aaaa73e4947229e1d14225e7b0d0133c3da7c8efe4c9db13aab932f40f757be46b120d0f280f96d62c203d7 WHIRLPOOL c345a6b31e5ea63d72779630d7db8868e997e876ef929dc0de3df0584ca3dcbec1d36e6bb1cacdcc3ee428f9f82b4dbc73d3f08446ace0daa8beccd2fe9a8bfe

diff --git a/net-im/ejabberd/ejabberd-17.04.ebuild b/net-im/ejabberd/ejabberd-17.04.ebuild
new file mode 100644
index 00000000000..75726aedb77
--- /dev/null
+++ b/net-im/ejabberd/ejabberd-17.04.ebuild
@@ -0,0 +1,302 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+SSL_CERT_MANDATORY=1
+
+inherit eutils pam rebar ssl-cert systemd
+
+DESCRIPTION="Robust, scalable and extensible XMPP server"
+HOMEPAGE="http://www.ejabberd.im/ https://github.com/processone/ejabberd/"
+SRC_URI="http://www.process-one.net/downloads/${PN}/${PV}/${P}.tgz
+	-> ${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~ia64 ~ppc ~sparc ~x86"
+REQUIRED_USE="mssql? ( odbc )"
+# TODO: Add 'tools' flag.
+IUSE="captcha debug full-xml hipe ldap mssql mysql nls odbc pam postgres redis
+	riak roster-gw sqlite zlib"
+
+RESTRICT="test"
+
+# TODO: Add dependencies for 'tools' flag enabled.
+# TODO: tools? (
+# TODO: 	>=dev-erlang/meck-0.8.4
+# TODO: 	>=dev-erlang/moka-1.0.5b
+# TODO: )
+CDEPEND="
+	>=dev-erlang/cache_tab-1.0.7
+	>=dev-erlang/esip-1.0.11
+	>=dev-erlang/fast_tls-1.0.11
+	>=dev-erlang/fast_xml-1.1.21
+	>=dev-erlang/fast_yaml-1.0.9
+	>=dev-erlang/jiffy-0.14.8
+	>=dev-erlang/lager-3.2.1
+	>=dev-erlang/luerl-0.2
+	>=dev-erlang/p1_oauth2-0.6.1
+	>=dev-erlang/p1_utils-1.0.8
+	>=dev-erlang/stringprep-1.0.8
+	>=dev-erlang/stun-1.0.10
+	>=dev-erlang/xmpp-1.1.9
+	>=dev-lang/erlang-17.1[hipe?,odbc?,ssl]
+	>=net-im/jabber-base-0.01
+	ldap? ( =net-nds/openldap-2* )
+	mysql? ( >=dev-erlang/p1_mysql-1.0.2 )
+	nls? ( >=dev-erlang/iconv-1.0.4 )
+	odbc? ( dev-db/unixODBC )
+	pam? ( >=dev-erlang/epam-1.0.2 )
+	postgres? ( >=dev-erlang/p1_pgsql-1.1.2 )
+	redis? ( >=dev-erlang/eredis-1.0.8 )
+	riak? (
+		>=dev-erlang/hamcrest-0.1.0_p20150103
+		>=dev-erlang/riakc-2.4.1
+	)
+	sqlite? ( >=dev-erlang/sqlite3-1.1.5 )
+	zlib? ( >=dev-erlang/ezlib-1.0.2 )"
+DEPEND="${CDEPEND}
+	>=sys-apps/gawk-4.1"
+RDEPEND="${CDEPEND}
+	captcha? ( media-gfx/imagemagick[truetype,png] )"
+
+DOCS=( README )
+PATCHES=( "${FILESDIR}/${P}-ejabberdctl.patch" )
+
+EJABBERD_CERT="${EPREFIX}/etc/ssl/ejabberd/server.pem"
+# Paths in net-im/jabber-base
+JABBER_ETC="${EPREFIX}/etc/jabber"
+JABBER_LOG="${EPREFIX}/var/log/jabber"
+JABBER_SPOOL="${EPREFIX}/var/spool/jabber"
+
+# Adjust example configuration file to Gentoo.
+# - Use our sample certificates.
+# - Correct PAM service name.
+adjust_config() {
+	sed -e "s|\"/path/to/ssl.pem\"|\"${EJABBERD_CERT}\"|g" \
+		-e "s|\"pamservicename\"|\"xmpp\"|" \
+		-i "${S}/ejabberd.yml.example" \
+		|| die 'failed to adjust example config'
+}
+
+# Set paths to ejabberd lib directory consistently to point always to directory
+# suffixed with version.
+correct_ejabberd_paths() {
+	sed -e "/^EJABBERDDIR[[:space:]]*=/{s:ejabberd:${P}:}" \
+		-i "${S}/Makefile.in" \
+		|| die 'failed to set ejabberd path in Makefile.in'
+	sed -e "/EJABBERD_BIN_PATH=/{s:ejabberd:${P}:}" \
+		-i "${S}/ejabberdctl.template" \
+		|| die 'failed to set ejabberd path in ejabberdctl.template'
+	sed -e 's|\(captcha_cmd:[[:space:]]*"\).\+"|\1'$(get_ejabberd_path)'/priv/bin/captcha.sh"|' \
+		-i "${S}/ejabberd.yml.example" \
+		|| die 'failed to correct path to captcha.sh in example config'
+}
+
+# Get epam-wrapper from 'files' directory and correct path to lib directory in
+# it. epam-wrapper is placed into work directory. It is assumed no epam-wrapper
+# file exists there already.
+customize_epam_wrapper() {
+	local epam_wrapper_src="$1"
+	local epam_wrapper_dst="${S}/epam-wrapper"
+
+	[[ -e ${epam_wrapper_dst} ]] && die 'epam-wrapper already exists'
+	sed -r -e "s@^(ERL_LIBS=).*\$@\1${EPREFIX}$(get_erl_libs)@" \
+		"${epam_wrapper_src}" >"${epam_wrapper_dst}" \
+		|| die 'failed to install epam-wrapper'
+}
+
+# Check if there already exists a certificate.
+ejabberd_cert_exists() {
+	local cert
+
+	for cert in $(gawk -- \
+			'match($0, /^[[:space:]]*certfile: "([^"]+)"/, m) {print m[1];}' \
+			"${EROOT%/}${JABBER_ETC}/ejabberd.yml"); do
+		[[ -f ${cert} ]] && return 0
+	done
+
+	return 1
+}
+
+# Generate and install sample ejabberd certificate. It's installed into
+# EJABBERD_CERT path.
+ejabberd_cert_install() {
+	SSL_ORGANIZATION="${SSL_ORGANIZATION:-ejabberd XMPP Server}"
+	install_cert "${EJABBERD_CERT%.*}"
+	chown root:jabber "${EROOT%/}${EJABBERD_CERT}" || die
+	chmod 0440 "${EROOT%/}${EJABBERD_CERT}" || die
+}
+
+# Get path to ejabberd lib directory.
+#
+# This is the path ./configure script Base for this path is path set in
+# ./configure script which is /usr/lib by default. If libdir is explicitely set
+# to something else than this should be adjusted here as well.
+get_ejabberd_path() {
+	echo "/usr/$(get_libdir)/${P}"
+}
+
+# Make ejabberd.service for systemd from upstream provided template.
+make_ejabberd_service() {
+	sed -r \
+		-e 's!@ctlscriptpath@!/usr/sbin!' \
+		-e 's!(User|Group)=(.*)!\1=jabber!' \
+		"${PN}.service.template" >"${PN}.service" \
+		|| die 'failed to make ejabberd.service'
+}
+
+# Set paths to defined by net-im/jabber-base.
+set_jabberbase_paths() {
+	sed -e "/^ETCDIR[[:space:]]*=/{s:@sysconfdir@/ejabberd:${JABBER_ETC}:}" \
+		-e "/^LOGDIR[[:space:]]*=/{s:@localstatedir@/log/ejabberd:${JABBER_LOG}:}" \
+		-e "/^SPOOLDIR[[:space:]]*=/{s:@localstatedir@/lib/ejabberd:${JABBER_SPOOL}:}" \
+		-i "${S}/Makefile.in" \
+		|| die 'failed to set paths in Makefile.in'
+	sed -e "s|\(ETC_DIR=\){{sysconfdir}}.*|\1${JABBER_ETC}|" \
+		-e "s|\(LOGS_DIR=\){{localstatedir}}.*|\1${JABBER_LOG}|" \
+		-e "s|\(SPOOL_DIR=\){{localstatedir}}.*|\1${JABBER_SPOOL}|" \
+		-i "${S}/ejabberdctl.template" \
+		|| die 'failed to set paths ejabberdctl.template'
+}
+
+# Skip installing docs because it's only COPYING that's installed by Makefile.
+skip_docs() {
+	gawk -i inplace '
+/# Documentation/, /^[[:space:]]*#?[[:space:]]*$/ {
+	if ($0 ~ /^[[:space:]]*#?[[:space:]]*$/) {
+		print $0;
+	} else {
+		next;
+	}
+}
+1
+' "${S}/Makefile.in" || die 'failed to remove docs section from Makefile.in'
+}
+
+pkg_setup() {
+	if use pam; then
+		einfo "Adding jabber user to epam group to allow ejabberd to use PAM" \
+			"authentication"
+		# See
+		# <https://docs.ejabberd.im/admin/configuration/#pam-authentication>.
+		# epam binary is installed by dev-erlang/epam package, therefore SUID
+		# is set by that package. Instead of jabber group it uses epam group,
+		# therefore we need to add jabber user to epam group.
+		usermod -a -G epam jabber || die
+	fi
+}
+
+src_prepare() {
+	default
+
+	rebar_remove_deps
+	correct_ejabberd_paths
+	set_jabberbase_paths
+	make_ejabberd_service
+	skip_docs
+	adjust_config
+	customize_epam_wrapper "${FILESDIR}/epam-wrapper"
+
+	rebar_fix_include_path fast_xml
+	rebar_fix_include_path p1_utils
+	rebar_fix_include_path xmpp
+
+	# Fix bug #591862. ERL_LIBS should point directly to ejabberd directory
+	# rather than its parent which is default. That way ejabberd directory
+	# takes precedence is module lookup.
+	local ejabberd_erl_libs="$(get_ejabberd_path):$(get_erl_libs)"
+	sed -e "s|\(ERL_LIBS=\){{libdir}}.*|\1${ejabberd_erl_libs}|" \
+		-i "${S}/ejabberdctl.template" \
+		|| die 'failed to set ERL_LIBS in ejabberdctl.template'
+}
+
+src_configure() {
+	econf \
+		--docdir="${EPREFIX}/usr/share/doc/${PF}/html" \
+		--enable-user=jabber \
+		$(use_enable debug) \
+		$(use_enable full-xml) \
+		$(use_enable hipe) \
+		$(use_enable mssql) \
+		$(use_enable mysql) \
+		$(use_enable nls iconv) \
+		$(use_enable odbc) \
+		$(use_enable pam) \
+		$(use_enable postgres pgsql) \
+		$(use_enable redis) \
+		$(use_enable riak) \
+		$(use_enable roster-gw roster-gateway-workaround) \
+		$(use_enable sqlite) \
+		$(use_enable zlib)
+}
+
+src_compile() {
+	emake REBAR='rebar -v' src
+}
+
+src_install() {
+	default
+
+	if use pam; then
+		local epam_path="$(get_ejabberd_path)/priv/bin/epam"
+
+		pamd_mimic_system xmpp auth account || die "cannot create pam.d file"
+		into "$(get_ejabberd_path)/priv"
+		newbin epam-wrapper epam
+	fi
+
+	newconfd "${FILESDIR}/${PN}.confd" "${PN}"
+	newinitd "${FILESDIR}/${PN}.initd" "${PN}"
+	systemd_dounit "${PN}.service"
+	systemd_dotmpfilesd "${FILESDIR}/${PN}.tmpfiles.conf"
+
+	insinto /etc/logrotate.d
+	newins "${FILESDIR}/${PN}.logrotate" "${PN}"
+}
+
+pkg_postinst() {
+	if [[ ! ${REPLACING_VERSIONS} ]]; then
+		echo
+		elog "For configuration instructions, please see"
+		elog "  http://www.process-one.net/en/ejabberd/docs/"
+		echo
+		if [[ " ${REPLACING_VERSIONS} " =~ \ 2\. ]]; then
+			ewarn "If you have used pubsub in ejabberd-2.* you may encounter issues after"
+			ewarn "migration to ${PV}. pubsub data may not be migrated automatically and"
+			ewarn "you may need to run migration script manually, see:"
+			ewarn
+			ewarn "  https://github.com/processone/ejabberd/issues/479#issuecomment-124497456"
+			ewarn
+			ewarn "In case you don't care about all stored moods, activities, geoinfo and you"
+			ewarn "know you don't store in pubsub anything important, you can just remove"
+			ewarn "pubsub tables:"
+			ewarn
+			ewarn "  rm ${EROOT%/}${JABBER_SPOOL}/pubsub_*"
+			ewarn
+			ewarn "See also: https://bugs.gentoo.org/show_bug.cgi?id=588244"
+			echo
+		fi
+	elif [[ -f ${EROOT}etc/jabber/ejabberd.cfg ]]; then
+		elog "Ejabberd now defaults to using a YAML format for its config file."
+		elog "The old ejabberd.cfg file can be converted using the following instructions:"
+		echo
+		elog "1. Make sure all processes related to the previous version of ejabberd aren't"
+		elog "   running. Usually this just means the ejabberd and epmd daemons and possibly"
+		elog "   the pam-related process (epam) if pam support is enabled."
+		elog "2. Run \`ejabberdctl start\` with sufficient permissions. Note that this can"
+		elog "   fail to start ejabberd properly for various reasons. Check ejabberd's main"
+		elog "   log file at /var/log/jabber/ejabberd.log to confirm it started successfully."
+		elog "3. Run"
+		elog "     \`ejabberdctl convert_to_yaml /etc/jabber/ejabberd.cfg /etc/jabber/ejabberd.yml.new\`"
+		elog "   with sufficient permissions, edit and rename /etc/jabber/ejabberd.yml.new to"
+		elog "   /etc/jabber/ejabberd.yml, and finally restart ejabberd with the new config"
+		elog "   file."
+		echo
+	fi
+
+	if ! ejabberd_cert_exists; then
+		ejabberd_cert_install
+	fi
+}

diff --git a/net-im/ejabberd/files/ejabberd-17.04-ejabberdctl.patch b/net-im/ejabberd/files/ejabberd-17.04-ejabberdctl.patch
new file mode 100644
index 00000000000..6001c651f5d
--- /dev/null
+++ b/net-im/ejabberd/files/ejabberd-17.04-ejabberdctl.patch
@@ -0,0 +1,62 @@
+From 185923a3c5f11c2d29599416a52b6594bc94d8c9 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Amadeusz=20=C5=BBo=C5=82nowski?= <aidecoe@aidecoe.name>
+Date: Mon, 29 Aug 2016 22:29:41 +0100
+Subject: [PATCH] Adjust ejabberdctl for Gentoo jabberbase setup
+
+Set SHELL since the generic jabber user used on Gentoo for jabber
+servers doesn't have a valid shell set by default and fix EXEC_CMD
+otherwise it fails with "This account is currently not available" again
+due to jabber not having a valid shell.
+
+Also, workaround the assumption that jabber's $HOME is a directory when
+instead it defaults to /dev/null on Gentoo.
+---
+ ejabberdctl.template | 8 ++++++--
+ 1 file changed, 6 insertions(+), 2 deletions(-)
+
+diff --git a/ejabberdctl.template b/ejabberdctl.template
+index 5b34ebe..3c080fd 100755
+--- a/ejabberdctl.template
++++ b/ejabberdctl.template
+@@ -16,6 +16,7 @@ IEX={{bindir}}/iex
+ EPMD={{epmd}}
+ INSTALLUSER={{installuser}}
+ ERL_LIBS={{libdir}}
++SHELL=/bin/sh
+ 
+ # check the proper system user is used if defined
+ if [ "$INSTALLUSER" != "" ] ; then
+@@ -23,11 +24,11 @@ if [ "$INSTALLUSER" != "" ] ; then
+     for GID in `id -G`; do
+         if [ $GID -eq 0 ] ; then
+             INSTALLUSER_HOME=$(getent passwd "$INSTALLUSER" | cut -d: -f6)
+-            if [ -n "$INSTALLUSER_HOME" ] && [ ! -d "$INSTALLUSER_HOME" ] ; then
++            if [ -n "$INSTALLUSER_HOME" ] && [ ! -e "$INSTALLUSER_HOME" ] ; then
+                 mkdir -p "$INSTALLUSER_HOME"
+                 chown "$INSTALLUSER" "$INSTALLUSER_HOME"
+             fi
+-            EXEC_CMD="su $INSTALLUSER -c"
++            EXEC_CMD="su $INSTALLUSER -p -c"
+         fi
+     done
+     if [ `id -g` -eq `id -g $INSTALLUSER` ] ; then
+@@ -91,6 +92,7 @@ EJABBERD_LOG_PATH=$LOGS_DIR/ejabberd.log
+ DATETIME=`date "+%Y%m%d-%H%M%S"`
+ ERL_CRASH_DUMP=$LOGS_DIR/erl_crash_$DATETIME.dump
+ ERL_INETRC=$ETC_DIR/inetrc
++HOME=$SPOOL_DIR
+ 
+ # define mnesia options
+ MNESIA_OPTS="-mnesia dir \"\\\"$SPOOL_DIR\\\"\" $MNESIA_OPTIONS"
+@@ -149,6 +151,8 @@ export ERL_MAX_ETS_TABLES
+ export CONTRIB_MODULES_PATH
+ export CONTRIB_MODULES_CONF_DIR
+ export ERL_LIBS
++export HOME
++export SHELL
+ 
+ shell_escape_str()
+ {
+-- 
+2.9.2
+


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: net-im/ejabberd/files/, net-im/ejabberd/
@ 2019-02-24 10:53 Pacho Ramos
  0 siblings, 0 replies; 12+ messages in thread
From: Pacho Ramos @ 2019-02-24 10:53 UTC (permalink / raw
  To: gentoo-commits

commit:     df82a20555aeb41fec827e3541928b6b40f38365
Author:     Pacho Ramos <pacho <AT> gentoo <DOT> org>
AuthorDate: Sun Feb 24 10:34:59 2019 +0000
Commit:     Pacho Ramos <pacho <AT> gentoo <DOT> org>
CommitDate: Sun Feb 24 10:53:08 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=df82a205

net-im/ejabberd: Drop old

Package-Manager: Portage-2.3.62, Repoman-2.3.12
Signed-off-by: Pacho Ramos <pacho <AT> gentoo.org>

 net-im/ejabberd/Manifest                           |   2 -
 net-im/ejabberd/ejabberd-16.09.ebuild              | 319 --------------------
 net-im/ejabberd/ejabberd-17.01-r2.ebuild           | 326 --------------------
 net-im/ejabberd/ejabberd-17.04-r1.ebuild           | 327 ---------------------
 .../files/ejabberd-16.09-ejabberdctl.patch         |  62 ----
 ...rd-17.01-0001-Dont-overwrite-service-file.patch |  15 -
 .../files/ejabberd-17.01-ejabberdctl.patch         |  62 ----
 7 files changed, 1113 deletions(-)

diff --git a/net-im/ejabberd/Manifest b/net-im/ejabberd/Manifest
index 6ac1c7f8a8c..57e9e73b4c0 100644
--- a/net-im/ejabberd/Manifest
+++ b/net-im/ejabberd/Manifest
@@ -1,3 +1 @@
-DIST ejabberd-16.09.tar.gz 1687485 BLAKE2B 01bdfc0ebfc54bf94f5ce645fdb7e4c86070249fe9c5bd6ae40fb355bb0cce8707b285b8e4519a38148a75d8a14719b2815dd0a987de74fe69099bce1401f9da SHA512 506365eff83f9ab97c9a632c4b8b2428aacbfc570c34ca65a78903d95c64755489ff7327be3efa2172c9d05d7891f83986b1ff3928a7ce806c0ab2aa5dbb647f
-DIST ejabberd-17.01.tar.gz 1638418 BLAKE2B 016224277c45f753018a4e82783be1924acc1e747f1674ce1c902b06644908762750770debe5c06e8e4befcb4246b65efed4592d948188c30dcbf158bb049688 SHA512 d64125f81efbf841eded140d877c950439c11e65377e167994d25f85fa66437aad771d94548d063900bd3c472922e6bfa8f8bbe65413f18e7b641f0ed32db566
 DIST ejabberd-17.04.tar.gz 1690441 BLAKE2B 2d31f1f0a393c6531653a55021b9deb729357bb53e86e85b85796a65f505257bcf7a14b0d168af2d13a6820e1524e1164ea7f17797df23ae41d7a8379f9e2066 SHA512 03467434dba92bd1ff2f70d78aa8fcf86fc73cb52aaaa73e4947229e1d14225e7b0d0133c3da7c8efe4c9db13aab932f40f757be46b120d0f280f96d62c203d7

diff --git a/net-im/ejabberd/ejabberd-16.09.ebuild b/net-im/ejabberd/ejabberd-16.09.ebuild
deleted file mode 100644
index 8c86270fcf8..00000000000
--- a/net-im/ejabberd/ejabberd-16.09.ebuild
+++ /dev/null
@@ -1,319 +0,0 @@
-# Copyright 1999-2018 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-SSL_CERT_MANDATORY=1
-
-inherit eutils pam rebar ssl-cert systemd
-
-DESCRIPTION="Robust, scalable and extensible XMPP server"
-HOMEPAGE="https://www.ejabberd.im/ https://github.com/processone/ejabberd/"
-SRC_URI="https://www.process-one.net/downloads/${PN}/${PV}/${P}.tgz
-	-> ${P}.tar.gz"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="amd64 ~arm ~ia64 ppc ~sparc x86"
-REQUIRED_USE="mssql? ( odbc )"
-# TODO: Add 'tools' flag.
-IUSE="captcha debug full-xml hipe ldap mssql mysql nls odbc pam postgres redis
-	riak roster-gw sqlite zlib"
-
-RESTRICT="test"
-
-# TODO: Add dependencies for 'tools' flag enabled.
-# TODO: tools? (
-# TODO: 	>=dev-erlang/meck-0.8.4
-# TODO: 	>=dev-erlang/moka-1.0.5b
-# TODO: )
-CDEPEND="
-	>=dev-erlang/cache_tab-1.0.4
-	>=dev-erlang/esip-1.0.8
-	>=dev-erlang/fast_tls-1.0.7
-	>=dev-erlang/fast_xml-1.1.15
-	>=dev-erlang/fast_yaml-1.0.6
-	>=dev-erlang/jiffy-0.14.7
-	>=dev-erlang/lager-3.2.1
-	>=dev-erlang/luerl-0.2
-	>=dev-erlang/p1_oauth2-0.6.1
-	>=dev-erlang/p1_utils-1.0.5
-	>=dev-erlang/stringprep-1.0.6
-	>=dev-erlang/stun-1.0.7
-	>=dev-lang/erlang-17.1[hipe?,odbc?,ssl]
-	!>=dev-lang/erlang-20.0
-	>=net-im/jabber-base-0.01
-	ldap? ( =net-nds/openldap-2* )
-	mysql? ( >=dev-erlang/p1_mysql-1.0.1 )
-	nls? ( >=dev-erlang/iconv-1.0.2 )
-	odbc? ( dev-db/unixODBC )
-	pam? ( >=dev-erlang/epam-1.0.0
-		<dev-erlang/epam-1.0.1 )
-	postgres? ( >=dev-erlang/p1_pgsql-1.1.0 )
-	redis? ( >=dev-erlang/eredis-1.0.8 )
-	riak? (
-		>=dev-erlang/hamcrest-0.1.0_p20150103
-		>=dev-erlang/riakc-2.1.1_p20151111
-	)
-	sqlite? ( >=dev-erlang/sqlite3-1.1.5 )
-	zlib? ( >=dev-erlang/ezlib-1.0.1 )"
-DEPEND="${CDEPEND}
-	>=sys-apps/gawk-4.1"
-RDEPEND="${CDEPEND}
-	captcha? ( media-gfx/imagemagick[truetype,png] )"
-
-DOCS=( README )
-PATCHES=( "${FILESDIR}/${P}-ejabberdctl.patch" )
-
-EJABBERD_CERT="${EPREFIX}/etc/ssl/ejabberd/server.pem"
-# Paths in net-im/jabber-base
-JABBER_ETC="${EPREFIX}/etc/jabber"
-JABBER_LOG="${EPREFIX}/var/log/jabber"
-JABBER_SPOOL="${EPREFIX}/var/spool/jabber"
-
-# Adjust example configuration file to Gentoo.
-# - Use our sample certificates.
-# - Correct PAM service name.
-adjust_config() {
-	sed -e "s|\"/path/to/ssl.pem\"|\"${EJABBERD_CERT}\"|g" \
-		-e "s|\"pamservicename\"|\"xmpp\"|" \
-		-i "${S}/ejabberd.yml.example" \
-		|| die 'failed to adjust example config'
-}
-
-# Set paths to ejabberd lib directory consistently to point always to directory
-# suffixed with version.
-correct_ejabberd_paths() {
-	sed -e "/^EJABBERDDIR[[:space:]]*=/{s:ejabberd:${P}:}" \
-		-i "${S}/Makefile.in" \
-		|| die 'failed to set ejabberd path in Makefile.in'
-	sed -e "/EJABBERD_BIN_PATH=/{s:ejabberd:${P}:}" \
-		-i "${S}/ejabberdctl.template" \
-		|| die 'failed to set ejabberd path in ejabberdctl.template'
-	sed -e 's|\(captcha_cmd:[[:space:]]*"\).\+"|\1'$(get_ejabberd_path)'/priv/bin/captcha.sh"|' \
-		-i "${S}/ejabberd.yml.example" \
-		|| die 'failed to correct path to captcha.sh in example config'
-}
-
-# Get epam-wrapper from 'files' directory and correct path to lib directory in
-# it. epam-wrapper is placed into work directory. It is assumed no epam-wrapper
-# file exists there already.
-customize_epam_wrapper() {
-	local epam_wrapper_src="$1"
-	local epam_wrapper_dst="${S}/epam-wrapper"
-
-	[[ -e ${epam_wrapper_dst} ]] && die 'epam-wrapper already exists'
-	sed -r -e "s@^(ERL_LIBS=).*\$@\1${EPREFIX}$(get_erl_libs)@" \
-		"${epam_wrapper_src}" >"${epam_wrapper_dst}" \
-		|| die 'failed to install epam-wrapper'
-}
-
-# Disable mod_irc in example configuration file.
-disable_mod_irc() {
-	local needs_iconv='needs dev-erlang/iconv (+nls USE flag)'
-	sed -r \
-		-e "s@^(\s*)(mod_irc\s*:.*$)@\1## \2 # ${needs_iconv}@" \
-		-i "${S}/ejabberd.yml.example" \
-		|| die 'failed to modify example config'
-}
-
-# Check if there already exists a certificate.
-ejabberd_cert_exists() {
-	local cert
-
-	for cert in $(gawk -- \
-			'match($0, /^[[:space:]]*certfile: "([^"]+)"/, m) {print m[1];}' \
-			"${EROOT%/}${JABBER_ETC}/ejabberd.yml"); do
-		[[ -f ${cert} ]] && return 0
-	done
-
-	return 1
-}
-
-# Generate and install sample ejabberd certificate. It's installed into
-# EJABBERD_CERT path.
-ejabberd_cert_install() {
-	SSL_ORGANIZATION="${SSL_ORGANIZATION:-ejabberd XMPP Server}"
-	install_cert "${EJABBERD_CERT%.*}"
-	chown root:jabber "${EROOT%/}${EJABBERD_CERT}" || die
-	chmod 0440 "${EROOT%/}${EJABBERD_CERT}" || die
-}
-
-# Get path to ejabberd lib directory.
-#
-# This is the path ./configure script Base for this path is path set in
-# ./configure script which is /usr/lib by default. If libdir is explicitely set
-# to something else than this should be adjusted here as well.
-get_ejabberd_path() {
-	echo "/usr/$(get_libdir)/${P}"
-}
-
-# Check whether mod_irc is enabled in ejabberd configuration on target system.
-is_mod_irc_enabled() {
-	egrep '^(\s*)(mod_irc\s*:.*$)' \
-		"${EROOT%/}${JABBER_ETC}/ejabberd.yml"
-}
-
-# Make ejabberd.service for systemd from upstream provided template.
-make_ejabberd_service() {
-	sed -r \
-		-e 's!@ctlscriptpath@!/usr/sbin!' \
-		-e 's!(User|Group)=(.*)!\1=jabber!' \
-		"${PN}.service.template" >"${PN}.service" \
-		|| die 'failed to make ejabberd.service'
-}
-
-# Set paths to defined by net-im/jabber-base.
-set_jabberbase_paths() {
-	sed -e "/^ETCDIR[[:space:]]*=/{s:@sysconfdir@/ejabberd:${JABBER_ETC}:}" \
-		-e "/^LOGDIR[[:space:]]*=/{s:@localstatedir@/log/ejabberd:${JABBER_LOG}:}" \
-		-e "/^SPOOLDIR[[:space:]]*=/{s:@localstatedir@/lib/ejabberd:${JABBER_SPOOL}:}" \
-		-i "${S}/Makefile.in" \
-		|| die 'failed to set paths in Makefile.in'
-	sed -e "s|\(ETC_DIR=\){{sysconfdir}}.*|\1${JABBER_ETC}|" \
-		-e "s|\(LOGS_DIR=\){{localstatedir}}.*|\1${JABBER_LOG}|" \
-		-e "s|\(SPOOL_DIR=\){{localstatedir}}.*|\1${JABBER_SPOOL}|" \
-		-i "${S}/ejabberdctl.template" \
-		|| die 'failed to set paths ejabberdctl.template'
-}
-
-# Skip installing docs because it's only COPYING that's installed by Makefile.
-skip_docs() {
-	gawk -i inplace '
-/# Documentation/, /^[[:space:]]*#?[[:space:]]*$/ {
-	if ($0 ~ /^[[:space:]]*#?[[:space:]]*$/) {
-		print $0;
-	} else {
-		next;
-	}
-}
-1
-' "${S}/Makefile.in" || die 'failed to remove docs section from Makefile.in'
-}
-
-src_prepare() {
-	default
-
-	rebar_remove_deps
-	correct_ejabberd_paths
-	set_jabberbase_paths
-	make_ejabberd_service
-	skip_docs
-	adjust_config
-	use nls || disable_mod_irc
-	customize_epam_wrapper "${FILESDIR}/epam-wrapper"
-
-	# Fix bug #591862. ERL_LIBS should point directly to ejabberd directory
-	# rather than its parent which is default. That way ejabberd directory
-	# takes precedence is module lookup.
-	local ejabberd_erl_libs="$(get_ejabberd_path):$(get_erl_libs)"
-	sed -e "s|\(ERL_LIBS=\){{libdir}}.*|\1${ejabberd_erl_libs}|" \
-		-i "${S}/ejabberdctl.template" \
-		|| die 'failed to set ERL_LIBS in ejabberdctl.template'
-}
-
-src_configure() {
-	econf \
-		--docdir="${EPREFIX}/usr/share/doc/${PF}/html" \
-		--enable-user=jabber \
-		$(use_enable debug) \
-		$(use_enable full-xml) \
-		$(use_enable hipe) \
-		$(use_enable mssql) \
-		$(use_enable mysql) \
-		$(use_enable nls iconv) \
-		$(use_enable odbc) \
-		$(use_enable pam) \
-		$(use_enable postgres pgsql) \
-		$(use_enable redis) \
-		$(use_enable riak) \
-		$(use_enable roster-gw roster-gateway-workaround) \
-		$(use_enable sqlite) \
-		$(use_enable zlib)
-}
-
-src_compile() {
-	emake REBAR='rebar -v' src
-}
-
-src_install() {
-	default
-
-	if use pam; then
-		local epam_path="$(get_ejabberd_path)/priv/bin/epam"
-
-		pamd_mimic_system xmpp auth account || die "cannot create pam.d file"
-		into "$(get_ejabberd_path)/priv"
-		newbin epam-wrapper epam
-		# PAM helper module permissions
-		# https://www.process-one.net/docs/ejabberd/guide_en.html#pam
-		fowners root:jabber "${epam_path}"
-		fperms 4750 "${epam_path}"
-	fi
-
-	newconfd "${FILESDIR}/${PN}.confd" "${PN}"
-	newinitd "${FILESDIR}/${PN}.initd" "${PN}"
-	systemd_dounit "${PN}.service"
-	systemd_dotmpfilesd "${FILESDIR}/${PN}.tmpfiles.conf"
-
-	insinto /etc/logrotate.d
-	newins "${FILESDIR}/${PN}.logrotate" "${PN}"
-}
-
-pkg_postinst() {
-	if [[ ! ${REPLACING_VERSIONS} ]]; then
-		echo
-		elog "For configuration instructions, please see"
-		elog "  https://docs.ejabberd.im/"
-		echo
-		if [[ " ${REPLACING_VERSIONS} " =~ \ 2\. ]]; then
-			ewarn "If you have used pubsub in ejabberd-2.* you may encounter issues after"
-			ewarn "migration to ${PV}. pubsub data may not be migrated automatically and"
-			ewarn "you may need to run migration script manually, see:"
-			ewarn
-			ewarn "  https://github.com/processone/ejabberd/issues/479#issuecomment-124497456"
-			ewarn
-			ewarn "In case you don't care about all stored moods, activities, geoinfo and you"
-			ewarn "know you don't store in pubsub anything important, you can just remove"
-			ewarn "pubsub tables:"
-			ewarn
-			ewarn "  rm ${EROOT%/}${JABBER_SPOOL}/pubsub_*"
-			ewarn
-			ewarn "See also: https://bugs.gentoo.org/show_bug.cgi?id=588244"
-			echo
-		fi
-	elif [[ -f ${EROOT}etc/jabber/ejabberd.cfg ]]; then
-		elog "Ejabberd now defaults to using a YAML format for its config file."
-		elog "The old ejabberd.cfg file can be converted using the following instructions:"
-		echo
-		elog "1. Make sure all processes related to the previous version of ejabberd aren't"
-		elog "   running. Usually this just means the ejabberd and epmd daemons and possibly"
-		elog "   the pam-related process (epam) if pam support is enabled."
-		elog "2. Run \`ejabberdctl start\` with sufficient permissions. Note that this can"
-		elog "   fail to start ejabberd properly for various reasons. Check ejabberd's main"
-		elog "   log file at /var/log/jabber/ejabberd.log to confirm it started successfully."
-		elog "3. Run"
-		elog "     \`ejabberdctl convert_to_yaml /etc/jabber/ejabberd.cfg /etc/jabber/ejabberd.yml.new\`"
-		elog "   with sufficient permissions, edit and rename /etc/jabber/ejabberd.yml.new to"
-		elog "   /etc/jabber/ejabberd.yml, and finally restart ejabberd with the new config"
-		elog "   file."
-		echo
-	fi
-
-	if ! ejabberd_cert_exists; then
-		ejabberd_cert_install
-	fi
-
-	if use pam; then
-		# sfperms drops read bit from files with suid. Reapply it.
-		# Fix bug #592218.
-		local epam_path="$(get_ejabberd_path)/priv/bin/epam"
-		chmod g+r "${EROOT%/}${epam_path}" \
-			|| die "failed to correct ${epam_path} permissions"
-	fi
-
-	if ! use nls && is_mod_irc_enabled; then
-		ewarn "nls support (dev-erlang/iconv) is required by mod_irc. Either rebuild ejabberd"
-		ewarn "with nls enabled or disable mod_irc in ${EROOT%/}${JABBER_ETC}/ejabberd.yml."
-	fi
-}

diff --git a/net-im/ejabberd/ejabberd-17.01-r2.ebuild b/net-im/ejabberd/ejabberd-17.01-r2.ebuild
deleted file mode 100644
index d20acca57fe..00000000000
--- a/net-im/ejabberd/ejabberd-17.01-r2.ebuild
+++ /dev/null
@@ -1,326 +0,0 @@
-# Copyright 1999-2018 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-SSL_CERT_MANDATORY=1
-
-inherit eutils pam rebar ssl-cert systemd
-
-DESCRIPTION="Robust, scalable and extensible XMPP server"
-HOMEPAGE="https://www.ejabberd.im/ https://github.com/processone/ejabberd/"
-SRC_URI="https://www.process-one.net/downloads/${PN}/${PV}/${P}.tgz
-	-> ${P}.tar.gz"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="~amd64 ~arm ~ia64 ~ppc ~sparc ~x86"
-REQUIRED_USE="mssql? ( odbc )"
-# TODO: Add 'tools' flag.
-IUSE="captcha debug full-xml hipe ldap mssql mysql nls odbc pam postgres redis
-	riak roster-gw sqlite zlib"
-
-RESTRICT="test"
-
-# TODO: Add dependencies for 'tools' flag enabled.
-# TODO: tools? (
-# TODO: 	>=dev-erlang/meck-0.8.4
-# TODO: 	>=dev-erlang/moka-1.0.5b
-# TODO: )
-CDEPEND="
-	>=dev-erlang/cache_tab-1.0.6
-	>=dev-erlang/esip-1.0.10
-	>=dev-erlang/fast_tls-1.0.10
-	>=dev-erlang/fast_xml-1.1.19
-	>=dev-erlang/fast_yaml-1.0.8
-	>=dev-erlang/jiffy-0.14.8
-	>=dev-erlang/lager-3.2.1
-	>=dev-erlang/luerl-0.2
-	>=dev-erlang/p1_oauth2-0.6.1
-	>=dev-erlang/p1_utils-1.0.6
-	>=dev-erlang/stringprep-1.0.7
-	>=dev-erlang/stun-1.0.9
-	>=dev-erlang/xmpp-1.1.6
-	<dev-erlang/xmpp-1.2.0
-	>=dev-lang/erlang-17.1[hipe?,odbc?,ssl]
-	!>=dev-lang/erlang-20.0
-	>=net-im/jabber-base-0.01
-	ldap? ( =net-nds/openldap-2* )
-	mysql? ( >=dev-erlang/p1_mysql-1.0.2 )
-	nls? ( >=dev-erlang/iconv-1.0.3 )
-	odbc? ( dev-db/unixODBC )
-	pam? ( >=dev-erlang/epam-1.0.0-r1
-		<dev-erlang/epam-1.0.1 )
-	postgres? ( >=dev-erlang/p1_pgsql-1.1.2 )
-	redis? ( >=dev-erlang/eredis-1.0.8 )
-	riak? (
-		>=dev-erlang/hamcrest-0.1.0_p20150103
-		>=dev-erlang/riakc-2.4.1
-	)
-	sqlite? ( >=dev-erlang/sqlite3-1.1.5 )
-	zlib? ( >=dev-erlang/ezlib-1.0.2 )"
-DEPEND="${CDEPEND}
-	>=sys-apps/gawk-4.1"
-RDEPEND="${CDEPEND}
-	captcha? ( media-gfx/imagemagick[truetype,png] )"
-
-DOCS=( README )
-PATCHES=( "${FILESDIR}/${P}-ejabberdctl.patch"
-	"${FILESDIR}/${P}-0001-Dont-overwrite-service-file.patch" )
-
-EJABBERD_CERT="${EPREFIX}/etc/ssl/ejabberd/server.pem"
-# Paths in net-im/jabber-base
-JABBER_ETC="${EPREFIX}/etc/jabber"
-JABBER_LOG="${EPREFIX}/var/log/jabber"
-JABBER_SPOOL="${EPREFIX}/var/spool/jabber"
-
-# Adjust example configuration file to Gentoo.
-# - Use our sample certificates.
-# - Correct PAM service name.
-adjust_config() {
-	sed -e "s|\"/path/to/ssl.pem\"|\"${EJABBERD_CERT}\"|g" \
-		-e "s|\"pamservicename\"|\"xmpp\"|" \
-		-i "${S}/ejabberd.yml.example" \
-		|| die 'failed to adjust example config'
-}
-
-# Set paths to ejabberd lib directory consistently to point always to directory
-# suffixed with version.
-correct_ejabberd_paths() {
-	sed -e "/^EJABBERDDIR[[:space:]]*=/{s:ejabberd:${P}:}" \
-		-i "${S}/Makefile.in" \
-		|| die 'failed to set ejabberd path in Makefile.in'
-	sed -e "/EJABBERD_BIN_PATH=/{s:ejabberd:${P}:}" \
-		-i "${S}/ejabberdctl.template" \
-		|| die 'failed to set ejabberd path in ejabberdctl.template'
-	sed -e 's|\(captcha_cmd:[[:space:]]*"\).\+"|\1'$(get_ejabberd_path)'/priv/bin/captcha.sh"|' \
-		-i "${S}/ejabberd.yml.example" \
-		|| die 'failed to correct path to captcha.sh in example config'
-}
-
-# Get epam-wrapper from 'files' directory and correct path to lib directory in
-# it. epam-wrapper is placed into work directory. It is assumed no epam-wrapper
-# file exists there already.
-customize_epam_wrapper() {
-	local epam_wrapper_src="$1"
-	local epam_wrapper_dst="${S}/epam-wrapper"
-
-	[[ -e ${epam_wrapper_dst} ]] && die 'epam-wrapper already exists'
-	sed -r -e "s@^(ERL_LIBS=).*\$@\1${EPREFIX}$(get_erl_libs)@" \
-		"${epam_wrapper_src}" >"${epam_wrapper_dst}" \
-		|| die 'failed to install epam-wrapper'
-}
-
-# Disable mod_irc in example configuration file.
-disable_mod_irc() {
-	local needs_iconv='needs dev-erlang/iconv (+nls USE flag)'
-	sed -r \
-		-e "s@^(\s*)(mod_irc\s*:.*$)@\1## \2 # ${needs_iconv}@" \
-		-i "${S}/ejabberd.yml.example" \
-		|| die 'failed to modify example config'
-}
-
-# Check if there already exists a certificate.
-ejabberd_cert_exists() {
-	local cert
-
-	for cert in $(gawk -- \
-			'match($0, /^[[:space:]]*certfile: "([^"]+)"/, m) {print m[1];}' \
-			"${EROOT%/}${JABBER_ETC}/ejabberd.yml"); do
-		[[ -f ${cert} ]] && return 0
-	done
-
-	return 1
-}
-
-# Generate and install sample ejabberd certificate. It's installed into
-# EJABBERD_CERT path.
-ejabberd_cert_install() {
-	SSL_ORGANIZATION="${SSL_ORGANIZATION:-ejabberd XMPP Server}"
-	install_cert "${EJABBERD_CERT%.*}"
-	chown root:jabber "${EROOT%/}${EJABBERD_CERT}" || die
-	chmod 0440 "${EROOT%/}${EJABBERD_CERT}" || die
-}
-
-# Get path to ejabberd lib directory.
-#
-# This is the path ./configure script Base for this path is path set in
-# ./configure script which is /usr/lib by default. If libdir is explicitely set
-# to something else than this should be adjusted here as well.
-get_ejabberd_path() {
-	echo "/usr/$(get_libdir)/${P}"
-}
-
-# Check whether mod_irc is enabled in ejabberd configuration on target system.
-is_mod_irc_enabled() {
-	egrep '^(\s*)(mod_irc\s*:.*$)' \
-		"${EROOT%/}${JABBER_ETC}/ejabberd.yml"
-}
-
-# Make ejabberd.service for systemd from upstream provided template.
-make_ejabberd_service() {
-	sed -r \
-		-e 's!@ctlscriptpath@!/usr/sbin!g' \
-		-e 's!(User|Group)=(.*)!\1=jabber!' \
-		"${PN}.service.template" >"${PN}.service" \
-		|| die 'failed to make ejabberd.service'
-}
-
-# Set paths to defined by net-im/jabber-base.
-set_jabberbase_paths() {
-	sed -e "/^ETCDIR[[:space:]]*=/{s:@sysconfdir@/ejabberd:${JABBER_ETC}:}" \
-		-e "/^LOGDIR[[:space:]]*=/{s:@localstatedir@/log/ejabberd:${JABBER_LOG}:}" \
-		-e "/^SPOOLDIR[[:space:]]*=/{s:@localstatedir@/lib/ejabberd:${JABBER_SPOOL}:}" \
-		-i "${S}/Makefile.in" \
-		|| die 'failed to set paths in Makefile.in'
-	sed -e "s|\(ETC_DIR=\){{sysconfdir}}.*|\1${JABBER_ETC}|" \
-		-e "s|\(LOGS_DIR=\){{localstatedir}}.*|\1${JABBER_LOG}|" \
-		-e "s|\(SPOOL_DIR=\){{localstatedir}}.*|\1${JABBER_SPOOL}|" \
-		-i "${S}/ejabberdctl.template" \
-		|| die 'failed to set paths ejabberdctl.template'
-}
-
-# Skip installing docs because it's only COPYING that's installed by Makefile.
-skip_docs() {
-	gawk -i inplace '
-/# Documentation/, /^[[:space:]]*#?[[:space:]]*$/ {
-	if ($0 ~ /^[[:space:]]*#?[[:space:]]*$/) {
-		print $0;
-	} else {
-		next;
-	}
-}
-1
-' "${S}/Makefile.in" || die 'failed to remove docs section from Makefile.in'
-}
-
-pkg_setup() {
-	if use pam; then
-		einfo "Adding jabber user to epam group to allow ejabberd to use PAM" \
-			"authentication"
-		# See
-		# <https://docs.ejabberd.im/admin/configuration/#pam-authentication>.
-		# epam binary is installed by dev-erlang/epam package, therefore SUID
-		# is set by that package. Instead of jabber group it uses epam group,
-		# therefore we need to add jabber user to epam group.
-		usermod -a -G epam jabber || die
-	fi
-}
-
-src_prepare() {
-	default
-
-	rebar_remove_deps
-	correct_ejabberd_paths
-	set_jabberbase_paths
-	make_ejabberd_service
-	skip_docs
-	adjust_config
-	use nls || disable_mod_irc
-	customize_epam_wrapper "${FILESDIR}/epam-wrapper"
-
-	rebar_fix_include_path fast_xml
-	rebar_fix_include_path xmpp
-
-	# Fix bug #591862. ERL_LIBS should point directly to ejabberd directory
-	# rather than its parent which is default. That way ejabberd directory
-	# takes precedence is module lookup.
-	local ejabberd_erl_libs="$(get_ejabberd_path):$(get_erl_libs)"
-	sed -e "s|\(ERL_LIBS=\){{libdir}}.*|\1${ejabberd_erl_libs}|" \
-		-i "${S}/ejabberdctl.template" \
-		|| die 'failed to set ERL_LIBS in ejabberdctl.template'
-}
-
-src_configure() {
-	econf \
-		--docdir="${EPREFIX}/usr/share/doc/${PF}/html" \
-		--enable-user=jabber \
-		$(use_enable debug) \
-		$(use_enable full-xml) \
-		$(use_enable hipe) \
-		$(use_enable mssql) \
-		$(use_enable mysql) \
-		$(use_enable nls iconv) \
-		$(use_enable odbc) \
-		$(use_enable pam) \
-		$(use_enable postgres pgsql) \
-		$(use_enable redis) \
-		$(use_enable riak) \
-		$(use_enable roster-gw roster-gateway-workaround) \
-		$(use_enable sqlite) \
-		$(use_enable zlib)
-}
-
-src_compile() {
-	emake REBAR='rebar -v' src
-}
-
-src_install() {
-	default
-
-	if use pam; then
-		local epam_path="$(get_ejabberd_path)/priv/bin/epam"
-
-		pamd_mimic_system xmpp auth account || die "cannot create pam.d file"
-		into "$(get_ejabberd_path)/priv"
-		newbin epam-wrapper epam
-	fi
-
-	newconfd "${FILESDIR}/${PN}.confd" "${PN}"
-	newinitd "${FILESDIR}/${PN}.initd" "${PN}"
-	systemd_dounit "${PN}.service"
-	systemd_dotmpfilesd "${FILESDIR}/${PN}.tmpfiles.conf"
-
-	insinto /etc/logrotate.d
-	newins "${FILESDIR}/${PN}.logrotate" "${PN}"
-}
-
-pkg_postinst() {
-	if [[ ! ${REPLACING_VERSIONS} ]]; then
-		echo
-		elog "For configuration instructions, please see"
-		elog "  https://docs.ejabberd.im/"
-		echo
-		if [[ " ${REPLACING_VERSIONS} " =~ \ 2\. ]]; then
-			ewarn "If you have used pubsub in ejabberd-2.* you may encounter issues after"
-			ewarn "migration to ${PV}. pubsub data may not be migrated automatically and"
-			ewarn "you may need to run migration script manually, see:"
-			ewarn
-			ewarn "  https://github.com/processone/ejabberd/issues/479#issuecomment-124497456"
-			ewarn
-			ewarn "In case you don't care about all stored moods, activities, geoinfo and you"
-			ewarn "know you don't store in pubsub anything important, you can just remove"
-			ewarn "pubsub tables:"
-			ewarn
-			ewarn "  rm ${EROOT%/}${JABBER_SPOOL}/pubsub_*"
-			ewarn
-			ewarn "See also: https://bugs.gentoo.org/show_bug.cgi?id=588244"
-			echo
-		fi
-	elif [[ -f ${EROOT}etc/jabber/ejabberd.cfg ]]; then
-		elog "Ejabberd now defaults to using a YAML format for its config file."
-		elog "The old ejabberd.cfg file can be converted using the following instructions:"
-		echo
-		elog "1. Make sure all processes related to the previous version of ejabberd aren't"
-		elog "   running. Usually this just means the ejabberd and epmd daemons and possibly"
-		elog "   the pam-related process (epam) if pam support is enabled."
-		elog "2. Run \`ejabberdctl start\` with sufficient permissions. Note that this can"
-		elog "   fail to start ejabberd properly for various reasons. Check ejabberd's main"
-		elog "   log file at /var/log/jabber/ejabberd.log to confirm it started successfully."
-		elog "3. Run"
-		elog "     \`ejabberdctl convert_to_yaml /etc/jabber/ejabberd.cfg /etc/jabber/ejabberd.yml.new\`"
-		elog "   with sufficient permissions, edit and rename /etc/jabber/ejabberd.yml.new to"
-		elog "   /etc/jabber/ejabberd.yml, and finally restart ejabberd with the new config"
-		elog "   file."
-		echo
-	fi
-
-	if ! ejabberd_cert_exists; then
-		ejabberd_cert_install
-	fi
-
-	if ! use nls && is_mod_irc_enabled; then
-		ewarn "nls support (dev-erlang/iconv) is required by mod_irc. Either rebuild ejabberd"
-		ewarn "with nls enabled or disable mod_irc in ${EROOT%/}${JABBER_ETC}/ejabberd.yml."
-	fi
-}

diff --git a/net-im/ejabberd/ejabberd-17.04-r1.ebuild b/net-im/ejabberd/ejabberd-17.04-r1.ebuild
deleted file mode 100644
index 02947b6b739..00000000000
--- a/net-im/ejabberd/ejabberd-17.04-r1.ebuild
+++ /dev/null
@@ -1,327 +0,0 @@
-# Copyright 1999-2018 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-SSL_CERT_MANDATORY=1
-
-inherit eutils pam rebar ssl-cert systemd
-
-DESCRIPTION="Robust, scalable and extensible XMPP server"
-HOMEPAGE="https://www.ejabberd.im/ https://github.com/processone/ejabberd/"
-SRC_URI="https://www.process-one.net/downloads/${PN}/${PV}/${P}.tgz
-	-> ${P}.tar.gz"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="~amd64 ~arm ~ia64 ~ppc ~sparc ~x86"
-REQUIRED_USE="mssql? ( odbc )"
-# TODO: Add 'tools' flag.
-IUSE="captcha debug full-xml hipe ldap mssql mysql nls odbc pam postgres redis
-	riak roster-gw sqlite zlib"
-
-RESTRICT="test"
-
-# TODO: Add dependencies for 'tools' flag enabled.
-# TODO: tools? (
-# TODO: 	>=dev-erlang/meck-0.8.4
-# TODO: 	>=dev-erlang/moka-1.0.5b
-# TODO: )
-CDEPEND="
-	>=dev-erlang/cache_tab-1.0.7
-	>=dev-erlang/esip-1.0.11
-	>=dev-erlang/fast_tls-1.0.11
-	>=dev-erlang/fast_xml-1.1.21
-	>=dev-erlang/fast_yaml-1.0.9
-	>=dev-erlang/jiffy-0.14.8
-	>=dev-erlang/lager-3.2.1
-	>=dev-erlang/luerl-0.2
-	>=dev-erlang/p1_oauth2-0.6.1
-	>=dev-erlang/p1_utils-1.0.8
-	>=dev-erlang/stringprep-1.0.8
-	>=dev-erlang/stun-1.0.10
-	>=dev-erlang/xmpp-1.1.9
-	<dev-erlang/xmpp-1.2.0
-	>=dev-lang/erlang-17.1[hipe?,odbc?,ssl]
-	!>=dev-lang/erlang-20.0
-	>=net-im/jabber-base-0.01
-	ldap? ( =net-nds/openldap-2* )
-	mysql? ( >=dev-erlang/p1_mysql-1.0.2 )
-	nls? ( >=dev-erlang/iconv-1.0.4 )
-	odbc? ( dev-db/unixODBC )
-	pam? ( >=dev-erlang/epam-1.0.2 )
-	postgres? ( >=dev-erlang/p1_pgsql-1.1.2 )
-	redis? ( >=dev-erlang/eredis-1.0.8 )
-	riak? (
-		>=dev-erlang/hamcrest-0.1.0_p20150103
-		>=dev-erlang/riakc-2.4.1
-	)
-	sqlite? ( >=dev-erlang/sqlite3-1.1.5 )
-	zlib? ( >=dev-erlang/ezlib-1.0.2 )"
-DEPEND="${CDEPEND}
-	>=sys-apps/gawk-4.1"
-RDEPEND="${CDEPEND}
-	captcha? ( media-gfx/imagemagick[truetype,png] )"
-
-DOCS=( README )
-PATCHES=( "${FILESDIR}/${P}-ejabberdctl.patch"
-	"${FILESDIR}/${P}-0001-Don-t-configure-or-compile-deps.patch"
-	"${FILESDIR}/${P}-0002-Dont-overwrite-service-file.patch" )
-
-EJABBERD_CERT="${EPREFIX}/etc/ssl/ejabberd/server.pem"
-# Paths in net-im/jabber-base
-JABBER_ETC="${EPREFIX}/etc/jabber"
-JABBER_LOG="${EPREFIX}/var/log/jabber"
-JABBER_SPOOL="${EPREFIX}/var/spool/jabber"
-
-# Adjust example configuration file to Gentoo.
-# - Use our sample certificates.
-# - Correct PAM service name.
-adjust_config() {
-	sed -e "s|\"/path/to/ssl.pem\"|\"${EJABBERD_CERT}\"|g" \
-		-e "s|\"pamservicename\"|\"xmpp\"|" \
-		-i "${S}/ejabberd.yml.example" \
-		|| die 'failed to adjust example config'
-}
-
-# Set paths to ejabberd lib directory consistently to point always to directory
-# suffixed with version.
-correct_ejabberd_paths() {
-	sed -e "/^EJABBERDDIR[[:space:]]*=/{s:ejabberd:${P}:}" \
-		-i "${S}/Makefile.in" \
-		|| die 'failed to set ejabberd path in Makefile.in'
-	sed -e "/EJABBERD_BIN_PATH=/{s:ejabberd:${P}:}" \
-		-i "${S}/ejabberdctl.template" \
-		|| die 'failed to set ejabberd path in ejabberdctl.template'
-	sed -e 's|\(captcha_cmd:[[:space:]]*"\).\+"|\1'$(get_ejabberd_path)'/priv/bin/captcha.sh"|' \
-		-i "${S}/ejabberd.yml.example" \
-		|| die 'failed to correct path to captcha.sh in example config'
-}
-
-# Get epam-wrapper from 'files' directory and correct path to lib directory in
-# it. epam-wrapper is placed into work directory. It is assumed no epam-wrapper
-# file exists there already.
-customize_epam_wrapper() {
-	local epam_wrapper_src="$1"
-	local epam_wrapper_dst="${S}/epam-wrapper"
-
-	[[ -e ${epam_wrapper_dst} ]] && die 'epam-wrapper already exists'
-	sed -r -e "s@^(ERL_LIBS=).*\$@\1${EPREFIX}$(get_erl_libs)@" \
-		"${epam_wrapper_src}" >"${epam_wrapper_dst}" \
-		|| die 'failed to install epam-wrapper'
-}
-
-# Disable mod_irc in example configuration file.
-disable_mod_irc() {
-	local needs_iconv='needs dev-erlang/iconv (+nls USE flag)'
-	sed -r \
-		-e "s@^(\s*)(mod_irc\s*:.*$)@\1## \2 # ${needs_iconv}@" \
-		-i "${S}/ejabberd.yml.example" \
-		|| die 'failed to modify example config'
-}
-
-# Check if there already exists a certificate.
-ejabberd_cert_exists() {
-	local cert
-
-	for cert in $(gawk -- \
-			'match($0, /^[[:space:]]*certfile: "([^"]+)"/, m) {print m[1];}' \
-			"${EROOT%/}${JABBER_ETC}/ejabberd.yml"); do
-		[[ -f ${cert} ]] && return 0
-	done
-
-	return 1
-}
-
-# Generate and install sample ejabberd certificate. It's installed into
-# EJABBERD_CERT path.
-ejabberd_cert_install() {
-	SSL_ORGANIZATION="${SSL_ORGANIZATION:-ejabberd XMPP Server}"
-	install_cert "${EJABBERD_CERT%.*}"
-	chown root:jabber "${EROOT%/}${EJABBERD_CERT}" || die
-	chmod 0440 "${EROOT%/}${EJABBERD_CERT}" || die
-}
-
-# Get path to ejabberd lib directory.
-#
-# This is the path ./configure script Base for this path is path set in
-# ./configure script which is /usr/lib by default. If libdir is explicitely set
-# to something else than this should be adjusted here as well.
-get_ejabberd_path() {
-	echo "/usr/$(get_libdir)/${P}"
-}
-
-# Check whether mod_irc is enabled in ejabberd configuration on target system.
-is_mod_irc_enabled() {
-	egrep '^(\s*)(mod_irc\s*:.*$)' \
-		"${EROOT%/}${JABBER_ETC}/ejabberd.yml"
-}
-
-# Make ejabberd.service for systemd from upstream provided template.
-make_ejabberd_service() {
-	sed -r \
-		-e 's!@ctlscriptpath@!/usr/sbin!g' \
-		-e 's!(User|Group)=(.*)!\1=jabber!' \
-		"${PN}.service.template" >"${PN}.service" \
-		|| die 'failed to make ejabberd.service'
-}
-
-# Set paths to defined by net-im/jabber-base.
-set_jabberbase_paths() {
-	sed -e "/^ETCDIR[[:space:]]*=/{s:@sysconfdir@/ejabberd:${JABBER_ETC}:}" \
-		-e "/^LOGDIR[[:space:]]*=/{s:@localstatedir@/log/ejabberd:${JABBER_LOG}:}" \
-		-e "/^SPOOLDIR[[:space:]]*=/{s:@localstatedir@/lib/ejabberd:${JABBER_SPOOL}:}" \
-		-i "${S}/Makefile.in" \
-		|| die 'failed to set paths in Makefile.in'
-	sed -e "s|\(ETC_DIR=\){{sysconfdir}}.*|\1${JABBER_ETC}|" \
-		-e "s|\(LOGS_DIR=\){{localstatedir}}.*|\1${JABBER_LOG}|" \
-		-e "s|\(SPOOL_DIR=\){{localstatedir}}.*|\1${JABBER_SPOOL}|" \
-		-i "${S}/ejabberdctl.template" \
-		|| die 'failed to set paths ejabberdctl.template'
-}
-
-# Skip installing docs because it's only COPYING that's installed by Makefile.
-skip_docs() {
-	gawk -i inplace '
-/# Documentation/, /^[[:space:]]*#?[[:space:]]*$/ {
-	if ($0 ~ /^[[:space:]]*#?[[:space:]]*$/) {
-		print $0;
-	} else {
-		next;
-	}
-}
-1
-' "${S}/Makefile.in" || die 'failed to remove docs section from Makefile.in'
-}
-
-pkg_setup() {
-	if use pam; then
-		einfo "Adding jabber user to epam group to allow ejabberd to use PAM" \
-			"authentication"
-		# See
-		# <https://docs.ejabberd.im/admin/configuration/#pam-authentication>.
-		# epam binary is installed by dev-erlang/epam package, therefore SUID
-		# is set by that package. Instead of jabber group it uses epam group,
-		# therefore we need to add jabber user to epam group.
-		usermod -a -G epam jabber || die
-	fi
-}
-
-src_prepare() {
-	default
-
-	rebar_remove_deps
-	correct_ejabberd_paths
-	set_jabberbase_paths
-	make_ejabberd_service
-	skip_docs
-	adjust_config
-	use nls || disable_mod_irc
-	customize_epam_wrapper "${FILESDIR}/epam-wrapper"
-
-	rebar_fix_include_path fast_xml
-	rebar_fix_include_path p1_utils
-	rebar_fix_include_path xmpp
-
-	# Fix bug #591862. ERL_LIBS should point directly to ejabberd directory
-	# rather than its parent which is default. That way ejabberd directory
-	# takes precedence is module lookup.
-	local ejabberd_erl_libs="$(get_ejabberd_path):$(get_erl_libs)"
-	sed -e "s|\(ERL_LIBS=\){{libdir}}.*|\1${ejabberd_erl_libs}|" \
-		-i "${S}/ejabberdctl.template" \
-		|| die 'failed to set ERL_LIBS in ejabberdctl.template'
-}
-
-src_configure() {
-	econf \
-		--docdir="${EPREFIX}/usr/share/doc/${PF}/html" \
-		--enable-user=jabber \
-		$(use_enable debug) \
-		$(use_enable full-xml) \
-		$(use_enable hipe) \
-		$(use_enable mssql) \
-		$(use_enable mysql) \
-		$(use_enable nls iconv) \
-		$(use_enable odbc) \
-		$(use_enable pam) \
-		$(use_enable postgres pgsql) \
-		$(use_enable redis) \
-		$(use_enable riak) \
-		$(use_enable roster-gw roster-gateway-workaround) \
-		$(use_enable sqlite) \
-		$(use_enable zlib)
-}
-
-src_compile() {
-	emake REBAR='rebar -v' src
-}
-
-src_install() {
-	default
-
-	if use pam; then
-		local epam_path="$(get_ejabberd_path)/priv/bin/epam"
-
-		pamd_mimic_system xmpp auth account || die "cannot create pam.d file"
-		into "$(get_ejabberd_path)/priv"
-		newbin epam-wrapper epam
-	fi
-
-	newconfd "${FILESDIR}/${PN}.confd" "${PN}"
-	newinitd "${FILESDIR}/${PN}.initd" "${PN}"
-	systemd_dounit "${PN}.service"
-	systemd_dotmpfilesd "${FILESDIR}/${PN}.tmpfiles.conf"
-
-	insinto /etc/logrotate.d
-	newins "${FILESDIR}/${PN}.logrotate" "${PN}"
-}
-
-pkg_postinst() {
-	if [[ ! ${REPLACING_VERSIONS} ]]; then
-		echo
-		elog "For configuration instructions, please see"
-		elog "  https://docs.ejabberd.im/"
-		echo
-		if [[ " ${REPLACING_VERSIONS} " =~ \ 2\. ]]; then
-			ewarn "If you have used pubsub in ejabberd-2.* you may encounter issues after"
-			ewarn "migration to ${PV}. pubsub data may not be migrated automatically and"
-			ewarn "you may need to run migration script manually, see:"
-			ewarn
-			ewarn "  https://github.com/processone/ejabberd/issues/479#issuecomment-124497456"
-			ewarn
-			ewarn "In case you don't care about all stored moods, activities, geoinfo and you"
-			ewarn "know you don't store in pubsub anything important, you can just remove"
-			ewarn "pubsub tables:"
-			ewarn
-			ewarn "  rm ${EROOT%/}${JABBER_SPOOL}/pubsub_*"
-			ewarn
-			ewarn "See also: https://bugs.gentoo.org/show_bug.cgi?id=588244"
-			echo
-		fi
-	elif [[ -f ${EROOT}etc/jabber/ejabberd.cfg ]]; then
-		elog "Ejabberd now defaults to using a YAML format for its config file."
-		elog "The old ejabberd.cfg file can be converted using the following instructions:"
-		echo
-		elog "1. Make sure all processes related to the previous version of ejabberd aren't"
-		elog "   running. Usually this just means the ejabberd and epmd daemons and possibly"
-		elog "   the pam-related process (epam) if pam support is enabled."
-		elog "2. Run \`ejabberdctl start\` with sufficient permissions. Note that this can"
-		elog "   fail to start ejabberd properly for various reasons. Check ejabberd's main"
-		elog "   log file at /var/log/jabber/ejabberd.log to confirm it started successfully."
-		elog "3. Run"
-		elog "     \`ejabberdctl convert_to_yaml /etc/jabber/ejabberd.cfg /etc/jabber/ejabberd.yml.new\`"
-		elog "   with sufficient permissions, edit and rename /etc/jabber/ejabberd.yml.new to"
-		elog "   /etc/jabber/ejabberd.yml, and finally restart ejabberd with the new config"
-		elog "   file."
-		echo
-	fi
-
-	if ! ejabberd_cert_exists; then
-		ejabberd_cert_install
-	fi
-
-	if ! use nls && is_mod_irc_enabled; then
-		ewarn "nls support (dev-erlang/iconv) is required by mod_irc. Either rebuild ejabberd"
-		ewarn "with nls enabled or disable mod_irc in ${EROOT%/}${JABBER_ETC}/ejabberd.yml."
-	fi
-}

diff --git a/net-im/ejabberd/files/ejabberd-16.09-ejabberdctl.patch b/net-im/ejabberd/files/ejabberd-16.09-ejabberdctl.patch
deleted file mode 100644
index 6001c651f5d..00000000000
--- a/net-im/ejabberd/files/ejabberd-16.09-ejabberdctl.patch
+++ /dev/null
@@ -1,62 +0,0 @@
-From 185923a3c5f11c2d29599416a52b6594bc94d8c9 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Amadeusz=20=C5=BBo=C5=82nowski?= <aidecoe@aidecoe.name>
-Date: Mon, 29 Aug 2016 22:29:41 +0100
-Subject: [PATCH] Adjust ejabberdctl for Gentoo jabberbase setup
-
-Set SHELL since the generic jabber user used on Gentoo for jabber
-servers doesn't have a valid shell set by default and fix EXEC_CMD
-otherwise it fails with "This account is currently not available" again
-due to jabber not having a valid shell.
-
-Also, workaround the assumption that jabber's $HOME is a directory when
-instead it defaults to /dev/null on Gentoo.
----
- ejabberdctl.template | 8 ++++++--
- 1 file changed, 6 insertions(+), 2 deletions(-)
-
-diff --git a/ejabberdctl.template b/ejabberdctl.template
-index 5b34ebe..3c080fd 100755
---- a/ejabberdctl.template
-+++ b/ejabberdctl.template
-@@ -16,6 +16,7 @@ IEX={{bindir}}/iex
- EPMD={{epmd}}
- INSTALLUSER={{installuser}}
- ERL_LIBS={{libdir}}
-+SHELL=/bin/sh
- 
- # check the proper system user is used if defined
- if [ "$INSTALLUSER" != "" ] ; then
-@@ -23,11 +24,11 @@ if [ "$INSTALLUSER" != "" ] ; then
-     for GID in `id -G`; do
-         if [ $GID -eq 0 ] ; then
-             INSTALLUSER_HOME=$(getent passwd "$INSTALLUSER" | cut -d: -f6)
--            if [ -n "$INSTALLUSER_HOME" ] && [ ! -d "$INSTALLUSER_HOME" ] ; then
-+            if [ -n "$INSTALLUSER_HOME" ] && [ ! -e "$INSTALLUSER_HOME" ] ; then
-                 mkdir -p "$INSTALLUSER_HOME"
-                 chown "$INSTALLUSER" "$INSTALLUSER_HOME"
-             fi
--            EXEC_CMD="su $INSTALLUSER -c"
-+            EXEC_CMD="su $INSTALLUSER -p -c"
-         fi
-     done
-     if [ `id -g` -eq `id -g $INSTALLUSER` ] ; then
-@@ -91,6 +92,7 @@ EJABBERD_LOG_PATH=$LOGS_DIR/ejabberd.log
- DATETIME=`date "+%Y%m%d-%H%M%S"`
- ERL_CRASH_DUMP=$LOGS_DIR/erl_crash_$DATETIME.dump
- ERL_INETRC=$ETC_DIR/inetrc
-+HOME=$SPOOL_DIR
- 
- # define mnesia options
- MNESIA_OPTS="-mnesia dir \"\\\"$SPOOL_DIR\\\"\" $MNESIA_OPTIONS"
-@@ -149,6 +151,8 @@ export ERL_MAX_ETS_TABLES
- export CONTRIB_MODULES_PATH
- export CONTRIB_MODULES_CONF_DIR
- export ERL_LIBS
-+export HOME
-+export SHELL
- 
- shell_escape_str()
- {
--- 
-2.9.2
-

diff --git a/net-im/ejabberd/files/ejabberd-17.01-0001-Dont-overwrite-service-file.patch b/net-im/ejabberd/files/ejabberd-17.01-0001-Dont-overwrite-service-file.patch
deleted file mode 100644
index 92b7b023309..00000000000
--- a/net-im/ejabberd/files/ejabberd-17.01-0001-Dont-overwrite-service-file.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-diff --git a/Makefile.in b/Makefile.in
-index 5ff3efe0..644ed713 100644
---- a/Makefile.in
-+++ b/Makefile.in
-@@ -204,8 +204,8 @@ install: all copy-files
- 	chmod 755 ejabberd.init
- 	#
- 	# Service script
--	$(SED) -e "s*@ctlscriptpath@*$(SBINDIR)*g" ejabberd.service.template \
--		> ejabberd.service
-+	[ -f ejabberd.service ] || $(SED) -e "s*@ctlscriptpath@*$(SBINDIR)*g" \
-+		ejabberd.service.template > ejabberd.service
- 	chmod 644 ejabberd.service
- 	#
- 	# Spool directory

diff --git a/net-im/ejabberd/files/ejabberd-17.01-ejabberdctl.patch b/net-im/ejabberd/files/ejabberd-17.01-ejabberdctl.patch
deleted file mode 100644
index 6001c651f5d..00000000000
--- a/net-im/ejabberd/files/ejabberd-17.01-ejabberdctl.patch
+++ /dev/null
@@ -1,62 +0,0 @@
-From 185923a3c5f11c2d29599416a52b6594bc94d8c9 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Amadeusz=20=C5=BBo=C5=82nowski?= <aidecoe@aidecoe.name>
-Date: Mon, 29 Aug 2016 22:29:41 +0100
-Subject: [PATCH] Adjust ejabberdctl for Gentoo jabberbase setup
-
-Set SHELL since the generic jabber user used on Gentoo for jabber
-servers doesn't have a valid shell set by default and fix EXEC_CMD
-otherwise it fails with "This account is currently not available" again
-due to jabber not having a valid shell.
-
-Also, workaround the assumption that jabber's $HOME is a directory when
-instead it defaults to /dev/null on Gentoo.
----
- ejabberdctl.template | 8 ++++++--
- 1 file changed, 6 insertions(+), 2 deletions(-)
-
-diff --git a/ejabberdctl.template b/ejabberdctl.template
-index 5b34ebe..3c080fd 100755
---- a/ejabberdctl.template
-+++ b/ejabberdctl.template
-@@ -16,6 +16,7 @@ IEX={{bindir}}/iex
- EPMD={{epmd}}
- INSTALLUSER={{installuser}}
- ERL_LIBS={{libdir}}
-+SHELL=/bin/sh
- 
- # check the proper system user is used if defined
- if [ "$INSTALLUSER" != "" ] ; then
-@@ -23,11 +24,11 @@ if [ "$INSTALLUSER" != "" ] ; then
-     for GID in `id -G`; do
-         if [ $GID -eq 0 ] ; then
-             INSTALLUSER_HOME=$(getent passwd "$INSTALLUSER" | cut -d: -f6)
--            if [ -n "$INSTALLUSER_HOME" ] && [ ! -d "$INSTALLUSER_HOME" ] ; then
-+            if [ -n "$INSTALLUSER_HOME" ] && [ ! -e "$INSTALLUSER_HOME" ] ; then
-                 mkdir -p "$INSTALLUSER_HOME"
-                 chown "$INSTALLUSER" "$INSTALLUSER_HOME"
-             fi
--            EXEC_CMD="su $INSTALLUSER -c"
-+            EXEC_CMD="su $INSTALLUSER -p -c"
-         fi
-     done
-     if [ `id -g` -eq `id -g $INSTALLUSER` ] ; then
-@@ -91,6 +92,7 @@ EJABBERD_LOG_PATH=$LOGS_DIR/ejabberd.log
- DATETIME=`date "+%Y%m%d-%H%M%S"`
- ERL_CRASH_DUMP=$LOGS_DIR/erl_crash_$DATETIME.dump
- ERL_INETRC=$ETC_DIR/inetrc
-+HOME=$SPOOL_DIR
- 
- # define mnesia options
- MNESIA_OPTS="-mnesia dir \"\\\"$SPOOL_DIR\\\"\" $MNESIA_OPTIONS"
-@@ -149,6 +151,8 @@ export ERL_MAX_ETS_TABLES
- export CONTRIB_MODULES_PATH
- export CONTRIB_MODULES_CONF_DIR
- export ERL_LIBS
-+export HOME
-+export SHELL
- 
- shell_escape_str()
- {
--- 
-2.9.2
-


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: net-im/ejabberd/files/, net-im/ejabberd/
@ 2020-04-30  8:16 Hanno Böck
  0 siblings, 0 replies; 12+ messages in thread
From: Hanno Böck @ 2020-04-30  8:16 UTC (permalink / raw
  To: gentoo-commits

commit:     2d8c03f7f20c016978f58edf112225d52ea17dd8
Author:     Hanno Böck <hanno <AT> gentoo <DOT> org>
AuthorDate: Thu Apr 30 08:16:32 2020 +0000
Commit:     Hanno Böck <hanno <AT> gentoo <DOT> org>
CommitDate: Thu Apr 30 08:16:32 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2d8c03f7

net-im/ejabberd: Version bump.

Based on ebuild from Vampik's overlay with small changes.
Remove old postinst warnings, add warning for needed config changes
for updates from 17.x.

Closes: https://bugs.gentoo.org/626260
Signed-off-by: Hanno Böck <hanno <AT> gentoo.org>
Package-Manager: Portage-2.3.99, Repoman-2.3.22

 net-im/ejabberd/Manifest                           |   1 +
 net-im/ejabberd/ejabberd-20.03.ebuild              | 292 +++++++++++++++++++++
 ...rd-19.08-0002-Dont-overwrite-service-file.patch |  15 ++
 .../files/ejabberd-19.08-ejabberdctl.patch         |  38 +++
 net-im/ejabberd/metadata.xml                       |   7 +-
 5 files changed, 350 insertions(+), 3 deletions(-)

diff --git a/net-im/ejabberd/Manifest b/net-im/ejabberd/Manifest
index 57e9e73b4c0..20a2eb6b380 100644
--- a/net-im/ejabberd/Manifest
+++ b/net-im/ejabberd/Manifest
@@ -1 +1,2 @@
 DIST ejabberd-17.04.tar.gz 1690441 BLAKE2B 2d31f1f0a393c6531653a55021b9deb729357bb53e86e85b85796a65f505257bcf7a14b0d168af2d13a6820e1524e1164ea7f17797df23ae41d7a8379f9e2066 SHA512 03467434dba92bd1ff2f70d78aa8fcf86fc73cb52aaaa73e4947229e1d14225e7b0d0133c3da7c8efe4c9db13aab932f40f757be46b120d0f280f96d62c203d7
+DIST ejabberd-20.03.tar.gz 2006603 BLAKE2B 67fa7d86e6802f24e783e91a8cb498375ca615bf22422ebe8bf630eb721e50574f468cfe25271172ebdfdca0c1df24dc6dd7f96a289153a017c32eb82af06d82 SHA512 f3ab666d9ffa596386ef121161dc7eeedca85cb7f5d290ad0882cd9557ea4166467bce9c082bdb423f932b44999c8e887d6a386d53564febf360f306feda3952

diff --git a/net-im/ejabberd/ejabberd-20.03.ebuild b/net-im/ejabberd/ejabberd-20.03.ebuild
new file mode 100644
index 00000000000..aadecdb23d9
--- /dev/null
+++ b/net-im/ejabberd/ejabberd-20.03.ebuild
@@ -0,0 +1,292 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+SSL_CERT_MANDATORY=1
+
+inherit eutils pam rebar ssl-cert systemd
+
+DESCRIPTION="Robust, scalable and extensible XMPP server"
+HOMEPAGE="https://www.ejabberd.im/ https://github.com/processone/ejabberd/"
+SRC_URI="https://static.process-one.net/${PN}/downloads/${PV}/${P}.tgz
+	-> ${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64"
+REQUIRED_USE="mssql? ( odbc )"
+# TODO: Add 'tools' flag.
+IUSE="captcha debug full-xml hipe ldap mssql mysql odbc pam postgres redis
+	roster-gw sip sqlite stun zlib"
+
+RESTRICT="test"
+
+# TODO: Add dependencies for 'tools' flag enabled.
+# TODO: tools? (
+# TODO:		>=dev-erlang/luerl-0.3
+# TODO: )
+DEPEND=">=dev-lang/erlang-19.3[hipe?,odbc?,ssl]
+	>=dev-erlang/cache_tab-1.0.22
+	>=dev-erlang/eimp-1.0.14
+	>=dev-erlang/fast_tls-1.1.4
+	>=dev-erlang/fast_xml-1.1.39
+	>=dev-erlang/fast_yaml-1.0.24
+	>=dev-erlang/yconf-1.0.4
+	>=dev-erlang/jiffy-1.0.1
+	>=dev-erlang/jose-1.9.0
+	>=dev-erlang/lager-3.6.10
+	>=dev-erlang/p1_oauth2-0.6.6
+	>=dev-erlang/p1_utils-1.0.18
+	>=dev-erlang/stringprep-1.0.19
+	>=dev-erlang/xmpp-1.4.5
+	>=dev-erlang/pkix-1.0.5
+	>=dev-erlang/mqtree-1.0.7
+	>=dev-erlang/idna-6.0.0
+	>=dev-erlang/p1_acme-1.0.5
+	>=dev-erlang/base64url-1.0
+	>=net-im/jabber-base-0.01
+	ldap? ( =net-nds/openldap-2* )
+	mysql? ( >=dev-erlang/p1_mysql-1.0.14 )
+	odbc? ( dev-db/unixODBC )
+	pam? ( >=dev-erlang/epam-1.0.7 )
+	postgres? ( >=dev-erlang/p1_pgsql-1.1.9 )
+	redis? ( >=dev-erlang/eredis-1.0.8 )
+	sip? ( >=dev-erlang/esip-1.0.32 )
+	sqlite? ( >=dev-erlang/sqlite3-1.1.6 )
+	stun? ( >=dev-erlang/stun-1.0.31 )
+	zlib? ( >=dev-erlang/ezlib-1.0.7 )"
+RDEPEND="${DEPEND}
+	captcha? ( media-gfx/imagemagick[truetype,png] )"
+
+DOCS=( CHANGELOG.md README.md )
+PATCHES=( "${FILESDIR}/${PN}-19.08-ejabberdctl.patch"
+	"${FILESDIR}/${PN}-19.08-0002-Dont-overwrite-service-file.patch")
+
+EJABBERD_CERT="${EPREFIX}/etc/ssl/ejabberd/server.pem"
+# Paths in net-im/jabber-base
+JABBER_ETC="${EPREFIX}/etc/jabber"
+JABBER_LOG="${EPREFIX}/var/log/jabber"
+JABBER_SPOOL="${EPREFIX}/var/spool/jabber"
+
+# Adjust example configuration file to Gentoo.
+# - Use our sample certificate.
+adjust_config() {
+	sed -rne "/^#?\s+certfiles:/{p;a\  - ${EJABBERD_CERT}" -e ":a;n;/^#?\s+-/ba};p" \
+		-i "${S}/ejabberd.yml.example" \
+		|| die 'failed to adjust example config'
+	sed -re 's/^#\s+(certfiles)/\1/' \
+		-i "${S}/ejabberd.yml.example" \
+		|| die 'failed to adjust example config'
+}
+
+# Set paths to ejabberd lib directory consistently to point always to directory
+# suffixed with version.
+correct_ejabberd_paths() {
+	sed -e "/^EJABBERDDIR[[:space:]]*=/{s:ejabberd:${P}:}" \
+		-i "${S}/Makefile.in" \
+		|| die 'failed to set ejabberd path in Makefile.in'
+	sed -e "/EJABBERD_BIN_PATH=/{s:ejabberd:${P}:}" \
+		-i "${S}/ejabberdctl.template" \
+		|| die 'failed to set ejabberd path in ejabberdctl.template'
+}
+
+# Get epam-wrapper from 'files' directory and correct path to lib directory in
+# it. epam-wrapper is placed into work directory. It is assumed no epam-wrapper
+# file exists there already.
+customize_epam_wrapper() {
+	local epam_wrapper_src="$1"
+	local epam_wrapper_dst="${S}/epam-wrapper"
+
+	[[ -e ${epam_wrapper_dst} ]] && die 'epam-wrapper already exists'
+	sed -r -e "s@^(ERL_LIBS=).*\$@\1${EPREFIX}$(get_erl_libs)@" \
+		"${epam_wrapper_src}" >"${epam_wrapper_dst}" \
+		|| die 'failed to install epam-wrapper'
+}
+
+# Check if we are missing a default certificate.
+ejabberd_cert_missing() {
+	if grep -qs "^\s\+- ${EJABBERD_CERT}" "${EROOT%/}${JABBER_ETC}/ejabberd.yml"; then
+		if [[ -f "${EROOT%/}${EJABBERD_CERT}" ]]; then
+			# default certificate is present in config and exists - not installing
+			return 1
+		else
+			# default certificate is present in config
+			# but doesn't exist - need to install one
+			return 0
+		fi
+	fi
+	# no default certificate in config - not installing
+	return 1
+}
+
+# Generate and install sample ejabberd certificate. It's installed into
+# EJABBERD_CERT path.
+ejabberd_cert_install() {
+	SSL_ORGANIZATION="${SSL_ORGANIZATION:-ejabberd XMPP Server}"
+	install_cert "${EJABBERD_CERT%.*}"
+	chown root:jabber "${EROOT%/}${EJABBERD_CERT}" || die
+	chmod 0440 "${EROOT%/}${EJABBERD_CERT}" || die
+}
+
+# Get path to ejabberd lib directory.
+#
+# This is the path ./configure script Base for this path is path set in
+# ./configure script which is /usr/lib by default. If libdir is explicitely set
+# to something else than this should be adjusted here as well.
+get_ejabberd_path() {
+	echo "/usr/$(get_libdir)/${P}"
+}
+
+# Make ejabberd.service for systemd from upstream provided template.
+make_ejabberd_service() {
+	sed -r \
+		-e 's!@ctlscriptpath@!/usr/sbin!g' \
+		-e 's!^(User|Group)=(.*)!\1=jabber!' \
+		-e 's!^(After)=(.*)!\1=epmd.service network.target!' \
+		-e '/^After=/ a Requires=epmd.service' \
+		"${PN}.service.template" >"${PN}.service" \
+		|| die 'failed to make ejabberd.service'
+}
+
+# Set paths to defined by net-im/jabber-base.
+set_jabberbase_paths() {
+	sed -e "/^ETCDIR[[:space:]]*=/{s:@sysconfdir@/ejabberd:${JABBER_ETC}:}" \
+		-e "/^LOGDIR[[:space:]]*=/{s:@localstatedir@/log/ejabberd:${JABBER_LOG}:}" \
+		-e "/^SPOOLDIR[[:space:]]*=/{s:@localstatedir@/lib/ejabberd:${JABBER_SPOOL}:}" \
+		-i "${S}/Makefile.in" \
+		|| die 'failed to set paths in Makefile.in'
+	sed -e "s|\(ETC_DIR:=\"\){{sysconfdir}}[^\"]*|\1${JABBER_ETC}|" \
+		-e "s|\(LOGS_DIR:=\"\){{localstatedir}}[^\"]*|\1${JABBER_LOG}|" \
+		-e "s|\(SPOOL_DIR:=\"\){{localstatedir}}[^\"]*|\1${JABBER_SPOOL}|" \
+		-i "${S}/ejabberdctl.template" \
+		|| die 'failed to set paths ejabberdctl.template'
+}
+
+# Skip installing docs because it's only COPYING that's installed by Makefile.
+skip_docs() {
+	gawk -i inplace '
+/# Documentation/, /^[[:space:]]*#?[[:space:]]*$/ {
+	if ($0 ~ /^[[:space:]]*#?[[:space:]]*$/) {
+		print $0;
+	} else {
+		next;
+	}
+}
+1
+' "${S}/Makefile.in" || die 'failed to remove docs section from Makefile.in'
+}
+
+src_prepare() {
+	default
+
+	rebar_remove_deps
+	correct_ejabberd_paths
+	set_jabberbase_paths
+	make_ejabberd_service
+	skip_docs
+	adjust_config
+	customize_epam_wrapper "${FILESDIR}/epam-wrapper"
+
+	rebar_fix_include_path fast_xml
+	rebar_fix_include_path p1_utils
+	rebar_fix_include_path xmpp
+
+	# Fix bug #591862. ERL_LIBS should point directly to ejabberd directory
+	# rather than its parent which is default. That way ejabberd directory
+	# takes precedence is module lookup.
+	local ejabberd_erl_libs="$(get_ejabberd_path):$(get_erl_libs)"
+	sed -e "s|\(ERL_LIBS=\){{libdir}}.*|\1${ejabberd_erl_libs}|" \
+		-i "${S}/ejabberdctl.template" \
+		|| die 'failed to set ERL_LIBS in ejabberdctl.template'
+
+	sed -e "s|\(AC_INIT(ejabberd, \)m4_esyscmd([^)]*)|\1[$PV]|" \
+		-i configure.ac || die "Failed to write correct version to configure"
+	# eautoreconf # required in case of download from github
+}
+
+src_configure() {
+	econf \
+		--docdir="${EPREFIX}/usr/share/doc/${PF}/html" \
+		--enable-user=jabber \
+		--disable-system-deps \
+		$(use_enable debug) \
+		$(use_enable full-xml) \
+		$(use_enable hipe) \
+		$(use_enable mssql) \
+		$(use_enable mysql) \
+		$(use_enable odbc) \
+		$(use_enable pam) \
+		$(use_enable postgres pgsql) \
+		$(use_enable redis) \
+		$(use_enable roster-gw roster-gateway-workaround) \
+		$(use_enable sqlite) \
+		$(use_enable sip) \
+		$(use_enable stun) \
+		$(use_enable zlib)
+
+	# more options to support
+	# --enable-elixir requires https://github.com/elixir-lang/elixir
+}
+
+src_compile() {
+	emake REBAR='rebar -v' src
+}
+
+src_install() {
+	default
+
+	keepdir /var/lib/lock/ejabberdctl
+	rm -rf "${ED%/}/var/log" || die
+	rm -rf "${ED%/}/var/spool" || die
+
+	if use pam; then
+		local epam_path="$(get_ejabberd_path)/priv/bin/epam"
+
+		pamd_mimic_system xmpp auth account || die "cannot create pam.d file"
+		into "$(get_ejabberd_path)/priv"
+		newbin epam-wrapper epam
+	fi
+
+	newconfd "${FILESDIR}/${PN}.confd" "${PN}"
+	newinitd "${FILESDIR}/${PN}.initd" "${PN}"
+	systemd_dounit "${PN}.service"
+	systemd_dotmpfilesd "${FILESDIR}/${PN}.tmpfiles.conf"
+
+	insinto /etc/logrotate.d
+	newins "${FILESDIR}/${PN}.logrotate" "${PN}"
+}
+
+pkg_preinst() {
+	if use pam; then
+		einfo "Adding jabber user to epam group to allow ejabberd to use PAM" \
+			"authentication"
+		# See
+		# <https://docs.ejabberd.im/admin/configuration/#pam-authentication>.
+		# epam binary is installed by dev-erlang/epam package, therefore SUID
+		# is set by that package. Instead of jabber group it uses epam group,
+		# therefore we need to add jabber user to epam group.
+		usermod -a -G epam jabber || die
+	fi
+}
+
+pkg_postinst() {
+	if [[ ! ${REPLACING_VERSIONS} ]]; then
+		echo
+		elog "For configuration instructions, please see"
+		elog "  https://docs.ejabberd.im/"
+		echo
+	fi
+	if [[ " ${REPLACING_VERSIONS} " =~ \ 17\. ]]; then
+		ewarn If you are updating from an older version like 17.x
+		ewarn you may need to add an access_rules section to your
+		ewarn ejabberd.yml config file.
+		ewarn Otherwise authentication will be broken and users
+		ewarn will not be able to log in.
+		echo
+	fi
+
+	if ejabberd_cert_missing; then
+		ejabberd_cert_install
+	fi
+}

diff --git a/net-im/ejabberd/files/ejabberd-19.08-0002-Dont-overwrite-service-file.patch b/net-im/ejabberd/files/ejabberd-19.08-0002-Dont-overwrite-service-file.patch
new file mode 100644
index 00000000000..2bea750ef04
--- /dev/null
+++ b/net-im/ejabberd/files/ejabberd-19.08-0002-Dont-overwrite-service-file.patch
@@ -0,0 +1,15 @@
+diff --git a/Makefile.in b/Makefile.in
+index a0b4553d..4675b88a 100644
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -204,8 +204,8 @@ install: all copy-files
+ 	chmod 755 ejabberd.init
+ 	#
+ 	# Service script
+-	$(SED) -e "s*@ctlscriptpath@*$(SBINDIR)*g" ejabberd.service.template \
+-		> ejabberd.service
++	[ -f ejabberd.service ] || $(SED) -e "s*@ctlscriptpath@*$(SBINDIR)*g" \
++		ejabberd.service.template > ejabberd.service
+ 	chmod 644 ejabberd.service
+ 	#
+ 	# Spool directory

diff --git a/net-im/ejabberd/files/ejabberd-19.08-ejabberdctl.patch b/net-im/ejabberd/files/ejabberd-19.08-ejabberdctl.patch
new file mode 100644
index 00000000000..0fb1f5ce602
--- /dev/null
+++ b/net-im/ejabberd/files/ejabberd-19.08-ejabberdctl.patch
@@ -0,0 +1,38 @@
+Subject: [PATCH] Adjust ejabberdctl for Gentoo jabberbase setup
+
+Set SHELL since the generic jabber user used on Gentoo for jabber
+servers doesn't have a valid shell set by default and fix EXEC_CMD
+otherwise it fails with This account is currently not available again
+due to jabber not having a valid shell.
+
+Also, workaround the assumption that jabber's /root is a directory when
+instead it defaults to /dev/null on Gentoo.
+---
+
+diff --git a/ejabberdctl.template b/ejabberdctl.template
+index 571b90b..71336c0 100755
+--- a/ejabberdctl.template
++++ b/ejabberdctl.template
+@@ -82,6 +82,7 @@ fi
+ ERL_LIBS={{libdir}}
+ ERL_CRASH_DUMP="$LOGS_DIR"/erl_crash_$(date "+%Y%m%d-%H%M%S").dump
+ ERL_INETRC="$ETC_DIR"/inetrc
++HOME=$SPOOL_DIR
+ 
+ # define ejabberd parameters
+ EJABBERD_OPTS="$EJABBERD_OPTS\
+@@ -105,12 +106,13 @@ export ERL_MAX_ETS_TABLES
+ export CONTRIB_MODULES_PATH
+ export CONTRIB_MODULES_CONF_DIR
+ export ERL_LIBS
++export HOME
+ 
+ # run command either directly or via su $INSTALLUSER
+ exec_cmd()
+ {
+     case $EXEC_CMD in
+-        as_install_user) su -s /bin/sh -c '"$0" "$@"' "$INSTALLUSER" -- "$@" ;;
++        as_install_user) su -p -s /bin/sh -c '"$0" "$@"' "$INSTALLUSER" -- "$@" ;;
+         as_current_user) "$@" ;;
+     esac
+ }

diff --git a/net-im/ejabberd/metadata.xml b/net-im/ejabberd/metadata.xml
index d9f1e24554e..ecd307a3a00 100644
--- a/net-im/ejabberd/metadata.xml
+++ b/net-im/ejabberd/metadata.xml
@@ -1,9 +1,8 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
 <pkgmetadata>
-	<maintainer type="person">
-		<email>hanno@gentoo.org</email>
-		<name>Hanno Böck</name>
+	<maintainer type="project">
+		<email>ejabberd@gentoo.org</email>
 	</maintainer>
 	<longdescription>
 		Free and Open Source distributed fault-tolerant Jabber server. It's
@@ -25,6 +24,8 @@
 			data store</flag>
 		<flag name="roster-gw">Turn on workaround for processing gateway subscriptions</flag>
 		<flag name="sqlite">Enable SQLite database support</flag>
+		<flag name="sip">Enable SIP support</flag>
+		<flag name="stun">Enable STUN/TURN support</flag>
 		<flag name="zlib">Enable Stream Compression (XEP-0138) using zlib</flag>
 		<!-- TODO Add later: flag name="tools">Build development tools</flag -->
 	</use>


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: net-im/ejabberd/files/, net-im/ejabberd/
@ 2020-04-30  9:44 Hanno Böck
  0 siblings, 0 replies; 12+ messages in thread
From: Hanno Böck @ 2020-04-30  9:44 UTC (permalink / raw
  To: gentoo-commits

commit:     fdfa70080cd3916f32561b479da795248eddf738
Author:     Hanno Böck <hanno <AT> gentoo <DOT> org>
AuthorDate: Thu Apr 30 09:44:25 2020 +0000
Commit:     Hanno Böck <hanno <AT> gentoo <DOT> org>
CommitDate: Thu Apr 30 09:44:25 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fdfa7008

net-im/ejabberd: Remove duplicate patch

Both patch files for old and new version were identical.

Signed-off-by: Hanno Böck <hanno <AT> gentoo.org>
Package-Manager: Portage-2.3.99, Repoman-2.3.22

 net-im/ejabberd/ejabberd-20.03.ebuild                     |  2 +-
 .../ejabberd-19.08-0002-Dont-overwrite-service-file.patch | 15 ---------------
 2 files changed, 1 insertion(+), 16 deletions(-)

diff --git a/net-im/ejabberd/ejabberd-20.03.ebuild b/net-im/ejabberd/ejabberd-20.03.ebuild
index aadecdb23d9..7ed076748bb 100644
--- a/net-im/ejabberd/ejabberd-20.03.ebuild
+++ b/net-im/ejabberd/ejabberd-20.03.ebuild
@@ -61,7 +61,7 @@ RDEPEND="${DEPEND}
 
 DOCS=( CHANGELOG.md README.md )
 PATCHES=( "${FILESDIR}/${PN}-19.08-ejabberdctl.patch"
-	"${FILESDIR}/${PN}-19.08-0002-Dont-overwrite-service-file.patch")
+	"${FILESDIR}/${PN}-17.04-0002-Dont-overwrite-service-file.patch")
 
 EJABBERD_CERT="${EPREFIX}/etc/ssl/ejabberd/server.pem"
 # Paths in net-im/jabber-base

diff --git a/net-im/ejabberd/files/ejabberd-19.08-0002-Dont-overwrite-service-file.patch b/net-im/ejabberd/files/ejabberd-19.08-0002-Dont-overwrite-service-file.patch
deleted file mode 100644
index 2bea750ef04..00000000000
--- a/net-im/ejabberd/files/ejabberd-19.08-0002-Dont-overwrite-service-file.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-diff --git a/Makefile.in b/Makefile.in
-index a0b4553d..4675b88a 100644
---- a/Makefile.in
-+++ b/Makefile.in
-@@ -204,8 +204,8 @@ install: all copy-files
- 	chmod 755 ejabberd.init
- 	#
- 	# Service script
--	$(SED) -e "s*@ctlscriptpath@*$(SBINDIR)*g" ejabberd.service.template \
--		> ejabberd.service
-+	[ -f ejabberd.service ] || $(SED) -e "s*@ctlscriptpath@*$(SBINDIR)*g" \
-+		ejabberd.service.template > ejabberd.service
- 	chmod 644 ejabberd.service
- 	#
- 	# Spool directory


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: net-im/ejabberd/files/, net-im/ejabberd/
@ 2021-12-10 13:06 Florian Schmaus
  0 siblings, 0 replies; 12+ messages in thread
From: Florian Schmaus @ 2021-12-10 13:06 UTC (permalink / raw
  To: gentoo-commits

commit:     78a9b46fa734d8a64b17c5230ba1f2a5f76f7e76
Author:     Florian Schmaus <flow <AT> gentoo <DOT> org>
AuthorDate: Fri Dec 10 09:18:16 2021 +0000
Commit:     Florian Schmaus <flow <AT> gentoo <DOT> org>
CommitDate: Fri Dec 10 13:05:49 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=78a9b46f

net-im/ejabberd: add 21.12

Closes: https://bugs.gentoo.org/810886
Closes: https://github.com/gentoo/gentoo/pull/23239
Signed-off-by: Florian Schmaus <flow <AT> gentoo.org>

 net-im/ejabberd/Manifest                           |   1 +
 net-im/ejabberd/ejabberd-21.12.ebuild              | 218 +++++++++++++++++++++
 ...djust-ejabberd.service.template-to-Gentoo.patch |  39 ++++
 3 files changed, 258 insertions(+)

diff --git a/net-im/ejabberd/Manifest b/net-im/ejabberd/Manifest
index a3cfc05ea25e..e50617f20488 100644
--- a/net-im/ejabberd/Manifest
+++ b/net-im/ejabberd/Manifest
@@ -1,2 +1,3 @@
 DIST ejabberd-20.04.tar.gz 2022319 BLAKE2B 02ce782bc58a808f38dff58715204059c51762187abff7f5c77ff08eb13330b66485234eb2204c4336770d75303417ee74077466a07e701aa512158ff641a578 SHA512 7c478bbd73577e06f21e26804f4eb57deb52a0ebdd12e45034e810314cb73bb2ec60b55c6f266271eb45d5ebc135a39c498a29706d6d1f5087fd2b509a8844ca
 DIST ejabberd-21.04.tar.gz 1560934 BLAKE2B 85e7a381b9fdb1274b8aff04ba98587d31aaba6e0c99b0bd5b8ad28f776a7e6dfd8c4425f57591962e69387d42e3416855fa94e914638352af1853f81e88315e SHA512 4f7f645dbca35187c412e75fe90bcb96b87fc71beb073e0b913155e78832499f57218b1c42e0adf139a24cf1e235b4d1d123214a472aabf093a65f5d136b9579
+DIST ejabberd-21.12.tar.gz 2532288 BLAKE2B 847fa90ce0140c384add489a97d566e3edf9927f71c4abf4f51869f2e0ba4a5183002cb5e4f7a9d7f4ad5ed5902a47b2dd336ab1ef854673a3a2f337326a3fc2 SHA512 4f1e56becb9970355b98c0ad177ee162130346e53aa92c274e502fe300d6f4dc7fda8fcca845821087da78379a19a2962b50794b71d139c91764539fcfeec73c

diff --git a/net-im/ejabberd/ejabberd-21.12.ebuild b/net-im/ejabberd/ejabberd-21.12.ebuild
new file mode 100644
index 000000000000..e4ed2bfaac5c
--- /dev/null
+++ b/net-im/ejabberd/ejabberd-21.12.ebuild
@@ -0,0 +1,218 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit pam rebar systemd
+
+DESCRIPTION="Robust, scalable and extensible XMPP server"
+HOMEPAGE="https://www.ejabberd.im/ https://github.com/processone/ejabberd/"
+SRC_URI="https://static.process-one.net/${PN}/downloads/${PV}/${P}.tgz
+	-> ${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~ia64 ~sparc ~x86"
+REQUIRED_USE="mssql? ( odbc )"
+# TODO: Add 'tools' flag.
+IUSE="captcha debug full-xml ldap mssql mysql odbc pam postgres redis
+	roster-gw selinux sip sqlite +stun zlib"
+
+RESTRICT="test"
+
+# TODO: Add dependencies for 'tools' flag enabled.
+# TODO: tools? (
+# TODO:		>=dev-erlang/luerl-0.3
+# TODO: )
+DEPEND=">=dev-lang/erlang-19.3[odbc?,ssl]
+	>=dev-erlang/cache_tab-1.0.29
+	>=dev-erlang/eimp-1.0.21
+	>=dev-erlang/fast_tls-1.1.13
+	>=dev-erlang/fast_xml-1.1.48
+	>=dev-erlang/fast_yaml-1.0.32
+	>=dev-erlang/yconf-1.0.12
+	>=dev-erlang/jiffy-1.0.5
+	>=dev-erlang/jose-1.11.1
+	>=dev-erlang/lager-3.9.1
+	>=dev-erlang/p1_oauth2-0.6.10
+	>=dev-erlang/p1_utils-1.0.23
+	>=dev-erlang/stringprep-1.0.27
+	>=dev-erlang/xmpp-1.5.6
+	>=dev-erlang/pkix-1.0.8
+	>=dev-erlang/mqtree-1.0.14
+	>=dev-erlang/idna-6.0.0-r1
+	>=dev-erlang/p1_acme-1.0.16
+	>=dev-erlang/base64url-1.0.1
+	ldap? ( =net-nds/openldap-2* )
+	mysql? ( >=dev-erlang/p1_mysql-1.0.19 )
+	odbc? ( dev-db/unixODBC )
+	pam? ( >=dev-erlang/epam-1.0.12 )
+	postgres? ( >=dev-erlang/p1_pgsql-1.1.16 )
+	redis? ( >=dev-erlang/eredis-1.2.0 )
+	sip? ( >=dev-erlang/esip-1.0.45 )
+	sqlite? ( >=dev-erlang/sqlite3-1.1.13 )
+	stun? ( >=dev-erlang/stun-1.0.47 )
+	zlib? ( >=dev-erlang/ezlib-1.0.10 )"
+RDEPEND="${DEPEND}
+	acct-user/ejabberd
+	captcha? ( media-gfx/imagemagick[truetype,png] )
+	selinux? ( sec-policy/selinux-jabber )
+"
+
+DOCS=( CHANGELOG.md README.md )
+PATCHES=(
+	"${FILESDIR}/${PN}-19.08-ejabberdctl.patch"
+	"${FILESDIR}/adjust-ejabberd.service.template-to-Gentoo.patch"
+)
+
+# Set paths to ejabberd lib directory consistently to point always to directory
+# suffixed with version.
+correct_ejabberd_paths() {
+	sed -e "/^EJABBERDDIR[[:space:]]*=/{s:ejabberd:${P}:}" \
+		-i "${S}/Makefile.in" \
+		|| die 'failed to set ejabberd path in Makefile.in'
+	sed -e "/EJABBERD_BIN_PATH=/{s:ejabberd:${P}:}" \
+		-i "${S}/ejabberdctl.template" \
+		|| die 'failed to set ejabberd path in ejabberdctl.template'
+}
+
+# Get epam-wrapper from 'files' directory and correct path to lib directory in
+# it. epam-wrapper is placed into work directory. It is assumed no epam-wrapper
+# file exists there already.
+customize_epam_wrapper() {
+	local epam_wrapper_src="${1}"
+	local epam_wrapper_dst="${S}/epam-wrapper"
+
+	[[ -e ${epam_wrapper_dst} ]] && die 'epam-wrapper already exists'
+	sed -r -e "s@^(ERL_LIBS=).*\$@\1${EPREFIX}$(get_erl_libs)@" \
+		"${epam_wrapper_src}" >"${epam_wrapper_dst}" \
+		|| die 'failed to install epam-wrapper'
+}
+
+# Get path to ejabberd lib directory.
+#
+# This is the path ./configure script Base for this path is path set in
+# ./configure script which is /usr/lib by default. If libdir is explicitely set
+# to something else than this should be adjusted here as well.
+get_ejabberd_path() {
+	echo "/usr/$(get_libdir)/${P}"
+}
+
+src_prepare() {
+	default
+
+	rebar_remove_deps
+	correct_ejabberd_paths
+	customize_epam_wrapper "${FILESDIR}/epam-wrapper"
+
+	rebar_fix_include_path fast_xml
+	rebar_fix_include_path p1_utils
+	rebar_fix_include_path xmpp
+
+	# Fix bug #591862. ERL_LIBS should point directly to ejabberd directory
+	# rather than its parent which is default. That way ejabberd directory
+	# takes precedence is module lookup.
+	local ejabberd_erl_libs="$(get_ejabberd_path):$(get_erl_libs)"
+	sed -e "s|\(ERL_LIBS=\){{libdir}}.*|\1${ejabberd_erl_libs}|" \
+		-i "${S}/ejabberdctl.template" \
+		|| die 'failed to set ERL_LIBS in ejabberdctl.template'
+}
+
+src_configure() {
+	econf \
+		--docdir="${EPREFIX}/usr/share/doc/${PF}/html" \
+		--localstatedir="${EPREFIX}/var" \
+		--enable-user=${PN} \
+		$(use_enable debug) \
+		$(use_enable full-xml) \
+		$(use_enable mssql) \
+		$(use_enable mysql) \
+		$(use_enable odbc) \
+		$(use_enable pam) \
+		$(use_enable postgres pgsql) \
+		$(use_enable redis) \
+		$(use_enable roster-gw roster-gateway-workaround) \
+		$(use_enable sqlite) \
+		$(use_enable sip) \
+		$(use_enable stun) \
+		$(use_enable zlib)
+
+	# more options to support
+	# --enable-elixir requires https://github.com/elixir-lang/elixir
+}
+
+src_compile() {
+	emake REBAR='rebar -v' src
+}
+
+src_install() {
+	default
+
+	if use pam; then
+		local epam_path="$(get_ejabberd_path)/priv/bin/epam"
+
+		pamd_mimic_system xmpp auth account
+		into "$(get_ejabberd_path)/priv"
+		newbin epam-wrapper epam
+	fi
+
+	newconfd "${FILESDIR}/${PN}.confd" "${PN}"
+	newinitd "${FILESDIR}/${PN}.initd" "${PN}"
+	systemd_dounit "${PN}.service"
+
+	insinto /etc/logrotate.d
+	newins "${FILESDIR}/${PN}.logrotate" "${PN}"
+
+	keepdir /var/{lib,log}/ejabberd
+}
+
+pkg_preinst() {
+	if use pam; then
+		einfo "Adding ejabberd user to epam group to allow ejabberd to use PAM" \
+			"authentication"
+		# See
+		# <https://docs.ejabberd.im/admin/configuration/#pam-authentication>.
+		# epam binary is installed by dev-erlang/epam package, therefore SUID
+		# is set by that package. Instead of jabber group it uses epam group,
+		# therefore we need to add jabber user to epam group.
+		usermod -a -G epam ejabberd || die
+	fi
+}
+
+pkg_postinst() {
+	local migrate_to_etc_ejabberd=false
+
+	if [[ ! ${REPLACING_VERSIONS} ]]; then
+		echo
+		elog "For configuration instructions, please see"
+		elog "  https://docs.ejabberd.im/"
+		echo
+	else
+		for v in ${REPLACING_VERSIONS}; do
+			if ver_test "${v}" -lt 21.04-r1; then
+				migrate_to_etc_ejabberd=true
+				break
+			fi
+		done
+	fi
+
+	# Sarting with >=21.04-r1, the ejabberd configuration is now in
+	# /etc/ejabberd and no longer in /etc/jabber. See if we need to
+	# migrate the configuration. Furthermore, ejabberd no longer runs
+	# under the, shared via net-im/jabber-base, 'jabber' use, but under
+	# its own user. This increase isolation and hence robustness and
+	# security.
+	if $migrate_to_etc_ejabberd; then
+		cp -r "${EROOT}"/etc/jabber/. "${EROOT}"/etc/ejabberd || die
+		if [[ -f "${EROOT}"/etc/ejabberd/.keep_net-im_jabber-base-0 ]]; then
+			rm "${EROOT}"/etc/ejabberd/.keep_net-im_jabber-base-0 || die
+		fi
+		if ! use prefix; then
+			chown --recursive ejabberd:ejabberd "${EROOT}"/etc/ejabberd || die
+		fi
+		elog "Newer versions of the ejabberd Gentoo package use /etc/ejabberd"
+		elog "(just as upstream) and *not* /etc/ejabber."
+		elog "The files from /etc/jabber where copied to /etc/ejabberd."
+		elog "Please check your configuration and delete the file in /etc/jabber."
+	fi
+}

diff --git a/net-im/ejabberd/files/adjust-ejabberd.service.template-to-Gentoo.patch b/net-im/ejabberd/files/adjust-ejabberd.service.template-to-Gentoo.patch
new file mode 100644
index 000000000000..9bf8e10f87a9
--- /dev/null
+++ b/net-im/ejabberd/files/adjust-ejabberd.service.template-to-Gentoo.patch
@@ -0,0 +1,39 @@
+From c0af543fc3b6047f66bfe820e7ce75abd3ed2049 Mon Sep 17 00:00:00 2001
+From: Florian Schmaus <flo@geekplace.eu>
+Date: Fri, 10 Dec 2021 12:36:45 +0100
+Subject: [PATCH] Adjust ejabberd.service.template to Gentoo
+
+---
+ Makefile.in               | 2 +-
+ ejabberd.service.template | 3 ++-
+ 2 files changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/Makefile.in b/Makefile.in
+index ab0e9d96702e..4d97570733aa 100644
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -300,7 +300,7 @@ install: copy-files
+ 	chmod 755 ejabberd.init
+ 	#
+ 	# Service script
+-	$(SED) -e "s*@ctlscriptpath@*$(SBINDIR)*g" \
++	$(SED) -e "s*@ctlscriptpath@*/usr/sbin*g" \
+ 		-e "s*@installuser@*$(INIT_USER)*g" ejabberd.service.template \
+ 		> ejabberd.service
+ 	chmod 644 ejabberd.service
+diff --git a/ejabberd.service.template b/ejabberd.service.template
+index 685a104d00ae..e384e920280b 100644
+--- a/ejabberd.service.template
++++ b/ejabberd.service.template
+@@ -1,6 +1,7 @@
+ [Unit]
+ Description=XMPP Server
+-After=network.target
++After=epmd.service network.target
++Requires=epmd.service
+ 
+ [Service]
+ Type=notify
+-- 
+2.33.1
+


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: net-im/ejabberd/files/, net-im/ejabberd/
@ 2022-05-18  7:13 Florian Schmaus
  0 siblings, 0 replies; 12+ messages in thread
From: Florian Schmaus @ 2022-05-18  7:13 UTC (permalink / raw
  To: gentoo-commits

commit:     bd1911fdc84b38dfd4136b8986b49940bc34c946
Author:     Florian Schmaus <flow <AT> gentoo <DOT> org>
AuthorDate: Wed May 18 07:03:41 2022 +0000
Commit:     Florian Schmaus <flow <AT> gentoo <DOT> org>
CommitDate: Wed May 18 07:05:59 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bd1911fd

net-im/ejabberd: bring back logrotate

Bug: https://bugs.gentoo.org/841976
Signed-off-by: Florian Schmaus <flow <AT> gentoo.org>

 .../{ejabberd-22.05.ebuild => ejabberd-22.05-r1.ebuild}     |  3 +++
 net-im/ejabberd/files/ejabberd-22.05.logrotate              | 13 +++++++++++++
 2 files changed, 16 insertions(+)

diff --git a/net-im/ejabberd/ejabberd-22.05.ebuild b/net-im/ejabberd/ejabberd-22.05-r1.ebuild
similarity index 98%
rename from net-im/ejabberd/ejabberd-22.05.ebuild
rename to net-im/ejabberd/ejabberd-22.05-r1.ebuild
index 029431d351cb..eae32ae4c02d 100644
--- a/net-im/ejabberd/ejabberd-22.05.ebuild
+++ b/net-im/ejabberd/ejabberd-22.05-r1.ebuild
@@ -168,6 +168,9 @@ src_install() {
 	newinitd "${FILESDIR}/${PN}-22.05.initd" "${PN}"
 	systemd_dounit "${PN}.service"
 
+	insinto /etc/logrotate.d
+	newins "${FILESDIR}/${PN}-22.05.logrotate" "${PN}"
+
 	keepdir /var/{lib,log}/ejabberd
 }
 

diff --git a/net-im/ejabberd/files/ejabberd-22.05.logrotate b/net-im/ejabberd/files/ejabberd-22.05.logrotate
new file mode 100644
index 000000000000..fd51673fc428
--- /dev/null
+++ b/net-im/ejabberd/files/ejabberd-22.05.logrotate
@@ -0,0 +1,13 @@
+/var/log/ejabberd/*.log {
+	su ejabberd ejabberd
+	weekly
+	rotate 4
+	missingok
+	nocreate
+	sharedscripts
+	notifempty
+	compress
+	postrotate
+		/usr/sbin/ejabberdctl reopen-log > /dev/null 2>&1 || true
+	endscript
+}


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: net-im/ejabberd/files/, net-im/ejabberd/
@ 2022-10-28 20:58 Florian Schmaus
  0 siblings, 0 replies; 12+ messages in thread
From: Florian Schmaus @ 2022-10-28 20:58 UTC (permalink / raw
  To: gentoo-commits

commit:     e0ed0500560d9f796c8a197e10ecfd6f2d993e5c
Author:     Florian Schmaus <flow <AT> gentoo <DOT> org>
AuthorDate: Fri Oct 28 19:10:54 2022 +0000
Commit:     Florian Schmaus <flow <AT> gentoo <DOT> org>
CommitDate: Fri Oct 28 20:57:39 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e0ed0500

net-im/ejabberd: add 22.10

Closes: https://github.com/gentoo/gentoo/pull/28011
Signed-off-by: Florian Schmaus <flow <AT> gentoo.org>

 net-im/ejabberd/Manifest                           |   1 +
 net-im/ejabberd/ejabberd-22.10.ebuild              | 219 +++++++++++++++++++++
 ...djust-ejabberd.service.template-to-Gentoo.patch |  16 ++
 3 files changed, 236 insertions(+)

diff --git a/net-im/ejabberd/Manifest b/net-im/ejabberd/Manifest
index df8cc1d38ab8..308fe35abac5 100644
--- a/net-im/ejabberd/Manifest
+++ b/net-im/ejabberd/Manifest
@@ -1,2 +1,3 @@
 DIST ejabberd-22.05.tar.gz 2527957 BLAKE2B d7fc614b8fe88bc8997d78821334a5e26a4201a5d199e6a04fe668e192ed0c7a37b68aff2fd9c6740844634c005b492b1dd76de4b9ed841863d0285f6097edd9 SHA512 33f98a9c45ff8257d240e7b90181e399ecab84e361f5619dc8d57252642e81d4958467cfa89b90681f3cf0d1d56a3079eb98d4e80cc6af5ca11938bb2a69f865
 DIST ejabberd-22.05.tar.gz.asc 195 BLAKE2B 634cb0a338c68d8ee1d3b2e3e267a758deff3a925c93273c5aaa209d12a5bb40565831869cc7e81fa66de8648211eb60f9644ac7d4d0ec557e9332a8cdd9dfce SHA512 42ffc224915f3f0ac4df42cfe0c35e65861be38856e398ac6172cdcbf5de543ae808a4b201a1c1d64d10234d02d754d1376ff21ee9d679095497479c717c17da
+DIST ejabberd-22.10.tar.gz 2553163 BLAKE2B 670721da1800b489103df49c24bb961cb048e02faffa57921c9740f2effadb8fd5b70841afaf9fc56160e4bb00d6d6d73014cdd3e2aaa683c351fd0d42d53bf3 SHA512 3010b0767017d63c1b1a8b062f881d98be6308f2ae065c58302288096058ed8030e37c73eaf037ee1e61d1040f4e61071b2d62e146c61109ee782b9e6b708942

diff --git a/net-im/ejabberd/ejabberd-22.10.ebuild b/net-im/ejabberd/ejabberd-22.10.ebuild
new file mode 100644
index 000000000000..d872abcb6285
--- /dev/null
+++ b/net-im/ejabberd/ejabberd-22.10.ebuild
@@ -0,0 +1,219 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit autotools pam rebar systemd
+
+DESCRIPTION="Robust, scalable and extensible XMPP server"
+HOMEPAGE="https://www.ejabberd.im/ https://github.com/processone/ejabberd/"
+SRC_URI="
+	https://github.com/processone/${PN}/archive/refs/tags/${PV}.tar.gz -> ${P}.tar.gz
+"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~ia64 ~sparc ~x86"
+REQUIRED_USE="mssql? ( odbc )"
+# TODO: Add 'tools' flag.
+IUSE="captcha debug full-xml ldap mssql mysql odbc pam postgres redis
+	roster-gw selinux sip sqlite +stun zlib"
+
+RESTRICT="test"
+
+# TODO: Add dependencies for 'tools' flag enabled.
+# TODO: tools? (
+# TODO:		>=dev-erlang/luerl-0.3
+# TODO: )
+DEPEND="
+	>=dev-lang/erlang-19.3[odbc?,ssl]
+	>=dev-erlang/cache_tab-1.0.30
+	>=dev-erlang/eimp-1.0.22
+	>=dev-erlang/fast_tls-1.1.16
+	>=dev-erlang/fast_xml-1.1.49
+	>=dev-erlang/fast_yaml-1.0.34
+	>=dev-erlang/yconf-1.0.14
+	>=dev-erlang/jiffy-1.0.5
+	>=dev-erlang/jose-1.11.2
+	>=dev-erlang/lager-3.9.1
+	>=dev-erlang/p1_oauth2-0.6.11
+	>=dev-erlang/p1_utils-1.0.25
+	>=dev-erlang/stringprep-1.0.29
+	>=dev-erlang/xmpp-1.6.0
+	>=dev-erlang/pkix-1.0.9
+	>=dev-erlang/mqtree-1.0.15
+	>=dev-erlang/idna-6.0.0-r1
+	>=dev-erlang/p1_acme-1.0.20
+	>=dev-erlang/base64url-1.0.1
+	ldap? ( =net-nds/openldap-2* )
+	mysql? ( >=dev-erlang/p1_mysql-1.0.20 )
+	odbc? ( dev-db/unixODBC )
+	pam? ( >=dev-erlang/epam-1.0.12 )
+	postgres? ( >=dev-erlang/p1_pgsql-1.1.19 )
+	redis? ( >=dev-erlang/eredis-1.2.0 )
+	sip? ( >=dev-erlang/esip-1.0.48 )
+	sqlite? ( >=dev-erlang/sqlite3-1.1.13 )
+	stun? ( >=dev-erlang/stun-1.2.6 )
+	zlib? ( >=dev-erlang/ezlib-1.0.12 )
+"
+RDEPEND="
+	${DEPEND}
+	>=acct-user/ejabberd-2[pam?]
+	captcha? ( media-gfx/imagemagick[truetype,png] )
+	selinux? ( sec-policy/selinux-jabber )
+"
+
+DOCS=( CHANGELOG.md README.md )
+PATCHES=(
+	"${FILESDIR}/ejabberd-22.10-adjust-ejabberd.service.template-to-Gentoo.patch"
+)
+
+# Get path to ejabberd lib directory.
+#
+# This is the path ./configure script Base for this path is path set in
+# ./configure script which is /usr/lib by default. If libdir is explicitely set
+# to something else than this should be adjusted here as well.
+get_ejabberd_path() {
+	echo "/usr/$(get_libdir)/${P}"
+}
+
+src_prepare() {
+	default
+
+	eautoreconf
+
+	rebar_remove_deps
+
+	# Set paths to ejabberd lib directory consistently to point always to directory
+	# suffixed with version.
+	sed -e "/^EJABBERDDIR[[:space:]]*=/{s:ejabberd:${P}:}" \
+		-i "${S}/Makefile.in" \
+		|| die 'failed to set ejabberd path in Makefile.in'
+	sed -e "/EJABBERD_BIN_PATH=/{s:ejabberd:${P}:}" \
+		-i "${S}/ejabberdctl.template" \
+		|| die 'failed to set ejabberd path in ejabberdctl.template'
+
+	# Get epam-wrapper from 'files' directory and correct path to lib directory in
+	# it. epam-wrapper is placed into work directory. It is assumed no epam-wrapper
+	# file exists there already.
+	local epam_wrapper_src="${FILESDIR}/epam-wrapper"
+	local epam_wrapper_dst="${S}/epam-wrapper"
+	[[ -e ${epam_wrapper_dst} ]] && die 'epam-wrapper already exists'
+	sed -r -e "s@^(ERL_LIBS=).*\$@\1${EPREFIX}$(get_erl_libs)@" \
+		"${epam_wrapper_src}" >"${epam_wrapper_dst}" \
+		|| die 'failed to install epam-wrapper'
+
+	rebar_fix_include_path fast_xml
+	rebar_fix_include_path p1_utils
+	rebar_fix_include_path xmpp
+
+	# Fix bug #591862. ERL_LIBS should point directly to ejabberd directory
+	# rather than its parent which is default. That way ejabberd directory
+	# takes precedence is module lookup.
+	local ejabberd_erl_libs="$(get_ejabberd_path):$(get_erl_libs)"
+	sed -e "s|\(ERL_LIBS=\)'{{libdir}}'\.*|\1${ejabberd_erl_libs}|" \
+		-i "${S}/ejabberdctl.template" \
+		|| die 'failed to set ERL_LIBS in ejabberdctl.template'
+}
+
+src_configure() {
+	econf \
+		--docdir="${EPREFIX}/usr/share/doc/${PF}/html" \
+		--localstatedir="${EPREFIX}/var" \
+		--enable-user=${PN} \
+		$(use_enable debug) \
+		$(use_enable full-xml) \
+		$(use_enable mssql) \
+		$(use_enable mysql) \
+		$(use_enable odbc) \
+		$(use_enable pam) \
+		$(use_enable postgres pgsql) \
+		$(use_enable redis) \
+		$(use_enable roster-gw roster-gateway-workaround) \
+		$(use_enable sqlite) \
+		$(use_enable sip) \
+		$(use_enable stun) \
+		$(use_enable zlib)
+
+	# more options to support
+	# --enable-elixir requires https://github.com/elixir-lang/elixir
+}
+
+src_compile() {
+	# Note that we also add ejabberdctl.example, which will be used by
+	# ejabberd's build system to create /usr/sbin/ejabberdctl, as
+	# target. Otherwise, ejabberdctl.example is due to be created by the
+	# 'install' target (as per upstream's Makefile.in). However when
+	# invoke the 'install' target (in src_install below), DESTDIR is
+	# set, which causes DESTDIR to scope into the ejabberdctl.example
+	# generation.
+	emake REBAR='rebar -v' src ejabberdctl.example ejabberd.service
+}
+
+src_install() {
+	default
+
+	if use pam; then
+		local epam_path="$(get_ejabberd_path)/priv/bin/epam"
+
+		pamd_mimic_system xmpp auth account
+		into "$(get_ejabberd_path)/priv"
+		newbin epam-wrapper epam
+	fi
+
+	newconfd "${FILESDIR}/${PN}.confd" "${PN}"
+	newinitd "${FILESDIR}/${PN}-22.05.initd" "${PN}"
+	systemd_dounit "${PN}.service"
+
+	insinto /etc/logrotate.d
+	newins "${FILESDIR}/${PN}-22.05.logrotate" "${PN}"
+
+	keepdir /var/{lib,log}/ejabberd
+}
+
+pkg_postinst() {
+	local migrate_to_ejabberd_user=false
+
+	if [[ ${REPLACING_VERSIONS} ]]; then
+		for v in ${REPLACING_VERSIONS}; do
+			if ver_test "${v}" -lt 21.04-r1; then
+				migrate_to_ejabberd_user=true
+				break
+			fi
+		done
+	fi
+
+	# Sarting with >=21.04-r1, the ejabberd configuration is now in
+	# /etc/ejabberd and no longer in /etc/jabber. See if we need to
+	# migrate the configuration. Furthermore, ejabberd no longer runs
+	# under the, shared via net-im/jabber-base, 'jabber' use, but under
+	# its own user. This increase isolation and hence robustness and
+	# security.
+	if $migrate_to_ejabberd_user; then
+		ewarn "Newer versions of the ejabberd Gentoo package use /etc/ejabberd"
+		ewarn "(just as upstream) and *not* /etc/jabber."
+		ewarn "The files from /etc/jabber will now be copied to /etc/ejabberd."
+		ewarn "Also ejabberd's spool directory became /var/lib/ejabberd (was /var/spool/jabber)."
+		ewarn "Please check your configuration, and finish the migration by stopping ejabberd"
+		ewarn "followed by rsync'ing /var/spool/jabber to /var/lib/ejabberd."
+
+		local -A dirs_to_migrate=(
+			[/etc/jabber]=/etc/ejabberd
+			[/var/spool/jabber]=/var/lib/ejabberd
+		)
+
+		for src_dir in "${!dirs_to_migrate[@]}"; do
+			local eroot_src_dir="${EROOT}${src_dir}"
+			local eroot_dst_dir="${EROOT}${dirs_to_migrate[${src_dir}]}"
+
+			cp -r "${eroot_src_dir}"/. "${eroot_dst_dir}" || die "Could not copy ${eroot_src_dir} to ${eroot_dst_dir}"
+
+			if [[ -f "${eroot_dst_dir}"/.keep_net-im_jabber-base-0 ]]; then
+				rm "${eroot_dst_dir}"/.keep_net-im_jabber-base-0 || die
+			fi
+			if ! use prefix; then
+				chown --recursive ejabberd:ejabberd "${eroot_dst_dir}" || die
+			fi
+		done
+	fi
+}

diff --git a/net-im/ejabberd/files/ejabberd-22.10-adjust-ejabberd.service.template-to-Gentoo.patch b/net-im/ejabberd/files/ejabberd-22.10-adjust-ejabberd.service.template-to-Gentoo.patch
new file mode 100644
index 000000000000..f607f48037ae
--- /dev/null
+++ b/net-im/ejabberd/files/ejabberd-22.10-adjust-ejabberd.service.template-to-Gentoo.patch
@@ -0,0 +1,16 @@
+From c0af543fc3b6047f66bfe820e7ce75abd3ed2049 Mon Sep 17 00:00:00 2001
+From: Florian Schmaus <flo@geekplace.eu>
+Date: Fri, 10 Dec 2021 12:36:45 +0100
+Subject: [PATCH] Adjust ejabberd.service.template to Gentoo
+
+--- a/ejabberd.service.template
++++ b/ejabberd.service.template
+@@ -1,6 +1,7 @@
+ [Unit]
+ Description=XMPP Server
+-After=network.target
++After=epmd.service network.target
++Requires=epmd.service
+ 
+ [Service]
+ Type=notify


^ permalink raw reply related	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2022-10-28 20:58 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-05-28 13:30 [gentoo-commits] repo/gentoo:master commit in: net-im/ejabberd/files/, net-im/ejabberd/ Amadeusz Piotr Żołnowski
  -- strict thread matches above, loose matches on Subject: below --
2022-10-28 20:58 Florian Schmaus
2022-05-18  7:13 Florian Schmaus
2021-12-10 13:06 Florian Schmaus
2020-04-30  9:44 Hanno Böck
2020-04-30  8:16 Hanno Böck
2019-02-24 10:53 Pacho Ramos
2017-05-28 13:30 Amadeusz Piotr Żołnowski
2017-05-27 20:55 Amadeusz Piotr Żołnowski
2017-04-01 19:46 Amadeusz Piotr Żołnowski
2016-08-21 10:49 Amadeusz Piotr Żołnowski
2016-02-15 21:49 Amadeusz Piotr Żołnowski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox