Hello community, here is the log from the commit of package grim for openSUSE:Factory checked in at 2020-07-24 09:58:23 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/grim (Old) and /work/SRC/openSUSE:Factory/.grim.new.3592 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "grim" Fri Jul 24 09:58:23 2020 rev:4 rq:822177 version:1.3.1 Changes: -------- --- /work/SRC/openSUSE:Factory/grim/grim.changes 2020-01-16 18:23:38.153054811 +0100 +++ /work/SRC/openSUSE:Factory/.grim.new.3592/grim.changes 2020-07-24 09:59:53.649639568 +0200 @@ -1,0 +2,14 @@ +Wed Jul 22 07:35:49 UTC 2020 - Michael Vetter <[email protected]> + +- Update to 1.3.1: + * Explain that '.' is grim's final fallback dir + * Correct interpretation of output rotation + * Fix maybe-uninitialized warning + * Add completions for fish-shell + * completions: add missing option + * Improve error message for when supplied region is invalid + * fix bufferoverflow in output_filepath + * contrib/completions: fix fish file path + * contrib/completions: fix unset datadir variable + +------------------------------------------------------------------- Old: ---- v1.3.0.tar.gz New: ---- v1.3.1.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ grim.spec ++++++ --- /var/tmp/diff_new_pack.YJV043/_old 2020-07-24 09:59:59.309644838 +0200 +++ /var/tmp/diff_new_pack.YJV043/_new 2020-07-24 09:59:59.313644842 +0200 @@ -1,7 +1,7 @@ # # spec file for package grim # -# 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 @@ -17,7 +17,7 @@ Name: grim -Version: 1.3.0 +Version: 1.3.1 Release: 0 Summary: Wayland compositor image grabber License: MIT ++++++ v1.3.0.tar.gz -> v1.3.1.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/grim-1.3.0/contrib/completions/fish/grim.fish new/grim-1.3.1/contrib/completions/fish/grim.fish --- old/grim-1.3.0/contrib/completions/fish/grim.fish 1970-01-01 01:00:00.000000000 +0100 +++ new/grim-1.3.1/contrib/completions/fish/grim.fish 2020-07-21 20:11:14.000000000 +0200 @@ -0,0 +1,15 @@ +function complete_outputs + if string length -q "$SWAYSOCK"; and command -sq jq + swaymsg -t get_outputs | jq -r '.[] | select(.active) | "\(.name)\t\(.make) \(.model)"' + else + return 1 + end +end + +complete -c grim -s t --exclusive --arguments 'png ppm jpeg' -d 'Output image format' +complete -c grim -s q --exclusive -d 'Output jpeg quality (default 80)' +complete -c grim -s g --exclusive -d 'Region to capture: <x>,<y> <w>x<h>' +complete -c grim -s s --exclusive -d 'Output image scale factor' +complete -c grim -s c -d 'Include cursors in the screenshot' +complete -c grim -s h -d 'Show help and exit' +complete -c grim -s o --exclusive --arguments '(complete_outputs)' -d 'Output name to capture' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/grim-1.3.0/contrib/completions/meson.build new/grim-1.3.1/contrib/completions/meson.build --- old/grim-1.3.0/contrib/completions/meson.build 1970-01-01 01:00:00.000000000 +0100 +++ new/grim-1.3.1/contrib/completions/meson.build 2020-07-21 20:11:14.000000000 +0200 @@ -0,0 +1,12 @@ +fish_comp = dependency('fish', required: false) + +if get_option('fish-completions') + fish_files = files('fish/grim.fish') + if fish_comp.found() + fish_install_dir = fish_comp.get_pkgconfig_variable('completionsdir') + else + datadir = get_option('datadir') + fish_install_dir = join_paths(datadir, 'fish', 'vendor_completions.d') + endif + install_data(fish_files, install_dir: fish_install_dir) +endif diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/grim-1.3.0/grim.1.scd new/grim-1.3.1/grim.1.scd --- old/grim-1.3.0/grim.1.scd 2020-01-16 12:33:31.000000000 +0100 +++ new/grim-1.3.1/grim.1.scd 2020-07-21 20:11:14.000000000 +0200 @@ -16,8 +16,9 @@ grim will write an image to _output-file_, or to a timestamped file name in *$GRIM_DEFAULT_DIR* if not specified. If *$GRIM_DEFAULT_DIR* is not set, it -defaults to *$XDG_PICTURES_DIR*. If _output-file_ is *-*, grim will output the -image to the standard output instead. +falls back first to *$XDG_PICTURES_DIR* and then to the current working +directory. If _output-file_ is *-*, grim will write the image to the standard +output instead. # OPTIONS diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/grim-1.3.0/main.c new/grim-1.3.1/main.c --- old/grim-1.3.0/main.c 2020-01-16 12:33:31.000000000 +0100 +++ new/grim-1.3.1/main.c 2020-07-21 20:11:14.000000000 +0200 @@ -371,6 +371,10 @@ filepath(output_filepath, output_filename); } else { output_filename = argv[optind]; + if (strlen(output_filename) >= PATH_MAX) { + fprintf(stderr, "'%s': filepath too long\n", output_filename); + return EXIT_FAILURE; + } strcpy(output_filepath, output_filename); } @@ -460,7 +464,7 @@ } if (n_pending == 0) { - fprintf(stderr, "screenshot region is empty\n"); + fprintf(stderr, "supplied geometry did not intersect with any outputs\n"); return EXIT_FAILURE; } @@ -483,7 +487,7 @@ return EXIT_FAILURE; } - cairo_status_t status; + cairo_status_t status = CAIRO_STATUS_INVALID_STATUS; if (strcmp(output_filename, "-") == 0) { switch (output_filetype) { case GRIM_FILETYPE_PPM: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/grim-1.3.0/meson.build new/grim-1.3.1/meson.build --- old/grim-1.3.0/meson.build 2020-01-16 12:33:31.000000000 +0100 +++ new/grim-1.3.1/meson.build 2020-07-21 20:11:14.000000000 +0200 @@ -1,14 +1,10 @@ project( - 'grim', - 'c', - version: '1.3.0', - license: 'MIT', - meson_version: '>=0.48.0', - default_options: [ - 'c_std=c11', - 'warning_level=3', - 'werror=true', - ], + 'grim', + 'c', +version : '1.3.1', +license : 'MIT', +meson_version : '>=0.48.0', +default_options : ['c_std=c11', 'warning_level=3', 'werror=true'] ) add_project_arguments('-Wno-unused-parameter', language: 'c') @@ -28,6 +24,7 @@ add_project_arguments('-DHAVE_JPEG', language: 'c') endif +subdir('contrib/completions') subdir('protocol') grim_files = [ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/grim-1.3.0/meson_options.txt new/grim-1.3.1/meson_options.txt --- old/grim-1.3.0/meson_options.txt 2020-01-16 12:33:31.000000000 +0100 +++ new/grim-1.3.1/meson_options.txt 2020-07-21 20:11:14.000000000 +0200 @@ -1,2 +1,3 @@ option('jpeg', type: 'feature', value: 'auto', description: 'Enable JPEG support') option('man-pages', type: 'feature', value: 'auto', description: 'Generate and install man pages') +option('fish-completions', type: 'boolean', value: false, description: 'Install fish completions') diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/grim-1.3.0/render.c new/grim-1.3.1/render.c --- old/grim-1.3.0/render.c 2020-01-16 12:33:31.000000000 +0100 +++ new/grim-1.3.1/render.c 2020-07-21 20:11:14.000000000 +0200 @@ -104,7 +104,7 @@ cairo_matrix_translate(&matrix, (double)output->geometry.width / 2, (double)output->geometry.height / 2); - cairo_matrix_rotate(&matrix, -get_output_rotation(output->transform)); + cairo_matrix_rotate(&matrix, get_output_rotation(output->transform)); cairo_matrix_scale(&matrix, (double)raw_output_width / output_width * output_flipped_x, (double)raw_output_height / output_height * output_flipped_y);
