Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 29 Jan 2019 14:05:58 +0000 (UTC)
From:      Martin Wilke <miwi@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r491564 - in head/misc/py-cinder: . files
Message-ID:  <201901291405.x0TE5wLd095292@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: miwi
Date: Tue Jan 29 14:05:58 2019
New Revision: 491564
URL: https://svnweb.freebsd.org/changeset/ports/491564

Log:
  - Update to 12.0.4
  - Added LICENSE_FILE
  - Changed MASTER_SITES to official OpenStack repository
  - Removed EXTRA_PATCHES (those patches have been rebased and were converted into
    mandatory patches)
  - Enabled building for Python 3+ versions
  - Sorted variables according to the PHB
  - Changed RC scripts to work with different Python versions
  - Added CONFLICTS_INSTALL
  - Added OPTIONS for MySQL, PostgreSQL, memcached and MongoDB support
  - changed post-patch target to prevent the installation to files into ${ETCDIR}
    by distutils and to replace occurences of /etc to ${PREFIX}/etc
  - Changed post-install target to install the files into ${ETCDIR}
  - Updated the shipped cinder.conf.sample
  - Updated pkg-message
  
  PR:		232245
  Submitted by:	freebsd_ports@k-worx.org
  Approved by:	maintainer
  Sponsored by:	iXsystems Inc.

Added:
  head/misc/py-cinder/files/patch-cinder_volume_drivers_nfs.py   (contents, props changed)
  head/misc/py-cinder/files/patch-cinder_volume_drivers_remotefs.py   (contents, props changed)
Deleted:
  head/misc/py-cinder/files/01-remotefs.patch
  head/misc/py-cinder/files/02-nfs.patch
Modified:
  head/misc/py-cinder/Makefile
  head/misc/py-cinder/distinfo
  head/misc/py-cinder/files/cinder-api.in
  head/misc/py-cinder/files/cinder-scheduler.in
  head/misc/py-cinder/files/cinder-volume.in
  head/misc/py-cinder/files/cinder.conf.sample
  head/misc/py-cinder/pkg-message
  head/misc/py-cinder/pkg-plist

Modified: head/misc/py-cinder/Makefile
==============================================================================
--- head/misc/py-cinder/Makefile	Tue Jan 29 14:03:30 2019	(r491563)
+++ head/misc/py-cinder/Makefile	Tue Jan 29 14:05:58 2019	(r491564)
@@ -2,105 +2,127 @@
 # $FreeBSD$
 
 PORTNAME=	cinder
-PORTVERSION=	9.1.1
-PORTREVISION=	3
+PORTVERSION=	12.0.4
 CATEGORIES=	misc python
-MASTER_SITES=	https://fossies.org/linux/misc/openstack/
+MASTER_SITES=	https://tarballs.openstack.org/cinder/
 PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
 
 MAINTAINER=	alexander.nusov@nfvexpress.com
 COMMENT=	OpenStack Storage Service (Cinder)
 
 LICENSE=	APACHE20
+LICENSE_FILE=	${WRKSRC}/LICENSE
 
-BUILD_DEPENDS=	${PYTHON_PKGNAMEPREFIX}pbr>=1.6:devel/py-pbr@${PY_FLAVOR}
-RUN_DEPENDS:=	${BUILD_DEPENDS}
-RUN_DEPENDS+=	${PYTHON_PKGNAMEPREFIX}Babel>=2.3.4:devel/py-babel@${PY_FLAVOR} \
+BUILD_DEPENDS=	${PYTHON_PKGNAMEPREFIX}pbr>=2.0.0:devel/py-pbr@${PY_FLAVOR}
+RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}pbr>=2.0.0:devel/py-pbr@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}Babel>=2.3.4:devel/py-babel@${PY_FLAVOR} \
 		${PYTHON_PKGNAMEPREFIX}decorator>=3.4.0:devel/py-decorator@${PY_FLAVOR} \
