Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package prosody for openSUSE:Factory checked 
in at 2022-01-04 19:38:16
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/prosody (Old)
 and      /work/SRC/openSUSE:Factory/.prosody.new.1896 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "prosody"

Tue Jan  4 19:38:16 2022 rev:26 rq:943791 version:0.11.11

Changes:
--------
--- /work/SRC/openSUSE:Factory/prosody/prosody.changes  2021-10-21 
23:56:08.764044614 +0200
+++ /work/SRC/openSUSE:Factory/.prosody.new.1896/prosody.changes        
2022-01-04 19:38:59.054047380 +0100
@@ -1,0 +2,20 @@
+Tue Jan  4 15:43:20 UTC 2022 - Michael Vetter <[email protected]>
+
+- Update to 0.11.11:
+  Fixes and improvements:
+  * net.server_epoll: Prioritize network events over timers to improve
+    performance under heavy load
+  * mod_pep: Add some memory usage limits
+  * mod_pep: Prevent creation of services for non-existent users
+  * mod_pep: Free resources on user deletion (needed a restart previously)
+  Minor changes:
+  * mod_pep: Free resources on reload
+  * mod_c2s: Indicate stream secure state in error text when no stream 
features to offer
+  * MUC: Fix logic for access to affiliation lists
+  * net.server_epoll: Improvements to shutdown procedure #1670
+  * net.server_epoll: Fix potential issue with rescheduling of timers
+  * prosodyctl: Fix to ensure LuaFileSystem is loaded when needed
+  * util.startup: Fix handling of unknown command line flags (e.g. -h)
+  * Fix version number reported as ???unknown??? on *BSD
+
+-------------------------------------------------------------------

Old:
----
  prosody-0.11.10.tar.gz
  prosody-0.11.10.tar.gz.asc

New:
----
  prosody-0.11.11.tar.gz
  prosody-0.11.11.tar.gz.asc

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ prosody.spec ++++++
--- /var/tmp/diff_new_pack.2FKwvm/_old  2022-01-04 19:38:59.706048233 +0100
+++ /var/tmp/diff_new_pack.2FKwvm/_new  2022-01-04 19:38:59.710048238 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package prosody
 #
-# Copyright (c) 2021 SUSE LLC
+# Copyright (c) 2022 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -18,7 +18,7 @@
 
 %define _piddir /run
 Name:           prosody
-Version:        0.11.10
+Version:        0.11.11
 Release:        0
 Summary:        Communications server for Jabber/XMPP
 License:        MIT

++++++ prosody-0.11.10.tar.gz -> prosody-0.11.11.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/prosody-0.11.10/.hg_archival.txt 
new/prosody-0.11.11/.hg_archival.txt
--- old/prosody-0.11.10/.hg_archival.txt        2021-08-03 11:53:04.326141067 
+0200
+++ new/prosody-0.11.11/.hg_archival.txt        2021-12-20 20:02:14.576898558 
+0100
@@ -1,4 +1,4 @@
 repo: 3e3171b59028ee70122cfec6ecf98f518f946b59
-node: d117b92fd8e459170a98a8dece7f3930f4b6aed7
+node: 76b4e3f12b53fedae96402d87fa9ee79e704ce5e
 branch: 0.11
-tag: 0.11.10
+tag: 0.11.11
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/prosody-0.11.10/makefile new/prosody-0.11.11/makefile
--- old/prosody-0.11.10/makefile        2021-08-03 11:53:04.326141067 +0200
+++ new/prosody-0.11.11/makefile        2021-12-20 20:02:14.576898558 +0100
@@ -90,12 +90,12 @@
        sed 's|certs/|$(INSTALLEDCONFIG)/certs/|' prosody.cfg.lua.dist > $@
 
 prosody.version:
-       test -f prosody.release && \
-               cp prosody.release $@ || \
-               test -f .hg_archival.txt && \
-               sed -n 's/^node: \(............\).*/\1/p' .hg_archival.txt > $@ 
|| \
-               test -f .hg/dirstate && \
-               hexdump -n6 -e'6/1 "%02x"' .hg/dirstate > $@ || \
-               echo unknown > $@
-
-
+       if [ -f prosody.release ]; then \
+               cp prosody.release $@; \
+       elif [ -f .hg_archival.txt ]; then \
+               sed -n 's/^node: \(............\).*/\1/p' .hg_archival.txt > 
$@; \
+       elif [ -f .hg/dirstate ]; then \
+               hexdump -n6 -e'6/1 "%02x"' .hg/dirstate > $@; \
+       else \
+               echo unknown > $@; \
+       fi
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/prosody-0.11.10/net/server_epoll.lua 
new/prosody-0.11.11/net/server_epoll.lua
--- old/prosody-0.11.10/net/server_epoll.lua    2021-08-03 11:53:04.326141067 
+0200
+++ new/prosody-0.11.11/net/server_epoll.lua    2021-12-20 20:02:14.576898558 
+0100
@@ -58,6 +58,9 @@
        -- Maximum and minimum amount of time to sleep waiting for events 
