[Usbmount-commit] r47 - in usbmount: tags tags/0.0.17 tags/0.0.17/debian trunk trunk/debian

Rogério Brito rbrito-guest at alioth.debian.org
Fri May 1 11:40:38 UTC 2009


Author: rbrito-guest
Date: 2009-05-01 11:40:38 +0000 (Fri, 01 May 2009)
New Revision: 47

Added:
   usbmount/tags/0.0.17/
Modified:
   usbmount/tags/0.0.17/README
   usbmount/tags/0.0.17/debian/changelog
   usbmount/tags/0.0.17/debian/control
   usbmount/tags/0.0.17/debian/copyright
   usbmount/tags/0.0.17/debian/postrm
   usbmount/tags/0.0.17/debian/preinst
   usbmount/tags/0.0.17/usbmount
   usbmount/tags/0.0.17/usbmount.conf
   usbmount/trunk/README
   usbmount/trunk/debian/changelog
   usbmount/trunk/debian/control
   usbmount/trunk/debian/copyright
   usbmount/trunk/debian/postrm
   usbmount/trunk/debian/preinst
   usbmount/trunk/usbmount
   usbmount/trunk/usbmount.conf
Log:
New version of usbmount, with many documentation updates.


Modified: usbmount/tags/0.0.17/README
===================================================================
--- usbmount/trunk/README	2008-10-19 18:46:23 UTC (rev 46)
+++ usbmount/tags/0.0.17/README	2009-05-01 11:40:38 UTC (rev 47)
@@ -1,3 +1,4 @@
+========
 USBmount
 ========
 
@@ -2,4 +3,4 @@
 The USBmount package automatically mounts USB mass storage devices
-(typically USB pens) when they are plugged in, and unmounts them when
-they are removed. The mountpoints (/media/usb[0-7] by default),
+(typically USB pen drives) when they are plugged in, and unmounts them
+when they are removed. The mountpoints (/media/usb[0-7] by default),
 filesystem types to consider, and mount options are configurable. When
@@ -20,25 +21,107 @@
 The comments in the configuration file /etc/usbmount/usbmount.conf
 describe how to configure the package.
 
+Generic Comments about Flash Drives
+===================================
 
-Vfat Filesystems
-----------------
+Users should be aware that, independently of the filesystem used by the
+mass storage device, *ANY* filesystem that resides in flash memory will
+become unreadable after some time. This unfortunate situation is
+intrinsic to the storage medium and better quality flash drives perform
+a "wear levelling" operation, distributing the load of operations across
+the whole device. [*]
 
-Filesystems of type vfat are not considered by default, despite being
-popular for many USB devices, because the Linux kernel does not yet
-fully implement sync-mounting for this filesystem type. This means that
-you risk losing data or even corrupting the filesystem if you remove the
-medium before all data has been written to it. If you include vfat in
-the FILESYSTEMS configuration variable, you *MUST* run the 'sync'
-command before removing the device.
+Filesystems using flash memory and mounted with the "sync" option can
+degrade earlier due to the fact that the sync mount option forces the
+operating system to write data more frequently to the device than if it
+were mounted without the sync option.
 
-A useful configuration for vfat filesystems is to include a string like
--fstype=vfat,gid=floppy,dmask=0007,fmask=0117 in the FS_MOUNTOPTIONS
-variable. These mount options have the effect that members of the floppy
-group can read from and write to the medium, but nobody else can access
-it.
+So, why mount filesystems with the sync option then? The reason is to
+keep the written data on the drive reflecting what the user thinks is on
+the flash drive, and, more importantly, to avoid the problem of the user
+unplugging the device before it is finished receiving data that the
+kernel has on the memory of the computer and that is meant to be written
+to the device.
 
+If you don't like the sync option with your filesystems, then you can
+remove it from the configuration file of usbmount and use your devices
+with better performance and longer life time. *BUT* you should always
+make sure that you use the "sync" command (on a shell) to ensure that
+there is no writes pending for the device in question, so that you don't
+loose any data when you unplug the device from the computer.
 
