Bug 192851 - sysutils/simple-mtpfs: allow use in fstab or autofs
Summary: sysutils/simple-mtpfs: allow use in fstab or autofs
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Adam Weinberger
URL:
Keywords:
Depends on: 192552
Blocks:
  Show dependency treegraph
 
Reported: 2014-08-20 12:28 UTC by Jan Beich
Modified: 2014-09-28 23:04 UTC (History)
2 users (show)

See Also:


Attachments
ignore device_file argument on fail (580 bytes, patch)
2014-08-20 12:28 UTC, Jan Beich
no flags Details | Diff
install autofs special map (1.22 KB, patch)
2014-08-20 20:52 UTC, Jan Beich
no flags Details | Diff
ignore device_file argument on fail (893 bytes, patch)
2014-08-23 16:03 UTC, Jan Beich
no flags Details | Diff
install autofs special map (1.34 KB, patch)
2014-08-23 16:06 UTC, Jan Beich
no flags Details | Diff
install autofs special map (1.75 KB, patch)
2014-08-24 16:49 UTC, Jan Beich
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Beich freebsd_committer freebsd_triage 2014-08-20 12:28:00 UTC
Created attachment 146066 [details]
ignore device_file argument on fail

Pseudo filesystems like tmpfs, fdescfs, procfs, etc. ignore "from" option passed by nmount(2) but unfortunately mount(8) requires it to ease fstab parsing.

$ cat /etc/fstab
# Device	Mountpoint	FStype		Options
virtual		/media/android	mtpfs		rw,noauto,allow_other,mountprog=/usr/local/bin/simple-mtpfs

$ mount -o -v /media/android
2014/07/20 12:10:43: Error: Can not open such device 'virtual'.
zsh: exit 1
Comment 1 John Marino freebsd_committer freebsd_triage 2014-08-20 16:32:15 UTC
sysutils/simple-mtpfs port doesn't seem to exist and  sysutils/mtpfs doesn't have a simple-mtpfs file.

What port does this PR belong to?
Comment 2 Jan Beich freebsd_committer freebsd_triage 2014-08-20 17:26:57 UTC
See |Depends on| field. The patch here is a bit questionable. Landing it now shouldn't hurt but I need to poke fstab/autofs on Linux then file a bug upstream.
Comment 3 John Marino freebsd_committer freebsd_triage 2014-08-20 17:34:16 UTC
ah.

Why not just update bug 192552 instead?
Comment 4 Jan Beich freebsd_committer freebsd_triage 2014-08-20 20:52:42 UTC
Created attachment 146087 [details]
install autofs special map

$ cat /etc/auto_master
/mtp		-simple-mtpfs	-allow_other

# unnecessary after bug 192862
$ simple-mtpfs -l
1: My Phone MTP+ADB

$ ls -F /mtp/My\ Phone\ MTP+ADB/
Internal storage/ SD card/
Comment 5 John Marino freebsd_committer freebsd_triage 2014-08-20 22:17:32 UTC
I still recommend that you keep all of this on one PR.

Since you insist on 2 PRs, I'm moving this to "Open" state.  The first one isn't claimed, so I can't assign the second one to anyone.
Comment 6 Jan Beich freebsd_committer freebsd_triage 2014-08-23 16:03:34 UTC
Created attachment 146181 [details]
ignore device_file argument on fail

fixed to work with --device 2 or greater
Comment 7 Jan Beich freebsd_committer freebsd_triage 2014-08-23 16:06:11 UTC
Created attachment 146183 [details]
install autofs special map

fixed to work before bug 192947
Comment 8 John Marino freebsd_committer freebsd_triage 2014-08-24 16:17:45 UTC
Adam, you may want to look at this, it may be related to what you just committed.  Frankly I don't understand what's going on here.  Maybe you'll have better luck.
Comment 9 Jan Beich freebsd_committer freebsd_triage 2014-08-24 16:49:12 UTC
Created attachment 146220 [details]
install autofs special map

Rebase, revert to v1 (because bug 192947 fixed), and s/devnum/devno/, s/nil/none/. I'm still a bit unsure about -fstype=none but:
- it fits on 80 terminal
- fstype != nfs is ignored by mount/autofs if mountprog is specified
Comment 10 commit-hook freebsd_committer freebsd_triage 2014-08-24 16:54:06 UTC
A commit references this bug:

Author: adamw
Date: Sun Aug 24 16:53:20 UTC 2014
New revision: 365963
URL: http://svnweb.freebsd.org/changeset/ports/365963

Log:
  -ignore device_file argument on fail
    Pseudo filesystems like tmpfs, fdescfs, procfs, etc. ignore "from" option
    passed by nmount(2) but unfortunately mount(8) requires it to ease fstab
    parsing.

  -install autofs special map

  PR:		192851
  Submitted by:	maintainer

Changes:
  head/sysutils/fusefs-simple-mtpfs/Makefile
  head/sysutils/fusefs-simple-mtpfs/files/
  head/sysutils/fusefs-simple-mtpfs/files/patch-src__simple-mtpfs-fuse.cpp
  head/sysutils/fusefs-simple-mtpfs/files/special_simple-mtpfs.in
Comment 11 Adam Weinberger freebsd_committer freebsd_triage 2014-08-24 16:54:19 UTC
Committed, thanks