From owner-svn-ports-head@FreeBSD.ORG Sun Aug 24 16:53:21 2014 Return-Path: Delivered-To: svn-ports-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0BB44588; Sun, 24 Aug 2014 16:53:21 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EABFE3EF4; Sun, 24 Aug 2014 16:53:20 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7OGrK3K010805; Sun, 24 Aug 2014 16:53:20 GMT (envelope-from adamw@FreeBSD.org) Received: (from adamw@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7OGrK4b010802; Sun, 24 Aug 2014 16:53:20 GMT (envelope-from adamw@FreeBSD.org) Message-Id: <201408241653.s7OGrK4b010802@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adamw set sender to adamw@FreeBSD.org using -f From: Adam Weinberger Date: Sun, 24 Aug 2014 16:53:20 +0000 (UTC) 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 X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Aug 2014 16:53:21 -0000 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 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"