Bug#555055: gvfs: FTBFS on hurd-i386
Samuel Thibault
sthibault at debian.org
Sun Nov 8 10:55:44 UTC 2009
Package: gvfs
Version: 1.4.1-2
Severity: important
Tags: patch
Hello,
gvfs currently FTBFS on hurd-i386 because of unconditional use of
PATH_MAX. The attached patch fixes it by just using glibc's ability to
allocate just what is required. It also actually fixes a bug for the
case when a symlink in /dev doesn't exist. It also enables the
libcdio-paranoia-dev dep which is now available on hurd-i386, and drops
the gphoto2 backends which can not yet be built on hurd-i386.
Samuel
-- System Information:
Debian Release: squeeze/sid
APT prefers testing
APT policy: (990, 'testing'), (500, 'unstable'), (500, 'stable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Kernel: Linux 2.6.31 (SMP w/2 CPU cores)
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash
Versions of packages gvfs depends on:
ii libc6 2.9-25 GNU C Library: Shared libraries
ii libdbus-1-3 1.2.16-2 simple interprocess messaging syst
ii libgconf2-4 2.28.0-1 GNOME configuration database syste
ii libglib2.0-0 2.22.2-2 The GLib library of C routines
ii libhal1 0.5.13-3 Hardware Abstraction Layer - share
ii libudev0 146-5 libudev shared library
ii x11-utils 7.4+1 X11 utilities
Versions of packages gvfs recommends:
ii dbus 1.2.16-2 simple interprocess messaging syst
pn gnome-mount | exo-utils <none> (no description available)
ii hal 0.5.13-3 Hardware Abstraction Layer
Versions of packages gvfs suggests:
ii gvfs-backends 1.4.1-2 userspace virtual filesystem - bac
-- no debconf information
--
Samuel Thibault <samuel.thibault at fnac.net>
#ifndef I_WISH_WORLD_WERE_PERFECT
/* It is not :-( All the routers (except for Linux) return only
...
-+- linux/net/ipv4/ipip.c -+-
-------------- next part --------------
--- ./monitor/hal/ghalvolumemonitor.c.orig 2009-11-08 00:15:19.000000000 +0000
+++ ./monitor/hal/ghalvolumemonitor.c 2009-11-08 00:18:53.000000000 +0000
@@ -739,11 +739,23 @@
}
else
{
- char resolved_device_path[PATH_MAX];
/* handle symlinks such as /dev/disk/by-uuid/47C2-1994 */
+#ifdef __GLIBC__
+ char *resolved_device_path;
+ resolved_device_path = realpath (device_path, NULL);
+ if (resolved_device_path != NULL &&
+ strcmp (resolved_device_path, device_file) == 0)
+ {
+ free (resolved_device_path);
+ return mount_point;
+ }
+ free (resolved_device_path);
+#else
+ char resolved_device_path[PATH_MAX];
if (realpath (device_path, resolved_device_path) != NULL &&
strcmp (resolved_device_path, device_file) == 0)
return mount_point;
+#endif
}
}
--- ./monitor/gdu/ggduvolumemonitor.c.orig 2009-11-08 00:17:33.000000000 +0000
+++ ./monitor/gdu/ggduvolumemonitor.c 2009-11-08 00:22:27.000000000 +0000
@@ -695,15 +695,27 @@
}
else
{
+ /* handle symlinks such as /dev/disk/by-uuid/47C2-1994 */
+#ifdef __GLIBC__
+ char *resolved_fstab_device_file;
+ resolved_fstab_device_file = realpath (fstab_device_file, NULL);
+ if (resolved_fstab_device_file != NULL &&
+ g_strcmp0 (resolved_fstab_device_file, device_file) == 0)
+ {
+ free (resolved_fstab_device_file);
+ goto out;
+ }
+ free(resolved_fstab_device_file);
+#else
char resolved_fstab_device_file[PATH_MAX];
- /* handle symlinks such as /dev/disk/by-uuid/47C2-1994 */
if (realpath (fstab_device_file, resolved_fstab_device_file) != NULL &&
g_strcmp0 (resolved_fstab_device_file, device_file) == 0)
{
ret = mount_point;
goto out;
}
+#endif
}
}
@@ -1384,15 +1396,29 @@
device_file = g_unix_mount_point_get_device_path (mount_point);
if (g_str_has_prefix (device_file, "/dev/"))
{
- gchar resolved_path[PATH_MAX];
GduDevice *device;
+#ifdef __GLIBC__
+ gchar *resolved_path;
+
+ /* doesn't exist */
+ resolved_path = realpath (device_file, NULL);
+ if (resolved_path == NULL) {
+ free(resolved_path);
+ continue;
+ }
+#else
+ gchar resolved_path[PATH_MAX];
/* doesn't exist */
- if (realpath (device_file, resolved_path) != 0)
+ if (realpath (device_file, resolved_path) == NULL)
continue;
+#endif
/* is handled by DKD */
device = gdu_pool_get_by_device_file (monitor->pool, resolved_path);
+#ifdef __GLIBC__
+ free(resolved_path);
+#endif
if (device != NULL)
{
g_object_unref (device);
--- debian/control.orig 2009-11-08 01:59:34.000000000 +0000
+++ debian/control 2009-11-08 01:56:45.000000000 +0000
@@ -23,7 +23,7 @@
libgconf2-dev,
libhal-dev (>= 0.5.10),
libgudev-1.0-dev (>= 001) | not+linux-gnu,
- libcdio-paranoia-dev (>= 0.78.2) | hurd,
+ libcdio-paranoia-dev (>= 0.78.2),
libbluetooth-dev (>= 4.0) | not+linux-gnu,
libdbus-glib-1-dev,
libexpat1-dev,
--- /dev/null 2007-12-29 19:47:02.000000000 +0000
+++ debian/gvfs-backends.install.hurd-i386 2009-11-08 10:28:20.000000000 +0000
@@ -0,0 +1,26 @@
+debian/tmp/usr/lib/gvfs/gvfsd-archive
+debian/tmp/usr/lib/gvfs/gvfsd-cdda
+debian/tmp/usr/lib/gvfs/gvfsd-dav
+debian/tmp/usr/lib/gvfs/gvfsd-dnssd
+debian/tmp/usr/lib/gvfs/gvfsd-ftp
+debian/tmp/usr/lib/gvfs/gvfsd-http
+debian/tmp/usr/lib/gvfs/gvfsd-network
+# Now installed from debian/rules:
+# debian/tmp/usr/lib/gvfs/gvfsd-obexftp
+debian/tmp/usr/lib/gvfs/gvfsd-sftp
+debian/tmp/usr/lib/gvfs/gvfsd-smb
+debian/tmp/usr/lib/gvfs/gvfsd-smb-browse
+debian/tmp/usr/lib/libgvfscommon-dnssd.so.*
+debian/tmp/usr/share/gvfs/mounts/archive.mount
+debian/tmp/usr/share/gvfs/mounts/cdda.mount
+debian/tmp/usr/share/gvfs/mounts/dav.mount
+debian/tmp/usr/share/gvfs/mounts/dav+sd.mount
+debian/tmp/usr/share/gvfs/mounts/dns-sd.mount
+debian/tmp/usr/share/gvfs/mounts/ftp.mount
+debian/tmp/usr/share/gvfs/mounts/http.mount
+debian/tmp/usr/share/gvfs/mounts/network.mount
+# Now installed from debian/rules:
+# debian/tmp/usr/share/gvfs/mounts/obexftp.mount
+debian/tmp/usr/share/gvfs/mounts/sftp.mount
+debian/tmp/usr/share/gvfs/mounts/smb-browse.mount
+debian/tmp/usr/share/gvfs/mounts/smb.mount
More information about the pkg-gnome-maintainers
mailing list