[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
35/91: gnu: gdk-pixbuf: Add missing arguments.
From: |
guix-commits |
Subject: |
35/91: gnu: gdk-pixbuf: Add missing arguments. |
Date: |
Mon, 19 Apr 2021 17:14:04 -0400 (EDT) |
raghavgururajan pushed a commit to branch wip-gnome
in repository guix.
commit f5fc3c609e2f38ca1c0523deadb9f77d838fbf32
Author: Raghav Gururajan <rg@raghavgururajan.name>
AuthorDate: Thu Mar 11 10:29:02 2021 -0500
gnu: gdk-pixbuf: Add missing arguments.
* gnu/packages/patches/gdk-pixbuf-CVE-2020-29385.patch: Remove patch.
* gnu/local.mk (dist_patch_DATA): Unregister it.
* gnu/packages/gtk.scm (gdk-pixbuf) [arguments]<#:glib-or-gtk?>: New
argument.
[replacement]: Remove.
(gdk-pixbuf/fixed): Remove.
Signed-off-by: Léo Le Bouter <lle-bout@zaclys.net>
---
gnu/local.mk | 1 -
gnu/packages/gtk.scm | 104 ++++++++-------------
.../patches/gdk-pixbuf-CVE-2020-29385.patch | 53 -----------
3 files changed, 41 insertions(+), 117 deletions(-)
diff --git a/gnu/local.mk b/gnu/local.mk
index e93ce45..6cfc6cb 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1063,7 +1063,6 @@ dist_patch_DATA =
\
%D%/packages/patches/gdb-hurd.patch \
%D%/packages/patches/gd-fix-tests-on-i686.patch \
%D%/packages/patches/gd-brect-bounds.patch \
- %D%/packages/patches/gdk-pixbuf-CVE-2020-29385.patch \
%D%/packages/patches/gdm-default-session.patch \
%D%/packages/patches/geary-CVE-2020-24661.patch \
%D%/packages/patches/genimage-signedness.patch \
diff --git a/gnu/packages/gtk.scm b/gnu/packages/gtk.scm
index f6a29a3..0914183 100644
--- a/gnu/packages/gtk.scm
+++ b/gnu/packages/gtk.scm
@@ -580,73 +580,51 @@ highlighting and other features typical of a source code
editor.")
(define-public gdk-pixbuf
(package
- (name "gdk-pixbuf")
- (version "2.40.0")
- (replacement gdk-pixbuf/fixed)
- (source (origin
- (method url-fetch)
- (uri (string-append "mirror://gnome/sources/" name "/"
- (version-major+minor version) "/"
- name "-" version ".tar.xz"))
- (sha256
- (base32
- "1rnlx9yfw970maxi2x6niaxmih5la11q1ilr7gzshz2kk585k0hm"))))
- (build-system meson-build-system)
- (arguments
- `(#:configure-flags '("-Dinstalled_tests=false")
- #:phases
- (modify-phases %standard-phases
- (add-after
- 'unpack 'disable-failing-tests
- (lambda _
- (substitute* "tests/meson.build"
- ;; XXX FIXME: This test fails on armhf machines with:
- ;; SKIP Not enough memory to load bitmap image
- ;; ERROR: cve-2015-4491 - too few tests run (expected 4, got 2)
- ((".*'cve-2015-4491'.*") "")
- ;; XXX FIXME: This test fails with:
- ;; ERROR:pixbuf-jpeg.c:74:test_type9_rotation_exif_tag:
- ;; assertion failed (error == NULL): Data differ
- ;; (gdk-pixbuf-error-quark, 0)
- ((".*'pixbuf-jpeg'.*") ""))
- #t))
- ;; The slow tests take longer than the specified timeout.
- ,@(if (any (cute string=? <> (%current-system))
- '("armhf-linux" "aarch64-linux"))
- '((replace 'check
- (lambda _
- (invoke "meson" "test" "--timeout-multiplier" "5"))))
- '()))))
- (propagated-inputs
- `(;; Required by gdk-pixbuf-2.0.pc
- ("glib" ,glib)
- ("libpng" ,libpng)
- ;; Used for testing and required at runtime.
- ("shared-mime-info" ,shared-mime-info)))
- (inputs
- `(("libjpeg" ,libjpeg-turbo)
- ("libtiff" ,libtiff)
- ("libx11" ,libx11)))
- (native-inputs
+ (name "gdk-pixbuf")
+ (version "2.42.2")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "mirror://gnome/sources/" name "/"
+ (version-major+minor version) "/"
+ name "-" version ".tar.xz"))
+ (sha256
+ (base32
+ "05ggmzwvrxq9w4zcvmrnnd6qplsmb4n95lj4q607c7arzlf6mil3"))))
+ (build-system meson-build-system)
+ (arguments
+ `(#:meson ,meson-0.55
+ #:glib-or-gtk? #t ; To wrap binaries and/or compile schemas
+ #:configure-flags '("-Dinstalled_tests=false")
+ #:phases
+ (modify-phases %standard-phases
+ ;; The slow tests take longer than the specified timeout.
+ ,@(if (any (cute string=? <> (%current-system))
+ '("armhf-linux" "aarch64-linux"))
+ '((replace 'check
+ (lambda _
+ (invoke "meson" "test" "--timeout-multiplier" "5"))))
+ '()))))
+ (propagated-inputs
+ `( ;; Required by gdk-pixbuf-2.0.pc
+ ("glib" ,glib)
+ ("libpng" ,libpng)
+ ;; Used for testing and required at runtime.
+ ("shared-mime-info" ,shared-mime-info)))
+ (inputs
+ `(("libjpeg" ,libjpeg-turbo)
+ ("libtiff" ,libtiff)
+ ("libx11" ,libx11)))
+ (native-inputs
`(("pkg-config" ,pkg-config)
("gettext" ,gettext-minimal)
- ("glib" ,glib "bin") ; glib-mkenums, etc.
+ ("glib" ,glib "bin") ; glib-mkenums, etc.
("gobject-introspection" ,gobject-introspection))) ; g-ir-compiler, etc.
- (synopsis "GNOME image loading and manipulation library")
- (description
- "GdkPixbuf is a library for image loading and manipulation developed
+ (synopsis "GNOME image loading and manipulation library")
+ (description
+ "GdkPixbuf is a library for image loading and manipulation developed
in the GNOME project.")
- (license license:lgpl2.0+)
- (home-page "https://developer.gnome.org/gdk-pixbuf/")))
-
-(define gdk-pixbuf/fixed
- (package
- (inherit gdk-pixbuf)
- (source (origin
- (inherit (package-source gdk-pixbuf))
- (patches
- (append (search-patches "gdk-pixbuf-CVE-2020-29385.patch")
- (origin-patches (package-source gdk-pixbuf))))))))
+ (license license:lgpl2.0+)
+ (home-page "https://developer.gnome.org/gdk-pixbuf/")))
;; To build gdk-pixbuf with SVG support, we need librsvg, and librsvg depends
;; on gdk-pixbuf, so this new varibale. Also, librsvg adds 90MiB to the
diff --git a/gnu/packages/patches/gdk-pixbuf-CVE-2020-29385.patch
b/gnu/packages/patches/gdk-pixbuf-CVE-2020-29385.patch
deleted file mode 100644
index e6ac4de..0000000
--- a/gnu/packages/patches/gdk-pixbuf-CVE-2020-29385.patch
+++ /dev/null
@@ -1,53 +0,0 @@
-Fix CVE-2020-29385. Note that we omit the binary test file
-tests/test-images/fail/hang_114.gif from the following commit, to avoid
-requiring 'git' to apply the patch.
-
-
-From bdd3acbd48a575d418ba6bf1b32d7bda2fae1c81 Mon Sep 17 00:00:00 2001
-From: Robert Ancell <robert.ancell@canonical.com>
-Date: Mon, 30 Nov 2020 12:26:12 +1300
-Subject: [PATCH] gif: Fix LZW decoder accepting invalid LZW code.
-
-The code value after a reset wasn't being validated, which means we would
-accept invalid codes. This could cause an infinite loop in the decoder.
-
-Fixes CVE-2020-29385
-
-Fixes https://gitlab.gnome.org/GNOME/gdk-pixbuf/-/issues/164
----
- gdk-pixbuf/lzw.c | 13 +++++++------
- tests/test-images/fail/hang_114.gif | Bin 0 -> 5561 bytes
- 2 files changed, 7 insertions(+), 6 deletions(-)
- create mode 100644 tests/test-images/fail/hang_114.gif
-
-diff --git a/gdk-pixbuf/lzw.c b/gdk-pixbuf/lzw.c
-index 9e052a6f7..105daf2b1 100644
---- a/gdk-pixbuf/lzw.c
-+++ b/gdk-pixbuf/lzw.c
-@@ -195,19 +195,20 @@ lzw_decoder_feed (LZWDecoder *self,
- if (self->last_code != self->clear_code &&
self->code_table_size < MAX_CODES) {
- if (self->code <
self->code_table_size)
- add_code (self, self->code);
-- else if (self->code ==
self->code_table_size)
-+ else
- add_code (self,
self->last_code);
-- else {
-- /* Invalid code received -
just stop here */
-- self->last_code =
self->eoi_code;
-- return output_length;
-- }
-
- /* When table is full increase code
size */
- if (self->code_table_size == (1 <<
self->code_size) && self->code_size < LZW_CODE_MAX)
- self->code_size++;
- }
-
-+ /* Invalid code received - just stop here */
-+ if (self->code >= self->code_table_size) {
-+ self->last_code = self->eoi_code;
-+ return output_length;
-+ }
-+
- /* Convert codeword into indexes */
- n_written += write_indexes (self, output +
n_written, output_length - n_written);
- }
- 73/91: gnu: wayland-protocols: Update description., (continued)
- 73/91: gnu: wayland-protocols: Update description., guix-commits, 2021/04/19
- 74/91: gnu: yelp-xsl: Enable documentation., guix-commits, 2021/04/19
- 80/91: gnu: gtk+: Enable cloud-providers support., guix-commits, 2021/04/19
- 84/91: gnu: ibus: Update to 1.5.24., guix-commits, 2021/04/19
- 61/91: gnu: Add atkmm-2.28., guix-commits, 2021/04/19
- 70/91: gnu: wayland: Update to 1.19.0., guix-commits, 2021/04/19
- 71/91: gnu: wayland: Fix and move documentation., guix-commits, 2021/04/19
- 83/91: gnu: gtkmm-2: Fix build., guix-commits, 2021/04/19
- 27/91: gnu: cairomm-1.13: Fix build., guix-commits, 2021/04/19
- 33/91: gnu: pangomm: Enable documentation., guix-commits, 2021/04/19
- 35/91: gnu: gdk-pixbuf: Add missing arguments.,
guix-commits <=
- 40/91: gnu: gdk-pixbuf: Update synopsis, description, home-page and license., guix-commits, 2021/04/19
- 56/91: gnu: atk: Update to 2.36.0., guix-commits, 2021/04/19
- 62/91: gnu: at-spi2-core: Update to 2.40.0., guix-commits, 2021/04/19
- 65/91: gnu: at-spi2-atk: Update to 2.38.0., guix-commits, 2021/04/19
- 66/91: gnu: at-spi2-atk: Update home-page and license., guix-commits, 2021/04/19
- 77/91: gnu: gtk+-2: Update to 2.24.33., guix-commits, 2021/04/19
- 81/91: gnu: gtk+: Update to 3.24.27., guix-commits, 2021/04/19
- 86/91: gnu: ibus: Enable memconf., guix-commits, 2021/04/19
- 42/91: gnu: gdk-pixbuf+svg: Correct package definition to include changes from gdk-pixbuf., guix-commits, 2021/04/19
- 51/91: gnu: libgsf: Enable missing features., guix-commits, 2021/04/19