diff --git a/gimp-2.8.2-max-memsize.patch b/gimp-2.8.2-max-memsize.patch new file mode 100644 index 0000000..a002384 --- /dev/null +++ b/gimp-2.8.2-max-memsize.patch @@ -0,0 +1,64 @@ +From 19bee3766ab5c39fdcde4e8be26795981b7bbe76 Mon Sep 17 00:00:00 2001 +From: Nils Philippsen +Date: Tue, 13 Nov 2012 16:21:48 +0100 +Subject: [PATCH] patch: max-memsize + +Squashed commit of the following: + +commit 26e5611acbb0d2f23a6cf481883c4241289436bf +Author: Nils Philippsen +Date: Tue Nov 13 16:12:56 2012 +0100 + + app: limit physical memory size by GIMP_MAX_MEMSIZE as well + (cherry picked from commit c4365d4c14d1a1fc35210b373119a0870458c46b) + + Conflicts: + app/config/gimpbaseconfig.c + +commit 71f298245ee8af6fc97496eb7c83d64001b0f3db +Author: Michael Natterer +Date: Sat Oct 13 22:44:15 2012 +0200 + + app: limit the pyhsical memory size by G_MAXSIZE + + because one process can't handle more. + (cherry picked from commit 2b714fcb1a6c24bcaeb13b1c592a365c374f96d8) +--- + app/config/gimpbaseconfig.c | 7 ++++++- + 1 file changed, 6 insertions(+), 1 deletion(-) + +diff --git a/app/config/gimpbaseconfig.c b/app/config/gimpbaseconfig.c +index 0fa1e60..73a925d 100644 +--- a/app/config/gimpbaseconfig.c ++++ b/app/config/gimpbaseconfig.c +@@ -43,6 +43,8 @@ + #include "gimp-intl.h" + + ++#define GIMP_MAX_MEM_PROCESS (MIN (G_MAXSIZE, GIMP_MAX_MEMSIZE)) ++ + enum + { + PROP_0, +@@ -142,6 +144,9 @@ gimp_base_config_class_init (GimpBaseConfigClass *klass) + + memory_size = get_physical_memory_size (); + ++ /* limit to the amount one process can handle */ ++ memory_size = MIN (GIMP_MAX_MEM_PROCESS, memory_size); ++ + if (memory_size > 0) + memory_size = memory_size / 2; /* half the memory */ + else +@@ -149,7 +154,7 @@ gimp_base_config_class_init (GimpBaseConfigClass *klass) + + GIMP_CONFIG_INSTALL_PROP_MEMSIZE (object_class, PROP_TILE_CACHE_SIZE, + "tile-cache-size", TILE_CACHE_SIZE_BLURB, +- 0, MIN (G_MAXSIZE, GIMP_MAX_MEMSIZE), ++ 0, GIMP_MAX_MEM_PROCESS, + memory_size, + GIMP_PARAM_STATIC_STRINGS | + GIMP_CONFIG_PARAM_CONFIRM); +-- +1.7.11.7 + diff --git a/gimp.spec b/gimp.spec index 6ab1899..98c8af4 100644 --- a/gimp.spec +++ b/gimp.spec @@ -48,10 +48,8 @@ %endif # skip tests known to be problematic in a specific version -%global skip_checks_version 2.8.2 -# GLib-GObject-WARNING **: value "18502272k" of type `GimpMemsize' is invalid -# or out of range for property `tile-cache-size' of type `GimpMemsize' -%global skip_checks test-core test-xcf +#global skip_checks_version %nil +#global skip_checks %nil # Set this to 0 in stable, 1 in (SONAME-wise) unstable releases %global unstable 0 @@ -202,6 +200,8 @@ Source0: ftp://ftp.gimp.org/pub/gimp/v%{binver}/gimp-%{version}%{dashprer Patch0: gimp-%{version}%{dashprerel}-git%{gitrev}.patch.bz2 %endif +Patch1: gimp-2.8.2-max-memsize.patch + %description GIMP (GNU Image Manipulation Program) is a powerful image composition and editing program, which can be extremely useful for creating logos and other @@ -286,6 +286,8 @@ EOF %patch0 -p1 -b .git%{gitrev} %endif +%patch1 -p1 -b .max-memsize + %build %if %{with hardening} # Use hardening compiler/linker flags because gimp is likely to deal with files @@ -418,9 +420,9 @@ ln -snf gimprc-%{binver}.5 %{buildroot}/%{_mandir}/man5/gimprc.5 %check # skip tests known to be problematic in a specific version -%if "%version" == "%skip_checks_version" +%if "%version" == "%{?skip_checks_version}" pushd app/tests -for problematic in %skip_checks; do +for problematic in %{?skip_checks}; do rm -f "$problematic" cat << EOF > "$problematic" #!/bin/sh @@ -580,6 +582,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %endif %changelog +* Tue Nov 13 2012 Nils Philippsen +- don't trip over too much installed memory, reenable all tests + * Sat Oct 20 2012 Nils Philippsen - 2:2.8.2-2 - run "make check", skip problematic tests - don't build help browser on EL