diff options
author | Roman Bogorodskiy <novel@FreeBSD.org> | 2016-11-27 11:58:23 +0000 |
---|---|---|
committer | Roman Bogorodskiy <novel@FreeBSD.org> | 2016-11-27 11:58:23 +0000 |
commit | 4ccb86a7b4a995386cb2f3936c0118fb450f5ab5 (patch) | |
tree | 4a92abc789dacc061b8c399263e1d9b6a81298d8 /misc/py-glance | |
parent | d737ea4bf838d8e393b3bddd696d27b537d06fb8 (diff) | |
download | ports-4ccb86a7b4a995386cb2f3936c0118fb450f5ab5.tar.gz ports-4ccb86a7b4a995386cb2f3936c0118fb450f5ab5.zip |
Notes
Diffstat (limited to 'misc/py-glance')
-rw-r--r-- | misc/py-glance/Makefile | 5 | ||||
-rw-r--r-- | misc/py-glance/distinfo | 2 | ||||
-rw-r--r-- | misc/py-glance/files/glance-api.in | 51 | ||||
-rw-r--r-- | misc/py-glance/files/glance-glare.in | 55 | ||||
-rw-r--r-- | misc/py-glance/files/glance-registry.in | 45 | ||||
-rw-r--r-- | misc/py-glance/files/glance-scrubber.in | 44 |
6 files changed, 165 insertions, 37 deletions
diff --git a/misc/py-glance/Makefile b/misc/py-glance/Makefile index 85e406610cfd..c6f6a65234bc 100644 --- a/misc/py-glance/Makefile +++ b/misc/py-glance/Makefile @@ -3,6 +3,7 @@ PORTNAME= glance PORTVERSION= 13.0.0 +PORTREVISION= 1 CATEGORIES= misc python MASTER_SITES= https://fossies.org/linux/misc/openstack/ PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} @@ -10,6 +11,8 @@ PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} MAINTAINER= alexander.nusov@nfvexpress.com COMMENT= OpenStack Image Service +LICENSE= APACHE20 + BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}pbr>=1.6:devel/py-pbr RUN_DEPENDS:= ${BUILD_DEPENDS} @@ -60,7 +63,7 @@ NO_ARCH= yes USES= python USE_PYTHON= autoplist distutils noegginfo -USE_RC_SUBR= glance-api glance-registry glance-scrubber +USE_RC_SUBR= glance-api glance-registry glance-scrubber glance-glare USERS= glance GROUPS= glance diff --git a/misc/py-glance/distinfo b/misc/py-glance/distinfo index 4ce99ff17176..ff2c98b61584 100644 --- a/misc/py-glance/distinfo +++ b/misc/py-glance/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1476650212 +TIMESTAMP = 1479815522 SHA256 (glance-13.0.0.tar.gz) = 3ef3594018469ba36425afafa61ae31487b6025e6f8d9d14febcedfa7136160f SIZE (glance-13.0.0.tar.gz) = 1742124 diff --git a/misc/py-glance/files/glance-api.in b/misc/py-glance/files/glance-api.in index 7073fdc2f9eb..d569a744372b 100644 --- a/misc/py-glance/files/glance-api.in +++ b/misc/py-glance/files/glance-api.in @@ -2,33 +2,60 @@ # # $FreeBSD$ # + # PROVIDE: glance_api # REQUIRE: LOGIN # KEYWORD: shutdown + +# +# Add the following lines to /etc/rc.conf to enable glance_api: +# +# glance_api_enable="YES" +# +# glance_api_enable (bool): +# Set it to "YES" to enable glance_api. +# Default is "NO". +# +# glance_api_logdir (str): +# Set it to chagge log directory +# Default is "/var/log/glance" # -# Add the following lines to /etc/rc.conf to enable glance-api: +# glance_api_args (str): +# Set it to change command line arguments. +# Default is "--log-file ${glance_api_logdir}/glance-api.log" # -# glance_api_enable (bool): Set it to "YES" to enable glance-api. -# Default is "NO". . /etc/rc.subr -name="glance_api" +name=glance_api rcvar=glance_api_enable -extra_commands="reload shutdown status" -reload_cmd="glance-control api reload" -shutdown_cmd="glance-control api shutdown" -start_cmd="glance-control api start" -status_cmd="glance-control api status" -stop_cmd="glance-control api stop" - 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" -PATH=%%PREFIX%%/bin:$PATH +start_precmd=glance_precmd +stop_postcmd=glance_postcmd load_rc_config $name : ${glance_api_enable:="NO"} +: ${glance_api_logdir:="/var/log/glance"} +: ${glance_api_args:="--log-file ${glance_api_logdir}/glance-api.log"} + +command="/usr/sbin/daemon" +command_args="-f -p ${pidfile} -u glance glance-api ${glance_api_args}" + +glance_precmd() { + mkdir -p ${glance_api_logdir} + chown glance ${glance_api_logdir} +} + +glance_postcmd() { + # this is a workaround for a glance-api bug + pkill -u glance -f glance-api +} run_rc_command "$1" diff --git a/misc/py-glance/files/glance-glare.in b/misc/py-glance/files/glance-glare.in new file mode 100644 index 000000000000..1f06b83e89fa --- /dev/null +++ b/misc/py-glance/files/glance-glare.in @@ -0,0 +1,55 @@ +#!/bin/sh +# +# $FreeBSD$ +# + +# PROVIDE: glance_glare +# REQUIRE: LOGIN +# KEYWORD: shutdown + +# +# Add the following lines to /etc/rc.conf to enable glance_glare: +# +# glance_glare_enable="YES" +# +# glance_glare_enable (bool): +# Set it to "YES" to enable glance_glare. +# Default is "NO". +# +# glance_glare_logdir (str): +# Set it to chagge log directory +# Default is "/var/log/glance" +# +# glance_glare_args (str): +# Set it to change command line arguments. +# Default is "--log-file ${glance_glare_logdir}/glance-glare.log" +# + +. /etc/rc.subr + +name=glance_glare +rcvar=glance_glare_enable + +required_files=%%PREFIX%%/etc/glance/glance-glare.conf +PATH=%%PREFIX%%/bin:%%PREFIX%%/sbin:$PATH + +pidfile="/var/run/glance-glare.pid" +procname="%%PREFIX%%/bin/python2.7" + +start_precmd=glance_precmd + +load_rc_config $name + +: ${glance_glare_enable:="NO"} +: ${glance_glare_logdir:="/var/log/glance"} +: ${glance_glare_args:="--log-file ${glance_glare_logdir}/glance-glare.log"} + +command="/usr/sbin/daemon" +command_args="-f -p ${pidfile} -u glance glance-glare ${glance_glare_args}" + +glance_precmd() { + mkdir -p ${glance_glare_logdir} + chown glance ${glance_glare_logdir} +} + +run_rc_command "$1" diff --git a/misc/py-glance/files/glance-registry.in b/misc/py-glance/files/glance-registry.in index 598652706aba..910172abb835 100644 --- a/misc/py-glance/files/glance-registry.in +++ b/misc/py-glance/files/glance-registry.in @@ -2,33 +2,54 @@ # # $FreeBSD$ # + # PROVIDE: glance_registry # REQUIRE: LOGIN # KEYWORD: shutdown + +# +# Add the following lines to /etc/rc.conf to enable glance_registry: +# +# glance_registry_enable="YES" +# +# glance_registry_enable (bool): +# Set it to "YES" to enable glance_registry. +# Default is "NO". # -# Add the following lines to /etc/rc.conf to enable glance-registry: +# glance_registry_logdir (str): +# Set it to chagge log directory +# Default is "/var/log/glance" +# +# glance_registry_args (str): +# Set it to change command line arguments. +# Default is "--log-file ${glance_registry_logdir}/glance-registry.log" # -# glance_registry_enable (bool): Set it to "YES" to enable glance-registry. -# Default is "NO". . /etc/rc.subr -name="glance_registry" +name=glance_registry rcvar=glance_registry_enable -extra_commands="reload shutdown status" -reload_cmd="glance-control registry reload" -shutdown_cmd="glance-control registry shutdown" -start_cmd="glance-control registry start" -status_cmd="glance-control registry status" -stop_cmd="glance-control registry stop" - 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" -PATH=%%PREFIX%%/bin:$PATH +start_precmd=glance_precmd load_rc_config $name : ${glance_registry_enable:="NO"} +: ${glance_registry_logdir:="/var/log/glance"} +: ${glance_registry_args:="--log-file ${glance_registry_logdir}/glance-registry.log"} + +command="/usr/sbin/daemon" +command_args="-f -p ${pidfile} -u glance glance-registry ${glance_registry_args}" + +glance_precmd() { + mkdir -p ${glance_registry_logdir} + chown glance ${glance_registry_logdir} +} run_rc_command "$1" diff --git a/misc/py-glance/files/glance-scrubber.in b/misc/py-glance/files/glance-scrubber.in index d59afb3aaf99..6f373685b853 100644 --- a/misc/py-glance/files/glance-scrubber.in +++ b/misc/py-glance/files/glance-scrubber.in @@ -2,32 +2,54 @@ # # $FreeBSD$ # + # PROVIDE: glance_scrubber # REQUIRE: LOGIN # KEYWORD: shutdown + +# +# Add the following lines to /etc/rc.conf to enable glance_scrubber: +# +# glance_scrubber_enable="YES" +# +# glance_scrubber_enable (bool): +# Set it to "YES" to enable glance_scrubber. +# Default is "NO". # -# Add the following lines to /etc/rc.conf to enable glance-scrubber: +# glance_scrubber_logdir (str): +# Set it to chagge log directory +# Default is "/var/log/glance" +# +# glance_scrubber_args (str): +# Set it to change command line arguments. +# Default is "--log-file ${glance_scrubber_logdir}/glance-scrubber.log" # -# glance_scrubber_enable (bool): Set it to "YES" to enable glance-scrubber. -# Default is "NO". . /etc/rc.subr -name="glance_scrubber" +name=glance_scrubber rcvar=glance_scrubber_enable -extra_commands="shutdown status" -shutdown_cmd="glance-control scrubber shutdown" -start_cmd="glance-control scrubber start" -status_cmd="glance-control scrubber status" -stop_cmd="glance-control scrubber stop" - 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" -PATH=%%PREFIX%%/bin:$PATH +start_precmd=glance_precmd load_rc_config $name : ${glance_scrubber_enable:="NO"} +: ${glance_scrubber_logdir:="/var/log/glance"} +: ${glance_scrubber_args:="--log-file ${glance_scrubber_logdir}/glance-scrubber.log"} + +command="/usr/sbin/daemon" +command_args="-f -p ${pidfile} -u glance glance-scrubber ${glance_scrubber_args}" + +glance_precmd() { + mkdir -p ${glance_scrubber_logdir} + chown glance ${glance_scrubber_logdir} +} run_rc_command "$1" |