Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package gammastep for openSUSE:Factory checked in at 2026-01-08 15:26:03 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/gammastep (Old) and /work/SRC/openSUSE:Factory/.gammastep.new.1928 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "gammastep" Thu Jan 8 15:26:03 2026 rev:4 rq:1325771 version:2.0.11 Changes: -------- --- /work/SRC/openSUSE:Factory/gammastep/gammastep.changes 2023-09-20 13:35:20.115855718 +0200 +++ /work/SRC/openSUSE:Factory/.gammastep.new.1928/gammastep.changes 2026-01-08 15:27:05.488211077 +0100 @@ -1,0 +2,17 @@ +Wed Jan 7 12:17:08 UTC 2026 - Martin Sirringhaus <[email protected]> + +- update to v2.0.11 + * fix: memory issues with output name + * fix: incompatible pointer type for noop functions + +- update to v2.0.10 + * fix: wayland: potential uninitialized read + * fix: wayland: integer overflow with certain gamma sizes + * fix: hooks: close hooks directory + * feature: hooks: do not run files with a "~" suffix + * Update Swedish translation + * Update AppData content rating + +- gammastep-indicator now requires gammastep (boo#1255898) + +------------------------------------------------------------------- Old: ---- gammastep-v2.0.9.tar.gz New: ---- gammastep-v2.0.11.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ gammastep.spec ++++++ --- /var/tmp/diff_new_pack.NYdciq/_old 2026-01-08 15:27:05.960230626 +0100 +++ /var/tmp/diff_new_pack.NYdciq/_new 2026-01-08 15:27:05.964230792 +0100 @@ -1,7 +1,7 @@ # # spec file for package gammastep # -# Copyright (c) 2023 SUSE LLC +# Copyright (c) 2026 SUSE LLC and contributors # # 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 __requires_exclude typelib\\(AppIndicator3\\) Name: gammastep -Version: 2.0.9 +Version: 2.0.11 Release: 0 Summary: Adjusts the color temperature of your screen according to time of day License: 0BSD AND GPL-3.0-or-later AND MIT @@ -62,6 +62,7 @@ %package indicator Summary: GTK indicator applet for %{name} +Requires: %{name} = %{version} Requires: python3dist(pygobject) Requires: python3dist(pyxdg) ++++++ gammastep-v2.0.9.tar.gz -> gammastep-v2.0.11.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gammastep-v2.0.9/.gitlab-ci.yml new/gammastep-v2.0.11/.gitlab-ci.yml --- old/gammastep-v2.0.9/.gitlab-ci.yml 2022-09-12 02:57:15.000000000 +0200 +++ new/gammastep-v2.0.11/.gitlab-ci.yml 2025-03-29 21:18:29.000000000 +0100 @@ -8,10 +8,13 @@ default: stage: build script: + - xbps-install -S + - xbps-install -yu xbps + - xbps-install -yu - ./bootstrap - mkdir build - cd build - - ../configure --enable-drm --enable-vidmode --enable-randr --enable-geoclue2 --enable-gui --enable-apparmor --with-systemduserunitdir=no + - ../configure --enable-drm --enable-wayland --enable-geoclue2 --enable-gui --enable-apparmor --with-systemduserunitdir=no - make - ./src/gammastep -l 12:-34 -pv - ./src/gammastep -l 12:-34 -m dummy -vo diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gammastep-v2.0.9/NEWS.md new/gammastep-v2.0.11/NEWS.md --- old/gammastep-v2.0.9/NEWS.md 2022-09-12 02:57:15.000000000 +0200 +++ new/gammastep-v2.0.11/NEWS.md 2025-03-29 21:18:29.000000000 +0100 @@ -1,7 +1,21 @@ News ==== -v2.0.9.11 (2022-09-11) +v2.0.11 (2025-03-29) +-------------------- +- fix: memory issues with output name (thanks @joanbrugueram) +- fix: incompatible pointer type for noop functions (thanks for reporting @sping) + +v2.0.10 (2025-03-15) +-------------------- +- fix: wayland: potential uninitialized read (thanks @joanbrugueram) +- fix: wayland: integer overflow with certain gamma sizes (thanks to Pierre Colin) +- fix: hooks: close hooks directory +- feature: hooks: do not run files with a "~" suffix +- Update Swedish translation +- Update AppData content rating + +v2.0.9 (2022-09-11) ------------------- - fix: wayland: avoid memory leak (thanks @joanbrugueram) - fix: wayland: recover from failure due to VT switch diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gammastep-v2.0.9/configure.ac new/gammastep-v2.0.11/configure.ac --- old/gammastep-v2.0.9/configure.ac 2022-09-12 02:57:15.000000000 +0200 +++ new/gammastep-v2.0.11/configure.ac 2025-03-29 21:18:29.000000000 +0100 @@ -2,7 +2,7 @@ # Process this file with autoconf to produce a configure script. AC_PREREQ([2.69]) -AC_INIT([gammastep], [2.0.9], [https://gitlab.freedesktop.org/CameronNemo/gammastep/issues]) +AC_INIT([gammastep], [2.0.11], [https://gitlab.freedesktop.org/CameronNemo/gammastep/issues]) AC_CONFIG_SRCDIR([src/redshift.c]) AC_CONFIG_HEADERS([config.h]) AC_CONFIG_MACRO_DIR([m4]) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gammastep-v2.0.9/data/appdata/gammastep-indicator.appdata.xml.in new/gammastep-v2.0.11/data/appdata/gammastep-indicator.appdata.xml.in --- old/gammastep-v2.0.9/data/appdata/gammastep-indicator.appdata.xml.in 2022-09-12 02:57:15.000000000 +0200 +++ new/gammastep-v2.0.11/data/appdata/gammastep-indicator.appdata.xml.in 2025-03-29 21:18:29.000000000 +0100 @@ -4,6 +4,7 @@ <id>gammastep-indicator.desktop</id> <metadata_license>CC0</metadata_license> <project_license>GPL-3.0+</project_license> + <content_rating type="oars-1.1" /> <name>Gammastep Indicator</name> <summary>Adjust display hue to outside lighting conditions</summary> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gammastep-v2.0.9/gammastep.conf.sample new/gammastep-v2.0.11/gammastep.conf.sample --- old/gammastep-v2.0.9/gammastep.conf.sample 2022-09-12 02:57:15.000000000 +0200 +++ new/gammastep-v2.0.11/gammastep.conf.sample 2025-03-29 21:18:29.000000000 +0100 @@ -66,3 +66,7 @@ ; If this option is not specified, Redshift will try to adjust _all_ screens. [randr] screen=0 + +; In this example, wayland is configured to match outputs based on their name. +[wayland] +output=eDP-* diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gammastep-v2.0.9/po/sv.po new/gammastep-v2.0.11/po/sv.po --- old/gammastep-v2.0.9/po/sv.po 2022-09-12 02:57:15.000000000 +0200 +++ new/gammastep-v2.0.11/po/sv.po 2025-03-29 21:18:29.000000000 +0100 @@ -37,7 +37,7 @@ "daytime temperature to allow your eyes to slowly adapt." msgstr "" "Färgtemperaturen ställs in beroende på positionen av solen. En annan " -"färgtemperatur sätts under natten och dagen. Under skymning och tidigt på " +"färgtemperatur sätts under natten och dagen. Under gryning och tidigt på " "morgonen övergår färgtemperaturen smidigt från natt till dagtidstemperatur " "för att ge dina ögon tid att långsamt anpassa sig." diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gammastep-v2.0.9/src/colorramp.c new/gammastep-v2.0.11/src/colorramp.c --- old/gammastep-v2.0.9/src/colorramp.c 2022-09-12 02:57:15.000000000 +0200 +++ new/gammastep-v2.0.11/src/colorramp.c 2025-03-29 21:18:29.000000000 +0100 @@ -5,6 +5,7 @@ #include <stdint.h> #include <math.h> +#include <sys/types.h> #include "redshift.h" @@ -272,7 +273,7 @@ void colorramp_fill(uint16_t *gamma_r, uint16_t *gamma_g, uint16_t *gamma_b, - int size, const color_setting_t *setting) + ssize_t size, const color_setting_t *setting) { /* Approximate white point */ float white_point[3]; @@ -281,7 +282,7 @@ interpolate_color(alpha, &blackbody_color[temp_index], &blackbody_color[temp_index+3], white_point); - for (int i = 0; i < size; i++) { + for (ssize_t i = 0; i < size; i++) { gamma_r[i] = F((double)gamma_r[i]/(UINT16_MAX+1), 0) * (UINT16_MAX+1); gamma_g[i] = F((double)gamma_g[i]/(UINT16_MAX+1), 1) * @@ -293,7 +294,7 @@ void colorramp_fill_float(float *gamma_r, float *gamma_g, float *gamma_b, - int size, const color_setting_t *setting) + ssize_t size, const color_setting_t *setting) { /* Approximate white point */ float white_point[3]; @@ -302,7 +303,7 @@ interpolate_color(alpha, &blackbody_color[temp_index], &blackbody_color[temp_index+3], white_point); - for (int i = 0; i < size; i++) { + for (ssize_t i = 0; i < size; i++) { gamma_r[i] = F((double)gamma_r[i], 0); gamma_g[i] = F((double)gamma_g[i], 1); gamma_b[i] = F((double)gamma_b[i], 2); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gammastep-v2.0.9/src/colorramp.h new/gammastep-v2.0.11/src/colorramp.h --- old/gammastep-v2.0.9/src/colorramp.h 2022-09-12 02:57:15.000000000 +0200 +++ new/gammastep-v2.0.11/src/colorramp.h 2025-03-29 21:18:29.000000000 +0100 @@ -6,12 +6,13 @@ #define REDSHIFT_COLORRAMP_H #include <stdint.h> +#include <sys/types.h> #include "redshift.h" void colorramp_fill(uint16_t *gamma_r, uint16_t *gamma_g, uint16_t *gamma_b, - int size, const color_setting_t *setting); + ssize_t size, const color_setting_t *setting); void colorramp_fill_float(float *gamma_r, float *gamma_g, float *gamma_b, - int size, const color_setting_t *setting); + ssize_t size, const color_setting_t *setting); #endif /* ! REDSHIFT_COLORRAMP_H */ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gammastep-v2.0.9/src/gamma-wl.c new/gammastep-v2.0.11/src/gamma-wl.c --- old/gammastep-v2.0.9/src/gamma-wl.c 2022-09-12 02:57:15.000000000 +0200 +++ new/gammastep-v2.0.11/src/gamma-wl.c 2025-03-29 21:18:29.000000000 +0100 @@ -2,16 +2,23 @@ // Copyright (c) 2015 Giulio Camuffo <[email protected]> // gamma-wl.c -- Wayland gamma adjustment header +#include <limits.h> +#include <stdbool.h> #include <stdio.h> #include <stdlib.h> #include <stdint.h> #include <string.h> -#include <alloca.h> #include <sys/mman.h> #include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> #include <unistd.h> +#include <wayland-util.h> +#include <fnmatch.h> + +#ifndef FNM_EXTMATCH +# define FNM_EXTMATCH 0 +#endif #ifdef ENABLE_NLS # include <libintl.h> @@ -35,8 +42,9 @@ uint32_t gamma_control_manager_id; struct zwlr_gamma_control_manager_v1 *gamma_control_manager; int num_outputs; - struct output *outputs; + struct wl_list outputs; int authorized; + char *output_name_pattern; } wayland_state_t; struct output { @@ -44,8 +52,24 @@ struct wl_output *output; struct zwlr_gamma_control_v1 *gamma_control; uint32_t gamma_size; + struct wl_list link; + char *name; }; +static bool output_is_enabled(const wayland_state_t *state, const struct output *output) { + if (state->output_name_pattern == NULL) { + return true; + } + if (output->name == NULL) { + return false; + } + int match = fnmatch(state->output_name_pattern, output->name, FNM_EXTMATCH); + if (match == 0) { + return true; + } + return false; +} + static int wayland_init(wayland_state_t **state) { @@ -54,6 +78,7 @@ if (*state == NULL) return -1; memset(*state, 0, sizeof **state); + wl_list_init(&(*state)->outputs); return 0; } @@ -76,6 +101,61 @@ authorizer_feedback_denied }; +static void output_geometry( + void *data, + struct wl_output *wl_output, + int x, + int y, + int phy_width, + int phy_height, + int subpixel, + const char *make, + const char *model, + int transform +) { + // noop +} + +static void output_mode( + void *data, + struct wl_output *wl_output, + unsigned int flags, + int width, + int height, + int refresh +) { + // noop +} + +static void output_done(void *data, struct wl_output *wl_output) { + // noop +} + +static void output_scale(void *data, struct wl_output *wl_output, int scale) { + // noop +} + +static void output_name(void *data, struct wl_output *wl_output, const char *name) { + struct output *state = data; + if ((state->name = strdup(name)) == NULL) { + vlog_err("Failed to allocate memory."); + exit(EXIT_FAILURE); + } +} + +static void output_description(void *data, struct wl_output *wl_output, const char *description) { + // noop +} + +static const struct wl_output_listener output_listener = { + .geometry = output_geometry, + .mode = output_mode, + .done = output_done, + .scale = output_scale, + .name = output_name, + .description = output_description, +}; + static void registry_global(void *data, struct wl_registry *registry, uint32_t id, const char *interface, uint32_t version) { @@ -86,15 +166,17 @@ state->gamma_control_manager = wl_registry_bind(registry, id, &zwlr_gamma_control_manager_v1_interface, 1); } else if (strcmp(interface, "wl_output") == 0) { state->num_outputs++; - if (!(state->outputs = realloc(state->outputs, state->num_outputs * sizeof(struct output)))) { + struct output *output = malloc(sizeof(struct output)); + if (output == NULL) { vlog_err(_("Failed to allocate memory")); return; } - - struct output *output = &state->outputs[state->num_outputs - 1]; + output->name = NULL; output->global_id = id; - output->output = wl_registry_bind(registry, id, &wl_output_interface, 1); + output->output = wl_registry_bind(registry, id, &wl_output_interface, 4); output->gamma_control = NULL; + output->gamma_size = 0; + wl_list_insert(&state->outputs, &output->link); } else if (strcmp(interface, "orbital_authorizer") == 0) { struct wl_event_queue *queue = wl_display_create_queue(state->display); @@ -125,8 +207,8 @@ exit(EXIT_FAILURE); } - for (int i = 0; i < state->num_outputs; ++i) { - struct output *output = &state->outputs[i]; + struct output *output; + wl_list_for_each(output, &state->outputs, link) { if (output->global_id == id) { if (output->gamma_control) { zwlr_gamma_control_v1_destroy(output->gamma_control); @@ -134,12 +216,10 @@ } wl_output_destroy(output->output); - /* If the removed output is not the last one in the array move the last one - * in the now empty slot. Then shrink the array */ - if (i < --state->num_outputs) { - memcpy(output, &state->outputs[state->num_outputs], sizeof(struct output)); - } - state->outputs = realloc(state->outputs, state->num_outputs * sizeof(struct output)); + state->num_outputs--; + wl_list_remove(&output->link); + free(output->name); + free(output); return; } @@ -184,11 +264,37 @@ wl_registry_add_listener(state->registry, ®istry_listener, state); wl_display_roundtrip(state->display); + struct output *output; + wl_list_for_each(output, &state->outputs, link) { + wl_output_add_listener(output->output, &output_listener, output); + } + wl_display_roundtrip(state->display); + struct output *tmp; + wl_list_for_each_safe(output, tmp, &state->outputs, link) { + if (output_is_enabled(state, output)) { + continue; + } + if (output->name) { + vlog_info("%s: %s", + _("Disabling output due to configuration"), + output->name); + } else { + vlog_info(_("Disabling output due to configuration")); + } + if (output->gamma_control) { + zwlr_gamma_control_v1_destroy(output->gamma_control); + output->gamma_control = NULL; + } + wl_output_destroy(output->output); + wl_list_remove(&output->link); + free(output->name); + free(output); + } if (!state->gamma_control_manager) { vlog_err(_("Could not control gamma, exiting.")); return -1; } - if (state->num_outputs > 0 && !state->outputs) { + if (state->num_outputs > 0 && wl_list_empty(&state->outputs)) { vlog_err(_("No outputs available, exiting.")); return -1; } @@ -199,8 +305,8 @@ static void wayland_restore(wayland_state_t *state) { - for (int i = 0; i < state->num_outputs; ++i) { - struct output *output = &state->outputs[i]; + struct output *output; + wl_list_for_each(output, &state->outputs, link) { if (output->gamma_control) { zwlr_gamma_control_v1_destroy(output->gamma_control); output->gamma_control = NULL; @@ -223,15 +329,17 @@ wl_callback_destroy(state->callback); } - for (int i = 0; i < state->num_outputs; ++i) { - struct output *output = &state->outputs[i]; + struct output *output, *tmp; + wl_list_for_each_safe(output, tmp, &state->outputs, link) { if (output->gamma_control) { zwlr_gamma_control_v1_destroy(output->gamma_control); output->gamma_control = NULL; } wl_output_destroy(output->output); + wl_list_remove(&output->link); + free(output->name); + free(output); } - free(state->outputs); if (state->gamma_control_manager) { zwlr_gamma_control_manager_v1_destroy(state->gamma_control_manager); @@ -249,13 +357,24 @@ static void wayland_print_help(FILE *f) { - fputs(_("Adjust gamma ramps with a Wayland compositor.\n"), f); + fputs(_("Adjust gamma ramps with a Wayland compositor."), f); + fputs("\n\n output=N\t\t", f); + fputs(_("only apply to outputs with names matching this pattern"), f); fputs("\n", f); } static int wayland_set_option(wayland_state_t *state, const char *key, const char *value) { + if (strcasecmp(key, "output") == 0) { + if (!(state->output_name_pattern = strdup(value))) { + vlog_err(_("Failed to allocate memory")); + return -1; + } + } else { + vlog_err("%s: `%s'.", _("Unknown method parameter"), key); + return -1; + } return 0; } @@ -288,8 +407,8 @@ return ret; } - for (int i = 0; i < state->num_outputs; ++i) { - struct output *output = &state->outputs[i]; + struct output *output; + wl_list_for_each(output, &state->outputs, link) { /* For some reason, gamma control will be reported as * no longer supported after a tty switch. For this * reason, retry if gamma_size has become 0. */ @@ -308,13 +427,12 @@ } int unsupported_outputs = 0; - for (int i = 0; i < state->num_outputs; ++i) { - struct output *output = &state->outputs[i]; - if (output->gamma_size == 0) { + wl_list_for_each(output, &state->outputs, link) { + if (output->gamma_size == 0 || output->gamma_size > SSIZE_MAX / (3 * sizeof(uint16_t))) { unsupported_outputs += 1; continue; } - int size = output->gamma_size; + ssize_t size = output->gamma_size; size_t ramp_bytes = size * sizeof(uint16_t); size_t total_bytes = ramp_bytes * 3; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gammastep-v2.0.9/src/hooks.c new/gammastep-v2.0.11/src/hooks.c --- old/gammastep-v2.0.9/src/hooks.c 2022-09-12 02:57:15.000000000 +0200 +++ new/gammastep-v2.0.11/src/hooks.c 2025-03-29 21:18:29.000000000 +0100 @@ -8,6 +8,7 @@ #include <unistd.h> #include <errno.h> #include <pwd.h> +#include <string.h> #include "hooks.h" #include "redshift.h" @@ -62,6 +63,7 @@ while ((ent = readdir(hooks_dir)) != NULL) { /* Skip hidden and special files (., ..) */ if (ent->d_name[0] == '\0' || ent->d_name[0] == '.') continue; + if (strchr(ent->d_name, '\0')[-1] == '~') continue; char *hook_name = ent->d_name; char hook_path[MAX_HOOK_PATH]; @@ -88,4 +90,6 @@ _exit(EXIT_FAILURE); } } + + closedir(hooks_dir); }
