diff options
author | V3n3RiX <venerix@koprulu.sector> | 2022-10-29 04:00:35 +0100 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2022-10-29 04:00:35 +0100 |
commit | 746652e918ce7328c0cc5ffef8a79146b91ba21b (patch) | |
tree | 755e0aa511453e24ffcf43e05e967e2268f56975 /net-im | |
parent | 9c602d90d61cea9fe83c596c68a99e383ee15f73 (diff) |
gentoo auto-resync : 29:10:2022 - 04:00:35
Diffstat (limited to 'net-im')
-rw-r--r-- | net-im/Manifest.gz | bin | 10422 -> 10428 bytes | |||
-rw-r--r-- | net-im/ejabberd/Manifest | 3 | ||||
-rw-r--r-- | net-im/ejabberd/ejabberd-22.10.ebuild | 219 | ||||
-rw-r--r-- | net-im/ejabberd/files/ejabberd-22.10-adjust-ejabberd.service.template-to-Gentoo.patch | 16 |
4 files changed, 238 insertions, 0 deletions
diff --git a/net-im/Manifest.gz b/net-im/Manifest.gz Binary files differindex ff827cf40c65..8c34d8cc312e 100644 --- a/net-im/Manifest.gz +++ b/net-im/Manifest.gz diff --git a/net-im/ejabberd/Manifest b/net-im/ejabberd/Manifest index 15a49573fdd2..47c85400d19a 100644 --- a/net-im/ejabberd/Manifest +++ b/net-im/ejabberd/Manifest @@ -1,9 +1,12 @@ AUX adjust-ejabberd.service.template-to-Gentoo.patch 1088 BLAKE2B 38405d4fa1119a8eca09fb22c1055182e7dfc5f4ce89440382694ba4da2bebf85934bde40204884e777343276448a8d7f256ae795db0c61e02ae82a8021116af SHA512 6c1417d40c17951c8187a4df72fbd755a4b408405a23aaed879e6cd7c01d4df0b7c52f3b8f64c2950f3a3d9996dfc4b29e77ebc5f035d5b13ab5c741c24038b6 AUX ejabberd-22.05.initd 1065 BLAKE2B 7efbc0a228665243e9cb83ed36fb335cae81c2ccda08c3c433b59e1a29ca2567fe5c68c8ae8ed4c3c70196c3851cc5694c6ff919d2cc94b5596805c9edb809cf SHA512 2e7ee126e9335e70c16f8b53cae2601fc16d83c233b154fa565164a46099765a9720f3a9e54417ac642d5edf5f2c0e05ec75ceb4d4ed196afd962373a44a4b70 AUX ejabberd-22.05.logrotate 209 BLAKE2B f4da9d1ce350f192804e89a6dfea49ac72a432d8657f6f3e49b68e187d3ffe35818ded52859fb333078e5752100b0195bfc52f45e29fdad97c2dff1bc9f7d77d SHA512 7fee49e82d34fc04028fcf0dc39af7e416be05d9fc3e19e520fa139841657f91e6f8ef37676daad1b31334f631f875cb1619046f3d57f509443a92a8f546de86 +AUX ejabberd-22.10-adjust-ejabberd.service.template-to-Gentoo.patch 430 BLAKE2B 0301bd38cf5c08a119ac27368ac7477a5388fd9475a6d8b866635a0b89b989fdff7b41607871d1052a31bba7ddd44035528823caf88a691ffe699ca5f20a1ce5 SHA512 98e41ccceb235dd17c1f265790d5145eae6eadb35e359d935774bdea26739381aad15949fbc22ada394181130556ce91a1d82078d92072e04c91ab212a5ef9dc AUX ejabberd.confd 161 BLAKE2B f08ab6310c950d3d248fbaf5e6e35bca2e31289ae476b2379a779ebc38926e091cf04883cce94cedff1e4dcf6ec3224079e7828502b97451a8a96fd278a4d102 SHA512 07143642982df18461fdecd16daaad3baf6a06f8222d7a76757797c531be2803975ed60cc43aace24a624aa7c73bd8fdc6e023e739de492271b79e571f27c8fb AUX epam-wrapper 336 BLAKE2B 914ba9c7469ba58fd29a4c70485c77ff2a93000e397aa8c58aab434cfceda34120880184488659e30f1961d576566111b4159b34b30fea5307bc255ce382781d SHA512 b66dfed9967e6524af8f46204eadcbed0a427ecc5cca30ec1fd58373714467077858a252c039828a18130244d46a54a019e17828cf3ac055c18044c2a6881449 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 EBUILD ejabberd-22.05-r2.ebuild 7136 BLAKE2B 35e34dede32c4067dd35b54d7a98cd864ddbeb4fa50d14b812dbda642d7d44be5f54a79edd446917975f349dc6680f5bafaf03af9aa11eb722fef38cd3ea04a8 SHA512 6da99fe902f7ba9a62ea1f60d018e3ef7a1fb9eac48d7b3dc9c3503fab388b631e8cbb3b328bc5277ae2ece1cbb0fc5310c034d407c413a2bbb57f3e648b90fd +EBUILD ejabberd-22.10.ebuild 6926 BLAKE2B f1d03d20bc0d672ff076d76b433dfff8a4dac566cc237d91f39af9af0f6cba419e9a0414d2e4fad8047c670f5a640af24e393d3fefde86bbc5adfbeb1d869f47 SHA512 18ae55e2d445db5d23b38425384ac7ebab772aa88229ef5c1e97f5bd7e9c6b520c382f482ae7f6f94818fd7fc7f4e530eddf0d54c3443081a445898e8cf3d5ba MISC metadata.xml 1484 BLAKE2B 74f0ec404b37dfe72d8751dd8bc8f0ba0b56f334939a5311af70df4616f19e536209b9be7361b35c8e5d316fbce623afdbf7e3ce53a139eb0d2e0d895275ae3c SHA512 793584e1e44c3a651b15eed84a91a801cd809392ccf7623f1a1b222e65641f8dca18515fb90e42e4a51178f4686d3c61778e14834be23feb23b269b4f07c91fb 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 |