* Added python3 support.
* Added oslo-messaging-zmq-receiver.init sysv-rc script.
This commit is contained in:
parent
06bcd7a4d8
commit
5cb89bf41f
2
debian/changelog
vendored
2
debian/changelog
vendored
@ -7,6 +7,8 @@ python-oslo.messaging (1.14.0-1) UNRELEASED; urgency=medium
|
|||||||
[ Thomas Goirand ]
|
[ Thomas Goirand ]
|
||||||
* Make the build reproducible. Thanks to Juan Picca <jumapico@gmail.com> for
|
* Make the build reproducible. Thanks to Juan Picca <jumapico@gmail.com> for
|
||||||
the bug report and patch (Closes: #788480).
|
the bug report and patch (Closes: #788480).
|
||||||
|
* Added python3 support.
|
||||||
|
* Added oslo-messaging-zmq-receiver.init sysv-rc script.
|
||||||
|
|
||||||
-- Thomas Goirand <zigo@debian.org> Thu, 11 Jun 2015 23:37:49 +0200
|
-- Thomas Goirand <zigo@debian.org> Thu, 11 Jun 2015 23:37:49 +0200
|
||||||
|
|
||||||
|
35
debian/control
vendored
35
debian/control
vendored
@ -80,23 +80,21 @@ Description: oslo messaging library - Python 2.x
|
|||||||
|
|
||||||
Package: python3-oslo.messaging
|
Package: python3-oslo.messaging
|
||||||
Architecture: all
|
Architecture: all
|
||||||
Depends: python-aioeventlet (>= 0.4),
|
Depends: python3-aioeventlet (>= 0.4),
|
||||||
python-amqp (>= 1.4.0),
|
python3-amqp (>= 1.4.0),
|
||||||
python-concurrent.futures,
|
python3-eventlet (>= 0.17.3),
|
||||||
python-eventlet (>= 0.17.3),
|
python3-kombu (>= 3.0.7),
|
||||||
python-kombu (>= 3.0.7),
|
python3-oslo.config (>= 1:1.11.0),
|
||||||
python-oslo.config (>= 1:1.11.0),
|
python3-oslo.context (>= 0.2.0),
|
||||||
python-oslo.context (>= 0.2.0),
|
python3-oslo.i18n (>= 1.5.0),
|
||||||
python-oslo.i18n (>= 1.5.0),
|
python3-oslo.middleware (>= 1.2.0),
|
||||||
python-oslo.middleware (>= 1.2.0),
|
python3-oslo.serialization (>= 1.4.0),
|
||||||
python-oslo.serialization (>= 1.4.0),
|
python3-oslo.utils (>= 1.4.0),
|
||||||
python-oslo.utils (>= 1.4.0),
|
python3-pbr,
|
||||||
python-pbr,
|
python3-six (>= 1.9.0),
|
||||||
python-six (>= 1.9.0),
|
python3-stevedore (>= 1.3.0),
|
||||||
python-stevedore (>= 1.3.0),
|
python3-yaml,
|
||||||
python-trollius,
|
python3-zmq,
|
||||||
python-yaml,
|
|
||||||
python-zmq,
|
|
||||||
${misc:Depends},
|
${misc:Depends},
|
||||||
${python3:Depends},
|
${python3:Depends},
|
||||||
Description: oslo messaging library - Python 3.x
|
Description: oslo messaging library - Python 3.x
|
||||||
@ -110,8 +108,7 @@ Description: oslo messaging library - Python 3.x
|
|||||||
Package: oslo-messaging-zmq-receiver
|
Package: oslo-messaging-zmq-receiver
|
||||||
Architecture: all
|
Architecture: all
|
||||||
Depends: adduser,
|
Depends: adduser,
|
||||||
python-oslo.messaging (= ${binary:Version}),
|
python-oslo.messaging (= ${binary:Version}) | python3-oslo.messaging (= ${binary:Version}),
|
||||||
python-zmq,
|
|
||||||
${misc:Depends},
|
${misc:Depends},
|
||||||
Description: Oslo Messaging ZeroMQ receiver daemon
|
Description: Oslo Messaging ZeroMQ receiver daemon
|
||||||
The Oslo Messaging API supports RPC and notifications over a number of
|
The Oslo Messaging API supports RPC and notifications over a number of
|
||||||
|
131
debian/oslo-messaging-zmq-receiver.init
vendored
Normal file
131
debian/oslo-messaging-zmq-receiver.init
vendored
Normal file
@ -0,0 +1,131 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
### BEGIN INIT INFO
|
||||||
|
# Provides: oslo-messaging-zmq-receiver
|
||||||
|
# Required-Start: $network $local_fs $remote_fs $syslog
|
||||||
|
# Required-Stop: $remote_fs
|
||||||
|
# Should-Start: postgresql mysql keystone ntp rabbitmq-server
|
||||||
|
# Should-Stop: postgresql mysql keystone ntp rabbitmq-server
|
||||||
|
# Default-Start: 2 3 4 5
|
||||||
|
# Default-Stop: 0 1 6
|
||||||
|
# Short-Description: oslo-messaging-zmq-receiver
|
||||||
|
# Description: oslo-messaging-zmq-receiver
|
||||||
|
### END INIT INFO
|
||||||
|
|
||||||
|
# Author: Thomas Goirand <zigo@debian.org>
|
||||||
|
|
||||||
|
# PATH should only include /usr/* if it runs after the mountnfs.sh script
|
||||||
|
PATH=/sbin:/usr/sbin:/bin:/usr/bin
|
||||||
|
DESC="OpenStack oslo.messaging ZMQ Receiver"
|
||||||
|
PROJECT_NAME=oslo
|
||||||
|
NAME=${PROJECT_NAME}-messaging-zmq-receiver
|
||||||
|
CONFIG_FILE=/etc/${PROJECT_NAME}/oslo-messaging.conf
|
||||||
|
|
||||||
|
# PATH should only include /usr/* if it runs after the mountnfs.sh script
|
||||||
|
PATH=/sbin:/usr/sbin:/bin:/usr/bin
|
||||||
|
|
||||||
|
if [ -z "${DAEMON}" ] ; then
|
||||||
|
DAEMON=/usr/bin/${NAME}
|
||||||
|
fi
|
||||||
|
PIDFILE=/var/run/${PROJECT_NAME}/${NAME}.pid
|
||||||
|
if [ -z "${SCRIPTNAME}" ] ; then
|
||||||
|
SCRIPTNAME=/etc/init.d/${NAME}
|
||||||
|
fi
|
||||||
|
if [ -z "${SYSTEM_USER}" ] ; then
|
||||||
|
SYSTEM_USER=${PROJECT_NAME}
|
||||||
|
fi
|
||||||
|
if [ -z "${SYSTEM_USER}" ] ; then
|
||||||
|
SYSTEM_GROUP=${PROJECT_NAME}
|
||||||
|
fi
|
||||||
|
if [ "${SYSTEM_USER}" != "root" ] ; then
|
||||||
|
STARTDAEMON_CHUID="--chuid ${SYSTEM_USER}:${SYSTEM_GROUP}"
|
||||||
|
fi
|
||||||
|
if [ -z "${CONFIG_FILE}" ] ; then
|
||||||
|
CONFIG_FILE=/etc/${PROJECT_NAME}/${PROJECT_NAME}.conf
|
||||||
|
fi
|
||||||
|
LOGFILE=/var/log/${PROJECT_NAME}/${NAME}.log
|
||||||
|
if [ -z "${NO_OPENSTACK_CONFIG_FILE_DAEMON_ARG}" ] ; then
|
||||||
|
DAEMON_ARGS="${DAEMON_ARGS} --config-file=${CONFIG_FILE}"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Exit if the package is not installed
|
||||||
|
[ -x $DAEMON ] || exit 0
|
||||||
|
|
||||||
|
# If ran as root, create /var/lock/X, /var/run/X, /var/lib/X and /var/log/X as needed
|
||||||
|
mkdir -p /var/run/openstack
|
||||||
|
chown ${SYSTEM_USER}:${SYSTEM_GROUP} /var/run/openstack
|
||||||
|
|
||||||
|
# This defines init_is_upstart which we use later on (+ more...)
|
||||||
|
. /lib/lsb/init-functions
|
||||||
|
|
||||||
|
# Manage log options: logfile and/or syslog, depending on user's choosing
|
||||||
|
[ -r /etc/default/openstack ] && . /etc/default/openstack
|
||||||
|
[ -r /etc/default/$NAME ] && . /etc/default/$NAME
|
||||||
|
[ "x$USE_SYSLOG" = "xyes" ] && DAEMON_ARGS="$DAEMON_ARGS --use-syslog"
|
||||||
|
[ "x$USE_LOGFILE" != "xno" ] && DAEMON_ARGS="$DAEMON_ARGS --log-file=$LOGFILE"
|
||||||
|
|
||||||
|
do_start() {
|
||||||
|
start-stop-daemon --start --quiet --background ${STARTDAEMON_CHUID} --make-pidfile --pidfile ${PIDFILE} --chdir /var/lib/${PROJECT_NAME} --startas $DAEMON \
|
||||||
|
--test > /dev/null || return 1
|
||||||
|
start-stop-daemon --start --quiet --background ${STARTDAEMON_CHUID} --make-pidfile --pidfile ${PIDFILE} --chdir /var/lib/${PROJECT_NAME} --startas $DAEMON \
|
||||||
|
-- $DAEMON_ARGS || return 2
|
||||||
|
}
|
||||||
|
|
||||||
|
do_stop() {
|
||||||
|
start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --pidfile $PIDFILE
|
||||||
|
RETVAL=$?
|
||||||
|
rm -f $PIDFILE
|
||||||
|
return "$RETVAL"
|
||||||
|
}
|
||||||
|
|
||||||
|
do_systemd_start() {
|
||||||
|
exec $DAEMON $DAEMON_ARGS
|
||||||
|
}
|
||||||
|
|
||||||
|
case "$1" in
|
||||||
|
start)
|
||||||
|
init_is_upstart > /dev/null 2>&1 && exit 1
|
||||||
|
log_daemon_msg "Starting $DESC" "$NAME"
|
||||||
|
do_start
|
||||||
|
case $? in
|
||||||
|
0|1) log_end_msg 0 ;;
|
||||||
|
2) log_end_msg 1 ;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
stop)
|
||||||
|
init_is_upstart > /dev/null 2>&1 && exit 0
|
||||||
|
log_daemon_msg "Stopping $DESC" "$NAME"
|
||||||
|
do_stop
|
||||||
|
case $? in
|
||||||
|
0|1) log_end_msg 0 ;;
|
||||||
|
2) log_end_msg 1 ;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
status)
|
||||||
|
status_of_proc "$DAEMON" "$NAME" && exit 0 || exit $?
|
||||||
|
;;
|
||||||
|
systemd-start)
|
||||||
|
do_systemd_start
|
||||||
|
;;
|
||||||
|
restart|force-reload)
|
||||||
|
init_is_upstart > /dev/null 2>&1 && exit 1
|
||||||
|
log_daemon_msg "Restarting $DESC" "$NAME"
|
||||||
|
do_stop
|
||||||
|
case $? in
|
||||||
|
0|1)
|
||||||
|
do_start
|
||||||
|
case $? in
|
||||||
|
0) log_end_msg 0 ;;
|
||||||
|
1) log_end_msg 1 ;; # Old process is still running
|
||||||
|
*) log_end_msg 1 ;; # Failed to start
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
*) log_end_msg 1 ;; # Failed to stop
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "Usage: $SCRIPTNAME {start|stop|status|restart|force-reload|systemd-start}" >&2
|
||||||
|
exit 3
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
exit 0
|
11
debian/python-oslo.messaging.postinst
vendored
Normal file
11
debian/python-oslo.messaging.postinst
vendored
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
if [ "$1" = "configure" ] ; then
|
||||||
|
update-alternatives --install /usr/bin/oslo-messaging-zmq-receiver oslo-messaging-zmq-receiver /usr/bin/python2-oslo-messaging-zmq-receiver 300
|
||||||
|
fi
|
||||||
|
|
||||||
|
#DEBHELPER#
|
||||||
|
|
||||||
|
exit 0
|
11
debian/python-oslo.messaging.postrm
vendored
Normal file
11
debian/python-oslo.messaging.postrm
vendored
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
if [ "$1" = "remove" ] || [ "$1" = "disappear" ] ; then
|
||||||
|
update-alternatives --remove oslo-messaging-zmq-receiver /usr/bin/python2-oslo-messaging-zmq-receiver
|
||||||
|
fi
|
||||||
|
|
||||||
|
#DEBHELPER#
|
||||||
|
|
||||||
|
exit 0
|
11
debian/python-oslo.messaging.prerm
vendored
Normal file
11
debian/python-oslo.messaging.prerm
vendored
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
if [ "$1" = "remove" ] ; then
|
||||||
|
update-alternatives --remove oslo-messaging-zmq-receiver /usr/bin/python2-oslo-messaging-zmq-receiver
|
||||||
|
fi
|
||||||
|
|
||||||
|
#DEBHELPER#
|
||||||
|
|
||||||
|
exit 0
|
11
debian/python3-oslo.messaging.postinst
vendored
Normal file
11
debian/python3-oslo.messaging.postinst
vendored
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
if [ "$1" = "configure" ] ; then
|
||||||
|
update-alternatives --install /usr/bin/oslo-messaging-zmq-receiver oslo-messaging-zmq-receiver /usr/bin/python3-oslo-messaging-zmq-receiver 200
|
||||||
|
fi
|
||||||
|
|
||||||
|
#DEBHELPER#
|
||||||
|
|
||||||
|
exit 0
|
11
debian/python3-oslo.messaging.postrm
vendored
Normal file
11
debian/python3-oslo.messaging.postrm
vendored
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
if [ "$1" = "remove" ] || [ "$1" = "disappear" ] ; then
|
||||||
|
update-alternatives --remove oslo-messaging-zmq-receiver /usr/bin/python2-oslo-messaging-zmq-receiver
|
||||||
|
fi
|
||||||
|
|
||||||
|
#DEBHELPER#
|
||||||
|
|
||||||
|
exit 0
|
11
debian/python3-oslo.messaging.prerm
vendored
Normal file
11
debian/python3-oslo.messaging.prerm
vendored
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
if [ "$1" = "remove" ] ; then
|
||||||
|
update-alternatives --remove oslo-messaging-zmq-receiver /usr/bin/python2-oslo-messaging-zmq-receiver
|
||||||
|
fi
|
||||||
|
|
||||||
|
#DEBHELPER#
|
||||||
|
|
||||||
|
exit 0
|
13
debian/rules
vendored
13
debian/rules
vendored
@ -1,6 +1,7 @@
|
|||||||
#!/usr/bin/make -f
|
#!/usr/bin/make -f
|
||||||
|
|
||||||
PYTHONS:=$(shell pyversions -vr)
|
PYTHONS:=$(shell pyversions -vr)
|
||||||
|
PYTHON3S:=$(shell py3versions -vr)
|
||||||
|
|
||||||
LAST_CHANGE = $(shell dpkg-parsechangelog -S Date)
|
LAST_CHANGE = $(shell dpkg-parsechangelog -S Date)
|
||||||
BUILD_DATE = $(shell LC_ALL=C date -u "+%B %d, %Y" -d "$(LAST_CHANGE)")
|
BUILD_DATE = $(shell LC_ALL=C date -u "+%B %d, %Y" -d "$(LAST_CHANGE)")
|
||||||
@ -13,15 +14,21 @@ export OSLO_PACKAGE_VERSION=$(VERSION)
|
|||||||
dh $@ --buildsystem=python_distutils --with python2,python3,sphinxdoc,systemd
|
dh $@ --buildsystem=python_distutils --with python2,python3,sphinxdoc,systemd
|
||||||
|
|
||||||
override_dh_install:
|
override_dh_install:
|
||||||
set -e && for pyvers in $(PYTHONS); do \
|
set -e ; for pyvers in $(PYTHONS); do \
|
||||||
python$$pyvers setup.py install --install-layout=deb \
|
python$$pyvers setup.py install --install-layout=deb \
|
||||||
--root $(CURDIR)/debian/python-oslo.messaging; \
|
--root $(CURDIR)/debian/python-oslo.messaging; \
|
||||||
done
|
done
|
||||||
|
set -e ; for pyvers in $(PYTHON3S); do \
|
||||||
|
python$$pyvers setup.py install --install-layout=deb \
|
||||||
|
--root $(CURDIR)/debian/python3-oslo.messaging; \
|
||||||
|
done
|
||||||
|
mv $(CURDIR)/debian/python-oslo.messaging/usr/bin/oslo-messaging-zmq-receiver $(CURDIR)/debian/python-oslo.messaging/usr/bin/python2-oslo-messaging-zmq-receiver
|
||||||
|
mv $(CURDIR)/debian/python3-oslo.messaging/usr/bin/oslo-messaging-zmq-receiver $(CURDIR)/debian/python3-oslo.messaging/usr/bin/python3-oslo-messaging-zmq-receiver
|
||||||
|
|
||||||
override_dh_auto_test:
|
override_dh_auto_test:
|
||||||
ifeq (,$(findstring nocheck, $(DEB_BUILD_OPTIONS)))
|
ifeq (,$(findstring nocheck, $(DEB_BUILD_OPTIONS)))
|
||||||
set -e && \
|
set -e ; \
|
||||||
TEMP_REZ=`mktemp -t` && \
|
TEMP_REZ=`mktemp -t` ; \
|
||||||
PYTHONPATH=. python setup.py testr --slowest --testr-args='--subunit ' | tee $$TEMP_REZ | subunit2pyunit; \
|
PYTHONPATH=. python setup.py testr --slowest --testr-args='--subunit ' | tee $$TEMP_REZ | subunit2pyunit; \
|
||||||
cat $$TEMP_REZ | subunit-filter -s --no-passthrough | subunit-stats || true ; \
|
cat $$TEMP_REZ | subunit-filter -s --no-passthrough | subunit-stats || true ; \
|
||||||
rm -f $$TEMP_REZ ;
|
rm -f $$TEMP_REZ ;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user