Bug#761815: installation adds entries for USB media to /etc/fstab which confuse udisks

2015-04-17 Thread Cyril Brulebois
Cyril Brulebois k...@debian.org (2015-04-01):
 Steve McIntyre st...@einval.com (2015-04-01):
  As it stands, this is only for removable media which people have not
  already set up as part of their systems. The whole issue here is that
  this is not useful any more. If anybody is relying on being able to
  use such media without any of the existing auto-mounting stuff
  (desktop or whatever), adding it to /etc/fstab manually later isn't
  hard. I don't really see likely breakage here.
 
 OK. Color me convinced for the time being, feel free to push and upload;
 I'll get that unblocked in a week(ish) if no objections have been raised
 by then.

Looks good to me, got the expected changes between d-i built against
testing and one against sid:
-/dev/sda1   /media/usb0 autorw,user,noauto  0   0
-/dev/sda2   /media/usb1 autorw,user,noauto  0   0

Will u/u-u accordingly, thanks.

Mraw,
KiBi.


signature.asc
Description: Digital signature


Bug#761815: installation adds entries for USB media to /etc/fstab which confuse udisks

2015-04-01 Thread Steve McIntyre
On Wed, Apr 01, 2015 at 08:08:50PM +0200, Cyril Brulebois wrote:
Steve McIntyre st...@einval.com (2015-04-01):
 As it stands, this is only for removable media which people have not
 already set up as part of their systems. The whole issue here is that
 this is not useful any more. If anybody is relying on being able to
 use such media without any of the existing auto-mounting stuff
 (desktop or whatever), adding it to /etc/fstab manually later isn't
 hard. I don't really see likely breakage here.

OK. Color me convinced for the time being, feel free to push and upload;
I'll get that unblocked in a week(ish) if no objections have been raised
by then.

In incoming now.

If it reaches the release and people show up with appropriate use cases,
it should be easy enough to deal with it in the first point release by
introducing what I suggested.

ACK, makse sense.

-- 
Steve McIntyre, Cambridge, UK.st...@einval.com
We're the technical experts.  We were hired so that management could
 ignore our recommendations and tell us how to do our jobs.  -- Mike Andrews


-- 
To UNSUBSCRIBE, email to debian-bugs-rc-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#761815: installation adds entries for USB media to /etc/fstab which confuse udisks

2015-04-01 Thread Cyril Brulebois
Hi Steve,

Steve McIntyre st...@einval.com (2015-03-30):
 Right, it seems that was too conservative and still left hd-media
 devices listed. We probably don't want those either. Let's try this:
 don't add *any* USB devices to /etc/fstab:

Thanks. I'm slightly worried that some people might depend on this
feature, so I'm feeling a bit uneasy with ripping out support for it
entirely in the last stage before a release.

Maybe having a low priority question (marked as non-translatable for
this release cycle), which would let people have a say on this with
expert install, and which would also allow preseeding it?

What do you think?

Mraw,
KiBi.


signature.asc
Description: Digital signature


Bug#761815: installation adds entries for USB media to /etc/fstab which confuse udisks

2015-04-01 Thread Cyril Brulebois
Steve McIntyre st...@einval.com (2015-04-01):
 As it stands, this is only for removable media which people have not
 already set up as part of their systems. The whole issue here is that
 this is not useful any more. If anybody is relying on being able to
 use such media without any of the existing auto-mounting stuff
 (desktop or whatever), adding it to /etc/fstab manually later isn't
 hard. I don't really see likely breakage here.

OK. Color me convinced for the time being, feel free to push and upload;
I'll get that unblocked in a week(ish) if no objections have been raised
by then.

If it reaches the release and people show up with appropriate use cases,
it should be easy enough to deal with it in the first point release by
introducing what I suggested.

Mraw,
KiBi.


signature.asc
Description: Digital signature


Bug#761815: installation adds entries for USB media to /etc/fstab which confuse udisks

