From owner-svn-ports-head@freebsd.org Sun Feb 11 05:40:57 2018 Return-Path: Delivered-To: svn-ports-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3B2E9F18A6C; Sun, 11 Feb 2018 05:40:57 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E17ED856F3; Sun, 11 Feb 2018 05:40:56 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id BABD31EA84; Sun, 11 Feb 2018 05:40:56 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w1B5euUR085501; Sun, 11 Feb 2018 05:40:56 GMT (envelope-from eugen@FreeBSD.org) Received: (from eugen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w1B5eucN085499; Sun, 11 Feb 2018 05:40:56 GMT (envelope-from eugen@FreeBSD.org) Message-Id: <201802110540.w1B5eucN085499@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eugen set sender to eugen@FreeBSD.org using -f From: Eugene Grosbein Date: Sun, 11 Feb 2018 05:40:56 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r461459 - in head/net/glusterfs: . files X-SVN-Group: ports-head X-SVN-Commit-Author: eugen X-SVN-Commit-Paths: in head/net/glusterfs: . files X-SVN-Commit-Revision: 461459 X-SVN-Commit-Repository: ports 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.25 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, 11 Feb 2018 05:40:57 -0000 Author: eugen Date: Sun Feb 11 05:40:56 2018 New Revision: 461459 URL: https://svnweb.freebsd.org/changeset/ports/461459 Log: glusterfs should be mountable by means of /etc/fstab now as we have /sbin/mount_fusefs in all supported FreeBSD versions, for example: gluster1:name /mnt/name fusefs rw,late,backup-volfile-servers=gluster2:gluster3,mountprog=/usr/local/sbin/mount_glusterfs 0 0 Make it work by fixing shell script /usr/local/sbin/mount_glusterfs to properly process multiple -o command line options. PR: 224451 Submitted by: Vladimir Kurtukov Reported by: Vladimir Kurtukov Approved by: craig001@lerwick.hopto.org (maintainer) Added: head/net/glusterfs/files/patch-mount_glusterfs.in (contents, props changed) Modified: head/net/glusterfs/Makefile Modified: head/net/glusterfs/Makefile ============================================================================== --- head/net/glusterfs/Makefile Sun Feb 11 05:23:00 2018 (r461458) +++ head/net/glusterfs/Makefile Sun Feb 11 05:40:56 2018 (r461459) @@ -2,7 +2,7 @@ PORTNAME= glusterfs PORTVERSION= 3.11.1 -PORTREVISION= 2 +PORTREVISION= 3 CATEGORIES= net MASTER_SITES= http://bits.gluster.org/pub/gluster/glusterfs/src/ Added: head/net/glusterfs/files/patch-mount_glusterfs.in ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/net/glusterfs/files/patch-mount_glusterfs.in Sun Feb 11 05:40:56 2018 (r461459) @@ -0,0 +1,57 @@ +--- xlators/mount/fuse/utils/mount_glusterfs.in.orig 2017-06-27 22:25:12.392137135 +0700 ++++ xlators/mount/fuse/utils/mount_glusterfs.in 2017-12-19 18:24:21.736142000 +0700 +@@ -463,50 +463,44 @@ parse_options() + if [ "$key" = "$value" ]; then + without_options $pair; + else + with_options $key $value; + fi + done + } + + main () + { +- ## `mount` on OSX specifies options as first argument +- echo $1|grep -q -- "-o" +- if [ $? -eq 0 ]; then +- volfile_loc=$3 +- mount_point=$4 +- else +- volfile_loc=$1 +- mount_point=$2 +- fi +- + while getopts "Vo:h" opt; do + case "${opt}" in + o) + parse_options ${OPTARG}; + ;; + V) + ${cmd_line} -V; + exit 0; + ;; + h) + print_usage; + exit 0; + ;; + ?) + print_usage; + exit 0; + ;; + esac + done + ++ shift $((OPTIND - 1)) ++ volfile_loc="$1" ++ mount_point="$2" ++ + [ -r "$volfile_loc" ] || { + # '%' included to support ipv6 link local addresses + server_ip=$(echo "$volfile_loc" | sed -n 's/\([a-zA-Z0-9:%.\-]*\):.*/\1/p'); + volume_str=$(echo "$volfile_loc" | sed -n 's/.*:\([^ ]*\).*/\1/p'); + [ -n "$volume_str" ] && { + volume_id="$volume_str"; + } + volfile_loc=""; + } +