-		${PY_ENUM34} \
-		${PYTHON_PKGNAMEPREFIX}eventlet>=0:net/py-eventlet@${PY_FLAVOR} \
-		${PYTHON_PKGNAMEPREFIX}greenlet>=0.3.2:devel/py-greenlet@${PY_FLAVOR} \
-		${PYTHON_PKGNAMEPREFIX}httplib2>=0.7.5:www/py-httplib2@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}defusedxml>=0.5.0:devel/py-defusedxml@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}eventlet>=0.18.2:net/py-eventlet@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}greenlet>=0.4.10:devel/py-greenlet@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}httplib2>=0.9.1:www/py-httplib2@${PY_FLAVOR} \
 		${PYTHON_PKGNAMEPREFIX}iso8601>=0.1.11:devel/py-iso8601@${PY_FLAVOR} \
-		${PY_IPADDRESS} \
-		${PYTHON_PKGNAMEPREFIX}keystoneauth1>=2.10.0:devel/py-keystoneauth1@${PY_FLAVOR} \
-		${PYTHON_PKGNAMEPREFIX}keystonemiddleware>=0:devel/py-keystonemiddleware@${PY_FLAVOR} \
-		${PYTHON_PKGNAMEPREFIX}lxml>=2.3:devel/py-lxml@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}jsonschema>=2.6.0:devel/py-jsonschema@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}keystoneauth1>=3.3.0:devel/py-keystoneauth1@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}keystonemiddleware>=4.17.0:devel/py-keystonemiddleware@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}lxml>=3.4.1:devel/py-lxml@${PY_FLAVOR} \
 		${PYTHON_PKGNAMEPREFIX}oauth2client>=1.5.0:security/py-oauth2client@${PY_FLAVOR} \
-		${PYTHON_PKGNAMEPREFIX}oslo.config>=3.14.0:devel/py-oslo.config@${PY_FLAVOR} \
-		${PYTHON_PKGNAMEPREFIX}oslo.concurrency>=3.8.0:devel/py-oslo.concurrency@${PY_FLAVOR} \
-		${PYTHON_PKGNAMEPREFIX}oslo.context>=2.9.0:devel/py-oslo.context@${PY_FLAVOR} \
-		${PYTHON_PKGNAMEPREFIX}oslo.db>=0:devel/py-oslo.db@${PY_FLAVOR} \
-		${PYTHON_PKGNAMEPREFIX}oslo.log>=1.14.0:devel/py-oslo.log@${PY_FLAVOR} \
-		${PYTHON_PKGNAMEPREFIX}oslo.messaging>=5.2.0:devel/py-oslo.messaging@${PY_FLAVOR} \
-		${PYTHON_PKGNAMEPREFIX}oslo.middleware>=3.0.0:devel/py-oslo.middleware@${PY_FLAVOR} \
-		${PYTHON_PKGNAMEPREFIX}oslo.policy>=1.9.0:devel/py-oslo.policy@${PY_FLAVOR} \
-		${PYTHON_PKGNAMEPREFIX}oslo.privsep>=1.9.0:devel/py-oslo.privsep@${PY_FLAVOR} \
-		${PYTHON_PKGNAMEPREFIX}oslo.reports>=0.6.0:devel/py-oslo.reports@${PY_FLAVOR} \
-		${PYTHON_PKGNAMEPREFIX}oslo.rootwrap>=5.0.0:devel/py-oslo.rootwrap@${PY_FLAVOR} \
-		${PYTHON_PKGNAMEPREFIX}oslo.serialization>=1.10.0:devel/py-oslo.serialization@${PY_FLAVOR} \
-		${PYTHON_PKGNAMEPREFIX}oslo.service>=1.10.0:devel/py-oslo.service@${PY_FLAVOR} \
-		${PYTHON_PKGNAMEPREFIX}oslo.utils>=3.16.0:devel/py-oslo.utils@${PY_FLAVOR} \
-		${PYTHON_PKGNAMEPREFIX}oslo.versionedobjects>=1.13.0:devel/py-oslo.versionedobjects@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}oslo.config>=5.1.0:devel/py-oslo.config@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}oslo.concurrency>=3.25.0:devel/py-oslo.concurrency@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}oslo.context>=2.19.2:devel/py-oslo.context@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}oslo.db>=4.27.0:devel/py-oslo.db@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}oslo.log>=3.36.0:devel/py-oslo.log@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}oslo.messaging>=5.29.0:devel/py-oslo.messaging@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}oslo.middleware>=3.31.0:devel/py-oslo.middleware@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}oslo.policy>=1.30.0:devel/py-oslo.policy@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}oslo.privsep>=1.23.0:devel/py-oslo.privsep@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}oslo.reports>=1.18.0:devel/py-oslo.reports@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}oslo.rootwrap>=5.8.0:devel/py-oslo.rootwrap@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}oslo.serialization>=2.18.0:devel/py-oslo.serialization@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}oslo.service>=1.24.0:devel/py-oslo.service@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}oslo.utils>=3.33.0:devel/py-oslo.utils@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}oslo.versionedobjects>=1.31.2:devel/py-oslo.versionedobjects@${PY_FLAVOR} \
 		${PYTHON_PKGNAMEPREFIX}osprofiler>=1.4.0:devel/py-osprofiler@${PY_FLAVOR} \
