pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

prosody: add hg / trunk version



Module Name:	pkgsrc-wip
Committed By:	Thomas Merkel <tm%core.io@localhost>
Pushed By:	drscream
Date:		Mon Feb 5 13:42:51 2024 +0100
Changeset:	d6892ff244a18cfa76f78aa6dc1f4bc34450176e

Added Files:
	prosody/DESCR
	prosody/Makefile
	prosody/PLIST
	prosody/distinfo
	prosody/files/prosody.sh
	prosody/files/smf/manifest.xml
	prosody/patches/patch-makefile
	prosody/patches/patch-prosody.cfg.lua.dist
	prosody/patches/patch-util-src_crypto.c
	prosody/patches/patch-util-src_makefile
	prosody/patches/patch-util-src_pposix.c

Log Message:
prosody: add hg / trunk version

Add trunk version from prosody to test features and test additional
patches to support more operating systems.

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=d6892ff244a18cfa76f78aa6dc1f4bc34450176e

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 prosody/DESCR                              |   6 +
 prosody/Makefile                           |  93 ++++++++++
 prosody/PLIST                              | 272 +++++++++++++++++++++++++++++
 prosody/distinfo                           |   7 +
 prosody/files/prosody.sh                   |  35 ++++
 prosody/files/smf/manifest.xml             |  29 +++
 prosody/patches/patch-makefile             |  35 ++++
 prosody/patches/patch-prosody.cfg.lua.dist |  28 +++
 prosody/patches/patch-util-src_crypto.c    |  14 ++
 prosody/patches/patch-util-src_makefile    |  15 ++
 prosody/patches/patch-util-src_pposix.c    |  49 ++++++
 11 files changed, 583 insertions(+)

