diff --git a/gnome-vfs-2.24.5-file-method-chmod-flags.patch b/gnome-vfs-2.24.5-file-method-chmod-flags.patch new file mode 100644 index 0000000..7a58830 --- /dev/null +++ b/gnome-vfs-2.24.5-file-method-chmod-flags.patch @@ -0,0 +1,37 @@ +From 0bf9ac622fa41978fced2606450d2f906c8ca6f8 Mon Sep 17 00:00:00 2001 +From: Jasper Lievisse Adriaanse +Date: Thu, 19 May 2011 16:14:54 +0000 +Subject: file-method: Don't pass invalid flags to chmod + +Remove the GNOME-VFS masks which aren't valid bits. + +Commit message written by Colin Walters + +https://bugzilla.gnome.org/show_bug.cgi?id=542026 +--- +diff --git a/modules/file-method.c b/modules/file-method.c +index 37e4853..1d70d19 100644 +--- a/modules/file-method.c ++++ b/modules/file-method.c +@@ -2378,7 +2378,18 @@ do_set_file_info (GnomeVFSMethod *method, + } + + if (mask & GNOME_VFS_SET_FILE_INFO_PERMISSIONS) { +- if (chmod (full_name, info->permissions) != 0) { ++ int tmask; ++ int permissions = info->permissions; ++ /* ++ * ktrace showed "invalid argument", and this makes sense.... ++ * because, we cannot pass the GNOME_VFS_PERM_ACCESS_* ++ * constants to chmod. ++ */ ++ tmask = GNOME_VFS_PERM_ACCESS_READABLE; ++ tmask |= GNOME_VFS_PERM_ACCESS_WRITABLE; ++ tmask |= GNOME_VFS_PERM_ACCESS_EXECUTABLE; ++ permissions = permissions & ~tmask; ++ if (chmod (full_name, permissions) != 0) { + g_free (full_name); + return gnome_vfs_result_from_errno (); + } +-- +cgit v0.9.0.2 diff --git a/gnome-vfs2.spec b/gnome-vfs2.spec index 51c979d..024594e 100644 --- a/gnome-vfs2.spec +++ b/gnome-vfs2.spec @@ -10,7 +10,7 @@ Summary: The GNOME virtual file-system libraries Name: gnome-vfs2 Version: 2.24.4 -Release: 9%{?dist} +Release: 10%{?dist} License: LGPLv2+ and GPLv2+ # the daemon and the library are LGPLv2+ # the modules are LGPLv2+ and GPLv2+ @@ -83,6 +83,9 @@ Patch404: gnome-vfs-2.24.xx-utf8-mounts.patch # https://bugzilla.gnome.org/show_bug.cgi?id=435653 Patch405: 0001-Add-default-media-application-schema.patch +# from upstream +Patch7: gnome-vfs-2.24.5-file-method-chmod-flags.patch + %description GNOME VFS is the GNOME virtual file system. It is the foundation of @@ -119,6 +122,7 @@ shares (SMB) to applications using GNOME VFS. %patch5 -p1 -b .CVE-2009-2473 %patch6 -p1 -b .mailto-command +%patch7 -p1 -b .file-method-chmod-flags # send to upstream %patch101 -p1 -b .schema_about @@ -141,7 +145,7 @@ if pkg-config openssl ; then LDFLAGS=`pkg-config --libs-only-L openssl`; export LDFLAGS fi -%configure \ +CFLAGS="%optflags -fno-strict-aliasing" %configure \ --with-samba-includes=/usr/include/samba-4.0 \ --disable-gtk-doc \ %if %{with hal} @@ -220,6 +224,10 @@ find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} ';' %config %{_sysconfdir}/gnome-vfs-2.0/modules/smb-module.conf %changelog +* Mon Dec 10 2012 Tomas Bzatek - 2.24.4-10 +- Compile with -fno-strict-aliasing +- Backport file-method chmod flags patch from upstream + * Wed Nov 28 2012 Tomas Bzatek - 2.24.4-9 - Rebuilt for bug 878494 - Fix build against samba4