Hello community, here is the log from the commit of package qiv for openSUSE:Factory checked in at 2013-02-25 20:42:21 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/qiv (Old) and /work/SRC/openSUSE:Factory/.qiv.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "qiv", Maintainer is "lnus...@suse.com" Changes: -------- --- /work/SRC/openSUSE:Factory/qiv/qiv.changes 2012-02-22 15:55:09.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.qiv.new/qiv.changes 2013-02-25 20:42:22.000000000 +0100 @@ -1,0 +2,8 @@ +Mon Feb 18 22:39:38 UTC 2013 - jsl...@suse.com + +- magic-optimization.patch: optimize libmagic invocation + (workaround for bnc#804323) +- update-copying.patch: update README.COPYING to have correct + address + +------------------------------------------------------------------- New: ---- magic-optimization.patch update-copying.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ qiv.spec ++++++ --- /var/tmp/diff_new_pack.6ZK3Br/_old 2013-02-25 20:42:23.000000000 +0100 +++ /var/tmp/diff_new_pack.6ZK3Br/_new 2013-02-25 20:42:23.000000000 +0100 @@ -1,7 +1,7 @@ # # spec file for package qiv # -# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -16,21 +16,22 @@ # - Name: qiv Version: 2.2.4 -Release: 1 +Release: 0 Summary: Probably the fastest and simplest image viewer on the planet -Group: Productivity/Graphics/Viewers License: GPL-2.0+ +Group: Productivity/Graphics/Viewers Url: http://spiegl.de/qiv/ Source0: http://spiegl.de/qiv/download/qiv-%{version}.tgz +Patch0: magic-optimization.patch +Patch1: update-copying.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: file-devel BuildRequires: gtk2-devel BuildRequires: imlib2-devel -BuildRequires: libexif-devel BuildRequires: libXinerama-devel +BuildRequires: libexif-devel # imlib itself only recommends that but we actually need them to # load images Requires: imlib2-loaders @@ -74,6 +75,8 @@ %prep %setup -q +%patch0 -p1 +%patch1 -p1 sed -i 's/-O2/$(RPM_OPT_FLAGS)/' Makefile %build ++++++ magic-optimization.patch ++++++ From: Jiri Slaby <jsl...@suse.cz> Subject: Optimize libmagic calls References: bnc#804323 magic_open, magic_load and magic_close need to be called only once. So optimize this by moving at appropriate place. This BTW fixes a bug in libmagic which causes crashes on second invocation of magic_load. That is to be fixed but it is a different story for libmagic developers. --- main.c | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) --- a/main.c +++ b/main.c @@ -32,7 +32,7 @@ static gboolean qiv_handle_timer(gpointe static void qiv_timer_restart(gpointer); #ifdef HAVE_MAGIC -static int check_magic(const char *name); +static int check_magic(magic_t cookie, const char *name); #endif int main(int argc, char **argv) @@ -227,11 +227,17 @@ static void qiv_timer_restart(gpointer d static void filter_images(int *images, char **image_names) { int i = 0; +#ifdef HAVE_MAGIC + magic_t cookie; + + cookie = magic_open(MAGIC_NONE); + magic_load(cookie,NULL); +#endif while(i < *images) { if (check_extension(image_names[i]) #ifdef HAVE_MAGIC - || check_magic(image_names[i]) + || check_magic(cookie, image_names[i]) #endif ) { i++; @@ -246,6 +252,9 @@ static void filter_images(int *images, c --(*images); } } +#ifdef HAVE_MAGIC + magic_close(cookie); +#endif if (image_idx < 0) image_idx = 0; } @@ -264,15 +273,12 @@ static int check_extension(const char *n } #ifdef HAVE_MAGIC -static int check_magic(const char *name) +static int check_magic(magic_t cookie, const char *name) { - magic_t cookie; const char *description=NULL; int i; int ret=0; - cookie = magic_open(MAGIC_NONE); - magic_load(cookie,NULL); description = magic_file(cookie, name); if(description) { @@ -283,7 +289,6 @@ static int check_magic(const char *name) break; } } - magic_close(cookie); return ret; } #endif ++++++ update-copying.patch ++++++ From: Jiri Slaby <jsl...@suse.cz> Subject: Fix FSF address FSF has moved and we should update the address in the GPLv2 license. --- README.COPYING | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) --- a/README.COPYING +++ b/README.COPYING @@ -2,7 +2,8 @@ Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. - 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. -- To unsubscribe, e-mail: opensuse-commit+unsubscr...@opensuse.org For additional commands, e-mail: opensuse-commit+h...@opensuse.org