(adjusted for pending timers)
        max_wait = 86400;
        min_wait = 1e-06;
+
+       --- How long to wait after getting the shutdown signal before 
forcefully tearing down every socket
+       shutdown_deadline = 5;
 }};
 local cfg = default_config.__index;
 
@@ -122,8 +125,8 @@
        end
 
        if readd then
-               for _, timer in pairs(readd) do
-                       timers:insert(timer, timer[1]);
+               for id, timer in pairs(readd) do
+                       timers:insert(timer, timer[1], id);
                end
                peek = timers:peek();
        end
@@ -743,6 +746,21 @@
        if quit then
                quitting = "quitting";
                closeall();
+               addtimer(1, function ()
+                       if quitting then
+                               closeall();
+                               return 1;
+                       end
+               end);
+               if cfg.shutdown_deadline then
+                       addtimer(cfg.shutdown_deadline, function ()
+                               if quitting then
+                                       for fd, conn in pairs(fds) do -- 
luacheck: ignore 213/fd
+                                               conn:destroy();
+                                       end
+                               end
+                       end);
+               end
        else
                quitting = nil;
        end
@@ -753,7 +771,7 @@
        repeat
                local t = runtimers(cfg.max_wait, cfg.min_wait);
                local fd, r, w = poll:wait(t);
-               if fd then
+               while fd do
                        local conn = fds[fd];
                        if conn then
                                if r then
@@ -766,7 +784,9 @@
                                log("debug", "Removing unknown fd %d", fd);
                                poll:del(fd);
                        end
-               elseif r ~= "timeout" and r ~= "signal" then
+                       fd, r, w = poll:wait(0);
+               end
+               if r ~= "timeout" and r ~= "signal" then
                        log("debug", "epoll_wait error: %s[%d]", r, w);
                end
        until once or (quitting and next(fds) == nil);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/prosody-0.11.10/plugins/mod_c2s.lua 
new/prosody-0.11.11/plugins/mod_c2s.lua
--- old/prosody-0.11.10/plugins/mod_c2s.lua     2021-08-03 11:53:04.326141067 
+0200
+++ new/prosody-0.11.11/plugins/mod_c2s.lua     2021-12-20 20:02:14.576898558 
+0100
@@ -108,7 +108,10 @@
                send(features);
        else
                (session.log or log)("warn", "No stream features to offer");
