This commit is contained in:
Matthias Clasen 2009-07-14 03:08:46 +00:00
parent ff97a5bc9e
commit 1f023a21b9
13 changed files with 48 additions and 1031 deletions

View File

@ -1 +1 @@
gvfs-1.3.1.tar.bz2
gvfs-1.3.2.tar.bz2

View File

@ -1,205 +0,0 @@
From 7f2ac23d150aa779310a37534fc8564bbfc93b86 Mon Sep 17 00:00:00 2001
From: Benjamin Otte <otte@gnome.org>
Date: Mon, 15 Jun 2009 22:02:34 +0200
Subject: [PATCH 01/13] [FTP] prepare the code for active FTP support
adds a bunch of new APIs necessary for supporting active FTP. These APIs
don't do anything yet, as active FTP is still unsupported, it's just
refactoring of code.
---
daemon/gvfsbackendftp.c | 11 +++++++--
daemon/gvfsftpdircache.c | 4 +-
daemon/gvfsftptask.c | 47 ++++++++++++++++++++++++++++++++-------------
daemon/gvfsftptask.h | 1 +
4 files changed, 44 insertions(+), 19 deletions(-)
diff --git a/daemon/gvfsbackendftp.c b/daemon/gvfsbackendftp.c
index ba6acd4..913eb1c 100644
--- a/daemon/gvfsbackendftp.c
+++ b/daemon/gvfsbackendftp.c
@@ -642,7 +642,7 @@ do_open_for_read (GVfsBackend *backend,
error_550_permission_or_not_found,
NULL };
- g_vfs_ftp_task_open_data_connection (&task);
+ g_vfs_ftp_task_setup_data_connection (&task);
file = g_vfs_ftp_file_new_from_gvfs (ftp, filename);
g_vfs_ftp_task_send_and_check (&task,
@@ -653,6 +653,8 @@ do_open_for_read (GVfsBackend *backend,
"RETR %s", g_vfs_ftp_file_get_ftp_path (file));
g_vfs_ftp_file_free (file);
+ g_vfs_ftp_task_open_data_connection (&task);
+
if (!g_vfs_ftp_task_is_in_error (&task))
{
/* don't push the connection back, it's our handle now */
@@ -722,7 +724,7 @@ do_start_write (GVfsFtpTask *task,
/* FIXME: can we honour the flags? */
- g_vfs_ftp_task_open_data_connection (task);
+ g_vfs_ftp_task_setup_data_connection (task);
va_start (varargs, format);
g_vfs_ftp_task_sendv (task,
@@ -732,6 +734,8 @@ do_start_write (GVfsFtpTask *task,
varargs);
va_end (varargs);
+ g_vfs_ftp_task_open_data_connection (task);
+
if (!g_vfs_ftp_task_is_in_error (task))
{
/* don't push the connection back, it's our handle now */
@@ -1280,13 +1284,14 @@ do_pull (GVfsBackend * backend,
}
else
total_size = 0;
- g_vfs_ftp_task_open_data_connection (&task);
+ g_vfs_ftp_task_setup_data_connection (&task);
g_vfs_ftp_task_send_and_check (&task,
G_VFS_FTP_PASS_100 | G_VFS_FTP_FAIL_200,
&open_read_handlers[0],
src,
NULL,
"RETR %s", g_vfs_ftp_file_get_ftp_path (src));
+ g_vfs_ftp_task_open_data_connection (&task);
if (g_vfs_ftp_task_is_in_error (&task))
{
g_vfs_ftp_file_free (src);
diff --git a/daemon/gvfsftpdircache.c b/daemon/gvfsftpdircache.c
index 26984f4..8e6de25 100644
--- a/daemon/gvfsftpdircache.c
+++ b/daemon/gvfsftpdircache.c
@@ -153,11 +153,11 @@ g_vfs_ftp_dir_cache_lookup_entry (GVfsFtpDirCache * cache,
G_IO_ERROR, G_IO_ERROR_NOT_DIRECTORY,
_("The file is not a directory"));
}
- g_vfs_ftp_task_open_data_connection (task);
-
+ g_vfs_ftp_task_setup_data_connection (task);
g_vfs_ftp_task_send (task,
G_VFS_FTP_PASS_100 | G_VFS_FTP_FAIL_200,
"%s", cache->funcs->command);
+ g_vfs_ftp_task_open_data_connection (task);
if (g_vfs_ftp_task_is_in_error (task))
return NULL;
diff --git a/daemon/gvfsftptask.c b/daemon/gvfsftptask.c
index 118f80d..37f2b59 100644
--- a/daemon/gvfsftptask.c
+++ b/daemon/gvfsftptask.c
@@ -747,7 +747,7 @@ g_vfs_ftp_task_create_remote_address (GVfsFtpTask *task, guint port)
}
static GVfsFtpMethod
-g_vfs_ftp_task_open_data_connection_epsv (GVfsFtpTask *task, GVfsFtpMethod method)
+g_vfs_ftp_task_setup_data_connection_epsv (GVfsFtpTask *task, GVfsFtpMethod method)
{
const char *s;
char **reply;
@@ -790,7 +790,7 @@ fail:
}
static GVfsFtpMethod
-g_vfs_ftp_task_open_data_connection_pasv (GVfsFtpTask *task, GVfsFtpMethod method)
+g_vfs_ftp_task_setup_data_connection_pasv (GVfsFtpTask *task, GVfsFtpMethod method)
{
guint ip1, ip2, ip3, ip4, port1, port2;
char **reply;
@@ -875,14 +875,14 @@ g_vfs_ftp_task_open_data_connection_pasv (GVfsFtpTask *task, GVfsFtpMethod metho
typedef GVfsFtpMethod (* GVfsFtpOpenDataConnectionFunc) (GVfsFtpTask *task, GVfsFtpMethod method);
static GVfsFtpMethod
-g_vfs_ftp_task_open_data_connection_any (GVfsFtpTask *task, GVfsFtpMethod unused)
+g_vfs_ftp_task_setup_data_connection_any (GVfsFtpTask *task, GVfsFtpMethod unused)
{
static const struct {
GVfsFtpFeature required_feature;
GVfsFtpOpenDataConnectionFunc func;
} funcs_ordered[] = {
- { G_VFS_FTP_FEATURE_EPSV, g_vfs_ftp_task_open_data_connection_epsv },
- { 0, g_vfs_ftp_task_open_data_connection_pasv }
+ { G_VFS_FTP_FEATURE_EPSV, g_vfs_ftp_task_setup_data_connection_epsv },
+ { 0, g_vfs_ftp_task_setup_data_connection_pasv }
};
GVfsFtpMethod method;
guint i;
@@ -918,20 +918,23 @@ g_vfs_ftp_task_open_data_connection_any (GVfsFtpTask *task, GVfsFtpMethod unused
}
/**
- * g_vfs_ftp_task_open_data_connection:
+ * g_vfs_ftp_task_setup_data_connection:
* @task: a task not having an open data connection
*
- * Tries to open a data connection to the ftp server. If the operation fails,
- * @task will be set into an error state.
+ * Sets up a data connection to the ftp server with using the best method for
+ * this task. If the operation fails, @task will be set into an error state.
+ * You must call g_vfs_ftp_task_open_data_connection() to finish setup and
+ * ensure the data connection actually gets opened. Usually, this requires
+ * sending an FTP command down the stream.
**/
void
-g_vfs_ftp_task_open_data_connection (GVfsFtpTask *task)
+g_vfs_ftp_task_setup_data_connection (GVfsFtpTask *task)
{
static const GVfsFtpOpenDataConnectionFunc connect_funcs[] = {
- [G_VFS_FTP_METHOD_ANY] = g_vfs_ftp_task_open_data_connection_any,
- [G_VFS_FTP_METHOD_EPSV] = g_vfs_ftp_task_open_data_connection_epsv,
- [G_VFS_FTP_METHOD_PASV] = g_vfs_ftp_task_open_data_connection_pasv,
- [G_VFS_FTP_METHOD_PASV_ADDR] = g_vfs_ftp_task_open_data_connection_pasv,
+ [G_VFS_FTP_METHOD_ANY] = g_vfs_ftp_task_setup_data_connection_any,
+ [G_VFS_FTP_METHOD_EPSV] = g_vfs_ftp_task_setup_data_connection_epsv,
+ [G_VFS_FTP_METHOD_PASV] = g_vfs_ftp_task_setup_data_connection_pasv,
+ [G_VFS_FTP_METHOD_PASV_ADDR] = g_vfs_ftp_task_setup_data_connection_pasv,
[G_VFS_FTP_METHOD_EPRT] = NULL,
[G_VFS_FTP_METHOD_PORT] = NULL
};
@@ -953,7 +956,7 @@ g_vfs_ftp_task_open_data_connection (GVfsFtpTask *task)
if (result == G_VFS_FTP_METHOD_ANY &&
method != G_VFS_FTP_METHOD_ANY &&
!g_vfs_ftp_task_is_in_error (task))
- result = g_vfs_ftp_task_open_data_connection_any (task, G_VFS_FTP_METHOD_ANY);
+ result = g_vfs_ftp_task_setup_data_connection_any (task, G_VFS_FTP_METHOD_ANY);
g_assert (result < G_N_ELEMENTS (connect_funcs) && connect_funcs[result]);
if (result != method)
@@ -972,3 +975,19 @@ g_vfs_ftp_task_open_data_connection (GVfsFtpTask *task)
}
}
+/**
+ * g_vfs_ftp_task_open_data_connection:
+ * @task: a task
+ *
+ * Tries to open a data connection to the ftp server. If the operation fails,
+ * @task will be set into an error state.
+ **/
+void
+g_vfs_ftp_task_open_data_connection (GVfsFtpTask *task)
+{
+ g_return_if_fail (task != NULL);
+
+ if (g_vfs_ftp_task_is_in_error (task))
+ return;
+}
+
diff --git a/daemon/gvfsftptask.h b/daemon/gvfsftptask.h
index 6453f41..8345535 100644
--- a/daemon/gvfsftptask.h
+++ b/daemon/gvfsftptask.h
@@ -82,6 +82,7 @@ guint g_vfs_ftp_task_sendv (GVfsFtpTask *
guint g_vfs_ftp_task_receive (GVfsFtpTask * task,
GVfsFtpResponseFlags flags,
char *** reply);
+void g_vfs_ftp_task_setup_data_connection (GVfsFtpTask * task);
void g_vfs_ftp_task_open_data_connection (GVfsFtpTask * task);
void g_vfs_ftp_task_close_data_connection (GVfsFtpTask * task);
--
1.6.3.2

View File

@ -1,361 +0,0 @@
From 2839922c259b848d7689d245a055c628754dc116 Mon Sep 17 00:00:00 2001
From: Benjamin Otte <otte@gnome.org>
Date: Mon, 15 Jun 2009 23:03:26 +0200
Subject: [PATCH 02/13] =?utf-8?q?[FTP]=20Bug=20516704=20=E2=80=93=20Be=20able=20to=20connect=20to=20an=20Active=20FTP=20Site?=
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
Add initial support for the PORT command. Support for EPRT and a
non-ugly API are still missing.
---
daemon/gvfsftpconnection.c | 157 +++++++++++++++++++++++++++++++++++++++++++-
daemon/gvfsftpconnection.h | 7 ++
daemon/gvfsftptask.c | 56 ++++++++++++++--
daemon/gvfsftptask.h | 1 +
4 files changed, 215 insertions(+), 6 deletions(-)
diff --git a/daemon/gvfsftpconnection.c b/daemon/gvfsftpconnection.c
index ac5418f..521664c 100644
--- a/daemon/gvfsftpconnection.c
+++ b/daemon/gvfsftpconnection.c
@@ -22,10 +22,12 @@
#include <config.h>
+#include "gvfsftpconnection.h"
+
#include <string.h>
#include <glib/gi18n.h>
-#include "gvfsftpconnection.h"
+#include "gvfsbackendftp.h"
/* used for identifying the connection during debugging */
static volatile int debug_id = 0;
@@ -37,6 +39,7 @@ struct _GVfsFtpConnection
GIOStream * commands; /* ftp command stream */
GDataInputStream * commands_in; /* wrapper around in stream to allow line-wise reading */
+ GSocket * listen_socket; /* socket we are listening on for active FTP connections */
GIOStream * data; /* ftp data stream or NULL if not in use */
int debug_id; /* unique id for debugging purposes */
@@ -71,11 +74,22 @@ g_vfs_ftp_connection_new (GSocketConnectable *addr,
return conn;
}
+static void
+g_vfs_ftp_connection_stop_listening (GVfsFtpConnection *conn)
+{
+ if (conn->listen_socket)
+ {
+ g_object_unref (conn->listen_socket);
+ conn->listen_socket = NULL;
+ }
+}
+
void
g_vfs_ftp_connection_free (GVfsFtpConnection *conn)
{
g_return_if_fail (conn != NULL);
+ g_vfs_ftp_connection_stop_listening (conn);
if (conn->data)
g_vfs_ftp_connection_close_data_connection (conn);
@@ -218,6 +232,8 @@ g_vfs_ftp_connection_open_data_connection (GVfsFtpConnection *conn,
g_return_val_if_fail (conn != NULL, FALSE);
g_return_val_if_fail (conn->data == NULL, FALSE);
+ g_vfs_ftp_connection_stop_listening (conn);
+
conn->data = G_IO_STREAM (g_socket_client_connect (conn->client,
G_SOCKET_CONNECTABLE (addr),
cancellable,
@@ -226,6 +242,145 @@ g_vfs_ftp_connection_open_data_connection (GVfsFtpConnection *conn,
return conn->data != NULL;
}
+/**
+ * g_vfs_ftp_connection_listen_data_connection:
+ * @conn: a connection
+ * @error: %NULL or location to take potential errors
+ *
+ * Initiates a listening socket that the FTP server can connect to. To accept
+ * connections and initialize data transfers, use
+ * g_vfs_ftp_connection_accept_data_connection().
+ * This function supports what is known as "active FTP", while
+ * g_vfs_ftp_connection_open_data_connection() is to be used for "passive FTP".
+ *
+ * Returns: the actual address the socket is listening on or %NULL on error
+ **/
+GSocketAddress *
+g_vfs_ftp_connection_listen_data_connection (GVfsFtpConnection *conn,
+ GError ** error)
+{
+ GSocketAddress *local, *addr;
+
+ g_return_val_if_fail (conn != NULL, NULL);
+ g_return_val_if_fail (conn->data == NULL, FALSE);
+
+ g_vfs_ftp_connection_stop_listening (conn);
+
+ local = g_socket_connection_get_local_address (G_SOCKET_CONNECTION (conn->commands), error);
+ if (local == NULL)
+ return NULL;
+
+ conn->listen_socket = g_socket_new (g_socket_address_get_family (local),
+ G_SOCKET_TYPE_STREAM,
+ G_SOCKET_PROTOCOL_TCP,
+ error);
+ if (conn->listen_socket == NULL)
+ return NULL;
+
+ g_assert (G_IS_INET_SOCKET_ADDRESS (local));
+ addr = g_inet_socket_address_new (g_inet_socket_address_get_address (G_INET_SOCKET_ADDRESS (local)), 0);
+ g_object_unref (local);
+
+ if (!g_socket_bind (conn->listen_socket, addr, TRUE, error) ||
+ !g_socket_listen (conn->listen_socket, error) ||
+ !(local = g_socket_get_local_address (conn->listen_socket, error)))
+ {
+ g_object_unref (addr);
+ g_vfs_ftp_connection_stop_listening (conn);
+ return NULL;
+ }
+
+ g_object_unref (addr);
+ return local;
+}
+
+static void
+cancel_timer_cb (GCancellable *orig, GCancellable *to_cancel)
+{
+ g_cancellable_cancel (to_cancel);
+}
+
+static gboolean
+cancel_cancellable (gpointer cancellable)
+{
+ g_cancellable_cancel (cancellable);
+ return FALSE;
+}
+
+/**
+ * g_vfs_ftp_connection_accept_data_connection:
+ * @conn: a listening connection
+ * @cancellable: cancellable to interrupt wait
+ * @error: %NULL or location to take a potential error
+ *
+ * Opens a data connection for @conn by accepting an incoming connection on the
+ * address it is listening on via g_vfs_ftp_connection_listen_data_connection(),
+ * which must have been called prior to this function.
+ * If this function succeeds, a data connection will have been opened, and calls
+ * to g_vfs_ftp_connection_get_data_stream() will work.
+ *
+ * Returns: %TRUE if a connection was successfully acquired
+ **/
+gboolean
+g_vfs_ftp_connection_accept_data_connection (GVfsFtpConnection *conn,
+ GCancellable * cancellable,
+ GError ** error)
+{
+ GSocket *accepted;
+ GCancellable *timer;
+ gulong cancel_cb_id;
+ GIOCondition condition;
+
+ g_return_val_if_fail (conn != NULL, FALSE);
+ g_return_val_if_fail (conn->data == NULL, FALSE);
+ g_return_val_if_fail (G_IS_SOCKET (conn->listen_socket), FALSE);
+
+ timer = g_cancellable_new ();
+ cancel_cb_id = g_cancellable_connect (cancellable,
+ G_CALLBACK (cancel_timer_cb),
+ timer,
+ NULL);
+ g_object_ref (timer);
+ g_timeout_add_seconds_full (G_PRIORITY_DEFAULT,
+ G_VFS_FTP_TIMEOUT_IN_SECONDS,
+ cancel_cancellable,
+ timer,
+ g_object_unref);
+
+ condition = g_socket_condition_wait (conn->listen_socket, G_IO_IN, timer, error);
+
+ g_cancellable_disconnect (cancellable, cancel_cb_id);
+ g_object_unref (timer);
+
+ if ((condition & G_IO_IN) == 0)
+ {
+ if (g_cancellable_is_cancelled (timer) &&
+ !g_cancellable_is_cancelled (cancellable))
+ {
+ g_clear_error (error);
+ g_set_error_literal (error,
+ G_IO_ERROR, G_IO_ERROR_HOST_NOT_FOUND,
+ _("Failed to create active FTP connection. "
+ "Maybe your router does not support this?"));
+ }
+ else if (error && *error == NULL)
+ {
+ g_set_error_literal (error,
+ G_IO_ERROR, G_IO_ERROR_HOST_NOT_FOUND,
+ _("Failed to create active FTP connection."));
+ }
+ return FALSE;
+ }
+
+ accepted = g_socket_accept (conn->listen_socket, error);
+ if (accepted == NULL)
+ return FALSE;
+
+ conn->data = G_IO_STREAM (g_socket_connection_factory_create_connection (accepted));
+ g_object_unref (accepted);
+ return TRUE;
+}
+
void
g_vfs_ftp_connection_close_data_connection (GVfsFtpConnection *conn)
{
diff --git a/daemon/gvfsftpconnection.h b/daemon/gvfsftpconnection.h
index 3605f26..7d0c697 100644
--- a/daemon/gvfsftpconnection.h
+++ b/daemon/gvfsftpconnection.h
@@ -55,6 +55,13 @@ gboolean g_vfs_ftp_connection_open_data_connection
GSocketAddress * addr,
GCancellable * cancellable,
GError ** error);
+GSocketAddress * g_vfs_ftp_connection_listen_data_connection
+ (GVfsFtpConnection * conn,
+ GError ** error);
+gboolean g_vfs_ftp_connection_accept_data_connection
+ (GVfsFtpConnection * conn,
+ GCancellable * cancellable,
+ GError ** error);
void g_vfs_ftp_connection_close_data_connection
(GVfsFtpConnection * conn);
GIOStream * g_vfs_ftp_connection_get_data_stream (GVfsFtpConnection * conn);
diff --git a/daemon/gvfsftptask.c b/daemon/gvfsftptask.c
index 37f2b59..879b912 100644
--- a/daemon/gvfsftptask.c
+++ b/daemon/gvfsftptask.c
@@ -799,7 +799,6 @@ g_vfs_ftp_task_setup_data_connection_pasv (GVfsFtpTask *task, GVfsFtpMethod meth
guint status;
gboolean success;
- /* only binary transfers please */
status = g_vfs_ftp_task_send_and_check (task, 0, NULL, NULL, &reply, "PASV");
if (status == 0)
return G_VFS_FTP_METHOD_ANY;
@@ -872,6 +871,45 @@ g_vfs_ftp_task_setup_data_connection_pasv (GVfsFtpTask *task, GVfsFtpMethod meth
return G_VFS_FTP_METHOD_ANY;
}
+static GVfsFtpMethod
+g_vfs_ftp_task_open_data_connection_port (GVfsFtpTask *task, GVfsFtpMethod unused)
+{
+ GSocketAddress *addr;
+ guint status, i, port;
+ char *ip_string;
+
+ /* workaround for the task not having a connection yet */
+ if (task->conn == NULL &&
+ g_vfs_ftp_task_send (task, 0, "NOOP") == 0)
+ return G_VFS_FTP_METHOD_ANY;
+
+ addr = g_vfs_ftp_connection_listen_data_connection (task->conn, &task->error);
+ if (addr == NULL)
+ return G_VFS_FTP_METHOD_ANY;
+ /* the PORT command only supports IPv4 */
+ if (g_socket_address_get_family (addr) != G_SOCKET_FAMILY_IPV4)
+ {
+ g_object_unref (addr);
+ return G_VFS_FTP_METHOD_ANY;
+ }
+
+ ip_string = g_inet_address_to_string (g_inet_socket_address_get_address (G_INET_SOCKET_ADDRESS (addr)));
+ for (i = 0; ip_string[i]; i++)
+ {
+ if (ip_string[i] == '.')
+ ip_string[i] = ',';
+ }
+ port = g_inet_socket_address_get_port (G_INET_SOCKET_ADDRESS (addr));
+
+ status = g_vfs_ftp_task_send (task, 0, "PORT %s,%u,%u", ip_string, port >> 8, port & 0xFF);
+ g_free (ip_string);
+ g_object_unref (addr);
+ if (status == 0)
+ return G_VFS_FTP_METHOD_ANY;
+
+ return G_VFS_FTP_METHOD_PORT;
+}
+
typedef GVfsFtpMethod (* GVfsFtpOpenDataConnectionFunc) (GVfsFtpTask *task, GVfsFtpMethod method);
static GVfsFtpMethod
@@ -882,7 +920,8 @@ g_vfs_ftp_task_setup_data_connection_any (GVfsFtpTask *task, GVfsFtpMethod unuse
GVfsFtpOpenDataConnectionFunc func;
} funcs_ordered[] = {
{ G_VFS_FTP_FEATURE_EPSV, g_vfs_ftp_task_setup_data_connection_epsv },
- { 0, g_vfs_ftp_task_setup_data_connection_pasv }
+ { 0, g_vfs_ftp_task_setup_data_connection_pasv },
+ { 0, g_vfs_ftp_task_open_data_connection_port }
};
GVfsFtpMethod method;
guint i;
@@ -936,15 +975,15 @@ g_vfs_ftp_task_setup_data_connection (GVfsFtpTask *task)
[G_VFS_FTP_METHOD_PASV] = g_vfs_ftp_task_setup_data_connection_pasv,
[G_VFS_FTP_METHOD_PASV_ADDR] = g_vfs_ftp_task_setup_data_connection_pasv,
[G_VFS_FTP_METHOD_EPRT] = NULL,
- [G_VFS_FTP_METHOD_PORT] = NULL
+ [G_VFS_FTP_METHOD_PORT] = g_vfs_ftp_task_open_data_connection_port
};
GVfsFtpMethod method, result;
g_return_if_fail (task != NULL);
- /* FIXME: get the method from elsewhere */
+ task->method = G_VFS_FTP_METHOD_ANY;
+
method = g_atomic_int_get (&task->backend->method);
-
g_assert (method < G_N_ELEMENTS (connect_funcs) && connect_funcs[method]);
if (g_vfs_ftp_task_is_in_error (task))
@@ -973,6 +1012,7 @@ g_vfs_ftp_task_setup_data_connection (GVfsFtpTask *task)
g_debug ("# set default data connection method from %s to %s\n",
methods[method], methods[result]);
}
+ task->method = result;
}
/**
@@ -989,5 +1029,11 @@ g_vfs_ftp_task_open_data_connection (GVfsFtpTask *task)
if (g_vfs_ftp_task_is_in_error (task))
return;
+
+ if (task->method == G_VFS_FTP_METHOD_EPRT ||
+ task->method == G_VFS_FTP_METHOD_PORT)
+ g_vfs_ftp_connection_accept_data_connection (task->conn,
+ task->cancellable,
+ &task->error);
}
diff --git a/daemon/gvfsftptask.h b/daemon/gvfsftptask.h
index 8345535..ac0bd74 100644
--- a/daemon/gvfsftptask.h
+++ b/daemon/gvfsftptask.h
@@ -47,6 +47,7 @@ struct _GVfsFtpTask
GError * error; /* NULL or current error - will be propagated to task */
GVfsFtpConnection * conn; /* connection in use by this task or NULL if none */
+ GVfsFtpMethod method; /* method currently in use (only valid after call to _setup_data_connection() */
};
typedef void (* GVfsFtpErrorFunc) (GVfsFtpTask *task, gpointer data);
--
1.6.3.2

View File

@ -1,27 +0,0 @@
From 81fb75b2dc11a969d890f58bc3255ceae3f7bfde Mon Sep 17 00:00:00 2001
From: Benjamin Otte <otte@gnome.org>
Date: Tue, 16 Jun 2009 11:00:30 +0200
Subject: [PATCH 04/13] [FTP] add the error code for EPRT's 522 error
---
daemon/gvfsftptask.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/daemon/gvfsftptask.c b/daemon/gvfsftptask.c
index 879b912..318dde4 100644
--- a/daemon/gvfsftptask.c
+++ b/daemon/gvfsftptask.c
@@ -382,6 +382,10 @@ g_vfs_ftp_task_set_error_from_response (GVfsFtpTask *task, guint response)
code = G_IO_ERROR_NOT_SUPPORTED;
msg = _("Operation unsupported");
break;
+ case 522: /* EPRT: unsupported network protocol */
+ code = G_IO_ERROR_NOT_SUPPORTED;
+ msg = _("Unsupported network protocol");
+ break;
case 530: /* Not logged in. */
code = G_IO_ERROR_PERMISSION_DENIED;
msg = _("Permission denied");
--
1.6.3.2

View File

@ -1,101 +0,0 @@
From 19a6bf345fdb8d445e4c3683e4ca0af0a0031f0b Mon Sep 17 00:00:00 2001
From: Benjamin Otte <otte@gnome.org>
Date: Tue, 16 Jun 2009 11:16:27 +0200
Subject: [PATCH 05/13] [FTP] add EPRT support
The code does not support some corner cases that are listed in the RFC
(see inline comments), but I suspect those will never be hit. We can add
those when they are hit.
---
daemon/gvfsftptask.c | 60 ++++++++++++++++++++++++++++++++++++++++++++-----
1 files changed, 53 insertions(+), 7 deletions(-)
diff --git a/daemon/gvfsftptask.c b/daemon/gvfsftptask.c
index 318dde4..9cab5a8 100644
--- a/daemon/gvfsftptask.c
+++ b/daemon/gvfsftptask.c
@@ -876,7 +876,52 @@ g_vfs_ftp_task_setup_data_connection_pasv (GVfsFtpTask *task, GVfsFtpMethod meth
}
static GVfsFtpMethod
-g_vfs_ftp_task_open_data_connection_port (GVfsFtpTask *task, GVfsFtpMethod unused)
+g_vfs_ftp_task_setup_data_connection_eprt (GVfsFtpTask *task, GVfsFtpMethod unused)
+{
+ GSocketAddress *addr;
+ guint status, port, family;
+ char *ip_string;
+
+ /* workaround for the task not having a connection yet */
+ if (task->conn == NULL &&
+ g_vfs_ftp_task_send (task, 0, "NOOP") == 0)
+ return G_VFS_FTP_METHOD_ANY;
+
+ addr = g_vfs_ftp_connection_listen_data_connection (task->conn, &task->error);
+ if (addr == NULL)
+ return G_VFS_FTP_METHOD_ANY;
+ switch (g_socket_address_get_family (addr))
+ {
+ case G_SOCKET_FAMILY_IPV4:
+ family = 1;
+ break;
+ case G_SOCKET_FAMILY_IPV6:
+ family = 2;
+ break;
+ default:
+ g_object_unref (addr);
+ return G_VFS_FTP_METHOD_ANY;
+ }
+
+ ip_string = g_inet_address_to_string (g_inet_socket_address_get_address (G_INET_SOCKET_ADDRESS (addr)));
+ /* if this ever happens (and it must not for IP4 and IP6 addresses),
+ * we need to add support for using a different separator */
+ g_assert (strchr (ip_string, '|') == NULL);
+ port = g_inet_socket_address_get_port (G_INET_SOCKET_ADDRESS (addr));
+
+ /* we could handle the 522 response here, (unsupported network family),
+ * but I don't think that will buy us anything */
+ status = g_vfs_ftp_task_send (task, 0, "EPRT |%u|%s|%u|", family, ip_string, port);
+ g_free (ip_string);
+ g_object_unref (addr);
+ if (status == 0)
+ return G_VFS_FTP_METHOD_ANY;
+
+ return G_VFS_FTP_METHOD_EPRT;
+}
+
+static GVfsFtpMethod
+g_vfs_ftp_task_setup_data_connection_port (GVfsFtpTask *task, GVfsFtpMethod unused)
{
GSocketAddress *addr;
guint status, i, port;
@@ -925,7 +970,8 @@ g_vfs_ftp_task_setup_data_connection_any (GVfsFtpTask *task, GVfsFtpMethod unuse
} funcs_ordered[] = {
{ G_VFS_FTP_FEATURE_EPSV, g_vfs_ftp_task_setup_data_connection_epsv },
{ 0, g_vfs_ftp_task_setup_data_connection_pasv },
- { 0, g_vfs_ftp_task_open_data_connection_port }
+ { G_VFS_FTP_FEATURE_EPSV, g_vfs_ftp_task_setup_data_connection_eprt },
+ { 0, g_vfs_ftp_task_setup_data_connection_port }
};
GVfsFtpMethod method;
guint i;
@@ -974,12 +1020,12 @@ void
g_vfs_ftp_task_setup_data_connection (GVfsFtpTask *task)
{
static const GVfsFtpOpenDataConnectionFunc connect_funcs[] = {
- [G_VFS_FTP_METHOD_ANY] = g_vfs_ftp_task_setup_data_connection_any,
- [G_VFS_FTP_METHOD_EPSV] = g_vfs_ftp_task_setup_data_connection_epsv,
- [G_VFS_FTP_METHOD_PASV] = g_vfs_ftp_task_setup_data_connection_pasv,
+ [G_VFS_FTP_METHOD_ANY] = g_vfs_ftp_task_setup_data_connection_any,
+ [G_VFS_FTP_METHOD_EPSV] = g_vfs_ftp_task_setup_data_connection_epsv,
+ [G_VFS_FTP_METHOD_PASV] = g_vfs_ftp_task_setup_data_connection_pasv,
[G_VFS_FTP_METHOD_PASV_ADDR] = g_vfs_ftp_task_setup_data_connection_pasv,
- [G_VFS_FTP_METHOD_EPRT] = NULL,
- [G_VFS_FTP_METHOD_PORT] = g_vfs_ftp_task_open_data_connection_port
+ [G_VFS_FTP_METHOD_EPRT] = g_vfs_ftp_task_setup_data_connection_eprt,
+ [G_VFS_FTP_METHOD_PORT] = g_vfs_ftp_task_setup_data_connection_port
};
GVfsFtpMethod method, result;
--
1.6.3.2

View File

@ -1,36 +0,0 @@
From 5d3ab40b5b0a574f207e7177d2f4c3bd329458a4 Mon Sep 17 00:00:00 2001
From: David Zeuthen <davidz@redhat.com>
Date: Tue, 16 Jun 2009 17:41:45 -0400
Subject: [PATCH 06/13] =?utf-8?q?Bug=20582772=20=E2=80=93=20gvfsd-computer=20crashes=20with=20SEGSEV=20in=20recompute=5Ffiles?=
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
Never use blank/empty drive names.
---
monitor/gdu/ggdudrive.c | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/monitor/gdu/ggdudrive.c b/monitor/gdu/ggdudrive.c
index 8e04104..6195f97 100644
--- a/monitor/gdu/ggdudrive.c
+++ b/monitor/gdu/ggdudrive.c
@@ -177,6 +177,15 @@ update_drive (GGduDrive *drive)
if (device != NULL)
g_object_unref (device);
+ /* Never use empty/blank names (#582772) */
+ if (drive->name == NULL || strlen (drive->name) == 0)
+ {
+ if (drive->device_file != NULL)
+ drive->name = g_strdup_printf (_("Unnamed Drive (%s)"), drive->device_file);
+ else
+ drive->name = g_strdup (_("Unnamed Drive"));
+ }
+
/* compute whether something changed */
changed = !((old_is_media_removable == drive->is_media_removable) &&
(old_has_media == drive->has_media) &&
--
1.6.3.2

View File

@ -1,117 +0,0 @@
From c6405c6653c27b247f1fbb59c01b95938fb6b2d8 Mon Sep 17 00:00:00 2001
From: David Zeuthen <davidz@redhat.com>
Date: Tue, 16 Jun 2009 19:49:38 -0400
Subject: [PATCH 07/13] Better handling of PC floppy drives
PC Floppy Drives are handled in a special way since we don't poll for
media (it would make a lot of noise). Specifically we never probe for
the filesystem type. So if encountering a PC Floppy Drive, just always
show all volumes from it. Since we already have working support for
g_drive_poll_for_media() in Nautilus, things Just Work(tm)
http://people.freedesktop.org/~david/dkd-gnome-floppy-welcome-to-the-1980s.png
E.g. you can use the "Rescan" menu option to force media detection.
Welcome to the 1980s.
---
monitor/gdu/ggdudrive.c | 5 ++++-
monitor/gdu/ggduvolume.c | 5 ++++-
monitor/gdu/ggduvolumemonitor.c | 28 +++++++++++++++++++++++++++-
monitor/gdu/ggduvolumemonitor.h | 2 ++
4 files changed, 37 insertions(+), 3 deletions(-)
diff --git a/monitor/gdu/ggdudrive.c b/monitor/gdu/ggdudrive.c
index 6195f97..d332e14 100644
--- a/monitor/gdu/ggdudrive.c
+++ b/monitor/gdu/ggdudrive.c
@@ -148,7 +148,10 @@ update_drive (GGduDrive *drive)
drive->icon = gdu_presentable_get_icon (drive->presentable);
g_free (drive->name);
- drive->name = gdu_presentable_get_name (drive->presentable);
+ if (_is_pc_floppy_drive (device))
+ drive->name = g_strdup (_("Floppy Drive"));
+ else
+ drive->name = gdu_presentable_get_name (drive->presentable);
/* the GduDevice for an activatable drive (such as RAID) is NULL if the drive is not activated */
if (device == NULL)
diff --git a/monitor/gdu/ggduvolume.c b/monitor/gdu/ggduvolume.c
index 8f75247..73ad0fc 100644
--- a/monitor/gdu/ggduvolume.c
+++ b/monitor/gdu/ggduvolume.c
@@ -304,7 +304,10 @@ update_volume (GGduVolume *volume)
volume->icon = gdu_presentable_get_icon (GDU_PRESENTABLE (volume->gdu_volume));
g_free (volume->name);
- volume->name = gdu_presentable_get_name (GDU_PRESENTABLE (volume->gdu_volume));
+ if (_is_pc_floppy_drive (device))
+ volume->name = g_strdup (_("Floppy Disk"));
+ else
+ volume->name = gdu_presentable_get_name (GDU_PRESENTABLE (volume->gdu_volume));
/* special case the name and icon for audio discs */
activation_uri = volume->activation_root != NULL ? g_file_get_uri (volume->activation_root) : NULL;
diff --git a/monitor/gdu/ggduvolumemonitor.c b/monitor/gdu/ggduvolumemonitor.c
index 5c80f64..6da7393 100644
--- a/monitor/gdu/ggduvolumemonitor.c
+++ b/monitor/gdu/ggduvolumemonitor.c
@@ -744,6 +744,32 @@ should_mount_be_ignored (GduPool *pool, GduDevice *d)
return ret;
}
+gboolean
+_is_pc_floppy_drive (GduDevice *device)
+{
+ gboolean ret;
+ gchar **drive_media_compat;
+ const gchar *drive_connection_interface;
+
+ ret = FALSE;
+
+ if (device != NULL)
+ {
+ drive_media_compat = gdu_device_drive_get_media_compatibility (device);
+ drive_connection_interface = gdu_device_drive_get_connection_interface (device);
+
+ if (g_strcmp0 (drive_connection_interface, "platform") == 0 &&
+ (drive_media_compat != NULL &&
+ g_strv_length (drive_media_compat) > 0 &&
+ g_strcmp0 (drive_media_compat[0], "floppy") == 0))
+ {
+ ret = TRUE;
+ }
+ }
+
+ return ret;
+}
+
static gboolean
should_volume_be_ignored (GduPool *pool, GduVolume *volume, GList *fstab_mount_points)
{
@@ -763,7 +789,7 @@ should_volume_be_ignored (GduPool *pool, GduVolume *volume, GList *fstab_mount_p
usage = gdu_device_id_get_usage (device);
type = gdu_device_id_get_type (device);
- if (g_strcmp0 (usage, "filesystem") == 0)
+ if (_is_pc_floppy_drive (device) || g_strcmp0 (usage, "filesystem") == 0)
{
GUnixMountPoint *mount_point;
diff --git a/monitor/gdu/ggduvolumemonitor.h b/monitor/gdu/ggduvolumemonitor.h
index ec559c4..b91ceb9 100644
--- a/monitor/gdu/ggduvolumemonitor.h
+++ b/monitor/gdu/ggduvolumemonitor.h
@@ -55,6 +55,8 @@ GType g_gdu_volume_monitor_get_type (void) G_GNUC_CONST;
GVolumeMonitor *g_gdu_volume_monitor_new (void);
+gboolean _is_pc_floppy_drive (GduDevice *device);
+
G_END_DECLS
#endif /* __G_GDU_VOLUME_MONITOR_H__ */
--
1.6.3.2

View File

@ -1,51 +0,0 @@
From acb3f8029d9f9a7054e3f138fd978e24233573a3 Mon Sep 17 00:00:00 2001
From: Benjamin Otte <otte@gnome.org>
Date: Wed, 17 Jun 2009 10:04:42 +0200
Subject: [PATCH 08/13] [FTP] use the EPRT feature response for EPRT support, not EPSV
---
daemon/gvfsbackendftp.c | 1 +
daemon/gvfsbackendftp.h | 1 +
daemon/gvfsftptask.c | 2 +-
3 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/daemon/gvfsbackendftp.c b/daemon/gvfsbackendftp.c
index 913eb1c..aef5687 100644
--- a/daemon/gvfsbackendftp.c
+++ b/daemon/gvfsbackendftp.c
@@ -99,6 +99,7 @@ gvfs_backend_ftp_determine_features (GVfsFtpTask *task)
{ "MDTM", G_VFS_FTP_FEATURE_MDTM },
{ "SIZE", G_VFS_FTP_FEATURE_SIZE },
{ "TVFS", G_VFS_FTP_FEATURE_TVFS },
+ { "EPRT", G_VFS_FTP_FEATURE_EPRT },
{ "EPSV", G_VFS_FTP_FEATURE_EPSV },
{ "UTF8", G_VFS_FTP_FEATURE_UTF8 },
};
diff --git a/daemon/gvfsbackendftp.h b/daemon/gvfsbackendftp.h
index 89b2769..0a7bcf5 100644
--- a/daemon/gvfsbackendftp.h
+++ b/daemon/gvfsbackendftp.h
@@ -34,6 +34,7 @@ typedef enum {
G_VFS_FTP_FEATURE_MDTM,
G_VFS_FTP_FEATURE_SIZE,
G_VFS_FTP_FEATURE_TVFS,
+ G_VFS_FTP_FEATURE_EPRT,
G_VFS_FTP_FEATURE_EPSV,
G_VFS_FTP_FEATURE_UTF8
} GVfsFtpFeature;
diff --git a/daemon/gvfsftptask.c b/daemon/gvfsftptask.c
index 9cab5a8..4c46c0c 100644
--- a/daemon/gvfsftptask.c
+++ b/daemon/gvfsftptask.c
@@ -970,7 +970,7 @@ g_vfs_ftp_task_setup_data_connection_any (GVfsFtpTask *task, GVfsFtpMethod unuse
} funcs_ordered[] = {
{ G_VFS_FTP_FEATURE_EPSV, g_vfs_ftp_task_setup_data_connection_epsv },
{ 0, g_vfs_ftp_task_setup_data_connection_pasv },
- { G_VFS_FTP_FEATURE_EPSV, g_vfs_ftp_task_setup_data_connection_eprt },
+ { G_VFS_FTP_FEATURE_EPRT, g_vfs_ftp_task_setup_data_connection_eprt },
{ 0, g_vfs_ftp_task_setup_data_connection_port }
};
GVfsFtpMethod method;
--
1.6.3.2

View File

@ -1,27 +0,0 @@
From 056cfe684e3db4f83c176bb723c264ecfe60837f Mon Sep 17 00:00:00 2001
From: Benjamin Otte <otte@gnome.org>
Date: Wed, 17 Jun 2009 10:05:29 +0200
Subject: [PATCH 09/13] [FTP] remove EPSV as default feature
now that we try EPSV anyway, we can omit assuming it exists and try PASV
first.
---
daemon/gvfsbackendftp.h | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/daemon/gvfsbackendftp.h b/daemon/gvfsbackendftp.h
index 0a7bcf5..5923d17 100644
--- a/daemon/gvfsbackendftp.h
+++ b/daemon/gvfsbackendftp.h
@@ -38,7 +38,7 @@ typedef enum {
G_VFS_FTP_FEATURE_EPSV,
G_VFS_FTP_FEATURE_UTF8
} GVfsFtpFeature;
-#define G_VFS_FTP_FEATURES_DEFAULT (1 << G_VFS_FTP_FEATURE_EPSV)
+#define G_VFS_FTP_FEATURES_DEFAULT (0)
typedef enum {
G_VFS_FTP_SYSTEM_UNKNOWN = 0,
--
1.6.3.2

View File

@ -1,39 +0,0 @@
diff -up gvfs-1.1.7/daemon/gvfsbackendcomputer.c.orig gvfs-1.1.7/daemon/gvfsbackendcomputer.c
--- gvfs-1.1.7/daemon/gvfsbackendcomputer.c.orig 2009-02-10 13:56:11.000000000 +0100
+++ gvfs-1.1.7/daemon/gvfsbackendcomputer.c 2009-03-09 16:07:22.000000000 +0100
@@ -595,11 +595,16 @@ try_open_for_read (GVfsBackend *backend,
return TRUE;
}
+/* TODO: push upstream */
+#define G_FILE_ATTRIBUTE_MOUNTABLE_UNIX_DEVICE_FILE "mountable::unix-device-file"
+
+
static void
file_info_from_file (ComputerFile *file,
GFileInfo *info)
{
char *uri;
+ char *device_file = NULL;
g_file_info_set_name (info, file->filename);
g_file_info_set_display_name (info, file->display_name);
@@ -627,6 +632,18 @@ file_info_from_file (ComputerFile *file,
g_file_info_set_attribute_boolean (info, G_FILE_ATTRIBUTE_ACCESS_CAN_WRITE, FALSE);
g_file_info_set_attribute_boolean (info, G_FILE_ATTRIBUTE_ACCESS_CAN_DELETE, FALSE);
g_file_info_set_attribute_boolean (info, G_FILE_ATTRIBUTE_ACCESS_CAN_TRASH, FALSE);
+
+ if (file->volume)
+ /* Take volume as a precedence */
+ device_file = g_volume_get_identifier (file->volume, "unix-device");
+ else
+ if (file->drive)
+ device_file = g_drive_get_identifier (file->drive, "unix-device");
+ if (device_file)
+ {
+ g_file_info_set_attribute_string (info, G_FILE_ATTRIBUTE_MOUNTABLE_UNIX_DEVICE_FILE, device_file);
+ g_free (device_file);
+ }
}
static gboolean

View File

@ -1,7 +1,38 @@
Index: mount-archive.desktop.in.in
===================================================================
--- mount-archive.desktop.in.in (revision 0)
+++ mount-archive.desktop.in.in (revision 0)
diff -up gvfs-1.3.2/Makefile.am.archive-integration gvfs-1.3.2/Makefile.am
--- gvfs-1.3.2/Makefile.am.archive-integration 2009-06-25 19:55:39.000000000 -0400
+++ gvfs-1.3.2/Makefile.am 2009-07-13 22:51:52.480693853 -0400
@@ -1,5 +1,19 @@
NULL =
+@INTLTOOL_DESKTOP_RULE@
+
+desktop_in_files = mount-archive.desktop.in
+
+mount-archive.desktop.in: mount-archive.desktop.in.in
+ sed -e "s|\@libexecdir\@|$(libexecdir)|" $< > $@
+
+desktopdir = $(datadir)/applications
+if HAVE_ARCHIVE
+desktop_DATA = mount-archive.desktop
+else
+desktop_DATA =
+endif
+
SUBDIRS = \
common \
metadata \
@@ -19,6 +33,8 @@ EXTRA_DIST = \
gvfs.doap \
README.commits \
MAINTAINERS \
+ mount-archive.desktop.in.in \
+ $(desktop_in_files) \
$(NULL)
DISTCLEANFILES = \
diff -up /dev/null gvfs-1.3.2/mount-archive.desktop.in.in
--- /dev/null 2009-07-13 16:21:55.049012465 -0400
+++ gvfs-1.3.2/mount-archive.desktop.in.in 2009-07-13 22:39:14.844931097 -0400
@@ -0,0 +1,14 @@
+[Desktop Entry]
+Encoding=UTF-8
@ -17,37 +48,3 @@ Index: mount-archive.desktop.in.in
+X-GNOME-Bugzilla-Product=gvfs
+X-GNOME-Bugzilla-Component=archive-backend
+X-GNOME-Bugzilla-Version=@VERSION@
Index: Makefile.am
===================================================================
--- Makefile.am.orig 2008-07-22 15:35:49.000000000 +0200
+++ Makefile.am 2008-07-22 17:56:59.417180064 +0200
@@ -1,5 +1,20 @@
NULL =
+@INTLTOOL_DESKTOP_RULE@
+
+desktop_in_files = mount-archive.desktop.in
+
+mount-archive.desktop.in: mount-archive.desktop.in.in
+ sed -e "s|\@libexecdir\@|$(libexecdir)|" $< > $@
+
+desktopdir = $(datadir)/applications
+if HAVE_ARCHIVE
+desktop_DATA = mount-archive.desktop
+else
+desktop_DATA =
+endif
+
+
SUBDIRS = \
common \
client \
@@ -18,6 +33,8 @@ EXTRA_DIST = \
gvfs.doap \
README.commits \
MAINTAINERS \
+ mount-archive.desktop.in.in \
+ $(desktop_in_files) \
$(NULL)
DISTCLEANFILES = \

View File

@ -1,7 +1,7 @@
Summary: Backends for the gio framework in GLib
Name: gvfs
Version: 1.3.1
Release: 2%{?dist}
Version: 1.3.2
Release: 1%{?dist}
License: LGPLv2+
Group: System Environment/Libraries
URL: http://www.gtk.org
@ -33,26 +33,13 @@ Requires(postun): desktop-file-utils
BuildRequires: automake autoconf
BuildRequires: libtool
# http://bugzilla.gnome.org/show_bug.cgi?id=567235
Patch1: gvfs-0.99.2-archive-integration.patch
# http://bugzilla.gnome.org/show_bug.cgi?id=573826
Patch2: gvfs-1.1.7-gdu-computer-expose-devices.patch
Patch1: gvfs-archive-integration.patch
# https://bugzilla.redhat.com/show_bug.cgi?id=497631
Patch8: gvfs-1.2.2-dnssd-deadlock.patch
# https://bugzilla.redhat.com/show_bug.cgi?id=504339
Patch9: gvfs-1.2.3-sftp-40sec-timeout.patch
# Backports from trunk
Patch100: 0001-FTP-prepare-the-code-for-active-FTP-support.patch
Patch101: 0002-FTP-Bug-516704-Be-able-to-connect-to-an-Active-FTP-S.patch
Patch102: 0004-FTP-add-the-error-code-for-EPRT-s-522-error.patch
Patch103: 0005-FTP-add-EPRT-support.patch
Patch104: 0006-Bug-582772-gvfsd-computer-crashes-with-SEGSEV-in-rec.patch
Patch105: 0007-Better-handling-of-PC-floppy-drives.patch
Patch106: 0008-FTP-use-the-EPRT-feature-response-for-EPRT-support-n.patch
Patch107: 0009-FTP-remove-EPSV-as-default-feature.patch
%description
The gvfs package provides backend implementations for the gio
framework in GLib. It includes ftp, sftp, cifs.
@ -134,20 +121,10 @@ media players (Media Transfer Protocol) to applications using gvfs.
%prep
%setup -q
%patch1 -p0 -b .archive-integration
%patch2 -p1 -b .computer-expose-devices
%patch1 -p1 -b .archive-integration
%patch8 -p1 -b .dnssd-deadlock
%patch9 -p1 -b .sftp-timeout
%patch100 -p1
%patch101 -p1
%patch102 -p1
%patch103 -p1
%patch104 -p1
%patch105 -p1
%patch106 -p1
%patch107 -p1
%build
# Needed for gvfs-0.2.1-archive-integration.patch
@ -203,6 +180,7 @@ update-desktop-database &> /dev/null ||:
%{_datadir}/gvfs/mounts/network.mount
%{_datadir}/gvfs/mounts/ftp.mount
%{_datadir}/dbus-1/services/gvfs-daemon.service
%{_datadir}/dbus-1/services/gvfs-metadata.service
%{_datadir}/dbus-1/services/org.gtk.Private.HalVolumeMonitor.service
%{_datadir}/dbus-1/services/org.gtk.Private.GduVolumeMonitor.service
%{_datadir}/gvfs/remote-volume-monitors/hal.monitor
@ -225,6 +203,7 @@ update-desktop-database &> /dev/null ||:
%{_libexecdir}/gvfsd-burn
%{_libexecdir}/gvfsd-dnssd
%{_libexecdir}/gvfsd-network
%{_libexecdir}/gvfsd-metadata
%{_libexecdir}/gvfs-hal-volume-monitor
%{_libexecdir}/gvfs-gdu-volume-monitor
%{_bindir}/gvfs-cat
@ -243,6 +222,7 @@ update-desktop-database &> /dev/null ||:
%{_bindir}/gvfs-save
%{_bindir}/gvfs-trash
%{_bindir}/gvfs-tree
%{_bindir}/gvfs-set-attribute
%files devel
%defattr(-, root, root, -)
@ -290,6 +270,10 @@ update-desktop-database &> /dev/null ||:
%changelog
* Mon Jul 13 2009 Matthias Clasen <mclasen@redhat.com> - 1.3.2-1
- Update to 1.3.2
- Drop upstreamed patches
* Mon Jun 22 2009 Tomas Bzatek <tbzatek@redhat.com> - 1.3.1-2
- Bump version requirements
- Backport FTP and Computer backend patches from master

View File

@ -1 +1 @@
78f5b53fb965e3daefb54dcc6f27900c gvfs-1.3.1.tar.bz2
73a7aecfba767f80146cbd5d37598e8b gvfs-1.3.2.tar.bz2