Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package wofi for openSUSE:Factory checked in 
at 2024-02-20 21:13:43
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/wofi (Old)
 and      /work/SRC/openSUSE:Factory/.wofi.new.1706 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "wofi"

Tue Feb 20 21:13:43 2024 rev:7 rq:1147555 version:1.4.1

Changes:
--------
--- /work/SRC/openSUSE:Factory/wofi/wofi.changes        2024-02-12 
18:55:26.985518590 +0100
+++ /work/SRC/openSUSE:Factory/.wofi.new.1706/wofi.changes      2024-02-20 
21:13:44.212505407 +0100
@@ -1,0 +2,12 @@
+Mon Feb 12 08:58:20 UTC 2024 - Jan Baier <jba...@suse.com>
+
+- update to 1.4.1:
+  * Added wofi_exit(). This allows correct handling of custom exit status codes
+    on non-glibc systems. This function should always be used for exiting wofi
+    as libc exit() will no longer correctly handle error situations.
+  * Changed the function signature of config_get_mnemonic(). This new signature
+    uses the correct types so that the default argument promotions caused by
+    varargs is in spec.
+
+
+-------------------------------------------------------------------

Old:
----
  v1.4.tar.gz

New:
----
  v1.4.1.tar.gz

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

Other differences:
------------------
++++++ wofi.spec ++++++
--- /var/tmp/diff_new_pack.4xNpj4/_old  2024-02-20 21:13:44.736524422 +0100
+++ /var/tmp/diff_new_pack.4xNpj4/_new  2024-02-20 21:13:44.736524422 +0100
@@ -17,7 +17,7 @@
 
 
 Name:           wofi
-Version:        1.4
+Version:        1.4.1
 Release:        0
 Summary:        Launcher for wlroots compositors
 License:        GPL-3.0-only

++++++ v1.4.tar.gz -> v1.4.1.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/wofi-v1.4/.build.yml new/wofi-v1.4.1/.build.yml
--- old/wofi-v1.4/.build.yml    2024-02-05 00:26:21.000000000 +0100
+++ new/wofi-v1.4.1/.build.yml  2024-02-09 20:22:27.000000000 +0100
@@ -3,11 +3,11 @@
  - build-essential
  - libwayland-dev
  - libgtk-3-dev
- - pkg-config
+ - pkgconf
  - meson
 
 tasks:
  - build: |
     cd wofi
-    meson build
+    meson setup build
     ninja -C build
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/wofi-v1.4/.hg_archival.txt 
new/wofi-v1.4.1/.hg_archival.txt
--- old/wofi-v1.4/.hg_archival.txt      2024-02-05 00:26:21.000000000 +0100
+++ new/wofi-v1.4.1/.hg_archival.txt    2024-02-09 20:22:27.000000000 +0100
@@ -1,4 +1,4 @@
 repo: 1c71dcd9c6a6dd54601820ce069e7c3ed7e946ca
-node: eab2b31e805564012e4f71920a8f87ba5f9f798c
+node: 1e89e8a94806ef2dd27dbf79b4fcc9902f89c422
 branch: default
-tag: v1.4
+tag: v1.4.1
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/wofi-v1.4/.hgtags new/wofi-v1.4.1/.hgtags
--- old/wofi-v1.4/.hgtags       2024-02-05 00:26:21.000000000 +0100
+++ new/wofi-v1.4.1/.hgtags     2024-02-09 20:22:27.000000000 +0100
@@ -8,3 +8,4 @@
 e208549963dcd4ae89a18290aa598814c0b8eeb7 v1.2.3
 84e91980936bf85a854cee6881398cff9d27fce4 v1.2.4
 1c32143a8460e01559e141c291500a6f4ddcf18c v1.3