-		${PYTHON_PKGNAMEPREFIX}paramiko>=2.0:security/py-paramiko@${PY_FLAVOR} \
-		${PYTHON_PKGNAMEPREFIX}Paste>=0:www/py-paste@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}paramiko>=2.0.0:security/py-paramiko@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}Paste>=2.0.2:www/py-paste@${PY_FLAVOR} \
 		${PYTHON_PKGNAMEPREFIX}PasteDeploy>=1.5.0:www/py-pastedeploy@${PY_FLAVOR} \
-		${PYTHON_PKGNAMEPREFIX}pycrypto>=2.6:security/py-pycrypto@${PY_FLAVOR} \
-		${PYTHON_PKGNAMEPREFIX}pyparsing>=2.0.1:devel/py-pyparsing@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}prettytable>=0.7.1:devel/py-prettytable@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}psutil>=3.2.2:sysutils/py-psutil@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}pyparsing>=2.1.0:devel/py-pyparsing@${PY_FLAVOR} \
 		${PYTHON_PKGNAMEPREFIX}python-barbicanclient>=4.0.0:net/py-python-barbicanclient@${PY_FLAVOR} \
-		${PYTHON_PKGNAMEPREFIX}python-glanceclient>=0:net/py-python-glanceclient@${PY_FLAVOR} \
-		${PYTHON_PKGNAMEPREFIX}python-keystoneclient>=0:net/py-python-keystoneclient@${PY_FLAVOR} \
-		${PYTHON_PKGNAMEPREFIX}python-novaclient>=0:net/py-python-novaclient@${PY_FLAVOR} \
-		${PYTHON_PKGNAMEPREFIX}python-swiftclient>=2.2.0:databases/py-python-swiftclient@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}python-glanceclient>=2.8.0:net/py-python-glanceclient@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}python-keystoneclient>=3.8.0:net/py-python-keystoneclient@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}python-novaclient>=9.1.0:net/py-python-novaclient@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}python-swiftclient>=3.2.0:databases/py-python-swiftclient@${PY_FLAVOR} \
 		${PYTHON_PKGNAMEPREFIX}pytz>=2013.6:devel/py-pytz@${PY_FLAVOR} \
