prosody-0.5.1, communications server for Jabber/XMPP written in Lua

This commit is contained in:
jolan 2009-09-06 18:40:57 +00:00
parent 90f4fa4634
commit 318dcc03ef
10 changed files with 266 additions and 0 deletions

46
net/prosody/Makefile Normal file
View File

@ -0,0 +1,46 @@
# $OpenBSD: Makefile,v 1.1.1.1 2009/09/06 18:40:57 jolan Exp $
SHARED_ONLY= Yes
COMMENT= communications server for Jabber/XMPP written in Lua
DISTNAME= prosody-0.5.1
CATEGORIES= net
MASTER_SITES= http://prosody.im/downloads/source/
HOMEPAGE= http://prosody.im/
MAINTAINER= Jolan Luff <jolan@openbsd.org>
# MIT
PERMIT_DISTFILES_CDROM= Yes
PERMIT_DISTFILES_FTP= Yes
PERMIT_PACKAGE_CDROM= Yes
PERMIT_PACKAGE_FTP= Yes
USE_GMAKE= Yes
MODULES= lang/lua
LIB_DEPENDS= idn::devel/libidn \
lua::lang/lua
RUN_DEPENDS+= ::devel/luaposix \
::textproc/luaexpat
WANTLIB+= crypto
CONFIGURE_STYLE=simple
CONFIGURE_ARGS+=--prefix="${PREFIX}" \
--sysconfdir="${SYSCONFDIR}/prosody" \
--datadir="/var/prosody" \
--with-lua="${LOCALBASE}" \
--c-compiler="${CC}" \
--linker="${CC}" \
--cflags="${CFLAGS} -fPIC"
FAKE_FLAGS+= CONFIG=${DESTDIR}${PREFIX}/share/examples/prosody
post-install:
${INSTALL_DATA_DIR} ${PREFIX}/share/doc/prosody
@sed -e s#_SYSCONFDIR_#${SYSCONFDIR}#g ${FILESDIR}/README.OpenBSD > \
${WRKBUILD}/README.OpenBSD
${INSTALL_DATA} ${WRKBUILD}/README.OpenBSD ${WRKSRC}/README \
${PREFIX}/share/doc/prosody
.include <bsd.port.mk>

5
net/prosody/distinfo Normal file
View File

@ -0,0 +1,5 @@
MD5 (prosody-0.5.1.tar.gz) = XXlzuh6i/Uxs/ZJP3E3dhQ==
RMD160 (prosody-0.5.1.tar.gz) = AD6JH9YAwxloNYmGUD1+aI3QyJ0=
SHA1 (prosody-0.5.1.tar.gz) = hoVgxSkgC2MLeqXJrTASJf6HWKA=
SHA256 (prosody-0.5.1.tar.gz) = q69OkNRzCQwSdiaeZJ2b/DiHLI0x/MUh+dWX+Hrl9E4=
SIZE (prosody-0.5.1.tar.gz) = 135584

View File

@ -0,0 +1,20 @@
Using Prosody in an OpenBSD environment
1) Prosody documentation is available online at:
http://prosody.im/doc/configure
Use this information to edit:
_SYSCONFDIR_/prosody/prosody.cfg.lua
to your liking.
2) Prosody has been modified to use privilege dropping. As such, you
will need to initially start prosody as root:
# /usr/local/sbin/prosody
And likewise for using the prosodyctl command:
# /usr/local/sbin/prosodyctl adduser me@my.domain

View File

@ -0,0 +1,18 @@
$OpenBSD: patch-Makefile,v 1.1.1.1 2009/09/06 18:40:57 jolan Exp $
--- Makefile.orig Wed Jul 29 12:54:54 2009
+++ Makefile Sun Sep 6 12:06:00 2009
@@ -1,12 +1,12 @@
include config.unix
-BIN = $(DESTDIR)$(PREFIX)/bin
+BIN = $(DESTDIR)$(PREFIX)/sbin
CONFIG = $(DESTDIR)$(SYSCONFDIR)
MODULES = $(DESTDIR)$(PREFIX)/lib/prosody/modules
SOURCE = $(DESTDIR)$(PREFIX)/lib/prosody
DATA = $(DESTDIR)$(DATADIR)
-MAN = $(DESTDIR)$(PREFIX)/share/man
+MAN = $(DESTDIR)$(PREFIX)/man
INSTALLEDSOURCE = $(PREFIX)/lib/prosody
INSTALLEDCONFIG = $(SYSCONFDIR)

