Hello community, here is the log from the commit of package feh for openSUSE:Factory checked in at 2018-05-15 10:13:40 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/feh (Old) and /work/SRC/openSUSE:Factory/.feh.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "feh" Tue May 15 10:13:40 2018 rev:24 rq:606561 version:2.26.1 Changes: -------- --- /work/SRC/openSUSE:Factory/feh/feh.changes 2018-05-11 09:15:48.447879442 +0200 +++ /work/SRC/openSUSE:Factory/.feh.new/feh.changes 2018-05-15 10:33:28.392031231 +0200 @@ -1,0 +2,11 @@ +Sat May 12 04:05:28 UTC 2018 - avin...@opensuse.org + +- Update to 2.26.1 + * Restore pre-2.21 ~/.fehbg behaviour. This fixes nondeterministic + wallpaper setting when using --bg-* --randomize, issues when + specifying --theme both in ~/.fehbg and on the commandline, and + possibly other edge cases + * Fix /tmp being cluttered with temp ImageMagick files when using + --magick-timeout and a conversion takes longer than allowed + +------------------------------------------------------------------- Old: ---- feh-2.26.tar.bz2 feh-2.26.tar.bz2.asc New: ---- feh-2.26.1.tar.bz2 feh-2.26.1.tar.bz2.asc ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ feh.spec ++++++ --- /var/tmp/diff_new_pack.M6mkzV/_old 2018-05-15 10:33:29.088005669 +0200 +++ /var/tmp/diff_new_pack.M6mkzV/_new 2018-05-15 10:33:29.088005669 +0200 @@ -17,12 +17,12 @@ Name: feh -Version: 2.26 +Version: 2.26.1 Release: 0 Summary: X11 image viewer License: MIT AND LGPL-2.0-or-later Group: Productivity/Graphics/Viewers -Url: https://feh.finalrewind.org/ +URL: https://feh.finalrewind.org/ Source: https://feh.finalrewind.org/%{name}-%{version}.tar.bz2 Source1: https://feh.finalrewind.org/%{name}-%{version}.tar.bz2.asc Source2: %{name}.keyring ++++++ feh-2.26.tar.bz2 -> feh-2.26.1.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/feh-2.26/ChangeLog new/feh-2.26.1/ChangeLog --- old/feh-2.26/ChangeLog 2018-04-19 21:44:35.000000000 +0200 +++ new/feh-2.26.1/ChangeLog 2018-05-11 15:23:09.000000000 +0200 @@ -1,3 +1,13 @@ +Fri, 11 May 2018 15:11:17 +0200 Daniel Friesel <derf+...@finalrewind.org> + +* Release v2.26.1 + * Restore pre-2.21 ~/.fehbg behaviour. This fixes nondeterministic + wallpaper setting when using --bg-* --randomize, issues when specifying + --theme both in ~/.fehbg and on the commandline, and possibly other + edge cases + * Fix /tmp being cluttered with temporary ImageMagick files when using + --magick-timeout and a conversion takes longer than allowed + Thu, 19 Apr 2018 21:43:12 +0200 Daniel Friesel <derf+...@finalrewind.org> * Release v2.26 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/feh-2.26/config.mk new/feh-2.26.1/config.mk --- old/feh-2.26/config.mk 2018-04-19 21:44:35.000000000 +0200 +++ new/feh-2.26.1/config.mk 2018-05-11 15:23:09.000000000 +0200 @@ -1,5 +1,5 @@ PACKAGE ?= feh -VERSION ?= 2.26 +VERSION ?= 2.26.1 app ?= 0 cam ?= 0 @@ -87,7 +87,7 @@ MAN_EXIF = disabled endif -MAN_DATE ?= April 19, 2018 +MAN_DATE ?= May 11, 2018 # Uncomment this to use dmalloc #CFLAGS += -DWITH_DMALLOC diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/feh-2.26/man/feh.pre new/feh-2.26.1/man/feh.pre --- old/feh-2.26/man/feh.pre 2018-04-19 21:44:35.000000000 +0200 +++ new/feh-2.26.1/man/feh.pre 2018-05-11 15:23:09.000000000 +0200 @@ -489,11 +489,6 @@ to try indefinitely. By default, magick support is disabled. . -Note that feh may clutter -.Pa /tmp -with temporary files created by ImageMagick for each failed conversion attempt. -This is a known bug. -. .It Cm --max-dimension Ar width No x Ar height . Only show images with width <= @@ -965,14 +960,6 @@ .Qq ~/.fehbg & to your X startup script .Pq such as Pa ~/.xinitrc . -Note that -.Pq unless the wallpaper is set via the menu -.Nm -saves the files and directories it was passed on the commandline, not the -files which actually ended up as wallpaper. -So, if you have randomization enabled, -.Pa ~/.fehbg -may set different wallpapers on each execution. . .Pp . @@ -1924,16 +1911,6 @@ does not take window decorations into account and may therefore make the window slightly too large. . -.Pp -. -When enabled, -.Cm --magick-timeout -may clutter -.Pa /tmp -with temporary files produced by ImageMagick. -This happens whenever an image is not loaded due to the conversion taking -longer than the specified timeout. -. .Ss REPORTING BUGS . If you find a bug, please report it to diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/feh-2.26/src/imlib.c new/feh-2.26.1/src/imlib.c --- old/feh-2.26/src/imlib.c 2018-04-19 21:44:35.000000000 +0200 +++ new/feh-2.26.1/src/imlib.c 2018-05-11 15:23:09.000000000 +0200 @@ -304,8 +304,10 @@ char *basename; char *tmpname; char *sfn; + char tempdir[] = "/tmp/.feh-magick-tmp-XXXXXX"; int fd = -1, devnull = -1; int status; + char created_tempdir = 0; if (opt.magick_timeout < 0) return NULL; @@ -339,6 +341,22 @@ */ argv_fn = estrjoin(":", "png", sfn, NULL); + /* + * By default, ImageMagick saves (occasionally lots of) temporary files + * in /tmp. It doesn't remove them if it runs into a timeout and is killed + * by us, no matter whether we use SIGINT, SIGTERM or SIGKILL. So, unless + * MAGICK_TMPDIR has already been set by the user, we create our own + * temporary directory for ImageMagick and remove its contents at the end of + * this function. + */ + if (getenv("MAGICK_TMPDIR") == NULL) { + if (mkdtemp(tempdir) == NULL) { + weprintf("%s: ImageMagick may leave temporary files in /tmp. mkdtemp failed:", filename); + } else { + created_tempdir = 1; + } + } + if ((childpid = fork()) < 0) { weprintf("%s: Can't load with imagemagick. Fork failed:", filename); unlink(sfn); @@ -360,6 +378,11 @@ */ setpgid(0, 0); + if (created_tempdir) { + // no error checking - this is a best-effort code path + setenv("MAGICK_TMPDIR", tempdir, 0); + } + execlp("convert", "convert", filename, argv_fn, NULL); _exit(1); } @@ -373,13 +396,39 @@ sfn = NULL; if (!opt.quiet) { - weprintf("%s - Conversion took too long, skipping", filename); + weprintf("%s: Conversion took too long, skipping", filename); } } close(fd); childpid = 0; } + if (created_tempdir) { + DIR *dir; + struct dirent *de; + if ((dir = opendir(tempdir)) == NULL) { + weprintf("%s: Cannot remove temporary ImageMagick files from %s:", filename, tempdir); + } else { + while ((de = readdir(dir)) != NULL) { + if (de->d_name[0] != '.') { + char *temporary_file_name = estrjoin("/", tempdir, de->d_name, NULL); + /* + * We assume that ImageMagick only creates temporary files and + * not directories. + */ + if (unlink(temporary_file_name) == -1) { + weprintf("unlink %s:", temporary_file_name); + } + free(temporary_file_name); + } + } + if (rmdir(tempdir) == -1) { + weprintf("rmdir %s:", tempdir); + } + } + closedir(dir); + } + free(argv_fn); return sfn; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/feh-2.26/src/wallpaper.c new/feh-2.26.1/src/wallpaper.c --- old/feh-2.26/src/wallpaper.c 2018-04-19 21:44:35.000000000 +0200 +++ new/feh-2.26.1/src/wallpaper.c 2018-05-11 15:23:09.000000000 +0200 @@ -461,6 +461,44 @@ weprintf("Can't write to %s", path); } else { fputs("#!/bin/sh\n", fp); + fputs(cmdargv[0], fp); + fputs(" --bg-", fp); + if (centered) + fputs("center", fp); + else if (scaled) + fputs("scale", fp); + else if (filled) + fputs("fill", fp); + else + fputs("tile", fp); + if (opt.image_bg) { + fputs(" --image-bg ", fp); + fputs(opt.image_bg, fp); + } +#ifdef HAVE_LIBXINERAMA + if (opt.xinerama) { + if (opt.xinerama_index >= 0) { + fprintf(fp, " --xinerama-index %d", opt.xinerama_index); + } + } + else { + fputs(" --no-xinerama", fp); + } +#endif /* HAVE_LIBXINERAMA */ + if (opt.geom_flags & XValue) { + fprintf(fp, " --geometry %c%d", + opt.geom_flags & XNegative ? '-' : '+', + opt.geom_flags & XNegative ? abs(opt.geom_x) : opt.geom_x); + if (opt.geom_flags & YValue) { + fprintf(fp, "%c%d", + opt.geom_flags & YNegative ? '-' : '+', + opt.geom_flags & YNegative ? abs(opt.geom_y) : opt.geom_y); + } + } + if (opt.force_aliasing) { + fputs(" --force-aliasing", fp); + } + fputc(' ', fp); if (use_filelist) { for (int i = 0; i < cmdargc; i++) { if (filelist_pos && !strcmp(FEH_FILE(filelist_pos->data)->filename, cmdargv[i])) { @@ -469,30 +507,10 @@ fputs(shell_escape(absolute_path), fp); filelist_pos = filelist_pos->next; free(absolute_path); - } else { - /* argument is an option / option arg */ - fputs(shell_escape(cmdargv[i]), fp); + fputc(' ', fp); } - fputc(' ', fp); } } else if (fil) { - fputs("feh --bg-", fp); - if (centered) - fputs("center", fp); - else if (scaled) - fputs("scale", fp); - else if (filled) - fputs("fill", fp); - else - fputs("tile", fp); - - if (opt.force_aliasing) - fputs(" --force-aliasing", fp); -#ifdef HAVE_LIBXINERAMA - if (!opt.xinerama) - fputs(" --no-xinerama", fp); -#endif - fputc(' ', fp); absolute_path = feh_absolute_path(fil); fputs(shell_escape(absolute_path), fp); free(absolute_path);