+[*] You can see if your flash drives support wear levelling by seeing
+    the technical specifications of your specific drives in the
+    manufacturer's site (e.g., the manufacturer Kingston provides such
+    information regarding its drives and others quite probably do that
+    too).
+
+Of course, usbmount doesn't only work with flash drives. Common hard
+drives put into enclosures are perfectly used with usbmount and
+usbmount, despite its name, can mount drives connected via Firewire
+ports, provided that the kernel has support for it (most distribution
+kernels, including the ones shipped with Debian and Ubuntu do).
+
+
+Technical Recommendations
+=========================
+
+Control of Filesystems Mounted by USBmount
+------------------------------------------
+
+You can choose which filesystems you want usbmount to automatically
+handle by listing the filesystem types provided by the operating system
+in the configuration variable FILESYSTEMS.
+
+Recommendations for vfat Filesystems
+------------------------------------
+
+The vfat filesystem is one of the most commonly used filesystems in pen
+drives. Unfortunately, due to its age, it is very poor regarding
+features and, in particular, it doesn't feature the most basic access
+control present in Unix systems, namely: permissions on files.
+
+Linux works around this by creating "virtual" permissions and
+restrictions based on who mounted the filesystem. As usbmount is used,
+the user assigned to the vfat filesystem is, by default, root.
+
+For a more flexible configuration, some useful options for vfat
+filesystems are to specify explicitly who the user and permissions are.
+Please, read the manpage of the mount command to get details.
+
+An example is to specify "-fstype=vfat,gid=floppy,dmask=0007,fmask=0117"
+in the FS_MOUNTOPTIONS variable of the configuration file. The
+particular options specified in the example mean that members of the
+floppy group can read from and write to the medium, but nobody else can
+access it.
+
+Troubleshooting USBmount
+------------------------
+
+No software is free of problems and the situation isn't different with
+USBmount. To ease the troubleshooting of problems, you may try to check
+the following:
+
+* Do you have HAL running? Any GNOME or KDE daemon automounting devices?
+
+* Let's suppose that the partition containing the filesystem that you
+  want USBmount to automatically handle is /dev/sda1 (your case may,
+  quite possibly, vary). Then, check the result of the following
+  command:
+
+  udevadm test --action=add /sys/class/block/sda1
+
+  The command above just gives diagnostics of what USBmount would do
+  with the device, but it doesn't actually mount or interfere with the
+  device. It is intended for debugging purposes. Be careful that it
+  generates *a lot* of output. Many screens, depending on the device.
+
+* Under the same assumptions as the above, another good diagnostic tool
+  is the following:
+
+  udevadm info -a -p $(udevadm info -q path -n /dev/sdb1)
+
+
 Hook Scripts
 ------------
 

Modified: usbmount/tags/0.0.17/debian/changelog
===================================================================
--- usbmount/trunk/debian/changelog	2008-10-19 18:46:23 UTC (rev 46)
+++ usbmount/tags/0.0.17/debian/changelog	2009-05-01 11:40:38 UTC (rev 47)
@@ -1,9 +1,29 @@
-usbmount (0.0.16.1) UNRELEASED; urgency=low
+usbmount (0.0.17) unstable; urgency=low
 
-  [ Rafael Laboissiere ]
-  * debian/control: Add my name o the list of Uploaders
+  * The "More Documentation, Please" release.
+  * debian/NEWS: create an intructive documentation file.
+  * debian/README:
+    + include more verbose instructive documentation. Closes: #502583.
+    + remove outdated information on vfat filesystms.
+    + mention that the package supports Firewire devices too.
+    + restructure the document a little.
+    + include brief instructions on troubleshooting usbmount behaviour.
+  * debian/{preinst,postrm}: remove legacy code.
+  * debian/control:
+    + include misc-depends on usbmount binary.
+    + update standards version to 3.8.1.
+    + mention that firewire is supported too in the long description.
+  * usbmount:
+    + respect entries already in /etc/fstab. Closes: #350633.
+      (Tks Joachim Breitner)
+    + use fine grained locking for devices. Closes: #403209.
+      (Tks Richard Atterer)
+  * usbmount.conf:
+    + comment heavily. Closes: #337483.
+      (Tks January Weiner, Jari Eskelinen)
+    + include vfat and hfsplus filesystems to be automounted.
 
- -- Rafael Laboissiere <rafael at debian.org>  Sun, 19 Oct 2008 20:44:32 +0200
+ -- Rogério Brito <rbrito at ime.usp.br>  Thu, 30 Apr 2009 19:52:59 -0300
 
 usbmount (0.0.16) unstable; urgency=low
 

Modified: usbmount/tags/0.0.17/debian/control
===================================================================
--- usbmount/trunk/debian/control	2008-10-19 18:46:23 UTC (rev 46)
+++ usbmount/tags/0.0.17/debian/control	2009-05-01 11:40:38 UTC (rev 47)
@@ -7,12 +7,12 @@
 Vcs-Browser: http://svn.debian.org/wsvn/usbmount
 DM-Upload-Allowed: yes
 Uploaders: Rafael Laboissiere <rafael at debian.org>
-Standards-Version: 3.8.0
+Standards-Version: 3.8.1
 Homepage: http://usbmount.alioth.debian.org/
 
 Package: usbmount
 Architecture: all
-Depends: udev, lockfile-progs
+Depends: udev, lockfile-progs, ${misc:Depends}
 Description: automatically mount and unmount USB mass storage devices
  This package automatically mounts USB mass storage devices (typically
  USB pens) when they are plugged in, and unmounts them when they are
