Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package swayidle for openSUSE:Factory 
checked in at 2022-12-06 14:24:13
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/swayidle (Old)
 and      /work/SRC/openSUSE:Factory/.swayidle.new.1835 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "swayidle"

Tue Dec  6 14:24:13 2022 rev:10 rq:1040533 version:1.8.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/swayidle/swayidle.changes        2022-01-21 
01:26:21.326202491 +0100
+++ /work/SRC/openSUSE:Factory/.swayidle.new.1835/swayidle.changes      
2022-12-06 14:24:28.714191148 +0100
@@ -1,0 +2,10 @@
+Tue Dec  6 08:37:28 UTC 2022 - Michael Vetter <mvet...@suse.com>
+
+- Update to 1.8.0:
+  * bash-completion: localize variables
+  * Fix segfault when no arg is given and no config file exists
+  * Add support for ext-idle-notify-v1
+  * Fix printf using size_t lineno variable
+- Remove e81d40fca7533f73319e76e42fa9694b21cc9e6e.patch
+
+-------------------------------------------------------------------

Old:
----
  1.7.1.tar.gz
  e81d40fca7533f73319e76e42fa9694b21cc9e6e.patch

New:
----
  1.8.0.tar.gz

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

Other differences:
------------------
++++++ swayidle.spec ++++++
--- /var/tmp/diff_new_pack.5pJNCc/_old  2022-12-06 14:24:29.194195241 +0100
+++ /var/tmp/diff_new_pack.5pJNCc/_new  2022-12-06 14:24:29.202195309 +0100
@@ -17,16 +17,13 @@
 
 
 Name:           swayidle
-Version:        1.7.1
+Version:        1.8.0
 Release:        0
 Summary:        Idle management daemon for Wayland
 License:        MIT
 Group:          System/GUI/Other
 URL:            https://github.com/swaywm/swayidle
 Source0:        %{url}/archive/%{version}.tar.gz
-# PATCH-FIX-UPSTREAM e81d40fca7533f73319e76e42fa9694b21cc9e6e.patch -- Fix 
printf using size_t lineno variable
-Patch0:         %{url}/commit/e81d40fca7533f73319e76e42fa9694b21cc9e6e.patch
-
 BuildRequires:  meson >= 0.48.0
 BuildRequires:  pkgconfig
 BuildRequires:  scdoc

++++++ 1.7.1.tar.gz -> 1.8.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/swayidle-1.7.1/README.md new/swayidle-1.8.0/README.md
--- old/swayidle-1.7.1/README.md        2022-01-15 17:14:51.000000000 +0100
+++ new/swayidle-1.8.0/README.md        2022-12-04 15:18:01.000000000 +0100
@@ -1,13 +1,15 @@
 # swayidle
 
 This is sway's idle management daemon, swayidle. It is compatible with any
