1 |
commit: 8be8ae98b60da239244a5378f12999b6ce4c353f |
2 |
Author: Amadeusz Żołnowski <aidecoe <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat May 27 19:48:33 2017 +0000 |
4 |
Commit: Amadeusz Piotr Żołnowski <aidecoe <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat May 27 20:55:01 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8be8ae98 |
7 |
|
8 |
net-im/ejabberd: Remove older versions |
9 |
|
10 |
Package-Manager: Portage-2.3.5, Repoman-2.3.2 |
11 |
|
12 |
net-im/ejabberd/Manifest | 2 - |
13 |
net-im/ejabberd/ejabberd-16.04-r1.ebuild | 299 --------------------- |
14 |
net-im/ejabberd/ejabberd-16.04.ebuild | 280 ------------------- |
15 |
net-im/ejabberd/ejabberd-16.08.ebuild | 298 -------------------- |
16 |
.../files/ejabberd-16.04-ejabberdctl.patch | 49 ---- |
17 |
.../files/ejabberd-16.08-ejabberdctl.patch | 62 ----- |
18 |
6 files changed, 990 deletions(-) |
19 |
|
20 |
diff --git a/net-im/ejabberd/Manifest b/net-im/ejabberd/Manifest |
21 |
index c0f2fe3a01a..fcc89f207ce 100644 |
22 |
--- a/net-im/ejabberd/Manifest |
23 |
+++ b/net-im/ejabberd/Manifest |
24 |
@@ -1,4 +1,2 @@ |
25 |
-DIST ejabberd-16.04.tar.gz 1715963 SHA256 3d964fe74e438253c64c8498eb7465d2440823614a23df8d33bdf40126d72cc3 SHA512 5975d5a164060cca59b6d92de2c432f063061e832b2e03cae351fe3c16b178259489dc0b82ea800f1c2388eeb7e3aa4340630ad3c10a22cc6d6f0b4eef8fa0f2 WHIRLPOOL d9018835aaa736040f63222c73b54ea65385532989390c007f4cb736b474da40d9fdceb6c377a251398fb6de87869a13dec0ac160fe9a0d081337efd35dc66b4 |
26 |
-DIST ejabberd-16.08.tar.gz 1739542 SHA256 b45598a6f2f1b398a19f23e3280b45eccc833d3339b1aeb6ec08ded7c19b1137 SHA512 661bf33e6d7f4c53d0c3679d1a9428fba11c22bad7d8bd535b49d7eeeff4de215a7a94f8300683e1dbaf2e68ea908f6e54cfe0ed2f1dc82326a46659e7c70f55 WHIRLPOOL 41f5ae825997818671d6db94ac62108a0b02f8eb6eed07ebaa04287ee2d7955dc4d15c3ce18cbf20240e4b2a14d48ccb8bf383b510851be12326131c4c829788 |
27 |
DIST ejabberd-16.09.tar.gz 1687485 SHA256 7b44ab3af3310ca73624c47b65cf30a651d5a1398413e8af51c610d788fb8f14 SHA512 506365eff83f9ab97c9a632c4b8b2428aacbfc570c34ca65a78903d95c64755489ff7327be3efa2172c9d05d7891f83986b1ff3928a7ce806c0ab2aa5dbb647f WHIRLPOOL 6c56ad58b4e247cedf29cf247fdadddf727270311a0ba21eef88f84ee6b997ad8be75448e3bfdaa67d978ea167e2feb21bc9ce0839741a62fb60fa045e45edf2 |
28 |
DIST ejabberd-17.01.tar.gz 1638418 SHA256 7efa8f25fe01bce876f9379ba7b4f49752a0fddc6a78e5ae82196fdc7f70c90b SHA512 d64125f81efbf841eded140d877c950439c11e65377e167994d25f85fa66437aad771d94548d063900bd3c472922e6bfa8f8bbe65413f18e7b641f0ed32db566 WHIRLPOOL 7b670b087cccc6b4fb804410730571175c253e094fab6fc8c9412eae4e14b844ad38596426b4334bd751a056f940dfd60c1c06d2560af5b36061eb54553886fb |
29 |
|
30 |
diff --git a/net-im/ejabberd/ejabberd-16.04-r1.ebuild b/net-im/ejabberd/ejabberd-16.04-r1.ebuild |
31 |
deleted file mode 100644 |
32 |
index 84354c2c2a2..00000000000 |
33 |
--- a/net-im/ejabberd/ejabberd-16.04-r1.ebuild |
34 |
+++ /dev/null |
35 |
@@ -1,299 +0,0 @@ |
36 |
-# Copyright 1999-2017 Gentoo Foundation |
37 |
-# Distributed under the terms of the GNU General Public License v2 |
38 |
- |
39 |
-EAPI=6 |
40 |
- |
41 |
-SSL_CERT_MANDATORY=1 |
42 |
- |
43 |
-inherit eutils pam rebar ssl-cert systemd |
44 |
- |
45 |
-DESCRIPTION="Robust, scalable and extensible XMPP server" |
46 |
-HOMEPAGE="http://www.ejabberd.im/ https://github.com/processone/ejabberd/" |
47 |
-SRC_URI="http://www.process-one.net/downloads/${PN}/${PV}/${P}.tgz |
48 |
- -> ${P}.tar.gz" |
49 |
- |
50 |
-LICENSE="GPL-2" |
51 |
-SLOT="0" |
52 |
-KEYWORDS="~amd64 ~arm ~ia64 ~ppc ~sparc ~x86" |
53 |
-REQUIRED_USE="mssql? ( odbc )" |
54 |
-# TODO: Add 'tools' flag. |
55 |
-IUSE="captcha debug full-xml hipe ldap mssql mysql nls odbc pam postgres redis |
56 |
- riak roster-gw sqlite zlib" |
57 |
- |
58 |
-RESTRICT="test" |
59 |
- |
60 |
-# TODO: Add dependencies for 'tools' flag enabled. |
61 |
-# TODO: tools? ( |
62 |
-# TODO: >=dev-erlang/meck-0.8.4 |
63 |
-# TODO: >=dev-erlang/moka-1.0.5b |
64 |
-# TODO: ) |
65 |
-CDEPEND=" |
66 |
- >=dev-erlang/cache_tab-1.0.2 |
67 |
- >=dev-erlang/esip-1.0.4 |
68 |
- >=dev-erlang/fast_tls-1.0.3 |
69 |
- >=dev-erlang/fast_xml-1.1.3 |
70 |
- >=dev-erlang/fast_yaml-1.0.3 |
71 |
- >=dev-erlang/jiffy-0.14.7 |
72 |
- >=dev-erlang/lager-3.0.2 |
73 |
- >=dev-erlang/luerl-0.2 |
74 |
- >=dev-erlang/p1_oauth2-0.6.1 |
75 |
- >=dev-erlang/p1_utils-1.0.4 |
76 |
- >=dev-erlang/p1_xmlrpc-1.15.1 |
77 |
- >=dev-erlang/stringprep-1.0.3 |
78 |
- >=dev-erlang/stun-1.0.3 |
79 |
- >=dev-lang/erlang-17.1[hipe?,odbc?,ssl] |
80 |
- <dev-lang/erlang-19 |
81 |
- >=net-im/jabber-base-0.01 |
82 |
- ldap? ( =net-nds/openldap-2* ) |
83 |
- mysql? ( >=dev-erlang/p1_mysql-1.0.1 ) |
84 |
- nls? ( >=dev-erlang/iconv-1.0.0 ) |
85 |
- odbc? ( dev-db/unixODBC ) |
86 |
- pam? ( >=dev-erlang/epam-1.0.0 |
87 |
- <dev-erlang/epam-1.0.1 ) |
88 |
- postgres? ( >=dev-erlang/p1_pgsql-1.1.0 ) |
89 |
- redis? ( >=dev-erlang/eredis-1.0.8 ) |
90 |
- riak? ( |
91 |
- >=dev-erlang/hamcrest-0.1.0_p20150103 |
92 |
- >=dev-erlang/riakc-2.1.1_p20151111 |
93 |
- ) |
94 |
- sqlite? ( >=dev-erlang/sqlite3-1.1.5 ) |
95 |
- zlib? ( >=dev-erlang/ezlib-1.0.1 )" |
96 |
-DEPEND="${CDEPEND} |
97 |
- >=sys-apps/gawk-4.1" |
98 |
-RDEPEND="${CDEPEND} |
99 |
- captcha? ( media-gfx/imagemagick[truetype,png] )" |
100 |
- |
101 |
-DOCS=( README ) |
102 |
-PATCHES=( "${FILESDIR}/${P}-ejabberdctl.patch" ) |
103 |
- |
104 |
-EJABBERD_CERT="${EPREFIX}/etc/ssl/ejabberd/server.pem" |
105 |
-# Paths in net-im/jabber-base |
106 |
-JABBER_ETC="${EPREFIX}/etc/jabber" |
107 |
-JABBER_LOG="${EPREFIX}/var/log/jabber" |
108 |
-JABBER_SPOOL="${EPREFIX}/var/spool/jabber" |
109 |
- |
110 |
-# Adjust example configuration file to Gentoo. |
111 |
-# - Use our sample certificates. |
112 |
-# - Correct PAM service name. |
113 |
-adjust_config() { |
114 |
- sed -e "s|\"/path/to/ssl.pem\"|\"${EJABBERD_CERT}\"|g" \ |
115 |
- -e "s|\"pamservicename\"|\"xmpp\"|" \ |
116 |
- -i "${S}/ejabberd.yml.example" \ |
117 |
- || die 'failed to adjust example config' |
118 |
-} |
119 |
- |
120 |
-# Set paths to ejabberd lib directory consistently to point always to directory |
121 |
-# suffixed with version. |
122 |
-correct_ejabberd_paths() { |
123 |
- sed -e "/^EJABBERDDIR[[:space:]]*=/{s:ejabberd:${P}:}" \ |
124 |
- -i "${S}/Makefile.in" \ |
125 |
- || die 'failed to set ejabberd path in Makefile.in' |
126 |
- sed -e "/EJABBERD_BIN_PATH=/{s:ejabberd:${P}:}" \ |
127 |
- -i "${S}/ejabberdctl.template" \ |
128 |
- || die 'failed to set ejabberd path in ejabberdctl.template' |
129 |
- sed -e 's|\(captcha_cmd:[[:space:]]*"\).\+"|\1'$(get_ejabberd_path)'/priv/bin/captcha.sh"|' \ |
130 |
- -i "${S}/ejabberd.yml.example" \ |
131 |
- || die 'failed to correct path to captcha.sh in example config' |
132 |
-} |
133 |
- |
134 |
-# Get epam-wrapper from 'files' directory and correct path to lib directory in |
135 |
-# it. epam-wrapper is placed into work directory. It is assumed no epam-wrapper |
136 |
-# file exists there already. |
137 |
-customize_epam_wrapper() { |
138 |
- local epam_wrapper_src="$1" |
139 |
- local epam_wrapper_dst="${S}/epam-wrapper" |
140 |
- |
141 |
- [[ -e ${epam_wrapper_dst} ]] && die 'epam-wrapper already exists' |
142 |
- sed -r -e "s@^(ERL_LIBS=).*\$@\1${EPREFIX}$(get_erl_libs)@" \ |
143 |
- "${epam_wrapper_src}" >"${epam_wrapper_dst}" \ |
144 |
- || die 'failed to install epam-wrapper' |
145 |
-} |
146 |
- |
147 |
-# Check if there already exists a certificate. |
148 |
-ejabberd_cert_exists() { |
149 |
- local cert |
150 |
- |
151 |
- for cert in $(gawk -- \ |
152 |
- 'match($0, /^[[:space:]]*certfile: "([^"]+)"/, m) {print m[1];}' \ |
153 |
- "${EROOT%/}${JABBER_ETC}/ejabberd.yml"); do |
154 |
- [[ -f ${cert} ]] && return 0 |
155 |
- done |
156 |
- |
157 |
- return 1 |
158 |
-} |
159 |
- |
160 |
-# Generate and install sample ejabberd certificate. It's installed into |
161 |
-# EJABBERD_CERT path. |
162 |
-ejabberd_cert_install() { |
163 |
- SSL_ORGANIZATION="${SSL_ORGANIZATION:-ejabberd XMPP Server}" |
164 |
- install_cert "${EJABBERD_CERT%.*}" |
165 |
- chown root:jabber "${EROOT%/}${EJABBERD_CERT}" || die |
166 |
- chmod 0440 "${EROOT%/}${EJABBERD_CERT}" || die |
167 |
-} |
168 |
- |
169 |
-# Get path to ejabberd lib directory. |
170 |
-# |
171 |
-# This is the path ./configure script Base for this path is path set in |
172 |
-# ./configure script which is /usr/lib by default. If libdir is explicitely set |
173 |
-# to something else than this should be adjusted here as well. |
174 |
-get_ejabberd_path() { |
175 |
- echo "/usr/$(get_libdir)/${P}" |
176 |
-} |
177 |
- |
178 |
-# Make ejabberd.service for systemd from upstream provided template. |
179 |
-make_ejabberd_service() { |
180 |
- sed -r \ |
181 |
- -e 's!@ctlscriptpath@!/usr/sbin!' \ |
182 |
- -e 's!(User|Group)=(.*)!\1=jabber!' \ |
183 |
- "${PN}.service.template" >"${PN}.service" \ |
184 |
- || die 'failed to make ejabberd.service' |
185 |
-} |
186 |
- |
187 |
-# Set paths to defined by net-im/jabber-base. |
188 |
-set_jabberbase_paths() { |
189 |
- sed -e "/^ETCDIR[[:space:]]*=/{s:@sysconfdir@/ejabberd:${JABBER_ETC}:}" \ |
190 |
- -e "/^LOGDIR[[:space:]]*=/{s:@localstatedir@/log/ejabberd:${JABBER_LOG}:}" \ |
191 |
- -e "/^SPOOLDIR[[:space:]]*=/{s:@localstatedir@/lib/ejabberd:${JABBER_SPOOL}:}" \ |
192 |
- -i "${S}/Makefile.in" \ |
193 |
- || die 'failed to set paths in Makefile.in' |
194 |
- sed -e "s|\(ETC_DIR=\){{sysconfdir}}.*|\1${JABBER_ETC}|" \ |
195 |
- -e "s|\(LOGS_DIR=\){{localstatedir}}.*|\1${JABBER_LOG}|" \ |
196 |
- -e "s|\(SPOOL_DIR=\){{localstatedir}}.*|\1${JABBER_SPOOL}|" \ |
197 |
- -i "${S}/ejabberdctl.template" \ |
198 |
- || die 'failed to set paths ejabberdctl.template' |
199 |
-} |
200 |
- |
201 |
-# Skip installing docs because it's only COPYING that's installed by Makefile. |
202 |
-skip_docs() { |
203 |
- gawk -i inplace ' |
204 |
-/# Documentation/, /^[[:space:]]*#?[[:space:]]*$/ { |
205 |
- if ($0 ~ /^[[:space:]]*#?[[:space:]]*$/) { |
206 |
- print $0; |
207 |
- } else { |
208 |
- next; |
209 |
- } |
210 |
-} |
211 |
-1 |
212 |
-' "${S}/Makefile.in" || die 'failed to remove docs section from Makefile.in' |
213 |
-} |
214 |
- |
215 |
-src_prepare() { |
216 |
- default |
217 |
- |
218 |
- rebar_remove_deps |
219 |
- correct_ejabberd_paths |
220 |
- set_jabberbase_paths |
221 |
- make_ejabberd_service |
222 |
- skip_docs |
223 |
- adjust_config |
224 |
- customize_epam_wrapper "${FILESDIR}/epam-wrapper" |
225 |
- |
226 |
- # Fix bug #591862. ERL_LIBS should point directly to ejabberd directory |
227 |
- # rather than its parent which is default. That way ejabberd directory |
228 |
- # takes precedence is module lookup. |
229 |
- local ejabberd_erl_libs="$(get_ejabberd_path):$(get_erl_libs)" |
230 |
- sed -e "s|\(ERL_LIBS=\){{libdir}}.*|\1${ejabberd_erl_libs}|" \ |
231 |
- -i "${S}/ejabberdctl.template" \ |
232 |
- || die 'failed to set ERL_LIBS in ejabberdctl.template' |
233 |
-} |
234 |
- |
235 |
-src_configure() { |
236 |
- econf \ |
237 |
- --docdir="${EPREFIX}/usr/share/doc/${PF}/html" \ |
238 |
- --enable-user=jabber \ |
239 |
- $(use_enable debug) \ |
240 |
- $(use_enable full-xml) \ |
241 |
- $(use_enable hipe) \ |
242 |
- $(use_enable mssql) \ |
243 |
- $(use_enable mysql) \ |
244 |
- $(use_enable nls iconv) \ |
245 |
- $(use_enable odbc) \ |
246 |
- $(use_enable pam) \ |
247 |
- $(use_enable postgres pgsql) \ |
248 |
- $(use_enable redis) \ |
249 |
- $(use_enable riak) \ |
250 |
- $(use_enable roster-gw roster-gateway-workaround) \ |
251 |
- $(use_enable sqlite) \ |
252 |
- $(use_enable zlib) |
253 |
-} |
254 |
- |
255 |
-src_compile() { |
256 |
- emake REBAR='rebar -v' src |
257 |
-} |
258 |
- |
259 |
-src_install() { |
260 |
- default |
261 |
- |
262 |
- if use pam; then |
263 |
- local epam_path="$(get_ejabberd_path)/priv/bin/epam" |
264 |
- |
265 |
- pamd_mimic_system xmpp auth account || die "cannot create pam.d file" |
266 |
- into "$(get_ejabberd_path)/priv" |
267 |
- newbin epam-wrapper epam |
268 |
- # PAM helper module permissions |
269 |
- # https://www.process-one.net/docs/ejabberd/guide_en.html#pam |
270 |
- fowners root:jabber "${epam_path}" |
271 |
- fperms 4750 "${epam_path}" |
272 |
- fi |
273 |
- |
274 |
- newconfd "${FILESDIR}/${PN}.confd" "${PN}" |
275 |
- newinitd "${FILESDIR}/${PN}.initd" "${PN}" |
276 |
- systemd_dounit "${PN}.service" |
277 |
- systemd_dotmpfilesd "${FILESDIR}/${PN}.tmpfiles.conf" |
278 |
- |
279 |
- insinto /etc/logrotate.d |
280 |
- newins "${FILESDIR}/${PN}.logrotate" "${PN}" |
281 |
-} |
282 |
- |
283 |
-pkg_postinst() { |
284 |
- if [[ ! ${REPLACING_VERSIONS} ]]; then |
285 |
- echo |
286 |
- elog "For configuration instructions, please see" |
287 |
- elog " http://www.process-one.net/en/ejabberd/docs/" |
288 |
- echo |
289 |
- if [[ " ${REPLACING_VERSIONS} " =~ \ 2\. ]]; then |
290 |
- ewarn "If you have used pubsub in ejabberd-2.* you may encounter issues after" |
291 |
- ewarn "migration to ${PV}. pubsub data may not be migrated automatically and" |
292 |
- ewarn "you may need to run migration script manually, see:" |
293 |
- ewarn |
294 |
- ewarn " https://github.com/processone/ejabberd/issues/479#issuecomment-124497456" |
295 |
- ewarn |
296 |
- ewarn "In case you don't care about all stored moods, activities, geoinfo and you" |
297 |
- ewarn "know you don't store in pubsub anything important, you can just remove" |
298 |
- ewarn "pubsub tables:" |
299 |
- ewarn |
300 |
- ewarn " rm ${EROOT%/}${JABBER_SPOOL}/pubsub_*" |
301 |
- ewarn |
302 |
- ewarn "See also: https://bugs.gentoo.org/show_bug.cgi?id=588244" |
303 |
- echo |
304 |
- fi |
305 |
- elif [[ -f ${EROOT}etc/jabber/ejabberd.cfg ]]; then |
306 |
- elog "Ejabberd now defaults to using a YAML format for its config file." |
307 |
- elog "The old ejabberd.cfg file can be converted using the following instructions:" |
308 |
- echo |
309 |
- elog "1. Make sure all processes related to the previous version of ejabberd aren't" |
310 |
- elog " running. Usually this just means the ejabberd and epmd daemons and possibly" |
311 |
- elog " the pam-related process (epam) if pam support is enabled." |
312 |
- elog "2. Run \`ejabberdctl start\` with sufficient permissions. Note that this can" |
313 |
- elog " fail to start ejabberd properly for various reasons. Check ejabberd's main" |
314 |
- elog " log file at /var/log/jabber/ejabberd.log to confirm it started successfully." |
315 |
- elog "3. Run" |
316 |
- elog " \`ejabberdctl convert_to_yaml /etc/jabber/ejabberd.cfg /etc/jabber/ejabberd.yml.new\`" |
317 |
- elog " with sufficient permissions, edit and rename /etc/jabber/ejabberd.yml.new to" |
318 |
- elog " /etc/jabber/ejabberd.yml, and finally restart ejabberd with the new config" |
319 |
- elog " file." |
320 |
- echo |
321 |
- fi |
322 |
- |
323 |
- if ! ejabberd_cert_exists; then |
324 |
- ejabberd_cert_install |
325 |
- fi |
326 |
- |
327 |
- if use pam; then |
328 |
- # sfperms drops read bit from files with suid. Reapply it. |
329 |
- # Fix bug #592218. |
330 |
- local epam_path="$(get_ejabberd_path)/priv/bin/epam" |
331 |
- chmod g+r "${EROOT%/}${epam_path}" \ |
332 |
- || die "failed to correct ${epam_path} permissions" |
333 |
- fi |
334 |
-} |
335 |
|
336 |
diff --git a/net-im/ejabberd/ejabberd-16.04.ebuild b/net-im/ejabberd/ejabberd-16.04.ebuild |
337 |
deleted file mode 100644 |
338 |
index 50a0dab8e14..00000000000 |
339 |
--- a/net-im/ejabberd/ejabberd-16.04.ebuild |
340 |
+++ /dev/null |
341 |
@@ -1,280 +0,0 @@ |
342 |
-# Copyright 1999-2017 Gentoo Foundation |
343 |
-# Distributed under the terms of the GNU General Public License v2 |
344 |
- |
345 |
-EAPI=6 |
346 |
- |
347 |
-SSL_CERT_MANDATORY=1 |
348 |
- |
349 |
-inherit eutils pam rebar ssl-cert systemd |
350 |
- |
351 |
-DESCRIPTION="Robust, scalable and extensible XMPP server" |
352 |
-HOMEPAGE="http://www.ejabberd.im/ https://github.com/processone/ejabberd/" |
353 |
-SRC_URI="http://www.process-one.net/downloads/${PN}/${PV}/${P}.tgz |
354 |
- -> ${P}.tar.gz" |
355 |
- |
356 |
-LICENSE="GPL-2" |
357 |
-SLOT="0" |
358 |
-KEYWORDS="amd64 ~arm ~ia64 ppc ~sparc x86" |
359 |
-REQUIRED_USE="mssql? ( odbc )" |
360 |
-# TODO: Add 'tools' flag. |
361 |
-IUSE="captcha debug full-xml hipe ldap mssql mysql nls odbc pam postgres redis |
362 |
- riak roster-gw sqlite zlib" |
363 |
- |
364 |
-RESTRICT="test" |
365 |
- |
366 |
-# TODO: Add dependencies for 'tools' flag enabled. |
367 |
-# TODO: tools? ( |
368 |
-# TODO: >=dev-erlang/meck-0.8.4 |
369 |
-# TODO: >=dev-erlang/moka-1.0.5b |
370 |
-# TODO: ) |
371 |
-CDEPEND=" |
372 |
- >=dev-erlang/cache_tab-1.0.2 |
373 |
- >=dev-erlang/esip-1.0.4 |
374 |
- >=dev-erlang/fast_tls-1.0.3 |
375 |
- >=dev-erlang/fast_xml-1.1.3 |
376 |
- >=dev-erlang/fast_yaml-1.0.3 |
377 |
- >=dev-erlang/jiffy-0.14.7 |
378 |
- >=dev-erlang/lager-3.0.2 |
379 |
- >=dev-erlang/luerl-0.2 |
380 |
- >=dev-erlang/p1_oauth2-0.6.1 |
381 |
- >=dev-erlang/p1_utils-1.0.4 |
382 |
- >=dev-erlang/p1_xmlrpc-1.15.1 |
383 |
- >=dev-erlang/stringprep-1.0.3 |
384 |
- >=dev-erlang/stun-1.0.3 |
385 |
- >=dev-lang/erlang-17.1[hipe?,odbc?,ssl] |
386 |
- <dev-lang/erlang-19 |
387 |
- >=net-im/jabber-base-0.01 |
388 |
- ldap? ( =net-nds/openldap-2* ) |
389 |
- mysql? ( >=dev-erlang/p1_mysql-1.0.1 ) |
390 |
- nls? ( >=dev-erlang/iconv-1.0.0 ) |
391 |
- odbc? ( dev-db/unixODBC ) |
392 |
- pam? ( >=dev-erlang/epam-1.0.0 |
393 |
- <dev-erlang/epam-1.0.1 ) |
394 |
- postgres? ( >=dev-erlang/p1_pgsql-1.1.0 ) |
395 |
- redis? ( >=dev-erlang/eredis-1.0.8 ) |
396 |
- riak? ( |
397 |
- >=dev-erlang/hamcrest-0.1.0_p20150103 |
398 |
- >=dev-erlang/riakc-2.1.1_p20151111 |
399 |
- ) |
400 |
- sqlite? ( >=dev-erlang/sqlite3-1.1.5 ) |
401 |
- zlib? ( >=dev-erlang/ezlib-1.0.1 )" |
402 |
-DEPEND="${CDEPEND} |
403 |
- >=sys-apps/gawk-4.1" |
404 |
-RDEPEND="${CDEPEND} |
405 |
- captcha? ( media-gfx/imagemagick[truetype,png] )" |
406 |
- |
407 |
-DOCS=( README ) |
408 |
-PATCHES=( "${FILESDIR}/${P}-ejabberdctl.patch" ) |
409 |
- |
410 |
-EJABBERD_CERT="${EPREFIX}/etc/ssl/ejabberd/server.pem" |
411 |
-# Paths in net-im/jabber-base |
412 |
-JABBER_ETC="${EPREFIX}/etc/jabber" |
413 |
-JABBER_LOG="${EPREFIX}/var/log/jabber" |
414 |
-JABBER_SPOOL="${EPREFIX}/var/spool/jabber" |
415 |
- |
416 |
-# Adjust example configuration file to Gentoo. |
417 |
-# - Use our sample certificates. |
418 |
-# - Correct PAM service name. |
419 |
-adjust_config() { |
420 |
- sed -e "s|\"/path/to/ssl.pem\"|\"${EJABBERD_CERT}\"|g" \ |
421 |
- -e "s|\"pamservicename\"|\"xmpp\"|" \ |
422 |
- -i "${S}/ejabberd.yml.example" \ |
423 |
- || die 'failed to adjust example config' |
424 |
-} |
425 |
- |
426 |
-# Set paths to ejabberd lib directory consistently to point always to directory |
427 |
-# suffixed with version. |
428 |
-correct_ejabberd_paths() { |
429 |
- sed -e "/^EJABBERDDIR[[:space:]]*=/{s:ejabberd:${P}:}" \ |
430 |
- -i "${S}/Makefile.in" \ |
431 |
- || die 'failed to set ejabberd path in Makefile.in' |
432 |
- sed -e "/EJABBERD_BIN_PATH=/{s:ejabberd:${P}:}" \ |
433 |
- -i "${S}/ejabberdctl.template" \ |
434 |
- || die 'failed to set ejabberd path in ejabberdctl.template' |
435 |
- sed -e 's|\(captcha_cmd:[[:space:]]*"\).\+"|\1'$(get_ejabberd_path)'/priv/bin/captcha.sh"|' \ |
436 |
- -i "${S}/ejabberd.yml.example" \ |
437 |
- || die 'failed to correct path to captcha.sh in example config' |
438 |
-} |
439 |
- |
440 |
-# Get epam-wrapper from 'files' directory and correct path to lib directory in |
441 |
-# it. epam-wrapper is placed into work directory. It is assumed no epam-wrapper |
442 |
-# file exists there already. |
443 |
-customize_epam_wrapper() { |
444 |
- local epam_wrapper_src="$1" |
445 |
- local epam_wrapper_dst="${S}/epam-wrapper" |
446 |
- |
447 |
- [[ -e ${epam_wrapper_dst} ]] && die 'epam-wrapper already exists' |
448 |
- sed -r -e "s@^(ERL_LIBS=).*\$@\1${EPREFIX}$(get_erl_libs)@" \ |
449 |
- "${epam_wrapper_src}" >"${epam_wrapper_dst}" \ |
450 |
- || die 'failed to install epam-wrapper' |
451 |
-} |
452 |
- |
453 |
-# Check if there already exists a certificate. |
454 |
-ejabberd_cert_exists() { |
455 |
- local cert |
456 |
- |
457 |
- for cert in $(gawk -- \ |
458 |
- 'match($0, /^[[:space:]]*certfile: "([^"]+)"/, m) {print m[1];}' \ |
459 |
- "${EROOT%/}${JABBER_ETC}/ejabberd.yml"); do |
460 |
- [[ -f ${cert} ]] && return 0 |
461 |
- done |
462 |
- |
463 |
- return 1 |
464 |
-} |
465 |
- |
466 |
-# Generate and install sample ejabberd certificate. It's installed into |
467 |
-# EJABBERD_CERT path. |
468 |
-ejabberd_cert_install() { |
469 |
- SSL_ORGANIZATION="${SSL_ORGANIZATION:-ejabberd XMPP Server}" |
470 |
- install_cert "${EJABBERD_CERT%.*}" |
471 |
- chown root:jabber "${EROOT%/}${EJABBERD_CERT}" || die |
472 |
- chmod 0440 "${EROOT%/}${EJABBERD_CERT}" || die |
473 |
-} |
474 |
- |
475 |
-# Get path to ejabberd lib directory. |
476 |
-get_ejabberd_path() { |
477 |
- echo "$(get_erl_libs)/${P}" |
478 |
-} |
479 |
- |
480 |
-# Make ejabberd.service for systemd from upstream provided template. |
481 |
-make_ejabberd_service() { |
482 |
- sed -r \ |
483 |
- -e 's!@ctlscriptpath@!/usr/sbin!' \ |
484 |
- -e 's!(User|Group)=(.*)!\1=jabber!' \ |
485 |
- "${PN}.service.template" >"${PN}.service" \ |
486 |
- || die 'failed to make ejabberd.service' |
487 |
-} |
488 |
- |
489 |
-# Set paths to defined by net-im/jabber-base. |
490 |
-set_jabberbase_paths() { |
491 |
- sed -e "/^ETCDIR[[:space:]]*=/{s:@sysconfdir@/ejabberd:${JABBER_ETC}:}" \ |
492 |
- -e "/^LOGDIR[[:space:]]*=/{s:@localstatedir@/log/ejabberd:${JABBER_LOG}:}" \ |
493 |
- -e "/^SPOOLDIR[[:space:]]*=/{s:@localstatedir@/lib/ejabberd:${JABBER_SPOOL}:}" \ |
494 |
- -i "${S}/Makefile.in" \ |
495 |
- || die 'failed to set paths in Makefile.in' |
496 |
- sed -e "s|\(ETC_DIR=\){{sysconfdir}}.*|\1${JABBER_ETC}|" \ |
497 |
- -e "s|\(LOGS_DIR=\){{localstatedir}}.*|\1${JABBER_LOG}|" \ |
498 |
- -e "s|\(SPOOL_DIR=\){{localstatedir}}.*|\1${JABBER_SPOOL}|" \ |
499 |
- -i "${S}/ejabberdctl.template" \ |
500 |
- || die 'failed to set paths ejabberdctl.template' |
501 |
-} |
502 |
- |
503 |
-# Skip installing docs because it's only COPYING that's installed by Makefile. |
504 |
-skip_docs() { |
505 |
- gawk -i inplace ' |
506 |
-/# Documentation/, /^[[:space:]]*#?[[:space:]]*$/ { |
507 |
- if ($0 ~ /^[[:space:]]*#?[[:space:]]*$/) { |
508 |
- print $0; |
509 |
- } else { |
510 |
- next; |
511 |
- } |
512 |
-} |
513 |
-1 |
514 |
-' "${S}/Makefile.in" || die 'failed to remove docs section from Makefile.in' |
515 |
-} |
516 |
- |
517 |
-src_prepare() { |
518 |
- default |
519 |
- |
520 |
- rebar_remove_deps |
521 |
- correct_ejabberd_paths |
522 |
- set_jabberbase_paths |
523 |
- make_ejabberd_service |
524 |
- skip_docs |
525 |
- adjust_config |
526 |
- customize_epam_wrapper "${FILESDIR}/epam-wrapper" |
527 |
-} |
528 |
- |
529 |
-src_configure() { |
530 |
- econf \ |
531 |
- --docdir="${EPREFIX}/usr/share/doc/${PF}/html" \ |
532 |
- --libdir="${EPREFIX}$(get_erl_libs)" \ |
533 |
- --enable-user=jabber \ |
534 |
- $(use_enable debug) \ |
535 |
- $(use_enable full-xml) \ |
536 |
- $(use_enable hipe) \ |
537 |
- $(use_enable mssql) \ |
538 |
- $(use_enable mysql) \ |
539 |
- $(use_enable nls iconv) \ |
540 |
- $(use_enable odbc) \ |
541 |
- $(use_enable pam) \ |
542 |
- $(use_enable postgres pgsql) \ |
543 |
- $(use_enable redis) \ |
544 |
- $(use_enable riak) \ |
545 |
- $(use_enable roster-gw roster-gateway-workaround) \ |
546 |
- $(use_enable sqlite) \ |
547 |
- $(use_enable zlib) |
548 |
-} |
549 |
- |
550 |
-src_compile() { |
551 |
- emake REBAR='rebar -v' src |
552 |
-} |
553 |
- |
554 |
-src_install() { |
555 |
- default |
556 |
- |
557 |
- if use pam; then |
558 |
- local epam_path="$(get_ejabberd_path)/priv/bin/epam" |
559 |
- |
560 |
- pamd_mimic_system xmpp auth account || die "cannot create pam.d file" |
561 |
- into "$(get_ejabberd_path)/priv" |
562 |
- newbin epam-wrapper epam |
563 |
- # PAM helper module permissions |
564 |
- # https://www.process-one.net/docs/ejabberd/guide_en.html#pam |
565 |
- fowners root:jabber "${epam_path}" |
566 |
- fperms 4750 "${epam_path}" |
567 |
- fi |
568 |
- |
569 |
- newconfd "${FILESDIR}/${PN}.confd" "${PN}" |
570 |
- newinitd "${FILESDIR}/${PN}.initd" "${PN}" |
571 |
- systemd_dounit "${PN}.service" |
572 |
- systemd_dotmpfilesd "${FILESDIR}/${PN}.tmpfiles.conf" |
573 |
- |
574 |
- insinto /etc/logrotate.d |
575 |
- newins "${FILESDIR}/${PN}.logrotate" "${PN}" |
576 |
-} |
577 |
- |
578 |
-pkg_postinst() { |
579 |
- if [[ ! ${REPLACING_VERSIONS} ]]; then |
580 |
- echo |
581 |
- elog "For configuration instructions, please see" |
582 |
- elog " http://www.process-one.net/en/ejabberd/docs/" |
583 |
- echo |
584 |
- if [[ " ${REPLACING_VERSIONS} " =~ \ 2\. ]]; then |
585 |
- ewarn "If you have used pubsub in ejabberd-2.* you may encounter issues after" |
586 |
- ewarn "migration to ${PV}. pubsub data may not be migrated automatically and" |
587 |
- ewarn "you may need to run migration script manually, see:" |
588 |
- ewarn |
589 |
- ewarn " https://github.com/processone/ejabberd/issues/479#issuecomment-124497456" |
590 |
- ewarn |
591 |
- ewarn "In case you don't care about all stored moods, activities, geoinfo and you" |
592 |
- ewarn "know you don't store in pubsub anything important, you can just remove" |
593 |
- ewarn "pubsub tables:" |
594 |
- ewarn |
595 |
- ewarn " rm ${EROOT%/}${JABBER_SPOOL}/pubsub_*" |
596 |
- ewarn |
597 |
- ewarn "See also: https://bugs.gentoo.org/show_bug.cgi?id=588244" |
598 |
- echo |
599 |
- fi |
600 |
- elif [[ -f ${EROOT}etc/jabber/ejabberd.cfg ]]; then |
601 |
- elog "Ejabberd now defaults to using a YAML format for its config file." |
602 |
- elog "The old ejabberd.cfg file can be converted using the following instructions:" |
603 |
- echo |
604 |
- elog "1. Make sure all processes related to the previous version of ejabberd aren't" |
605 |
- elog " running. Usually this just means the ejabberd and epmd daemons and possibly" |
606 |
- elog " the pam-related process (epam) if pam support is enabled." |
607 |
- elog "2. Run \`ejabberdctl start\` with sufficient permissions. Note that this can" |
608 |
- elog " fail to start ejabberd properly for various reasons. Check ejabberd's main" |
609 |
- elog " log file at /var/log/jabber/ejabberd.log to confirm it started successfully." |
610 |
- elog "3. Run" |
611 |
- elog " \`ejabberdctl convert_to_yaml /etc/jabber/ejabberd.cfg /etc/jabber/ejabberd.yml.new\`" |
612 |
- elog " with sufficient permissions, edit and rename /etc/jabber/ejabberd.yml.new to" |
613 |
- elog " /etc/jabber/ejabberd.yml, and finally restart ejabberd with the new config" |
614 |
- elog " file." |
615 |
- echo |
616 |
- fi |
617 |
- |
618 |
- if ! ejabberd_cert_exists; then |
619 |
- ejabberd_cert_install |
620 |
- fi |
621 |
-} |
622 |
|
623 |
diff --git a/net-im/ejabberd/ejabberd-16.08.ebuild b/net-im/ejabberd/ejabberd-16.08.ebuild |
624 |
deleted file mode 100644 |
625 |
index 947f907b904..00000000000 |
626 |
--- a/net-im/ejabberd/ejabberd-16.08.ebuild |
627 |
+++ /dev/null |
628 |
@@ -1,298 +0,0 @@ |
629 |
-# Copyright 1999-2017 Gentoo Foundation |
630 |
-# Distributed under the terms of the GNU General Public License v2 |
631 |
- |
632 |
-EAPI=6 |
633 |
- |
634 |
-SSL_CERT_MANDATORY=1 |
635 |
- |
636 |
-inherit eutils pam rebar ssl-cert systemd |
637 |
- |
638 |
-DESCRIPTION="Robust, scalable and extensible XMPP server" |
639 |
-HOMEPAGE="http://www.ejabberd.im/ https://github.com/processone/ejabberd/" |
640 |
-SRC_URI="http://www.process-one.net/downloads/${PN}/${PV}/${P}.tgz |
641 |
- -> ${P}.tar.gz" |
642 |
- |
643 |
-LICENSE="GPL-2" |
644 |
-SLOT="0" |
645 |
-KEYWORDS="~amd64 ~arm ~ia64 ~ppc ~sparc ~x86" |
646 |
-REQUIRED_USE="mssql? ( odbc )" |
647 |
-# TODO: Add 'tools' flag. |
648 |
-IUSE="captcha debug full-xml hipe ldap mssql mysql nls odbc pam postgres redis |
649 |
- riak roster-gw sqlite zlib" |
650 |
- |
651 |
-RESTRICT="test" |
652 |
- |
653 |
-# TODO: Add dependencies for 'tools' flag enabled. |
654 |
-# TODO: tools? ( |
655 |
-# TODO: >=dev-erlang/meck-0.8.4 |
656 |
-# TODO: >=dev-erlang/moka-1.0.5b |
657 |
-# TODO: ) |
658 |
-CDEPEND=" |
659 |
- >=dev-erlang/cache_tab-1.0.3 |
660 |
- >=dev-erlang/esip-1.0.7 |
661 |
- >=dev-erlang/fast_tls-1.0.6 |
662 |
- >=dev-erlang/fast_xml-1.1.14 |
663 |
- >=dev-erlang/fast_yaml-1.0.5 |
664 |
- >=dev-erlang/jiffy-0.14.7 |
665 |
- >=dev-erlang/lager-3.2.1 |
666 |
- >=dev-erlang/luerl-0.2 |
667 |
- >=dev-erlang/p1_oauth2-0.6.1 |
668 |
- >=dev-erlang/p1_utils-1.0.5 |
669 |
- >=dev-erlang/p1_xmlrpc-1.15.1 |
670 |
- >=dev-erlang/stringprep-1.0.5 |
671 |
- >=dev-erlang/stun-1.0.6 |
672 |
- >=dev-lang/erlang-17.1[hipe?,odbc?,ssl] |
673 |
- >=net-im/jabber-base-0.01 |
674 |
- ldap? ( =net-nds/openldap-2* ) |
675 |
- mysql? ( >=dev-erlang/p1_mysql-1.0.1 ) |
676 |
- nls? ( >=dev-erlang/iconv-1.0.1 ) |
677 |
- odbc? ( dev-db/unixODBC ) |
678 |
- pam? ( >=dev-erlang/epam-1.0.0 |
679 |
- <dev-erlang/epam-1.0.1 ) |
680 |
- postgres? ( >=dev-erlang/p1_pgsql-1.1.0 ) |
681 |
- redis? ( >=dev-erlang/eredis-1.0.8 ) |
682 |
- riak? ( |
683 |
- >=dev-erlang/hamcrest-0.1.0_p20150103 |
684 |
- >=dev-erlang/riakc-2.1.1_p20151111 |
685 |
- ) |
686 |
- sqlite? ( >=dev-erlang/sqlite3-1.1.5 ) |
687 |
- zlib? ( >=dev-erlang/ezlib-1.0.1 )" |
688 |
-DEPEND="${CDEPEND} |
689 |
- >=sys-apps/gawk-4.1" |
690 |
-RDEPEND="${CDEPEND} |
691 |
- captcha? ( media-gfx/imagemagick[truetype,png] )" |
692 |
- |
693 |
-DOCS=( README ) |
694 |
-PATCHES=( "${FILESDIR}/${P}-ejabberdctl.patch" ) |
695 |
- |
696 |
-EJABBERD_CERT="${EPREFIX}/etc/ssl/ejabberd/server.pem" |
697 |
-# Paths in net-im/jabber-base |
698 |
-JABBER_ETC="${EPREFIX}/etc/jabber" |
699 |
-JABBER_LOG="${EPREFIX}/var/log/jabber" |
700 |
-JABBER_SPOOL="${EPREFIX}/var/spool/jabber" |
701 |
- |
702 |
-# Adjust example configuration file to Gentoo. |
703 |
-# - Use our sample certificates. |
704 |
-# - Correct PAM service name. |
705 |
-adjust_config() { |
706 |
- sed -e "s|\"/path/to/ssl.pem\"|\"${EJABBERD_CERT}\"|g" \ |
707 |
- -e "s|\"pamservicename\"|\"xmpp\"|" \ |
708 |
- -i "${S}/ejabberd.yml.example" \ |
709 |
- || die 'failed to adjust example config' |
710 |
-} |
711 |
- |
712 |
-# Set paths to ejabberd lib directory consistently to point always to directory |
713 |
-# suffixed with version. |
714 |
-correct_ejabberd_paths() { |
715 |
- sed -e "/^EJABBERDDIR[[:space:]]*=/{s:ejabberd:${P}:}" \ |
716 |
- -i "${S}/Makefile.in" \ |
717 |
- || die 'failed to set ejabberd path in Makefile.in' |
718 |
- sed -e "/EJABBERD_BIN_PATH=/{s:ejabberd:${P}:}" \ |
719 |
- -i "${S}/ejabberdctl.template" \ |
720 |
- || die 'failed to set ejabberd path in ejabberdctl.template' |
721 |
- sed -e 's|\(captcha_cmd:[[:space:]]*"\).\+"|\1'$(get_ejabberd_path)'/priv/bin/captcha.sh"|' \ |
722 |
- -i "${S}/ejabberd.yml.example" \ |
723 |
- || die 'failed to correct path to captcha.sh in example config' |
724 |
-} |
725 |
- |
726 |
-# Get epam-wrapper from 'files' directory and correct path to lib directory in |
727 |
-# it. epam-wrapper is placed into work directory. It is assumed no epam-wrapper |
728 |
-# file exists there already. |
729 |
-customize_epam_wrapper() { |
730 |
- local epam_wrapper_src="$1" |
731 |
- local epam_wrapper_dst="${S}/epam-wrapper" |
732 |
- |
733 |
- [[ -e ${epam_wrapper_dst} ]] && die 'epam-wrapper already exists' |
734 |
- sed -r -e "s@^(ERL_LIBS=).*\$@\1${EPREFIX}$(get_erl_libs)@" \ |
735 |
- "${epam_wrapper_src}" >"${epam_wrapper_dst}" \ |
736 |
- || die 'failed to install epam-wrapper' |
737 |
-} |
738 |
- |
739 |
-# Check if there already exists a certificate. |
740 |
-ejabberd_cert_exists() { |
741 |
- local cert |
742 |
- |
743 |
- for cert in $(gawk -- \ |
744 |
- 'match($0, /^[[:space:]]*certfile: "([^"]+)"/, m) {print m[1];}' \ |
745 |
- "${EROOT%/}${JABBER_ETC}/ejabberd.yml"); do |
746 |
- [[ -f ${cert} ]] && return 0 |
747 |
- done |
748 |
- |
749 |
- return 1 |
750 |
-} |
751 |
- |
752 |
-# Generate and install sample ejabberd certificate. It's installed into |
753 |
-# EJABBERD_CERT path. |
754 |
-ejabberd_cert_install() { |
755 |
- SSL_ORGANIZATION="${SSL_ORGANIZATION:-ejabberd XMPP Server}" |
756 |
- install_cert "${EJABBERD_CERT%.*}" |
757 |
- chown root:jabber "${EROOT%/}${EJABBERD_CERT}" || die |
758 |
- chmod 0440 "${EROOT%/}${EJABBERD_CERT}" || die |
759 |
-} |
760 |
- |
761 |
-# Get path to ejabberd lib directory. |
762 |
-# |
763 |
-# This is the path ./configure script Base for this path is path set in |
764 |
-# ./configure script which is /usr/lib by default. If libdir is explicitely set |
765 |
-# to something else than this should be adjusted here as well. |
766 |
-get_ejabberd_path() { |
767 |
- echo "/usr/$(get_libdir)/${P}" |
768 |
-} |
769 |
- |
770 |
-# Make ejabberd.service for systemd from upstream provided template. |
771 |
-make_ejabberd_service() { |
772 |
- sed -r \ |
773 |
- -e 's!@ctlscriptpath@!/usr/sbin!' \ |
774 |
- -e 's!(User|Group)=(.*)!\1=jabber!' \ |
775 |
- "${PN}.service.template" >"${PN}.service" \ |
776 |
- || die 'failed to make ejabberd.service' |
777 |
-} |
778 |
- |
779 |
-# Set paths to defined by net-im/jabber-base. |
780 |
-set_jabberbase_paths() { |
781 |
- sed -e "/^ETCDIR[[:space:]]*=/{s:@sysconfdir@/ejabberd:${JABBER_ETC}:}" \ |
782 |
- -e "/^LOGDIR[[:space:]]*=/{s:@localstatedir@/log/ejabberd:${JABBER_LOG}:}" \ |
783 |
- -e "/^SPOOLDIR[[:space:]]*=/{s:@localstatedir@/lib/ejabberd:${JABBER_SPOOL}:}" \ |
784 |
- -i "${S}/Makefile.in" \ |
785 |
- || die 'failed to set paths in Makefile.in' |
786 |
- sed -e "s|\(ETC_DIR=\){{sysconfdir}}.*|\1${JABBER_ETC}|" \ |
787 |
- -e "s|\(LOGS_DIR=\){{localstatedir}}.*|\1${JABBER_LOG}|" \ |
788 |
- -e "s|\(SPOOL_DIR=\){{localstatedir}}.*|\1${JABBER_SPOOL}|" \ |
789 |
- -i "${S}/ejabberdctl.template" \ |
790 |
- || die 'failed to set paths ejabberdctl.template' |
791 |
-} |
792 |
- |
793 |
-# Skip installing docs because it's only COPYING that's installed by Makefile. |
794 |
-skip_docs() { |
795 |
- gawk -i inplace ' |
796 |
-/# Documentation/, /^[[:space:]]*#?[[:space:]]*$/ { |
797 |
- if ($0 ~ /^[[:space:]]*#?[[:space:]]*$/) { |
798 |
- print $0; |
799 |
- } else { |
800 |
- next; |
801 |
- } |
802 |
-} |
803 |
-1 |
804 |
-' "${S}/Makefile.in" || die 'failed to remove docs section from Makefile.in' |
805 |
-} |
806 |
- |
807 |
-src_prepare() { |
808 |
- default |
809 |
- |
810 |
- rebar_remove_deps |
811 |
- correct_ejabberd_paths |
812 |
- set_jabberbase_paths |
813 |
- make_ejabberd_service |
814 |
- skip_docs |
815 |
- adjust_config |
816 |
- customize_epam_wrapper "${FILESDIR}/epam-wrapper" |
817 |
- |
818 |
- # Fix bug #591862. ERL_LIBS should point directly to ejabberd directory |
819 |
- # rather than its parent which is default. That way ejabberd directory |
820 |
- # takes precedence is module lookup. |
821 |
- local ejabberd_erl_libs="$(get_ejabberd_path):$(get_erl_libs)" |
822 |
- sed -e "s|\(ERL_LIBS=\){{libdir}}.*|\1${ejabberd_erl_libs}|" \ |
823 |
- -i "${S}/ejabberdctl.template" \ |
824 |
- || die 'failed to set ERL_LIBS in ejabberdctl.template' |
825 |
-} |
826 |
- |
827 |
-src_configure() { |
828 |
- econf \ |
829 |
- --docdir="${EPREFIX}/usr/share/doc/${PF}/html" \ |
830 |
- --enable-user=jabber \ |
831 |
- $(use_enable debug) \ |
832 |
- $(use_enable full-xml) \ |
833 |
- $(use_enable hipe) \ |
834 |
- $(use_enable mssql) \ |
835 |
- $(use_enable mysql) \ |
836 |
- $(use_enable nls iconv) \ |
837 |
- $(use_enable odbc) \ |
838 |
- $(use_enable pam) \ |
839 |
- $(use_enable postgres pgsql) \ |
840 |
- $(use_enable redis) \ |
841 |
- $(use_enable riak) \ |
842 |
- $(use_enable roster-gw roster-gateway-workaround) \ |
843 |
- $(use_enable sqlite) \ |
844 |
- $(use_enable zlib) |
845 |
-} |
846 |
- |
847 |
-src_compile() { |
848 |
- emake REBAR='rebar -v' src |
849 |
-} |
850 |
- |
851 |
-src_install() { |
852 |
- default |
853 |
- |
854 |
- if use pam; then |
855 |
- local epam_path="$(get_ejabberd_path)/priv/bin/epam" |
856 |
- |
857 |
- pamd_mimic_system xmpp auth account || die "cannot create pam.d file" |
858 |
- into "$(get_ejabberd_path)/priv" |
859 |
- newbin epam-wrapper epam |
860 |
- # PAM helper module permissions |
861 |
- # https://www.process-one.net/docs/ejabberd/guide_en.html#pam |
862 |
- fowners root:jabber "${epam_path}" |
863 |
- fperms 4750 "${epam_path}" |
864 |
- fi |
865 |
- |
866 |
- newconfd "${FILESDIR}/${PN}.confd" "${PN}" |
867 |
- newinitd "${FILESDIR}/${PN}.initd" "${PN}" |
868 |
- systemd_dounit "${PN}.service" |
869 |
- systemd_dotmpfilesd "${FILESDIR}/${PN}.tmpfiles.conf" |
870 |
- |
871 |
- insinto /etc/logrotate.d |
872 |
- newins "${FILESDIR}/${PN}.logrotate" "${PN}" |
873 |
-} |
874 |
- |
875 |
-pkg_postinst() { |
876 |
- if [[ ! ${REPLACING_VERSIONS} ]]; then |
877 |
- echo |
878 |
- elog "For configuration instructions, please see" |
879 |
- elog " http://www.process-one.net/en/ejabberd/docs/" |
880 |
- echo |
881 |
- if [[ " ${REPLACING_VERSIONS} " =~ \ 2\. ]]; then |
882 |
- ewarn "If you have used pubsub in ejabberd-2.* you may encounter issues after" |
883 |
- ewarn "migration to ${PV}. pubsub data may not be migrated automatically and" |
884 |
- ewarn "you may need to run migration script manually, see:" |
885 |
- ewarn |
886 |
- ewarn " https://github.com/processone/ejabberd/issues/479#issuecomment-124497456" |
887 |
- ewarn |
888 |
- ewarn "In case you don't care about all stored moods, activities, geoinfo and you" |
889 |
- ewarn "know you don't store in pubsub anything important, you can just remove" |
890 |
- ewarn "pubsub tables:" |
891 |
- ewarn |
892 |
- ewarn " rm ${EROOT%/}${JABBER_SPOOL}/pubsub_*" |
893 |
- ewarn |
894 |
- ewarn "See also: https://bugs.gentoo.org/show_bug.cgi?id=588244" |
895 |
- echo |
896 |
- fi |
897 |
- elif [[ -f ${EROOT}etc/jabber/ejabberd.cfg ]]; then |
898 |
- elog "Ejabberd now defaults to using a YAML format for its config file." |
899 |
- elog "The old ejabberd.cfg file can be converted using the following instructions:" |
900 |
- echo |
901 |
- elog "1. Make sure all processes related to the previous version of ejabberd aren't" |
902 |
- elog " running. Usually this just means the ejabberd and epmd daemons and possibly" |
903 |
- elog " the pam-related process (epam) if pam support is enabled." |
904 |
- elog "2. Run \`ejabberdctl start\` with sufficient permissions. Note that this can" |
905 |
- elog " fail to start ejabberd properly for various reasons. Check ejabberd's main" |
906 |
- elog " log file at /var/log/jabber/ejabberd.log to confirm it started successfully." |
907 |
- elog "3. Run" |
908 |
- elog " \`ejabberdctl convert_to_yaml /etc/jabber/ejabberd.cfg /etc/jabber/ejabberd.yml.new\`" |
909 |
- elog " with sufficient permissions, edit and rename /etc/jabber/ejabberd.yml.new to" |
910 |
- elog " /etc/jabber/ejabberd.yml, and finally restart ejabberd with the new config" |
911 |
- elog " file." |
912 |
- echo |
913 |
- fi |
914 |
- |
915 |
- if ! ejabberd_cert_exists; then |
916 |
- ejabberd_cert_install |
917 |
- fi |
918 |
- |
919 |
- if use pam; then |
920 |
- # sfperms drops read bit from files with suid. Reapply it. |
921 |
- # Fix bug #592218. |
922 |
- local epam_path="$(get_ejabberd_path)/priv/bin/epam" |
923 |
- chmod g+r "${EROOT%/}${epam_path}" \ |
924 |
- || die "failed to correct ${epam_path} permissions" |
925 |
- fi |
926 |
-} |
927 |
|
928 |
diff --git a/net-im/ejabberd/files/ejabberd-16.04-ejabberdctl.patch b/net-im/ejabberd/files/ejabberd-16.04-ejabberdctl.patch |
929 |
deleted file mode 100644 |
930 |
index de2acd5aa01..00000000000 |
931 |
--- a/net-im/ejabberd/files/ejabberd-16.04-ejabberdctl.patch |
932 |
+++ /dev/null |
933 |
@@ -1,49 +0,0 @@ |
934 |
-Set SHELL since the generic jabber user used on Gentoo for jabber servers |
935 |
-doesn't have a valid shell set by default and fix EXEC_CMD otherwise it fails |
936 |
-with "This account is currently not available" again due to jabber not having |
937 |
-a valid shell. |
938 |
- |
939 |
-Also, workaround the assumption that jabber's $HOME is a directory when instead |
940 |
-it defaults to /dev/null on Gentoo. |
941 |
- |
942 |
---- a/ejabberdctl.template 2016-01-12 11:07:58.000000000 +0000 |
943 |
-+++ b/ejabberdctl.template 2016-02-15 21:36:27.508297627 +0000 |
944 |
-@@ -16,6 +16,7 @@ |
945 |
- EPMD={{bindir}}/epmd |
946 |
- INSTALLUSER={{installuser}} |
947 |
- ERL_LIBS={{libdir}} |
948 |
-+SHELL=/bin/sh |
949 |
- |
950 |
- # check the proper system user is used if defined |
951 |
- if [ "$INSTALLUSER" != "" ] ; then |
952 |
-@@ -23,11 +24,11 @@ |
953 |
- for GID in `id -G`; do |
954 |
- if [ $GID -eq 0 ] ; then |
955 |
- INSTALLUSER_HOME=$(getent passwd "$INSTALLUSER" | cut -d: -f6) |
956 |
-- if [ -n "$INSTALLUSER_HOME" ] && [ ! -d "$INSTALLUSER_HOME" ] ; then |
957 |
-+ if [ -n "$INSTALLUSER_HOME" ] && [ ! -e "$INSTALLUSER_HOME" ] ; then |
958 |
- mkdir -p "$INSTALLUSER_HOME" |
959 |
- chown "$INSTALLUSER" "$INSTALLUSER_HOME" |
960 |
- fi |
961 |
-- EXEC_CMD="su $INSTALLUSER -c" |
962 |
-+ EXEC_CMD="su $INSTALLUSER -p -c" |
963 |
- fi |
964 |
- done |
965 |
- if [ `id -g` -eq `id -g $INSTALLUSER` ] ; then |
966 |
-@@ -100,6 +101,7 @@ |
967 |
- DATETIME=`date "+%Y%m%d-%H%M%S"` |
968 |
- ERL_CRASH_DUMP=$LOGS_DIR/erl_crash_$DATETIME.dump |
969 |
- ERL_INETRC=$ETC_DIR/inetrc |
970 |
-+HOME=$SPOOL_DIR |
971 |
- |
972 |
- # define mnesia options |
973 |
- MNESIA_OPTS="-mnesia dir \"\\\"$SPOOL_DIR\\\"\" $MNESIA_OPTIONS" |
974 |
-@@ -159,6 +161,8 @@ |
975 |
- export CONTRIB_MODULES_PATH |
976 |
- export CONTRIB_MODULES_CONF_DIR |
977 |
- export ERL_LIBS |
978 |
-+export HOME |
979 |
-+export SHELL |
980 |
- |
981 |
- shell_escape() |
982 |
- { |
983 |
|
984 |
diff --git a/net-im/ejabberd/files/ejabberd-16.08-ejabberdctl.patch b/net-im/ejabberd/files/ejabberd-16.08-ejabberdctl.patch |
985 |
deleted file mode 100644 |
986 |
index 6001c651f5d..00000000000 |
987 |
--- a/net-im/ejabberd/files/ejabberd-16.08-ejabberdctl.patch |
988 |
+++ /dev/null |
989 |
@@ -1,62 +0,0 @@ |
990 |
-From 185923a3c5f11c2d29599416a52b6594bc94d8c9 Mon Sep 17 00:00:00 2001 |
991 |
-From: =?UTF-8?q?Amadeusz=20=C5=BBo=C5=82nowski?= <aidecoe@×××××××.name> |
992 |
-Date: Mon, 29 Aug 2016 22:29:41 +0100 |
993 |
-Subject: [PATCH] Adjust ejabberdctl for Gentoo jabberbase setup |
994 |
- |
995 |
-Set SHELL since the generic jabber user used on Gentoo for jabber |
996 |
-servers doesn't have a valid shell set by default and fix EXEC_CMD |
997 |
-otherwise it fails with "This account is currently not available" again |
998 |
-due to jabber not having a valid shell. |
999 |
- |
1000 |
-Also, workaround the assumption that jabber's $HOME is a directory when |
1001 |
-instead it defaults to /dev/null on Gentoo. |
1002 |
---- |
1003 |
- ejabberdctl.template | 8 ++++++-- |
1004 |
- 1 file changed, 6 insertions(+), 2 deletions(-) |
1005 |
- |
1006 |
-diff --git a/ejabberdctl.template b/ejabberdctl.template |
1007 |
-index 5b34ebe..3c080fd 100755 |
1008 |
---- a/ejabberdctl.template |
1009 |
-+++ b/ejabberdctl.template |
1010 |
-@@ -16,6 +16,7 @@ IEX={{bindir}}/iex |
1011 |
- EPMD={{epmd}} |
1012 |
- INSTALLUSER={{installuser}} |
1013 |
- ERL_LIBS={{libdir}} |
1014 |
-+SHELL=/bin/sh |
1015 |
- |
1016 |
- # check the proper system user is used if defined |
1017 |
- if [ "$INSTALLUSER" != "" ] ; then |
1018 |
-@@ -23,11 +24,11 @@ if [ "$INSTALLUSER" != "" ] ; then |
1019 |
- for GID in `id -G`; do |
1020 |
- if [ $GID -eq 0 ] ; then |
1021 |
- INSTALLUSER_HOME=$(getent passwd "$INSTALLUSER" | cut -d: -f6) |
1022 |
-- if [ -n "$INSTALLUSER_HOME" ] && [ ! -d "$INSTALLUSER_HOME" ] ; then |
1023 |
-+ if [ -n "$INSTALLUSER_HOME" ] && [ ! -e "$INSTALLUSER_HOME" ] ; then |
1024 |
- mkdir -p "$INSTALLUSER_HOME" |
1025 |
- chown "$INSTALLUSER" "$INSTALLUSER_HOME" |
1026 |
- fi |
1027 |
-- EXEC_CMD="su $INSTALLUSER -c" |
1028 |
-+ EXEC_CMD="su $INSTALLUSER -p -c" |
1029 |
- fi |
1030 |
- done |
1031 |
- if [ `id -g` -eq `id -g $INSTALLUSER` ] ; then |
1032 |
-@@ -91,6 +92,7 @@ EJABBERD_LOG_PATH=$LOGS_DIR/ejabberd.log |
1033 |
- DATETIME=`date "+%Y%m%d-%H%M%S"` |
1034 |
- ERL_CRASH_DUMP=$LOGS_DIR/erl_crash_$DATETIME.dump |
1035 |
- ERL_INETRC=$ETC_DIR/inetrc |
1036 |
-+HOME=$SPOOL_DIR |
1037 |
- |
1038 |
- # define mnesia options |
1039 |
- MNESIA_OPTS="-mnesia dir \"\\\"$SPOOL_DIR\\\"\" $MNESIA_OPTIONS" |
1040 |
-@@ -149,6 +151,8 @@ export ERL_MAX_ETS_TABLES |
1041 |
- export CONTRIB_MODULES_PATH |
1042 |
- export CONTRIB_MODULES_CONF_DIR |
1043 |
- export ERL_LIBS |
1044 |
-+export HOME |
1045 |
-+export SHELL |
1046 |
- |
1047 |
- shell_escape_str() |
1048 |
- { |
1049 |
--- |
1050 |
-2.9.2 |
1051 |
- |