Bug#396215: Confirmation and patch

Neil Moore neil at s-z.org
Thu Jan 15 07:36:08 UTC 2009

Package: libgnomevfs2-0
Version: 1:2.22.0-5
Tags: patch
Followup-For: Bug #396215

I can confirm this problem in the current version of gnome-vfs from
unstable (2.22.0-5).  A filesystem will be displayed twice (once
mounted, once unmounted) in Nautilus, the GNOME file dialog, etc. if:
 1. the FS is currently mounted;
 2. it is listed in /etc/fstab;
 3. it has the 'user' option in fstab; AND
 4. the fstab record's fs_spec uses LABEL=, refers to a symlink
    (such as /dev/disk/by-id/foo), or otherwise differs from the
    device listed in /proc/mounts.

(it might also be necessary for the user option to be listed in
/proc/mtab; I haven't tested the case where it is in fstab but
not mtab)

Two pairs of entries on my system which cause duplicates:

 LABEL=backup_ext /media/backup_ext ext3 user,noauto,noexec,nosuid,acl,user_xattr 0 0
 /dev/disk/by-label/IPOD /media/ipod vfat user,noauto,noexec,fmask=177,dmask=077 0 0

 /dev/sdb1 /media/backup_ext ext3 rw,nosuid,nodev,noexec,errors=continue,user_xattr,acl,data=ordered 0 0
 /dev/sdg2 /media/ipod vfat rw,nosuid,nodev,noexec,fmask=0177,dmask=0077,codepage=cp437,iocharset=utf8 0 0

The Debian gnome-vfs package already contains a patch
(15_uuid_mount.patch) that fixes the problem for UUID= mounts by
making the following changes:

 1. Chase symlinks that appear in fsnames in /proc/mounts (/etc/mtab).
 2. If the fsname in fstab is "UUID=foo", replace that with
    /dev/disk/by-uuid/foo and chase symlinks.
 3. If this is not a symlink, or if realpath fails, skip this
    mountpoint entirely

The attached patch, to be applied AFTER 15_uuid_mount.patch, extends
the logic for fstab further:

 4. If the fsname in fstab is "LABEL=foo", replace that with
    /dev/disk/by-label/foo (and skip the mountpoint if that
    is not a link).
 5. Always chase symlinks that appear in fstab.  This allows
    /dev/disk/by-id/foo and other symlinks to work.

thus fixing the duplicate mountpoint problem for LABEL= and symlink

This patch applies cleanly to the gnome-vfs from experimental
(2.24.0-1), but I have not tested with that version.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: gnome-vfs-fstab-label-symlink.diff
Type: text/x-diff
Size: 1568 bytes
Desc: not available
Url : http://lists.alioth.debian.org/pipermail/pkg-gnome-maintainers/attachments/20090115/844c2bb5/attachment.diff 
-------------- next part --------------

Neil Moore, neil at s-z.org, http://s-z.org/neil/

More information about the pkg-gnome-maintainers mailing list