From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 8308C138334 for ; Fri, 9 Nov 2018 23:39:52 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 6C7E8E0A63; Fri, 9 Nov 2018 23:39:51 +0000 (UTC) Received: from smtp.gentoo.org (dev.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 27AACE0A63 for ; Fri, 9 Nov 2018 23:39:51 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 84FDA335CA6 for ; Fri, 9 Nov 2018 23:39:49 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 0374A44D for ; Fri, 9 Nov 2018 23:39:48 +0000 (UTC) From: "Anthony G. Basile" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Anthony G. Basile" Message-ID: <1541806578.92ff0b36f464520c6645157c259b4aaea28e9c5c.blueness@gentoo> Subject: [gentoo-commits] proj/musl:master commit in: net-im/prosody/, net-im/prosody/files/ X-VCS-Repository: proj/musl X-VCS-Files: net-im/prosody/Manifest net-im/prosody/files/prosody-0.10.0-cfg.lua.patch net-im/prosody/files/prosody.initd-r2 net-im/prosody/files/prosody.service net-im/prosody/files/prosody.tmpfilesd net-im/prosody/prosody-0.10.2-r1.ebuild X-VCS-Directories: net-im/prosody/ net-im/prosody/files/ X-VCS-Committer: blueness X-VCS-Committer-Name: Anthony G. Basile X-VCS-Revision: 92ff0b36f464520c6645157c259b4aaea28e9c5c X-VCS-Branch: master Date: Fri, 9 Nov 2018 23:39:48 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 99ae5a39-938f-4527-a370-b4df5c1cc332 X-Archives-Hash: 73ef96e6de7306174b7ab946d6da14af commit: 92ff0b36f464520c6645157c259b4aaea28e9c5c Author: xdch47 posteo de> AuthorDate: Fri Nov 9 21:48:06 2018 +0000 Commit: Anthony G. Basile gentoo org> CommitDate: Fri Nov 9 23:36:18 2018 +0000 URL: https://gitweb.gentoo.org/proj/musl.git/commit/?id=92ff0b36 net-im/prosody: no mallinfo for musl Package-Manager: Portage-2.3.49, Repoman-2.3.11 RepoMan-Options: --force Signed-off-by: Anthony G. Basile gentoo.org> net-im/prosody/Manifest | 1 + net-im/prosody/files/prosody-0.10.0-cfg.lua.patch | 41 ++++++++++++ net-im/prosody/files/prosody.initd-r2 | 46 +++++++++++++ net-im/prosody/files/prosody.service | 13 ++++ net-im/prosody/files/prosody.tmpfilesd | 1 + net-im/prosody/prosody-0.10.2-r1.ebuild | 80 +++++++++++++++++++++++ 6 files changed, 182 insertions(+) diff --git a/net-im/prosody/Manifest b/net-im/prosody/Manifest new file mode 100644 index 0000000..cd376ef --- /dev/null +++ b/net-im/prosody/Manifest @@ -0,0 +1 @@ +DIST prosody-0.10.2.tar.gz 331874 BLAKE2B 0e0af95a9168810263e6f60b825393d1088f69dba1faabf6c0c9dda3ef6b039a92f7edb9643cb9a60a3131a64038de5c3598f7076837b58ad196ac03fa98bfc4 SHA512 9fc05e34b45b0c16835ba94a73532fb3b4ee335f27d56bb9260e1b3e22614f89f44eb5d04b4e90d016db0b5bee6f5c7e7d099e1defb027e6823ee7667c1fe28f 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 0000000..d0600ac --- /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/files/prosody.initd-r2 b/net-im/prosody/files/prosody.initd-r2 new file mode 100644 index 0000000..78d056e --- /dev/null +++ b/net-im/prosody/files/prosody.initd-r2 @@ -0,0 +1,46 @@ +#!/sbin/openrc-run +# Copyright 1999-2018 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() { + use dns + need net + provide jabber-server +} + +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/files/prosody.service b/net-im/prosody/files/prosody.service new file mode 100644 index 0000000..5c5ea87 --- /dev/null +++ b/net-im/prosody/files/prosody.service @@ -0,0 +1,13 @@ +[Unit] +Description=Prosody XMPP (Jabber) server +After=network.target + +[Service] +Type=forking +PIDFile=/var/run/jabber/prosody.pid +ExecStart=/usr/bin/prosodyctl start +ExecReload=/usr/bin/prosodyctl reload +ExecStop=/usr/bin/prosodyctl stop + +[Install] +WantedBy=multi-user.target diff --git a/net-im/prosody/files/prosody.tmpfilesd b/net-im/prosody/files/prosody.tmpfilesd new file mode 100644 index 0000000..924ba43 --- /dev/null +++ b/net-im/prosody/files/prosody.tmpfilesd @@ -0,0 +1 @@ +d /var/run/jabber 710 jabber jabber diff --git a/net-im/prosody/prosody-0.10.2-r1.ebuild b/net-im/prosody/prosody-0.10.2-r1.ebuild new file mode 100644 index 0000000..1089355 --- /dev/null +++ b/net-im/prosody/prosody-0.10.2-r1.ebuild @@ -0,0 +1,80 @@ +# Copyright 1999-2018 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit flag-o-matic systemd + +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="ipv6 libevent mysql postgres sqlite ssl zlib jit libressl" + +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:= )" +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 )" + +JABBER_ETC="${EPREFIX}/etc/jabber" +JABBER_SPOOL="${EPREFIX}/var/spool/jabber" + +src_prepare() { + eapply "${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 + default +} + +src_configure() { + # the configure script is handcrafted (and yells at unknown options) + # hence do not use 'econf' + append-cflags -D_GNU_SOURCE + use elibc_musl && append-cflags -DWITHOUT_MALLINFO + ./configure \ + --ostype=linux \ + --prefix="${EPREFIX}/usr" \ + --libdir="${EPREFIX}/usr/$(get_libdir)" \ + --sysconfdir="${JABBER_ETC}" \ + --datadir="${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}" +} + +src_test() { + cd tests || die + ./run_tests.sh || die +} +