From 9dc09e0e0a63a4ba45093553302154dcb45ef8b5 Mon Sep 17 00:00:00 2001 From: Thomas Graf Date: May 02 2013 15:07:20 +0000 Subject: Update to 1.10.0 (#958814) --- diff --git a/.gitignore b/.gitignore index 9d1ca72..9b7b607 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ /openvswitch-1.7.1.tar.gz /openvswitch-1.7.3.tar.gz /openvswitch-1.9.0.tar.gz +/openvswitch-1.10.0.tar.gz diff --git a/openvswitch.init b/openvswitch.init index cf32c79..55a13a7 100644 --- a/openvswitch.init +++ b/openvswitch.init @@ -5,7 +5,7 @@ # chkconfig: 2345 09 91 # description: Manage Open vSwitch kernel modules and user-space daemons -# Copyright (C) 2009, 2010, 2011 Nicira Networks, Inc. +# Copyright (C) 2009, 2010, 2011 Nicira, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -31,7 +31,7 @@ test -e /etc/sysconfig/openvswitch && . /etc/sysconfig/openvswitch start () { - set $ovs_ctl ${1-start} + set ovs_ctl ${1-start} set "$@" --system-id=random if test X"$FORCE_COREFILES" != X; then set "$@" --force-corefiles="$FORCE_COREFILES" @@ -45,23 +45,28 @@ start () { if test X"$VSWITCHD_MLOCKALL" != X; then set "$@" --mlockall="$VSWITCHD_MLOCKALL" fi - if test X"$BRCOMPAT" = Xyes; then - set "$@" --brcompat - fi + set "$@" $OVS_CTL_OPTS "$@" -# Fedora kernel does not support OVS GRE tunneling yet -# $ovs_ctl --protocol=gre enable-protocol + ovs_ctl --protocol=gre enable-protocol touch /var/lock/subsys/openvswitch } stop () { - $ovs_ctl stop + ovs_ctl stop rm -f /var/lock/subsys/openvswitch } -ovs_ctl=/usr/share/openvswitch/scripts/ovs-ctl +restart () { + if [ "$1" = "--save-flows=yes" ]; then + start restart + else + stop + start + fi +} + case $1 in start) start @@ -70,17 +75,17 @@ case $1 in stop ;; restart) - stop - start + shift + restart "$@" ;; reload|force-reload) # Nothing to do. ;; status) - $ovs_ctl status + ovs_ctl status ;; version) - $ovs_ctl version + ovs_ctl version ;; force-reload-kmod) start force-reload-kmod diff --git a/openvswitch.logrotate b/openvswitch.logrotate index 1a08fa9..46b94b9 100644 --- a/openvswitch.logrotate +++ b/openvswitch.logrotate @@ -1,4 +1,4 @@ -# Copyright (C) 2009, 2010, 2011 Nicira Networks, Inc. +# Copyright (C) 2009, 2010, 2011, 2012 Nicira, Inc. # # Copying and distribution of this file, with or without modification, # are permitted in any medium without royalty provided the copyright @@ -10,11 +10,8 @@ missingok postrotate # Tell Open vSwitch daemons to reopen their log files - if [ -e /var/run/openvswitch/ovs-vswitchd.pid ]; then - /usr/bin/ovs-appctl -t ovs-vswitchd vlog/reopen - fi - if [ -e /var/run/openvswitch/ovsdb-server.pid ]; then - /usr/bin/ovs-appctl -t ovsdb-server vlog/reopen - fi + for pidfile in `cd /var/run/openvswitch && echo *.pid`; do + ovs-appctl -t "${pidfile%%.pid}" vlog/reopen + done endscript } diff --git a/openvswitch.spec b/openvswitch.spec index a6dd297..ad78c6a 100644 --- a/openvswitch.spec +++ b/openvswitch.spec @@ -1,5 +1,5 @@ Name: openvswitch -Version: 1.9.0 +Version: 1.10.0 Release: 1%{?dist} Summary: Open vSwitch daemon/database/utilities @@ -24,9 +24,9 @@ BuildRequires: groff graphviz Requires: openssl iproute module-init-tools -Requires(post): systemd -Requires(preun): systemd -Requires(postun): systemd +Requires(post): systemd-units +Requires(preun): systemd-units +Requires(postun): systemd-units %description Open vSwitch provides standard network bridging functions and @@ -117,17 +117,47 @@ rm -f \ desktop-file-install --dir=$RPM_BUILD_ROOT%{_datadir}/applications %{SOURCE6} %post -# Initial installation -%systemd_post openvswitch.service +%if 0%{?systemd_post:1} + %systemd_post %{name}.service +%else + # Package install, not upgrade + if [ $1 -eq 1 ]; then + /bin/systemctl daemon-reload >dev/null || : + fi +%endif + +# Package with native systemd unit file is installed for the first time +%triggerun -- %{name} < 1.9.0-1 +# Save the current service runlevel info +# User must manually run systemd-sysv-convert --apply openvswitch +# to migrate them to systemd targets +/usr/bin/systemd-sysv-convert --save %{name} >/dev/null 2>&1 ||: + +# Run these because the SysV package being removed won't do them +/sbin/chkconfig --del %{name} >/dev/null 2>&1 || : +/bin/systemctl try-restart %{name}.service >/dev/null 2>&1 || : %preun -# Package removal, not upgrade -%systemd_preun openvswitch.service +%if 0%{?systemd_preun:1} + %systemd_preun %{name}.service +%else + if [ $1 -eq 0 ] ; then + # Package removal, not upgrade + /bin/systemctl --no-reload disable %{name}.service >/dev/null 2>&1 || : + /bin/systemctl stop %{name}.service >/dev/null 2>&1 || : + fi +%endif %postun -# Package upgrade, not uninstall -%systemd_postun_with_restart openvswitch.service - +%if 0%{?systemd_postun_with_restart:1} + %systemd_postun_with_restart %{name}.service +%else + /bin/systemctl daemon-reload >/dev/null 2>&1 || : + if [ "$1" -ge "1" ] ; then + # Package upgrade, not uninstall + /bin/systemctl try-restart %{name}.service >/dev/null 2>&1 || : + fi +%endif %files %{_sysconfdir}/openvswitch/ @@ -202,6 +232,9 @@ desktop-file-install --dir=$RPM_BUILD_ROOT%{_datadir}/applications %{SOURCE6} %changelog +* Tue May 02 2013 Thomas Graf - 1.10.0-1 +- Update to 1.10.0 (#958814) + * Tue Feb 28 2013 Thomas Graf - 1.9.0-1 - Update to 1.9.0 (#916537) diff --git a/sources b/sources index da38dbd..ec2d584 100644 --- a/sources +++ b/sources @@ -1 +1,2 @@ e9004202b0e10c0de9870f19d2044f11 openvswitch-1.9.0.tar.gz +fe8b49efe9f86b57abab00166b971106 openvswitch-1.10.0.tar.gz