diff --git a/prosody-0.11.2-lua53.patch b/prosody-0.11.2-lua53.patch deleted file mode 100644 index 4733885..0000000 --- a/prosody-0.11.2-lua53.patch +++ /dev/null @@ -1,57 +0,0 @@ -https://hg.prosody.im/trunk/log?rev=only%28%22tip%22%2C+%220.11.2%22%29+and+keyword%28%22lua+5.3%22%29 - ---- prosody-0.11.2/util/dependencies.lua 2019-01-07 16:34:23.000000000 +0100 -+++ prosody-0.11.2/util/dependencies.lua.lua53 2019-07-25 22:36:39.000000000 +0200 -@@ -140,7 +140,7 @@ - end - - local function log_warnings() -- if _VERSION > "Lua 5.2" then -+ if _VERSION > "Lua 5.3" then - prosody.log("warn", "Support for %s is experimental, please report any issues", _VERSION); - end - local ssl = softreq"ssl"; ---- prosody-0.11.2/spec/util_format_spec.lua 2019-01-07 16:34:23.000000000 +0100 -+++ prosody-0.11.2/spec/util_format_spec.lua.lua53 2019-07-25 22:35:02.000000000 +0200 -@@ -9,6 +9,8 @@ - assert.equal("true", format("%s", true)); - assert.equal("[true]", format("%d", true)); - assert.equal("% [true]", format("%%", true)); -+ assert.equal("{ }", format("%q", { })); -+ assert.equal("[1.5]", format("%d", 1.5)); - end); - end); - end); ---- prosody-0.11.2/util/format.lua 2019-01-07 16:34:23.000000000 +0100 -+++ prosody-0.11.2/util/format.lua.lua53 2019-07-25 22:36:05.000000000 +0200 -@@ -6,6 +6,9 @@ - local select = select; - local unpack = table.unpack or unpack; -- luacheck: ignore 113/unpack - local type = type; -+local num_type = math.type; -+ -+local expects_integer = num_type and { c = true, d = true, i = true, o = true, u = true, X = true, x = true, } or {}; - - local function format(formatstring, ...) - local args, args_length = { ... }, select('#', ...); -@@ -39,6 +42,9 @@ - elseif type(arg) ~= "number" then -- arg isn't number as expected? - args[i] = tostring(arg); - spec = "[%s]"; -+ elseif expects_integer[option] and num_type(arg) ~= "integer" then -+ args[i] = tostring(arg); -+ spec = "[%s]"; - end - end - return spec; ---- prosody-0.11.2/plugins/mod_admin_telnet.lua 2019-01-07 16:34:23.000000000 +0100 -+++ prosody-0.11.2/plugins/mod_admin_telnet.lua.lua53 2019-07-25 22:34:19.000000000 +0200 -@@ -1207,7 +1207,7 @@ - --do return tostring(value) end - if type == "duration" then - if ref_value < 0.001 then -- return ("%d µs"):format(value*1000000); -+ return ("%g µs"):format(value*1000000); - elseif ref_value < 0.9 then - return ("%0.2f ms"):format(value*1000); - end diff --git a/prosody-0.11.4-lua53.patch b/prosody-0.11.4-lua53.patch new file mode 100644 index 0000000..7022555 --- /dev/null +++ b/prosody-0.11.4-lua53.patch @@ -0,0 +1,141 @@ +https://hg.prosody.im/trunk/log?rev=only%28%22tip%22%2C+%220.11.2%22%29+and+keyword%28%22lua+5.3%22%29 + +--- prosody-0.11.4/plugins/mod_admin_telnet.lua 2020-01-02 10:49:37.000000000 +0100 ++++ prosody-0.11.4/plugins/mod_admin_telnet.lua.lua53 2020-02-10 01:22:04.338037958 +0100 +@@ -1207,7 +1207,7 @@ + --do return tostring(value) end + if type == "duration" then + if ref_value < 0.001 then +- return ("%d µs"):format(value*1000000); ++ return ("%g µs"):format(value*1000000); + elseif ref_value < 0.9 then + return ("%0.2f ms"):format(value*1000); + end +--- prosody-0.11.4/spec/util_format_spec.lua 2020-01-02 10:49:37.000000000 +0100 ++++ prosody-0.11.4/spec/util_format_spec.lua.lua53 2020-02-10 01:22:04.337037950 +0100 +@@ -9,6 +9,8 @@ + assert.equal("true", format("%s", true)); + assert.equal("[true]", format("%d", true)); + assert.equal("% [true]", format("%%", true)); ++ assert.equal("{ }", format("%q", { })); ++ assert.equal("[1.5]", format("%d", 1.5)); + end); + end); + end); +--- prosody-0.11.4/spec/util_json_spec.lua 2020-01-02 10:49:37.000000000 +0100 ++++ prosody-0.11.4/spec/util_json_spec.lua.lua53 2020-02-10 01:25:25.036574135 +0100 +@@ -1,5 +1,6 @@ + + local json = require "util.json"; ++local array = require "util.array"; + + describe("util.json", function() + describe("#encode()", function() +@@ -67,4 +68,13 @@ + end + end); + end) ++ ++ describe("util.array integration", function () ++ it("works", function () ++ assert.equal("[]", json.encode(array())); ++ assert.equal("[1,2,3]", json.encode(array({1,2,3}))); ++ assert.equal(getmetatable(array()), getmetatable(json.decode("[]"))); ++ end); ++ end); ++ + end); +--- prosody-0.11.4/util/array.lua 2020-01-02 10:49:37.000000000 +0100 ++++ prosody-0.11.4/util/array.lua.lua53 2020-02-10 01:24:20.088079855 +0100 +@@ -10,6 +10,7 @@ + = table.insert, table.sort, table.remove, table.concat; + + local setmetatable = setmetatable; ++local getmetatable = getmetatable; + local math_random = math.random; + local math_floor = math.floor; + local pairs, ipairs = pairs, ipairs; +@@ -40,6 +41,10 @@ + end + + function array_mt.__eq(a, b) ++ if getmetatable(a) ~= array_mt or getmetatable(b) ~= array_mt then ++ -- Lua 5.3+ calls this if both operands are tables, even if metatables differ ++ return false; ++ end + if #a == #b then + for i = 1, #a do + if a[i] ~= b[i] then +--- prosody-0.11.4/util/dependencies.lua 2020-01-02 10:49:37.000000000 +0100 ++++ prosody-0.11.4/util/dependencies.lua.lua53 2020-02-10 01:22:04.337037950 +0100 +@@ -140,7 +140,7 @@ + end + + local function log_warnings() +- if _VERSION > "Lua 5.2" then ++ if _VERSION > "Lua 5.3" then + prosody.log("warn", "Support for %s is experimental, please report any issues", _VERSION); + end + local ssl = softreq"ssl"; +--- prosody-0.11.4/util/format.lua 2020-01-02 10:49:37.000000000 +0100 ++++ prosody-0.11.4/util/format.lua.lua53 2020-02-10 01:22:04.338037958 +0100 +@@ -6,6 +6,9 @@ + local select = select; + local unpack = table.unpack or unpack; -- luacheck: ignore 113/unpack + local type = type; ++local num_type = math.type; ++ ++local expects_integer = num_type and { c = true, d = true, i = true, o = true, u = true, X = true, x = true, } or {}; + + local function format(formatstring, ...) + local args, args_length = { ... }, select('#', ...); +@@ -39,6 +42,9 @@ + elseif type(arg) ~= "number" then -- arg isn't number as expected? + args[i] = tostring(arg); + spec = "[%s]"; ++ elseif expects_integer[option] and num_type(arg) ~= "integer" then ++ args[i] = tostring(arg); ++ spec = "[%s]"; + end + end + return spec; +--- prosody-0.11.4/util/ip.lua 2020-01-02 10:49:37.000000000 +0100 ++++ prosody-0.11.4/util/ip.lua.lua53 2020-02-10 01:23:34.117728556 +0100 +@@ -19,8 +19,14 @@ + return ret; + end, + __tostring = function (ip) return ip.addr; end, +- __eq = function (ipA, ipB) return ipA.packed == ipB.packed; end + }; ++ip_mt.__eq = function (ipA, ipB) ++ if getmetatable(ipA) ~= ip_mt or getmetatable(ipB) ~= ip_mt then ++ -- Lua 5.3+ calls this if both operands are tables, even if metatables differ ++ return false; ++ end ++ return ipA.packed == ipB.packed; ++end + + local hex2bits = { + ["0"] = "0000", ["1"] = "0001", ["2"] = "0010", ["3"] = "0011", +--- prosody-0.11.4/util/set.lua 2020-01-02 10:49:37.000000000 +0100 ++++ prosody-0.11.4/util/set.lua.lua53 2020-02-10 01:22:59.838465654 +0100 +@@ -8,6 +8,7 @@ + + local ipairs, pairs, setmetatable, next, tostring = + ipairs, pairs, setmetatable, next, tostring; ++local getmetatable = getmetatable; + local t_concat = table.concat; + + local _ENV = nil; +@@ -146,6 +147,11 @@ + return new_set; + end + function set_mt.__eq(set1, set2) ++ if getmetatable(set1) ~= set_mt or getmetatable(set2) ~= set_mt then ++ -- Lua 5.3+ calls this if both operands are tables, even if metatables differ ++ return false; ++ end ++ + set1, set2 = set1._items, set2._items; + for item in pairs(set1) do + if not set2[item] then diff --git a/prosody.spec b/prosody.spec index ec527a2..b45cb64 100644 --- a/prosody.spec +++ b/prosody.spec @@ -9,13 +9,13 @@ Summary: Flexible communications server for Jabber/XMPP Name: prosody -Version: 0.11.3 -Release: 2%{?dist} +Version: 0.11.4 +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.init Source4: prosody.logrotate-init Source5: prosody.service @@ -24,7 +24,7 @@ Source7: prosody.tmpfilesd Source8: prosody-localhost.cfg.lua Source9: prosody-example.com.cfg.lua Patch0: prosody-0.11.0-config.patch -Patch1: prosody-0.11.2-lua53.patch +Patch1: prosody-0.11.4-lua53.patch BuildRequires: gcc, libidn-devel, openssl-devel BuildRequires: gnupg2 Requires: %{_bindir}/openssl @@ -214,6 +214,9 @@ fi %{_mandir}/man1/%{name}*.1* %changelog +* Mon Feb 10 2020 Robert Scheck 0.11.4-1 +- Upgrade to 0.11.4 (#1792635) + * Thu Jan 30 2020 Fedora Release Engineering - 0.11.3-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild diff --git a/sources b/sources index 9875f03..afaea2b 100644 --- a/sources +++ b/sources @@ -1,3 +1,4 @@ SHA512 (gpgkey-32A9EDDE3609931EB98CEAC315907E8E7BDD6BFE.gpg) = daf6d670d3283aac1860cbb77977b0aa17724f41aa517d00e34054ef99a7c571b1d7d33b690824689124dc757dd89fdd43fe5a531b46183fffc22cd4d638a8ae -SHA512 (prosody-0.11.3.tar.gz) = 07239433c7c65184ca24d665c92b787ff9e4a5ee190ab90dede802ffd2cbd97855356d818858871e62284e9923f485b3468ab1baed5d3fb13aac0551a38967eb -SHA512 (prosody-0.11.3.tar.gz.asc) = 1557ec078f87a305fbe5046b9dae02c8cf23c5f7e173370bede146466dab00196704176868a8a48f4aacf50057d1dcf8979e3eab32699a5fdcdf3ec1909a99a1 +SHA512 (gpgkey-3E52119EF853C59678DBBF6BADED9A77B67AD329.gpg) = e68af731a075af006129e7f206649ce44791b152a9ddb0abffc5acbaae5e28582cf38a3cdb1943e6170c5e189a535c650f567605394d86c22f8f7430f82dfdda +SHA512 (prosody-0.11.4.tar.gz) = 0c3aa3373c53f803b88a87dad4ca18b215de7a485d29b0bc4b186d97f7c48262840199a74f62aba6b7b4f1766fdfb37327ed4ff24e877c3a6dfca58764a035c3 +SHA512 (prosody-0.11.4.tar.gz.asc) = b9bb9a38253b2a370a170c2a89096ea3491ac7b50c489e3c8aed6de1e6d1ab51400ec2913cc17c7ddfd29051f126439a31008997d0d9de7409360af36f393e13