diff options
author | fhajny <fhajny@pkgsrc.org> | 2017-11-23 22:06:15 +0000 |
---|---|---|
committer | fhajny <fhajny@pkgsrc.org> | 2017-11-23 22:06:15 +0000 |
commit | b5405cfeae6f6b4d675aadb54bac603c4edaaeec (patch) | |
tree | dafb69e67fd628508d705e5a4a5ecdd9b8cdc693 /chat | |
parent | 7c179c3f4703bd2819f5d7c27c62c85c9028811a (diff) | |
download | pkgsrc-b5405cfeae6f6b4d675aadb54bac603c4edaaeec.tar.gz |
Update chat/prosody to 0.10.0
- Rewritten SQL storage module with archive support
- SCRAM-SHA-1-PLUS
- prosodyctl check
- Statistics
- Improved TLS configuration
- Lua 5.2 support
- mod_blocklist (XEP-0191)
- mod_carbons (XEP-0280)
- Pluggable connection timeout handling
- mod_websocket (RFC 7395)
- mod_mam (XEP-0313)
See release notes on upgrading:
https://prosody.im/doc/release/0.10.0#upgrade_notes
Diffstat (limited to 'chat')
-rw-r--r-- | chat/prosody/Makefile | 17 | ||||
-rw-r--r-- | chat/prosody/PLIST | 40 | ||||
-rw-r--r-- | chat/prosody/distinfo | 21 | ||||
-rw-r--r-- | chat/prosody/patches/patch-aa | 59 | ||||
-rw-r--r-- | chat/prosody/patches/patch-ab | 26 | ||||
-rw-r--r-- | chat/prosody/patches/patch-ad | 6 | ||||
-rw-r--r-- | chat/prosody/patches/patch-prosodyctl | 14 | ||||
-rw-r--r-- | chat/prosody/patches/patch-util-src_Makefile | 27 | ||||
-rw-r--r-- | chat/prosody/patches/patch-util-src_hashes.c | 27 |
9 files changed, 126 insertions, 111 deletions
diff --git a/chat/prosody/Makefile b/chat/prosody/Makefile index e563cb73405..4598070c5f6 100644 --- a/chat/prosody/Makefile +++ b/chat/prosody/Makefile @@ -1,7 +1,7 @@ -# $NetBSD: Makefile,v 1.27 2017/03/01 16:38:31 fhajny Exp $ +# $NetBSD: Makefile,v 1.28 2017/11/23 22:06:15 fhajny Exp $ # -DISTNAME= prosody-0.9.12 +DISTNAME= prosody-0.10.0 CATEGORIES= chat MASTER_SITES= http://prosody.im/downloads/source/ @@ -16,10 +16,11 @@ DEPENDS+= ${LUA_PKGPREFIX}-sec>=0.3.3:../../security/lua-sec DEPENDS+= ${LUA_PKGPREFIX}-socket>=2.0:../../net/lua-socket HAS_CONFIGURE= yes +USE_LANGUAGES+= c c99 USE_TOOLS+= gmake BUILD_DEFS+= VARBASE -LUA_VERSIONS_ACCEPTED= 51 +LUA_VERSIONS_ACCEPTED= 52 51 .include "../../mk/bsd.prefs.mk" @@ -34,10 +35,10 @@ OWN_DIRS_PERMS+= ${PROSODY_LOG} ${PROSODY_USER} ${PROSODY_GROUP} 0770 OWN_DIRS_PERMS+= ${PROSODY_RUN} ${PROSODY_USER} ${PROSODY_GROUP} 0770 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_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_HOME.${PROSODY_USER}= ${PROSODY_DATA} PKG_SHELL.${PROSODY_USER}= ${NOLOGIN} @@ -69,6 +70,8 @@ MAKE_ENV.SunOS+= SOCKET_LIB=-lsocket RCD_SCRIPTS= prosody +TEST_TARGET= test + .include "../../lang/lua/application.mk" .include "../../lang/lua/tool.mk" .include "../../devel/libidn/buildlink3.mk" diff --git a/chat/prosody/PLIST b/chat/prosody/PLIST index 5c7723fdf7c..f6ac17763b1 100644 --- a/chat/prosody/PLIST +++ b/chat/prosody/PLIST @@ -1,4 +1,4 @@ -@comment $NetBSD: PLIST,v 1.8 2016/02/26 10:52:01 fhajny Exp $ +@comment $NetBSD: PLIST,v 1.9 2017/11/23 22:06:15 fhajny Exp $ bin/prosody bin/prosodyctl lib/prosody/core/certmanager.lua @@ -12,6 +12,7 @@ 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/modules/adhoc/adhoc.lib.lua @@ -23,10 +24,13 @@ lib/prosody/modules/mod_auth_anonymous.lua lib/prosody/modules/mod_auth_cyrus.lua lib/prosody/modules/mod_auth_internal_hashed.lua lib/prosody/modules/mod_auth_internal_plain.lua +lib/prosody/modules/mod_blocklist.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_compression.lua +lib/prosody/modules/mod_debug_sql.lua lib/prosody/modules/mod_dialback.lua lib/prosody/modules/mod_disco.lua lib/prosody/modules/mod_groups.lua @@ -36,6 +40,7 @@ lib/prosody/modules/mod_http_files.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_message.lua lib/prosody/modules/mod_motd.lua lib/prosody/modules/mod_net_multiplex.lua @@ -47,28 +52,30 @@ lib/prosody/modules/mod_presence.lua lib/prosody/modules/mod_privacy.lua lib/prosody/modules/mod_private.lua lib/prosody/modules/mod_proxy65.lua -lib/prosody/modules/mod_pubsub.lua lib/prosody/modules/mod_register.lua lib/prosody/modules/mod_roster.lua lib/prosody/modules/mod_s2s/mod_s2s.lua lib/prosody/modules/mod_s2s/s2sout.lib.lua +lib/prosody/modules/mod_s2s_auth_certs.lua lib/prosody/modules/mod_saslauth.lua +lib/prosody/modules/mod_server_contact_info.lua lib/prosody/modules/mod_storage_internal.lua lib/prosody/modules/mod_storage_none.lua lib/prosody/modules/mod_storage_sql.lua +lib/prosody/modules/mod_storage_sql1.lua +lib/prosody/modules/mod_storage_xep0227.lua lib/prosody/modules/mod_time.lua lib/prosody/modules/mod_tls.lua +lib/prosody/modules/mod_unknown.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_websocket.lua lib/prosody/modules/mod_welcome.lua +lib/prosody/modules/mod_windows.lua lib/prosody/modules/muc/mod_muc.lua lib/prosody/modules/muc/muc.lib.lua -lib/prosody/modules/sql.lib.lua -lib/prosody/modules/storage/mod_xep0227.lua -lib/prosody/modules/storage/sqlbasic.lib.lua -lib/prosody/modules/storage/xep227store.lib.lua lib/prosody/net/adns.lua lib/prosody/net/connlisteners.lua lib/prosody/net/dns.lua @@ -80,9 +87,11 @@ lib/prosody/net/httpserver.lua lib/prosody/net/server.lua lib/prosody/net/server_event.lua lib/prosody/net/server_select.lua +lib/prosody/net/websocket.lua lib/prosody/prosody.version lib/prosody/util/adhoc.lua lib/prosody/util/array.lua +lib/prosody/util/cache.lua lib/prosody/util/caps.lua lib/prosody/util/dataforms.lua lib/prosody/util/datamanager.lua @@ -93,38 +102,56 @@ lib/prosody/util/encodings.so lib/prosody/util/envload.lua lib/prosody/util/events.lua lib/prosody/util/filters.lua +lib/prosody/util/format.lua lib/prosody/util/hashes.so lib/prosody/util/helpers.lua +lib/prosody/util/hex.lua lib/prosody/util/hmac.lua lib/prosody/util/http.lua +lib/prosody/util/id.lua lib/prosody/util/import.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/logger.lua +lib/prosody/util/mercurial.lua lib/prosody/util/multitable.lua lib/prosody/util/net.so lib/prosody/util/openssl.lua +lib/prosody/util/paths.lua lib/prosody/util/pluginloader.lua lib/prosody/util/pposix.so +lib/prosody/util/presence.lua lib/prosody/util/prosodyctl.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/rsm.lua lib/prosody/util/sasl.lua lib/prosody/util/sasl/anonymous.lua lib/prosody/util/sasl/digest-md5.lua +lib/prosody/util/sasl/external.lua lib/prosody/util/sasl/plain.lua lib/prosody/util/sasl/scram.lua lib/prosody/util/sasl_cyrus.lua lib/prosody/util/serialization.lua +lib/prosody/util/session.lua lib/prosody/util/set.lua lib/prosody/util/signal.so lib/prosody/util/sql.lua +lib/prosody/util/sslconfig.lua lib/prosody/util/stanza.lua +lib/prosody/util/statistics.lua +lib/prosody/util/statsd.lua +lib/prosody/util/table.so lib/prosody/util/template.lua lib/prosody/util/termcolours.lua lib/prosody/util/throttle.lua +lib/prosody/util/time.lua lib/prosody/util/timer.lua lib/prosody/util/uuid.lua lib/prosody/util/watchdog.lua @@ -136,3 +163,4 @@ share/examples/prosody/certs/Makefile share/examples/prosody/certs/localhost.cnf share/examples/prosody/certs/openssl.cnf share/examples/prosody/prosody.cfg.lua +@pkgdir lib/prosody/modules/storage diff --git a/chat/prosody/distinfo b/chat/prosody/distinfo index 2d02e70bdd1..f2715b30aca 100644 --- a/chat/prosody/distinfo +++ b/chat/prosody/distinfo @@ -1,12 +1,11 @@ -$NetBSD: distinfo,v 1.14 2017/03/01 16:38:31 fhajny Exp $ +$NetBSD: distinfo,v 1.15 2017/11/23 22:06:15 fhajny Exp $ -SHA1 (prosody-0.9.12.tar.gz) = 1ee224263a5b3d67960e12edbbe6b2f16b95d147 -RMD160 (prosody-0.9.12.tar.gz) = 5d5d16d839936d4577228e7b7de06e9bb95d001a -SHA512 (prosody-0.9.12.tar.gz) = e87b5f3b3e327722cec9d8d0470684e2ec2788a1c5ae623c4f505a00572ef21f65afe84cd5b7de47d6a65fe8872506fe34e5e8886e20979ff84710669857ca76 -Size (prosody-0.9.12.tar.gz) = 267869 bytes -SHA1 (patch-aa) = a51829983e9b4b28ee769a101df3dec00daf677d -SHA1 (patch-ab) = 755dd6d77689ef56ea4468f943f149933be72378 -SHA1 (patch-ad) = abcae34982fee846c00252be1c0b033a44ad65d0 -SHA1 (patch-prosodyctl) = e3e3a8f03c6d7c74b9026cf7ada765ee86c8397e -SHA1 (patch-util-src_Makefile) = be6d7dd7224a56687238a85827756c109d068a96 -SHA1 (patch-util-src_hashes.c) = ddd8a623209def4e7ff923d71a20e0c143f6ebaf +SHA1 (prosody-0.10.0.tar.gz) = 57c1c5a665e6453bdde06727ef398cd69accd9d7 +RMD160 (prosody-0.10.0.tar.gz) = dad7a9329fb94bffbaf3177a86aa2740360f74c8 +SHA512 (prosody-0.10.0.tar.gz) = ee66e240afba6a8cb286623da48d9b535798153fb65e32070cec93aafe360e91f7087eeb49dec0f7d145e24f04339ed0878e50835b52f682130b204e22990ce9 +Size (prosody-0.10.0.tar.gz) = 330461 bytes +SHA1 (patch-aa) = 5725cddbb77358d3bf75c55f122fe91051efbae3 +SHA1 (patch-ab) = 15acaf1320eec02c6d4a0b005350dc49dbd20af5 +SHA1 (patch-ad) = 3683833ef1c45e521542f04df4e6df698e727671 +SHA1 (patch-util-src_Makefile) = 0405f68a3b4c7f4f7a98d67230470a2a11078869 +SHA1 (patch-util-src_hashes.c) = 9c5b02f3ad652a9cb12ee4cbf4a6b7d235668932 diff --git a/chat/prosody/patches/patch-aa b/chat/prosody/patches/patch-aa index 4b3ae553e8c..3818b057618 100644 --- a/chat/prosody/patches/patch-aa +++ b/chat/prosody/patches/patch-aa @@ -1,7 +1,8 @@ -$NetBSD: patch-aa,v 1.6 2016/01/25 13:01:39 fhajny Exp $ +$NetBSD: patch-aa,v 1.7 2017/11/23 22:06:15 fhajny Exp $ Fix installation directories and scripts ---- Makefile.orig 2016-01-08 13:07:07.000000000 +0000 + +--- Makefile.orig 2017-11-17 20:57:32.803849000 +0000 +++ Makefile @@ -3,10 +3,11 @@ include config.unix @@ -16,30 +17,37 @@ Fix installation directories and scripts INSTALLEDSOURCE = $(LIBDIR)/prosody INSTALLEDCONFIG = $(SYSCONFDIR) -@@ -22,26 +23,39 @@ ifeq ($(EXCERTS),yes) +@@ -28,35 +29,39 @@ ifeq ($(EXCERTS),yes) endif install: prosody.install prosodyctl.install prosody.cfg.lua.install util/encodings.so util/encodings.so util/pposix.so util/signal.so -- install -d $(BIN) $(CONFIG) $(MODULES) $(SOURCE) -- install -m750 -d $(DATA) -- install -d $(MAN)/man1 -- install -d $(CONFIG)/certs -- install -d $(SOURCE)/core $(SOURCE)/net $(SOURCE)/util -- install -m755 ./prosody.install $(BIN)/prosody -- install -m755 ./prosodyctl.install $(BIN)/prosodyctl -- install -m644 core/*.lua $(SOURCE)/core -- install -m644 net/*.lua $(SOURCE)/net -- install -d $(SOURCE)/net/http -- install -m644 net/http/*.lua $(SOURCE)/net/http -- install -m644 util/*.lua $(SOURCE)/util -- install -m644 util/*.so $(SOURCE)/util -- install -d $(SOURCE)/util/sasl -- install -m644 util/sasl/* $(SOURCE)/util/sasl -- umask 0022 && cp -r plugins/* $(MODULES) -- install -m644 certs/* $(CONFIG)/certs -- install -m644 man/prosodyctl.man $(MAN)/man1/prosodyctl.1 -- test -e $(CONFIG)/prosody.cfg.lua || install -m644 prosody.cfg.lua.install $(CONFIG)/prosody.cfg.lua -- test -e prosody.version && install -m644 prosody.version $(SOURCE)/prosody.version || true +- $(MKDIR) $(BIN) $(CONFIG) $(MODULES) $(SOURCE) +- $(MKDIR_PRIVATE) $(DATA) +- $(MKDIR) $(MAN)/man1 +- $(MKDIR) $(CONFIG)/certs +- $(MKDIR) $(SOURCE)/core $(SOURCE)/net $(SOURCE)/util +- $(INSTALL_EXEC) ./prosody.install $(BIN)/prosody +- $(INSTALL_EXEC) ./prosodyctl.install $(BIN)/prosodyctl +- $(INSTALL_DATA) core/*.lua $(SOURCE)/core +- $(INSTALL_DATA) net/*.lua $(SOURCE)/net +- $(MKDIR) $(SOURCE)/net/http $(SOURCE)/net/websocket +- $(INSTALL_DATA) net/http/*.lua $(SOURCE)/net/http +- $(INSTALL_DATA) net/websocket/*.lua $(SOURCE)/net/websocket +- $(INSTALL_DATA) util/*.lua $(SOURCE)/util +- $(INSTALL_DATA) util/*.so $(SOURCE)/util +- $(MKDIR) $(SOURCE)/util/sasl +- $(INSTALL_DATA) util/sasl/*.lua $(SOURCE)/util/sasl +- $(MKDIR) $(MODULES)/mod_s2s $(MODULES)/mod_pubsub $(MODULES)/adhoc $(MODULES)/muc $(MODULES)/mod_mam +- $(INSTALL_DATA) plugins/*.lua $(MODULES) +- $(INSTALL_DATA) plugins/mod_s2s/*.lua $(MODULES)/mod_s2s +- $(INSTALL_DATA) plugins/mod_pubsub/*.lua $(MODULES)/mod_pubsub +- $(INSTALL_DATA) plugins/adhoc/*.lua $(MODULES)/adhoc +- $(INSTALL_DATA) plugins/muc/*.lua $(MODULES)/muc +- $(INSTALL_DATA) plugins/mod_mam/*.lua $(MODULES)/mod_mam +- $(INSTALL_DATA) certs/* $(CONFIG)/certs +- $(INSTALL_DATA) man/prosodyctl.man $(MAN)/man1/prosodyctl.1 +- test -f $(CONFIG)/prosody.cfg.lua || $(INSTALL_DATA) prosody.cfg.lua.install $(CONFIG)/prosody.cfg.lua +- -test -f prosody.version && $(INSTALL_DATA) prosody.version $(SOURCE)/prosody.version + $(BSD_INSTALL_SCRIPT_DIR) $(BIN) + $(BSD_INSTALL_DATA_DIR) $(EGDIR) + $(BSD_INSTALL_DATA_DIR) $(MODULES) @@ -69,10 +77,11 @@ Fix installation directories and scripts + $(BSD_INSTALL_LIB_DIR) $(MODULES)/muc + $(BSD_INSTALL_DATA) plugins/muc/* $(MODULES)/muc + $(BSD_INSTALL_LIB_DIR) $(MODULES)/storage -+ $(BSD_INSTALL_DATA) plugins/storage/* $(MODULES)/storage + $(BSD_INSTALL_MAN) man/prosodyctl.man $(MAN)/man1/prosodyctl.1 + $(BSD_INSTALL_DATA) prosody.cfg.lua.install $(EGDIR)/prosody.cfg.lua + $(BSD_INSTALL_DATA) prosody.version $(SOURCE)/prosody.version $(MAKE) install -C util-src - +- clean: + rm -f prosody.install + rm -f prosodyctl.install diff --git a/chat/prosody/patches/patch-ab b/chat/prosody/patches/patch-ab index 866467bb014..07d3672996b 100644 --- a/chat/prosody/patches/patch-ab +++ b/chat/prosody/patches/patch-ab @@ -1,23 +1,13 @@ -$NetBSD: patch-ab,v 1.5 2014/03/10 13:01:17 fhajny Exp $ +$NetBSD: patch-ab,v 1.6 2017/11/23 22:06:15 fhajny Exp $ -enable POSIX functionality by default set the logging paths set up the pid files ---- prosody.cfg.lua.dist.orig 2014-01-12 11:41:40.000000000 +0000 +--- prosody.cfg.lua.dist.orig 2017-11-17 20:50:11.470659000 +0000 +++ prosody.cfg.lua.dist -@@ -63,7 +63,7 @@ modules_enabled = { - --"http_files"; -- Serve static files from a directory over HTTP - - -- Other specific functionality -- --"posix"; -- POSIX functionality, sends server to background, enables syslog, etc. -+ "posix"; -- POSIX functionality, sends server to background, enables syslog, etc. - --"groups"; -- Shared roster support - --"announce"; -- Send announcement to all online users - --"welcome"; -- Welcome users who register accounts -@@ -139,12 +139,15 @@ authentication = "internal_plain" +@@ -161,12 +161,13 @@ archive_expires_after = "1w" -- Remove a -- Logging configuration - -- For advanced logging see http://prosody.im/doc/logging + -- For advanced logging see https://prosody.im/doc/logging log = { - info = "prosody.log"; -- Change 'info' to 'debug' for verbose logging - error = "prosody.err"; @@ -27,6 +17,14 @@ set up the pid files -- "*console"; -- Log to the console, useful for debugging with daemonize=false } ++ + -- Uncomment to enable statistics + -- For more info see https://prosody.im/doc/statistics + -- statistics = "internal" +@@ -181,6 +182,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"; + diff --git a/chat/prosody/patches/patch-ad b/chat/prosody/patches/patch-ad index abb5b6bcd58..8ebf4da5716 100644 --- a/chat/prosody/patches/patch-ad +++ b/chat/prosody/patches/patch-ad @@ -1,10 +1,10 @@ -$NetBSD: patch-ad,v 1.3 2014/03/10 13:01:17 fhajny Exp $ +$NetBSD: patch-ad,v 1.4 2017/11/23 22:06:15 fhajny Exp $ Include <sys/param.h> when on UNIX ---- util-src/signal.c.orig 2014-01-12 11:41:40.000000000 +0000 +--- util-src/signal.c.orig 2017-11-17 20:50:20.874396000 +0000 +++ util-src/signal.c -@@ -29,6 +29,10 @@ +@@ -31,6 +31,10 @@ #include <signal.h> #include <stdlib.h> diff --git a/chat/prosody/patches/patch-prosodyctl b/chat/prosody/patches/patch-prosodyctl deleted file mode 100644 index 0c86ecbd6bc..00000000000 --- a/chat/prosody/patches/patch-prosodyctl +++ /dev/null @@ -1,14 +0,0 @@ -$NetBSD: patch-prosodyctl,v 1.2 2014/03/10 13:01:17 fhajny Exp $ - -Fix Lua code. ---- prosodyctl.orig 2014-01-12 11:41:40.000000000 +0000 -+++ prosodyctl -@@ -243,7 +243,7 @@ end - local modulemanager = require "core.modulemanager" - - local prosodyctl = require "util.prosodyctl" --require "socket" -+local socket = require "socket" - ----------------------- - - -- FIXME: Duplicate code waiting for util.startup diff --git a/chat/prosody/patches/patch-util-src_Makefile b/chat/prosody/patches/patch-util-src_Makefile index 2cf4ca29e69..b9a75a5b65b 100644 --- a/chat/prosody/patches/patch-util-src_Makefile +++ b/chat/prosody/patches/patch-util-src_Makefile @@ -1,24 +1,15 @@ -$NetBSD: patch-util-src_Makefile,v 1.1 2014/11/27 10:18:20 fhajny Exp $ +$NetBSD: patch-util-src_Makefile,v 1.2 2017/11/23 22:06:15 fhajny Exp $ We need libsocket on SunOS at least, for getifaddrs. ---- util-src/Makefile.orig 2014-10-24 22:30:55.000000000 +0000 + +--- util-src/Makefile.orig 2017-09-28 13:07:47.000000000 +0000 +++ util-src/Makefile -@@ -6,6 +6,7 @@ LUA_INCDIR?=/usr/include/lua$(LUA_SUFFIX - LUA_LIB?=lua$(LUA_SUFFIX) - IDN_LIB?=idn - OPENSSL_LIB?=crypto -+SOCKET_LIB?= - CC?=gcc - CXX?=g++ - LD?=gcc -@@ -32,6 +33,10 @@ hashes.so: hashes.o - MACOSX_DEPLOYMENT_TARGET="10.3"; export MACOSX_DEPLOYMENT_TARGET; - $(CC) -o $@ $< $(LDFLAGS) -l$(OPENSSL_LIB) +@@ -27,6 +27,8 @@ encodings.so: LDLIBS+=$(IDNA_LIBS) + + hashes.so: LDLIBS+=$(OPENSSL_LIBS) -+net.so: net.o -+ MACOSX_DEPLOYMENT_TARGET="10.3"; export MACOSX_DEPLOYMENT_TARGET; -+ $(CC) -o $@ $< $(LDFLAGS) $(SOCKET_LIB) ++net.so: LDLIBS+=$(SOCKET_LIB) + - .c.o: - $(CC) $(CFLAGS) -I$(LUA_INCDIR) -c -o $@ $< + crand.o: CFLAGS+=-DWITH_$(RANDOM) + crand.so: LDLIBS+=$(RANDOM_LIBS) diff --git a/chat/prosody/patches/patch-util-src_hashes.c b/chat/prosody/patches/patch-util-src_hashes.c index 2add2ec9e64..105727b6fbb 100644 --- a/chat/prosody/patches/patch-util-src_hashes.c +++ b/chat/prosody/patches/patch-util-src_hashes.c @@ -1,19 +1,19 @@ -$NetBSD: patch-util-src_hashes.c,v 1.1 2016/12/15 23:45:42 joerg Exp $ +$NetBSD: patch-util-src_hashes.c,v 1.2 2017/11/23 22:06:15 fhajny Exp $ Avoid conflict with NetBSD's hmac. ---- util-src/hashes.c.orig 2016-12-15 15:20:05.616992510 +0000 +--- util-src/hashes.c.orig 2017-09-28 13:07:47.000000000 +0000 +++ util-src/hashes.c -@@ -70,7 +70,7 @@ struct hash_desc { +@@ -74,7 +74,7 @@ struct hash_desc { void *ctx, *ctxo; }; -static void hmac(struct hash_desc *desc, const char *key, size_t key_len, +static void myhmac(struct hash_desc *desc, const char *key, size_t key_len, - const char *msg, size_t msg_len, unsigned char *result) - { + const char *msg, size_t msg_len, unsigned char *result) { union xory { -@@ -124,7 +124,7 @@ static int myFunc(lua_State *L) { \ + unsigned char bytes[64]; +@@ -127,7 +127,7 @@ static int myFunc(lua_State *L) { \ desc.digestLength = size; \ desc.ctx = &ctx; \ desc.ctxo = &ctxo; \ @@ -22,8 +22,8 @@ Avoid conflict with NetBSD's hmac. if (hex_out) { \ toHex(hash, size, result); \ lua_pushlstring(L, (char*)result, size*2); \ -@@ -168,13 +168,13 @@ static int LscramHi(lua_State *L) { - luaL_error(L, "Out of memory in scramHi"); +@@ -174,14 +174,14 @@ static int LscramHi(lua_State *L) { + memcpy(salt2, salt, salt_len); memcpy(salt2 + salt_len, "\0\0\0\1", 4); - hmac(&desc, str, str_len, salt2, salt_len + 4, Ust); @@ -31,10 +31,11 @@ Avoid conflict with NetBSD's hmac. free(salt2); memcpy(res.bytes, Ust, sizeof(res)); - for (i = 1; i < iter; i++) { + + for(i = 1; i < iter; i++) { int j; -- hmac(&desc, str, str_len, (char*)Ust, sizeof(Ust), Und.bytes); -+ myhmac(&desc, str, str_len, (char*)Ust, sizeof(Ust), Und.bytes); - for (j = 0; j < SHA_DIGEST_LENGTH/4; j++) +- hmac(&desc, str, str_len, (char *)Ust, sizeof(Ust), Und.bytes); ++ myhmac(&desc, str, str_len, (char *)Ust, sizeof(Ust), Und.bytes); + + for(j = 0; j < SHA_DIGEST_LENGTH / 4; j++) { res.quadbytes[j] ^= Und.quadbytes[j]; - memcpy(Ust, Und.bytes, sizeof(Ust)); |