+eab2b31e805564012e4f71920a8f87ba5f9f798c v1.4
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/wofi-v1.4/inc/config.h new/wofi-v1.4.1/inc/config.h
--- old/wofi-v1.4/inc/config.h  2024-02-05 00:26:21.000000000 +0100
+++ new/wofi-v1.4.1/inc/config.h        2024-02-09 20:22:27.000000000 +0100
@@ -1,5 +1,5 @@
 /*
- *  Copyright (C) 2019-2020 Scoopta
+ *  Copyright (C) 2019-2024 Scoopta
  *  This file is part of Wofi
  *  Wofi is free software: you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
@@ -28,6 +28,6 @@
 
 char* config_get(struct map* config, const char* key, char* def_opt);
 
-uint8_t config_get_mnemonic(struct map* config, const char* key, char* 
def_opt, uint8_t num_choices, ...);
+int config_get_mnemonic(struct map* config, const char* key, char* def_opt, 
int num_choices, ...);
 
 #endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/wofi-v1.4/inc/wofi_api.h 
new/wofi-v1.4.1/inc/wofi_api.h
--- old/wofi-v1.4/inc/wofi_api.h        2024-02-05 00:26:21.000000000 +0100
+++ new/wofi-v1.4.1/inc/wofi_api.h      2024-02-09 20:22:27.000000000 +0100
@@ -1,5 +1,5 @@
 /*
- *  Copyright (C) 2020 Scoopta
+ *  Copyright (C) 2020-2024 Scoopta
  *  This file is part of Wofi
  *  Wofi is free software: you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
@@ -58,4 +58,6 @@
 
 void wofi_term_run(const char* cmd);
 
+void wofi_exit(int status);
+
 #endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/wofi-v1.4/man/wofi-api.3 
new/wofi-v1.4.1/man/wofi-api.3
--- old/wofi-v1.4/man/wofi-api.3        2024-02-05 00:26:21.000000000 +0100
+++ new/wofi-v1.4.1/man/wofi-api.3      2024-02-09 20:22:27.000000000 +0100
@@ -110,3 +110,7 @@
 
 .B const char* cmd
 \- The command to run, this is invoked by doing \fBterm \-\- cmd\fR.
+
+.TP
+.B void wofi_exit(void)
+This function is how you should call to exit wofi. It checks the status given 
and only sets a custom exit code if you pass EXIT_SUCCESS. If you call the libc 
exit() function then the custom exit code will always be used even if an error 
should be reported
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/wofi-v1.4/man/wofi-config.3 
new/wofi-v1.4.1/man/wofi-config.3
--- old/wofi-v1.4/man/wofi-config.3     2024-02-05 00:26:21.000000000 +0100
+++ new/wofi-v1.4.1/man/wofi-config.3   2024-02-09 20:22:27.000000000 +0100
@@ -42,7 +42,7 @@
 \- The default value to be returned if the key does not exist.
 
 .TP
-.B uint8_t config_get_mnemonic(struct map* config, const char* key, char* 
def_opt, uint8_t num_choices, ...)
+.B int config_get_mnemonic(struct map* config, const char* key, char* def_opt, 
int num_choices, ...)
 Gets an enum value from the config. If the value is not set then it returns 
\fBdef_opt\fR.
 
 .B struct map* config
@@ -54,7 +54,7 @@
 .B char* def_opt
 \- The default value to be returned if the key does not exist.
 
-.B uint8_t num_choices
+.B int num_choices
 \- The number of enum options available.
 
 .B varargs
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/wofi-v1.4/meson.build new/wofi-v1.4.1/meson.build
--- old/wofi-v1.4/meson.build   2024-02-05 00:26:21.000000000 +0100
+++ new/wofi-v1.4.1/meson.build 2024-02-09 20:22:27.000000000 +0100
@@ -1,4 +1,4 @@
-project('wofi', 'c', version : 'v1.4', default_options : ['c_std=c99', 
'buildtype=release', 'warning_level=2'])
+project('wofi', 'c', version : 'v1.4.1', default_options : ['c_std=c99', 
'buildtype=release', 'warning_level=2'])
 cc = meson.get_compiler('c')
 
 pkgcfg = import('pkgconfig')
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/wofi-v1.4/modes/dmenu.c new/wofi-v1.4.1/modes/dmenu.c
--- old/wofi-v1.4/modes/dmenu.c 2024-02-05 00:26:21.000000000 +0100
+++ new/wofi-v1.4.1/modes/dmenu.c       2024-02-09 20:22:27.000000000 +0100
@@ -1,5 +1,5 @@
 /*
- *  Copyright (C) 2019-2020 Scoopta
+ *  Copyright (C) 2019-2024 Scoopta
  *  This file is part of Wofi
  *  Wofi is free software: you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
@@ -156,7 +156,7 @@
        }
        printf("%s\n", action);
        free(action);
-       exit(0);
+       wofi_exit(0);
 }
 
 const char** wofi_dmenu_get_arg_names(void) {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/wofi-v1.4/modes/drun.c new/wofi-v1.4.1/modes/drun.c
--- old/wofi-v1.4/modes/drun.c  2024-02-05 00:26:21.000000000 +0100
+++ new/wofi-v1.4.1/modes/drun.c        2024-02-09 20:22:27.000000000 +0100
@@ -1,5 +1,5 @@
 /*
- *  Copyright (C) 2019-2023 Scoopta
+ *  Copyright (C) 2019-2024 Scoopta
  *  This file is part of Wofi
  *  Wofi is free software: you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
@@ -398,7 +398,7 @@
 static void launch_done(GObject* obj, GAsyncResult* result, gpointer data) {
        GError* err = NULL;
        if(g_app_info_launch_uris_finish(G_APP_INFO(obj), result, &err)) {
-               exit(0);
+               wofi_exit(0);
        } else if(err != NULL) {
                char* cmd = data;
                fprintf(stderr, "%s cannot be executed: %s\n", cmd, 
err->message);
@@ -407,7 +407,7 @@
                char* cmd = data;
                fprintf(stderr, "%s cannot be executed\n", cmd);
        }
-       exit(1);
+       wofi_exit(1);
 }
 
 static void set_dri_prime(GDesktopAppInfo* info) {
@@ -449,17 +449,17 @@
                        char* cmd = get_cmd(G_APP_INFO(info));
                        printf("%s\n", cmd);
                        free(cmd);
-                       exit(0);
+                       wofi_exit(0);
                } else if(print_desktop_file) {
                        printf("%s\n", cmd);
-                       exit(0);
+                       wofi_exit(0);
                } else {
                        set_dri_prime(info);
                        if(uses_dbus(info)) {
                                g_app_info_launch_uris_async(G_APP_INFO(info), 
NULL, NULL, NULL, launch_done, (gchar*) cmd);
                        } else {
                                g_app_info_launch_uris(G_APP_INFO(info), NULL, 
NULL, NULL);
-                               exit(0);
+                               wofi_exit(0);
                        }
                }
        } else if(strrchr(cmd, ' ') != NULL) {
@@ -475,15 +475,15 @@
                        fprintf(stderr, "Printing the command line for an 
action is not supported\n");
                } else if(print_desktop_file) {
                        printf("%s %s\n", cmd, action);
-                       exit(0);
+                       wofi_exit(0);
                } else {
                        set_dri_prime(info);
                        g_desktop_app_info_launch_action(info, action, NULL);
                }
-               exit(0);
+               wofi_exit(0);
        } else {
                fprintf(stderr, "%s cannot be executed\n", cmd);
-               exit(1);
+               wofi_exit(1);
        }
 }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/wofi-v1.4/modes/run.c new/wofi-v1.4.1/modes/run.c
--- old/wofi-v1.4/modes/run.c   2024-02-05 00:26:21.000000000 +0100
+++ new/wofi-v1.4.1/modes/run.c 2024-02-09 20:22:27.000000000 +0100
@@ -1,5 +1,5 @@
 /*
- *  Copyright (C) 2019-2020 Scoopta
+ *  Copyright (C) 2019-2024 Scoopta
  *  This file is part of Wofi
  *  Wofi is free software: you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
@@ -192,7 +192,7 @@
        }
        if(print_command) {
                printf("%s\n", cmd);
-               exit(0);
+               wofi_exit(0);
        }
        if(arg_run) {
                size_t space_count = 2;
@@ -215,7 +215,7 @@
                execl(cmd, cmd, NULL);
        }
        fprintf(stderr, "%s cannot be executed %s\n", cmd, strerror(errno));
-       exit(errno);
+       wofi_exit(errno);
 }
 
 const char** wofi_run_get_arg_names(void) {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/wofi-v1.4/src/config.c new/wofi-v1.4.1/src/config.c
--- old/wofi-v1.4/src/config.c  2024-02-05 00:26:21.000000000 +0100
+++ new/wofi-v1.4.1/src/config.c        2024-02-09 20:22:27.000000000 +0100
@@ -1,5 +1,5 @@
 /*
- *  Copyright (C) 2019-2020 Scoopta
+ *  Copyright (C) 2019-2024 Scoopta
  *  This file is part of Wofi
  *  Wofi is free software: you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
@@ -81,12 +81,12 @@
        return opt;
 }
 
-uint8_t config_get_mnemonic(struct map* config, const char* key, char* 
def_opt, uint8_t num_choices, ...) {
+int config_get_mnemonic(struct map* config, const char* key, char* def_opt, 
int num_choices, ...) {
        char* opt = config_get(config, key, def_opt);
        va_list ap;
        va_start(ap, num_choices);
-       uint8_t result = 0;
-       for(uint8_t i = 0; i < num_choices; i++) {
+       int result = 0;
+       for(int i = 0; i < num_choices; i++) {
                char* cmp_str = va_arg(ap, char*);
                if(strcmp(opt, cmp_str) == 0) {
                        result = i;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/wofi-v1.4/src/wofi.c new/wofi-v1.4.1/src/wofi.c
--- old/wofi-v1.4/src/wofi.c    2024-02-05 00:26:21.000000000 +0100
+++ new/wofi-v1.4.1/src/wofi.c  2024-02-09 20:22:27.000000000 +0100
@@ -418,14 +418,14 @@
                // first, prepare cmd_labeltext to be each entry's actual 
comamand to run, aka replacing 'cat %s' to be 'cat filename'
                if(asprintf(&cmd_labeltext, pre_display_cmd, nodetext) == -1) {
                        fprintf(stderr, "error parsing pre_display_cmd to 
run\n");
-                       exit(EXIT_FAILURE);
+                       wofi_exit(EXIT_FAILURE);
                }
                // then, run the command
                if(pre_display_exec) {
                        int fds[2];
                        if(pipe(fds) == -1) {
                                perror("pipe broken");
-                               exit(1);
+                               wofi_exit(1);
                        }
                        if(fork() == 0) {
                                close(fds[0]);
@@ -477,7 +477,7 @@
                }
                if(fp_labeltext == NULL) {
                        fprintf(stderr, "error executing '%s'\n", 
cmd_labeltext);
-                       exit(EXIT_FAILURE);
+                       wofi_exit(EXIT_FAILURE);
                } else if(fgets(line, sizeof(line), fp_labeltext) != NULL) {
                        // lastly, read the output of said command, and put it 
into the text variable to be used for the label widgets
                        // consider using 'printf %.10s as your 
--pre-display-cmd to limit a string to a determined width. 10 here is an example
@@ -993,7 +993,7 @@
                execlp(terminals[count], terminals[count], "-e", cmd, NULL);
        }
        fprintf(stderr, "No terminal emulator found please set term in config 
or use --term\n");
-       exit(1);
+       wofi_exit(1);
 }
 
 static void flag_box(GtkBox* box, GtkStateFlags flags) {
@@ -1236,7 +1236,7 @@
 }
 
 static void do_exit(void) {
-       exit(1);
+       wofi_exit(1);
 }
 
 static void do_expand(void) {
@@ -1277,7 +1277,7 @@
                        int fds[2];
                        if (pipe(fds) == -1) {
                                perror("pipe broken");
-                               exit(EXIT_FAILURE);
+                               wofi_exit(EXIT_FAILURE);
                        }
                        if(fork() == 0) {
                                close(fds[1]);
@@ -1299,13 +1299,21 @@
        }
 }
 
-static void on_exit_set_custom_key_return_code(int status, void* data) {
-       _UNUSED(data);
-       if (status == EXIT_SUCCESS) {
-               fflush(stdout);
-               fflush(stderr);
+static void on_exit_set_custom_key_return_code(void) {
+       fflush(stdout);
+       fflush(stderr);
+       _exit(custom_key_return_code);
+}
+
+void wofi_exit(int status) {
+       fflush(stdout);
+       fflush(stderr);
+
+       if(status == EXIT_SUCCESS) {
                _exit(custom_key_return_code);
        }
+
+       _exit(status);
 }
 
 static void do_custom_key(int custom_key_num) {
@@ -1609,7 +1617,7 @@
 
                        if(init == NULL) {
                                fprintf(stderr, "I would love to show %s but 
Idk what it is\n", _mode);
-                               exit(1);
+                               wofi_exit(1);
                        }
                }
        }
@@ -1748,7 +1756,7 @@
 
        if(width > UINT16_MAX || height > UINT16_MAX) {
                fprintf(stderr, "Do you actually have a monitor big enough to 
see this O_o? Dimensions can be no larger than %ux%u\n", UINT16_MAX, 
UINT16_MAX);
-               exit(1);
+               wofi_exit(1);
        }
 
        x = map_get(config, "x");
@@ -1904,7 +1912,7 @@
 
                if(wl == NULL) {
                        fprintf(stderr, "Failed to connect to wayland 
compositor\n");
-                       exit(1);
+                       wofi_exit(1);
                }
 
                struct wl_registry* registry = wl_display_get_registry(wl);
@@ -2064,5 +2072,5 @@
        gtk_window_set_title(GTK_WINDOW(window), prompt);
        gtk_widget_show_all(window);
 
-       on_exit(on_exit_set_custom_key_return_code, NULL);
+       atexit(on_exit_set_custom_key_return_code);
 }

Reply via email to