- Update to 0.99.2

- Split out backends to separate packages
This commit is contained in:
Tomas Bzatek 2008-07-22 16:00:51 +00:00
parent bf43b5154e
commit 8fcd7734fd
5 changed files with 96 additions and 188 deletions

View File

@ -1 +1 @@
gvfs-0.99.1.tar.bz2 gvfs-0.99.2.tar.bz2

View File

@ -19,8 +19,8 @@ Index: mount-archive.desktop.in.in
+X-GNOME-Bugzilla-Version=@VERSION@ +X-GNOME-Bugzilla-Version=@VERSION@
Index: Makefile.am Index: Makefile.am
=================================================================== ===================================================================
--- Makefile.am (revision 1670) --- Makefile.am.orig 2008-07-22 15:35:49.000000000 +0200
+++ Makefile.am (working copy) +++ Makefile.am 2008-07-22 17:56:59.417180064 +0200
@@ -1,5 +1,20 @@ @@ -1,5 +1,20 @@
NULL = NULL =
@ -42,12 +42,12 @@ Index: Makefile.am
SUBDIRS = \ SUBDIRS = \
common \ common \
client \ client \
@@ -18,6 +33,8 @@ @@ -15,6 +30,8 @@
EXTRA_DIST = \ EXTRA_DIST = \
MAINTAINERS \ MAINTAINERS \
+ mount-archive.desktop.in.in \ + mount-archive.desktop.in.in \
+ $(desktop_in_files) \ + $(desktop_in_files) \
intltool-extract.in \ $(NULL)
intltool-merge.in \
intltool-update.in \ DISTCLEANFILES = \

View File