View File

@ -0,0 +1,23 @@
$OpenBSD: patch-prosody,v 1.1.1.1 2009/09/06 18:40:57 jolan Exp $
--- prosody.orig Wed Jul 29 12:54:55 2009
+++ prosody Sun Sep 6 11:28:57 2009
@@ -7,6 +7,19 @@
-- COPYING file in the source package for more information.
--
+require("posix")
+
+user = posix.getpasswd()
+if user.uid ~= 0 then
+ io.stderr:write("prosody must be started as root to drop privileges\n")
+ os.exit(1)
+end
+
+posix.setpid("U", "638")
+posix.setpid("u", "638")
+posix.setpid("G", "638")
+posix.setpid("g", "638")
+
-- Will be modified by configure script if run --
CFG_SOURCEDIR=os.getenv("PROSODY_SRCDIR");

View File

@ -0,0 +1,23 @@
$OpenBSD: patch-prosodyctl,v 1.1.1.1 2009/09/06 18:40:57 jolan Exp $
--- prosodyctl.orig Wed Jul 29 12:54:55 2009
+++ prosodyctl Sun Sep 6 11:30:04 2009
@@ -9,6 +9,19 @@
-- prosodyctl - command-line controller for Prosody XMPP server
+require("posix")
+
+user = posix.getpasswd()
+if user.uid ~= 0 then
+ io.stderr:write("prosodyctl must be started as root to drop privileges\n")
+ os.exit(1)
+end
+
+posix.setpid("U", "638")
+posix.setpid("u", "638")
+posix.setpid("G", "638")
+posix.setpid("g", "638")
+
-- Will be modified by configure script if run --
CFG_SOURCEDIR=nil;

4
net/prosody/pkg/DESCR Normal file
View File

@ -0,0 +1,4 @@
Prosody is a flexible communications server for Jabber/XMPP written in
Lua. It aims to be easy to use, and light on resources. For developers
it aims to be easy to extend and give a flexible system on which to
rapidly develop added functionality, or prototype new protocols.

4
net/prosody/pkg/MESSAGE Normal file
View File

@ -0,0 +1,4 @@
You may find instructions on how to install and setup prosody by
reading:
${PREFIX}/share/doc/prosody/README.OpenBSD

View File

@ -0,0 +1,5 @@
@comment $OpenBSD: PFRAG.shared,v 1.1.1.1 2009/09/06 18:40:57 jolan Exp $
lib/prosody/util/encodings.so
lib/prosody/util/hashes.so
lib/prosody/util/pposix.so
lib/prosody/util/signal.so

118
net/prosody/pkg/PLIST Normal file
View File

