Signed-off-by: Gurucharan Shetty <g...@ovn.org> --- debian/.gitignore | 1 + debian/automake.mk | 7 ++++ debian/control | 16 +++++++++ debian/openvswitch-ovn-controller.dirs | 1 + debian/openvswitch-ovn-controller.init | 53 ++++++++++++++++++++++++++++ debian/openvswitch-ovn-controller.install | 1 + debian/openvswitch-ovn-controller.manpages | 1 + debian/openvswitch-ovn-controller.postinst | 49 +++++++++++++++++++++++++ debian/openvswitch-ovn-controller.postrm | 44 +++++++++++++++++++++++ debian/openvswitch-ovn-controller.template | 5 +++ debian/rules | 3 ++ 11 files changed, 181 insertions(+) create mode 100644 debian/openvswitch-ovn-controller.dirs create mode 100755 debian/openvswitch-ovn-controller.init create mode 100644 debian/openvswitch-ovn-controller.install create mode 100644 debian/openvswitch-ovn-controller.manpages create mode 100755 debian/openvswitch-ovn-controller.postinst create mode 100755 debian/openvswitch-ovn-controller.postrm create mode 100644 debian/openvswitch-ovn-controller.template
diff --git a/debian/.gitignore b/debian/.gitignore index 1613c70..35b0e23 100644 --- a/debian/.gitignore +++ b/debian/.gitignore @@ -13,6 +13,7 @@ /openvswitch-dbg /openvswitch-ipsec /openvswitch-ovn-common +/openvswitch-ovn-controller /openvswitch-pki /openvswitch-switch /openvswitch-switch.copyright diff --git a/debian/automake.mk b/debian/automake.mk index f1c307c..48de6aa 100644 --- a/debian/automake.mk +++ b/debian/automake.mk @@ -23,6 +23,13 @@ EXTRA_DIST += \ debian/openvswitch-ipsec.install \ debian/openvswitch-ovn-common.install \ debian/openvswitch-ovn-common.manpages \ + debian/openvswitch-ovn-controller.dirs \ + debian/openvswitch-ovn-controller.init \ + debian/openvswitch-ovn-controller.install \ + debian/openvswitch-ovn-controller.manpages \ + debian/openvswitch-ovn-controller.postinst \ + debian/openvswitch-ovn-controller.postrm \ + debian/openvswitch-ovn-controller.template \ debian/openvswitch-pki.dirs \ debian/openvswitch-pki.postinst \ debian/openvswitch-pki.postrm \ diff --git a/debian/control b/debian/control index 9c684d6..a53fab9 100644 --- a/debian/control +++ b/debian/control @@ -112,6 +112,22 @@ Description: OVN controller . openvswitch-ovn-common provides components required by other OVN packages. +Package: openvswitch-ovn-controller +Architecture: linux-any +Depends: openvswitch-switch (= ${binary:Version}), + openvswitch-common (= ${binary:Version}), + openvswitch-ovn-common (= ${binary:Version}), + ${misc:Depends}, + ${shlibs:Depends} +Description: OVN controller + OVN, the Open Virtual Network, is a system to support virtual network + abstraction. OVN complements the existing capabilities of OVS to add + native support for virtual network abstractions, such as virtual L2 and L3 + overlays and security groups. + . + openvswitch-ovn-controller provides the userspace components and utilities for + OVN that can be run on every host/hypervisor. + Package: openvswitch-ipsec Architecture: linux-any Depends: ipsec-tools (>=0.8~alpha20101208), diff --git a/debian/openvswitch-ovn-controller.dirs b/debian/openvswitch-ovn-controller.dirs new file mode 100644 index 0000000..5ef2e49 --- /dev/null +++ b/debian/openvswitch-ovn-controller.dirs @@ -0,0 +1 @@ +/usr/share/openvswitch/ovn/controller diff --git a/debian/openvswitch-ovn-controller.init b/debian/openvswitch-ovn-controller.init new file mode 100755 index 0000000..cef440c --- /dev/null +++ b/debian/openvswitch-ovn-controller.init @@ -0,0 +1,53 @@ +#! /bin/sh +# +### BEGIN INIT INFO +# Provides: openvswitch-ovn-controller +# Required-Start: openvswitch-switch $remote_fs $syslog +# Required-Stop: $remote_fs +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Short-Description: OVN controller +# Description: openvswitch-ovn-controller provides the userspace +# components and utilities for OVN that can be run on +# every host/hypervisor. +### END INIT INFO + +test -x /usr/bin/ovn-controller || exit 0 +test -x /usr/share/openvswitch/scripts/ovn-ctl || exit 0 + +_SYSTEMCTL_SKIP_REDIRECT=yes + +. /usr/share/openvswitch/scripts/ovs-lib +if [ -e /etc/default/openvswitch-ovn-controller ]; then + . /etc/default/openvswitch-ovn-controller +fi + +start () { + set /usr/share/openvswitch/scripts/ovn-ctl ${1-start_controller} + set "$@" $OVN_CTL_OPTS + "$@" || exit $? +} + +case $1 in + start) + start + ;; + stop | force-stop) + /usr/share/openvswitch/scripts/ovn-ctl stop_controller + ;; + restart) + start restart_controller + ;; + status) + /usr/share/openvswitch/scripts/ovn-ctl status_controller + exit $? + ;; + reload | force-reload) + ;; + *) + echo "Usage: $0 {start|stop|reload|force-reload|restart|status}" >&2 + exit 1 + ;; +esac + +exit 0 diff --git a/debian/openvswitch-ovn-controller.install b/debian/openvswitch-ovn-controller.install new file mode 100644 index 0000000..d2de82f --- /dev/null +++ b/debian/openvswitch-ovn-controller.install @@ -0,0 +1 @@ +usr/bin/ovn-controller diff --git a/debian/openvswitch-ovn-controller.manpages b/debian/openvswitch-ovn-controller.manpages new file mode 100644 index 0000000..4f9e7bc --- /dev/null +++ b/debian/openvswitch-ovn-controller.manpages @@ -0,0 +1 @@ +ovn/controller/ovn-controller.8 diff --git a/debian/openvswitch-ovn-controller.postinst b/debian/openvswitch-ovn-controller.postinst new file mode 100755 index 0000000..2933cca --- /dev/null +++ b/debian/openvswitch-ovn-controller.postinst @@ -0,0 +1,49 @@ +#!/bin/sh +# postinst script for openvswitch-ovn-controller +# +# see: dh_installdeb(1) + +set -e + +# summary of how this script can be called: +# * <postinst> `configure' <most-recently-configured-version> +# * <old-postinst> `abort-upgrade' <new version> +# * <conflictor's-postinst> `abort-remove' `in-favour' <package> +# <new-version> +# * <postinst> `abort-remove' +# * <deconfigured's-postinst> `abort-deconfigure' `in-favour' +# <failed-install-package> <version> `removing' +# <conflicting-package> <version> +# for details, see http://www.debian.org/doc/debian-policy/ or +# the debian-policy package + + +case "$1" in + configure) + DEFAULT=/etc/default/openvswitch-ovn-controller + TEMPLATE=/usr/share/openvswitch/ovn/controller/default.template + if ! test -e $DEFAULT; then + cp $TEMPLATE $DEFAULT + else + for var in $(awk -F'[ :]' '/^# [_A-Z0-9]+:/{print $2}' $TEMPLATE) + do + if ! grep $var $DEFAULT >/dev/null 2>&1; then + echo >> $DEFAULT + sed -n "/$var:/,/$var=/p" $TEMPLATE >> $DEFAULT + fi + done + fi + ;; + + abort-upgrade|abort-remove|abort-deconfigure) + ;; + + *) + echo "postinst called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +#DEBHELPER# + +exit 0 diff --git a/debian/openvswitch-ovn-controller.postrm b/debian/openvswitch-ovn-controller.postrm new file mode 100755 index 0000000..282db6d --- /dev/null +++ b/debian/openvswitch-ovn-controller.postrm @@ -0,0 +1,44 @@ +#!/bin/sh +# postrm script for openvswitch-ovn-controller +# +# see: dh_installdeb(1) + +set -e + +# summary of how this script can be called: +# * <postrm> `remove' +# * <postrm> `purge' +# * <old-postrm> `upgrade' <new-version> +# * <new-postrm> `failed-upgrade' <old-version> +# * <new-postrm> `abort-install' +# * <new-postrm> `abort-install' <old-version> +# * <new-postrm> `abort-upgrade' <old-version> +# * <disappearer's-postrm> `disappear' <overwriter> +# <overwriter-version> +# for details, see http://www.debian.org/doc/debian-policy/ or +# the debian-policy package + + +case "$1" in + purge) + rm -f /etc/default/openvswitch-ovn-controller + rm -f /var/log/openvswitch/ovn-controller.log* || true + ;; + + remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear) + ;; + + *) + echo "postrm called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 + + diff --git a/debian/openvswitch-ovn-controller.template b/debian/openvswitch-ovn-controller.template new file mode 100644 index 0000000..7fd54ef --- /dev/null +++ b/debian/openvswitch-ovn-controller.template @@ -0,0 +1,5 @@ +# This is a POSIX shell fragment -*- sh -*- + +# OVN_CTL_OPTS: Extra options to pass to ovs-ctl. This is, for example, +# a suitable place to specify --ovn-controller-wrapper=valgrind. +# OVN_CTL_OPTS= diff --git a/debian/rules b/debian/rules index d8e90c7..136033b 100755 --- a/debian/rules +++ b/debian/rules @@ -54,6 +54,9 @@ override_dh_install: # openvswitch-switch cp debian/openvswitch-switch.template debian/openvswitch-switch/usr/share/openvswitch/switch/default.template + # openvswitch-ovn-controller + cp debian/openvswitch-ovn-controller.template debian/openvswitch-ovn-controller/usr/share/openvswitch/ovn/controller/default.template + # openvswitch-datapath-source cp debian/rules.modules debian/openvswitch-datapath-source/usr/src/modules/openvswitch-datapath/debian/rules chmod 755 debian/openvswitch-datapath-source/usr/src/modules/openvswitch-datapath/debian/rules -- 1.7.9.5 _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev