Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 11 Feb 2018 05:40:56 +0000 (UTC)
From:      Eugene Grosbein <eugen@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r461459 - in head/net/glusterfs: . files
Message-ID:  <201802110540.w1B5eucN085499@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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 <vk@vk.pp.ru>
  Reported by:	Vladimir Kurtukov <vk@vk.pp.ru>
  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="";
+     }
+ 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201802110540.w1B5eucN085499>