2015-04-01 Thread Steve McIntyre
On Wed, Apr 01, 2015 at 07:20:02PM +0200, Cyril Brulebois wrote:
Hi Steve,

Steve McIntyre st...@einval.com (2015-03-30):
 Right, it seems that was too conservative and still left hd-media
 devices listed. We probably don't want those either. Let's try this:
 don't add *any* USB devices to /etc/fstab:

Thanks. I'm slightly worried that some people might depend on this
feature, so I'm feeling a bit uneasy with ripping out support for it
entirely in the last stage before a release.

Maybe having a low priority question (marked as non-translatable for
this release cycle), which would let people have a say on this with
expert install, and which would also allow preseeding it?

What do you think?

Maybe... :-)

As it stands, this is only for removable media which people have not
already set up as part of their systems. The whole issue here is that
this is not useful any more. If anybody is relying on being able to
use such media without any of the existing auto-mounting stuff
(desktop or whatever), adding it to /etc/fstab manually later isn't
hard. I don't really see likely breakage here.

Anybody else?

-- 
Steve McIntyre, Cambridge, UK.st...@einval.com
Google-bait:   http://www.debian.org/CD/free-linux-cd
  Debian does NOT ship free CDs. Please do NOT contact the mailing
  lists asking us to send them to you.


-- 
To UNSUBSCRIBE, email to debian-bugs-rc-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#761815: installation adds entries for USB media to /etc/fstab which confuse udisks

2015-03-30 Thread Steve McIntyre
On Sun, Jan 25, 2015 at 11:21:08PM +, Steve McIntyre wrote:
On Sun, Jan 25, 2015 at 11:45:40PM +0100, Cyril Brulebois wrote:
Steve McIntyre st...@einval.com (2015-01-17):
 I'm thinking the best way to go with this is to simply drop this misc
 USB device support altogether from partman-target. Any objections?

Not from me.

OK, cool. Committing shortly. :-)

Right, it seems that was too conservative and still left hd-media
devices listed. We probably don't want those either. Let's try this:
don't add *any* USB devices to /etc/fstab:


diff --git a/debian/changelog b/debian/changelog
index c619533..df293e6 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,11 @@
+partman-target (95) unstable; urgency=medium
+
+  [ Steve McIntyre ]
+  * Further extend the fix for #761815 - don't add *any* USB devices
+to /etc/fstab.
+
+ -- Steve McIntyre 93...@debian.org  Mon, 30 Mar 2015 18:10:31 +0100
+
 partman-target (94) unstable; urgency=medium
 
   [ Steve McIntyre ]
diff --git a/finish.d/fstab_removable_media_entries 
b/finish.d/fstab_removable_media_entries
index 7db9e34..f132200 100755
--- a/finish.d/fstab_removable_media_entries
+++ b/finish.d/fstab_removable_media_entries
@@ -105,70 +105,3 @@ case `udpkg --print-os` in
;;
 esac
 
-# See if a usb storage device is plugged in right now. If so, assume it is
-# removable media unless the disk is already listed in the fstab.
-HD_MEDIA=$(grep /hd-media /proc/mounts | cut -d ' ' -f 1)
-if [ -n $HD_MEDIA ]; then
-   HD_MEDIA=$(mapdevfs $HD_MEDIA)
-fi
-founddevs=
-if [ -d /sys/block ]; then
-   if type udevadm /dev/null 21; then
-   device_info () {
-   udevadm info $@
-   }
-   elif type udevinfo /dev/null 21; then
-   device_info () {
-   udevinfo $@
-   }
-   fi
-fi
-if type device_info /dev/null 21; then
-   disk_containing () {
-   dirname $(device_info -q path -n $1)
-   }
-   partitions=$(list-devices partition)
-   for dev in $partitions; do
-   if ! device_info -q env -n $dev | grep -q '^ID_BUS=usb$'; then
-   continue
-   fi
-   disk=$(disk_containing $dev)
-   for otherdev in $partitions; do
-   if [ $(disk_containing $otherdev) = $disk ]  \
-  grep -q ^$otherdev  /target/etc/fstab; then
-   continue 2
-   fi
-   done
-   mapdev=$(mapdevfs $dev)
-   founddevs=${founddevs:+$founddevs }$mapdev
-   done
-fi
-USBDEVICES=
-for dev in $founddevs; do
-   if [ -z $USBDEVICES ]; then
-   USBDEVICES=$dev
-   else
-   if [ $dev = $HD_MEDIA ]; then
-   # If installing from usb, list that device first
-   USBDEVICES=$dev $USBDEVICES
-
-   # But explicitly don't add entries for other
-   # random USB devices that are neither
-   # installation sources nor partitions we've
-   # added into fstab already. They're not
-   # useful
-   fi
-   fi
-done
-
-case `udpkg --print-os` in
-   linux)
-   populate_media usb auto rw,user,noauto $USBDEVICES
-   ;;
-   kfreebsd)
-   populate_media usb auto rw,noauto $USBDEVICES
-   ;;
-   hurd)
-   populate_media usb auto rw,noauto $USBDEVICES
-   ;;
-esac