diffs:
diff --git a/prosody/DESCR b/prosody/DESCR
new file mode 100644
index 0000000000..3d2e77ed6b
--- /dev/null
+++ b/prosody/DESCR
@@ -0,0 +1,6 @@
+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.
+
+List of supported XEPs: https://prosody.im/doc/xeplist
diff --git a/prosody/Makefile b/prosody/Makefile
new file mode 100644
index 0000000000..d456f68cbe
--- /dev/null
+++ b/prosody/Makefile
@@ -0,0 +1,93 @@
+# $NetBSD: Makefile,v 1.47 2023/11/08 13:18:17 wiz Exp $
+
+DISTNAME=		prosody
+CATEGORIES=		chat
+MASTER_SITES=		https://prosody.im/downloads/source/
+
+MAINTAINER=		pkgsrc-users%NetBSD.org@localhost
+HOMEPAGE=		https://prosody.im/
+COMMENT=		Flexible communications server for Jabber/XMPP written in Lua
+LICENSE=		mit
+
+HG_REPO=	https://hg.prosody.im/trunk/
+HG_TAG=		f34b33cb1383
+
+DEPENDS+=		${LUA_PKGPREFIX}-expat>=1.2:../../textproc/lua-expat
+DEPENDS+=		${LUA_PKGPREFIX}-filesystem>=1.6.2:../../devel/lua-filesystem
+DEPENDS+=		${LUA_PKGPREFIX}-sec>=0.3.3:../../security/lua-sec
+DEPENDS+=		${LUA_PKGPREFIX}-socket>=2.0:../../net/lua-socket
+DEPENDS+=		${LUA_PKGPREFIX}-unbound-[0-9]*:../../net/lua-unbound
+DEPENDS+=		${LUA_PKGPREFIX}-posix-[0-9]*:../../devel/lua-posix
+
+HAS_CONFIGURE=		yes
+USE_LANGUAGES=		c
+BUILD_DEFS+=		VARBASE
+
+LUA_VERSIONS_ACCEPTED=	54 52 51
+
+.include "../../mk/bsd.prefs.mk"
+
+PROSODY_USER?=		prosody
+PROSODY_GROUP?=		${PROSODY_USER}
+PROSODY_DATA?=		${VARBASE}/db/prosody
+PROSODY_LOG?=		${VARBASE}/log/prosody
+PROSODY_RUN?=		${VARBASE}/run/prosody
+
+OWN_DIRS_PERMS+=	${PROSODY_DATA} ${PROSODY_USER} ${PROSODY_GROUP} 0750
+OWN_DIRS_PERMS+=	${PROSODY_LOG} ${PROSODY_USER} ${PROSODY_GROUP} 0750
+OWN_DIRS_PERMS+=	${PROSODY_RUN} ${PROSODY_USER} ${PROSODY_GROUP} 0750
+MAKE_DIRS+=		${PKG_SYSCONFDIR}/certs
+
+PKG_USERS_VARS=			PROSODY_USER
+PKG_GROUPS_VARS=		PROSODY_GROUP
+PKG_GROUPS=			${PROSODY_GROUP}
+PKG_USERS=			${PROSODY_USER}:${PROSODY_GROUP}
+PKG_GECOS.${PROSODY_USER}=	Prosody daemon user
+PKG_SHELL.${PROSODY_USER}=	${NOLOGIN}
+
+PKG_SYSCONFSUBDIR=	${PKGBASE}
+EGDIR=			${PREFIX}/share/examples/${PKGBASE}
+CONF_FILES+=		${EGDIR}/prosody.cfg.lua ${PKG_SYSCONFDIR}/prosody.cfg.lua
+CONF_FILES+=		${EGDIR}/certs/localhost.cnf ${PKG_SYSCONFDIR}/certs/localhost.cnf
+
+REPLACE_LUA+=		prosody prosodyctl
+
+SUBST_CLASSES+=		path
+SUBST_MESSAGE.path=	Fixing default paths
+SUBST_STAGE.path=	pre-configure
+SUBST_FILES.path=	makefile prosody.cfg.lua.dist
+SUBST_SED.path=		-e 's,$$(CONFIG),$${DESTDIR}${EGDIR},g'
+SUBST_VARS.path=	EGDIR PROSODY_DATA PROSODY_LOG PROSODY_RUN
+
+CONFIGURE_ARGS+=	--cflags=${CFLAGS:Q}
+CONFIGURE_ARGS+=	--datadir=${PROSODY_DATA}
+CONFIGURE_ARGS+=	--ldflags=${LDFLAGS:Q}
+CONFIGURE_ARGS+=	--no-example-certs
+CONFIGURE_ARGS+=	--prefix=${PREFIX}
+CONFIGURE_ARGS+=	--sysconfdir=${PKG_SYSCONFDIR}
+CONFIGURE_ARGS+=	--with-lua-include=${PREFIX}/${LUA_INCDIR}
+
+CFLAGS+=		-fPIC -Wall -DLUA_COMPAT_MODULE
+CFLAGS.SunOS+=		-D__EXTENSIONS__
+LDFLAGS+=		-L${PREFIX}/lib ${COMPILER_RPATH_FLAG}${PREFIX}/lib -shared
+LDFLAGS.SunOS+=		-lsocket -lnsl -lssl -lmalloc
+MAKE_FILE=		makefile
+
+RCD_SCRIPTS=		prosody
+FILES_SUBST+=		PROSODY_RUN=${PROSODY_RUN}
+FILES_SUBST+=		PROSODY_USER=${PROSODY_USER}
+FILES_SUBST+=		PROSODY_GROUP=${PROSODY_GROUP}
+
+TEST_TARGET=		test
+
+pre-configure:
+	${ECHO} ${HG_TAG} > ${WRKSRC}/prosody.release
+
+.include "../../lang/lua/application.mk"
+.include "../../lang/lua/tool.mk"
+.include "../../devel/libidn/buildlink3.mk"
+.include "../../lang/lua/buildlink3.mk"
+.include "../../security/openssl/buildlink3.mk"
+.include "../../textproc/icu/buildlink3.mk"
+.include "../../wip/mk/hg-package.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/prosody/PLIST b/prosody/PLIST
new file mode 100644
index 0000000000..19e70f5995
--- /dev/null
+++ b/prosody/PLIST
@@ -0,0 +1,272 @@
+@comment $NetBSD$
+bin/prosody
+bin/prosodyctl
+lib/prosody/core/certmanager.lua
+lib/prosody/core/configmanager.lua
+lib/prosody/core/features.lua
+lib/prosody/core/hostmanager.lua
+lib/prosody/core/loggingmanager.lua
+lib/prosody/core/moduleapi.lua
+lib/prosody/core/modulemanager.lua
+lib/prosody/core/portmanager.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/statsmanager.lua
+lib/prosody/core/storagemanager.lua
+lib/prosody/core/usermanager.lua
+lib/prosody/loader.lua
+lib/prosody/modules/adhoc/adhoc.lib.lua
+lib/prosody/modules/adhoc/mod_adhoc.lua
+lib/prosody/modules/mod_admin_adhoc.lua
+lib/prosody/modules/mod_admin_shell.lua
+lib/prosody/modules/mod_admin_socket.lua
+lib/prosody/modules/mod_admin_telnet.lua
+lib/prosody/modules/mod_announce.lua
+lib/prosody/modules/mod_auth_anonymous.lua
+lib/prosody/modules/mod_auth_insecure.lua
+lib/prosody/modules/mod_auth_internal_hashed.lua
+lib/prosody/modules/mod_auth_internal_plain.lua
+lib/prosody/modules/mod_auth_ldap.lua
+lib/prosody/modules/mod_authz_internal.lua
+lib/prosody/modules/mod_blocklist.lua
+lib/prosody/modules/mod_bookmarks.lua
+lib/prosody/modules/mod_bosh.lua
+lib/prosody/modules/mod_c2s.lua
+lib/prosody/modules/mod_carbons.lua
+lib/prosody/modules/mod_component.lua
+lib/prosody/modules/mod_cron.lua
+lib/prosody/modules/mod_csi.lua
+lib/prosody/modules/mod_csi_simple.lua
+lib/prosody/modules/mod_debug_reset.lua
+lib/prosody/modules/mod_debug_sql.lua
+lib/prosody/modules/mod_debug_stanzas/watcher.lib.lua
+lib/prosody/modules/mod_dialback.lua
+lib/prosody/modules/mod_disco.lua
+lib/prosody/modules/mod_external_services.lua
+lib/prosody/modules/mod_groups.lua
+lib/prosody/modules/mod_http.lua
+lib/prosody/modules/mod_http_errors.lua
+lib/prosody/modules/mod_http_file_share.lua
+lib/prosody/modules/mod_http_files.lua
+lib/prosody/modules/mod_http_openmetrics.lua
+lib/prosody/modules/mod_invites.lua
+lib/prosody/modules/mod_invites_adhoc.lua
+lib/prosody/modules/mod_invites_register.lua
+lib/prosody/modules/mod_iq.lua
+lib/prosody/modules/mod_lastactivity.lua
+lib/prosody/modules/mod_legacyauth.lua
+lib/prosody/modules/mod_limits.lua
+lib/prosody/modules/mod_mam/mamprefs.lib.lua
+lib/prosody/modules/mod_mam/mamprefsxml.lib.lua
+lib/prosody/modules/mod_mam/mod_mam.lua
+lib/prosody/modules/mod_message.lua
+lib/prosody/modules/mod_mimicking.lua
+lib/prosody/modules/mod_motd.lua
+lib/prosody/modules/mod_muc_mam.lua
+lib/prosody/modules/mod_muc_unique.lua
+lib/prosody/modules/mod_net_multiplex.lua
+lib/prosody/modules/mod_offline.lua
+lib/prosody/modules/mod_pep.lua
+lib/prosody/modules/mod_pep_plus.lua
+lib/prosody/modules/mod_pep_simple.lua
+lib/prosody/modules/mod_ping.lua
+lib/prosody/modules/mod_posix.lua
+lib/prosody/modules/mod_presence.lua
+lib/prosody/modules/mod_private.lua
+lib/prosody/modules/mod_proxy65.lua
+lib/prosody/modules/mod_pubsub/mod_pubsub.lua
+lib/prosody/modules/mod_pubsub/pubsub.lib.lua
+lib/prosody/modules/mod_register.lua
+lib/prosody/modules/mod_register_ibr.lua
+lib/prosody/modules/mod_register_limits.lua
+lib/prosody/modules/mod_roster.lua
+lib/prosody/modules/mod_s2s.lua
+lib/prosody/modules/mod_s2s_auth_certs.lua
+lib/prosody/modules/mod_s2s_auth_dane_in.lua
+lib/prosody/modules/mod_s2s_bidi.lua
+lib/prosody/modules/mod_saslauth.lua
+lib/prosody/modules/mod_scansion_record.lua
+lib/prosody/modules/mod_server_contact_info.lua
+lib/prosody/modules/mod_smacks.lua
+lib/prosody/modules/mod_stanza_debug.lua
+lib/prosody/modules/mod_storage_internal.lua
+lib/prosody/modules/mod_storage_memory.lua
+lib/prosody/modules/mod_storage_none.lua
+lib/prosody/modules/mod_storage_sql.lua
+lib/prosody/modules/mod_storage_xep0227.lua
+lib/prosody/modules/mod_time.lua
+lib/prosody/modules/mod_tls.lua
+lib/prosody/modules/mod_tokenauth.lua
+lib/prosody/modules/mod_tombstones.lua
+lib/prosody/modules/mod_turn_external.lua
+lib/prosody/modules/mod_unknown.lua
+lib/prosody/modules/mod_uptime.lua
+lib/prosody/modules/mod_user_account_management.lua
+lib/prosody/modules/mod_vcard.lua
+lib/prosody/modules/mod_vcard4.lua
+lib/prosody/modules/mod_vcard_legacy.lua
+lib/prosody/modules/mod_version.lua
+lib/prosody/modules/mod_watchregistrations.lua
+lib/prosody/modules/mod_websocket.lua
+lib/prosody/modules/mod_welcome.lua
+lib/prosody/modules/mod_windows.lua
+lib/prosody/modules/muc/config_form_sections.lib.lua
+lib/prosody/modules/muc/description.lib.lua
+lib/prosody/modules/muc/hats.lib.lua
+lib/prosody/modules/muc/hidden.lib.lua
+lib/prosody/modules/muc/history.lib.lua
+lib/prosody/modules/muc/language.lib.lua
+lib/prosody/modules/muc/lock.lib.lua
+lib/prosody/modules/muc/members_only.lib.lua
+lib/prosody/modules/muc/mod_muc.lua
+lib/prosody/modules/muc/moderated.lib.lua
+lib/prosody/modules/muc/muc.lib.lua
+lib/prosody/modules/muc/name.lib.lua
+lib/prosody/modules/muc/occupant.lib.lua
+lib/prosody/modules/muc/occupant_id.lib.lua
+lib/prosody/modules/muc/password.lib.lua
+lib/prosody/modules/muc/persistent.lib.lua
+lib/prosody/modules/muc/presence_broadcast.lib.lua
+lib/prosody/modules/muc/register.lib.lua
+lib/prosody/modules/muc/request.lib.lua
+lib/prosody/modules/muc/subject.lib.lua
+lib/prosody/modules/muc/util.lib.lua
+lib/prosody/modules/muc/whois.lib.lua
+lib/prosody/net/adns.lua
+lib/prosody/net/connect.lua
+lib/prosody/net/cqueues.lua
+lib/prosody/net/dns.lua
+lib/prosody/net/http.lua
+lib/prosody/net/http/codes.lua
+lib/prosody/net/http/errors.lua
+lib/prosody/net/http/files.lua
+lib/prosody/net/http/parser.lua
+lib/prosody/net/http/server.lua
+lib/prosody/net/httpserver.lua
+lib/prosody/net/resolvers/basic.lua
+lib/prosody/net/resolvers/chain.lua
+lib/prosody/net/resolvers/manual.lua
+lib/prosody/net/resolvers/service.lua
+lib/prosody/net/server.lua
+lib/prosody/net/server_epoll.lua
+lib/prosody/net/server_event.lua
+lib/prosody/net/server_select.lua
+lib/prosody/net/stun.lua
+lib/prosody/net/tls_luasec.lua
+lib/prosody/net/unbound.lua
+lib/prosody/net/websocket.lua
+lib/prosody/net/websocket/frames.lua
+lib/prosody/prosody.version
+lib/prosody/util/adhoc.lua
+lib/prosody/util/adminstream.lua
+lib/prosody/util/argparse.lua
+lib/prosody/util/array.lua
+lib/prosody/util/async.lua
+lib/prosody/util/bit53.lua
+lib/prosody/util/bitcompat.lua
+lib/prosody/util/cache.lua
+lib/prosody/util/caps.lua
+lib/prosody/util/compat.so
+lib/prosody/util/crypto.so
+lib/prosody/util/dataforms.lua
+lib/prosody/util/datamanager.lua
+lib/prosody/util/datamapper.lua
+lib/prosody/util/datetime.lua
+lib/prosody/util/dbuffer.lua
+lib/prosody/util/debug.lua
+lib/prosody/util/dependencies.lua
+lib/prosody/util/dns.lua
+lib/prosody/util/dnsregistry.lua
+lib/prosody/util/encodings.so
+lib/prosody/util/envload.lua
+lib/prosody/util/error.lua
+lib/prosody/util/events.lua
+lib/prosody/util/filters.lua
+lib/prosody/util/format.lua
+lib/prosody/util/fsm.lua
+lib/prosody/util/gc.lua
+lib/prosody/util/hashes.so
+lib/prosody/util/hashring.lua
+lib/prosody/util/helpers.lua
+lib/prosody/util/hex.lua
+lib/prosody/util/hmac.lua
+lib/prosody/util/http.lua
+lib/prosody/util/human/io.lua
+lib/prosody/util/human/units.lua
+lib/prosody/util/id.lua
+lib/prosody/util/import.lua
+lib/prosody/util/indexedbheap.lua
+lib/prosody/util/interpolation.lua
+lib/prosody/util/ip.lua
+lib/prosody/util/iterators.lua
+lib/prosody/util/jid.lua
+lib/prosody/util/json.lua
+lib/prosody/util/jsonpointer.lua
+lib/prosody/util/jsonschema.lua
+lib/prosody/util/jwt.lua
+lib/prosody/util/logger.lua
+lib/prosody/util/mathcompat.lua
+lib/prosody/util/mercurial.lua
+lib/prosody/util/multitable.lua
+lib/prosody/util/net.so
+lib/prosody/util/openmetrics.lua
+lib/prosody/util/openssl.lua
+lib/prosody/util/paseto.lua
+lib/prosody/util/paths.lua
+lib/prosody/util/pluginloader.lua
+lib/prosody/util/poll.so
+lib/prosody/util/pposix.so
+lib/prosody/util/presence.lua
+lib/prosody/util/promise.lua
+lib/prosody/util/prosodyctl.lua
+lib/prosody/util/prosodyctl/cert.lua
+lib/prosody/util/prosodyctl/check.lua
+lib/prosody/util/prosodyctl/shell.lua
+lib/prosody/util/pubsub.lua
+lib/prosody/util/queue.lua
+lib/prosody/util/random.lua
+lib/prosody/util/rfc6724.lua
+lib/prosody/util/ringbuffer.so
+lib/prosody/util/roles.lua
+lib/prosody/util/rsm.lua
+lib/prosody/util/sasl.lua
+lib/prosody/util/sasl/anonymous.lua
+lib/prosody/util/sasl/external.lua
+lib/prosody/util/sasl/oauthbearer.lua
+lib/prosody/util/sasl/plain.lua
+lib/prosody/util/sasl/scram.lua
+lib/prosody/util/serialization.lua
+lib/prosody/util/session.lua
+lib/prosody/util/set.lua
+lib/prosody/util/signal.so
+lib/prosody/util/smqueue.lua
+lib/prosody/util/sql.lua
+lib/prosody/util/sqlite3.lua
+lib/prosody/util/sslconfig.lua
+lib/prosody/util/stanza.lua
+lib/prosody/util/startup.lua
+lib/prosody/util/statistics.lua
+lib/prosody/util/statsd.lua
+lib/prosody/util/strbitop.so
+lib/prosody/util/struct.so
+lib/prosody/util/table.so
+lib/prosody/util/template.lua
+lib/prosody/util/termcolours.lua
+lib/prosody/util/throttle.lua
+lib/prosody/util/time.so
+lib/prosody/util/timer.lua
+lib/prosody/util/uuid.lua
+lib/prosody/util/watchdog.lua
+lib/prosody/util/x509.lua
+lib/prosody/util/xml.lua
+lib/prosody/util/xmppstream.lua
+lib/prosody/util/xpcall.lua
+lib/prosody/util/xtemplate.lua
+man/man1/prosodyctl.1
+share/examples/prosody-hg/certs/GNUmakefile
+share/examples/prosody-hg/certs/localhost.cnf
+share/examples/prosody-hg/certs/makefile
+share/examples/prosody-hg/certs/openssl.cnf
+share/examples/prosody-hg/prosody.cfg.lua
diff --git a/prosody/distinfo b/prosody/distinfo
new file mode 100644
index 0000000000..3edeaad74b
--- /dev/null
+++ b/prosody/distinfo
@@ -0,0 +1,7 @@
+$NetBSD$
+
+SHA1 (patch-makefile) = 8971d0a898ca7bf38f0d79322e2d0c381334c37c
+SHA1 (patch-prosody.cfg.lua.dist) = a1e4636abe4f2caa82d13ed8564b5b785dc8595a
+SHA1 (patch-util-src_crypto.c) = c4ec55329d2b73e86c9fd5d2d710679a298170bf
+SHA1 (patch-util-src_makefile) = 769516300e4ad966aedb09a2ce9e92e887a2dace
+SHA1 (patch-util-src_pposix.c) = a43388153f301d2507a936312e0ebf7da067a438
diff --git a/prosody/files/prosody.sh b/prosody/files/prosody.sh
new file mode 100644
index 0000000000..b3cc0206ac
--- /dev/null
+++ b/prosody/files/prosody.sh
@@ -0,0 +1,35 @@
+#!@RCD_SCRIPTS_SHELL@
+#
+# $NetBSD: prosody.sh,v 1.6 2022/07/27 01:53:40 khorben Exp $
+#
+# PROVIDE: prosody
+# REQUIRE: DAEMON
+
+if [ -f @SYSCONFBASE@/rc.subr ]; then
+  . @SYSCONFBASE@/rc.subr
+fi
+
+name="prosody"
+rcvar=${name}
+ctl_command="@PREFIX@/bin/${name}ctl"
+required_files="@PKG_SYSCONFDIR@/${name}.cfg.lua"
+pidfile="@PROSODY_RUN@/${name}.pid"
+start_precmd="prosody_precmd"
+extra_commands="reload status"
+
+prosody_precmd()
+{
+    if ! @TEST@ -d @PROSODY_RUN@; then
+        @MKDIR@ -m 0755 @PROSODY_RUN@
+    fi
+    @CHOWN@ @PROSODY_USER@:@PROSODY_GROUP@ @PROSODY_RUN@
+    #ulimit -n 2048
+}
+
+start_cmd="${ctl_command} start"
+stop_cmd="${ctl_command} stop"
+reload_cmd="${ctl_command} reload"
+status_cmd="${ctl_command} status"
+
+load_rc_config $name
+run_rc_command "$1"
diff --git a/prosody/files/smf/manifest.xml b/prosody/files/smf/manifest.xml
new file mode 100644
index 0000000000..76d8556c1f
--- /dev/null
+++ b/prosody/files/smf/manifest.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0"?>
+<!DOCTYPE service_bundle SYSTEM "/usr/share/lib/xml/dtd/service_bundle.dtd.1">
+<service_bundle type="manifest" name="export">
+  <service name="@SMF_PREFIX@/@SMF_NAME@" type="service" version="1">
+    <create_default_instance enabled="false" />
+    <single_instance />
+    <dependency name="network" grouping="require_all" restart_on="error" type="service">
+      <service_fmri value="svc:/milestone/network:default" />
+    </dependency>
+    <dependency name="filesystem" grouping="require_all" restart_on="error" type="service">
+      <service_fmri value="svc:/system/filesystem/local" />
+    </dependency>
+    <method_context></method_context>
+    <exec_method type="method" name="start" exec="@PREFIX@/bin/prosodyctl start" timeout_seconds="600" />
+    <exec_method type="method" name="stop" exec="@PREFIX@/bin/prosodyctl stop" timeout_seconds="600" />
+    <property_group name="startd" type="framework">
+      <propval name="duration" type="astring" value="contract" />
+      <propval name="ignore_error" type="astring" value="core,signal" />
+    </property_group>
+    <property_group name="application" type="application">
+      <propval name="config_file" type="astring" value="@PKG_SYSCONFDIR@/prosody.cfg.lua" />
+    </property_group>
+    <template>
+      <common_name>
+        <loctext xml:lang="C">Prosody XMPP server</loctext>
+      </common_name>
+    </template>
+  </service>
+</service_bundle>
diff --git a/prosody/patches/patch-makefile b/prosody/patches/patch-makefile
new file mode 100644
index 0000000000..1ce4971485
--- /dev/null
+++ b/prosody/patches/patch-makefile
@@ -0,0 +1,35 @@
+$NetBSD: patch-makefile,v 1.2 2022/05/08 21:24:12 khorben Exp $
+
+Fix installation directories and scripts
+
+--- makefile.orig	2022-03-08 12:34:39.594708341 +0000
++++ makefile
+@@ -6,7 +6,7 @@ CONFIG = $(DESTDIR)$(SYSCONFDIR)
+ MODULES = $(DESTDIR)$(LIBDIR)/prosody/modules
+ SOURCE = $(DESTDIR)$(LIBDIR)/prosody
+ DATA = $(DESTDIR)$(DATADIR)
+-MAN = $(DESTDIR)$(PREFIX)/share/man
++MAN = $(DESTDIR)$(PREFIX)/man
+ 
+ INSTALLEDSOURCE = $(LIBDIR)/prosody
+ INSTALLEDCONFIG = $(SYSCONFDIR)
+@@ -33,7 +33,9 @@ all: prosody.install prosodyctl.install 
+ install-etc: prosody.cfg.lua.install
+ 	$(MKDIR) $(CONFIG)
+ 	$(MKDIR) $(CONFIG)/certs
+-	test -f $(CONFIG)/prosody.cfg.lua || $(INSTALL_DATA) prosody.cfg.lua.install $(CONFIG)/prosody.cfg.lua
++	$(INSTALL_DATA) certs/GNUmakefile certs/localhost.cnf $(CONFIG)/certs
++	$(INSTALL_DATA) certs/makefile certs/openssl.cnf $(CONFIG)/certs
++	$(INSTALL_DATA) prosody.cfg.lua.install $(CONFIG)/prosody.cfg.lua
+ .if $(EXCERTS) == "yes"
+ 	$(INSTALL_DATA) certs/localhost.crt certs/localhost.key $(CONFIG)/certs
+ 	$(INSTALL_DATA) certs/example.com.crt certs/example.com.key $(CONFIG)/certs
+@@ -63,7 +65,7 @@ install-util: util/encodings.so util/enc
+ 	$(MKDIR) $(SOURCE)/util
+ 	$(INSTALL_DATA) util/*.lua $(SOURCE)/util
+ 	$(MAKE) install -C util-src
+-	$(INSTALL_DATA) util/*.so $(SOURCE)/util
++	$(INSTALL_EXEC) util/*.so $(SOURCE)/util
+ 	$(MKDIR) $(SOURCE)/util/sasl
+ 	$(INSTALL_DATA) util/sasl/*.lua $(SOURCE)/util/sasl
+ 	$(MKDIR) $(SOURCE)/util/human
diff --git a/prosody/patches/patch-prosody.cfg.lua.dist b/prosody/patches/patch-prosody.cfg.lua.dist
new file mode 100644
index 0000000000..1e6b48bb50
--- /dev/null
+++ b/prosody/patches/patch-prosody.cfg.lua.dist
@@ -0,0 +1,28 @@
+$NetBSD: patch-prosody.cfg.lua.dist,v 1.2 2022/05/08 21:24:12 khorben Exp $
+
+set the logging paths
+set up the pid files
+
+--- prosody.cfg.lua.dist.orig	2022-03-08 12:34:39.594708341 +0000
++++ prosody.cfg.lua.dist
+@@ -183,8 +183,8 @@ archive_expires_after = "1w" -- Remove a
+ -- 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 = "@PROSODY_LOG@/prosody.log"; -- Change 'info' to 'debug' for verbose logging
++	error = "@PROSODY_LOG@/prosody.err";
+ 	-- "*syslog"; -- Uncomment this for logging to syslog
+ 	-- "*console"; -- Log to the console, useful for debugging when running in the foreground
+ }
+@@ -205,6 +205,9 @@ log = {
+ -- Location of directory to find certificates in (relative to main config file):
+ certificates = "certs"
+ 
++-- Enable PID file by default
++pidfile = "@PROSODY_RUN@/prosody.pid";
++
+ ----------- Virtual hosts -----------
+ -- You need to add a VirtualHost entry for each domain you wish Prosody to serve.
+ -- Settings under each VirtualHost entry apply *only* to that host.
diff --git a/prosody/patches/patch-util-src_crypto.c b/prosody/patches/patch-util-src_crypto.c
new file mode 100644
index 0000000000..af423b1007
--- /dev/null
+++ b/prosody/patches/patch-util-src_crypto.c
@@ -0,0 +1,14 @@
+$NetBSD$
+
+ec.h is needed to find the required EC_ definitions 
+
+--- util-src/crypto.c.orig	2024-02-04 21:10:41.303639710 +0000
++++ util-src/crypto.c
+@@ -24,6 +24,7 @@ typedef unsigned __int32 uint32_t;
+ #include "lauxlib.h"
+ #include <openssl/crypto.h>
+ #include <openssl/ecdsa.h>
++#include <openssl/ec.h>
+ #include <openssl/err.h>
+ #include <openssl/evp.h>
+ #include <openssl/obj_mac.h>
diff --git a/prosody/patches/patch-util-src_makefile b/prosody/patches/patch-util-src_makefile
new file mode 100644
index 0000000000..7268f998c8
--- /dev/null
+++ b/prosody/patches/patch-util-src_makefile
@@ -0,0 +1,15 @@
+$NetBSD$
+
+crypto.so is missing in this makefile but exists in GNUmakefile.
+
+--- util-src/makefile.orig	2024-02-04 18:14:44.266419142 +0000
++++ util-src/makefile
+@@ -7,7 +7,7 @@ TARGET?=../util/
+ 
+ ALL=encodings.so hashes.so net.so pposix.so signal.so table.so \
+     ringbuffer.so time.so poll.so compat.so strbitop.so \
+-    struct.so
++    struct.so crypto.so
+ 
+ .ifdef $(RANDOM)
+ ALL+=crand.so
diff --git a/prosody/patches/patch-util-src_pposix.c b/prosody/patches/patch-util-src_pposix.c
new file mode 100644
index 0000000000..3f629c4954
--- /dev/null
+++ b/prosody/patches/patch-util-src_pposix.c
@@ -0,0 +1,49 @@
+$NetBSD$
+
+Provide mallinfo support for illumos. Fixing uname lookup on illumos (non Linux
+distributions).
+
+--- util-src/pposix.c.orig	2024-02-04 17:30:58.000000000 +0000
++++ util-src/pposix.c
+@@ -70,9 +70,14 @@
+ #include <linux/falloc.h>
+ #endif
+ 
+-#if !defined(WITHOUT_MALLINFO) && defined(__linux__) && defined(__GLIBC__)
+-#include <malloc.h>
++#if !defined(WITHOUT_MALLINFO)
++#if ( defined(__linux__) && defined(__GLIBC__) ) || defined(__sun)
+ #define WITH_MALLINFO
++#include <malloc.h>
++#endif
++
++#elif defined(__sun)
++#include <grp.h>
+ #endif
+ 
+ #if defined(__FreeBSD__) && defined(RFPROC)
+@@ -657,7 +662,7 @@ static int lc_abort(lua_State *L) {
+ static int lc_uname(lua_State *L) {
+ 	struct utsname uname_info;
+ 
+-	if(uname(&uname_info) != 0) {
++	if(uname(&uname_info) < 0) {
+ 		luaL_pushfail(L);
+ 		lua_pushstring(L, strerror(errno));
+ 		return 2;
+@@ -711,10 +716,15 @@ static int lc_setenv(lua_State *L) {
+ 
+ #ifdef WITH_MALLINFO
+ static int lc_meminfo(lua_State *L) {
++#if defined(__GLIBC__) 
+ #if __GLIBC_PREREQ(2, 33)
+ 	struct mallinfo2 info = mallinfo2();
+ #define MALLINFO_T size_t
+ #else
++  struct mallinfo info = mallinfo();
++#define MALLINFO_T unsigned
++#endif
++#else
+ 	struct mallinfo info = mallinfo();
+ #define MALLINFO_T unsigned
+ #endif


Home | Main Index | Thread Index | Old Index