From 17aa36a170c3f6752256ded7baecdaaaec73ad04 Mon Sep 17 00:00:00 2001 From: Robert Scheck Date: Feb 15 2021 22:46:22 +0000 Subject: Upgrade to 0.11.8 (#1928951) --- diff --git a/prosody-0.11.5-lua54.patch b/prosody-0.11.5-lua54.patch deleted file mode 100644 index 1d293ec..0000000 --- a/prosody-0.11.5-lua54.patch +++ /dev/null @@ -1,114 +0,0 @@ -- https://issues.prosody.im/1395 -- https://hg.prosody.im/trunk/rev/48f7cda4174d -- https://hg.prosody.im/trunk/rev/a7903de619b0 - ---- prosody-0.11.5/configure 2020-06-30 15:47:57.575906862 -0400 -+++ prosody-0.11.5/configure.lua54 2020-06-30 15:50:52.970509696 -0400 -@@ -44,7 +44,7 @@ Configure $APP_NAME prior to building. - Default is \$PREFIX/lib - --datadir=DIR Location where the server data should be stored. - Default is \$PREFIX/var/lib/$APP_DIRNAME ----lua-version=VERSION Use specific Lua version: 5.1, 5.2, or 5.3 -+--lua-version=VERSION Use specific Lua version: 5.1, 5.2, 5.3, or 5.4 - Default is auto-detected. - --lua-suffix=SUFFIX Versioning suffix to use in Lua filenames. - Default is "$LUA_SUFFIX" (lua$LUA_SUFFIX...) -@@ -237,7 +237,7 @@ do - --lua-version|--with-lua-version) - [ -n "$value" ] || die "Missing value in flag $key." - LUA_VERSION="$value" -- [ "$LUA_VERSION" = "5.1" ] || [ "$LUA_VERSION" = "5.2" ] || [ "$LUA_VERSION" = "5.3" ] || die "Invalid Lua version in flag $key." -+ [ "$LUA_VERSION" = "5.1" ] || [ "$LUA_VERSION" = "5.2" ] || [ "$LUA_VERSION" = "5.3" ] || [ "$LUA_VERSION" = "5.4" ] || die "Invalid Lua version in flag $key." - LUA_VERSION_SET=yes - ;; - --with-lua) -@@ -340,7 +340,7 @@ then - fi - - detect_lua_version() { -- detected_lua=$("$1" -e 'print(_VERSION:match(" (5%.[123])$"))' 2> /dev/null) -+ detected_lua=$("$1" -e 'print(_VERSION:match(" (5%.[1234])$"))' 2> /dev/null) - if [ "$detected_lua" != "nil" ] - then - if [ "$LUA_VERSION_SET" != "yes" ] -@@ -403,8 +403,11 @@ then - elif [ "$LUA_VERSION_SET" = "yes" ] && [ "$LUA_VERSION" = "5.3" ] - then - suffixes="5.3 53 -5.3 -53" -+ elif [ "$LUA_VERSION_SET" = "yes" ] && [ "$LUA_VERSION" = "5.4" ] -+ then -+ suffixes="5.4 54 -5.4 -54" - else -- suffixes="5.1 51 -5.1 -51 5.2 52 -5.2 -52 5.3 53 -5.3 -53" -+ suffixes="5.1 51 -5.1 -51 5.2 52 -5.2 -52 5.3 53 -5.3 -53 5.4 54 -5.4 -54" - fi - for suffix in "" $suffixes - do ---- prosody-0.11.7/net/websocket/frames.lua 2020-05-31 22:39:34.000000000 +0200 -+++ prosody-0.11.7/net/websocket/frames.lua.lua54 2020-10-08 22:31:55.998715572 +0200 -@@ -9,8 +9,7 @@ - local softreq = require "util.dependencies".softreq; - local random_bytes = require "util.random".bytes; - --local bit = assert(softreq"bit" or softreq"bit32", -- "No bit module found. See https://prosody.im/doc/depends#bitop"); -+local bit = require "util.bitcompat"; - local band = bit.band; - local bor = bit.bor; - local bxor = bit.bxor; ---- prosody-0.11.7/util/bit53.lua 1970-01-01 01:00:00.000000000 +0100 -+++ prosody-0.11.7/util/bit53.lua.lua54 2020-10-08 22:31:55.998715572 +0200 -@@ -0,0 +1,7 @@ -+-- Only the operators needed by net.websocket.frames are provided at this point -+return { -+ band = function (a, b) return a & b end; -+ bor = function (a, b) return a | b end; -+ bxor = function (a, b) return a ~ b end; -+}; -+ ---- prosody-0.11.7/util/bitcompat.lua 1970-01-01 01:00:00.000000000 +0100 -+++ prosody-0.11.7/util/bitcompat.lua.lua54 2020-10-08 22:31:55.998715572 +0200 -@@ -0,0 +1,32 @@ -+-- Compatibility layer for bitwise operations -+ -+-- First try the bit32 lib -+-- Lua 5.3 has it with compat enabled -+-- Lua 5.2 has it by default -+if _G.bit32 then -+ return _G.bit32; -+else -+ -- Lua 5.1 may have it as a standalone module that can be installed -+ local ok, bitop = pcall(require, "bit32") -+ if ok then -+ return bitop; -+ end -+end -+ -+do -+ -- Lua 5.3 and 5.4 would be able to use native infix operators -+ local ok, bitop = pcall(require, "util.bit53") -+ if ok then -+ return bitop; -+ end -+end -+ -+do -+ -- Lastly, try the LuaJIT bitop library -+ local ok, bitop = pcall(require, "bit") -+ if ok then -+ return bitop; -+ end -+end -+ -+error "No bit module found. See https://prosody.im/doc/depends#bitop"; ---- prosody-0.11.7/util/dependencies.lua 2020-05-31 22:39:34.000000000 +0200 -+++ prosody-0.11.7/util/dependencies.lua.lua54 2020-10-08 22:32:01.423752075 +0200 -@@ -90,7 +90,7 @@ - }, "SSL/TLS support will not be available"); - end - -- local bit = _G.bit32 or softreq"bit"; -+ local bit = softreq"util.bitcompat"; - - if not bit then - missingdep("lua-bitops", { diff --git a/prosody-0.11.8-lua54.patch b/prosody-0.11.8-lua54.patch new file mode 100644 index 0000000..9782d4f --- /dev/null +++ b/prosody-0.11.8-lua54.patch @@ -0,0 +1,138 @@ +- https://issues.prosody.im/1395 +- https://hg.prosody.im/trunk/rev/48f7cda4174d +- https://hg.prosody.im/trunk/rev/a7903de619b0 +- https://hg.prosody.im/trunk/rev/e17b98feb0b7 +- https://hg.prosody.im/trunk/rev/69a4b0e3565f + +--- prosody-0.11.5/configure 2020-06-30 15:47:57.575906862 -0400 ++++ prosody-0.11.5/configure.lua54 2020-06-30 15:50:52.970509696 -0400 +@@ -44,7 +44,7 @@ Configure $APP_NAME prior to building. + Default is \$PREFIX/lib + --datadir=DIR Location where the server data should be stored. + Default is \$PREFIX/var/lib/$APP_DIRNAME +---lua-version=VERSION Use specific Lua version: 5.1, 5.2, or 5.3 ++--lua-version=VERSION Use specific Lua version: 5.1, 5.2, 5.3, or 5.4 + Default is auto-detected. + --lua-suffix=SUFFIX Versioning suffix to use in Lua filenames. + Default is "$LUA_SUFFIX" (lua$LUA_SUFFIX...) +@@ -237,7 +237,7 @@ do + --lua-version|--with-lua-version) + [ -n "$value" ] || die "Missing value in flag $key." + LUA_VERSION="$value" +- [ "$LUA_VERSION" = "5.1" ] || [ "$LUA_VERSION" = "5.2" ] || [ "$LUA_VERSION" = "5.3" ] || die "Invalid Lua version in flag $key." ++ [ "$LUA_VERSION" = "5.1" ] || [ "$LUA_VERSION" = "5.2" ] || [ "$LUA_VERSION" = "5.3" ] || [ "$LUA_VERSION" = "5.4" ] || die "Invalid Lua version in flag $key." + LUA_VERSION_SET=yes + ;; + --with-lua) +@@ -340,7 +340,7 @@ then + fi + + detect_lua_version() { +- detected_lua=$("$1" -e 'print(_VERSION:match(" (5%.[123])$"))' 2> /dev/null) ++ detected_lua=$("$1" -e 'print(_VERSION:match(" (5%.[1234])$"))' 2> /dev/null) + if [ "$detected_lua" != "nil" ] + then + if [ "$LUA_VERSION_SET" != "yes" ] +@@ -403,8 +403,11 @@ then + elif [ "$LUA_VERSION_SET" = "yes" ] && [ "$LUA_VERSION" = "5.3" ] + then + suffixes="5.3 53 -5.3 -53" ++ elif [ "$LUA_VERSION_SET" = "yes" ] && [ "$LUA_VERSION" = "5.4" ] ++ then ++ suffixes="5.4 54 -5.4 -54" + else +- suffixes="5.1 51 -5.1 -51 5.2 52 -5.2 -52 5.3 53 -5.3 -53" ++ suffixes="5.1 51 -5.1 -51 5.2 52 -5.2 -52 5.3 53 -5.3 -53 5.4 54 -5.4 -54" + fi + for suffix in "" $suffixes + do +--- prosody-0.11.8/net/websocket/frames.lua 2020-05-31 22:39:34.000000000 +0200 ++++ prosody-0.11.8/net/websocket/frames.lua.lua54 2020-10-08 22:31:55.998715572 +0200 +@@ -9,8 +9,7 @@ + local softreq = require "util.dependencies".softreq; + local random_bytes = require "util.random".bytes; + +-local bit = assert(softreq"bit" or softreq"bit32", +- "No bit module found. See https://prosody.im/doc/depends#bitop"); ++local bit = require "util.bitcompat"; + local band = bit.band; + local bor = bit.bor; + local lshift = bit.lshift; +--- prosody-0.11.7/util/bit53.lua 1970-01-01 01:00:00.000000000 +0100 ++++ prosody-0.11.7/util/bit53.lua.lua54 2020-10-08 22:31:55.998715572 +0200 +@@ -0,0 +1,7 @@ ++-- Only the operators needed by net.websocket.frames are provided at this point ++return { ++ band = function (a, b) return a & b end; ++ bor = function (a, b) return a | b end; ++ bxor = function (a, b) return a ~ b end; ++}; ++ +--- prosody-0.11.7/util/bitcompat.lua 1970-01-01 01:00:00.000000000 +0100 ++++ prosody-0.11.7/util/bitcompat.lua.lua54 2020-10-08 22:31:55.998715572 +0200 +@@ -0,0 +1,32 @@ ++-- Compatibility layer for bitwise operations ++ ++-- First try the bit32 lib ++-- Lua 5.3 has it with compat enabled ++-- Lua 5.2 has it by default ++if _G.bit32 then ++ return _G.bit32; ++else ++ -- Lua 5.1 may have it as a standalone module that can be installed ++ local ok, bitop = pcall(require, "bit32") ++ if ok then ++ return bitop; ++ end ++end ++ ++do ++ -- Lua 5.3 and 5.4 would be able to use native infix operators ++ local ok, bitop = pcall(require, "util.bit53") ++ if ok then ++ return bitop; ++ end ++end ++ ++do ++ -- Lastly, try the LuaJIT bitop library ++ local ok, bitop = pcall(require, "bit") ++ if ok then ++ return bitop; ++ end ++end ++ ++error "No bit module found. See https://prosody.im/doc/depends#bitop"; +--- prosody-0.11.8/util/dependencies.lua 2020-05-31 22:39:34.000000000 +0200 ++++ prosody-0.11.8/util/dependencies.lua.lua54 2020-10-08 22:32:01.423752075 +0200 +@@ -90,7 +90,7 @@ + }, "SSL/TLS support will not be available"); + end + +- local bit = softreq"bit" or softreq"bit32"; ++ local bit = softreq"util.bitcompat"; + + if not bit then + missingdep("lua-bitops", { +--- prosody-0.11.8/util/async.lua 2021-02-15 16:29:13.000000000 +0100 ++++ prosody-0.11.8/util/async.lua.lua54 2021-02-15 23:20:30.418345334 +0100 +@@ -53,7 +53,7 @@ + return false; + end + call_watcher(runner, "error", debug.traceback(thread, err)); +- runner.state, runner.thread = "ready", nil; ++ runner.state = "ready"; + return runner:run(); + elseif state == "ready" then + -- If state is 'ready', it is our responsibility to update runner.state from 'waiting'. +@@ -159,6 +159,10 @@ + + local q, thread = self.queue, self.thread; + if not thread or coroutine.status(thread) == "dead" then ++ --luacheck: ignore 143/coroutine ++ if coroutine.close then ++ coroutine.close(thread); ++ end + self:log("debug", "creating new coroutine"); + -- Create a new coroutine for this runner + thread = runner_create_thread(self.func, self); diff --git a/prosody.spec b/prosody.spec index 2a18e01..46e6333 100644 --- a/prosody.spec +++ b/prosody.spec @@ -5,13 +5,13 @@ Summary: Flexible communications server for Jabber/XMPP Name: prosody -Version: 0.11.7 -Release: 3%{?dist} +Version: 0.11.8 +Release: 1%{?dist} License: MIT URL: https://prosody.im/ Source0: https://prosody.im/downloads/source/%{name}-%{version}.tar.gz Source1: https://prosody.im/downloads/source/%{name}-%{version}.tar.gz.asc -Source2: gpgkey-32A9EDDE3609931EB98CEAC315907E8E7BDD6BFE.gpg +Source2: gpgkey-3E52119EF853C59678DBBF6BADED9A77B67AD329.gpg Source3: prosody.service Source4: prosody.logrotate Source5: prosody.tmpfilesd @@ -19,10 +19,10 @@ Source6: prosody-localhost.cfg.lua Source7: prosody-example.com.cfg.lua Patch0: prosody-0.11.0-config.patch Patch1: prosody-0.11.4-lua53.patch -Patch2: prosody-0.11.5-lua54.patch -BuildRequires: make +Patch2: prosody-0.11.8-lua54.patch BuildRequires: gnupg2 BuildRequires: gcc +BuildRequires: make BuildRequires: libicu-devel BuildRequires: openssl-devel BuildRequires: lua @@ -162,6 +162,9 @@ fi %{_mandir}/man1/%{name}*.1* %changelog +* Mon Feb 15 2021 Robert Scheck 0.11.8-1 +- Upgrade to 0.11.8 (#1928951) + * Wed Jan 27 2021 Fedora Release Engineering - 0.11.7-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild diff --git a/sources b/sources index 52bf2f9..f3057c9 100644 --- a/sources +++ b/sources @@ -1,4 +1,4 @@ SHA512 (gpgkey-32A9EDDE3609931EB98CEAC315907E8E7BDD6BFE.gpg) = daf6d670d3283aac1860cbb77977b0aa17724f41aa517d00e34054ef99a7c571b1d7d33b690824689124dc757dd89fdd43fe5a531b46183fffc22cd4d638a8ae SHA512 (gpgkey-3E52119EF853C59678DBBF6BADED9A77B67AD329.gpg) = e68af731a075af006129e7f206649ce44791b152a9ddb0abffc5acbaae5e28582cf38a3cdb1943e6170c5e189a535c650f567605394d86c22f8f7430f82dfdda -SHA512 (prosody-0.11.7.tar.gz) = 923aa92598ef851ed8408931942859f78f1e3d700fee251f4f5ca67abdcdae43448318ed90a9a1cdc7824d5f4dc5a4732fad4b9ed36d97455fa9b3bff0881a20 -SHA512 (prosody-0.11.7.tar.gz.asc) = 4f5e2ba773265fb91732305a626c3251b39bacb3f619b9cf083d08209e70ad1c0fb82111dba455f47ecc74eb0036bc5f931d1acd1d4bc43f33cfc63c855a3058 +SHA512 (prosody-0.11.8.tar.gz) = b0b7e1d3e41f47f0f88ad5b76444e4959b20f4c7a937f3cc605ba6ed5d92e713a3054dcb61ee6629063883a8f9ff1a03952893de4a0d840dcec4e5e42079eb57 +SHA512 (prosody-0.11.8.tar.gz.asc) = c6bce0eb14bddd6af5cade09876500335ec1e9f3560089d4c772b6ce7bbf77b9d0e9e8d7d714c485119e8eead068e1a2bd23ab47b9c21db83eb101e0a3e90c47