-		${PYTHON_PKGNAMEPREFIX}requests>=2.10.0:www/py-requests@${PY_FLAVOR} \
-		${PYTHON_PKGNAMEPREFIX}retrying>=0:devel/py-retrying@${PY_FLAVOR} \
-		${PYTHON_PKGNAMEPREFIX}routes>=0:www/py-routes@${PY_FLAVOR} \
-		${PYTHON_PKGNAMEPREFIX}taskflow>=1.26.0:devel/py-taskflow@${PY_FLAVOR} \
-		${PYTHON_PKGNAMEPREFIX}rtslib-fb>=0:devel/py-rtslib-fb@${PY_FLAVOR} \
-		${PYTHON_PKGNAMEPREFIX}simplejson>=2.2.0:devel/py-simplejson@${PY_FLAVOR} \
-		${PYTHON_PKGNAMEPREFIX}six>=1.9.0:devel/py-six@${PY_FLAVOR} \
-		${PYTHON_PKGNAMEPREFIX}sqlalchemy12>=0:databases/py-sqlalchemy12@${PY_FLAVOR} \
-		${PYTHON_PKGNAMEPREFIX}sqlalchemy-migrate>=0.9.6:databases/py-sqlalchemy-migrate@${PY_FLAVOR} \
-		${PYTHON_PKGNAMEPREFIX}stevedore>=1.16.0:devel/py-stevedore@${PY_FLAVOR} \
-		${PYTHON_PKGNAMEPREFIX}webob>=1.2.3:www/py-webob@${PY_FLAVOR} \
-		${PYTHON_PKGNAMEPREFIX}oslo.i18n>=2.1.0:devel/py-oslo.i18n@${PY_FLAVOR} \
-		${PYTHON_PKGNAMEPREFIX}oslo.vmware>=2.11.0:devel/py-oslo.vmware@${PY_FLAVOR} \
-		${PYTHON_PKGNAMEPREFIX}os-brick>=1.6.1:devel/py-os-brick@${PY_FLAVOR} \
-		${PYTHON_PKGNAMEPREFIX}os-win>=0.2.3:devel/py-os-win@${PY_FLAVOR} \
-		${PYTHON_PKGNAMEPREFIX}tooz>=1.28.0:devel/py-tooz@${PY_FLAVOR} \
-		${PYTHON_PKGNAMEPREFIX}google-api-python-client>=1.4.1:www/py-google-api-python-client@${PY_FLAVOR} \
-		${PYTHON_PKGNAMEPREFIX}castellan>=0.4.0:devel/py-castellan@${PY_FLAVOR}
+		${PYTHON_PKGNAMEPREFIX}requests>=2.14.2:www/py-requests@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}retrying>=1.2.3:devel/py-retrying@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}routes>=2.3.1:www/py-routes@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}taskflow>=2.16.0:devel/py-taskflow@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}rtslib-fb>=2.1.43:devel/py-rtslib-fb@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}simplejson>=3.5.1:devel/py-simplejson@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}six>=1.10.0:devel/py-six@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}sqlalchemy12>=1.0.10:databases/py-sqlalchemy12@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}sqlalchemy-migrate>=0.11.0:databases/py-sqlalchemy-migrate@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}stevedore>=1.20.0:devel/py-stevedore@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}suds-jurko>=0.6:net/py-suds-jurko@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}webob>=1.7.1:www/py-webob@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}oslo.i18n>=3.15.3:devel/py-oslo.i18n@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}oslo.vmware>=2.17.0:devel/py-oslo.vmware@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}os-brick>=2.2.0:devel/py-os-brick@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}os-win>=3.0.0:devel/py-os-win@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}tooz>=1.58.0:devel/py-tooz@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}google-api-python-client>=1.4.2:www/py-google-api-python-client@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}castellan>=0.16.0:devel/py-castellan@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}cryptography>=1.9:security/py-cryptography@${PY_FLAVOR} \
+		${PY_IPADDRESS} \
+		${PY_ENUM34}
 
-EXTRA_PATCHES=	${FILESDIR}/01-remotefs.patch:-p1 \
-		${FILESDIR}/02-nfs.patch:-p1
-
-NO_ARCH=	yes
-
-USES=		python:2.7
+USES=		python
 USE_PYTHON=	autoplist distutils
+USE_RC_SUBR=	cinder-api cinder-scheduler cinder-volume
 
-USE_RC_SUBR=	cinder-api \
-		cinder-scheduler \
-		cinder-volume
 USERS=		cinder
 GROUPS=		cinder
 
-post-extract:
-	@(cd ${WRKSRC}/etc/cinder; ${MV} logging_sample.conf logging.conf.sample)
-	@(cd ${WRKSRC}/etc/cinder; for f in *.conf; \
-		do ${MV} $${f} $${f}.sample; done)
-	# No need to ship this README becuase it tells how to generate sample config
-	# file using tox, but we ship FreeBSD-friendly sample config already
-	@${RM} ${WRKSRC}/etc/cinder/README-cinder.conf.sample
+NO_ARCH=	yes
+SUB_LIST=	PYTHON_VER=${PYTHON_VER}
 
+CONFLICTS_INSTALL=	py??-cinder-*
+
+OPTIONS_GROUP=		MISC
+OPTIONS_GROUP_MISC=	MEMCACHED MONGODB
+OPTIONS_GROUP_RADIO=	DB
+OPTIONS_GROUP_RADIO_DB=	MYSQL PGSQL
+
+MEMCACHED_DESC=		memcached support
+MONGODB_DESC=		MongoDB support (used for messaging services)
+MYSQL_DESC=		MySQL/MariaDB support
+PGSQL_DESC=		PostgreSQL support
+
+MEMCACHED_RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}python-memcached>=1.56:databases/py-python-memcached@${PY_FLAVOR}
+MONGODB_RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}pymongo>=3.0.2:databases/pymongo@${PY_FLAVOR}
+MYSQL_RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}pymysql>=0:databases/py-pymysql@${PY_FLAVOR}
+PGSQL_RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}psycopg2>=0:databases/py-psycopg2@${PY_FLAVOR}
+
+MY_CONFFILES=	api-paste.ini rootwrap.conf rootwrap.d/volume.filters
+MY_REGEX=	(/etc/)(ceph|nova|pki|ssl)
+
 post-patch:
