* [gentoo-commits] repo/gentoo:master commit in: net-im/prosody/, net-im/prosody/files/
@ 2020-10-03 13:43 Conrad Kostecki
0 siblings, 0 replies; 6+ messages in thread
From: Conrad Kostecki @ 2020-10-03 13:43 UTC (permalink / raw
To: gentoo-commits
commit: 672482e9799801839773c26a248ebe3fca6c6ef1
Author: Conrad Kostecki <conikost <AT> gentoo <DOT> org>
AuthorDate: Sat Oct 3 13:23:08 2020 +0000
Commit: Conrad Kostecki <conikost <AT> gentoo <DOT> org>
CommitDate: Sat Oct 3 13:43:37 2020 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=672482e9
net-im/prosody: bump to version 0.11.7
Changes:
Dropped useflag ipv6,
since old non ipv6 dependency does not exist anymore.
Renamed lua to luajit to use gentoos default.
Added optional postgresql dependency to init script.
Overhauled ebuild.
Dropped multilib inherit, as it's not being used.
Updated deps for correct luaexpat.
Closes: https://bugs.gentoo.org/564434
Closes: https://bugs.gentoo.org/674842
Closes: https://bugs.gentoo.org/740662
Package-Manager: Portage-3.0.8, Repoman-3.0.1
Signed-off-by: Conrad Kostecki <conikost <AT> gentoo.org>
net-im/prosody/Manifest | 1 +
net-im/prosody/files/prosody.initd-r3 | 46 ++++++++++++++++++++
net-im/prosody/prosody-0.11.7.ebuild | 79 +++++++++++++++++++++++++++++++++++
3 files changed, 126 insertions(+)
diff --git a/net-im/prosody/Manifest b/net-im/prosody/Manifest
index a0adccc1337..ded27dd5ec2 100644
--- a/net-im/prosody/Manifest
+++ b/net-im/prosody/Manifest
@@ -1 +1,2 @@
DIST prosody-0.11.5.tar.gz 425122 BLAKE2B d65720a0c9d533a4be70847b690ecf037ae4b2fcbd090c81e2346d515599f3f148061103df2ffe46122a55694a3d35d53ab2b379fb5fb317e3b84a0ff5e82c29 SHA512 43a9facee8d61b69e277e7e8a9091fbfa60be71d6141195dff991f6020c8afadacce26f356b869cb2d7edd9be285e9ce1bcd822f9628cc845d91757e818a0dff
+DIST prosody-0.11.7.tar.gz 429369 BLAKE2B 8ef7377810702d5e1f480d84c09d6e3cc6aab674cca56fc1ce5e211d32df63ffeb57869c9d98429a81ea715ee19fca2ac015daa6b88b8c140efbeccb906defa6 SHA512 923aa92598ef851ed8408931942859f78f1e3d700fee251f4f5ca67abdcdae43448318ed90a9a1cdc7824d5f4dc5a4732fad4b9ed36d97455fa9b3bff0881a20
diff --git a/net-im/prosody/files/prosody.initd-r3 b/net-im/prosody/files/prosody.initd-r3
new file mode 100644
index 00000000000..3126cc8e1e2
--- /dev/null
+++ b/net-im/prosody/files/prosody.initd-r3
@@ -0,0 +1,46 @@
+#!/sbin/openrc-run
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+description="Prosody is a server for Jabber/XMPP written in Lua."
+description_reload="Reload configuration and reopen log files."
+extra_started_commands="reload"
+pidfile="/var/run/jabber/prosody.pid"
+
+depend() {
+ need net
+ provide jabber-server
+ use dns postgresql
+}
+
+checkconfig() {
+ if [ ! -e /etc/jabber/prosody.cfg.lua ] ; then
+ eerror "You need a /etc/jabber/prosody.cfg.lua file to run prosody"
+ return 1
+ fi
+ luac -p /etc/jabber/prosody.cfg.lua
+ return $?
+}
+
+start() {
+ checkconfig || return 1
+ checkpath -q -d -m 0770 -o jabber:jabber "$(dirname ${pidfile})"
+ checkpath -q -f -m 0770 -o jabber:jabber "${pidfile}"
+ checkpath -q -d -m 0750 -o jabber:jabber /var/log/jabber
+ ebegin "Starting Prosody XMPP Server"
+ prosodyctl start
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping Prosody XMPP Server"
+ prosodyctl stop
+ eend $?
+}
+
+reload() {
+ checkconfig || return 1
+ ebegin "Reloading configuration of Prosody XMPP Server"
+ prosodyctl reload
+ eend $?
+}
diff --git a/net-im/prosody/prosody-0.11.7.ebuild b/net-im/prosody/prosody-0.11.7.ebuild
new file mode 100644
index 00000000000..7d39dc0434f
--- /dev/null
+++ b/net-im/prosody/prosody-0.11.7.ebuild
@@ -0,0 +1,79 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit systemd toolchain-funcs
+
+DESCRIPTION="Prosody is a flexible communications server for Jabber/XMPP written in Lua"
+HOMEPAGE="https://prosody.im/"
+SRC_URI="https://prosody.im/downloads/source/${P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~x86"
+IUSE="libevent libressl luajit mysql postgres sqlite ssl test zlib"
+RESTRICT="!test? ( test )"
+
+COMMON_DEPEND="
+ dev-lua/LuaBitOp
+ net-dns/libidn
+ net-im/jabber-base
+ libressl? ( dev-libs/libressl:= )
+ !libressl? ( dev-libs/openssl:0= )
+ luajit? ( dev-lang/luajit:2 )
+ !luajit? ( dev-lang/lua:0 )
+"
+
+DEPEND="
+ ${COMMON_DEPEND}
+ test? ( dev-lua/busted )
+"
+
+RDEPEND="
+ ${COMMON_DEPEND}
+ ~dev-lua/luaexpat-1.3.0
+ dev-lua/luafilesystem
+ dev-lua/luasocket
+ libevent? ( dev-lua/luaevent )
+ mysql? ( dev-lua/luadbi[mysql] )
+ postgres? ( dev-lua/luadbi[postgres] )
+ sqlite? ( dev-lua/luadbi[sqlite] )
+ ssl? ( dev-lua/luasec )
+ zlib? ( dev-lua/lua-zlib )
+"
+
+PATCHES=( "${FILESDIR}/prosody_cfg-0.11.2-r1.patch" )
+
+src_configure() {
+ local myconfargs=(
+ --c-compiler="$(tc-getCC)"
+ --datadir="${EPREFIX}/var/spool/jabber"
+ --libdir="${EPREFIX}/usr/$(get_libdir)"
+ --linker="$(tc-getCC)"
+ --ostype="linux"
+ --prefix="${EPREFIX}/usr"
+ --runwith="$(usex luajit luajit lua)"
+ --sysconfdir="${EPREFIX}/etc/jabber"
+ --with-lua-include="${EPREFIX}/usr/include"
+ --with-lua-lib="${EPREFIX}/usr/$(get_libdir)/lua"
+ )
+
+ ./configure ${myconfargs[@]} --cflags="${CFLAGS} -Wall -fPIC" --ldflags="${LDFLAGS} -shared" || die
+
+ rm makefile || die
+ mv GNUmakefile Makefile || die
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+
+ keepdir /var/spool/jabber
+
+ newinitd "${FILESDIR}"/prosody.initd-r3 prosody
+
+ systemd_dounit "${FILESDIR}"/prosody.service
+ systemd_newtmpfilesd "${FILESDIR}"/prosody.tmpfilesd prosody.conf
+
+ newinitd "${FILESDIR}"/prosody.initd-r3 prosody
+}
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: net-im/prosody/, net-im/prosody/files/
@ 2022-04-23 21:24 Conrad Kostecki
0 siblings, 0 replies; 6+ messages in thread
From: Conrad Kostecki @ 2022-04-23 21:24 UTC (permalink / raw
To: gentoo-commits
commit: 211f34861c2be9f031763d9071367038137a6a90
Author: Conrad Kostecki <conikost <AT> gentoo <DOT> org>
AuthorDate: Sat Apr 23 20:46:33 2022 +0000
Commit: Conrad Kostecki <conikost <AT> gentoo <DOT> org>
CommitDate: Sat Apr 23 20:46:33 2022 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=211f3486
net-im/prosody: drop 0.11.13
Signed-off-by: Conrad Kostecki <conikost <AT> gentoo.org>
net-im/prosody/Manifest | 1 -
net-im/prosody/files/prosody-0.11.7-gentoo.patch | 29 -------
net-im/prosody/files/prosody.initd-r5 | 44 ----------
net-im/prosody/files/prosody.service-r2 | 13 ---
net-im/prosody/files/prosody.tmpfilesd-r1 | 1 -
net-im/prosody/prosody-0.11.13.ebuild | 102 -----------------------
6 files changed, 190 deletions(-)
diff --git a/net-im/prosody/Manifest b/net-im/prosody/Manifest
index 6fde68aca00c..8c93d2fe69e3 100644
--- a/net-im/prosody/Manifest
+++ b/net-im/prosody/Manifest
@@ -1,2 +1 @@
-DIST prosody-0.11.13.tar.gz 439816 BLAKE2B 8ace9001fe93d6349c744d17c7bccbf18c8704615cea856efcadd2de54430a64241cf7930345163e7bb6067aa4731da15dde4fc7f3ddb868b0680facc5368230 SHA512 7616785536b7b51767a26963a80c961ef2403609e1e78dda3f88cf68c00d5bb899278c70a22b006b58c36c62cbb1bbd390a9298bad5b8d6524928a1cd5457813
DIST prosody-0.12.0.tar.gz 610330 BLAKE2B 14694ee95dc6eb6d053278a9d7718fd7487fe7ef862b4e2ee0d57f2b60cdeb22d1c74eac4a4df7447ea3e9ff57fb3734a9c9997f2767ed3aa04682f265b82185 SHA512 b7144a413a5bc72b1e677504d5ced6583c7399c8334b39b4c9157da60f951300832b34a1d47703a0b217caa4f1d3a0f52ab59cef08b27c6b43e876e1dffca3ce
diff --git a/net-im/prosody/files/prosody-0.11.7-gentoo.patch b/net-im/prosody/files/prosody-0.11.7-gentoo.patch
deleted file mode 100644
index e571066874b7..000000000000
--- a/net-im/prosody/files/prosody-0.11.7-gentoo.patch
+++ /dev/null
@@ -1,29 +0,0 @@
---- a/prosody.cfg.lua.dist
-+++ b/prosody.cfg.lua.dist
-@@ -17,6 +17,15 @@
- -- Settings in this section apply to the whole server and are the default settings
- -- for any virtual hosts
-
-+-- Prosody will use this user and group for launching the service.
-+-- Gentoo uses by default jabber:jabber (uid:gid) for all Jabber related services.
-+prosody_user = "jabber"
-+prosody_group = "jabber"
-+
-+-- Prosody will create this pid file after it has been successfully started.
-+-- Please don't change that path, as it's being used by the Gentoo init scripts.
-+pidfile = "/run/jabber/prosody.pid"
-+
- -- This is a (by default, empty) list of accounts that are admins
- -- for the server. Note that you must create the accounts separately
- -- (see https://prosody.im/doc/creating_accounts for info)
-@@ -30,7 +39,9 @@
- -- Prosody will always look in its source directory for modules, but
- -- this option allows you to specify additional locations where Prosody
- -- will look for modules first. For community modules, see https://modules.prosody.im/
----plugin_paths = {}
-+-- The default included path is for the optional net-im/prosody-modules package,
-+-- which provides additional community maintained modules.
-+plugin_paths = { "/usr/GENTOO_LIBDIR/prosody/community-modules" };
-
- -- This is the list of modules Prosody will load on startup.
- -- It looks for mod_modulename.lua in the plugins folder, so make sure that exists too.
diff --git a/net-im/prosody/files/prosody.initd-r5 b/net-im/prosody/files/prosody.initd-r5
deleted file mode 100644
index 54e37be5bd8c..000000000000
--- a/net-im/prosody/files/prosody.initd-r5
+++ /dev/null
@@ -1,44 +0,0 @@
-#!/sbin/openrc-run
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-name="Prosody XMPP server"
-extra_started_commands="reload"
-jabber_pid="/run/jabber"
-jabber_logs="/var/log/jabber"
-pidfile="${jabber_pid}/prosody.pid"
-prosody_config="/etc/jabber/prosody.cfg.lua"
-
-command="/usr/bin/prosody"
-commandctl="/usr/bin/prosodyctl"
-command_group="jabber"
-command_user="jabber"
-
-checkconfig() {
- if [ ! -f "${prosody_config}" ]; then
- eerror "Please create ${prosody_config} before starting Prosody!"
- return 1
- fi
-
- ${commandctl} check config
- return $?
-}
-
-depend() {
- need net
- provide jabber-server
- use dns postgresql
-}
-
-reload() {
- ebegin "Reloading configuration"
- start-stop-daemon --signal HUP --pidfile "${pidfile}"
- eend $?
-}
-
-start_pre() {
- checkconfig || return 1
-
- checkpath -d -m 0750 -o "${command_user}:${command_group}" -q "${jabber_logs}"
- checkpath -d -m 0750 -o "${command_user}:${command_group}" -q "${jabber_pid}"
-}
diff --git a/net-im/prosody/files/prosody.service-r2 b/net-im/prosody/files/prosody.service-r2
deleted file mode 100644
index 81408beefe53..000000000000
--- a/net-im/prosody/files/prosody.service-r2
+++ /dev/null
@@ -1,13 +0,0 @@
-[Unit]
-Description=Prosody XMPP server
-After=network.target
-
-[Service]
-Group=jabber
-PIDFile=/run/jabber/prosody.pid
-ExecStart=/usr/bin/prosody
-ExecReload=/bin/kill -HUP $MAINPID
-User=jabber
-
-[Install]
-WantedBy=multi-user.target
diff --git a/net-im/prosody/files/prosody.tmpfilesd-r1 b/net-im/prosody/files/prosody.tmpfilesd-r1
deleted file mode 100644
index 7fcdd539decc..000000000000
--- a/net-im/prosody/files/prosody.tmpfilesd-r1
+++ /dev/null
@@ -1 +0,0 @@
-d /run/jabber 750 jabber jabber - -
diff --git a/net-im/prosody/prosody-0.11.13.ebuild b/net-im/prosody/prosody-0.11.13.ebuild
deleted file mode 100644
index 1b9f77dd5703..000000000000
--- a/net-im/prosody/prosody-0.11.13.ebuild
+++ /dev/null
@@ -1,102 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-LUA_COMPAT=( lua5-{1..3} luajit )
-LUA_REQ_USE="deprecated(+)"
-
-inherit lua-single systemd tmpfiles toolchain-funcs
-
-DESCRIPTION="Prosody is a modern XMPP communication server"
-HOMEPAGE="https://prosody.im/"
-SRC_URI="https://prosody.im/downloads/source/${P}.tar.gz"
-
-LICENSE="MIT"
-SLOT="0"
-KEYWORDS="amd64 ~arm ~arm64 x86"
-IUSE="icu +idn +libevent mysql postgres selinux +sqlite +ssl test +zlib"
-REQUIRED_USE="
- ^^ ( icu idn )
- ${LUA_REQUIRED_USE}
-"
-RESTRICT="!test? ( test )"
-
-DEPEND="
- $(lua_gen_cond_dep 'dev-lua/luaexpat[${LUA_USEDEP}]')
- $(lua_gen_cond_dep 'dev-lua/luafilesystem[${LUA_USEDEP}]')
- $(lua_gen_cond_dep 'dev-lua/luasocket[${LUA_USEDEP}]')
- net-im/jabber-base
- icu? ( dev-libs/icu:= )
- idn? ( net-dns/libidn:= )
- libevent? ( $(lua_gen_cond_dep 'dev-lua/luaevent[${LUA_USEDEP}]') )
- dev-libs/openssl:0=
- lua_single_target_lua5-1? ( $(lua_gen_cond_dep 'dev-lua/lua-bit32[lua_targets_lua5-1(-)]') )
- mysql? ( $(lua_gen_cond_dep 'dev-lua/luadbi[mysql,${LUA_USEDEP}]') )
- postgres? ( $(lua_gen_cond_dep 'dev-lua/luadbi[postgres,${LUA_USEDEP}]') )
- sqlite? ( $(lua_gen_cond_dep 'dev-lua/luadbi[sqlite,${LUA_USEDEP}]') )
- ssl? ( $(lua_gen_cond_dep 'dev-lua/luasec[${LUA_USEDEP}]') )
- zlib? ( $(lua_gen_cond_dep 'dev-lua/lua-zlib[${LUA_USEDEP}]') )
- ${LUA_DEPS}
-"
-
-RDEPEND="
- ${DEPEND}
- selinux? ( sec-policy/selinux-jabber )
-"
-
-BDEPEND="
- virtual/pkgconfig
- test? ( $(lua_gen_cond_dep 'dev-lua/busted[${LUA_USEDEP}]') )
-"
-
-PATCHES=( "${FILESDIR}/${PN}-0.11.7-gentoo.patch" )
-
-src_prepare() {
- default
-
- # Set correct plugin path for optional net-im/prosody-modules package
- sed -e "s/GENTOO_LIBDIR/$(get_libdir)/g" -i prosody.cfg.lua.dist || die
-}
-
-src_configure() {
- local myeconfargs=(
- --add-cflags="${CFLAGS}"
- --add-ldflags="${LDFLAGS}"
- --c-compiler="$(tc-getCC)"
- --datadir="${EPREFIX}/var/spool/jabber"
- --idn-library="$(usex idn 'idn' 'icu')"
- --libdir="${EPREFIX}/usr/$(get_libdir)"
- --linker="$(tc-getCC)"
- --lua-version="$(usex lua_single_target_luajit '5.1' $(ver_cut 1-2 $(lua_get_version)))"
- --no-example-certs
- --ostype="linux"
- --prefix="${EPREFIX}/usr"
- --runwith="${ELUA}"
- --sysconfdir="${EPREFIX}/etc/jabber"
- --with-lua-include="${EPREFIX}/$(lua_get_include_dir)"
- --with-lua-lib="${EPREFIX}/$(lua_get_cmod_dir)"
- )
-
- # Since the configure script is handcrafted,
- # and yells at unknown options, do not use 'econf'.
- ./configure "${myeconfargs[@]}" || die
-
- rm makefile || die
- mv GNUmakefile Makefile || die
-}
-
-src_install() {
- default
-
- keepdir /var/spool/jabber
-
- newinitd "${FILESDIR}"/prosody.initd-r5 prosody
- systemd_newunit "${FILESDIR}"/prosody.service-r2 prosody.service
-
- newtmpfiles "${FILESDIR}"/prosody.tmpfilesd-r1 prosody.conf
-}
-
-pkg_postinst() {
- tmpfiles_process prosody.conf
-}
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: net-im/prosody/, net-im/prosody/files/
@ 2022-03-19 18:24 Conrad Kostecki
0 siblings, 0 replies; 6+ messages in thread
From: Conrad Kostecki @ 2022-03-19 18:24 UTC (permalink / raw
To: gentoo-commits
commit: 02dd94ab9cf21d6516187fdfeee4e54bba86561b
Author: Conrad Kostecki <conikost <AT> gentoo <DOT> org>
AuthorDate: Sat Mar 19 17:57:54 2022 +0000
Commit: Conrad Kostecki <conikost <AT> gentoo <DOT> org>
CommitDate: Sat Mar 19 18:24:11 2022 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=02dd94ab
net-im/prosody: add 0.12.0
This is a new major release, which brings lua5-4 support, but also
migrates away from jabber-base by providing it's own user and group
among new unified pathes for prosody.
Additionally, current data is being copy-migrated to new locations.
Signed-off-by: Conrad Kostecki <conikost <AT> gentoo.org>
net-im/prosody/Manifest | 1 +
net-im/prosody/files/prosody-0.12.0-gentoo.patch | 29 ++++
net-im/prosody/files/prosody.initd-r6 | 46 +++++++
net-im/prosody/files/prosody.service-r3 | 17 +++
net-im/prosody/files/prosody.tmpfilesd-r2 | 1 +
net-im/prosody/prosody-0.12.0.ebuild | 164 +++++++++++++++++++++++
6 files changed, 258 insertions(+)
diff --git a/net-im/prosody/Manifest b/net-im/prosody/Manifest
index ec1e363a1b2c..6fde68aca00c 100644
--- a/net-im/prosody/Manifest
+++ b/net-im/prosody/Manifest
@@ -1 +1,2 @@
DIST prosody-0.11.13.tar.gz 439816 BLAKE2B 8ace9001fe93d6349c744d17c7bccbf18c8704615cea856efcadd2de54430a64241cf7930345163e7bb6067aa4731da15dde4fc7f3ddb868b0680facc5368230 SHA512 7616785536b7b51767a26963a80c961ef2403609e1e78dda3f88cf68c00d5bb899278c70a22b006b58c36c62cbb1bbd390a9298bad5b8d6524928a1cd5457813
+DIST prosody-0.12.0.tar.gz 610330 BLAKE2B 14694ee95dc6eb6d053278a9d7718fd7487fe7ef862b4e2ee0d57f2b60cdeb22d1c74eac4a4df7447ea3e9ff57fb3734a9c9997f2767ed3aa04682f265b82185 SHA512 b7144a413a5bc72b1e677504d5ced6583c7399c8334b39b4c9157da60f951300832b34a1d47703a0b217caa4f1d3a0f52ab59cef08b27c6b43e876e1dffca3ce
diff --git a/net-im/prosody/files/prosody-0.12.0-gentoo.patch b/net-im/prosody/files/prosody-0.12.0-gentoo.patch
new file mode 100644
index 000000000000..3b2ba75b15c8
--- /dev/null
+++ b/net-im/prosody/files/prosody-0.12.0-gentoo.patch
@@ -0,0 +1,29 @@
+--- a/prosody.cfg.lua.dist
++++ b/prosody.cfg.lua.dist
+@@ -17,6 +17,15 @@
+ -- Settings in this section apply to the whole server and are the default settings
+ -- for any virtual hosts
+
++-- Prosody will use this user and group for launching the service.
++-- Gentoo uses by default prosody:prosody (uid:gid) for all Jabber related services.
++prosody_user = "prosody"
++prosody_group = "prosody"
++
++-- Prosody will create this pid file after it has been successfully started.
++-- Please don't change that path, as it's being used by the Gentoo init scripts.
++pidfile = "/run/prosody/prosody.pid"
++
+ -- This is a (by default, empty) list of accounts that are admins
+ -- for the server. Note that you must create the accounts separately
+ -- (see https://prosody.im/doc/creating_accounts for info)
+@@ -26,7 +35,9 @@
+ -- This option allows you to specify additional locations where Prosody
+ -- will search first for modules. For additional modules you can install, see
+ -- the community module repository at https://modules.prosody.im/
+---plugin_paths = {}
++-- The default included path is for the optional net-im/prosody-modules package,
++-- which provides additional community maintained modules.
++plugin_paths = { "/usr/GENTOO_LIBDIR/prosody/modules", "/usr/GENTOO_LIBDIR/prosody/community-modules" };
+
+ -- This is the list of modules Prosody will load on startup.
+ -- Documentation for bundled modules can be found at: https://prosody.im/doc/modules
diff --git a/net-im/prosody/files/prosody.initd-r6 b/net-im/prosody/files/prosody.initd-r6
new file mode 100644
index 000000000000..e4138c597b23
--- /dev/null
+++ b/net-im/prosody/files/prosody.initd-r6
@@ -0,0 +1,46 @@
+#!/sbin/openrc-run
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+extra_started_commands="reload"
+name="Prosody XMPP server"
+prosody_config="/etc/prosody/prosody.cfg.lua"
+prosody_data="/var/lib/prosody"
+prosody_logs="/var/log/prosody"
+prosody_pid="/run/prosody"
+pidfile="${prosody_pid}/prosody.pid"
+
+command="/usr/bin/prosody"
+command_args="--daemonize"
+commandctl="/usr/bin/prosodyctl"
+command_group="prosody"
+command_user="prosody"
+
+checkconfig() {
+ if [ ! -f "${prosody_config}" ]; then
+ eerror "Please create ${prosody_config} before starting Prosody!"
+ return 1
+ fi
+
+ ${commandctl} check config
+ return $?
+}
+
+depend() {
+ need net
+ use dns postgresql
+}
+
+reload() {
+ ebegin "Reloading configuration"
+ start-stop-daemon --signal HUP --pidfile "${pidfile}"
+ eend $?
+}
+
+start_pre() {
+ checkconfig || return 1
+
+ checkpath -d -m 0750 -o "${command_user}:${command_group}" -q "${prosody_data}"
+ checkpath -d -m 0750 -o "${command_user}:${command_group}" -q "${prosody_logs}"
+ checkpath -d -m 0750 -o "${command_user}:${command_group}" -q "${prosody_pid}"
+}
diff --git a/net-im/prosody/files/prosody.service-r3 b/net-im/prosody/files/prosody.service-r3
new file mode 100644
index 000000000000..dec39e4b0b22
--- /dev/null
+++ b/net-im/prosody/files/prosody.service-r3
@@ -0,0 +1,17 @@
+[Unit]
+Description=Prosody XMPP server
+After=network.target
+
+[Service]
+Group=prosody
+PIDFile=/run/prosody/prosody.pid
+ExecStart=/usr/bin/prosody --daemonize
+ExecReload=/bin/kill -HUP $MAINPID
+User=prosody
+ExecStartPre=!/bin/mkdir -p /var/log/prosody
+ExecStartPre=!/bin/mkdir -p /var/lib/prosody
+ExecStartPre=!/bin/chown -R prosody /var/log/prosody
+ExecStartPre=!/bin/chown -R prosody /var/lib/prosody
+
+[Install]
+WantedBy=multi-user.target
diff --git a/net-im/prosody/files/prosody.tmpfilesd-r2 b/net-im/prosody/files/prosody.tmpfilesd-r2
new file mode 100644
index 000000000000..78949f3db82c
--- /dev/null
+++ b/net-im/prosody/files/prosody.tmpfilesd-r2
@@ -0,0 +1 @@
+d /run/prosody 750 prosody prosody - -
diff --git a/net-im/prosody/prosody-0.12.0.ebuild b/net-im/prosody/prosody-0.12.0.ebuild
new file mode 100644
index 000000000000..e9cab9fb7d64
--- /dev/null
+++ b/net-im/prosody/prosody-0.12.0.ebuild
@@ -0,0 +1,164 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+LUA_COMPAT=( lua5-{1..4} luajit )
+LUA_REQ_USE="deprecated(+)"
+
+inherit lua-single systemd tmpfiles toolchain-funcs
+
+DESCRIPTION="Prosody is a modern XMPP communication server"
+HOMEPAGE="https://prosody.im/"
+SRC_URI="https://prosody.im/downloads/source/${P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~x86"
+IUSE="icu +idn +libevent ldap mysql postgres selinux +sqlite +ssl test +zlib"
+REQUIRED_USE="
+ ^^ ( icu idn )
+ ${LUA_REQUIRED_USE}
+"
+RESTRICT="!test? ( test )"
+
+DEPEND="
+ acct-group/prosody
+ acct-user/prosody
+ $(lua_gen_cond_dep 'dev-lua/luaexpat[${LUA_USEDEP}]')
+ $(lua_gen_cond_dep 'dev-lua/luafilesystem[${LUA_USEDEP}]')
+ dev-lua/luarocks[${LUA_SINGLE_USEDEP}]
+ $(lua_gen_cond_dep 'dev-lua/luasocket[${LUA_USEDEP}]')
+ $(lua_gen_cond_dep 'dev-lua/lua-unbound[${LUA_USEDEP}]')
+ $(lua_gen_cond_dep 'dev-lua/readline[${LUA_USEDEP}]')
+ icu? ( dev-libs/icu:= )
+ idn? ( net-dns/libidn:= )
+ ldap? ( $(lua_gen_cond_dep 'dev-lua/lualdap[${LUA_USEDEP}]') )
+ libevent? ( $(lua_gen_cond_dep 'dev-lua/luaevent[${LUA_USEDEP}]') )
+ dev-libs/openssl:0=
+ lua_single_target_lua5-1? ( $(lua_gen_cond_dep 'dev-lua/lua-bit32[lua_targets_lua5-1(-)]') )
+ mysql? ( $(lua_gen_cond_dep 'dev-lua/luadbi[mysql,${LUA_USEDEP}]') )
+ postgres? ( $(lua_gen_cond_dep 'dev-lua/luadbi[postgres,${LUA_USEDEP}]') )
+ sqlite? ( $(lua_gen_cond_dep 'dev-lua/luadbi[sqlite,${LUA_USEDEP}]') )
+ ssl? ( $(lua_gen_cond_dep 'dev-lua/luasec[${LUA_USEDEP}]') )
+ zlib? ( $(lua_gen_cond_dep 'dev-lua/lua-zlib[${LUA_USEDEP}]') )
+ ${LUA_DEPS}
+"
+
+RDEPEND="
+ ${DEPEND}
+ selinux? ( sec-policy/selinux-jabber )
+"
+
+BDEPEND="
+ virtual/pkgconfig
+ test? ( $(lua_gen_cond_dep 'dev-lua/busted[${LUA_USEDEP}]') )
+"
+
+PATCHES=( "${FILESDIR}/${PN}-0.12.0-gentoo.patch" )
+
+src_prepare() {
+ default
+
+ # Set correct plugin path for optional net-im/prosody-modules package
+ sed -e "s/GENTOO_LIBDIR/$(get_libdir)/g" -i prosody.cfg.lua.dist || die
+}
+
+src_configure() {
+ local myeconfargs=(
+ --add-cflags="${CFLAGS}"
+ --add-ldflags="${LDFLAGS}"
+ --c-compiler="$(tc-getCC)"
+ --datadir="${EPREFIX}/var/lib/prosody"
+ --idn-library="$(usex idn 'idn' 'icu')"
+ --libdir="${EPREFIX}/usr/$(get_libdir)"
+ --linker="$(tc-getCC)"
+ --lua-version="$(usex lua_single_target_luajit '5.1' $(ver_cut 1-2 $(lua_get_version)))"
+ --no-example-certs
+ --ostype="linux"
+ --prefix="${EPREFIX}/usr"
+ --runwith="${ELUA}"
+ --sysconfdir="${EPREFIX}/etc/prosody"
+ --with-lua-include="${EPREFIX}/$(lua_get_include_dir)"
+ --with-lua-lib="${EPREFIX}/$(lua_get_cmod_dir)"
+ )
+
+ # Since the configure script is handcrafted,
+ # and yells at unknown options, do not use 'econf'.
+ ./configure "${myeconfargs[@]}" || die
+
+ rm makefile || die
+ mv GNUmakefile Makefile || die
+}
+
+src_install() {
+ default
+
+ keepdir /var/lib/prosody
+
+ newinitd "${FILESDIR}"/prosody.initd-r6 prosody
+ systemd_newunit "${FILESDIR}"/prosody.service-r3 prosody.service
+
+ newtmpfiles "${FILESDIR}"/prosody.tmpfilesd-r2 prosody.conf
+}
+
+pkg_postinst() {
+ local migrate_to_prosody_user="false"
+ tmpfiles_process prosody.conf
+
+ if [[ ${REPLACING_VERSIONS} ]]; then
+ for v in ${REPLACING_VERSIONS}; do
+ if ver_test "${v}" -lt 0.12.0; then
+ migrate_to_prosody_user="true"
+ break
+ fi
+ done
+ fi
+
+ # Sarting with >=0.12.0, the prosody configuration is now in
+ # /etc/prosody and no longer in /etc/jabber.
+ # See if we need to migrate the configuration. Furthermore,
+ # prosody 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_prosody_user}; then
+ local -A dirs_to_migrate=(
+ [/etc/jabber]=/etc/prosody
+ [/var/log/jabber]=/var/log/prosody
+ [/var/spool/jabber]=/var/lib/prosody
+ )
+
+ 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 prosody:prosody "${eroot_dst_dir}" || die
+ fi
+ done
+
+ # Update configuration file to match new pathes and permissions
+ local mysedargs=(
+ -e "'s#/etc/jabber#/etc/prosody#g'"
+ -e "'s#/run/jabber#/run/prosody#g'"
+ -e "'s#/var/log/jabber#/var/log/prosody#g'"
+ -e "'s/prosody_user.*/prosody_user = \"prosody\";/g'"
+ -e "'s/prosody_group.*/prosody_group = \"prosody\";/g'"
+ -i /etc/prosody/prosody.cfg.lua
+ )
+
+ eval sed "${mysedargs[@]}" || die
+
+ ewarn "Newer versions of the prosody (Gentoo) package use ${EROOT}/etc/prosody"
+ ewarn "(just as upstream) and *not* anymore ${EROOT}/etc/jabber."
+ ewarn "The files from ${EROOT}/etc/jabber where copied to ${EROOT}/etc/prosody."
+ ewarn "Also prosody's spool directory became ${EROOT}/var/lib/prosody (was ${EROOT}/var/spool/jabbber)."
+ ewarn "Please check your configuration."
+ fi
+}
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: net-im/prosody/, net-im/prosody/files/
@ 2020-10-10 15:57 Conrad Kostecki
0 siblings, 0 replies; 6+ messages in thread
From: Conrad Kostecki @ 2020-10-10 15:57 UTC (permalink / raw
To: gentoo-commits
commit: b157445544afceac7905ee55300b3b02735523e1
Author: Conrad Kostecki <conikost <AT> gentoo <DOT> org>
AuthorDate: Sat Oct 10 15:57:13 2020 +0000
Commit: Conrad Kostecki <conikost <AT> gentoo <DOT> org>
CommitDate: Sat Oct 10 15:57:24 2020 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b1574455
net-im/prosody: drop old version
Package-Manager: Portage-3.0.8, Repoman-3.0.1
Signed-off-by: Conrad Kostecki <conikost <AT> gentoo.org>
net-im/prosody/files/prosody.initd-r3 | 46 --------------------
net-im/prosody/prosody-0.11.7.ebuild | 79 -----------------------------------
2 files changed, 125 deletions(-)
diff --git a/net-im/prosody/files/prosody.initd-r3 b/net-im/prosody/files/prosody.initd-r3
deleted file mode 100644
index 3126cc8e1e2..00000000000
--- a/net-im/prosody/files/prosody.initd-r3
+++ /dev/null
@@ -1,46 +0,0 @@
-#!/sbin/openrc-run
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-description="Prosody is a server for Jabber/XMPP written in Lua."
-description_reload="Reload configuration and reopen log files."
-extra_started_commands="reload"
-pidfile="/var/run/jabber/prosody.pid"
-
-depend() {
- need net
- provide jabber-server
- use dns postgresql
-}
-
-checkconfig() {
- if [ ! -e /etc/jabber/prosody.cfg.lua ] ; then
- eerror "You need a /etc/jabber/prosody.cfg.lua file to run prosody"
- return 1
- fi
- luac -p /etc/jabber/prosody.cfg.lua
- return $?
-}
-
-start() {
- checkconfig || return 1
- checkpath -q -d -m 0770 -o jabber:jabber "$(dirname ${pidfile})"
- checkpath -q -f -m 0770 -o jabber:jabber "${pidfile}"
- checkpath -q -d -m 0750 -o jabber:jabber /var/log/jabber
- ebegin "Starting Prosody XMPP Server"
- prosodyctl start
- eend $?
-}
-
-stop() {
- ebegin "Stopping Prosody XMPP Server"
- prosodyctl stop
- eend $?
-}
-
-reload() {
- checkconfig || return 1
- ebegin "Reloading configuration of Prosody XMPP Server"
- prosodyctl reload
- eend $?
-}
diff --git a/net-im/prosody/prosody-0.11.7.ebuild b/net-im/prosody/prosody-0.11.7.ebuild
deleted file mode 100644
index 041e5c27e52..00000000000
--- a/net-im/prosody/prosody-0.11.7.ebuild
+++ /dev/null
@@ -1,79 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-inherit systemd toolchain-funcs
-
-DESCRIPTION="Prosody is a flexible communications server for Jabber/XMPP written in Lua"
-HOMEPAGE="https://prosody.im/"
-SRC_URI="https://prosody.im/downloads/source/${P}.tar.gz"
-
-LICENSE="MIT"
-SLOT="0"
-KEYWORDS="~amd64 ~arm ~x86"
-IUSE="libevent libressl luajit mysql postgres sqlite ssl test zlib"
-RESTRICT="!test? ( test )"
-
-COMMON_DEPEND="
- dev-lua/LuaBitOp
- net-dns/libidn
- net-im/jabber-base
- libressl? ( dev-libs/libressl:= )
- !libressl? ( dev-libs/openssl:0= )
- luajit? ( dev-lang/luajit:2 )
- !luajit? ( dev-lang/lua:0 )
-"
-
-DEPEND="
- ${COMMON_DEPEND}
- test? ( dev-lua/busted )
-"
-
-RDEPEND="
- ${COMMON_DEPEND}
- ~dev-lua/luaexpat-1.3.0
- dev-lua/luafilesystem
- dev-lua/luasocket
- libevent? ( dev-lua/luaevent )
- mysql? ( dev-lua/luadbi[mysql] )
- postgres? ( dev-lua/luadbi[postgres] )
- sqlite? ( dev-lua/luadbi[sqlite] )
- ssl? ( dev-lua/luasec )
- zlib? ( dev-lua/lua-zlib )
-"
-
-PATCHES=( "${FILESDIR}/${PN}-0.11.2-r1-gentoo.patch" )
-
-src_configure() {
- local myeconfargs=(
- --c-compiler="$(tc-getCC)"
- --datadir="${EPREFIX}/var/spool/jabber"
- --libdir="${EPREFIX}/usr/$(get_libdir)"
- --linker="$(tc-getCC)"
- --ostype="linux"
- --prefix="${EPREFIX}/usr"
- --runwith="$(usex luajit luajit lua)"
- --sysconfdir="${EPREFIX}/etc/jabber"
- --with-lua-include="${EPREFIX}/usr/include"
- --with-lua-lib="${EPREFIX}/usr/$(get_libdir)/lua"
- )
-
- # Since the configure script is handcrafted,
- # and yells at unknown options, do not use 'econf'.
- ./configure ${myeconfargs[@]} --cflags="${CFLAGS} -Wall -fPIC" --ldflags="${LDFLAGS} -shared" || die
-
- rm makefile || die
- mv GNUmakefile Makefile || die
-}
-
-src_install() {
- emake DESTDIR="${D}" install
-
- keepdir /var/spool/jabber
-
- newinitd "${FILESDIR}"/prosody.initd-r3 prosody
-
- systemd_dounit "${FILESDIR}"/prosody.service
- systemd_newtmpfilesd "${FILESDIR}"/prosody.tmpfilesd prosody.conf
-}
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: net-im/prosody/, net-im/prosody/files/
@ 2019-03-19 14:23 Tobias Klausmann
0 siblings, 0 replies; 6+ messages in thread
From: Tobias Klausmann @ 2019-03-19 14:23 UTC (permalink / raw
To: gentoo-commits
commit: ddcbbd13eb5e2ef77e733a67a05cedd03ab313cf
Author: Tobias Klausmann <klausman <AT> gentoo <DOT> org>
AuthorDate: Tue Mar 19 14:23:14 2019 +0000
Commit: Tobias Klausmann <klausman <AT> gentoo <DOT> org>
CommitDate: Tue Mar 19 14:23:34 2019 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ddcbbd13
net-im/prosody: Patch default config
This makes sure the default config uses the right user/group
(jabber:jabber) and PID file.
Fixes: https://bugs.gentoo.org/497104
Package-Manager: Portage-2.3.62, Repoman-2.3.12
Signed-off-by: Tobias Klausmann <klausman <AT> gentoo.org>
net-im/prosody/files/prosody_cfg-0.11.2-r1.patch | 16 +++++
net-im/prosody/prosody-0.11.2-r1.ebuild | 87 ++++++++++++++++++++++++
2 files changed, 103 insertions(+)
diff --git a/net-im/prosody/files/prosody_cfg-0.11.2-r1.patch b/net-im/prosody/files/prosody_cfg-0.11.2-r1.patch
new file mode 100644
index 00000000000..94423a834ae
--- /dev/null
+++ b/net-im/prosody/files/prosody_cfg-0.11.2-r1.patch
@@ -0,0 +1,16 @@
+--- a/prosody.cfg.lua.dist 2019-03-19 15:11:16.355743969 +0100
++++ b/prosody.cfg.lua.dist 2019-03-19 15:14:42.810995725 +0100
+@@ -32,6 +32,13 @@
+ -- will look for modules first. For community modules, see https://modules.prosody.im/
+ --plugin_paths = {}
+
++-- Gentoo uses the jabber:jabber uid/gid for all Jabber-related services
++prosody_user = "jabber"
++prosody_group = "jabber"
++
++-- Make sure prosodyctl checks in the right spot for the PID file
++pidfile = "/run/jabber/prosody.pid"
++
+ -- This is the list of modules Prosody will load on startup.
+ -- It looks for mod_modulename.lua in the plugins folder, so make sure that exists too.
+ -- Documentation for bundled modules can be found at: https://prosody.im/doc/modules
diff --git a/net-im/prosody/prosody-0.11.2-r1.ebuild b/net-im/prosody/prosody-0.11.2-r1.ebuild
new file mode 100644
index 00000000000..9fd8dbddef8
--- /dev/null
+++ b/net-im/prosody/prosody-0.11.2-r1.ebuild
@@ -0,0 +1,87 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit flag-o-matic multilib systemd
+
+MY_PV=$(ver_rs 3 '')
+MY_P="${PN}-${MY_PV}"
+DESCRIPTION="Prosody is a flexible communications server for Jabber/XMPP written in Lua"
+HOMEPAGE="https://prosody.im/"
+SRC_URI="https://prosody.im/tmp/${MY_PV}/${MY_P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~x86"
+IUSE="ipv6 libevent mysql postgres sqlite ssl zlib jit libressl test"
+
+BASE_DEPEND="net-im/jabber-base
+ dev-lua/LuaBitOp
+ !jit? ( >=dev-lang/lua-5.1:0 )
+ jit? ( dev-lang/luajit:2 )
+ >=net-dns/libidn-1.1:=
+ !libressl? ( dev-libs/openssl:0 ) libressl? ( dev-libs/libressl:= )"
+
+DEPEND="${BASE_DEPEND}
+ test? ( dev-lua/busted )"
+
+RDEPEND="${BASE_DEPEND}
+ >=dev-lua/luaexpat-1.3.0
+ dev-lua/luafilesystem
+ ipv6? ( >=dev-lua/luasocket-3 )
+ !ipv6? ( dev-lua/luasocket )
+ libevent? ( >=dev-lua/luaevent-0.4.3 )
+ mysql? ( dev-lua/luadbi[mysql] )
+ postgres? ( dev-lua/luadbi[postgres] )
+ sqlite? ( dev-lua/luadbi[sqlite] )
+ ssl? ( dev-lua/luasec )
+ zlib? ( dev-lua/lua-zlib )"
+
+S=${WORKDIR}/${MY_P}
+
+JABBER_ETC="/etc/jabber"
+JABBER_SPOOL="/var/spool/jabber"
+
+src_prepare() {
+ default
+ rm makefile && mv GNUmakefile Makefile || die
+ sed -i -e "s!MODULES = \$(DESTDIR)\$(PREFIX)/lib/!MODULES = \$(DESTDIR)\$(PREFIX)/$(get_libdir)/!"\
+ -e "s!SOURCE = \$(DESTDIR)\$(PREFIX)/lib/!SOURCE = \$(DESTDIR)\$(PREFIX)/$(get_libdir)/!"\
+ -e "s!INSTALLEDSOURCE = \$(PREFIX)/lib/!INSTALLEDSOURCE = \$(PREFIX)/$(get_libdir)/!"\
+ -e "s!INSTALLEDMODULES = \$(PREFIX)/lib/!INSTALLEDMODULES = \$(PREFIX)/$(get_libdir)/!"\
+ Makefile || die
+ eapply "${FILESDIR}/prosody_cfg-0.11.2-r1.patch"
+}
+
+src_configure() {
+ # the configure script is handcrafted (and yells at unknown options)
+ # hence do not use 'econf'
+ append-cflags -D_GNU_SOURCE
+ ./configure \
+ --ostype=linux \
+ --prefix="${EPREFIX}/usr" \
+ --libdir="${EPREFIX}/usr/$(get_libdir)" \
+ --sysconfdir="${EPREFIX}/${JABBER_ETC}" \
+ --datadir="${EPREFIX}/${JABBER_SPOOL}" \
+ --with-lua-include="${EPREFIX}/usr/include" \
+ --with-lua-lib="${EPREFIX}/usr/$(get_libdir)/lua" \
+ --runwith=lua"$(usev jit)" \
+ --cflags="${CFLAGS} -Wall -fPIC" \
+ --ldflags="${LDFLAGS} -shared" \
+ --c-compiler="$(tc-getCC)" \
+ --linker="$(tc-getCC)" || die "configure failed"
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+ systemd_dounit "${FILESDIR}/${PN}".service
+ systemd_newtmpfilesd "${FILESDIR}/${PN}".tmpfilesd "${PN}".conf
+ newinitd "${FILESDIR}/${PN}".initd-r2 ${PN}
+ keepdir "${JABBER_SPOOL}"
+}
+
+pkg_postinst() {
+ elog "If you are using the MySQL backend, you need to update its schema:"
+ elog "https://prosody.im/doc/release/0.11.0#upgrade_notes"
+}
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: net-im/prosody/, net-im/prosody/files/
@ 2017-10-06 12:18 Tobias Klausmann
0 siblings, 0 replies; 6+ messages in thread
From: Tobias Klausmann @ 2017-10-06 12:18 UTC (permalink / raw
To: gentoo-commits
commit: 165ff535c69347376f84cd0590b7fc852f02674e
Author: Tobias Klausmann <klausman <AT> gentoo <DOT> org>
AuthorDate: Fri Oct 6 12:17:19 2017 +0000
Commit: Tobias Klausmann <klausman <AT> gentoo <DOT> org>
CommitDate: Fri Oct 6 12:18:33 2017 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=165ff535
net-im/prosody: Add version v0.10.0
While upstream says it should work with Lua 5.2, they recommend not
using it for production. Also, there are other Gentoo packages that
don't like Lua 5.2, so let's keep prosody 5.1-only for now.
net-im/prosody/Manifest | 1 +
net-im/prosody/files/prosody-0.10.0-cfg.lua.patch | 41 +++++++++++
net-im/prosody/metadata.xml | 1 +
net-im/prosody/prosody-0.10.0.ebuild | 83 +++++++++++++++++++++++
4 files changed, 126 insertions(+)
diff --git a/net-im/prosody/Manifest b/net-im/prosody/Manifest
index d9060b24ee4..008f299e1ea 100644
--- a/net-im/prosody/Manifest
+++ b/net-im/prosody/Manifest
@@ -1,3 +1,4 @@
+DIST prosody-0.10.0.tar.gz 330461 SHA256 7414e447256c60b2645578c4a5913113cd74b419ca5a032b54db90d98a978498 SHA512 ee66e240afba6a8cb286623da48d9b535798153fb65e32070cec93aafe360e91f7087eeb49dec0f7d145e24f04339ed0878e50835b52f682130b204e22990ce9 WHIRLPOOL 87236bbf3419b7de89eb8aa7471960eccb5e514ab8dfb256fad2d30865278ba437dcfc4f80f6e856c733a9cbf002af9b4d71b198afc8709d8343fca10caa983e
DIST prosody-0.9.10.tar.gz 267380 SHA256 4836eefed4d9bbb632cba24ac5bd8e9bc7c029a79d06084b00ffc70858d1662f SHA512 4453fb596704b6a248a52dedc00cfc77edbee1fad502f1197b04c2148092389a294c152c3ba36203f51831d51ee2b915c15382ac86fcff4f35696ecacf926574 WHIRLPOOL 9312a0bfc856b723d02cd5a92fd4d93e3cf1f4335263d6d5d8bb8c6f44bda7b0e038cc9ad5fbdc5ea0e5623bf11b695a65b02ee4ad5134c713c05e5f4502a96c
DIST prosody-0.9.11.tar.gz 267832 SHA256 32bff4c323747f768c61b5c9a23790126d33258e96d4e589920b4c3d88b67256 SHA512 9de11e130f88d1f9a830a4cd9ad90c0176d97977c81fd7a4405ce735f12d23eaa0bb0f124ce406102c2d072247133bddf371256d696e806cac9ef4bf0821684f WHIRLPOOL 5970e61130e231d980f0d3c80ce98269b888a62da3e15ab82ed1530eece7c5af3a1726b626f3fb2dc33faeff8776bbaffb5fb2e0cd6f886c181e90cc972b5343
DIST prosody-0.9.12.tar.gz 267869 SHA256 1a59a322b71928a21985522aa00d0eab3552208d7bf9ecb318542a1b2fee3e8d SHA512 e87b5f3b3e327722cec9d8d0470684e2ec2788a1c5ae623c4f505a00572ef21f65afe84cd5b7de47d6a65fe8872506fe34e5e8886e20979ff84710669857ca76 WHIRLPOOL 81355f1c77e8cf5537b44f5d472e44be0c906118f26476a5614252a31b23120f995e70ef1766ec4c9ae9a1bba5f24c876ad6a59e0496723533c6bacda00eb393
diff --git a/net-im/prosody/files/prosody-0.10.0-cfg.lua.patch b/net-im/prosody/files/prosody-0.10.0-cfg.lua.patch
new file mode 100644
index 00000000000..d0600ac6d67
--- /dev/null
+++ b/net-im/prosody/files/prosody-0.10.0-cfg.lua.patch
@@ -0,0 +1,41 @@
+--- prosody-0.10.0/prosody.cfg.lua.dist 2017-10-05 11:27:20.852452270 +0200
++++ prosody-0.10.0-gentoo/prosody.cfg.lua.dist 2017-10-05 11:29:07.151997654 +0200
+@@ -1,5 +1,3 @@
+--- Prosody Example Configuration File
+---
+ -- Information on configuring Prosody can be found on our
+ -- website at https://prosody.im/doc/configure
+ --
+@@ -9,8 +7,6 @@
+ -- If there are any errors, it will let you know what and where
+ -- they are, otherwise it will keep quiet.
+ --
+--- The only thing left to do is rename this file to remove the .dist ending, and fill in the
+--- blanks. Good luck, and happy Jabbering!
+
+
+ ---------- Server-wide settings ----------
+@@ -80,6 +76,12 @@
+ --"proxy65"; -- Enables a file transfer proxy service which clients behind NAT can use
+ }
+
++-- Settings for Gentoo init script and net-im/jabber-base permissions system:
++daemonize = true;
++prosody_user = "jabber";
++prosody_group = "jabber";
++pidfile = "/var/run/jabber/prosody.pid";
++
+ -- These modules are auto-loaded, but should you want
+ -- to disable them then uncomment them here:
+ modules_disabled = {
+@@ -161,8 +163,8 @@
+ -- Logging configuration
+ -- For advanced logging see https://prosody.im/doc/logging
+ log = {
+- info = "prosody.log"; -- Change 'info' to 'debug' for verbose logging
+- error = "prosody.err";
++ info = "/var/log/jabber/prosody.log"; -- Change 'info' to 'debug' for verbose logging
++ error = "/var/log/jabber/prosody.err";
+ -- "*syslog"; -- Uncomment this for logging to syslog
+ -- "*console"; -- Log to the console, useful for debugging with daemonize=false
+ }
diff --git a/net-im/prosody/metadata.xml b/net-im/prosody/metadata.xml
index fa12c884dda..faabc3d40f1 100644
--- a/net-im/prosody/metadata.xml
+++ b/net-im/prosody/metadata.xml
@@ -14,5 +14,6 @@
<flag name="libevent">Use libevent for event handling</flag>
<flag name="zlib">Support for compressing XMPP streams with mod_compression</flag>
<flag name="jit">Use LuaJIT instead of vanilla Lua</flag>
+ <flag name="websocket">Add websocket support</flag>
</use>
</pkgmetadata>
diff --git a/net-im/prosody/prosody-0.10.0.ebuild b/net-im/prosody/prosody-0.10.0.ebuild
new file mode 100644
index 00000000000..d701c6edb15
--- /dev/null
+++ b/net-im/prosody/prosody-0.10.0.ebuild
@@ -0,0 +1,83 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit flag-o-matic multilib systemd versionator
+
+MY_PV=$(replace_version_separator 3 '')
+MY_P="${PN}-${MY_PV}"
+DESCRIPTION="Prosody is a flexible communications server for Jabber/XMPP written in Lua"
+HOMEPAGE="http://prosody.im/"
+SRC_URI="http://prosody.im/tmp/${MY_PV}/${MY_P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~x86"
+IUSE="ipv6 libevent mysql postgres sqlite ssl zlib jit libressl websocket"
+
+DEPEND="net-im/jabber-base
+ websocket? ( dev-lua/LuaBitOp )
+ !jit? ( >=dev-lang/lua-5.1:0 )
+ jit? ( dev-lang/luajit:2 )
+ >=net-dns/libidn-1.1
+ !libressl? ( dev-libs/openssl:0 ) libressl? ( dev-libs/libressl:= )"
+RDEPEND="${DEPEND}
+ >=dev-lua/luaexpat-1.3.0
+ dev-lua/luafilesystem
+ ipv6? ( >=dev-lua/luasocket-3 )
+ !ipv6? ( dev-lua/luasocket )
+ libevent? ( >=dev-lua/luaevent-0.4.3 )
+ mysql? ( dev-lua/luadbi[mysql] )
+ postgres? ( dev-lua/luadbi[postgres] )
+ sqlite? ( dev-lua/luadbi[sqlite] )
+ ssl? ( dev-lua/luasec )
+ zlib? ( dev-lua/lua-zlib )"
+
+S=${WORKDIR}/${MY_P}
+
+JABBER_ETC="/etc/jabber"
+JABBER_SPOOL="/var/spool/jabber"
+
+src_prepare() {
+ epatch "${FILESDIR}/${PN}-0.10.0-cfg.lua.patch"
+ sed -i -e "s!MODULES = \$(DESTDIR)\$(PREFIX)/lib/!MODULES = \$(DESTDIR)\$(PREFIX)/$(get_libdir)/!"\
+ -e "s!SOURCE = \$(DESTDIR)\$(PREFIX)/lib/!SOURCE = \$(DESTDIR)\$(PREFIX)/$(get_libdir)/!"\
+ -e "s!INSTALLEDSOURCE = \$(PREFIX)/lib/!INSTALLEDSOURCE = \$(PREFIX)/$(get_libdir)/!"\
+ -e "s!INSTALLEDMODULES = \$(PREFIX)/lib/!INSTALLEDMODULES = \$(PREFIX)/$(get_libdir)/!"\
+ Makefile || die
+}
+
+src_configure() {
+ # the configure script is handcrafted (and yells at unknown options)
+ # hence do not use 'econf'
+ append-cflags -D_GNU_SOURCE
+ luajit=""
+ if use jit; then
+ luajit="--runwith=luajit"
+ fi
+ ./configure \
+ --ostype=linux $luajit \
+ --prefix="${EPREFIX}/usr" \
+ --libdir="${EPREFIX}/usr/lib64" \
+ --sysconfdir="${JABBER_ETC}" \
+ --datadir="${JABBER_SPOOL}" \
+ --with-lua-include=/usr/include \
+ --with-lua-lib=/usr/$(get_libdir)/lua \
+ --cflags="${CFLAGS} -Wall -fPIC" \
+ --ldflags="${LDFLAGS} -shared" \
+ --c-compiler="$(tc-getCC)" \
+ --linker="$(tc-getCC)" || die "configure failed"
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+ systemd_dounit "${FILESDIR}/${PN}".service
+ systemd_newtmpfilesd "${FILESDIR}/${PN}".tmpfilesd "${PN}".conf
+ newinitd "${FILESDIR}/${PN}".initd-r2 ${PN}
+}
+
+src_test() {
+ cd tests || die
+ ./run_tests.sh || die
+}
^ permalink raw reply related [flat|nested] 6+ messages in thread
end of thread, other threads:[~2022-04-23 21:24 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-10-03 13:43 [gentoo-commits] repo/gentoo:master commit in: net-im/prosody/, net-im/prosody/files/ Conrad Kostecki
-- strict thread matches above, loose matches on Subject: below --
2022-04-23 21:24 Conrad Kostecki
2022-03-19 18:24 Conrad Kostecki
2020-10-10 15:57 Conrad Kostecki
2019-03-19 14:23 Tobias Klausmann
2017-10-06 12:18 Tobias Klausmann
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox