From owner-svn-ports-all@freebsd.org Sun Dec 11 06:27:54 2016 Return-Path: Delivered-To: svn-ports-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9D212C71011; Sun, 11 Dec 2016 06:27:54 +0000 (UTC) (envelope-from novel@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 mx1.freebsd.org (Postfix) with ESMTPS id 52BE8131A; Sun, 11 Dec 2016 06:27:54 +0000 (UTC) (envelope-from novel@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uBB6RrKL077740; Sun, 11 Dec 2016 06:27:53 GMT (envelope-from novel@FreeBSD.org) Received: (from novel@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uBB6RraO077735; Sun, 11 Dec 2016 06:27:53 GMT (envelope-from novel@FreeBSD.org) Message-Id: <201612110627.uBB6RraO077735@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: novel set sender to novel@FreeBSD.org using -f From: Roman Bogorodskiy Date: Sun, 11 Dec 2016 06:27:53 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r428334 - in head/devel/py-os-brick: . 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Dec 2016 06:27:54 -0000 Author: novel Date: Sun Dec 11 06:27:52 2016 New Revision: 428334 URL: https://svnweb.freebsd.org/changeset/ports/428334 Log: devel/py-os-brick: add NFS support - Add initial NFS support through third party patches - Bump PORTREVISION PR: 215156 Submitted by: maintainer Added: head/devel/py-os-brick/files/ head/devel/py-os-brick/files/01-os-type.patch (contents, props changed) head/devel/py-os-brick/files/02-nfs.patch (contents, props changed) Modified: head/devel/py-os-brick/Makefile head/devel/py-os-brick/pkg-message Modified: head/devel/py-os-brick/Makefile ============================================================================== --- head/devel/py-os-brick/Makefile Sun Dec 11 06:18:27 2016 (r428333) +++ head/devel/py-os-brick/Makefile Sun Dec 11 06:27:52 2016 (r428334) @@ -3,6 +3,7 @@ PORTNAME= os-brick PORTVERSION= 1.8.0 +PORTREVISION= 1 CATEGORIES= devel python MASTER_SITES= CHEESESHOP PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} @@ -30,6 +31,9 @@ RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}os-w NO_ARCH= yes +EXTRA_PATCHES= ${FILESDIR}/01-os-type.patch:-p1 \ + ${FILESDIR}/02-nfs.patch:-p1 + USES= python USE_PYTHON= autoplist distutils Added: head/devel/py-os-brick/files/01-os-type.patch ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/devel/py-os-brick/files/01-os-type.patch Sun Dec 11 06:27:52 2016 (r428334) @@ -0,0 +1,47 @@ +From b2edffa81edb25202ec6ed08d131b8fa4153a1d5 Mon Sep 17 00:00:00 2001 +From: Alexander Nusov +Date: Thu, 8 Dec 2016 16:26:21 +0300 +Subject: [PATCH] add support for freebsd os + +--- + os_brick/initiator/__init__.py | 1 + + os_brick/initiator/connector.py | 4 ++++ + 2 files changed, 5 insertions(+) + +diff --git a/os_brick/initiator/__init__.py b/os_brick/initiator/__init__.py +index 95e0b10..aa91615 100644 +--- a/os_brick/initiator/__init__.py ++++ b/os_brick/initiator/__init__.py +@@ -34,6 +34,7 @@ PLATFORM_S390 = 'S390' + OS_TYPE_ALL = 'ALL' + OS_TYPE_LINUX = 'LINUX' + OS_TYPE_WINDOWS = 'WIN' ++OS_TYPE_FREEBSD = 'FREEBSD' + + S390X = "s390x" + S390 = "s390" +diff --git a/os_brick/initiator/connector.py b/os_brick/initiator/connector.py +index 86adfa8..989b8d6 100644 +--- a/os_brick/initiator/connector.py ++++ b/os_brick/initiator/connector.py +@@ -51,6 +51,7 @@ PLATFORM_S390 = 'S390' + OS_TYPE_ALL = 'ALL' + OS_TYPE_LINUX = 'LINUX' + OS_TYPE_WINDOWS = 'WIN' ++OS_TYPE_FREEBSD = 'FREEBSD' + + S390X = "s390x" + S390 = "s390" +@@ -204,6 +205,9 @@ def get_connector_properties(root_helper, my_ip, multipath, enforce_multipath, + props['ip'] = my_ip + props['host'] = host if host else socket.gethostname() + ++ if sys.platform.startswith('freebsd'): ++ props['os_type'] = OS_TYPE_FREEBSD ++ + for item in connector_list: + connector = importutils.import_class(item) + +-- +2.8.1 + Added: head/devel/py-os-brick/files/02-nfs.patch ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/devel/py-os-brick/files/02-nfs.patch Sun Dec 11 06:27:52 2016 (r428334) @@ -0,0 +1,35 @@ +From fe3bf36779f577ef737108eb1d30b46a75fa4748 Mon Sep 17 00:00:00 2001 +From: Alexander Nusov +Date: Thu, 8 Dec 2016 16:27:57 +0300 +Subject: [PATCH] initial NFS support + +--- + os_brick/initiator/connectors/remotefs.py | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +diff --git a/os_brick/initiator/connectors/remotefs.py b/os_brick/initiator/connectors/remotefs.py +index 50f11c1..f22b652 100644 +--- a/os_brick/initiator/connectors/remotefs.py ++++ b/os_brick/initiator/connectors/remotefs.py +@@ -26,6 +26,8 @@ LOG = logging.getLogger(__name__) + class RemoteFsConnector(base.BaseLinuxConnector): + """Connector class to attach/detach NFS and GlusterFS volumes.""" + ++ os_type = initiator.OS_TYPE_FREEBSD ++ + def __init__(self, mount_type, root_helper, driver=None, + execute=None, + device_scan_attempts=initiator.DEVICE_SCAN_ATTEMPTS_DEFAULT, +@@ -35,8 +37,7 @@ class RemoteFsConnector(base.BaseLinuxConnector): + mount_type_lower = mount_type.lower() + if conn: + mount_point_base = conn.get('mount_point_base') +- if mount_type_lower in ('nfs', 'glusterfs', 'scality', +- 'quobyte', 'vzstorage'): ++ if mount_type_lower in ('nfs',): + kwargs[mount_type_lower + '_mount_point_base'] = ( + kwargs.get(mount_type_lower + '_mount_point_base') or + mount_point_base) +-- +2.8.1 + Modified: head/devel/py-os-brick/pkg-message ============================================================================== --- head/devel/py-os-brick/pkg-message Sun Dec 11 06:18:27 2016 (r428333) +++ head/devel/py-os-brick/pkg-message Sun Dec 11 06:27:52 2016 (r428334) @@ -1,2 +1,5 @@ Please note that this is a development version. -Mounting cinder volumes doesn't work. +Only initial NFS support was added. + +Enable NFS client in rc.conf +# sysrc nfs_client_enable="YES"