-	${CP} ${FILESDIR}/cinder.conf.sample \
-		${WRKSRC}/etc/cinder/cinder.conf.sample
+	# Prevent the installation of files into ${ETCDIR} by distutils. We do it
+	# manually in the post-install target
+	@${REINPLACE_CMD} -e '/etc\//d' ${WRKSRC}/setup.cfg
+	${CP} ${FILESDIR}/cinder.conf.sample ${WRKSRC}/etc/cinder/cinder.conf
+	# Replace (hardcoded) paths of config, documentation and Python files
+	@${GREP} -Rl -Ee '${MY_REGEX}' --null \
+		${WRKSRC}/etc ${WRKSRC}/doc ${WRKSRC}/cinder | \
+			${XARGS} -0 ${REINPLACE_CMD} -i '' -Ee \
+				"s,${MY_REGEX},${PREFIX}\1\2,g"
 
 post-install:
-	${MKDIR} ${STAGEDIR}${ETCDIR}
-	${CP} -R ${WRKSRC}/etc/cinder/ ${STAGEDIR}${ETCDIR}
+	@${MKDIR} ${STAGEDIR}${ETCDIR}/rootwrap.d
+.for f in ${MY_CONFFILES} cinder.conf
+	${INSTALL_DATA} ${WRKSRC}/etc/cinder/$f ${STAGEDIR}${ETCDIR}/$f.sample
+.endfor
 
 .include <bsd.port.mk>

Modified: head/misc/py-cinder/distinfo
==============================================================================
--- head/misc/py-cinder/distinfo	Tue Jan 29 14:03:30 2019	(r491563)
+++ head/misc/py-cinder/distinfo	Tue Jan 29 14:05:58 2019	(r491564)
@@ -1,3 +1,3 @@
-TIMESTAMP = 1483236622
-SHA256 (cinder-9.1.1.tar.gz) = 455831c90ac6eafde83bb7b57d0c8ee0caf19a419bf760b2451aa7164cc9627d
-SIZE (cinder-9.1.1.tar.gz) = 4201222
+TIMESTAMP = 1539433662
+SHA256 (cinder-12.0.4.tar.gz) = b792411f750abada65509c6f39ac9703dc13fd33b5fde1e4e3bd6c75f14e098c
+SIZE (cinder-12.0.4.tar.gz) = 5349921

Modified: head/misc/py-cinder/files/cinder-api.in
==============================================================================
--- head/misc/py-cinder/files/cinder-api.in	Tue Jan 29 14:03:30 2019	(r491563)
+++ head/misc/py-cinder/files/cinder-api.in	Tue Jan 29 14:05:58 2019	(r491564)
@@ -33,7 +33,7 @@ rcvar=cinder_api_enable
 PATH=%%PREFIX%%/bin:%%PREFIX%%/sbin:$PATH
 
 pidfile="/var/run/cinder-api.pid"
-procname="%%PREFIX%%/bin/python2.7"
+procname="%%PREFIX%%/bin/python%%PYTHON_VER%%"
 
 start_precmd=cinder_precmd
 

Modified: head/misc/py-cinder/files/cinder-scheduler.in
==============================================================================
--- head/misc/py-cinder/files/cinder-scheduler.in	Tue Jan 29 14:03:30 2019	(r491563)
+++ head/misc/py-cinder/files/cinder-scheduler.in	Tue Jan 29 14:05:58 2019	(r491564)
@@ -33,7 +33,7 @@ rcvar=cinder_scheduler_enable
 PATH=%%PREFIX%%/bin:%%PREFIX%%/sbin:$PATH
 
 pidfile="/var/run/cinder-scheduler.pid"
-procname="%%PREFIX%%/bin/python2.7"
+procname="%%PREFIX%%/bin/python%%PYTHON_VER%%"
 
 start_precmd=cinder_precmd
 