-Wayland compositor which implements the KDE
+Wayland compositor which implements the
+[ext-idle-notify](https://gitlab.freedesktop.org/wayland/wayland-protocols/-/tree/main/staging/ext-idle-notify)
+protocol or the KDE
 [idle](https://github.com/swaywm/sway/blob/master/protocols/idle.xml) protocol.
 See the man page, [swayidle(1)](./swayidle.1.scd), for instructions on 
configuring swayidle.
 
 ## Release Signatures
 
-Releases are signed with 
[B22DA89A](http://pgp.mit.edu/pks/lookup?op=vindex&search=0x52CB6609B22DA89A)
+Releases are signed with 
[34FF9526](https://keys.openpgp.org/search?q=34FF9526CFEF0E97A340E2E40FDE7BE0E88F5E48)
 and published [on GitHub](https://github.com/swaywm/swayidle/releases). 
swayidle
 releases are managed independently of sway releases.
 
@@ -18,9 +20,6 @@
 Swayidle is available in many distributions. Try installing the "swayidle"
 package for yours.
 
-If you're interested in packaging swayidle for your distribution, stop by the
-IRC channel or shoot an email to s...@cmpwn.com for advice.
-
 ### Compiling from Source
 
 Install dependencies:
@@ -31,10 +30,10 @@
 * [scdoc](https://git.sr.ht/~sircmpwn/scdoc) (optional: man pages) \*
 * git \*
 
-_\*Compile-time dep_
+_\* Compile-time dependency_
 
 Run these commands:
 
-    meson build
-    ninja -C build
-    sudo ninja -C build install
+    meson build/
+    ninja -C build/
+    sudo ninja -C build/ install
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/swayidle-1.7.1/completions/bash/swayidle 
new/swayidle-1.8.0/completions/bash/swayidle
--- old/swayidle-1.7.1/completions/bash/swayidle        2022-01-15 
17:14:51.000000000 +0100
+++ new/swayidle-1.8.0/completions/bash/swayidle        2022-12-04 
15:18:01.000000000 +0100
@@ -2,7 +2,7 @@
 
 _swayidle()
 {
-  local cur prev
+  local cur prev events short
   _get_comp_words_by_ref -n : cur prev
   local prev2=${COMP_WORDS[COMP_CWORD-2]}
   local prev3=${COMP_WORDS[COMP_CWORD-3]}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/swayidle-1.7.1/main.c new/swayidle-1.8.0/main.c
--- old/swayidle-1.7.1/main.c   2022-01-15 17:14:51.000000000 +0100
+++ new/swayidle-1.8.0/main.c   2022-12-04 15:18:01.000000000 +0100
@@ -16,6 +16,7 @@
 #include <wordexp.h>
 #include "config.h"
 #include "idle-client-protocol.h"
+#include "ext-idle-notify-v1-client-protocol.h"
 #include "log.h"
 #if HAVE_SYSTEMD
 #include <systemd/sd-bus.h>
@@ -25,7 +26,8 @@
 #include <elogind/sd-login.h>
 #endif
 
-static struct org_kde_kwin_idle *idle_manager = NULL;
+static struct org_kde_kwin_idle *kde_idle_manager = NULL;
+static struct ext_idle_notifier_v1 *idle_notifier = NULL;
 static struct wl_seat *seat = NULL;
 
 struct swayidle_state {
@@ -46,7 +48,8 @@
 struct swayidle_timeout_cmd {
        struct wl_list link;
        int timeout, registered_timeout;
-       struct org_kde_kwin_idle_timeout *idle_timer;
+       struct org_kde_kwin_idle_timeout *kde_idle_timer;
+       struct ext_idle_notification_v1 *idle_notification;
        char *idle_cmd;
        char *resume_cmd;
        bool idlehint;
@@ -543,8 +546,11 @@
 static void handle_global(void *data, struct wl_registry *registry,
                uint32_t name, const char *interface, uint32_t version) {
        if (strcmp(interface, org_kde_kwin_idle_interface.name) == 0) {
-               idle_manager =
+               kde_idle_manager =
                        wl_registry_bind(registry, name, 
&org_kde_kwin_idle_interface, 1);
+       } else if (strcmp(interface, ext_idle_notifier_v1_interface.name) == 0) 
{
+               idle_notifier =
+                       wl_registry_bind(registry, name, 
&ext_idle_notifier_v1_interface, 1);
        } else if (strcmp(interface, wl_seat_interface.name) == 0) {
                struct seat *s = calloc(1, sizeof(struct seat));
                s->proxy = wl_registry_bind(registry, name, &wl_seat_interface, 
2);
@@ -564,13 +570,18 @@
        .global_remove = handle_global_remove,
 };
 
-static const struct org_kde_kwin_idle_timeout_listener idle_timer_listener;
+static const struct org_kde_kwin_idle_timeout_listener kde_idle_timer_listener;
+static const struct ext_idle_notification_v1_listener 
idle_notification_listener;
 
 static void destroy_cmd_timer(struct swayidle_timeout_cmd *cmd) {
-       if (cmd->idle_timer != NULL) {
+       if (cmd->kde_idle_timer != NULL) {
                swayidle_log(LOG_DEBUG, "Release idle timer");
-               org_kde_kwin_idle_timeout_release(cmd->idle_timer);
-               cmd->idle_timer = NULL;
+               org_kde_kwin_idle_timeout_release(cmd->kde_idle_timer);
+               cmd->kde_idle_timer = NULL;
+       }
+       if (cmd->idle_notification != NULL) {
+               ext_idle_notification_v1_destroy(cmd->idle_notification);
+               cmd->idle_notification = NULL;
        }
 }
 
@@ -583,10 +594,17 @@
                return;
        }
        swayidle_log(LOG_DEBUG, "Register with timeout: %d", timeout);
-       cmd->idle_timer =
-               org_kde_kwin_idle_get_idle_timeout(idle_manager, seat, timeout);
-       org_kde_kwin_idle_timeout_add_listener(cmd->idle_timer,
-               &idle_timer_listener, cmd);
+       if (idle_notifier != NULL) {
+               cmd->idle_notification =
+                       
ext_idle_notifier_v1_get_idle_notification(idle_notifier, timeout, seat);
+               ext_idle_notification_v1_add_listener(cmd->idle_notification,
+                       &idle_notification_listener, cmd);
+       } else {
+               cmd->kde_idle_timer =
+                       org_kde_kwin_idle_get_idle_timeout(kde_idle_manager, 
seat, timeout);
+               org_kde_kwin_idle_timeout_add_listener(cmd->kde_idle_timer,
+                       &kde_idle_timer_listener, cmd);
+       }
        cmd->registered_timeout = timeout;
 }
 
@@ -627,8 +645,7 @@
 }
 #endif
 
-static void handle_idle(void *data, struct org_kde_kwin_idle_timeout *timer) {
-       struct swayidle_timeout_cmd *cmd = data;
+static void handle_idled(struct swayidle_timeout_cmd *cmd) {
        cmd->resume_pending = true;
        swayidle_log(LOG_DEBUG, "idle state");
 #if HAVE_SYSTEMD || HAVE_ELOGIND
@@ -641,8 +658,7 @@
        }
 }
 
-static void handle_resume(void *data, struct org_kde_kwin_idle_timeout *timer) 
{
-       struct swayidle_timeout_cmd *cmd = data;
+static void handle_resumed(struct swayidle_timeout_cmd *cmd) {
        cmd->resume_pending = false;
        swayidle_log(LOG_DEBUG, "active state");
        if (cmd->registered_timeout != cmd->timeout) {
@@ -658,9 +674,34 @@
        }
 }
 
-static const struct org_kde_kwin_idle_timeout_listener idle_timer_listener = {
-       .idle = handle_idle,
-       .resumed = handle_resume,
+static void kde_handle_idle(void *data, struct org_kde_kwin_idle_timeout 
*timer) {
+       struct swayidle_timeout_cmd *cmd = data;
+       handle_idled(cmd);
+}
+
+static void kde_handle_resumed(void *data, struct org_kde_kwin_idle_timeout 
*timer) {
+       struct swayidle_timeout_cmd *cmd = data;
+       handle_resumed(cmd);
+}
+
+static const struct org_kde_kwin_idle_timeout_listener kde_idle_timer_listener 
= {
+       .idle = kde_handle_idle,
+       .resumed = kde_handle_resumed,
+};
+
+static void ext_handle_idled(void *data, struct ext_idle_notification_v1 
*notif) {
+       struct swayidle_timeout_cmd *cmd = data;
+       handle_idled(cmd);
+}
+
+static void ext_handle_resumed(void *data, struct ext_idle_notification_v1 
*notif) {
+       struct swayidle_timeout_cmd *cmd = data;
+       handle_resumed(cmd);
+}
+
+static const struct ext_idle_notification_v1_listener 
idle_notification_listener = {
+       .idled = ext_handle_idled,
+       .resumed = ext_handle_resumed,
 };
 
 static char *parse_command(int argc, char **argv) {
@@ -893,7 +934,7 @@
                swayidle_log(LOG_DEBUG, "Got SIGTERM");
                wl_list_for_each(cmd, &state.timeout_cmds, link) {
                        if (cmd->resume_pending) {
-                               handle_resume(cmd, cmd->idle_timer);
+                               handle_resumed(cmd);
                        }
                }
                sway_terminate(0);
@@ -964,7 +1005,6 @@
 
 static int load_config(const char *config_path) {
        FILE *f = fopen(config_path, "r");
-
        if (!f) {
                return -ENOENT;
        }
@@ -1004,7 +1044,7 @@
                        parse_idlehint(p.we_wordc, p.we_wordv);
                } else {
                        line[i] = 0;
-                       swayidle_log(LOG_ERROR, "Unexpected keyword \"%s\" in 
line %lu", line, lineno);
+                       swayidle_log(LOG_ERROR, "Unexpected keyword \"%s\" in 
line %zu", line, lineno);
                        free(line);
                        return -EINVAL;
                }
@@ -1030,8 +1070,10 @@
                config_path = get_config_path();
        }
 
-       int config_load = load_config(config_path);
-
+       int config_load = -ENOENT;
+       if (config_path) {
+               config_load = load_config(config_path);
+       }
        if (config_load == -ENOENT) {
                swayidle_log(LOG_DEBUG, "No config file found.");
        } else if (config_load == -EINVAL) {
@@ -1070,7 +1112,7 @@
                }
        }
 
-       if (idle_manager == NULL) {
+       if (kde_idle_manager == NULL && idle_notifier == NULL) {
                swayidle_log(LOG_ERROR, "Display doesn't support idle 
protocol");
                swayidle_finish();
                return -4;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/swayidle-1.7.1/meson.build 
new/swayidle-1.8.0/meson.build
--- old/swayidle-1.7.1/meson.build      2022-01-15 17:14:51.000000000 +0100
+++ new/swayidle-1.8.0/meson.build      2022-12-04 15:18:01.000000000 +0100
@@ -1,9 +1,9 @@
 project(
        'swayidle',
        'c',
-       version: '1.7.1',
+       version: '1.8.0',
        license: 'MIT',
-       meson_version: '>=0.48.0',
+       meson_version: '>=0.59.0',
        default_options: [
                'c_std=c11',
                'warning_level=2',
@@ -28,7 +28,7 @@
        language : 'c')
 
 wayland_client = dependency('wayland-client')
-wayland_protos = dependency('wayland-protocols', version: '>=1.14')
+wayland_protos = dependency('wayland-protocols', version: '>=1.27')
 wayland_server = dependency('wayland-server')
 bash_comp      = dependency('bash-completion', required: false)
 fish_comp      = dependency('fish', required: false)
@@ -37,7 +37,7 @@
 scdoc = find_program('scdoc', required: get_option('man-pages'))
 wayland_scanner = find_program('wayland-scanner')
 
-wl_protocol_dir = wayland_protos.get_pkgconfig_variable('pkgdatadir')
+wl_protocol_dir = wayland_protos.get_variable(pkgconfig: 'pkgdatadir', 
internal: 'pkgdatadir')
 
 if wayland_server.version().version_compare('>=1.14.91')
        code_type = 'private-code'
@@ -57,8 +57,17 @@
        arguments: ['client-header', '@INPUT@', '@OUTPUT@'],
 )
 
-client_protos_src = wayland_scanner_code.process('idle.xml')
-client_protos_headers = wayland_scanner_client.process('idle.xml')
+protos = [
+       'idle.xml',
+       wl_protocol_dir / 'staging/ext-idle-notify/ext-idle-notify-v1.xml',
+]
+
+client_protos_src = []
+client_protos_headers = []
+foreach xml : protos
+       client_protos_src += wayland_scanner_code.process(xml)
+       client_protos_headers += wayland_scanner_client.process(xml)
+endforeach
 
 lib_client_protos = static_library(
        'client_protos',
@@ -97,7 +106,6 @@
 )
 
 if scdoc.found()
-       sh = find_program('sh')
        mandir = get_option('mandir')
        man_files = [
                'swayidle.1.scd',
@@ -111,9 +119,9 @@
                        output,
                        input: filename,
                        output: output,
-                       command: [
-                               sh, '-c', '@0@ < @INPUT@ > 
@1@'.format(scdoc.path(), output)
-                       ],
+                       command: scdoc,
+                       feed: true,
+                       capture: true,
                        install: true,
                        install_dir: '@0@/man@1@'.format(mandir, section)
                )
@@ -136,7 +144,7 @@
                'completions/bash/swayidle',
        )
        if bash_comp.found()
-               bash_install_dir = 
bash_comp.get_pkgconfig_variable('completionsdir')
+               bash_install_dir = bash_comp.get_variable('completionsdir')
        else
                bash_install_dir = datadir + '/bash-completion/completions'
        endif
@@ -149,7 +157,7 @@
                'completions/fish/swayidle.fish',
        )
        if fish_comp.found()
-               fish_install_dir = 
fish_comp.get_pkgconfig_variable('completionsdir')
+               fish_install_dir = fish_comp.get_variable('completionsdir')
        else
                fish_install_dir = datadir + '/fish/vendor_completions.d'
        endif

Reply via email to