-               session:close{ condition = "undefined-condition", text = "No 
stream features to proceed with" };
+               session:close({
+                       condition = "undefined-condition";
+                       text = "No stream features to proceed with on 
"..(session.secure and "" or "in").."secure stream";
+               });
        end
 end
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/prosody-0.11.10/plugins/mod_pep.lua 
new/prosody-0.11.11/plugins/mod_pep.lua
--- old/prosody-0.11.10/plugins/mod_pep.lua     2021-08-03 11:53:04.326141067 
+0200
+++ new/prosody-0.11.11/plugins/mod_pep.lua     2021-12-20 20:02:14.576898558 
+0100
@@ -9,6 +9,7 @@
 local cache = require "util.cache";
 local set = require "util.set";
 local storagemanager = require "core.storagemanager";
+local usermanager = require "core.usermanager";
 
 local xmlns_pubsub = "http://jabber.org/protocol/pubsub";;
 local xmlns_pubsub_event = "http://jabber.org/protocol/pubsub#event";;
@@ -18,14 +19,29 @@
 
 local empty_set = set_new();
 
+-- username -> object passed to module:add_items()
+local pep_service_items = {};
+
+-- size of caches with full pubsub service objects
+local service_cache_size = module:get_option_number("pep_service_cache_size", 
1000);
+
 -- username -> util.pubsub service object
-local services = {};
+local services = cache.new(service_cache_size, function (username, _)
+       local item = pep_service_items[username];
+       pep_service_items[username] = nil;
+       if item then
+               module:remove_item("pep-service", item);
+       end
+end):table();
+
+-- size of caches with smaller objects
+local info_cache_size = module:get_option_number("pep_info_cache_size", 10000);
 
 -- username -> recipient -> set of nodes
-local recipients = {};
+local recipients = cache.new(info_cache_size):table();
 
 -- caps hash -> set of nodes
-local hash_map = {};
+local hash_map = cache.new(info_cache_size):table();
 
 local host = module.host;
 
@@ -36,18 +52,12 @@
 
 function module.save()
        return {
-               services = services;
                recipients = recipients;
        };
 end
 
 function module.restore(data)
-       services = data.services;
        recipients = data.recipients;
-       for username, service in pairs(services) do
-               local user_bare = jid_join(username, host);
-               module:add_item("pep-service", { service = service, jid = 
user_bare });
-       end
 end
 
 function is_item_stanza(item)
@@ -165,6 +175,17 @@
        end
 end
 
+local nobody_service = pubsub.new({
+       service = pubsub.new({
+               node_defaults = {
+                       ["max_items"] = 1;
+                       ["persist_items"] = false;
+                       ["access_model"] = "presence";
+                       ["send_last_published_item"] = "on_sub_and_presence";
+               };
+       });
+});
+
 function get_pep_service(username)
        module:log("debug", "get_pep_service(%q)", username);
        local user_bare = jid_join(username, host);
@@ -172,6 +193,9 @@
        if service then
                return service;
        end
+       if not usermanager.user_exists(username, host) then
+               return nobody_service;
+       end
        service = pubsub.new({
                pep_username = username;
                node_defaults = {
@@ -208,7 +232,9 @@
                check_node_config = check_node_config;
        });
        services[username] = service;
-       module:add_item("pep-service", { service = service, jid = user_bare });
+       local item = { service = service, jid = user_bare }
+       pep_service_items[username] = item;
+       module:add_item("pep-service", item);
        return service;
 end
 
@@ -441,3 +467,18 @@
                reply:tag("item", { jid = user_bare, node = node, name = 
node_obj.config.title }):up();
        end
 end);
+
+module:hook_global("user-deleted", function(event)
+       if event.host ~= host then return end
+       local username = event.username;
+       local service = services[username];
+       if not service then return end
+       for node in pairs(service.nodes) do service:delete(node, true); end
+
+       local item = pep_service_items[username];
+       pep_service_items[username] = nil;
+       if item then module:remove_item("pep-service", item); end
+
+       recipients[username] = nil;
+end);
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/prosody-0.11.10/prosody.release 
new/prosody-0.11.11/prosody.release
--- old/prosody-0.11.10/prosody.release 2021-08-03 11:53:04.326141067 +0200
+++ new/prosody-0.11.11/prosody.release 2021-12-20 20:02:14.576898558 +0100
@@ -1 +1 @@
-0.11.10
+0.11.11
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/prosody-0.11.10/prosodyctl 
new/prosody-0.11.11/prosodyctl
--- old/prosody-0.11.10/prosodyctl      2021-08-03 11:53:04.326141067 +0200
+++ new/prosody-0.11.11/prosodyctl      2021-12-20 20:02:14.576898558 +0100
@@ -203,7 +203,7 @@
        if prosody.installed and configmanager.get("*", 
"prosodyctl_service_warnings") ~= false then
                show_warning("WARNING: Use of prosodyctl 
start/stop/restart/reload is not recommended");
                show_warning("         if Prosody is managed by an init system 
- use that directly instead.");
-               lfs = lfs or require
+               lfs = lfs or require"lfs";
                if lfs.attributes("/etc/systemd") then
                        show_warning("         e.g. systemctl %s prosody", 
service_command);
                elseif lfs.attributes("/etc/init.d/prosody") then
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/prosody-0.11.10/util/startup.lua 
new/prosody-0.11.11/util/startup.lua
--- old/prosody-0.11.10/util/startup.lua        2021-08-03 11:53:04.326141067 
+0200
+++ new/prosody-0.11.11/util/startup.lua        2021-12-20 20:02:14.576898558 
+0100
@@ -49,7 +49,7 @@
                end
 
                if not param then
-                       print("Unknown command-line option: "..tostring(param));
+                       print("Unknown command-line option: 
"..tostring(raw_param));
                        print("Perhaps you meant to use prosodyctl instead?");
                        os.exit(1);
                end

Reply via email to