Modified: head/misc/py-cinder/files/cinder-volume.in
==============================================================================
--- head/misc/py-cinder/files/cinder-volume.in	Tue Jan 29 14:03:30 2019	(r491563)
+++ head/misc/py-cinder/files/cinder-volume.in	Tue Jan 29 14:05:58 2019	(r491564)
@@ -33,7 +33,7 @@ rcvar=cinder_volume_enable
 PATH=%%PREFIX%%/bin:%%PREFIX%%/sbin:$PATH
 
 pidfile="/var/run/cinder-volume.pid"
-procname="%%PREFIX%%/bin/python2.7"
+procname="%%PREFIX%%/bin/python%%PYTHON_VER%%"
 
 start_precmd=cinder_precmd
 

Modified: head/misc/py-cinder/files/cinder.conf.sample
==============================================================================
--- head/misc/py-cinder/files/cinder.conf.sample	Tue Jan 29 14:03:30 2019	(r491563)
+++ head/misc/py-cinder/files/cinder.conf.sample	Tue Jan 29 14:05:58 2019	(r491564)
@@ -1,29 +1,23 @@
 [DEFAULT]
-rootwrap_config = /usr/local/etc/cinder/rootwrap.conf
-api_paste_confg = /usr/local/etc/cinder/api-paste.ini
-iscsi_helper = tgtadm
-volume_name_template = volume-%s
-volume_group = cinder-volumes
-verbose = True
 auth_strategy = keystone
-state_path = /var/lib/cinder
-lock_path = /var/lock/cinder
-volumes_dir = /var/lib/cinder/volumes
 transport_url = rabbit://openstack:RABBIT_PASS@controller
 my_ip = 192.168.1.30
-nfs_shares_config = /usr/local/etc/cinder/nfsshares
+glance_api_servers = http://GLANCEHOST:9292
+enabled_backends = nfs
+
+[backend_defaults]
+#nfs_shares_config = /usr/local/etc/cinder/nfsshares
 volume_driver = cinder.volume.drivers.nfs.NfsDriver
 
 [database]
-connection = mysql+pymysql://cinder:CINDER_DBPASS@controller/cinder
+connection = sqlite:////var/lib/cinder/cinder.db
 
 [keystone_authtoken]
 auth_uri = http://controller:5000
-auth_url = http://controller:35357
-memcached_servers = controller:11211
+auth_url = http://controller:5000
 auth_type = password
-project_domain_name = default
-user_domain_name = default
+project_domain_id = default
+user_domain_id = default
 project_name = service
 username = cinder
 password = cinder

