rpms/gvfs/devel gvfs-smb-timestamp-support-2.patch, NONE, 1.1 .cvsignore, 1.28, 1.29 gvfs.spec, 1.90, 1.91 sources, 1.28, 1.29 gvfs-1.0.2-guess_content_type.patch, 1.1, NONE gvfs-1.0.2-no-generic-icons.patch, 1.1, NONE

Tomas Bzatek tbzatek at fedoraproject.org
Wed Nov 26 11:21:44 UTC 2008


Author: tbzatek

Update of /cvs/extras/rpms/gvfs/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv19704

Modified Files:
	.cvsignore gvfs.spec sources 
Added Files:
	gvfs-smb-timestamp-support-2.patch 
Removed Files:
	gvfs-1.0.2-guess_content_type.patch 
	gvfs-1.0.2-no-generic-icons.patch 
Log Message:
* Wed Nov 26 2008 Tomas Bzatek <tbzatek at redhat.com> - 1.0.3-1
- Update to 1.0.3


gvfs-smb-timestamp-support-2.patch:

--- NEW FILE gvfs-smb-timestamp-support-2.patch ---
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 ();


Index: .cvsignore
===================================================================
RCS file: /cvs/extras/rpms/gvfs/devel/.cvsignore,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -r1.28 -r1.29
--- .cvsignore	20 Oct 2008 13:07:12 -0000	1.28
+++ .cvsignore	26 Nov 2008 11:21:12 -0000	1.29
@@ -1 +1 @@
-gvfs-1.0.2.tar.bz2
+gvfs-1.0.3.tar.bz2


Index: gvfs.spec
===================================================================
RCS file: /cvs/extras/rpms/gvfs/devel/gvfs.spec,v
retrieving revision 1.90
retrieving revision 1.91
diff -u -r1.90 -r1.91
--- gvfs.spec	4 Nov 2008 14:17:01 -0000	1.90
+++ gvfs.spec	26 Nov 2008 11:21:12 -0000	1.91
@@ -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 @@
 # 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 @@
 %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 @@
 
 
 %changelog
+* Wed Nov 26 2008 Tomas Bzatek <tbzatek at redhat.com> - 1.0.3-1
+- Update to 1.0.3
+
+* Fri Nov  7 2008 Tomas Bzatek <tbzatek at redhat.com> - 1.0.2-4
+- SMB: timestamp setting support (#461505)
+
 * Tue Nov  4 2008 Tomas Bzatek <tbzatek at redhat.com> - 1.0.2-3
 - Return an empty array on success when no content type
   matches (#468946)


Index: sources
===================================================================
RCS file: /cvs/extras/rpms/gvfs/devel/sources,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -r1.28 -r1.29
--- sources	20 Oct 2008 13:07:12 -0000	1.28
+++ sources	26 Nov 2008 11:21:13 -0000	1.29
@@ -1 +1 @@
-04c44757a265f787d6606655b6bbc593  gvfs-1.0.2.tar.bz2
+a41e8b7d99e390cef8312f7ce5f312a5  gvfs-1.0.3.tar.bz2


--- gvfs-1.0.2-guess_content_type.patch DELETED ---


--- gvfs-1.0.2-no-generic-icons.patch DELETED ---




More information about the scm-commits mailing list