-- 
Steve McIntyre, Cambridge, UK.st...@einval.com
I've only once written 'SQL is my bitch' in a comment. But that code 
 is in use on a military site... -- Simon Booth


-- 
To UNSUBSCRIBE, email to debian-bugs-rc-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#761815: installation adds entries for USB media to /etc/fstab which confuse udisks

2015-01-25 Thread Cyril Brulebois
Steve McIntyre st...@einval.com (2015-01-17):
 I'm thinking the best way to go with this is to simply drop this misc
 USB device support altogether from partman-target. Any objections?

Not from me.

Mraw,
KiBi.


signature.asc
Description: Digital signature


Bug#761815: installation adds entries for USB media to /etc/fstab which confuse udisks

2015-01-25 Thread Steve McIntyre
On Sun, Jan 25, 2015 at 11:45:40PM +0100, Cyril Brulebois wrote:
Steve McIntyre st...@einval.com (2015-01-17):
 I'm thinking the best way to go with this is to simply drop this misc
 USB device support altogether from partman-target. Any objections?

Not from me.

OK, cool. Committing shortly. :-)

-- 
Steve McIntyre, Cambridge, UK.st...@einval.com
  Getting a SCSI chain working is perfectly simple if you remember that there
  must be exactly three terminations: one on one end of the cable, one on the
  far end, and the goat, terminated over the SCSI chain with a silver-handled
  knife whilst burning *black* candles. --- Anthony DeBoer


-- 
To UNSUBSCRIBE, email to debian-bugs-rc-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#761815: installation adds entries for USB media to /etc/fstab which confuse udisks

2015-01-18 Thread Julien Cristau
On Sat, Jan 17, 2015 at 10:44:18 +, Steve McIntyre wrote:

 I'm thinking the best way to go with this is to simply drop this misc
 USB device support altogether from partman-target. Any objections?
 
+1, fwiw.

Cheers,
Julien


signature.asc
Description: Digital signature


Bug#761815: installation adds entries for USB media to /etc/fstab which confuse udisks

2015-01-17 Thread Cameron Norman
On Sat, 17 Jan 2015 10:44:18 + Steve McIntyre st...@einval.com 
wrote:

 On Thu, Dec 04, 2014 at 09:38:05PM +0100, Ansgar Burchardt wrote:
 
 My personal opinion is that the right thing is to not add entries to
 /etc/fstab for removable devices at all (where removable means 
that

 the device itself can be removed, not just devices with removable
 media): I think there is no guarantee that the entry added to 
/etc/fstab
 actually matches the right device later. Plus the problems with 
udisks.


 100% agreed.

  My patch currently only prohibits adding of USB device entries. 
Should
  this be extended to floppies and CD-ROMs? What about kfreebsd and 
hurd?

 
 I'm not sure about CD-ROM/floppies or other devices with removable
 media. I also don't know about kFreeBSD or Hurd.
 
  IMO this should be fixed before the release as it causes 