Added: head/misc/py-cinder/files/patch-cinder_volume_drivers_nfs.py
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/misc/py-cinder/files/patch-cinder_volume_drivers_nfs.py	Tue Jan 29 14:05:58 2019	(r491564)
@@ -0,0 +1,39 @@
+--- cinder/volume/drivers/nfs.py.orig	2018-06-18 13:37:33 UTC
++++ cinder/volume/drivers/nfs.py
+@@ -182,10 +182,10 @@ class NfsDriver(remotefs.RemoteFSSnapDriverDistributed
+ 
+         self.shares = {}  # address : options
+ 
+-        # Check if mount.nfs is installed on this system; note that we
++        # Check if mount_nfs is installed on this system; note that we
+         # need to be root, to also find mount.nfs on distributions, where
+         # it is not located in an unprivileged users PATH (e.g. /sbin).
+-        package = 'mount.nfs'
++        package = 'mount_nfs'
+         try:
+             self._execute(package, check_exit_code=False,
+                           run_as_root=True)
+@@ -342,16 +342,16 @@ class NfsDriver(remotefs.RemoteFSSnapDriverDistributed
+         """
+         mount_point = self._get_mount_point_for_share(nfs_share)
+ 
+-        df, _ = self._execute('stat', '-f', '-c', '%S %b %a', mount_point,
++        df, _ = self._execute('df', '-k', mount_point,
+                               run_as_root=self._execute_as_root)
+-        block_size, blocks_total, blocks_avail = map(float, df.split())
+-        total_available = block_size * blocks_avail
+-        total_size = block_size * blocks_total
++        df = df.splitlines()[1]
++        block_size = 1024
++        total_available = block_size * int(df.split()[3])
++        total_size = block_size * int(df.split()[1])
+ 
+-        du, _ = self._execute('du', '-sb', '--apparent-size', '--exclude',
+-                              '*snapshot*', mount_point,
++        du, _ = self._execute('du', '-Aks', mount_point,
+                               run_as_root=self._execute_as_root)
+-        total_allocated = float(du.split()[0])
++        total_allocated = float(du.split()[0]) * 1024
+         return total_size, total_available, total_allocated
+ 
+     def _get_mount_point_base(self):

Added: head/misc/py-cinder/files/patch-cinder_volume_drivers_remotefs.py
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/misc/py-cinder/files/patch-cinder_volume_drivers_remotefs.py	Tue Jan 29 14:05:58 2019	(r491564)
@@ -0,0 +1,31 @@
+--- cinder/volume/drivers/remotefs.py.orig	2018-10-09 19:58:17 UTC
++++ cinder/volume/drivers/remotefs.py
+@@ -217,9 +217,9 @@ class RemoteFSDriver(driver.BaseVD):
+         provisioned_size = 0.0
+         for share in self.shares.keys():
+             mount_path = self._get_mount_point_for_share(share)
+-            out, _ = self._execute('du', '--bytes', '-s', mount_path,
++            out, _ = self._execute('du', '-k', mount_path,
+                                    run_as_root=self._execute_as_root)
+-            provisioned_size += int(out.split()[0])
++            provisioned_size += int(out.split()[0]) * 1024
+         return round(provisioned_size / units.Gi, 2)
+ 
+     def _get_mount_point_base(self):
+@@ -892,13 +892,12 @@ class RemoteFSSnapDriverBase(RemoteFSDriver):
+         """
+         mount_point = self._get_mount_point_for_share(share)
+ 
+-        out, _ = self._execute('df', '--portability', '--block-size', '1',
+-                               mount_point,
++        out, _ = self._execute('df', '-k', mount_point,
+                                run_as_root=self._execute_as_root)
+         out = out.splitlines()[1]
+ 
+-        size = int(out.split()[1])
+-        available = int(out.split()[3])
++        size = int(out.split()[1]) * 1024
++        available = int(out.split()[3]) * 1024
+ 
+         return available, size
+ 

Modified: head/misc/py-cinder/pkg-message
==============================================================================
--- head/misc/py-cinder/pkg-message	Tue Jan 29 14:03:30 2019	(r491563)
+++ head/misc/py-cinder/pkg-message	Tue Jan 29 14:05:58 2019	(r491564)
@@ -1,5 +1,17 @@
-Please note that this is a development version.
-Only initial NFS support was added.
+==============================================================================
 
-Enable NFS client in rc.conf
-# sysrc nfs_client_enable="YES"
+For installation instructions please refer to the related wiki page:
+
+- https://wiki.freebsd.org/Ports/misc/py-cinder
+
+Please note that this is a development version and only initial NFS support
+has been tested so far.
+
+The supplied cinder.conf file is a distilled configuration which reflects the
+required settings to setup a Cinder controller/storage node with NFS support.
+
+A extensive sample configuration file can be retrieved at:
+
+https://docs.openstack.org/cinder/queens/_static/cinder.conf.sample
+
+==============================================================================

Modified: head/misc/py-cinder/pkg-plist
==============================================================================
--- head/misc/py-cinder/pkg-plist	Tue Jan 29 14:03:30 2019	(r491563)
+++ head/misc/py-cinder/pkg-plist	Tue Jan 29 14:05:58 2019	(r491564)
@@ -1,11 +1,8 @@
 @owner cinder
 @dir %%ETCDIR%%
-@sample %%ETCDIR%%/api-httpd.conf.sample
-@sample %%ETCDIR%%/logging.conf.sample
+@sample %%ETCDIR%%/api-paste.ini.sample
 @sample %%ETCDIR%%/cinder.conf.sample
-%%ETCDIR%%/api-paste.ini
-%%ETCDIR%%/policy.json
 @owner root
 @sample %%ETCDIR%%/rootwrap.conf.sample
-@dir etc/cinder/rootwrap.d
-%%ETCDIR%%/rootwrap.d/volume.filters
+@dir %%ETCDIR%%/rootwrap.d
+@sample %%ETCDIR%%/rootwrap.d/volume.filters.sample



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