From 65c0373f862a867b6a9cd32f466f302134730285 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Aug 01 2017 03:47:12 +0000 Subject: import gdk-pixbuf2-2.36.5-1.el7 --- diff --git a/.gdk-pixbuf2.metadata b/.gdk-pixbuf2.metadata index 02f2670..c5dc965 100644 --- a/.gdk-pixbuf2.metadata +++ b/.gdk-pixbuf2.metadata @@ -1 +1 @@ -99de0f54ac0db273599a8a5fb6def7c4e326c2cf SOURCES/gdk-pixbuf-2.31.6.tar.xz +e38c483010e0d35db39fddb891023033f3107232 SOURCES/gdk-pixbuf-2.36.5.tar.xz diff --git a/.gitignore b/.gitignore index f9fa4d7..2c20eeb 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -SOURCES/gdk-pixbuf-2.31.6.tar.xz +SOURCES/gdk-pixbuf-2.36.5.tar.xz diff --git a/SOURCES/0001-Skip-tests-when-we-can-t-run-them-due-to-lack-of-mem.patch b/SOURCES/0001-Skip-tests-when-we-can-t-run-them-due-to-lack-of-mem.patch deleted file mode 100644 index 2843147..0000000 --- a/SOURCES/0001-Skip-tests-when-we-can-t-run-them-due-to-lack-of-mem.patch +++ /dev/null @@ -1,128 +0,0 @@ -From e7f940102d40997f2e23a0589247cfb189dfaa98 Mon Sep 17 00:00:00 2001 -From: Iain Lane -Date: Sun, 20 Sep 2015 13:24:21 +0100 -Subject: [PATCH] Skip tests when we can't run them due to lack of memory - -Check if we have failed due to insufficient memory and skip if -so. - -https://bugzilla.gnome.org/show_bug.cgi?id=754387 ---- - tests/Makefile.am | 2 ++ - tests/cve-2015-4491.c | 4 ++++ - tests/pixbuf-scale.c | 25 ++++++++++++++++++++++--- - tests/test-common.c | 14 ++++++++++++++ - tests/test-common.h | 1 + - 5 files changed, 43 insertions(+), 3 deletions(-) - -diff --git a/tests/Makefile.am b/tests/Makefile.am -index d5dca44..1f09711 100644 ---- a/tests/Makefile.am -+++ b/tests/Makefile.am -@@ -65,6 +65,8 @@ dist_installed_test_data = \ - - cve_2015_4491_SOURCES = \ - cve-2015-4491.c \ -+ test-common.c \ -+ test-common.h \ - resources.h \ - resources.c \ - $(NULL) -diff --git a/tests/Makefile.am b/tests/Makefile.am -index d5dca44..1f09711 100644 ---- a/tests/Makefile.in -+++ b/tests/Makefile.in -@@ -202,7 +202,7 @@ - am__v_lt_1 = - am__objects_1 = - am_cve_2015_4491_OBJECTS = cve-2015-4491.$(OBJEXT) resources.$(OBJEXT) \ -- $(am__objects_1) -+ test-common.$(OBJEXT) $(am__objects_1) - cve_2015_4491_OBJECTS = $(am_cve_2015_4491_OBJECTS) - cve_2015_4491_LDADD = $(LDADD) - cve_2015_4491_DEPENDENCIES = $(top_builddir)/gdk-pixbuf/libgdk_pixbuf-$(GDK_PIXBUF_API_VERSION).la \ -@@ -879,6 +879,8 @@ - - cve_2015_4491_SOURCES = \ - cve-2015-4491.c \ -+ test-common.c \ -+ test-common.h \ - resources.h \ - resources.c \ - $(NULL) -diff --git a/tests/cve-2015-4491.c b/tests/cve-2015-4491.c -index 34ba94f..988cb49 100644 ---- a/tests/cve-2015-4491.c -+++ b/tests/cve-2015-4491.c -@@ -20,6 +20,8 @@ - - #include - -+#include "test-common.h" -+ - static void - test_original (void) - { -@@ -28,6 +30,8 @@ test_original (void) - GError* err = NULL; - - buf = gdk_pixbuf_new_from_resource_at_scale ("/test/resource/cve-2015-4491.bmp", size, size, FALSE, &err); -+ if (skip_if_insufficient_memory (&err)) -+ return; - - g_assert_no_error (err); - -diff --git a/tests/pixbuf-scale.c b/tests/pixbuf-scale.c -index e2be5f5..60d0a20 100644 ---- a/tests/pixbuf-scale.c -+++ b/tests/pixbuf-scale.c -@@ -83,6 +83,9 @@ test_scale_down (gconstpointer data) - - path = g_test_get_filename (G_TEST_DIST, filename, NULL); - ref = gdk_pixbuf_new_from_file (path, &error); -+ -+ if (skip_if_insufficient_memory (&error)) -+ return; - g_assert_no_error (error); - - width = gdk_pixbuf_get_width (ref); -diff --git a/tests/test-common.c b/tests/test-common.c -index 7071d4c..0f70a8b 100644 ---- a/tests/test-common.c -+++ b/tests/test-common.c -@@ -65,6 +65,20 @@ format_supported (const gchar *filename) - } - - gboolean -+skip_if_insufficient_memory (GError **err) -+{ -+ if (*err && g_error_matches (*err, GDK_PIXBUF_ERROR, GDK_PIXBUF_ERROR_INSUFFICIENT_MEMORY)) -+ { -+ g_test_skip ((*err)->message); -+ g_error_free (*err); -+ *err = NULL; -+ return TRUE; -+ } -+ -+ return FALSE; -+} -+ -+gboolean - pixdata_equal (GdkPixbuf *p1, GdkPixbuf *p2, GError **error) - { - if (gdk_pixbuf_get_colorspace (p1) != gdk_pixbuf_get_colorspace (p2)) { -diff --git a/tests/test-common.h b/tests/test-common.h -index 56e4418..0514cd7 100644 ---- a/tests/test-common.h -+++ b/tests/test-common.h -@@ -28,6 +28,7 @@ - G_BEGIN_DECLS - - gboolean format_supported (const gchar *filename); -+gboolean skip_if_insufficient_memory (GError **err); - gboolean pixdata_equal (GdkPixbuf *p1, GdkPixbuf *p2, GError **error); - - G_END_DECLS --- -2.4.3 - diff --git a/SOURCES/0001-pixops-Chane-variable-type.patch b/SOURCES/0001-pixops-Chane-variable-type.patch deleted file mode 100644 index f73e0b3..0000000 --- a/SOURCES/0001-pixops-Chane-variable-type.patch +++ /dev/null @@ -1,37 +0,0 @@ -From 3df91dc6c6f8d1421e9c8756959280de792af77a Mon Sep 17 00:00:00 2001 -From: Benjamin Otte -Date: Sat, 22 Aug 2015 17:57:23 +0200 -Subject: [PATCH 1/2] pixops: Chane variable type - -n_weights is used to do overflow checks. So by reducing the size to 32 -bits signed we overflow earlier. This is necessary because further down -the code lots of code uses int variables to iterate over this variable -and we don't want those to overflow. - -The correct fix would be to make all those variables gsize too, but -that's way more invasive and requires different checks in different -places so I'm not gonna do that now. -And as long as scale factors are not expected to reach G_MAXINT it's not -really necessary to do this change anyway. - -https://bugzilla.gnome.org/show_bug.cgi?id=753908 ---- - gdk-pixbuf/pixops/pixops.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/gdk-pixbuf/pixops/pixops.c b/gdk-pixbuf/pixops/pixops.c -index 7f2cbff..b7951c7 100644 ---- a/gdk-pixbuf/pixops/pixops.c -+++ b/gdk-pixbuf/pixops/pixops.c -@@ -1272,7 +1272,7 @@ make_filter_table (PixopsFilter *filter) - int i_offset, j_offset; - int n_x = filter->x.n; - int n_y = filter->y.n; -- gsize n_weights; -+ int n_weights; - int *weights; - - n_weights = SUBSAMPLE * SUBSAMPLE * n_x; --- -2.5.2 - diff --git a/SOURCES/0001-pixops-Fail-make_weights-functions-on-OOM.patch b/SOURCES/0001-pixops-Fail-make_weights-functions-on-OOM.patch deleted file mode 100644 index dc187b9..0000000 --- a/SOURCES/0001-pixops-Fail-make_weights-functions-on-OOM.patch +++ /dev/null @@ -1,195 +0,0 @@ -From 19f9685dbff7d1f929c61cf99188df917a18811d Mon Sep 17 00:00:00 2001 -From: Benjamin Otte -Date: Sat, 19 Sep 2015 21:24:34 +0200 -Subject: [PATCH] pixops: Fail make_weights functions on OOM - -The weights could grow very large under certain circumstances, in -particular in security-relevant conditions, including the testsuite. -By allowing the weight allocation to fail, this can be worked around. - -https://bugzilla.gnome.org/show_bug.cgi?id=754387 ---- - gdk-pixbuf/pixops/pixops.c | 75 +++++++++++++++++++++++++++++++++------------- - 1 file changed, 55 insertions(+), 20 deletions(-) - -diff --git a/gdk-pixbuf/pixops/pixops.c b/gdk-pixbuf/pixops/pixops.c -index e41b286..4cdb5df 100644 ---- a/gdk-pixbuf/pixops/pixops.c -+++ b/gdk-pixbuf/pixops/pixops.c -@@ -1478,15 +1478,19 @@ pixops_process (guchar *dest_buf, - /* Compute weights for reconstruction by replication followed by - * sampling with a box filter - */ --static void -+static gboolean - tile_make_weights (PixopsFilterDimension *dim, - double scale) - { - int n = ceil (1 / scale + 1); -- double *pixel_weights = g_malloc_n (sizeof (double) * SUBSAMPLE, n); -+ double *pixel_weights; - int offset; - int i; - -+ pixel_weights = g_try_malloc_n (sizeof (double) * SUBSAMPLE, n); -+ if (pixel_weights == NULL) -+ return FALSE; -+ - dim->n = n; - dim->offset = 0; - dim->weights = pixel_weights; -@@ -1514,13 +1518,15 @@ tile_make_weights (PixopsFilterDimension *dim, - } - } - } -+ -+ return TRUE; - } - - /* Compute weights for a filter that, for minification - * is the same as 'tiles', and for magnification, is bilinear - * reconstruction followed by a sampling with a delta function. - */ --static void -+static gboolean - bilinear_magnify_make_weights (PixopsFilterDimension *dim, - double scale) - { -@@ -1541,7 +1547,9 @@ bilinear_magnify_make_weights (PixopsFilterDimension *dim, - } - - dim->n = n; -- dim->weights = g_malloc_n (sizeof (double) * SUBSAMPLE, n); -+ dim->weights = g_try_malloc_n (sizeof (double) * SUBSAMPLE, n); -+ if (dim->weights == NULL) -+ return FALSE; - - pixel_weights = dim->weights; - -@@ -1581,6 +1589,8 @@ bilinear_magnify_make_weights (PixopsFilterDimension *dim, - } - } - } -+ -+ return TRUE; - } - - /* Computes the integral from b0 to b1 of -@@ -1627,15 +1637,19 @@ linear_box_half (double b0, double b1) - /* Compute weights for reconstructing with bilinear - * interpolation, then sampling with a box filter - */ --static void -+static gboolean - bilinear_box_make_weights (PixopsFilterDimension *dim, - double scale) - { - int n = ceil (1/scale + 3.0); -- double *pixel_weights = g_malloc_n (sizeof (double) * SUBSAMPLE, n); -+ double *pixel_weights; - double w; - int offset, i; - -+ pixel_weights = g_malloc_n (sizeof (double) * SUBSAMPLE, n); -+ if (pixel_weights == NULL) -+ return FALSE; -+ - dim->offset = -1.0; - dim->n = n; - dim->weights = pixel_weights; -@@ -1653,9 +1667,11 @@ bilinear_box_make_weights (PixopsFilterDimension *dim, - *(pixel_weights++) = w * scale; - } - } -+ -+ return TRUE; - } - --static void -+static gboolean - make_weights (PixopsFilter *filter, - PixopsInterpType interp_type, - double scale_x, -@@ -1664,23 +1680,39 @@ make_weights (PixopsFilter *filter, - switch (interp_type) - { - case PIXOPS_INTERP_NEAREST: -+ default: - g_assert_not_reached (); -- break; -+ return FALSE; - - case PIXOPS_INTERP_TILES: -- tile_make_weights (&filter->x, scale_x); -- tile_make_weights (&filter->y, scale_y); -- break; -+ if (!tile_make_weights (&filter->x, scale_x)) -+ return FALSE; -+ if (!tile_make_weights (&filter->y, scale_y)) -+ { -+ g_free (filter->x.weights); -+ return FALSE; -+ } -+ return TRUE; - - case PIXOPS_INTERP_BILINEAR: -- bilinear_magnify_make_weights (&filter->x, scale_x); -- bilinear_magnify_make_weights (&filter->y, scale_y); -- break; -+ if (!bilinear_magnify_make_weights (&filter->x, scale_x)) -+ return FALSE; -+ if (!bilinear_magnify_make_weights (&filter->y, scale_y)) -+ { -+ g_free (filter->x.weights); -+ return FALSE; -+ } -+ return TRUE; - - case PIXOPS_INTERP_HYPER: -- bilinear_box_make_weights (&filter->x, scale_x); -- bilinear_box_make_weights (&filter->y, scale_y); -- break; -+ if (!bilinear_box_make_weights (&filter->x, scale_x)) -+ return FALSE; -+ if (!bilinear_box_make_weights (&filter->y, scale_y)) -+ { -+ g_free (filter->x.weights); -+ return FALSE; -+ } -+ return TRUE; - } - } - -@@ -1735,7 +1767,8 @@ _pixops_composite_color_real (guchar *dest_buf, - } - - filter.overall_alpha = overall_alpha / 255.; -- make_weights (&filter, interp_type, scale_x, scale_y); -+ if (!make_weights (&filter, interp_type, scale_x, scale_y)) -+ return; - - #ifdef USE_MMX - if (filter.x.n == 2 && filter.y.n == 2 && -@@ -1890,7 +1923,8 @@ _pixops_composite_real (guchar *dest_buf, - } - - filter.overall_alpha = overall_alpha / 255.; -- make_weights (&filter, interp_type, scale_x, scale_y); -+ if (!make_weights (&filter, interp_type, scale_x, scale_y)) -+ return; - - if (filter.x.n == 2 && filter.y.n == 2 && dest_channels == 4 && - src_channels == 4 && src_has_alpha && !dest_has_alpha) -@@ -2297,7 +2331,8 @@ _pixops_scale_real (guchar *dest_buf, - } - - filter.overall_alpha = 1.0; -- make_weights (&filter, interp_type, scale_x, scale_y); -+ if (!make_weights (&filter, interp_type, scale_x, scale_y)) -+ return; - - if (filter.x.n == 2 && filter.y.n == 2 && dest_channels == 3 && src_channels == 3) - { --- -2.5.2 - diff --git a/SOURCES/0002-pixops-Be-smarter-than-gcc-s-optimizer.patch b/SOURCES/0002-pixops-Be-smarter-than-gcc-s-optimizer.patch deleted file mode 100644 index b372d27..0000000 --- a/SOURCES/0002-pixops-Be-smarter-than-gcc-s-optimizer.patch +++ /dev/null @@ -1,46 +0,0 @@ -From dd4b061c27dc0865c8f8987d294de6e04b321c18 Mon Sep 17 00:00:00 2001 -From: Benjamin Otte -Date: Sat, 22 Aug 2015 23:06:23 +0200 -Subject: [PATCH 2/2] pixops: Be smarter than gcc's optimizer - -gcc realizes that the overflow checks aren't necessary. Why not? - -Well, if an int overflows, the behavior is undefined. And turning on --fomit-instructions is valid behavior in an undefined situation. ---- - gdk-pixbuf/pixops/pixops.c | 15 +++++++-------- - 1 file changed, 7 insertions(+), 8 deletions(-) - -diff --git a/gdk-pixbuf/pixops/pixops.c b/gdk-pixbuf/pixops/pixops.c -index b7951c7..5564a40 100644 ---- a/gdk-pixbuf/pixops/pixops.c -+++ b/gdk-pixbuf/pixops/pixops.c -@@ -1272,18 +1272,17 @@ make_filter_table (PixopsFilter *filter) - int i_offset, j_offset; - int n_x = filter->x.n; - int n_y = filter->y.n; -- int n_weights; - int *weights; - -- n_weights = SUBSAMPLE * SUBSAMPLE * n_x; -- if (n_weights / (SUBSAMPLE * SUBSAMPLE) != n_x) -- return NULL; /* overflow, bail */ -+ /* check n_x doesn't overflow */ -+ if (G_MAXINT / (SUBSAMPLE * SUBSAMPLE) < n_x) -+ return NULL; - -- n_weights *= n_y; -- if (n_weights / (SUBSAMPLE * SUBSAMPLE * n_x) != n_y) -- return NULL; /* overflow, bail */ -+ /* check n_y doesn't overflow */ -+ if (G_MAXINT / (SUBSAMPLE * SUBSAMPLE * n_x) < n_y) -+ return NULL; - -- weights = g_try_new (int, n_weights); -+ weights = g_try_new (int, SUBSAMPLE * SUBSAMPLE * n_x * n_y); - if (!weights) - return NULL; /* overflow, bail */ - --- -2.5.2 - diff --git a/SPECS/gdk-pixbuf2.spec b/SPECS/gdk-pixbuf2.spec index db1c7aa..621f30f 100644 --- a/SPECS/gdk-pixbuf2.spec +++ b/SPECS/gdk-pixbuf2.spec @@ -1,28 +1,22 @@ -%global glib2_version 2.37.6 +%global glib2_version 2.48.0 Name: gdk-pixbuf2 -Version: 2.31.6 -Release: 3%{?dist} +Version: 2.36.5 +Release: 1%{?dist} Summary: An image loading library -Group: System Environment/Libraries License: LGPLv2+ -URL: http://www.gt.org +URL: http://www.gtk.org #VCS: git:git://git.gnome.org/gdk-pixbuf -Source0: http://download.gnome.org/sources/gdk-pixbuf/2.31/gdk-pixbuf-%{version}.tar.xz +Source0: http://download.gnome.org/sources/gdk-pixbuf/2.36/gdk-pixbuf-%{version}.tar.xz -Patch0: 0001-pixops-Chane-variable-type.patch -Patch1: 0002-pixops-Be-smarter-than-gcc-s-optimizer.patch -Patch2: 0001-pixops-Fail-make_weights-functions-on-OOM.patch -Patch3: 0001-Skip-tests-when-we-can-t-run-them-due-to-lack-of-mem.patch - -BuildRequires: glib2-devel >= %{glib2_version} +BuildRequires: pkgconfig(gio-2.0) >= %{glib2_version} BuildRequires: libpng-devel BuildRequires: libjpeg-devel BuildRequires: libtiff-devel BuildRequires: jasper-devel -BuildRequires: libX11-devel -BuildRequires: gobject-introspection-devel >= 0.9.3 +BuildRequires: pkgconfig(x11) +BuildRequires: pkgconfig(gobject-introspection-1.0) >= 0.9.3 # gdk-pixbuf does a configure time check which uses the GIO mime # layer; we need to actually have the mime type database. BuildRequires: shared-mime-info @@ -45,7 +39,6 @@ clutter. %package devel Summary: Development files for gdk-pixbuf -Group: Development/Libraries Requires: %{name}%{?_isa} = %{version}-%{release} Requires: glib2-devel%{?_isa} >= %{glib2_version} @@ -58,7 +51,6 @@ for writing applications that are using gdk-pixbuf. %package tests Summary: Tests for the %{name} package -Group: Development/Libraries Requires: %{name}%{?_isa} = %{version}-%{release} %description tests @@ -68,10 +60,6 @@ the functionality of the installed %{name} package. %prep %setup -q -n gdk-pixbuf-%{version} -%patch0 -p1 -%patch1 -p1 -%patch2 -p1 -%patch3 -p1 %build (if ! test -x configure; then NOCONFIGURE=1 ./autogen.sh; CONFIGFLAGS=--enable-gtk-doc; fi; @@ -79,14 +67,14 @@ the functionality of the installed %{name} package. --with-x11 \ --with-libjasper \ --with-included-loaders=png \ - --enable-installed-tests + --enable-installed-tests \ + --disable-silent-rules ) make %{?_smp_mflags} %install -make install DESTDIR=$RPM_BUILD_ROOT \ - RUN_QUERY_LOADER_TEST=false +%make_install RUN_QUERY_LOADER_TEST=false # Remove unpackaged files rm $RPM_BUILD_ROOT%{_libdir}/*.la @@ -111,7 +99,8 @@ if [ $1 -gt 0 ]; then fi %files -f gdk-pixbuf.lang -%doc AUTHORS COPYING NEWS +%license COPYING +%doc AUTHORS NEWS %{_libdir}/libgdk_pixbuf-2.0.so.* %{_libdir}/libgdk_pixbuf_xlib-2.0.so.* %{_libdir}/girepository-1.0 @@ -121,7 +110,9 @@ fi %{_libdir}/gdk-pixbuf-2.0/2.10.0/loaders/*.so %ghost %{_libdir}/gdk-pixbuf-2.0/2.10.0/loaders.cache %{_bindir}/gdk-pixbuf-query-loaders-%{__isa_bits} +%{_bindir}/gdk-pixbuf-thumbnailer %{_mandir}/man1/gdk-pixbuf-query-loaders.1* +%{_datadir}/thumbnailers/ %files devel %{_includedir}/gdk-pixbuf-2.0 @@ -141,6 +132,14 @@ fi %changelog +* Mon Feb 13 2017 Kalev Lember - 2.36.5-1 +- Update to 2.36.5 +- Resolves: #1386861 + +* Mon Jan 16 2017 Kalev Lember - 2.36.4-1 +- Update to 2.36.4 +- Resolves: #1386861 + * Tue Sep 22 2015 Benjamin Otte - 2.31.6-3 - Fix testsuite more - Resolves: #1264466