Hello community, here is the log from the commit of package prosody for openSUSE:Factory checked in at 2020-03-26 23:33:19 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/prosody (Old) and /work/SRC/openSUSE:Factory/.prosody.new.3160 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "prosody" Thu Mar 26 23:33:19 2020 rev:19 rq:788427 version:0.11.5 Changes: -------- --- /work/SRC/openSUSE:Factory/prosody/prosody.changes 2020-01-20 22:53:08.979290541 +0100 +++ /work/SRC/openSUSE:Factory/.prosody.new.3160/prosody.changes 2020-03-26 23:33:24.394777909 +0100 @@ -1,0 +2,11 @@ +Thu Mar 26 07:29:08 UTC 2020 - Michael Vetter <mvet...@suse.com> + +- Update to 0.11.5: + Fixes and improvements: + * prosody / mod_posix: Support for command-line flags to + override ‘daemonize’ config option + Minor changes: + * mod_websocket: Clear mask bit when reflecting ping frames + (fixes #1484: Websocket masks pong answer) + +------------------------------------------------------------------- Old: ---- prosody-0.11.4.tar.gz prosody-0.11.4.tar.gz.asc New: ---- prosody-0.11.5.tar.gz prosody-0.11.5.tar.gz.asc ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ prosody.spec ++++++ --- /var/tmp/diff_new_pack.OokcCQ/_old 2020-03-26 23:33:25.134778176 +0100 +++ /var/tmp/diff_new_pack.OokcCQ/_new 2020-03-26 23:33:25.134778176 +0100 @@ -1,7 +1,7 @@ # # spec file for package prosody # -# Copyright (c) 2020 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2020 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.4 +Version: 0.11.5 Release: 0 Summary: Communications server for Jabber/XMPP License: MIT ++++++ prosody-0.11.4.tar.gz -> prosody-0.11.5.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/prosody-0.11.4/.hg_archival.txt new/prosody-0.11.5/.hg_archival.txt --- old/prosody-0.11.4/.hg_archival.txt 2020-01-02 10:49:37.000000000 +0100 +++ new/prosody-0.11.5/.hg_archival.txt 2020-01-19 16:50:32.000000000 +0100 @@ -1,4 +1,4 @@ repo: 3e3171b59028ee70122cfec6ecf98f518f946b59 -node: 10d6d0d91f4ec47a6eb446792fee1d4b79a914d7 +node: dbd60f47316492bc367802914dc8fa47f4b3edac branch: 0.11 -tag: 0.11.4 +tag: 0.11.5 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/prosody-0.11.4/plugins/mod_posix.lua new/prosody-0.11.5/plugins/mod_posix.lua --- old/prosody-0.11.4/plugins/mod_posix.lua 2020-01-02 10:49:37.000000000 +0100 +++ new/prosody-0.11.5/plugins/mod_posix.lua 2020-01-19 16:50:32.000000000 +0100 @@ -126,7 +126,12 @@ end require "core.loggingmanager".register_sink_type("syslog", syslog_sink_maker); -local daemonize = module:get_option("daemonize", prosody.installed); +local daemonize = prosody.opts.daemonize; + +if daemonize == nil then + -- Fall back to config file if not specified on command-line + daemonize = module:get_option("daemonize", prosody.installed); +end local function remove_log_sinks() local lm = require "core.loggingmanager"; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/prosody-0.11.4/prosody new/prosody-0.11.5/prosody --- old/prosody-0.11.4/prosody 2020-01-02 10:49:37.000000000 +0100 +++ new/prosody-0.11.5/prosody 2020-01-19 16:50:32.000000000 +0100 @@ -43,11 +43,7 @@ end end -if #arg > 0 and arg[1] ~= "--config" then - print("Unknown command-line option: "..tostring(arg[1])); - print("Perhaps you meant to use prosodyctl instead?"); - return 1; -end + local startup = require "util.startup"; local async = require "util.async"; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/prosody-0.11.4/prosody.release new/prosody-0.11.5/prosody.release --- old/prosody-0.11.4/prosody.release 2020-01-06 18:35:05.000000000 +0100 +++ new/prosody-0.11.5/prosody.release 2020-01-19 17:10:27.000000000 +0100 @@ -1 +1 @@ -0.11.4 +0.11.5 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/prosody-0.11.4/util/startup.lua new/prosody-0.11.5/util/startup.lua --- old/prosody-0.11.4/util/startup.lua 2020-01-02 10:49:37.000000000 +0100 +++ new/prosody-0.11.5/util/startup.lua 2020-01-19 16:50:32.000000000 +0100 @@ -12,16 +12,70 @@ local original_logging_config; +local short_params = { D = "daemonize", F = "no-daemonize" }; +local value_params = { config = true }; + +function startup.parse_args() + local parsed_opts = {}; + prosody.opts = parsed_opts; + + if #arg == 0 then + return; + end + while true do + local raw_param = arg[1]; + if not raw_param then + break; + end + + local prefix = raw_param:match("^%-%-?"); + if not prefix then + break; + elseif prefix == "--" and raw_param == "--" then + table.remove(arg, 1); + break; + end + local param = table.remove(arg, 1):sub(#prefix+1); + if #param == 1 then + param = short_params[param]; + end + + if not param then + print("Unknown command-line option: "..tostring(param)); + print("Perhaps you meant to use prosodyctl instead?"); + os.exit(1); + end + + local param_k, param_v; + if value_params[param] then + param_k, param_v = param, table.remove(arg, 1); + if not param_v then + print("Expected a value to follow command-line option: "..raw_param); + os.exit(1); + end + else + param_k, param_v = param:match("^([^=]+)=(.+)$"); + if not param_k then + if param:match("^no%-") then + param_k, param_v = param:sub(4), false; + else + param_k, param_v = param, true; + end + end + end + parsed_opts[param_k] = param_v; + end +end + function startup.read_config() local filenames = {}; local filename; - if arg[1] == "--config" and arg[2] then - table.insert(filenames, arg[2]); + if prosody.opts.config then + table.insert(filenames, prosody.opts.config); if CFG_CONFIGDIR then - table.insert(filenames, CFG_CONFIGDIR.."/"..arg[2]); + table.insert(filenames, CFG_CONFIGDIR.."/"..prosody.opts.config); end - table.remove(arg, 1); table.remove(arg, 1); elseif os.getenv("PROSODY_CONFIG") then -- Passed by prosodyctl table.insert(filenames, os.getenv("PROSODY_CONFIG")); else @@ -405,8 +459,7 @@ os.exit(1); end prosody.current_uid = pposix.getuid(); - local arg_root = arg[1] == "--root"; - if arg_root then table.remove(arg, 1); end + local arg_root = prosody.opts.root; if prosody.current_uid == 0 and config.get("*", "run_as_root") ~= true and not arg_root then -- We haz root! local desired_user = config.get("*", "prosody_user") or "prosody"; @@ -515,6 +568,7 @@ -- prosodyctl only function startup.prosodyctl() + startup.parse_args(); startup.init_global_state(); startup.read_config(); startup.force_console_logging(); @@ -535,6 +589,7 @@ function startup.prosody() -- These actions are in a strict order, as many depend on -- previous steps to have already been performed + startup.parse_args(); startup.init_global_state(); startup.read_config(); startup.init_logging();