Date: Sun, 24 Aug 2014 16:53:20 +0000 (UTC) From: Adam Weinberger <adamw@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r365963 - in head/sysutils/fusefs-simple-mtpfs: . files Message-ID: <201408241653.s7OGrK4b010802@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: adamw Date: Sun Aug 24 16:53:20 2014 New Revision: 365963 URL: http://svnweb.freebsd.org/changeset/ports/365963 QAT: https://qat.redports.org/buildarchive/r365963/ 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 Added: head/sysutils/fusefs-simple-mtpfs/files/ head/sysutils/fusefs-simple-mtpfs/files/patch-src__simple-mtpfs-fuse.cpp (contents, props changed) head/sysutils/fusefs-simple-mtpfs/files/special_simple-mtpfs.in (contents, props changed) Modified: head/sysutils/fusefs-simple-mtpfs/Makefile Modified: head/sysutils/fusefs-simple-mtpfs/Makefile ============================================================================== --- head/sysutils/fusefs-simple-mtpfs/Makefile Sun Aug 24 16:46:18 2014 (r365962) +++ head/sysutils/fusefs-simple-mtpfs/Makefile Sun Aug 24 16:53:20 2014 (r365963) @@ -35,8 +35,17 @@ OPTIONS_DEFINE= DOCS CONFIGURE_ENV+= LIBUSB1_CFLAGS=" " LIBUSB1_LIBS="-lusb" .endif +.if exists(/etc/autofs) +PLIST_FILES+= /etc/autofs/special_simple-mtpfs +SUB_FILES+= special_simple-mtpfs +.endif + post-install: @${MKDIR} ${STAGEDIR}${DOCSDIR} ${INSTALL_DATA} ${PORTDOCS:C|^|${WRKSRC}/|} ${STAGEDIR}${DOCSDIR} +.if exists(/etc/autofs) + @${MKDIR} ${STAGEDIR}/etc/autofs + ${INSTALL_SCRIPT} ${WRKDIR}/special_simple-mtpfs ${STAGEDIR}/etc/autofs +.endif .include <bsd.port.mk> Added: head/sysutils/fusefs-simple-mtpfs/files/patch-src__simple-mtpfs-fuse.cpp ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sysutils/fusefs-simple-mtpfs/files/patch-src__simple-mtpfs-fuse.cpp Sun Aug 24 16:53:20 2014 (r365963) @@ -0,0 +1,26 @@ +--- src/simple-mtpfs-fuse.cpp~ ++++ src/simple-mtpfs-fuse.cpp +@@ -314,7 +314,7 @@ bool SMTPFileSystem::parseOptions(int ar + + --m_options.m_device_no; + +-#ifdef HAVE_LIBUSB1 ++#if 0 //def HAVE_LIBUSB1 + // device file and -- device are mutually exclusive, fail if both set + if (m_options.m_device_no && m_options.m_device_file) { + m_options.m_good = false; +@@ -383,11 +383,9 @@ bool SMTPFileSystem::exec() + } + + #ifdef HAVE_LIBUSB1 +- if (m_options.m_device_file) { +- // Try to use device file first, if provided +- if (!m_device.connect(m_options.m_device_file)) +- return false; +- } else ++ // Try to use device file first, ignore otherwise ++ if (!m_options.m_device_file || ++ !m_device.connect(m_options.m_device_file)) + #endif // HAVE_LIBUSB1 + { + // Connect to MTP device by order number, if no device file supplied Added: head/sysutils/fusefs-simple-mtpfs/files/special_simple-mtpfs.in ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sysutils/fusefs-simple-mtpfs/files/special_simple-mtpfs.in Sun Aug 24 16:53:20 2014 (r365963) @@ -0,0 +1,18 @@ +#!/bin/sh +# +# Intended for use with /etc/auto_master containing +# /mtp -simple-mtpfs -allow_other +# + +out=$(%%PREFIX%%/bin/simple-mtpfs --list-devices 2>&1) +[ $? -eq 0 ] || exit 1 + +if [ $# -eq 0 ]; then + echo "$out" | sed 's/[^:]*: //' | sort -u + exit 0 +fi + +devno=$(echo "$out" | (fgrep "$1" || echo 0) | sed 's/:.*//') +[ $devno -gt 0 ] || exit 1 + +echo "/ -fstype=none,--device=$devno,mountprog=%%PREFIX%%/bin/simple-mtpfs :none"
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201408241653.s7OGrK4b010802>