diff --git a/net/prosody/Makefile b/net/prosody/Makefile index cc6aee5416..f4b3e65025 100644 --- a/net/prosody/Makefile +++ b/net/prosody/Makefile @@ -8,12 +8,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=prosody -PKG_VERSION:=0.12.6 +PKG_VERSION:=13.0.6 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://prosody.im/downloads/source -PKG_HASH:=e06db3cfa8811d0b9fa7713a3b430189f62a1f90e6a4940771b1e16ce64e8e44 +PKG_HASH:=ec696f9cf562c3af4a04b07d3fb36a1cedcc4e69a392fddcfc524bc67d93050f PKG_MAINTAINER:=Thomas Heil PKG_LICENSE:=MIT/X11 @@ -21,7 +21,7 @@ PKG_CPE_ID:=cpe:/a:prosody:prosody PKG_INSTALL:=1 PKG_BUILD_PARALLEL:=1 -PKG_BUILD_DEPENDS:=lua/host +PKG_BUILD_DEPENDS:=lua5.4/host include $(INCLUDE_DIR)/package.mk @@ -29,23 +29,24 @@ define Package/prosody SECTION:=net CATEGORY:=Network SUBMENU:=Instant Messaging - DEPENDS:=+luafilesystem +libidn +luaexpat +luasec +libopenssl +libidn +liblua +luabitop + DEPENDS:=+libidn +libopenssl +liblua5.4 +lua5.4 \ + +luafilesystem5.4 +luaexpat5.4 +luasec5.4 +luasocket5.4 TITLE:=XMPP server URL:=https://prosody.im/ USERID:=prosody=54:prosody=54 endef define Package/prosody/description - Prosody is an exciting new server for Jabber/XMPP - written in Lua. It aims to be easy to use, and light - on resources + Prosody is a modern XMPP/Jabber communication server, written in Lua. + It aims to be easy to set up and configure, and efficient with system + resources. endef define Package/prosody/conffiles /etc/prosody/prosody.cfg.lua endef -TARGET_CFLAGS += $(FPIC) +TARGET_CFLAGS += $(FPIC) -I$(STAGING_DIR)/usr/include/lua5.4 TARGET_LDFLAGS += -shared MAKE_FLAGS += LD="$(TARGET_CC)" TARGET="../util/" @@ -54,9 +55,12 @@ define Build/Configure # this is *NOT* GNU autoconf stuff (cd $(PKG_BUILD_DIR); ./configure \ --prefix=/usr \ + --ostype=linux \ + --lua-version=5.4 \ --with-lua="$(STAGING_DIR_HOSTPKG)" \ - --with-lua-include="$(STAGING_DIR)/usr/include" \ + --with-lua-include="$(STAGING_DIR)/usr/include/lua5.4" \ --with-lua-lib="$(STAGING_DIR)/usr/lib" \ + --runwith=lua5.4 \ --idn-library=idn \ --cflags="$(TARGET_CFLAGS)" \ --ldflags="$(TARGET_LDFLAGS)" \ @@ -77,10 +81,10 @@ define Package/prosody/install $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/prosody{,ctl} $(1)/usr/bin/ $(INSTALL_DIR) $(1)/usr/lib/prosody $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/prosody/prosody.version $(1)/usr/lib/prosody/ + # maps the 13.x "prosody.*" requires onto the installed layout + $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/prosody/loader.lua $(1)/usr/lib/prosody/ $(INSTALL_DIR) $(1)/usr/lib/prosody/core $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/prosody/core/*.lua $(1)/usr/lib/prosody/core/ - #$(INSTALL_DIR) $(1)/usr/lib/prosody/fallbacks - #$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/prosody/fallbacks/*.lua $(1)/usr/lib/prosody/fallbacks/ $(INSTALL_DIR) $(1)/usr/lib/prosody/modules $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/prosody/modules/*.lua $(1)/usr/lib/prosody/modules/ $(INSTALL_DIR) $(1)/usr/lib/prosody/modules/adhoc @@ -91,8 +95,8 @@ define Package/prosody/install $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/prosody/modules/mod_pubsub/*.lua $(1)/usr/lib/prosody/modules/mod_pubsub/ $(INSTALL_DIR) $(1)/usr/lib/prosody/modules/mod_mam $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/prosody/modules/mod_mam/*.lua $(1)/usr/lib/prosody/modules/mod_mam/ - #$(INSTALL_DIR) $(1)/usr/lib/prosody/modules/storage - #$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/prosody/modules/storage/*.lua $(1)/usr/lib/prosody/modules/storage/ + $(INSTALL_DIR) $(1)/usr/lib/prosody/modules/mod_debug_stanzas + $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/prosody/modules/mod_debug_stanzas/*.lua $(1)/usr/lib/prosody/modules/mod_debug_stanzas/ $(INSTALL_DIR) $(1)/usr/lib/prosody/net $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/prosody/net/*.lua $(1)/usr/lib/prosody/net/ $(INSTALL_DIR) $(1)/usr/lib/prosody/net/http @@ -110,23 +114,6 @@ define Package/prosody/install $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/prosody/util/human/*.lua $(1)/usr/lib/prosody/util/human/ $(INSTALL_DIR) $(1)/usr/lib/prosody/util/prosodyctl $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/prosody/util/prosodyctl/*.lua $(1)/usr/lib/prosody/util/prosodyctl/ - #$(CP) $(PKG_INSTALL_DIR)/usr/lib/prosody/util/sasl/*.so $(1)/usr/lib/prosody/util/sasl/ -endef - -define Package/prosody/postinst -#!/bin/sh -[ -n "$${IPKG_INSTROOT}" ] || { - echo "Fixing lua with paxctl if needed!!!" - [ -f /sbin/paxctl ] && { - paxctl -v /usr/bin/ > /dev/null 2>&1 - [ $$? -ne 0 ] && { - cp /usr/bin/lua /tmp - paxctl -c -m /tmp/lua > /dev/null 2>&1 - cp -f /tmp/lua /usr/bin/lua - } - } - exit 0 -} endef $(eval $(call BuildPackage,prosody)) diff --git a/net/prosody/patches/010-hashes-optional-blake2.patch b/net/prosody/patches/010-hashes-optional-blake2.patch new file mode 100644 index 0000000000..9988036fd9 --- /dev/null +++ b/net/prosody/patches/010-hashes-optional-blake2.patch @@ -0,0 +1,71 @@ +From ccc11ce4b039ac2fd775922e26010d64e59e7c47 Mon Sep 17 00:00:00 2001 +From: Alexandru Ardelean +Date: Tue, 26 May 2026 14:15:12 +0300 +Subject: [PATCH] prosody: build blake2 hashes only when OpenSSL has them + +util-src/hashes.c unconditionally registers blake2s256/blake2b512 and +their HMAC variants, which fails to build against OpenSSL configured +without BLAKE2. Guard them with OPENSSL_NO_BLAKE2 so the module builds +either way. + +Signed-off-by: Alexandru Ardelean +--- + util-src/hashes.c | 8 ++++++++ + 1 file changed, 8 insertions(+) + +--- a/util-src/hashes.c ++++ b/util-src/hashes.c +@@ -115,6 +115,7 @@ static int Lmd5(lua_State *L) { + return Levp_hash(L, EVP_md5()); + } + ++#ifndef OPENSSL_NO_BLAKE2 + static int Lblake2s256(lua_State *L) { + return Levp_hash(L, EVP_blake2s256()); + } +@@ -122,6 +123,7 @@ static int Lblake2s256(lua_State *L) { + static int Lblake2b512(lua_State *L) { + return Levp_hash(L, EVP_blake2b512()); + } ++#endif + + static int Lsha3_256(lua_State *L) { + return Levp_hash(L, EVP_sha3_256()); +@@ -188,6 +190,7 @@ static int Lhmac_sha3_512(lua_State *L) + return Levp_hmac(L, EVP_sha3_512()); + } + ++#ifndef OPENSSL_NO_BLAKE2 + static int Lhmac_blake2s256(lua_State *L) { + return Levp_hmac(L, EVP_blake2s256()); + } +@@ -195,6 +198,7 @@ static int Lhmac_blake2s256(lua_State *L + static int Lhmac_blake2b512(lua_State *L) { + return Levp_hmac(L, EVP_blake2b512()); + } ++#endif + + + static int Levp_pbkdf2(lua_State *L, const EVP_MD *evp, size_t out_len) { +@@ -292,8 +296,10 @@ static const luaL_Reg Reg[] = { + { "md5", Lmd5 }, + { "sha3_256", Lsha3_256 }, + { "sha3_512", Lsha3_512 }, ++#ifndef OPENSSL_NO_BLAKE2 + { "blake2s256", Lblake2s256 }, + { "blake2b512", Lblake2b512 }, ++#endif + { "hmac_sha1", Lhmac_sha1 }, + { "hmac_sha224", Lhmac_sha224 }, + { "hmac_sha256", Lhmac_sha256 }, +@@ -302,8 +308,10 @@ static const luaL_Reg Reg[] = { + { "hmac_md5", Lhmac_md5 }, + { "hmac_sha3_256", Lhmac_sha3_256 }, + { "hmac_sha3_512", Lhmac_sha3_512 }, ++#ifndef OPENSSL_NO_BLAKE2 + { "hmac_blake2s256", Lhmac_blake2s256 }, + { "hmac_blake2b512", Lhmac_blake2b512 }, ++#endif + { "scram_Hi_sha1", Lpbkdf2_sha1 }, /* COMPAT */ + { "pbkdf2_hmac_sha1", Lpbkdf2_sha1 }, + { "pbkdf2_hmac_sha256", Lpbkdf2_sha256 },