diff options
author | Daniel Gryniewicz <dang@gentoo.org> | 2010-11-08 02:30:19 +0000 |
---|---|---|
committer | Daniel Gryniewicz <dang@gentoo.org> | 2010-11-08 02:30:19 +0000 |
commit | 3ff0be87a676b0721bbdf3cca094999a4c951999 (patch) | |
tree | d40487b4e663d7bca1624ef2cb5a057f557e4502 /gnome-base/gvfs | |
parent | +# Michael Sterrett <mr_bones_@gentoo.org> (07 Oct 2010) (diff) | |
download | historical-3ff0be87a676b0721bbdf3cca094999a4c951999.tar.gz historical-3ff0be87a676b0721bbdf3cca094999a4c951999.tar.bz2 historical-3ff0be87a676b0721bbdf3cca094999a4c951999.zip |
Fix file truncation on open; bug #344079
Package-Manager: portage-2.2.0_alpha3/cvs/Linux x86_64
Diffstat (limited to 'gnome-base/gvfs')
-rw-r--r-- | gnome-base/gvfs/ChangeLog | 8 | ||||
-rw-r--r-- | gnome-base/gvfs/Manifest | 10 | ||||
-rw-r--r-- | gnome-base/gvfs/files/gvfs-1.6.4-O_TRUNC-fix.patch | 77 | ||||
-rw-r--r-- | gnome-base/gvfs/gvfs-1.6.4-r2.ebuild | 113 |
4 files changed, 203 insertions, 5 deletions
diff --git a/gnome-base/gvfs/ChangeLog b/gnome-base/gvfs/ChangeLog index 6876c9cf2629..fd35cdb1a42d 100644 --- a/gnome-base/gvfs/ChangeLog +++ b/gnome-base/gvfs/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for gnome-base/gvfs # Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/gnome-base/gvfs/ChangeLog,v 1.118 2010/10/24 13:39:29 pacho Exp $ +# $Header: /var/cvsroot/gentoo-x86/gnome-base/gvfs/ChangeLog,v 1.119 2010/11/08 02:30:18 dang Exp $ + +*gvfs-1.6.4-r2 (08 Nov 2010) + + 08 Nov 2010; Daniel Gryniewicz <dang@gentoo.org> +gvfs-1.6.4-r2.ebuild, + +files/gvfs-1.6.4-O_TRUNC-fix.patch: + Fix file truncation on open; bug #344079 24 Oct 2010; Pacho Ramos <pacho@gentoo.org> -gvfs-1.2.3.ebuild, -gvfs-1.4.3-r1.ebuild: diff --git a/gnome-base/gvfs/Manifest b/gnome-base/gvfs/Manifest index 6a18dd386d8a..6fc4ccc4a161 100644 --- a/gnome-base/gvfs/Manifest +++ b/gnome-base/gvfs/Manifest @@ -3,17 +3,19 @@ Hash: SHA1 AUX gvfs-1.2.2-expose-archive-backend.patch 1607 RMD160 cd17c501805fb81e560c35deb1d234280fd07f5c SHA1 70b1824a49ba654dda5ae2ef267ca45a31b53dc4 SHA256 a6cd0f6b848e1943f9121cf4ce4105f32573f9cf7cf75bc0d7d61a98babec519 AUX gvfs-1.2.2-gphoto2-stricter-checks.patch 1127 RMD160 0c6d83f8b38cf41002dbe6f863916cfac66cd231 SHA1 fc4927fc0f3604689d446d4fe47b48384bee70a5 SHA256 146349147b82721551ce717d892068d608b352fdabd40b969ec9c2b97595c062 +AUX gvfs-1.6.4-O_TRUNC-fix.patch 2589 RMD160 8a0d4f627f8c258432afd59d2e774291349719a8 SHA1 670c093a44fae8dcd2175a3b0e8fe12f543204fe SHA256 1c5885854901e9dcf3e2626359cef63151040e382dfd611e4eb3aacd1f9f46b9 AUX gvfs-1.6.4-sftp-timeout.patch 978 RMD160 01baba58c316fddda48cae2abf8ffee3942ac7fb SHA1 8f36224495e845db734de15c3478b9a5499d8713 SHA256 9b66f6e711dd70172204fa40a2a0e77f47253720532f831d5e571ec8021c98f6 DIST gvfs-1.6.3.tar.bz2 1347090 RMD160 3ab75851966d1edecb11de42f4a581953c8ffa8f SHA1 152d84a605465fb8065ae6796a6a28112c5e8847 SHA256 4e3fe2dd80e5baaf4c1844560f6a787b144a917de1cb457b41efcb338477e760 DIST gvfs-1.6.4.tar.bz2 1385999 RMD160 b5aeb97260534f16c565a36ef87150823fb05283 SHA1 b859dc23916d03e2e6eb7e000916929d223b32e8 SHA256 e1e2810678b42cb0160642f0cd33ccd377cddfb18fc868d6faa04c449f813693 EBUILD gvfs-1.6.3.ebuild 3022 RMD160 cbdd2873068f2f5b344fcea577b2638b3bce1018 SHA1 8aec1dfe99b9c55c6dcfce312eac5b88a05ba0cc SHA256 3aec682a24b2b76d9cbcca5900fbd9a4c2ffa0be806e9695d074f55367d5579a EBUILD gvfs-1.6.4-r1.ebuild 3120 RMD160 d4b070221217a085a8eb635747b901c72e360b51 SHA1 487e8412d56ae3d6e8d163814e337b3e2b2f280f SHA256 5609e452fe6fb3322b6a156f932b803cb05ffa94e233407b8c6b7d686dba39f5 -MISC ChangeLog 16803 RMD160 b9403e46a79a33c12db0285d263f26fd31b209ff SHA1 3b559ca4a3eaf7c134ae9fb6df556b2d7867f99a SHA256 e50cadec371660920bdd6a2fdb2ae3c656839050efa3bfde04bb3388c7bb7d7a +EBUILD gvfs-1.6.4-r2.ebuild 3209 RMD160 44aef3e8a123ab766ad2b6bbce545224cc1753ea SHA1 bf8ccc3f95da7916dfde1c0779a4b404fe693416 SHA256 f09b611100d271092b20deea142baf6b82c1fbb949c06bbcbd29e11230805920 +MISC ChangeLog 16989 RMD160 6c5c9a79e852e2ce62e1a8fce6069e07164cd6ad SHA1 fb3be35229ecfb2b946c9b051da915830abf84e2 SHA256 5094ab1a7215c4f590c322e93e8a761a64d34420e3199bbf29a70d89140e6a72 MISC metadata.xml 1100 RMD160 2d3714eb866d2d48d35e2b69fd5f2228b414793c SHA1 79ac2d6f91caecd4be3202ebb71489d7ff7dee98 SHA256 9b2f7554d979873b4a6900725cba341517bab4980cb63625704cbd62e8bbbb37 -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.16 (GNU/Linux) -iEYEARECAAYFAkzENxYACgkQCaWpQKGI+9T1SwCeJgEBp5/HjIBfwZYK667OFsid -kmYAnRO/ocu94WQzubRyvpEZXB97bWNr -=Ih0P +iEYEARECAAYFAkzXYIQACgkQomPajV0RnrGKdQCeKq0Gdl2TrJ0CvKWe5wOff+9y +IQsAniKoo7W7HiJc8VbADKn6R3+rMIbi +=x671 -----END PGP SIGNATURE----- diff --git a/gnome-base/gvfs/files/gvfs-1.6.4-O_TRUNC-fix.patch b/gnome-base/gvfs/files/gvfs-1.6.4-O_TRUNC-fix.patch new file mode 100644 index 000000000000..b5d096d1b4c2 --- /dev/null +++ b/gnome-base/gvfs/files/gvfs-1.6.4-O_TRUNC-fix.patch @@ -0,0 +1,77 @@ +From 0d1dc99a87d354e8af9cb0f98827bafb2cd7f577 Mon Sep 17 00:00:00 2001 +From: Tomas Bzatek <tbzatek@redhat.com> +Date: Wed, 13 Oct 2010 16:25:51 +0200 +Subject: [PATCH] fuse: Add O_TRUNC support for open() + +This requires kernel version 2.6.24 or later. + +See bug 627567 for details. +--- + client/gvfsfusedaemon.c | 16 +++++++++++----- + 1 files changed, 11 insertions(+), 5 deletions(-) + +diff --git a/client/gvfsfusedaemon.c b/client/gvfsfusedaemon.c +index 13cb74d..bc3090d 100644 +--- a/client/gvfsfusedaemon.c ++++ b/client/gvfsfusedaemon.c +@@ -948,7 +948,7 @@ setup_input_stream (GFile *file, FileHandle *fh) + } + + static gint +-setup_output_stream (GFile *file, FileHandle *fh) ++setup_output_stream (GFile *file, FileHandle *fh, int flags) + { + GError *error = NULL; + gint result = 0; +@@ -968,7 +968,10 @@ setup_output_stream (GFile *file, FileHandle *fh) + + if (!fh->stream) + { +- fh->stream = g_file_append_to (file, 0, NULL, &error); ++ if (flags & O_TRUNC) ++ fh->stream = g_file_replace (file, NULL, FALSE, 0, NULL, &error); ++ else ++ fh->stream = g_file_append_to (file, 0, NULL, &error); + if (fh->stream) + fh->pos = g_seekable_tell (G_SEEKABLE (fh->stream)); + } +@@ -1024,7 +1027,7 @@ vfs_open (const gchar *path, struct fuse_file_info *fi) + set_pid_for_file (file); + + if (fi->flags & O_WRONLY || fi->flags & O_RDWR) +- result = setup_output_stream (file, fh); ++ result = setup_output_stream (file, fh, fi->flags); + else + result = setup_input_stream (file, fh); + +@@ -1406,7 +1409,7 @@ vfs_write (const gchar *path, const gchar *buf, size_t len, off_t offset, + { + g_mutex_lock (fh->mutex); + +- result = setup_output_stream (file, fh); ++ result = setup_output_stream (file, fh, 0); + if (result == 0) + { + result = write_stream (fh, buf, len, offset); +@@ -1857,7 +1860,7 @@ vfs_ftruncate (const gchar *path, off_t size, struct fuse_file_info *fi) + { + g_mutex_lock (fh->mutex); + +- result = setup_output_stream (file, fh); ++ result = setup_output_stream (file, fh, 0); + + if (result == 0) + { +@@ -2336,6 +2339,9 @@ vfs_init (struct fuse_conn_info *conn) + subthread_main_loop = g_main_loop_new (NULL, FALSE); + subthread = g_thread_create ((GThreadFunc) subthread_main, NULL, FALSE, NULL); + ++ /* Indicate O_TRUNC support for open() */ ++ conn->want |= FUSE_CAP_ATOMIC_O_TRUNC; ++ + return NULL; + } + +-- +1.7.3.1 + diff --git a/gnome-base/gvfs/gvfs-1.6.4-r2.ebuild b/gnome-base/gvfs/gvfs-1.6.4-r2.ebuild new file mode 100644 index 000000000000..fcb704ade1d1 --- /dev/null +++ b/gnome-base/gvfs/gvfs-1.6.4-r2.ebuild @@ -0,0 +1,113 @@ +# Copyright 1999-2010 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/gnome-base/gvfs/gvfs-1.6.4-r2.ebuild,v 1.1 2010/11/08 02:30:19 dang Exp $ + +EAPI="2" +GCONF_DEBUG="no" + +inherit autotools bash-completion gnome2 eutils + +DESCRIPTION="GNOME Virtual Filesystem Layer" +HOMEPAGE="http://www.gnome.org" + +LICENSE="LGPL-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~ppc ~ppc64 ~sh ~sparc ~x86 ~x86-fbsd" +IUSE="archive avahi bluetooth cdda doc fuse gdu gnome gnome-keyring gphoto2 hal ++http iphone samba +udev" + +RDEPEND=">=dev-libs/glib-2.23.4 + >=sys-apps/dbus-1.0 + dev-libs/libxml2 + net-misc/openssh + >=sys-fs/udev-138 + archive? ( app-arch/libarchive ) + avahi? ( >=net-dns/avahi-0.6 ) + bluetooth? ( + >=app-mobilephone/obex-data-server-0.4.5 + dev-libs/dbus-glib + net-wireless/bluez + dev-libs/expat ) + fuse? ( sys-fs/fuse ) + gdu? ( >=sys-apps/gnome-disk-utility-2.29 ) + gnome? ( >=gnome-base/gconf-2.0 ) + gnome-keyring? ( >=gnome-base/gnome-keyring-1.0 ) + gphoto2? ( >=media-libs/libgphoto2-2.4.7 ) + iphone? ( app-pda/libimobiledevice ) + udev? ( + cdda? ( >=dev-libs/libcdio-0.78.2[-minimal] ) + >=sys-fs/udev-145[extras] ) + hal? ( + cdda? ( >=dev-libs/libcdio-0.78.2[-minimal] ) + >=sys-apps/hal-0.5.10 ) + http? ( >=net-libs/libsoup-gnome-2.26.0 ) + samba? ( || ( >=net-fs/samba-3.4.6[smbclient] + <=net-fs/samba-3.3 ) )" +DEPEND="${RDEPEND} + >=dev-util/intltool-0.40 + >=dev-util/pkgconfig-0.19 + dev-util/gtk-doc-am + doc? ( >=dev-util/gtk-doc-1 )" + +DOCS="AUTHORS ChangeLog NEWS README TODO" + +pkg_setup() { + if use cdda && ! use hal && ! use udev; then + ewarn "You have \"+cdda\", but you have \"-hal\" and \"-udev\"" + ewarn "cdda support will NOT be built unless you enable EITHER hal OR udev" + fi + + G2CONF="${G2CONF} + --enable-udev + --disable-bash-completion + --with-dbus-service-dir=/usr/share/dbus-1/services + $(use_enable archive) + $(use_enable avahi) + $(use_enable bluetooth obexftp) + $(use_enable cdda) + $(use_enable fuse) + $(use_enable gdu) + $(use_enable gnome gconf) + $(use_enable gphoto2) + $(use_enable iphone afc) + $(use_enable udev gudev) + $(use_enable hal) + $(use_enable http) + $(use_enable gnome-keyring keyring) + $(use_enable samba)" +} + +src_prepare() { + gnome2_src_prepare + + # sftp: fix poll() timeout, bug #339695 + epatch "${FILESDIR}/${P}-sftp-timeout.patch" + + # Fix file truncation on open; bug #344079 + epatch "${FILESDIR}/${P}-O_TRUNC-fix.patch" + + # Conditional patching purely to avoid eautoreconf + use gphoto2 && epatch "${FILESDIR}/${PN}-1.2.2-gphoto2-stricter-checks.patch" + + if use archive; then + epatch "${FILESDIR}/${PN}-1.2.2-expose-archive-backend.patch" + echo "mount-archive.desktop.in" >> po/POTFILES.in + echo "mount-archive.desktop.in.in" >> po/POTFILES.in + fi + + use gphoto2 || use archive && eautoreconf +} + +src_install() { + gnome2_src_install + use bash-completion && \ + dobashcompletion programs/gvfs-bash-completion.sh ${PN} +} + +pkg_postinst() { + gnome2_pkg_postinst + use bash-completion && bash-completion_pkg_postinst + + ewarn "In order to use the new gvfs services, please reload dbus configuration" + ewarn "You may need to log out and log back in for some changes to take effect" +} |