@ -0,0 +1,118 @@
@comment $OpenBSD: PLIST,v 1.1.1.1 2009/09/06 18:40:57 jolan Exp $
@newgroup _prosody:638
@newuser _prosody:638:_prosody:daemon:prosody user:/nonexistent:/sbin/nologin
%%SHARED%%
lib/prosody/
lib/prosody/core/
lib/prosody/core/actions.lua
lib/prosody/core/componentmanager.lua
lib/prosody/core/configmanager.lua
lib/prosody/core/discomanager.lua
lib/prosody/core/eventmanager.lua
lib/prosody/core/hostmanager.lua
lib/prosody/core/loggingmanager.lua
lib/prosody/core/modulemanager.lua
lib/prosody/core/objectmanager.lua
lib/prosody/core/offlinemanager.lua
lib/prosody/core/rostermanager.lua
lib/prosody/core/s2smanager.lua
lib/prosody/core/sessionmanager.lua
lib/prosody/core/stanza_router.lua
lib/prosody/core/usermanager.lua
lib/prosody/core/xmlhandlers.lua
lib/prosody/fallbacks/
lib/prosody/fallbacks/bit.lua
lib/prosody/modules/
lib/prosody/modules/mod_actions_http.lua
lib/prosody/modules/mod_announce.lua
lib/prosody/modules/mod_bosh.lua
lib/prosody/modules/mod_component.lua
lib/prosody/modules/mod_console.lua
lib/prosody/modules/mod_debug.lua
lib/prosody/modules/mod_dialback.lua
lib/prosody/modules/mod_disco.lua
lib/prosody/modules/mod_groups.lua
lib/prosody/modules/mod_httpserver.lua
lib/prosody/modules/mod_iq.lua
lib/prosody/modules/mod_legacyauth.lua
lib/prosody/modules/mod_message.lua
lib/prosody/modules/mod_muc.lua
lib/prosody/modules/mod_offline.lua
lib/prosody/modules/mod_pep.lua
lib/prosody/modules/mod_ping.lua
lib/prosody/modules/mod_posix.lua
lib/prosody/modules/mod_presence.lua
lib/prosody/modules/mod_privacy.lua
lib/prosody/modules/mod_private.lua
lib/prosody/modules/mod_register.lua
lib/prosody/modules/mod_roster.lua
lib/prosody/modules/mod_saslauth.lua
lib/prosody/modules/mod_selftests.lua
lib/prosody/modules/mod_time.lua
lib/prosody/modules/mod_tls.lua
lib/prosody/modules/mod_uptime.lua
lib/prosody/modules/mod_vcard.lua
lib/prosody/modules/mod_version.lua
lib/prosody/modules/mod_watchregistrations.lua
lib/prosody/modules/mod_welcome.lua
lib/prosody/modules/mod_xmlrpc.lua
lib/prosody/net/
lib/prosody/net/adns.lua
lib/prosody/net/connlisteners.lua
lib/prosody/net/dns.lua
lib/prosody/net/http.lua
lib/prosody/net/httpclient_listener.lua
lib/prosody/net/httpserver.lua
lib/prosody/net/httpserver_listener.lua
lib/prosody/net/server.lua
lib/prosody/net/xmppclient_listener.lua
lib/prosody/net/xmppcomponent_listener.lua
lib/prosody/net/xmppserver_listener.lua
lib/prosody/prosody.version
lib/prosody/util/
lib/prosody/util/array.lua
lib/prosody/util/dataforms.lua
lib/prosody/util/datamanager.lua
lib/prosody/util/datetime.lua
lib/prosody/util/dependencies.lua
lib/prosody/util/discohelper.lua
lib/prosody/util/events.lua
lib/prosody/util/hmac.lua
lib/prosody/util/import.lua
lib/prosody/util/iterators.lua
lib/prosody/util/jid.lua
lib/prosody/util/logger.lua
lib/prosody/util/muc.lua
lib/prosody/util/multitable.lua
lib/prosody/util/pluginloader.lua
lib/prosody/util/prosodyctl.lua
lib/prosody/util/pubsub.lua
lib/prosody/util/sasl.lua
lib/prosody/util/serialization.lua
lib/prosody/util/set.lua
lib/prosody/util/stanza.lua
lib/prosody/util/termcolours.lua
lib/prosody/util/timer.lua
lib/prosody/util/uuid.lua
lib/prosody/util/xmlrpc.lua
lib/prosody/util/ztact.lua
@man man/man1/prosodyctl.1
sbin/prosody
sbin/prosodyctl
share/doc/prosody/
share/doc/prosody/README
share/doc/prosody/README.OpenBSD
share/examples/prosody/
@sample ${SYSCONFDIR}/prosody/
share/examples/prosody/certs/
@sample ${SYSCONFDIR}/prosody/certs/
share/examples/prosody/certs/localhost.cert
@sample ${SYSCONFDIR}/prosody/certs/localhost.cert
share/examples/prosody/certs/localhost.key
@sample ${SYSCONFDIR}/prosody/certs/localhost.key
share/examples/prosody/prosody.cfg.lua
@sample ${SYSCONFDIR}/prosody/prosody.cfg.lua
@mode 770
@owner _prosody
@group _prosody
@sample /var/prosody/