@@ -26,6 +26,8 @@
  The script that does the (un)mounting is called by the udev daemon.
  Therefore, USBmount requires a 2.6 (or newer) kernel.
  .
+ Firewire devices are also supported by USBmount.
+ .
  USBmount is intended as a lightweight solution which is independent of
  a desktop environment. Users which would like an icon to appear when an
  USB device is plugged in should use the pmount and hal packages

Modified: usbmount/tags/0.0.17/debian/copyright
===================================================================
--- usbmount/trunk/debian/copyright	2008-10-19 18:46:23 UTC (rev 46)
+++ usbmount/tags/0.0.17/debian/copyright	2009-05-01 11:40:38 UTC (rev 47)
@@ -17,6 +17,18 @@
   even the implied warranty of MERCHANTABILITY or FITNESS FOR A
   PARTICULAR PURPOSE.
 
+Files: *
+Copyright: © 2009 Rogério Brito <rbrito at zero-based.org>
+License: BSD-2
+  This package is free software; the copyright holder gives unlimited
+  permission to copy and/or distribute it, with or without
+  modifications, as long as this notice is preserved.
+
+  This package is distributed in the hope that it will be useful,
+  but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+  even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+  PARTICULAR PURPOSE.
+
 Files: debian/*
 Copyright: © 2004, 2005, 2006, 2007 Martin Dickopp <martin at zero-based.org>
 License: BSD-2
@@ -30,7 +42,7 @@
   PARTICULAR PURPOSE.
 
 Files: debian/*
-Copyright: © 2008 Rogério Brito <rbrito at ime.usp.br>
+Copyright: © 2008, 2009 Rogério Brito <rbrito at ime.usp.br>
 License: BSD-2
   This package is free software; the copyright holder gives unlimited
   permission to copy and/or distribute it, with or without

Modified: usbmount/tags/0.0.17/debian/postrm
===================================================================
--- usbmount/trunk/debian/postrm	2008-10-19 18:46:23 UTC (rev 46)
+++ usbmount/tags/0.0.17/debian/postrm	2009-05-01 11:40:38 UTC (rev 47)
@@ -1,20 +1,6 @@
 #!/bin/sh
 set -e
 
-# If an upgrade from a version before 0.0.10 is aborted
-# and /etc/usbmount.conf has already been moved to
-# /etc/usbmount/usbmount.conf, move it back.
-if test "$1" = abort-upgrade || test "$1" = abort-install; then
-    if test -n "$2" && dpkg --compare-versions "$2" lt 0.0.10; then
-	if test -f /etc/usbmount/usbmount.conf 	&& ! test -e /etc/usbmount.conf; then
-	    mv /etc/usbmount/usbmount.conf /etc/usbmount.conf
-	fi
-	if test -d /etc/usbmount; then
-	    rmdir /etc/usbmount || :
-	fi
-    fi
-fi
-
 # If the package is removed or installing is aborted, try to remove the
 # default mountpoints. Failure to do so is not considered fatal.
 if test "$1" = remove || test "$1" = abort-install; then

Modified: usbmount/tags/0.0.17/debian/preinst
===================================================================
--- usbmount/trunk/debian/preinst	2008-10-19 18:46:23 UTC (rev 46)
+++ usbmount/tags/0.0.17/debian/preinst	2009-05-01 11:40:38 UTC (rev 47)
@@ -1,18 +1,6 @@
 #!/bin/sh
 set -e
 
-# If the package is upgraded from a version before 0.0.10,
-# move /etc/usbmount.conf to /etc/usbmount/usbmount.conf.
-if test "$1" = upgrade || test "$1" = install; then
-    if test -n "$2" && dpkg --compare-versions "$2" lt 0.0.10 \
-	&& test -f /etc/usbmount.conf \
-	&& ! test -e /etc/usbmount/usbmount.conf; then
-	test -d /etc/usbmount || mkdir /etc/usbmount
-	echo Moving /etc/usbmount.conf to /etc/usbmount/usbmount.conf ...
-	mv /etc/usbmount.conf /etc/usbmount/usbmount.conf
-    fi
-fi
-
 # If the package is installed, try to create the default mountpoints.
 # Failure to do so is not considered fatal.
 if test "$1" = install; then

Modified: usbmount/tags/0.0.17/usbmount
===================================================================
--- usbmount/trunk/usbmount	2008-10-19 18:46:23 UTC (rev 46)
+++ usbmount/tags/0.0.17/usbmount	2009-05-01 11:40:38 UTC (rev 47)
@@ -2,7 +2,7 @@
 # This script mounts USB mass storage devices when they are plugged in
 # and unmounts them when they are removed.
 # Copyright (C) 2004, 2005 Martin Dickopp
-# Copyright (C) 2008 Rogério Brito
+# Copyright (C) 2008, 2009 Rogério Brito
 #
 # This file is free software; the copyright holder gives unlimited
 # permission to copy and/or distribute it, with or without
@@ -59,19 +59,21 @@
     exit 0
 fi
 
-# Create /var/run/usbmount/ if it does not exist.
-test -e /var/run/usbmount/ || mkdir /var/run/usbmount/
+# Per Policy 9.3.2, directories under /var/run/usbmount have to be checked
+# after every reboot.
+test -e /var/run/usbmount || mkdir /var/run/usbmount
 
 umask 022
 
 if test "$1" = add; then
 
     # Acquire lock.
-    log debug "trying to acquire lock /var/run/usbmount/.mount.lock"
-    lockfile-create --retry 3 /var/run/usbmount/.mount || \
-	{ log err "cannot acquire lock /var/run/usbmount/.mount.lock"; exit 1; }
-    trap '( lockfile-remove /var/run/usbmount/.mount )' 0
-    log debug "acquired lock /var/run/usbmount/.mount.lock"
+    LOCKFILE=/var/run/usbmount/.mount`echo "$DEVNAME" | sed 's%[^a-z0-9_]%-%g'`
+    log debug "trying to acquire lock $LOCKFILE.lock"
+    lockfile-create --retry 3 $LOCKFILE ||
+	{ log err "cannot acquire lock $LOCKFILE.lock"; exit 1; }
+    trap '( lockfile-remove $LOCKFILE )' 0
+    log debug "acquired lock $LOCKFILE.lock"
 
     # Try to read from the device.  Some devices need a few seconds
     # initialization time before they can be accessed.  Give up after
@@ -92,10 +94,19 @@
 	exit 1
     fi
 
+    # Test if the device has an /etc/fstab entry. In that case, we will
+    # mount it using the regular mount command.
+    if grep -q "^[ 	]*$DEVNAME" /etc/fstab; then
+        log debug "$DEVNAME has an /dev/fstab entry, using that"
+
+	# Mount the filesystem.
+	log info "executing command: mount $DEVNAME"
+	mount "$DEVNAME"
+
     # Test if the device contains a filesystem.  If it doesn't, no
     # further action is required, but calling vol_id has the side effect
     # that the partition table is read and partition devices are created.
-    if /lib/udev/vol_id "$DEVNAME" | egrep -q '^ID_FS_USAGE=(filesystem|disklabel)$'; then
+    elif /lib/udev/vol_id "$DEVNAME" | egrep -q '^ID_FS_USAGE=(filesystem|disklabel)$'; then
 	log debug "$DEVNAME contains a filesystem or disklabel"
 
 	fstype="`/lib/udev/vol_id -t \"$DEVNAME\"`"

Modified: usbmount/tags/0.0.17/usbmount.conf
===================================================================
--- usbmount/trunk/usbmount.conf	2008-10-19 18:46:23 UTC (rev 46)
+++ usbmount/tags/0.0.17/usbmount.conf	2009-05-01 11:40:38 UTC (rev 47)
@@ -14,25 +14,32 @@
 
 # Filesystem types: USB mass storage devices are only mounted if they
 # contain a filesystem type which is in this list.
+FILESYSTEMS="vfat ext2 ext3 hfsplus"
+
 #############################################################################
-# WARNING!  The vfat filesystem does not yet fully implement sync-mounting. #
-# If you include "vfat" in the list of filesystem types, you *MUST* make    #
-# sure all data is written to the medium before you remove it (e.g. run the #
-# "sync" command in a terminal window).  Otherwise, you *WILL* lose data!   #
+# WARNING!                                                                  #
+# The "sync" option may not be a good choice to use with USB flash drives,  #
+# as it slows down the writing speed considerably and also leads to a much  #
+# faster wear out of the disk.                                              #
+# If you omit it, don't forget to use the command "sync" to synchronize     #
+# the data on your hard disk before removing the drive or you may           #
+# experience data loss.                                                     #
 #############################################################################
-FILESYSTEMS="ext2 ext3"
-
 # Mount options: Options passed to the mount command with the -o flag.
-# WARNING!  Removing "sync" from the options is a very bad idea and
-# might result in severe data loss.
+# See the warning above regarding removing "sync" from the options, as
+# it may lead to data loss.
 MOUNTOPTIONS="sync,noexec,nodev,noatime"
 
-# Filesystem type specific mount options: This variable contains a space sepa-
-# rated list of strings, each of which has the form "-fstype=TYPE,OPTIONS".
+# Filesystem type specific mount options: This variable contains a space
+# separated list of strings, each which the form "-fstype=TYPE,OPTIONS".
+#
 # If a filesystem with a type listed here is mounted, the corresponding
 # options are appended to those specificed in the MOUNTOPTIONS variable.
-# For example, "-fstype=vfat,gid=floppy,dmask=0007,fmask=0117" would add the
-# options "gid=floppy,dmask=0007,fmask=0117" when a vfat filesystem is mounted.
+#
+# For example, "-fstype=vfat,gid=floppy,dmask=0007,fmask=0117" would add
+# the options "gid=floppy,dmask=0007,fmask=0117" when a vfat filesystem
+# is mounted.
+
 FS_MOUNTOPTIONS=""
 
 # If set to "yes", more information will be logged via the syslog

Modified: usbmount/trunk/README
===================================================================
--- usbmount/trunk/README	2008-10-19 18:46:23 UTC (rev 46)
+++ usbmount/trunk/README	2009-05-01 11:40:38 UTC (rev 47)
@@ -1,3 +1,4 @@
+========
 USBmount
 ========
 
@@ -2,4 +3,4 @@
 The USBmount package automatically mounts USB mass storage devices
-(typically USB pens) when they are plugged in, and unmounts them when
-they are removed. The mountpoints (/media/usb[0-7] by default),
+(typically USB pen drives) when they are plugged in, and unmounts them
+when they are removed. The mountpoints (/media/usb[0-7] by default),
 filesystem types to consider, and mount options are configurable. When
@@ -20,25 +21,107 @@
 The comments in the configuration file /etc/usbmount/usbmount.conf
 describe how to configure the package.
 
+Generic Comments about Flash Drives
+===================================
 
-Vfat Filesystems
-----------------
+Users should be aware that, independently of the filesystem used by the
+mass storage device, *ANY* filesystem that resides in flash memory will
+become unreadable after some time. This unfortunate situation is
+intrinsic to the storage medium and better quality flash drives perform
+a "wear levelling" operation, distributing the load of operations across
+the whole device. [*]
 
-Filesystems of type vfat are not considered by default, despite being
-popular for many USB devices, because the Linux kernel does not yet
-fully implement sync-mounting for this filesystem type. This means that
-you risk losing data or even corrupting the filesystem if you remove the
-medium before all data has been written to it. If you include vfat in
-the FILESYSTEMS configuration variable, you *MUST* run the 'sync'
-command before removing the device.
+Filesystems using flash memory and mounted with the "sync" option can
+degrade earlier due to the fact that the sync mount option forces the
+operating system to write data more frequently to the device than if it
+were mounted without the sync option.
 
-A useful configuration for vfat filesystems is to include a string like
--fstype=vfat,gid=floppy,dmask=0007,fmask=0117 in the FS_MOUNTOPTIONS
-variable. These mount options have the effect that members of the floppy
-group can read from and write to the medium, but nobody else can access
-it.
+So, why mount filesystems with the sync option then? The reason is to
+keep the written data on the drive reflecting what the user thinks is on
+the flash drive, and, more importantly, to avoid the problem of the user
+unplugging the device before it is finished receiving data that the
+kernel has on the memory of the computer and that is meant to be written
+to the device.
 
+If you don't like the sync option with your filesystems, then you can
+remove it from the configuration file of usbmount and use your devices
+with better performance and longer life time. *BUT* you should always
+make sure that you use the "sync" command (on a shell) to ensure that
+there is no writes pending for the device in question, so that you don't
+loose any data when you unplug the device from the computer.
 
+[*] You can see if your flash drives support wear levelling by seeing
+    the technical specifications of your specific drives in the
+    manufacturer's site (e.g., the manufacturer Kingston provides such
+    information regarding its drives and others quite probably do that
+    too).
+
+Of course, usbmount doesn't only work with flash drives. Common hard
+drives put into enclosures are perfectly used with usbmount and
+usbmount, despite its name, can mount drives connected via Firewire
+ports, provided that the kernel has support for it (most distribution
+kernels, including the ones shipped with Debian and Ubuntu do).
+
+
+Technical Recommendations
+=========================
+
+Control of Filesystems Mounted by USBmount
+------------------------------------------
+
+You can choose which filesystems you want usbmount to automatically
+handle by listing the filesystem types provided by the operating system
+in the configuration variable FILESYSTEMS.
+
+Recommendations for vfat Filesystems
+------------------------------------
+
+The vfat filesystem is one of the most commonly used filesystems in pen
+drives. Unfortunately, due to its age, it is very poor regarding
+features and, in particular, it doesn't feature the most basic access
+control present in Unix systems, namely: permissions on files.
+
+Linux works around this by creating "virtual" permissions and
+restrictions based on who mounted the filesystem. As usbmount is used,
+the user assigned to the vfat filesystem is, by default, root.
+
+For a more flexible configuration, some useful options for vfat
+filesystems are to specify explicitly who the user and permissions are.
+Please, read the manpage of the mount command to get details.
+
+An example is to specify "-fstype=vfat,gid=floppy,dmask=0007,fmask=0117"
+in the FS_MOUNTOPTIONS variable of the configuration file. The
+particular options specified in the example mean that members of the
+floppy group can read from and write to the medium, but nobody else can
+access it.
+
+Troubleshooting USBmount
+------------------------
+
+No software is free of problems and the situation isn't different with
+USBmount. To ease the troubleshooting of problems, you may try to check
+the following:
+
+* Do you have HAL running? Any GNOME or KDE daemon automounting devices?
+
+* Let's suppose that the partition containing the filesystem that you
+  want USBmount to automatically handle is /dev/sda1 (your case may,
+  quite possibly, vary). Then, check the result of the following
+  command:
+
+  udevadm test --action=add /sys/class/block/sda1
+
+  The command above just gives diagnostics of what USBmount would do
+  with the device, but it doesn't actually mount or interfere with the
+  device. It is intended for debugging purposes. Be careful that it
+  generates *a lot* of output. Many screens, depending on the device.
+
+* Under the same assumptions as the above, another good diagnostic tool
+  is the following:
+
+  udevadm info -a -p $(udevadm info -q path -n /dev/sdb1)
+
+
 Hook Scripts
 ------------
 

Modified: usbmount/trunk/debian/changelog
===================================================================
--- usbmount/trunk/debian/changelog	2008-10-19 18:46:23 UTC (rev 46)
+++ usbmount/trunk/debian/changelog	2009-05-01 11:40:38 UTC (rev 47)
@@ -1,9 +1,29 @@
-usbmount (0.0.16.1) UNRELEASED; urgency=low
+usbmount (0.0.17) unstable; urgency=low
 
-  [ Rafael Laboissiere ]
-  * debian/control: Add my name o the list of Uploaders
+  * The "More Documentation, Please" release.
+  * debian/NEWS: create an intructive documentation file.
+  * debian/README:
+    + include more verbose instructive documentation. Closes: #502583.
+    + remove outdated information on vfat filesystms.
+    + mention that the package supports Firewire devices too.
+    + restructure the document a little.
+    + include brief instructions on troubleshooting usbmount behaviour.
+  * debian/{preinst,postrm}: remove legacy code.
+  * debian/control:
+    + include misc-depends on usbmount binary.
+    + update standards version to 3.8.1.
+    + mention that firewire is supported too in the long description.
+  * usbmount:
+    + respect entries already in /etc/fstab. Closes: #350633.
+      (Tks Joachim Breitner)
+    + use fine grained locking for devices. Closes: #403209.
+      (Tks Richard Atterer)
+  * usbmount.conf:
+    + comment heavily. Closes: #337483.
+      (Tks January Weiner, Jari Eskelinen)
+    + include vfat and hfsplus filesystems to be automounted.
 
- -- Rafael Laboissiere <rafael at debian.org>  Sun, 19 Oct 2008 20:44:32 +0200
+ -- Rogério Brito <rbrito at ime.usp.br>  Thu, 30 Apr 2009 19:52:59 -0300
 
 usbmount (0.0.16) unstable; urgency=low
 

Modified: usbmount/trunk/debian/control
===================================================================
--- usbmount/trunk/debian/control	2008-10-19 18:46:23 UTC (rev 46)
+++ usbmount/trunk/debian/control	2009-05-01 11:40:38 UTC (rev 47)
@@ -7,12 +7,12 @@
 Vcs-Browser: http://svn.debian.org/wsvn/usbmount
 DM-Upload-Allowed: yes
 Uploaders: Rafael Laboissiere <rafael at debian.org>
-Standards-Version: 3.8.0
+Standards-Version: 3.8.1
 Homepage: http://usbmount.alioth.debian.org/
 
 Package: usbmount
 Architecture: all
-Depends: udev, lockfile-progs
+Depends: udev, lockfile-progs, ${misc:Depends}
 Description: automatically mount and unmount USB mass storage devices
  This package automatically mounts USB mass storage devices (typically
  USB pens) when they are plugged in, and unmounts them when they are
@@ -26,6 +26,8 @@
  The script that does the (un)mounting is called by the udev daemon.
  Therefore, USBmount requires a 2.6 (or newer) kernel.
  .
+ Firewire devices are also supported by USBmount.
+ .
  USBmount is intended as a lightweight solution which is independent of
  a desktop environment. Users which would like an icon to appear when an
  USB device is plugged in should use the pmount and hal packages

Modified: usbmount/trunk/debian/copyright
===================================================================
--- usbmount/trunk/debian/copyright	2008-10-19 18:46:23 UTC (rev 46)
+++ usbmount/trunk/debian/copyright	2009-05-01 11:40:38 UTC (rev 47)
@@ -17,6 +17,18 @@
   even the implied warranty of MERCHANTABILITY or FITNESS FOR A
   PARTICULAR PURPOSE.
 
+Files: *
+Copyright: © 2009 Rogério Brito <rbrito at zero-based.org>
+License: BSD-2
+  This package is free software; the copyright holder gives unlimited
+  permission to copy and/or distribute it, with or without
+  modifications, as long as this notice is preserved.
+
+  This package is distributed in the hope that it will be useful,
+  but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+  even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+  PARTICULAR PURPOSE.
+
 Files: debian/*
 Copyright: © 2004, 2005, 2006, 2007 Martin Dickopp <martin at zero-based.org>
 License: BSD-2
@@ -30,7 +42,7 @@
   PARTICULAR PURPOSE.
 
 Files: debian/*
-Copyright: © 2008 Rogério Brito <rbrito at ime.usp.br>
+Copyright: © 2008, 2009 Rogério Brito <rbrito at ime.usp.br>
 License: BSD-2
   This package is free software; the copyright holder gives unlimited
   permission to copy and/or distribute it, with or without

Modified: usbmount/trunk/debian/postrm
===================================================================
--- usbmount/trunk/debian/postrm	2008-10-19 18:46:23 UTC (rev 46)
+++ usbmount/trunk/debian/postrm	2009-05-01 11:40:38 UTC (rev 47)
@@ -1,20 +1,6 @@
 #!/bin/sh
 set -e
 
-# If an upgrade from a version before 0.0.10 is aborted
-# and /etc/usbmount.conf has already been moved to
-# /etc/usbmount/usbmount.conf, move it back.
-if test "$1" = abort-upgrade || test "$1" = abort-install; then
-    if test -n "$2" && dpkg --compare-versions "$2" lt 0.0.10; then
-	if test -f /etc/usbmount/usbmount.conf 	&& ! test -e /etc/usbmount.conf; then
-	    mv /etc/usbmount/usbmount.conf /etc/usbmount.conf
-	fi
-	if test -d /etc/usbmount; then
-	    rmdir /etc/usbmount || :
-	fi
-    fi
-fi
-
 # If the package is removed or installing is aborted, try to remove the
 # default mountpoints. Failure to do so is not considered fatal.
 if test "$1" = remove || test "$1" = abort-install; then

Modified: usbmount/trunk/debian/preinst
===================================================================
--- usbmount/trunk/debian/preinst	2008-10-19 18:46:23 UTC (rev 46)
+++ usbmount/trunk/debian/preinst	2009-05-01 11:40:38 UTC (rev 47)
@@ -1,18 +1,6 @@
 #!/bin/sh
 set -e
 
-# If the package is upgraded from a version before 0.0.10,
-# move /etc/usbmount.conf to /etc/usbmount/usbmount.conf.
-if test "$1" = upgrade || test "$1" = install; then
-    if test -n "$2" && dpkg --compare-versions "$2" lt 0.0.10 \
-	&& test -f /etc/usbmount.conf \
-	&& ! test -e /etc/usbmount/usbmount.conf; then
-	test -d /etc/usbmount || mkdir /etc/usbmount
-	echo Moving /etc/usbmount.conf to /etc/usbmount/usbmount.conf ...
-	mv /etc/usbmount.conf /etc/usbmount/usbmount.conf
-    fi
-fi
-
 # If the package is installed, try to create the default mountpoints.
 # Failure to do so is not considered fatal.
 if test "$1" = install; then

Modified: usbmount/trunk/usbmount
===================================================================
--- usbmount/trunk/usbmount	2008-10-19 18:46:23 UTC (rev 46)
+++ usbmount/trunk/usbmount	2009-05-01 11:40:38 UTC (rev 47)
@@ -2,7 +2,7 @@
 # This script mounts USB mass storage devices when they are plugged in
 # and unmounts them when they are removed.
 # Copyright (C) 2004, 2005 Martin Dickopp
-# Copyright (C) 2008 Rogério Brito
+# Copyright (C) 2008, 2009 Rogério Brito
 #
 # This file is free software; the copyright holder gives unlimited
 # permission to copy and/or distribute it, with or without
@@ -59,19 +59,21 @@
     exit 0
 fi
 
-# Create /var/run/usbmount/ if it does not exist.
-test -e /var/run/usbmount/ || mkdir /var/run/usbmount/
+# Per Policy 9.3.2, directories under /var/run/usbmount have to be checked
+# after every reboot.
+test -e /var/run/usbmount || mkdir /var/run/usbmount
 
 umask 022
 
 if test "$1" = add; then
 
     # Acquire lock.
-    log debug "trying to acquire lock /var/run/usbmount/.mount.lock"
-    lockfile-create --retry 3 /var/run/usbmount/.mount || \
-	{ log err "cannot acquire lock /var/run/usbmount/.mount.lock"; exit 1; }
-    trap '( lockfile-remove /var/run/usbmount/.mount )' 0
-    log debug "acquired lock /var/run/usbmount/.mount.lock"
+    LOCKFILE=/var/run/usbmount/.mount`echo "$DEVNAME" | sed 's%[^a-z0-9_]%-%g'`
+    log debug "trying to acquire lock $LOCKFILE.lock"
+    lockfile-create --retry 3 $LOCKFILE ||
+	{ log err "cannot acquire lock $LOCKFILE.lock"; exit 1; }
+    trap '( lockfile-remove $LOCKFILE )' 0
+    log debug "acquired lock $LOCKFILE.lock"
 
     # Try to read from the device.  Some devices need a few seconds
     # initialization time before they can be accessed.  Give up after
@@ -92,10 +94,19 @@
 	exit 1
     fi
 
+    # Test if the device has an /etc/fstab entry. In that case, we will
+    # mount it using the regular mount command.
+    if grep -q "^[ 	]*$DEVNAME" /etc/fstab; then
+        log debug "$DEVNAME has an /dev/fstab entry, using that"
+
+	# Mount the filesystem.
+	log info "executing command: mount $DEVNAME"
+	mount "$DEVNAME"
+
     # Test if the device contains a filesystem.  If it doesn't, no
     # further action is required, but calling vol_id has the side effect
     # that the partition table is read and partition devices are created.
-    if /lib/udev/vol_id "$DEVNAME" | egrep -q '^ID_FS_USAGE=(filesystem|disklabel)$'; then
+    elif /lib/udev/vol_id "$DEVNAME" | egrep -q '^ID_FS_USAGE=(filesystem|disklabel)$'; then
 	log debug "$DEVNAME contains a filesystem or disklabel"
 
 	fstype="`/lib/udev/vol_id -t \"$DEVNAME\"`"

Modified: usbmount/trunk/usbmount.conf
===================================================================
--- usbmount/trunk/usbmount.conf	2008-10-19 18:46:23 UTC (rev 46)
+++ usbmount/trunk/usbmount.conf	2009-05-01 11:40:38 UTC (rev 47)
@@ -14,25 +14,32 @@
 
 # Filesystem types: USB mass storage devices are only mounted if they
 # contain a filesystem type which is in this list.
+FILESYSTEMS="vfat ext2 ext3 hfsplus"
+
 #############################################################################
-# WARNING!  The vfat filesystem does not yet fully implement sync-mounting. #
-# If you include "vfat" in the list of filesystem types, you *MUST* make    #
-# sure all data is written to the medium before you remove it (e.g. run the #
-# "sync" command in a terminal window).  Otherwise, you *WILL* lose data!   #
+# WARNING!                                                                  #
+# The "sync" option may not be a good choice to use with USB flash drives,  #
+# as it slows down the writing speed considerably and also leads to a much  #
+# faster wear out of the disk.                                              #
+# If you omit it, don't forget to use the command "sync" to synchronize     #
+# the data on your hard disk before removing the drive or you may           #
+# experience data loss.                                                     #
 #############################################################################
-FILESYSTEMS="ext2 ext3"
-
 # Mount options: Options passed to the mount command with the -o flag.
-# WARNING!  Removing "sync" from the options is a very bad idea and
-# might result in severe data loss.
+# See the warning above regarding removing "sync" from the options, as
+# it may lead to data loss.
 MOUNTOPTIONS="sync,noexec,nodev,noatime"
 
-# Filesystem type specific mount options: This variable contains a space sepa-
-# rated list of strings, each of which has the form "-fstype=TYPE,OPTIONS".
+# Filesystem type specific mount options: This variable contains a space
+# separated list of strings, each which the form "-fstype=TYPE,OPTIONS".
+#
 # If a filesystem with a type listed here is mounted, the corresponding
 # options are appended to those specificed in the MOUNTOPTIONS variable.
-# For example, "-fstype=vfat,gid=floppy,dmask=0007,fmask=0117" would add the
-# options "gid=floppy,dmask=0007,fmask=0117" when a vfat filesystem is mounted.
+#
+# For example, "-fstype=vfat,gid=floppy,dmask=0007,fmask=0117" would add
+# the options "gid=floppy,dmask=0007,fmask=0117" when a vfat filesystem
+# is mounted.
+
 FS_MOUNTOPTIONS=""
 
 # If set to "yes", more information will be logged via the syslog




More information about the Usbmount-commit mailing list