- Update to 1.0.3

This commit is contained in:
Tomas Bzatek 2008-11-26 11:21:13 +00:00
parent cf46119b13
commit 5deeb285a8
6 changed files with 160 additions and 78 deletions

View File

@ -1 +1 @@
gvfs-1.0.2.tar.bz2
gvfs-1.0.3.tar.bz2

View File

@ -1,18 +0,0 @@
Index: client/gdaemonmount.c
===================================================================
--- client/gdaemonmount.c (revision 2080)
+++ client/gdaemonmount.c (working copy)
@@ -366,11 +366,12 @@
GDaemonMount *daemon_mount = G_DAEMON_MOUNT (mount);
char **result;
- result = NULL;
G_LOCK (daemon_mount);
if (daemon_mount->mount_info->x_content_types != NULL &&
strlen (daemon_mount->mount_info->x_content_types) > 0)
result = g_strsplit (daemon_mount->mount_info->x_content_types, " ", 0);
+ else
+ result = g_new0 (char *, 1);
G_UNLOCK (daemon_mount);
return result;

View File

@ -1,48 +0,0 @@
Index: daemon/gvfsbackendsftp.c
===================================================================
--- daemon/gvfsbackendsftp.c (revision 2074)
+++ daemon/gvfsbackendsftp.c (revision 2075)
@@ -1804,11 +1804,7 @@ parse_attributes (GVfsBackendSftp *backe
if (S_ISDIR(mode))
icon = g_themed_icon_new ("folder");
else if (mimetype)
- {
icon = g_content_type_get_icon (mimetype);
- if (G_IS_THEMED_ICON (icon))
- g_themed_icon_append_name (G_THEMED_ICON (icon), "text-x-generic");
- }
if (icon == NULL)
icon = g_themed_icon_new ("text-x-generic");
Index: daemon/gvfsbackendsmb.c
===================================================================
--- daemon/gvfsbackendsmb.c (revision 2074)
+++ daemon/gvfsbackendsmb.c (revision 2075)
@@ -1381,13 +1381,8 @@ set_info_from_stat (GVfsBackendSmb *back
else
{
content_type = g_content_type_guess (basename, NULL, 0, NULL);
-
if (content_type)
- {
- icon = g_content_type_get_icon (content_type);
- if (G_IS_THEMED_ICON (icon))
- g_themed_icon_append_name (G_THEMED_ICON (icon), "text-x-generic");
- }
+ icon = g_content_type_get_icon (content_type);
}
if (content_type)
Index: daemon/gvfsdaemonutils.c
===================================================================
--- daemon/gvfsdaemonutils.c (revision 2074)
+++ daemon/gvfsdaemonutils.c (revision 2075)
@@ -276,8 +276,6 @@ gvfs_file_info_populate_content_types (G
else
{
icon = g_content_type_get_icon (mimetype);
- if (G_IS_THEMED_ICON (icon))
- g_themed_icon_append_name (G_THEMED_ICON (icon), "text-x-generic");
}
g_file_info_set_icon (info, icon);

View File

@ -0,0 +1,146 @@
Index: daemon/libsmb-compat.h
===================================================================
--- daemon/libsmb-compat.h (revision 2084)
+++ daemon/libsmb-compat.h (working copy)
@@ -94,8 +94,16 @@
const char *fname,
mode_t mode);
+typedef int (*smbc_chmod_fn)(SMBCCTX *c,
+ const char *fname,
+ mode_t mode);
+typedef int (*smbc_utimes_fn)(SMBCCTX *c,
+ const char *fname,
+ struct timeval *tbuf);
+
+
#define smbc_getOptionUserData(ctx) \
smbc_option_get (ctx, "user_data")
@@ -184,6 +192,9 @@
#define smbc_getFunctionMkdir(ctx) ctx->mkdir
+#define smbc_getFunctionChmod(ctx) ctx->chmod
+#define smbc_getFunctionUtimes(ctx) ctx->utimes
+
#endif
Index: daemon/gvfsbackendsmb.c
===================================================================
--- daemon/gvfsbackendsmb.c (revision 2084)
+++ daemon/gvfsbackendsmb.c (working copy)
@@ -1499,13 +1499,26 @@
list = g_file_attribute_info_list_new ();
- /* TODO: Add all settable attributes here */
- /*
+ /* TODO: Add all settable attributes here -- bug #559586 */
+ /* TODO: xattrs support? */
+
g_file_attribute_info_list_add (list,
- "smb:test",
- G_FILE_ATTRIBUTE_TYPE_UINT32);
- */
+ G_FILE_ATTRIBUTE_TIME_MODIFIED,
+ G_FILE_ATTRIBUTE_TYPE_UINT64,
+ G_FILE_ATTRIBUTE_INFO_COPY_WITH_FILE |
+ G_FILE_ATTRIBUTE_INFO_COPY_WHEN_MOVED);
+#if 0
+/* FIXME: disabled; despite setting is supported, it makes no sense on samba shares and
+ libsmbclient lacks proper API to return unix mode.
+ The struct stat->st_mode member is used for special Windows attributes. */
+ g_file_attribute_info_list_add (list,
+ G_FILE_ATTRIBUTE_UNIX_MODE,
+ G_FILE_ATTRIBUTE_TYPE_UINT32,
+ G_FILE_ATTRIBUTE_INFO_COPY_WITH_FILE |
+ G_FILE_ATTRIBUTE_INFO_COPY_WHEN_MOVED);
+#endif
+
g_vfs_job_query_attributes_set_list (job, list);
g_vfs_job_succeeded (G_VFS_JOB (job));
@@ -1514,6 +1527,70 @@
}
static void
+do_set_attribute (GVfsBackend *backend,
+ GVfsJobSetAttribute *job,
+ const char *filename,
+ const char *attribute,
+ GFileAttributeType type,
+ gpointer value_p,
+ GFileQueryInfoFlags flags)
+{
+ GVfsBackendSmb *op_backend;
+ char *uri;
+ int res, errsv;
+ struct timeval tbuf[2];
+ smbc_utimes_fn smbc_utimes;
+#if 0
+ smbc_chmod_fn smbc_chmod;
+#endif
+
+
+ op_backend = G_VFS_BACKEND_SMB (backend);
+
+ if (strcmp (attribute, G_FILE_ATTRIBUTE_TIME_MODIFIED) != 0
+#if 0
+ && strcmp (attribute, G_FILE_ATTRIBUTE_UNIX_MODE) != 0
+#endif
+ )
+ {
+ g_vfs_job_failed (G_VFS_JOB (job),
+ G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED,
+ _("Operation unsupported"));
+ return;
+ }
+
+ uri = create_smb_uri (op_backend->server, op_backend->share, filename);
+ res = -1;
+
+ if (strcmp (attribute, G_FILE_ATTRIBUTE_TIME_MODIFIED) == 0)
+ {
+ smbc_utimes = smbc_getFunctionUtimes (op_backend->smb_context);
+ tbuf[1].tv_sec = (*(guint64 *)value_p); /* mtime */
+ tbuf[1].tv_usec = 0;
+ /* atime = mtime (atimes are usually disabled on desktop systems) */
+ tbuf[0].tv_sec = tbuf[1].tv_sec;
+ tbuf[0].tv_usec = 0;
+ res = smbc_utimes (op_backend->smb_context, uri, &tbuf[0]);
+ }
+#if 0
+ else
+ if (strcmp (attribute, G_FILE_ATTRIBUTE_UNIX_MODE) == 0)
+ {
+ smbc_chmod = smbc_getFunctionChmod (op_backend->smb_context);
+ res = smbc_chmod (op_backend->smb_context, uri, (*(guint32 *)value_p) & 0777);
+ }
+#endif
+
+ errsv = errno;
+ g_free (uri);
+
+ if (res != 0)
+ g_vfs_job_failed_from_errno (G_VFS_JOB (job), errsv);
+ else
+ g_vfs_job_succeeded (G_VFS_JOB (job));
+}
+
+static void
do_enumerate (GVfsBackend *backend,
GVfsJobEnumerate *job,
const char *filename,
@@ -1914,6 +1991,7 @@
backend_class->make_directory = do_make_directory;
backend_class->move = do_move;
backend_class->try_query_settable_attributes = try_query_settable_attributes;
+ backend_class->set_attribute = do_set_attribute;
#ifdef HAVE_GCONF
gclient = gconf_client_get_default ();

View File

@ -1,14 +1,14 @@
Summary: Backends for the gio framework in GLib
Name: gvfs
Version: 1.0.2
Release: 3%{?dist}
Version: 1.0.3
Release: 1%{?dist}
License: LGPLv2+
Group: System Environment/Libraries
URL: http://www.gtk.org
Source: http://download.gnome.org/sources/gvfs/1.0/gvfs-%{version}.tar.bz2
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: pkgconfig
BuildRequires: glib2-devel >= 2.17.4
BuildRequires: glib2-devel >= 2.18.3
BuildRequires: dbus-glib-devel
BuildRequires: /usr/bin/ssh
BuildRequires: libcdio-devel >= 0.78.2
@ -35,11 +35,8 @@ Patch2: gvfs-obexftp-updated-apis-3.patch
# http://bugzilla.gnome.org/show_bug.cgi?id=530654
Patch4: gvfs-1.1.1-reverse-map-fuse-paths.patch
# http://bugzilla.gnome.org/show_bug.cgi?id=528320 (from svn)
Patch5: gvfs-1.0.2-no-generic-icons.patch
# https://bugzilla.redhat.com/show_bug.cgi?id=468946
Patch6: gvfs-1.0.2-guess_content_type.patch
# https://bugzilla.redhat.com/show_bug.cgi?id=461505
Patch7: gvfs-smb-timestamp-support-2.patch
%description
The gvfs package provides backend implementations for the gio
@ -124,8 +121,7 @@ media players (Media Transfer Protocol) to applications using gvfs.
%patch1 -p0 -b .archive-integration
%patch2 -p0 -b .bluez-ods
%patch4 -p1 -b .reverse-map-fuse-paths.patch
%patch5 -p0 -b .no-generic-icons
%patch6 -p0 -b .guess-content-type
%patch7 -p0 -b .smb-timestamps
%build
@ -263,6 +259,12 @@ update-desktop-database &> /dev/null ||:
%changelog
* Wed Nov 26 2008 Tomas Bzatek <tbzatek@redhat.com> - 1.0.3-1
- Update to 1.0.3
* Fri Nov 7 2008 Tomas Bzatek <tbzatek@redhat.com> - 1.0.2-4
- SMB: timestamp setting support (#461505)
* Tue Nov 4 2008 Tomas Bzatek <tbzatek@redhat.com> - 1.0.2-3
- Return an empty array on success when no content type
matches (#468946)

View File

@ -1 +1 @@
04c44757a265f787d6606655b6bbc593 gvfs-1.0.2.tar.bz2
a41e8b7d99e390cef8312f7ce5f312a5 gvfs-1.0.3.tar.bz2