Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package Srain for openSUSE:Factory checked in at 2021-12-18 20:30:18 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/Srain (Old) and /work/SRC/openSUSE:Factory/.Srain.new.2520 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "Srain" Sat Dec 18 20:30:18 2021 rev:10 rq:941389 version:1.3.1 Changes: -------- --- /work/SRC/openSUSE:Factory/Srain/Srain.changes 2021-10-26 20:15:10.562056787 +0200 +++ /work/SRC/openSUSE:Factory/.Srain.new.2520/Srain.changes 2021-12-18 20:31:11.854274249 +0100 @@ -1,0 +2,7 @@ +Sat Dec 18 10:20:18 UTC 2021 - Luigi Baldoni <[email protected]> + +- Update to version 1.3.1 + * Make channel messages with origin out of channels can be shown + * Rejoin channels after NICKSERV authentication finishes + +------------------------------------------------------------------- Old: ---- Srain-1.3.0.tar.gz New: ---- Srain-1.3.1.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ Srain.spec ++++++ --- /var/tmp/diff_new_pack.wC2NFh/_old 2021-12-18 20:31:12.430274569 +0100 +++ /var/tmp/diff_new_pack.wC2NFh/_new 2021-12-18 20:31:12.462274587 +0100 @@ -17,7 +17,7 @@ Name: Srain -Version: 1.3.0 +Version: 1.3.1 Release: 0 Summary: An IRC client License: GPL-3.0-or-later AND ISC ++++++ Srain-1.3.0.tar.gz -> Srain-1.3.1.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/srain-1.3.0/data/metainfo/srain.metainfo.xml.in.in new/srain-1.3.1/data/metainfo/srain.metainfo.xml.in.in --- old/srain-1.3.0/data/metainfo/srain.metainfo.xml.in.in 2021-09-21 13:13:50.000000000 +0200 +++ new/srain-1.3.1/data/metainfo/srain.metainfo.xml.in.in 2021-12-18 04:52:51.000000000 +0100 @@ -68,6 +68,9 @@ </content_rating> <releases> + <release version="1.3.1" date="2021-12-18"> + <url>https://doc.srain.im/en/latest/changelog.html#version-1-3-1</url> + </release> <release version="1.3" date="2021-09-21"> <url>https://doc.srain.im/en/latest/changelog.html#version-1-3-0</url> </release> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/srain-1.3.0/doc/changelog.rst new/srain-1.3.1/doc/changelog.rst --- old/srain-1.3.0/doc/changelog.rst 2021-09-21 13:13:50.000000000 +0200 +++ new/srain-1.3.1/doc/changelog.rst 2021-12-18 04:52:51.000000000 +0100 @@ -30,6 +30,17 @@ .. _version-latest: +.. _version-1.3.1: + +2021-12-18 Version 1.3.1 +======================== + +- Bug fixes: + + - Fix build of macOS (:pull:`339`), by @SilverRainZ + - Make channel messages with origin out of channels can be shown (:pull:`336`), by @progval + - Rejoin channels after NICKSERV authentication finishes (:issue:`274`), by @SilverRainZ + .. _version-1.3: 2021-09-23 Version 1.3.0 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/srain-1.3.0/doc/conf.py new/srain-1.3.1/doc/conf.py --- old/srain-1.3.0/doc/conf.py 2021-09-21 13:13:50.000000000 +0200 +++ new/srain-1.3.1/doc/conf.py 2021-12-18 04:52:51.000000000 +0100 @@ -47,7 +47,7 @@ # General information about the project. project = 'Srain' -copyright = '2017, Shengyu Zhang' +copyright = '2021, Shengyu Zhang' author = 'Shengyu Zhang' # The version info for the project you're documenting, acts as replacement for @@ -55,9 +55,9 @@ # built documents. # # The short X.Y version. -version = '1.3.0' +version = '1.3.1' # The full version, including alpha/beta/rc tags. -release = '1.3.0' +release = version # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. @@ -175,12 +175,12 @@ extensions.append('sphinx.ext.extlinks') extlinks = { - 'issue': ('https://github.com/SrainApp/srain/issues/%s', 'srain#'), - 'pull': ('https://github.com/SrainApp/srain/pull/%s', 'srain#'), + 'issue': ('https://github.com/SrainApp/srain/issues/%s', '#'), + 'pull': ('https://github.com/SrainApp/srain/pull/%s', '#'), 'commit': ('https://github.com/SrainApp/srain/commit/%s', ''), - 'contrib-issue': ('https://github.com/SrainApp/srain-contrib/issues/%s', 'srain-contrib#'), - 'contrib-pull': ('https://github.com/SrainApp/srain-contrib/pull/%s', 'srain-contrib#'), + 'contrib-issue': ('https://github.com/SrainApp/srain-contrib/issues/%s', 'contrib#'), + 'contrib-pull': ('https://github.com/SrainApp/srain-contrib/pull/%s', 'contrib#'), 'contrib-commit': ('https://github.com/SrainApp/srain/commit/%s', ''), 'people': ('https://github.com/%s', '@'), diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/srain-1.3.0/doc/install.rst new/srain-1.3.1/doc/install.rst --- old/srain-1.3.0/doc/install.rst 2021-09-21 13:13:50.000000000 +0200 +++ new/srain-1.3.1/doc/install.rst 2021-12-18 04:52:51.000000000 +0100 @@ -33,6 +33,7 @@ libsecret openssl python-sphinx Optional, for building documentation +adwaita-icon-theme Or other icon themes =================== =================================================== ======== .. _install-building: @@ -290,7 +291,14 @@ .. code-block:: console $ brew install coreutils gcc pkg-config # building - $ brew install gettext glib-networking gtk+3 libsoup libconfig + $ brew install gettext glib-networking gtk+3 libsoup libconfig openssl adwaita-icon-theme + +Next, tell `pkg-config` where to find the libraries we just installed: + +.. code-block:: console + + export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:"/usr/local/opt/icu4c/lib/pkgconfig" + export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:"/usr/local/opt/openssl@3/lib/pkgconfig" .. _Homebrew: https://brew.sh/ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/srain-1.3.0/meson.build new/srain-1.3.1/meson.build --- old/srain-1.3.0/meson.build 2021-09-21 13:13:50.000000000 +0200 +++ new/srain-1.3.1/meson.build 2021-12-18 04:52:51.000000000 +0100 @@ -4,7 +4,7 @@ project( 'srain', 'c', - version: '1.3.0', + version: '1.3.1', license: 'GPL3', meson_version: '>= 0.45.0' ) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/srain-1.3.0/src/core/app_irc_event.c new/srain-1.3.1/src/core/app_irc_event.c --- old/srain-1.3.0/src/core/app_irc_event.c 2021-09-21 13:13:50.000000000 +0200 +++ new/srain-1.3.1/src/core/app_irc_event.c 2021-12-18 04:52:51.000000000 +0100 @@ -44,6 +44,8 @@ static gboolean do_period_ping(gpointer user_data); static void add_numeric_error_message(SrnChat *chat, int event, const char *origin, const char **params, int count); +static void rejoin_all_channels(SrnServer *srv); +static gboolean rejoin_all_channels_cb(gpointer user_data); static void irc_event_connect(SircSession *sirc, const char *event); static void irc_event_connect_fail(SircSession *sirc, const char *event, @@ -312,7 +314,6 @@ bool try_login; bool nick_match; const char *nick ; - GList *list; SrnServer *srv; g_return_if_fail(count >= 1); @@ -376,21 +377,18 @@ srn_chat_add_misc_message_fmt(srv->chat, _("Logging in with %1$s..."), srn_login_method_to_string(srv->cfg->user->login->method)); + // Rejoin after 8s, We hope to complete the auth within it + g_timeout_add(8 * 1000, rejoin_all_channels_cb, srv); + return; } else { srn_chat_add_error_message(srv->chat, _("The assigned nickname does not match the requested nickname, login skipped")); } } - /* Join all channels already exists */ - list = srv->chat_list; - while (list){ - SrnChat *chat = list->data; - if (sirc_target_is_channel(srv->irc, chat->name)){ - sirc_cmd_join(srv->irc, chat->name, chat->cfg->password); - } - list = g_list_next(list); - } + // Rejoin channels immediately when no need to do NICKSERV login now. + // If have login via other method, it doesn't matter, auth should finished now. + rejoin_all_channels(srv); } static void irc_event_nick(SircSession *sirc, const char *event, @@ -557,6 +555,7 @@ GString *modes; SrnServer *srv; SrnChat *chat; + SrnServerUser *srv_user; SrnChatUser *chat_user; g_return_if_fail(count >= 1); @@ -566,7 +565,10 @@ g_return_if_fail(srn_server_is_valid(srv)); chat = srn_server_get_chat(srv, chan); g_return_if_fail(chat); - chat_user = srn_chat_get_user(chat, origin); + + srv_user = srn_server_add_and_get_user(srv, origin); + g_return_if_fail(srv_user); + chat_user = srn_chat_add_and_get_user(chat, srv_user); g_return_if_fail(chat_user); modes = g_string_new(NULL); @@ -699,6 +701,7 @@ const char *reason; SrnServer *srv; SrnChat *chat; + SrnServerUser *srv_user; SrnChatUser *kick_chat_user; SrnChatUser *kicked_chat_user; @@ -711,7 +714,9 @@ g_return_if_fail(srn_server_is_valid(srv)); chat = srn_server_get_chat(srv, chan); g_return_if_fail(chat); - kick_chat_user = srn_chat_get_user(chat, origin); + srv_user = srn_server_add_and_get_user(srv, origin); + g_return_if_fail(srv_user); + kick_chat_user = srn_chat_add_and_get_user(chat, srv_user); g_return_if_fail(kick_chat_user); kicked_chat_user = srn_chat_get_user(chat, kicked); g_return_if_fail(kicked_chat_user); @@ -746,6 +751,7 @@ const char *msg; SrnServer *srv; SrnChat *chat; + SrnServerUser *srv_user; SrnChatUser *chat_user; g_return_if_fail(count >= 2); @@ -756,7 +762,10 @@ g_return_if_fail(srn_server_is_valid(srv)); chat = srn_server_get_chat(srv, chan); g_return_if_fail(chat); - chat_user = srn_chat_get_user(chat, origin); + + srv_user = srn_server_add_and_get_user(srv, origin); + g_return_if_fail(srv_user); + chat_user = srn_chat_add_and_get_user(chat, srv_user); g_return_if_fail(chat_user); srn_chat_add_recv_message(chat, chat_user, msg); @@ -830,6 +839,7 @@ const char *msg; SrnServer *srv; SrnChat *chat; + SrnServerUser *srv_user; SrnChatUser *chat_user; g_return_if_fail(count >= 2); @@ -840,7 +850,10 @@ g_return_if_fail(srn_server_is_valid(srv)); chat = srn_server_get_chat(srv, chan); g_return_if_fail(chat); - chat_user = srn_chat_get_user(chat, origin); + + srv_user = srn_server_add_and_get_user(srv, origin); + g_return_if_fail(srv_user); + chat_user = srn_chat_add_and_get_user(chat, srv_user); g_return_if_fail(chat_user); srn_chat_add_notice_message(chat, chat_user, msg); @@ -1990,3 +2003,27 @@ g_string_free(buf, TRUE); } + +/** + * @brief Rejoin all channels already exist + */ +static void rejoin_all_channels(SrnServer *srv) { + DBG_FR("Rejoining all channels already exist...."); + + GList *list = srv->chat_list; + while (list){ + SrnChat *chat = list->data; + if (sirc_target_is_channel(srv->irc, chat->name)){ + sirc_cmd_join(srv->irc, chat->name, chat->cfg->password); + } + list = g_list_next(list); + } +} + +/** + * @brief Timer callback wrapper for rejoin_all_channels. + */ +static gboolean rejoin_all_channels_cb(gpointer user_data) { + rejoin_all_channels(user_data); + return G_SOURCE_REMOVE; +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/srain-1.3.0/src/lib/libecdsaauth/keypair.c new/srain-1.3.1/src/lib/libecdsaauth/keypair.c --- old/srain-1.3.0/src/lib/libecdsaauth/keypair.c 2021-09-21 13:13:50.000000000 +0200 +++ new/srain-1.3.1/src/lib/libecdsaauth/keypair.c 2021-12-18 04:52:51.000000000 +0100 @@ -22,6 +22,7 @@ #include <string.h> #include <stdlib.h> +#include <openssl/pem.h> static inline libecdsaauth_key_t *libecdsaauth_key_alloc(void) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/srain-1.3.0/src/lib/path.c new/srain-1.3.1/src/lib/path.c --- old/srain-1.3.0/src/lib/path.c 2021-09-21 13:13:50.000000000 +0200 +++ new/srain-1.3.1/src/lib/path.c 2021-12-18 04:52:51.000000000 +0100 @@ -399,7 +399,7 @@ char *srn_get_executable_dir() { char *executablePath = srn_get_executable_path(); - char *executableDir = g_path_get_dirname(executablePathStr); + char *executableDir = g_path_get_dirname(executablePath); g_free(executablePath); return executableDir; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/srain-1.3.0/src/sirc/sirc_cmd.c new/srain-1.3.1/src/sirc/sirc_cmd.c --- old/srain-1.3.0/src/sirc/sirc_cmd.c 2021-09-21 13:13:50.000000000 +0200 +++ new/srain-1.3.1/src/sirc/sirc_cmd.c 2021-12-18 04:52:51.000000000 +0100 @@ -278,6 +278,9 @@ } } +int sirc_get_msgid(SircSession *sirc); +void sirc_set_msgid(SircSession *sirc, int msgid); + int sirc_cmd_raw(SircSession *sirc, const char *fmt, ...){ char buf[SIRC_BUF_LEN]; int len = 0;
