From 7b2274b5275afc0d95870f758d75198eb4946bc9 Mon Sep 17 00:00:00 2001 From: Nils Philippsen Date: Tue, 10 Mar 2009 17:26:29 +0000 Subject: [PATCH] use correct fix from upstream to avoid crashes (#486122) use -fno-strict-aliasing, PIC/PIE compilation flags --- .cvsignore | 1 + gimp-2.6.5-define-deprecated.patch | 11 ----------- gimp.spec | 15 ++++++++++++--- sources | 1 + 4 files changed, 14 insertions(+), 14 deletions(-) delete mode 100644 gimp-2.6.5-define-deprecated.patch diff --git a/.cvsignore b/.cvsignore index ae83314..247b3dd 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1,2 @@ gimp-2.6.5.tar.bz2 +gimp-2.6.5-gtk-version.patch.bz2 diff --git a/gimp-2.6.5-define-deprecated.patch b/gimp-2.6.5-define-deprecated.patch deleted file mode 100644 index fbbe87a..0000000 --- a/gimp-2.6.5-define-deprecated.patch +++ /dev/null @@ -1,11 +0,0 @@ -diff -up gimp-2.6.5/app/widgets/gimpuimanager.c.define-deprecated gimp-2.6.5/app/widgets/gimpuimanager.c ---- gimp-2.6.5/app/widgets/gimpuimanager.c.define-deprecated 2009-02-13 21:35:26.000000000 +0100 -+++ gimp-2.6.5/app/widgets/gimpuimanager.c 2009-03-09 11:17:58.624783561 +0100 -@@ -23,6 +23,7 @@ - - #include - -+#undef GTK_DISABLE_DEPRECATED - #include - #include - diff --git a/gimp.spec b/gimp.spec index 247ae6c..65fccaf 100644 --- a/gimp.spec +++ b/gimp.spec @@ -24,7 +24,7 @@ Summary: GNU Image Manipulation Program Name: gimp Epoch: 2 Version: 2.6.5 -Release: 3%{?dist} +Release: 4%{?dist} %define binver 2.6 %define gimp_lang_ver 20 %define interfacever 2.0 @@ -107,7 +107,7 @@ Source0: ftp://ftp.gimp.org/pub/gimp/v%{binver}/gimp-%{version}.tar.bz2 Source1: gimp-plugin-mgr.in Patch0: gimp-2.6.2-xdg-open.patch Patch1: gimp-2.6.2-jpeg-units.patch -Patch2: gimp-2.6.5-define-deprecated.patch +Patch2: gimp-2.6.5-gtk-version.patch.bz2 %description GIMP (GNU Image Manipulation Program) is a powerful image composition and @@ -187,12 +187,17 @@ EOF %setup -q -n gimp-%{version} %patch0 -p1 -b .xdg-open %patch1 -p1 -b .jpeg-units -%patch2 -p1 -b .define-deprecated +%patch2 -p1 -b .gtk-version %build if [ ! -f configure ]; then ./autogen.sh --quiet $MYARCH_FLAGS --prefix=%{_prefix} fi +# Use PIC/PIE because gimp is likely to deal with files coming from untrusted +# sources +CFLAGS='-fPIC %optflags -fno-strict-aliasing' +CXXFLAGS='-fPIC %optflags -fno-strict-aliasing' +LDFLAGS='-pie' %configure \ --disable-perl --enable-gimp-remote \ %if %{with python} @@ -465,6 +470,10 @@ fi %{_libdir}/gimp/%{interfacever}/plug-ins/help-browser %changelog +* Tue Mar 10 2009 Nils Philippsen - 2:2.6.5-4 +- use correct fix from upstream to avoid crashes (#486122) +- use -fno-strict-aliasing, PIC/PIE compilation flags + * Mon Mar 09 2009 Nils Philippsen - 2:2.6.5-3 - rebuild against new WebKit - define deprecated gtk functions to avoid crashes (#486122) diff --git a/sources b/sources index 209b524..215436c 100644 --- a/sources +++ b/sources @@ -1 +1,2 @@ cd13050bc6bde6d8d8fd38eff6276033 gimp-2.6.5.tar.bz2 +9d661944b58b5ac675047b0ba2095ccc gimp-2.6.5-gtk-version.patch.bz2