diff options
author | Matthew Thode <prometheanfire@gentoo.org> | 2013-11-18 03:02:59 +0000 |
---|---|---|
committer | Matthew Thode <prometheanfire@gentoo.org> | 2013-11-18 03:02:59 +0000 |
commit | 8a2d885c97dcd358a71a20f5f8d554f8b4b1b394 (patch) | |
tree | 811c5c2fdb7b2f74626eed9dfbbf9ade518a4553 /app-admin | |
parent | Removed pixman-0.32.2. (diff) | |
download | gentoo-2-8a2d885c97dcd358a71a20f5f8d554f8b4b1b394.tar.gz gentoo-2-8a2d885c97dcd358a71a20f5f8d554f8b4b1b394.tar.bz2 gentoo-2-8a2d885c97dcd358a71a20f5f8d554f8b4b1b394.zip |
fixing bug 490838
(Portage version: 2.2.7/cvs/Linux x86_64, signed Manifest commit with key 0x2471eb3e40ac5ac3)
Diffstat (limited to 'app-admin')
-rw-r--r-- | app-admin/glance/ChangeLog | 6 | ||||
-rw-r--r-- | app-admin/glance/files/glance-3.initd | 71 | ||||
-rw-r--r-- | app-admin/glance/glance-2013.2-r2.ebuild | 13 | ||||
-rw-r--r-- | app-admin/glance/glance-2013.2.9999.ebuild | 13 |
4 files changed, 96 insertions, 7 deletions
diff --git a/app-admin/glance/ChangeLog b/app-admin/glance/ChangeLog index 60ddfeec992a..65b61912d5db 100644 --- a/app-admin/glance/ChangeLog +++ b/app-admin/glance/ChangeLog @@ -1,6 +1,10 @@ # ChangeLog for app-admin/glance # Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/app-admin/glance/ChangeLog,v 1.25 2013/11/14 11:08:12 idella4 Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-admin/glance/ChangeLog,v 1.26 2013/11/18 03:02:59 prometheanfire Exp $ + + 18 Nov 2013; Matthew Thode <prometheanfire@gentoo.org> +files/glance-3.initd, + glance-2013.2-r2.ebuild, glance-2013.2.9999.ebuild: + fixing bug 490838 *glance-2013.2-r2 (14 Nov 2013) diff --git a/app-admin/glance/files/glance-3.initd b/app-admin/glance/files/glance-3.initd new file mode 100644 index 000000000000..5292c8ec1ead --- /dev/null +++ b/app-admin/glance/files/glance-3.initd @@ -0,0 +1,71 @@ +#!/sbin/runscript +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/app-admin/glance/files/glance-3.initd,v 1.1 2013/11/18 03:02:59 prometheanfire Exp $ + +depend() { + need net +} + +BASENAME=$(echo $SVCNAME | cut -d '-' -f 1) +SERVERNAME=$(echo $SVCNAME | cut -d '-' -f 2) +SERVICES=( api registry scrubber ) +if [ ${SVCNAME} == 'glance' ]; then + SERVERNAME='all' +fi + +checkconfig() { + if [ ! -r /etc/conf.d/$BASENAME ]; then + eerror "No glance conf.dfile found: /etc/conf.d/$BASENAME)" + return 1 + fi + if [ ${SVCNAME} == 'glance' ]; then + for service in ${SERVICES[*]}; do + if [ ! -r /etc/glance/glance-${service}.conf ]; then + eerror "No glance-${SERVICE} config file found: /etc/glance/glance-${SERVICE}.conf)" + return 1 + fi + done + elif [ ! -r /etc/glance/${SVCNAME}.conf ]; then + eerror "No ${BASENAME} config file found: /etc/glance/${SVCNAME}.conf)" + return 1 + fi + return 0 +} + + +start() { + checkconfig || return $? + . /etc/conf.d/$BASENAME + + ebegin "Starting ${SVCNAME}" + if [ ! -d ${PID_PATH} ]; then + mkdir ${PID_PATH} + fi + + start-stop-daemon --start --quiet --pidfile "${PID_PATH}/${SVCNAME}.pid" --user glance --exec /usr/bin/glance-control ${SERVERNAME} start /etc/glance/glance-${SERVERNAME}.conf + + eend $? "Failed to start ${SVCNAME}" +} + +stop() { + checkconfig || return $? + . /etc/conf.d/$BASENAME + + ebegin "Stopping ${SVCNAME}" + + if [ ${SVCNAME} == 'glance' ]; then + for service in ${SERVICES[*]}; do + start-stop-daemon --stop --quiet --pidfile "${PID_PATH}/glance-${service}.pid" \ + --exec /usr/bin/glance-control ${service} stop /etc/glance/glance-${service}.conf + done + else + start-stop-daemon --stop --quiet --pidfile "${PID_PATH}/${SVCNAME}.pid" \ + --exec /usr/bin/glance-control ${SERVERNAME} stop /etc/glance/glance-${SERVERNAME}.conf + fi + eend $? "Failed to stop ${SVCNAME}" +} + +#restart() { +# +#} diff --git a/app-admin/glance/glance-2013.2-r2.ebuild b/app-admin/glance/glance-2013.2-r2.ebuild index f0c77f4281e4..db0fc8426d4b 100644 --- a/app-admin/glance/glance-2013.2-r2.ebuild +++ b/app-admin/glance/glance-2013.2-r2.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2013 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/app-admin/glance/glance-2013.2-r2.ebuild,v 1.1 2013/11/14 11:08:12 idella4 Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-admin/glance/glance-2013.2-r2.ebuild,v 1.2 2013/11/18 03:02:59 prometheanfire Exp $ EAPI=5 PYTHON_COMPAT=( python2_7 ) @@ -70,7 +70,7 @@ RDEPEND=">=dev-python/pbr-0.5.21[${PYTHON_USEDEP}] >=dev-python/kombu-2.4.8[${PYTHON_USEDEP}] >=dev-python/pycrypto-2.6[${PYTHON_USEDEP}] <=dev-python/iso8601-0.1.4-r1[${PYTHON_USEDEP}] - >=dev-python/oslo-config-1.2.0[${PYTHON_USEDEP}] + >=dev-python/oslo-config-1.2.1[${PYTHON_USEDEP}] swift? ( >=dev-python/python-swiftclient-1.5[${PYTHON_USEDEP}] <dev-python/python-swiftclient-2[${PYTHON_USEDEP}] @@ -87,6 +87,11 @@ RDEPEND=">=dev-python/pbr-0.5.21[${PYTHON_USEDEP}] PATCHES=( "${FILESDIR}"/${P}-sphinx_mapping.patch ) +pkg_setup() { + enewgroup glance + enewuser glance -1 -1 /var/lib/glance glance +} + python_compile_all() { use doc && "${PYTHON}" setup.py build_sphinx } @@ -101,7 +106,7 @@ python_test() { python_install() { distutils-r1_python_install newconfd "${FILESDIR}/glance.confd" glance - newinitd "${FILESDIR}/glance-2.initd" glance + newinitd "${FILESDIR}/glance-3.initd" glance for function in api registry scrubber; do dosym /etc/init.d/glance /etc/init.d/glance-${function} @@ -124,6 +129,8 @@ python_install() { doins "etc/logging.cnf.sample" doins "etc/policy.json" doins "etc/schema-image.json" + + fowners glance:glance /var/run/glance /var/log/glance /var/lib/glance/images /var/lib/glance/scrubber /etc/glance } python_install_all() { diff --git a/app-admin/glance/glance-2013.2.9999.ebuild b/app-admin/glance/glance-2013.2.9999.ebuild index 301e590975dc..009140a2975d 100644 --- a/app-admin/glance/glance-2013.2.9999.ebuild +++ b/app-admin/glance/glance-2013.2.9999.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2013 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/app-admin/glance/glance-2013.2.9999.ebuild,v 1.2 2013/11/14 11:08:12 idella4 Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-admin/glance/glance-2013.2.9999.ebuild,v 1.3 2013/11/18 03:02:59 prometheanfire Exp $ EAPI=5 PYTHON_COMPAT=( python2_7 ) @@ -71,7 +71,7 @@ RDEPEND=">=dev-python/pbr-0.5.21[${PYTHON_USEDEP}] >=dev-python/kombu-2.4.8[${PYTHON_USEDEP}] >=dev-python/pycrypto-2.6[${PYTHON_USEDEP}] >=dev-python/iso8601-0.1.8[${PYTHON_USEDEP}] - >=dev-python/oslo-config-1.2.0[${PYTHON_USEDEP}] + >=dev-python/oslo-config-1.2.1[${PYTHON_USEDEP}] swift? ( >=dev-python/python-swiftclient-1.5[${PYTHON_USEDEP}] <dev-python/python-swiftclient-2[${PYTHON_USEDEP}] @@ -88,6 +88,11 @@ RDEPEND=">=dev-python/pbr-0.5.21[${PYTHON_USEDEP}] PATCHES=( "${FILESDIR}"/${PN}-2013.2-sphinx_mapping.patch ) +pkg_setup() { + enewgroup glance + enewuser glance -1 -1 /var/lib/glance glance +} + python_compile_all() { use doc && "${PYTHON}" setup.py build_sphinx } @@ -102,7 +107,7 @@ python_test() { python_install() { distutils-r1_python_install newconfd "${FILESDIR}/glance.confd" glance - newinitd "${FILESDIR}/glance-2.initd" glance + newinitd "${FILESDIR}/glance-3.initd" glance for function in api registry scrubber; do dosym /etc/init.d/glance /etc/init.d/glance-${function} @@ -125,6 +130,8 @@ python_install() { doins "etc/logging.cnf.sample" doins "etc/policy.json" doins "etc/schema-image.json" + + fowners glance:glance /var/run/glance /var/log/glance /var/lib/glance/images /var/lib/glance/scrubber /etc/glance } python_install_all() { use doc && local HTML_DOCS=( doc/build/html/. ) |