unexpected and

  inconsistent behavior.
 
 Agreed. I've personally at least encountered 3 people having 
problems
 with using USB media under desktop environments (KDE or GNOME) due 
to

 these entries in /etc/fstab.

 I'm thinking the best way to go with this is to simply drop this misc
 USB device support altogether from partman-target. Any objections?


As someone hit by this, yes please. I like to start from a fairly 
minimal debian install, so when I add udisks post-install, I could 
still be hit by it if the other previously mentioned patch is used. 
Just removing that removable media handling support would be ideal.


Thank you.
--
Cameron Norman


Bug#761815: installation adds entries for USB media to /etc/fstab which confuse udisks

2015-01-17 Thread Steve McIntyre
On Thu, Dec 04, 2014 at 09:38:05PM +0100, Ansgar Burchardt wrote:

My personal opinion is that the right thing is to not add entries to
/etc/fstab for removable devices at all (where removable means that
the device itself can be removed, not just devices with removable
media): I think there is no guarantee that the entry added to /etc/fstab
actually matches the right device later. Plus the problems with udisks.

100% agreed.

 My patch currently only prohibits adding of USB device entries. Should
 this be extended to floppies and CD-ROMs? What about kfreebsd and hurd?

I'm not sure about CD-ROM/floppies or other devices with removable
media. I also don't know about kFreeBSD or Hurd.

 IMO this should be fixed before the release as it causes unexpected and
 inconsistent behavior.

Agreed. I've personally at least encountered 3 people having problems
with using USB media under desktop environments (KDE or GNOME) due to
these entries in /etc/fstab.

I'm thinking the best way to go with this is to simply drop this misc
USB device support altogether from partman-target. Any objections?

-- 
Steve McIntyre, Cambridge, UK.st...@einval.com
C++ ate my sanity -- Jon Rabone


-- 
To UNSUBSCRIBE, email to debian-bugs-rc-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#761815: installation adds entries for USB media to /etc/fstab which confuse udisks

2014-12-04 Thread Ansgar Burchardt
Hi,

Gaudenz Steinlin gaud...@debian.org writes:
 Just to give some context: This bug is about adding entries for USB mass
 storage devices to /etc/fstab on installation.

 Olliver Schinagl oli...@schinagl.nl writes:
 I just got bitten by this bug myself.

 As a long time gentoo + ubuntu user, I was baffled after getting the 
 solution to this problem. I have worked through several different kind 
 of fstab files, but this was a serious wtf. Why wasn't removable storage 
 working for me? I just couldn't figure it out, everything 'looked' normal.

 I'd increase the severity of this report, as it is far far from
 obvious.

 I just had a look at the relevant code in partman-target
 finish.d/fstab_removable_media_entries. As far as I understand it (no
 testing done) these entries are added if a USB device is currently
 plugged in. The code is from 2004 (commit
 af81206d02f8d668dab382e5ec8483ccbc90a506) when this probably made sense.

 Does it make any sense anymore to keep this code? IMO the fstab entries
 should at least not be added when udisks is installed. I attached a
 patch (not yet tested) which does this.

My personal opinion is that the right thing is to not add entries to
/etc/fstab for removable devices at all (where removable means that
the device itself can be removed, not just devices with removable
media): I think there is no guarantee that the entry added to /etc/fstab
actually matches the right device later. Plus the problems with udisks.

 My patch currently only prohibits adding of USB device entries. Should
 this be extended to floppies and CD-ROMs? What about kfreebsd and hurd?

I'm not sure about CD-ROM/floppies or other devices with removable
media. I also don't know about kFreeBSD or Hurd.

 IMO this should be fixed before the release as it causes unexpected and
 inconsistent behavior.

Agreed. I've personally at least encountered 3 people having problems
with using USB media under desktop environments (KDE or GNOME) due to
these entries in /etc/fstab.

Ansgar


-- 
To UNSUBSCRIBE, email to debian-bugs-rc-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org