summaryrefslogtreecommitdiff
path: root/sysutils
diff options
context:
space:
mode:
authorrecht <recht@pkgsrc.org>2005-01-20 21:32:11 +0000
committerrecht <recht@pkgsrc.org>2005-01-20 21:32:11 +0000
commita22373e549707f0cc11a35462ff1a913b1721587 (patch)
tree284daee3475c0f47e902464b6f9df64a04f6b90f /sysutils
parent3619089f23af574a438f9f5b40653da853328020 (diff)
downloadpkgsrc-a22373e549707f0cc11a35462ff1a913b1721587.tar.gz
- add fix for gzip-method from
http://bugzilla.gnome.org/show_bug.cgi?id=157275 (which also is in the gnome-vfs2 CVS) * modules/gzip-method.c (do_read): Return GNOME_VFS_ERROR_EOF when we reach the end of a file with the gzip method. Fixes bug 157275. - add fix for sftp-method from gnome-vfs2 CVS to make sftp URIs actually work * modules/sftp-method.c: always check gnome_vfs_unescape_string return value. * modules/sftp-method.c (do_move): honour the force_replace flag. - sync with opendarwinports and make CFLAGS.Darwin to LDFLAGS.Darwin and remove obsolute stuff (leaves only -lresolv) bump PKGREVISION to 2
Diffstat (limited to 'sysutils')
-rw-r--r--sysutils/gnome-vfs2/Makefile6
-rw-r--r--sysutils/gnome-vfs2/distinfo4
-rw-r--r--sysutils/gnome-vfs2/patches/patch-au225
-rw-r--r--sysutils/gnome-vfs2/patches/patch-av15
4 files changed, 246 insertions, 4 deletions
diff --git a/sysutils/gnome-vfs2/Makefile b/sysutils/gnome-vfs2/Makefile
index b9ada7f72b2..e843f42dd94 100644
--- a/sysutils/gnome-vfs2/Makefile
+++ b/sysutils/gnome-vfs2/Makefile
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.43 2005/01/11 12:32:53 jmmv Exp $
+# $NetBSD: Makefile,v 1.44 2005/01/20 21:32:11 recht Exp $
#
-PKGREVISION= 1
+PKGREVISION= 2
PKGCONFIG_OVERRIDE= gnome-vfs-2.0.pc.in
PKGCONFIG_OVERRIDE+= gnome-vfs-module-2.0.pc.in
@@ -24,7 +24,7 @@ GCONF2_SCHEMAS+= system_dns_sd.schemas
GCONF2_SCHEMAS+= system_http_proxy.schemas
GCONF2_SCHEMAS+= system_smb.schemas
-CFLAGS.Darwin+= -flat_namespace -undefined suppress -lresolv
+LDFLAGS.Darwin+= -lresolv
.include "Makefile.common"
diff --git a/sysutils/gnome-vfs2/distinfo b/sysutils/gnome-vfs2/distinfo
index a73e0421172..4361e2c2c60 100644
--- a/sysutils/gnome-vfs2/distinfo
+++ b/sysutils/gnome-vfs2/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.29 2005/01/11 12:32:53 jmmv Exp $
+$NetBSD: distinfo,v 1.30 2005/01/20 21:32:11 recht Exp $
SHA1 (gnome-vfs-2.8.3.tar.bz2) = 263dc88bfb18ac5bb917124bbc8278b3f5352688
Size (gnome-vfs-2.8.3.tar.bz2) = 1907154 bytes
@@ -17,3 +17,5 @@ SHA1 (patch-aq) = 1d5ed4d6c1b3a282e68bedf6892fa8a9678ea39b
SHA1 (patch-ar) = 99c99d0d90ed7a0d804b349f532d3a17c780d506
SHA1 (patch-as) = 1ac0cc66541c1e7ce62d205a05cc6cb446cec39d
SHA1 (patch-at) = b75ad2f2accb0ca8986f8c4e2771028fceca41b4
+SHA1 (patch-au) = 12cbe2cc02b436f8f1c4afed5be34bddc23e7e8f
+SHA1 (patch-av) = 689114a36fa78dc2216a763eee597e5c61d269a5
diff --git a/sysutils/gnome-vfs2/patches/patch-au b/sysutils/gnome-vfs2/patches/patch-au
new file mode 100644
index 00000000000..a152347281b
--- /dev/null
+++ b/sysutils/gnome-vfs2/patches/patch-au
@@ -0,0 +1,225 @@
+$NetBSD: patch-au,v 1.1 2005/01/20 21:32:11 recht Exp $
+
+--- modules/sftp-method.c.orig Tue Sep 21 14:58:00 2004
++++ modules/sftp-method.c Thu Jan 20 20:30:05 2005
+@@ -162,7 +162,6 @@
+ GnomeVFSResult *status);
+
+
+-
+ static guint inited_buffers = 0;
+
+ typedef struct
+@@ -647,8 +646,6 @@
+ }
+ }
+
+-
+-
+ static GnomeVFSResult
+ sftp_status_to_vfs_result (guint status)
+ {
+@@ -677,7 +674,6 @@
+ }
+
+
+-
+ /* Derived from OpenSSH, sftp-client.c:get_status */
+
+ static GnomeVFSResult
+@@ -844,8 +840,6 @@
+ buffer_free (&msg);
+ }
+
+-
+-
+ static char*
+ get_user_from_uri_or_password_line (const GnomeVFSURI *uri,
+ const char *password_line)
+@@ -904,8 +898,6 @@
+ return g_strdup ("password");
+ }
+
+-
+-
+ static gboolean
+ invoke_fill_auth (const GnomeVFSURI *uri,
+ const char *password_line,
+@@ -1702,8 +1694,6 @@
+ }
+ }
+
+-
+-
+ /* Portions of the below functions inspired by functions in OpenSSH sftp-client.c */
+
+ static GnomeVFSResult
+@@ -1769,8 +1759,6 @@
+ return GNOME_VFS_OK;
+ }
+
+-
+-
+ static GnomeVFSResult
+ do_open (GnomeVFSMethod *method,
+ GnomeVFSMethodHandle **method_handle,
+@@ -1796,6 +1784,8 @@
+ if (res != GNOME_VFS_OK) return res;
+
+ path = gnome_vfs_unescape_string (gnome_vfs_uri_get_path (uri), NULL);
++ if (path == NULL)
++ return GNOME_VFS_ERROR_INVALID_URI;
+
+ id = sftp_connection_get_id (conn);
+
+@@ -1872,6 +1862,8 @@
+ if (res != GNOME_VFS_OK) return res;
+
+ path = gnome_vfs_unescape_string (gnome_vfs_uri_get_path (uri), NULL);
++ if (path == NULL)
++ return GNOME_VFS_ERROR_INVALID_URI;
+
+ id = sftp_connection_get_id (conn);
+
+@@ -2326,6 +2318,8 @@
+ if (res != GNOME_VFS_OK) return res;
+
+ path = gnome_vfs_unescape_string (gnome_vfs_uri_get_path (uri), NULL);
++ if (path == NULL)
++ return GNOME_VFS_ERROR_INVALID_URI;
+
+ if (options & GNOME_VFS_FILE_INFO_FOLLOW_LINKS) {
+ res = get_real_path (conn, path, &real_path);
+@@ -2434,6 +2428,8 @@
+ id = sftp_connection_get_id (conn);
+
+ path = gnome_vfs_unescape_string (gnome_vfs_uri_get_path (uri), NULL);
++ if (path == NULL)
++ return GNOME_VFS_ERROR_INVALID_URI;
+
+ /* If the path is empty (i.e. root directory), then give it the root directory explicitly */
+ if (!strcmp (path, "")) {
+@@ -2673,6 +2669,9 @@
+ id = sftp_connection_get_id (conn);
+
+ path = gnome_vfs_unescape_string (gnome_vfs_uri_get_path (uri), NULL);
++ if (path == NULL)
++ return GNOME_VFS_ERROR_INVALID_URI;
++
+ memset (&info, 0, sizeof (GnomeVFSFileInfo));
+ iobuf_send_string_request_with_file_info (conn->out_fd, id, SSH2_FXP_MKDIR,
+ path, strlen (path), &info,
+@@ -2688,7 +2687,6 @@
+ return res;
+ }
+
+-
+ static GnomeVFSResult
+ do_remove_directory (GnomeVFSMethod *method,
+ GnomeVFSURI *uri,
+@@ -2705,6 +2703,9 @@
+ id = sftp_connection_get_id (conn);
+
+ path = gnome_vfs_unescape_string (gnome_vfs_uri_get_path (uri), NULL);
++ if (path == NULL)
++ return GNOME_VFS_ERROR_INVALID_URI;
++
+ iobuf_send_string_request (conn->out_fd, id, SSH2_FXP_RMDIR, path, strlen (path));
+
+ g_free (path);
+@@ -2738,10 +2739,27 @@
+ buffer_init (&msg);
+
+ old_path = gnome_vfs_unescape_string (gnome_vfs_uri_get_path (old_uri), NULL);
++ if (old_path == NULL)
++ return GNOME_VFS_ERROR_INVALID_URI;
++
+ new_path = gnome_vfs_unescape_string (gnome_vfs_uri_get_path (new_uri), NULL);
++ if (new_path == NULL)
++ return GNOME_VFS_ERROR_INVALID_URI;
+
+ id = sftp_connection_get_id (conn);
+
++ /* if force_replace is specified, try to remove new_uri */
++ if (force_replace) {
++ iobuf_send_string_request (conn->out_fd,
++ id,
++ SSH2_FXP_REMOVE,
++ new_path,
++ strlen (new_path));
++ res = iobuf_read_result (conn->in_fd, id);
++ if (res != GNOME_VFS_OK && res != GNOME_VFS_ERROR_NOT_FOUND)
++ goto bail;
++ }
++
+ buffer_write_gchar (&msg, SSH2_FXP_RENAME);
+ buffer_write_gint32 (&msg, id);
+ buffer_write_string (&msg, old_path);
+@@ -2749,11 +2767,12 @@
+ buffer_send (&msg, conn->out_fd);
+ buffer_free (&msg);
+
++ res = iobuf_read_result (conn->in_fd, id);
++
++ bail:
+ g_free (old_path);
+ g_free (new_path);
+
+- res = iobuf_read_result (conn->in_fd, id);
+-
+ sftp_connection_unref (conn);
+ sftp_connection_unlock (conn);
+
+@@ -2781,8 +2800,15 @@
+ buffer_init (&msg);
+
+ old_path = gnome_vfs_unescape_string (gnome_vfs_uri_get_path (old_uri), NULL);
++ if (old_path == NULL)
++ return GNOME_VFS_ERROR_INVALID_URI;
++
+ old_dirname = g_path_get_dirname (old_path);
++
+ new_path = g_build_filename (old_dirname, new_name, NULL);
++ if (new_path == NULL)
++ return GNOME_VFS_ERROR_INVALID_URI;
++
+ g_free (old_dirname);
+
+ id = sftp_connection_get_id (conn);
+@@ -2821,6 +2847,9 @@
+ id = sftp_connection_get_id (conn);
+
+ path = gnome_vfs_unescape_string (gnome_vfs_uri_get_path (uri), NULL);
++ if (path == NULL)
++ return GNOME_VFS_ERROR_INVALID_URI;
++
+ iobuf_send_string_request (conn->out_fd, id, SSH2_FXP_REMOVE, path, strlen (path));
+
+ g_free (path);
+@@ -2890,6 +2919,9 @@
+ id = sftp_connection_get_id (conn);
+
+ path = gnome_vfs_unescape_string (gnome_vfs_uri_get_path (uri), NULL);
++ if (path == NULL)
++ return GNOME_VFS_ERROR_INVALID_URI;
++
+ iobuf_send_string_request_with_file_info (conn->out_fd, id, SSH2_FXP_SETSTAT,
+ path, strlen (path), info, mask);
+
+@@ -2933,6 +2965,8 @@
+ buffer_init (&msg);
+
+ path = gnome_vfs_unescape_string (gnome_vfs_uri_get_path (uri), NULL);
++ if (path == NULL)
++ return GNOME_VFS_ERROR_INVALID_URI;
+
+ id = sftp_connection_get_id (conn);
+
+@@ -2953,7 +2987,6 @@
+ return res;
+ }
+
+-
+
+ static GnomeVFSMethod method = {
+ sizeof (GnomeVFSMethod),
diff --git a/sysutils/gnome-vfs2/patches/patch-av b/sysutils/gnome-vfs2/patches/patch-av
new file mode 100644
index 00000000000..5711f2fd5a6
--- /dev/null
+++ b/sysutils/gnome-vfs2/patches/patch-av
@@ -0,0 +1,15 @@
+$NetBSD: patch-av,v 1.1 2005/01/20 21:32:11 recht Exp $
+
+http://bugzilla.gnome.org/show_bug.cgi?id=157275
+
+--- modules/gzip-method.c.orig Thu Jan 20 21:33:30 2005
++++ modules/gzip-method.c Thu Jan 20 21:33:36 2005
+@@ -621,7 +621,7 @@
+ if (gzip_handle->last_z_result != Z_OK) {
+ if (gzip_handle->last_z_result == Z_STREAM_END) {
+ *bytes_read = 0;
+- return GNOME_VFS_OK;
++ return GNOME_VFS_ERROR_EOF;
+ } else
+ return result_from_z_result (gzip_handle->last_z_result);
+ } else if (gzip_handle->last_vfs_result != GNOME_VFS_OK) {