@ -1,154 +0,0 @@
Index: daemon/gvfsbackendftp.c
===================================================================
--- daemon/gvfsbackendftp.c (revision 1801)
+++ daemon/gvfsbackendftp.c (working copy)
@@ -134,6 +134,8 @@
#define STATUS_GROUP(status) ((status) / 100)
+typedef void (* Ftp550Handler) (FtpConnection *conn, const FtpFile *file);
+
/*** FTP CONNECTION ***/
struct _FtpConnection
@@ -249,8 +251,8 @@
case 550: /* Requested action not taken. File unavailable (e.g., file not found, no access). */
/* FIXME: This is a lot of different errors. So we have to pretend to
* be smart here. */
- code = G_IO_ERROR_NOT_FOUND;
- msg = _("File unavailable");
+ code = G_IO_ERROR_FAILED;
+ msg = _("Operation failed");
break;
case 451: /* Requested action aborted: local error in processing. */
code = G_IO_ERROR_FAILED;
@@ -297,6 +299,7 @@
* RESPONSE_PASS_300: Don't treat 3XX responses, but return them
* RESPONSE_PASS_400: Don't treat 4XX responses, but return them
* RESPONSE_PASS_500: Don't treat 5XX responses, but return them
+ * RESPONSE_PASS_550: Don't treat 550 responses, but return them
* RESPONSE_FAIL_200: Fail on a 2XX response
*/
@@ -305,7 +308,8 @@
RESPONSE_PASS_300 = (1 << 1),
RESPONSE_PASS_400 = (1 << 2),
RESPONSE_PASS_500 = (1 << 3),
- RESPONSE_FAIL_200 = (1 << 4)
+ RESPONSE_PASS_550 = (1 << 4),
+ RESPONSE_FAIL_200 = (1 << 5)
} ResponseFlags;
/**
@@ -459,7 +463,7 @@
return 0;
break;
case 5:
- if (flags & RESPONSE_PASS_500)
+ if ((flags & RESPONSE_PASS_500) || (response == 550 && (flags & RESPONSE_PASS_550)))
break;
ftp_connection_set_error_from_response (conn, response);
return 0;
@@ -564,6 +568,57 @@
}
static void
+ftp_connection_check_file (FtpConnection *conn,
+ const Ftp550Handler *handlers,
+ const FtpFile *file)
+{
+ while (*handlers && !ftp_connection_in_error (conn))
+ {
+ (*handlers) (conn, file);
+ handlers++;
+ }
+}
+
+static guint
+ftp_connection_send_and_check (FtpConnection *conn,
+ ResponseFlags flags,
+ const Ftp550Handler *handlers,
+ const FtpFile *file,
+ const char *format,
+ ...) G_GNUC_PRINTF (5, 6);
+static guint
+ftp_connection_send_and_check (FtpConnection *conn,
+ ResponseFlags flags,
+ const Ftp550Handler *handlers,
+ const FtpFile *file,
+ const char *format,
+ ...)
+{
+ va_list varargs;
+ guint response;
+
+ /* check that there's no 550 handling used - don't allow bad use of API */
+ g_return_val_if_fail ((flags & RESPONSE_PASS_550) == 0, 0);
+ g_return_val_if_fail (handlers != NULL, 0);
+ g_return_val_if_fail (file != NULL, 0);
+
+ va_start (varargs, format);
+ response = ftp_connection_sendv (conn,
+ flags | RESPONSE_PASS_550,
+ format,
+ varargs);
+ va_end (varargs);
+ if (response == 550)
+ {
+ ftp_connection_check_file (conn, handlers, file);
+ if (!ftp_connection_in_error (conn))
+ ftp_connection_set_error_from_response (conn, response);
+ response = 0;
+ }
+ return response;
+}
+
+static void
ftp_connection_parse_features (FtpConnection *conn)
{
struct {
@@ -1461,6 +1516,21 @@
}
static void
+error_550_is_directory (FtpConnection *conn, const FtpFile *file)
+{
+ guint response = ftp_connection_send (conn,
+ RESPONSE_PASS_550,
+ "CWD %s", file);
+
+ if (STATUS_GROUP (response) == 2)
+ {
+ g_set_error (&conn->error, G_IO_ERROR,
+ G_IO_ERROR_IS_DIRECTORY,
+ _("File is directory"));
+ }
+}
+
+static void
do_open_for_read (GVfsBackend *backend,
GVfsJobOpenForRead *job,
const char *filename)
@@ -1468,6 +1538,7 @@
GVfsBackendFtp *ftp = G_VFS_BACKEND_FTP (backend);
FtpConnection *conn;
FtpFile *file;
+ static const Ftp550Handler open_read_handlers[] = { error_550_is_directory, NULL };
conn = g_vfs_backend_ftp_pop_connection (ftp, G_VFS_JOB (job));
if (!conn)
@@ -1476,9 +1547,11 @@
ftp_connection_ensure_data_connection (conn);
file = ftp_filename_from_gvfs_path (conn, filename);
- ftp_connection_send (conn,
- RESPONSE_PASS_100 | RESPONSE_FAIL_200,
- "RETR %s", file);
+ ftp_connection_send_and_check (conn,
+ RESPONSE_PASS_100 | RESPONSE_FAIL_200,
+ &open_read_handlers[0],
+ file,
+ "RETR %s", file);
g_free (file);
if (ftp_connection_in_error (conn))

114
gvfs.spec
View File

@ -1,32 +1,25 @@
Summary: Backends for the gio framework in GLib Summary: Backends for the gio framework in GLib
Name: gvfs Name: gvfs
Version: 0.99.1 Version: 0.99.2
Release: 3%{?dist} Release: 1%{?dist}
License: LGPLv2+ License: LGPLv2+
Group: System Environment/Libraries Group: System Environment/Libraries
URL: http://www.gtk.org URL: http://www.gtk.org
Source: http://download.gnome.org/sources/gvfs/0.99/gvfs-%{version}.tar.bz2 Source: http://download.gnome.org/sources/gvfs/0.99/gvfs-%{version}.tar.bz2
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: pkgconfig BuildRequires: pkgconfig
BuildRequires: glib2-devel >= 2.16.0 BuildRequires: glib2-devel >= 2.17.4
BuildRequires: dbus-glib-devel BuildRequires: dbus-glib-devel
BuildRequires: /usr/bin/ssh BuildRequires: /usr/bin/ssh
BuildRequires: libcdio-devel >= 0.78.2 BuildRequires: libcdio-devel >= 0.78.2
BuildRequires: hal-devel >= 0.5.10 BuildRequires: hal-devel >= 0.5.10
BuildRequires: libsoup-devel >= 2.3.0 BuildRequires: libsoup-devel >= 2.3.0
BuildRequires: libsmbclient-devel >= 3.2.0-1.pre2.8
BuildRequires: avahi-glib-devel >= 0.6 BuildRequires: avahi-glib-devel >= 0.6
BuildRequires: libgphoto2-devel
BuildRequires: libusb-devel
BuildRequires: libexif-devel
BuildRequires: gnome-keyring-devel BuildRequires: gnome-keyring-devel
BuildRequires: intltool BuildRequires: intltool
BuildRequires: gettext-devel BuildRequires: gettext-devel
BuildRequires: perl(XML::Parser) BuildRequires: perl(XML::Parser)
BuildRequires: GConf2-devel BuildRequires: GConf2-devel
BuildRequires: bluez-libs-devel >= 3.12
BuildRequires: expat-devel
BuildRequires: libarchive-devel
Requires(post): desktop-file-utils Requires(post): desktop-file-utils
@ -35,10 +28,7 @@ Requires(postun): desktop-file-utils
# The patch touches Makefile.am files: # The patch touches Makefile.am files:
BuildRequires: automake autoconf BuildRequires: automake autoconf
BuildRequires: libtool BuildRequires: libtool
Patch1: gvfs-0.2.2-archive-integration.patch Patch1: gvfs-0.99.2-archive-integration.patch
# http://bugzilla.gnome.org/show_bug.cgi?id=522933
Patch2: gvfs-ftp-read-directory-2.patch
# http://bugzilla.gnome.org/show_bug.cgi?id=525779 # http://bugzilla.gnome.org/show_bug.cgi?id=525779
Patch3: gvfs-0.2.4-trash-automount.patch Patch3: gvfs-0.2.4-trash-automount.patch
@ -48,6 +38,7 @@ Patch3: gvfs-0.2.4-trash-automount.patch
The gvfs package provides backend implementations for the gio The gvfs package provides backend implementations for the gio
framework in GLib. It includes ftp, sftp, cifs. framework in GLib. It includes ftp, sftp, cifs.
%package devel %package devel
Summary: Development files for gvfs Summary: Development files for gvfs
Group: Development/Libraries Group: Development/Libraries
@ -57,6 +48,7 @@ Requires: %{name} = %{version}-%{release}
The gvfs-devel package contains headers and other files that are The gvfs-devel package contains headers and other files that are
required to develop applications using gvfs. required to develop applications using gvfs.
%package fuse %package fuse
Summary: FUSE support for gvfs Summary: FUSE support for gvfs
Group: System Environment/Libraries Group: System Environment/Libraries
@ -69,10 +61,59 @@ This package provides support for applications not using gio
to access the gvfs filesystems. to access the gvfs filesystems.
%package smb
Summary: Windows fileshare support for gvfs
Group: System Environment/Libraries
Requires: %{name} = %{version}-%{release}
BuildRequires: libsmbclient-devel >= 3.2.0-1.pre2.8
%description smb
This package provides support for reading and writing files on windows
shares (SMB) to applications using gvfs.
%package archive
Summary: Archiving support for gvfs
Group: System Environment/Libraries
Requires: %{name} = %{version}-%{release}
BuildRequires: libarchive-devel
%description archive
This package provides support for accessing files inside ZIP and TAR archives
(including TAR.GZ and TAR.BZ2) to applications using gvfs.
%package obexftp
Summary: ObexFTP support for gvfs
Group: System Environment/Libraries
Requires: %{name} = %{version}-%{release}
BuildRequires: bluez-libs-devel >= 3.12
BuildRequires: expat-devel
%description obexftp
This package provides support for reading files on mobile devices
(via ObexFTP protocol) to applications using gvfs.
%package gphoto2
Summary: gphoto2 support for gvfs
Group: System Environment/Libraries
Requires: %{name} = %{version}-%{release}
BuildRequires: libgphoto2-devel
BuildRequires: libusb-devel
BuildRequires: libexif-devel
%description gphoto2
This package provides support for reading and writing files on
PTP based cameras (Picture Transfer Protocol) and MTP based
media players (Media Transfer Protocol) to applications using gvfs.
%prep %prep
%setup -q %setup -q
%patch1 -p0 -b .archive-integration %patch1 -p0 -b .archive-integration
%patch2 -p0 -b .recurse-dir
%patch3 -p1 -b .trash %patch3 -p1 -b .trash
%build %build
@ -116,11 +157,8 @@ update-desktop-database &> /dev/null ||:
%doc AUTHORS COPYING NEWS README %doc AUTHORS COPYING NEWS README
%dir %{_datadir}/gvfs %dir %{_datadir}/gvfs
%dir %{_datadir}/gvfs/mounts %dir %{_datadir}/gvfs/mounts
%dir %{_datadir}/applications/mount-archive.desktop
%{_sysconfdir}/profile.d/gvfs-bash-completion.sh %{_sysconfdir}/profile.d/gvfs-bash-completion.sh
%{_datadir}/gvfs/mounts/sftp.mount %{_datadir}/gvfs/mounts/sftp.mount
%{_datadir}/gvfs/mounts/smb-browse.mount
%{_datadir}/gvfs/mounts/smb.mount
%{_datadir}/gvfs/mounts/trash.mount %{_datadir}/gvfs/mounts/trash.mount
%{_datadir}/gvfs/mounts/cdda.mount %{_datadir}/gvfs/mounts/cdda.mount
%{_datadir}/gvfs/mounts/computer.mount %{_datadir}/gvfs/mounts/computer.mount
@ -129,11 +167,8 @@ update-desktop-database &> /dev/null ||:
%{_datadir}/gvfs/mounts/localtest.mount %{_datadir}/gvfs/mounts/localtest.mount
%{_datadir}/gvfs/mounts/burn.mount %{_datadir}/gvfs/mounts/burn.mount
%{_datadir}/gvfs/mounts/dns-sd.mount %{_datadir}/gvfs/mounts/dns-sd.mount
%{_datadir}/gvfs/mounts/gphoto2.mount
%{_datadir}/gvfs/mounts/network.mount %{_datadir}/gvfs/mounts/network.mount
%{_datadir}/gvfs/mounts/obexftp.mount
%{_datadir}/gvfs/mounts/ftp.mount %{_datadir}/gvfs/mounts/ftp.mount
%{_datadir}/gvfs/mounts/archive.mount
%{_datadir}/dbus-1/services/gvfs-daemon.service %{_datadir}/dbus-1/services/gvfs-daemon.service
%{_libdir}/libgvfscommon.so.* %{_libdir}/libgvfscommon.so.*
%{_libdir}/gio/modules/libgiohal-volume-monitor.so %{_libdir}/gio/modules/libgiohal-volume-monitor.so
@ -142,8 +177,6 @@ update-desktop-database &> /dev/null ||:
%{_libexecdir}/gvfsd %{_libexecdir}/gvfsd
%{_libexecdir}/gvfsd-ftp %{_libexecdir}/gvfsd-ftp
%{_libexecdir}/gvfsd-sftp %{_libexecdir}/gvfsd-sftp
%{_libexecdir}/gvfsd-smb
%{_libexecdir}/gvfsd-smb-browse
%{_libexecdir}/gvfsd-trash %{_libexecdir}/gvfsd-trash
%{_libexecdir}/gvfsd-cdda %{_libexecdir}/gvfsd-cdda
%{_libexecdir}/gvfsd-computer %{_libexecdir}/gvfsd-computer
@ -152,10 +185,7 @@ update-desktop-database &> /dev/null ||:
%{_libexecdir}/gvfsd-localtest %{_libexecdir}/gvfsd-localtest
%{_libexecdir}/gvfsd-burn %{_libexecdir}/gvfsd-burn
%{_libexecdir}/gvfsd-dnssd %{_libexecdir}/gvfsd-dnssd
%{_libexecdir}/gvfsd-gphoto2
%{_libexecdir}/gvfsd-network %{_libexecdir}/gvfsd-network
%{_libexecdir}/gvfsd-obexftp
%{_libexecdir}/gvfsd-archive
%{_bindir}/gvfs-cat %{_bindir}/gvfs-cat
%{_bindir}/gvfs-copy %{_bindir}/gvfs-copy
%{_bindir}/gvfs-info %{_bindir}/gvfs-info
@ -187,7 +217,39 @@ update-desktop-database &> /dev/null ||:
%{_libexecdir}/gvfs-fuse-daemon %{_libexecdir}/gvfs-fuse-daemon
%files smb
%defattr(-, root, root, -)
%{_libexecdir}/gvfsd-smb
%{_libexecdir}/gvfsd-smb-browse
%{_datadir}/gvfs/mounts/smb-browse.mount
%{_datadir}/gvfs/mounts/smb.mount
%files archive
%defattr(-, root, root, -)
%dir %{_datadir}/applications/mount-archive.desktop
%{_libexecdir}/gvfsd-archive
%{_datadir}/gvfs/mounts/archive.mount
%files obexftp
%defattr(-, root, root, -)
%{_libexecdir}/gvfsd-obexftp
%{_datadir}/gvfs/mounts/obexftp.mount
%files gphoto2
%defattr(-, root, root, -)
%{_libexecdir}/gvfsd-gphoto2
%{_datadir}/gvfs/mounts/gphoto2.mount
%changelog %changelog
* Tue Jul 22 2008 Tomas Bzatek <tbzatek@redhat.com> - 0.99.2-1
- Update to 0.99.2
- Split out backends to separate packages
* Tue Jun 24 2008 Tomas Bzatek <tbzatek@redhat.com> - 0.99.1-3 * Tue Jun 24 2008 Tomas Bzatek <tbzatek@redhat.com> - 0.99.1-3
- gvfsd-trash: Skip autofs mounts - gvfsd-trash: Skip autofs mounts

View File

@ -1 +1 @@
d1cd85461481171c8a4fc970d623fc59 gvfs-0.99.1.tar.bz2 be34d612c4d993e90022af1751c280c5 gvfs-0.99.2.tar.bz2