1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-12 07:27:57 +00:00

- Update to 16.0.1

- Changed MASTER_SITES to the official upstream repository
- Added LICENSE_FILE
- Enabled building for Python 3+ ports
- Removed RC script glance-glare because it's no longer required
- Sorted variables a bit according to the PHB
- Added OPTIONS for DOCS, MySQL, PostgreSQL, memcached and MongoDB
- Added post-extract, post-patch and post-install targets to replace hardcoded
  occurences of /etc with ${PREFIX}/etc and to handle the installation of files into ${ETCDIR}
- Added pkg-message

PR:		232244
Submitted by:	freebsd_ports@k-worx.org
Approved by:	maintainer
Sponsored by:	iXsystems Inc.
This commit is contained in:
Martin Wilke 2019-01-29 14:03:30 +00:00
parent 7fb317283e
commit 599f96436c
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=491563
7 changed files with 148 additions and 72 deletions

View File

@ -2,76 +2,125 @@
# $FreeBSD$
PORTNAME= glance
PORTVERSION= 13.0.0
PORTREVISION= 5
PORTVERSION= 16.0.1
CATEGORIES= misc python
MASTER_SITES= https://fossies.org/linux/misc/openstack/
MASTER_SITES= https://tarballs.openstack.org/glance/
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
MAINTAINER= alexander.nusov@nfvexpress.com
COMMENT= OpenStack Image Service
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}sqlalchemy12>=0:databases/py-sqlalchemy12@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}eventlet>=0:net/py-eventlet@${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}defusedxml>=0.5.0:devel/py-defusedxml@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}sqlalchemy12>=1.0.10:databases/py-sqlalchemy12@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}eventlet>=0.18.2:net/py-eventlet@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}PasteDeploy>=1.5.0:www/py-pastedeploy@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}routes>=0:www/py-routes@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}webob>=1.2.3:www/py-webob@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}sqlalchemy-migrate>=0.9.6:databases/py-sqlalchemy-migrate@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}httplib2>=0.7.5:www/py-httplib2@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}pycrypto>=2.6:security/py-pycrypto@${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.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}stevedore>=1.16.0:devel/py-stevedore@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}futurist>=0:devel/py-futurist@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}taskflow>=1.26.0:devel/py-taskflow@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}keystoneauth1>=2.10.0:devel/py-keystoneauth1@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}keystonemiddleware>=0:devel/py-keystonemiddleware@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}routes>=2.3.1:www/py-routes@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}webob>=1.7.1:www/py-webob@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}sqlalchemy-migrate>=0.11.0:databases/py-sqlalchemy-migrate@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}sqlparse>=0.2.2:databases/py-sqlparse@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}alembic>=0.8.10:databases/py-alembic@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}httplib2>=0.9.1:www/py-httplib2@${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.utils>=3.33.0:devel/py-oslo.utils@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}stevedore>=1.20.0:devel/py-stevedore@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}futurist>=1.2.0:devel/py-futurist@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}taskflow>=2.16.0:devel/py-taskflow@${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}wsme>=0.8:devel/py-wsme@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}prettytable>=0:devel/py-prettytable@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}Paste>=0:www/py-paste@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}jsonschema>=0:devel/py-jsonschema@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}python-keystoneclient>=0:net/py-python-keystoneclient@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}openssl>=0.14:security/py-openssl@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}six>=1.9.0:devel/py-six@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}oslo.db>=0:devel/py-oslo.db@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}oslo.i18n>=2.1.0:devel/py-oslo.i18n@${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}retrying>=0:devel/py-retrying@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}prettytable>=0.7.1:devel/py-prettytable@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}Paste>=2.0.2:www/py-paste@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}jsonschema>=2.6.0:devel/py-jsonschema@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}python-keystoneclient>=3.8.0:net/py-python-keystoneclient@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}openssl>=16.2.0:security/py-openssl@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}six>=1.10.0:devel/py-six@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}oslo.db>=4.27.0:devel/py-oslo.db@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}oslo.i18n>=3.15.3:devel/py-oslo.i18n@${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}retrying>=1.2.3:devel/py-retrying@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}osprofiler>=1.4.0:devel/py-osprofiler@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}glance-store>=0.18.0:devel/py-glance-store@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}semantic_version>=2.3.1:devel/py-semantic_version@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}glance-store>=0.22.0:devel/py-glance-store@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}debtcollector>=1.2.0:devel/py-debtcollector@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}cryptography>=0:security/py-cryptography@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}cursive>=0.1.1:devel/py-cursive@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}cryptography>=1.9:security/py-cryptography@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}cursive>=0.2.1:devel/py-cursive@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}iso8601>=0.1.11:devel/py-iso8601@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}monotonic>=0.6:devel/py-monotonic@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}sqlparse>=0:databases/py-sqlparse@${PY_FLAVOR}
${PYTHON_PKGNAMEPREFIX}monotonic>=0.6:devel/py-monotonic@${PY_FLAVOR}
NO_ARCH= yes
USES= python
USE_PYTHON= autoplist distutils
USE_RC_SUBR= glance-api glance-registry glance-scrubber
USES= python:2.7
USE_PYTHON= autoplist distutils noegginfo
USE_RC_SUBR= glance-api glance-registry glance-scrubber glance-glare
USERS= glance
GROUPS= glance
NO_ARCH= yes
PORTDOCS= *
SUB_LIST= PYTHON_VER=${PYTHON_VER}
CONFLICTS_INSTALL= py??-glance-*
OPTIONS_DEFINE= DOCS
OPTIONS_GROUP= MISC
OPTIONS_GROUP_MISC= MEMCACHED MONGODB
OPTIONS_RADIO= DB
OPTIONS_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
DOCS_BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}sphinx>=1.6.2:textproc/py-sphinx@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}openstackdocstheme>=0:textproc/py-openstackdocstheme@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}xattr>=0:devel/py-xattr@${PY_FLAVOR} \
${RUN_DEPENDS}
DOCS_VARS= PYDISTUTILS_BUILD_TARGET+="build_sphinx -a -E"
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= glance-api.conf glance-cache.conf glance-manage.conf \
glance-registry.conf glance-scrubber.conf glance-api-paste.ini \
glance-registry-paste.ini policy.json rootwrap.conf
MY_REGEX= (/etc/)(ceph|glance|nova|pki|ssl)
post-extract:
@(cd ${WRKSRC}/etc; for f in *.conf; do ${MV} $${f} $${f}.sample; done)
@(cd ${WRKSRC}/etc && for f in ${MY_CONFFILES} ; do ${MV} $${f} $${f}.sample; done)
@(cd ${WRKSRC}/etc/metadefs && for f in *.json ; do ${MV} $${f} $${f}.sample; done)
post-patch:
# 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
# Replace (hardcoded) paths of config, documentation and Python files
@${GREP} -Rl -Ee '${MY_REGEX}' --null \
${WRKSRC}/etc ${WRKSRC}/doc ${WRKSRC}/glance | \
${XARGS} -0 ${REINPLACE_CMD} -i '' -Ee \
"s,${MY_REGEX},${PREFIX}\1\2,g"
post-install:
${MKDIR} ${STAGEDIR}${PREFIX}/etc/${PORTNAME}
${CP} -R ${WRKSRC}/etc/ ${STAGEDIR}${PREFIX}/etc/${PORTNAME}
@${MKDIR} ${STAGEDIR}${ETCDIR}/metadefs
.for f in ${MY_CONFFILES}
${INSTALL_DATA} ${WRKSRC}/etc/$f.sample ${STAGEDIR}${ETCDIR}
.endfor
${INSTALL_DATA} ${WRKSRC}/etc/metadefs/* ${STAGEDIR}${ETCDIR}/metadefs
post-install-DOCS-on:
@${MKDIR} ${STAGEDIR}${DOCSDIR}
(cd ${WRKSRC}/doc/build/html && \
${COPYTREE_SHARE} . ${STAGEDIR}${DOCSDIR} \
"! -name .buildinfo -and ! -name objects.inv")
.include <bsd.port.mk>

View File

@ -1,3 +1,3 @@
TIMESTAMP = 1479815522
SHA256 (glance-13.0.0.tar.gz) = 3ef3594018469ba36425afafa61ae31487b6025e6f8d9d14febcedfa7136160f
SIZE (glance-13.0.0.tar.gz) = 1742124
TIMESTAMP = 1528547437
SHA256 (glance-16.0.1.tar.gz) = ee8297c5a356e4fdeef6d721d2c91d7b61d85b55f5198763365aec511b643362
SIZE (glance-16.0.1.tar.gz) = 1957403

View File

@ -34,7 +34,7 @@ required_files=%%PREFIX%%/etc/glance/glance-api.conf
PATH=%%PREFIX%%/bin:%%PREFIX%%/sbin:$PATH
pidfile="/var/run/glance-api.pid"
procname="%%PREFIX%%/bin/python2.7"
procname="%%PREFIX%%/bin/python%%PYTHON_VER%%"
start_precmd=glance_precmd
stop_postcmd=glance_postcmd

View File

@ -34,7 +34,7 @@ required_files=%%PREFIX%%/etc/glance/glance-registry.conf
PATH=%%PREFIX%%/bin:%%PREFIX%%/sbin:$PATH
pidfile="/var/run/glance-registry.pid"
procname="%%PREFIX%%/bin/python2.7"
procname="%%PREFIX%%/bin/python%%PYTHON_VER%%"
start_precmd=glance_precmd

View File

@ -34,7 +34,7 @@ required_files=%%PREFIX%%/etc/glance/glance-scrubber.conf
PATH=%%PREFIX%%/bin:%%PREFIX%%/sbin:$PATH
pidfile="/var/run/glance-scrubber.pid"
procname="%%PREFIX%%/bin/python2.7"
procname="%%PREFIX%%/bin/python%%PYTHON_VER%%"
start_precmd=glance_precmd

View File

@ -0,0 +1,7 @@
==============================================================================
For installation instructions please refer to the related wiki page:
- https://wiki.freebsd.org/Ports/misc/py-glance
==============================================================================

View File

@ -1,24 +1,44 @@
@owner glance
@dir %%ETCDIR%%
@sample %%ETCDIR%%/glance-swift.conf.sample
@sample %%ETCDIR%%/ovf-metadata.json.sample
@sample %%ETCDIR%%/property-protections-policies.conf.sample
@sample %%ETCDIR%%/property-protections-roles.conf.sample
@sample %%ETCDIR%%/glance-api.conf.sample
@sample %%ETCDIR%%/glance-api-paste.ini.sample
@sample %%ETCDIR%%/glance-cache.conf.sample
@sample %%ETCDIR%%/glance-glare.conf.sample
@sample %%ETCDIR%%/glance-manage.conf.sample
@sample %%ETCDIR%%/glance-registry.conf.sample
@sample %%ETCDIR%%/glance-registry-paste.ini.sample
@sample %%ETCDIR%%/glance-scrubber.conf.sample
%%ETCDIR%%/oslo-config-generator/glance-api.conf
%%ETCDIR%%/oslo-config-generator/glance-cache.conf
%%ETCDIR%%/oslo-config-generator/glance-glare.conf
%%ETCDIR%%/oslo-config-generator/glance-manage.conf
%%ETCDIR%%/oslo-config-generator/glance-registry.conf
%%ETCDIR%%/oslo-config-generator/glance-scrubber.conf
%%ETCDIR%%/policy.json
%%ETCDIR%%/schema-image.json
%%ETCDIR%%/glance-api-paste.ini
%%ETCDIR%%/glance-glare-paste.ini
%%ETCDIR%%/glance-registry-paste.ini
@dir %%ETCDIR%%/metadefs
@sample %%ETCDIR%%/metadefs/cim-processor-allocation-setting-data.json.sample
@sample %%ETCDIR%%/metadefs/cim-resource-allocation-setting-data.json.sample
@sample %%ETCDIR%%/metadefs/cim-storage-allocation-setting-data.json.sample
@sample %%ETCDIR%%/metadefs/cim-virtual-system-setting-data.json.sample
@sample %%ETCDIR%%/metadefs/compute-aggr-disk-filter.json.sample
@sample %%ETCDIR%%/metadefs/compute-aggr-iops-filter.json.sample
@sample %%ETCDIR%%/metadefs/compute-aggr-num-instances.json.sample
@sample %%ETCDIR%%/metadefs/compute-cpu-pinning.json.sample
@sample %%ETCDIR%%/metadefs/compute-guest-memory-backing.json.sample
@sample %%ETCDIR%%/metadefs/compute-guest-shutdown.json.sample
@sample %%ETCDIR%%/metadefs/compute-host-capabilities.json.sample
@sample %%ETCDIR%%/metadefs/compute-hypervisor.json.sample
@sample %%ETCDIR%%/metadefs/compute-instance-data.json.sample
@sample %%ETCDIR%%/metadefs/compute-libvirt-image.json.sample
@sample %%ETCDIR%%/metadefs/compute-libvirt.json.sample
@sample %%ETCDIR%%/metadefs/compute-quota.json.sample
@sample %%ETCDIR%%/metadefs/compute-randomgen.json.sample
@sample %%ETCDIR%%/metadefs/compute-trust.json.sample
@sample %%ETCDIR%%/metadefs/compute-vcputopology.json.sample
@sample %%ETCDIR%%/metadefs/compute-vmware-flavor.json.sample
@sample %%ETCDIR%%/metadefs/compute-vmware-quota-flavor.json.sample
@sample %%ETCDIR%%/metadefs/compute-vmware.json.sample
@sample %%ETCDIR%%/metadefs/compute-watchdog.json.sample
@sample %%ETCDIR%%/metadefs/compute-xenapi.json.sample
@sample %%ETCDIR%%/metadefs/glance-common-image-props.json.sample
@sample %%ETCDIR%%/metadefs/image-signature-verification.json.sample
@sample %%ETCDIR%%/metadefs/operating-system.json.sample
@sample %%ETCDIR%%/metadefs/software-databases.json.sample
@sample %%ETCDIR%%/metadefs/software-runtimes.json.sample
@sample %%ETCDIR%%/metadefs/software-webservers.json.sample
@sample %%ETCDIR%%/metadefs/storage-volume-type.json.sample
@sample %%ETCDIR%%/policy.json.sample
@sample %%ETCDIR%%/rootwrap.conf.sample
%%ETCDIR%%/metadefs/README