From: Dietmar Maurer Date: Thu, 11 Jun 2015 12:04:35 +0000 (+0200) Subject: updated for debian jessie, use systemd X-Git-Url: https://git.proxmox.com/?p=openvswitch.git;a=commitdiff_plain;h=86a54bd0c00c8bd1938a5186685474bac2d5744e updated for debian jessie, use systemd --- diff --git a/Makefile b/Makefile index 8a5faa0..6ad068f 100644 --- a/Makefile +++ b/Makefile @@ -1,8 +1,8 @@ -RELEASE=3.3 +RELEASE=4.0 # also add entry in changelog.Debian OVSVER=2.3.1 -PKGRELEASE=1 +PKGRELEASE=2 OVSDIR=openvswitch-${OVSVER} OVSSRC=openvswitch-${OVSVER}.tar.gz diff --git a/changelog.Debian b/changelog.Debian index 9800ca5..c386f1e 100644 --- a/changelog.Debian +++ b/changelog.Debian @@ -1,3 +1,9 @@ +openvswitch (2.3.1-2) unstable; urgency=medium + + * updates for debian jessie, use systemd + + -- Proxmox Support Team Thu, 11 Jun 2015 10:16:53 +0200 + openvswitch (2.3.1-1) unstable; urgency=low * update to 2.3.1 diff --git a/pvepatches/install-systemd-services.patch b/pvepatches/install-systemd-services.patch new file mode 100644 index 0000000..8f0e6f4 --- /dev/null +++ b/pvepatches/install-systemd-services.patch @@ -0,0 +1,118 @@ +Index: new/debian/openvswitch-switch.openvswitch-nonetwork.service +=================================================================== +--- /dev/null ++++ new/debian/openvswitch-switch.openvswitch-nonetwork.service +@@ -0,0 +1,13 @@ ++[Unit] ++Description=Open vSwitch Internal Unit ++After=syslog.target ++PartOf=openvswitch.service ++Wants=openvswitch.service ++ ++[Service] ++Type=oneshot ++RemainAfterExit=yes ++EnvironmentFile=-/etc/sysconfig/openvswitch ++ExecStart=/usr/share/openvswitch/scripts/ovs-ctl start \ ++ --system-id=random $OPTIONS ++ExecStop=/usr/share/openvswitch/scripts/ovs-ctl stop +Index: new/debian/openvswitch-switch.openvswitch.service +=================================================================== +--- /dev/null ++++ new/debian/openvswitch-switch.openvswitch.service +@@ -0,0 +1,13 @@ ++[Unit] ++Description=Open vSwitch ++After=syslog.target network.target openvswitch-nonetwork.service ++Requires=openvswitch-nonetwork.service ++ ++[Service] ++Type=oneshot ++ExecStart=/bin/true ++ExecStop=/bin/true ++RemainAfterExit=yes ++ ++[Install] ++WantedBy=multi-user.target +Index: new/debian/rules +=================================================================== +--- new.orig/debian/rules ++++ new/debian/rules +@@ -40,6 +40,7 @@ configure-stamp: + dh_testdir + test -e configure || ./boot.sh + test -d _debian || mkdir _debian ++ rm debian/openvswitch-switch.init + echo $(DEB_BUILD_OPTIONS) + echo $$CC + cd _debian && ( \ +@@ -130,8 +131,10 @@ binary-common: + dh_installexamples + dh_installdebconf + dh_installlogrotate +- dh_installinit -p "openvswitch-switch" -R -- start 20 S . stop 80 0 6 . +- dh_installinit --remaining-packages -R ++ dh_systemd_enable -p "openvswitch-switch" --name openvswitch ++ dh_systemd_enable -p "openvswitch-switch" --name openvswitch-nonetwork ++ dh_installinit ++ dh_systemd_start -p "openvswitch-switch" --name openvswitch-nonetwork --restart-after-upgrade + dh_installcron + dh_installman --language=C + dh_link +Index: new/debian/control +=================================================================== +--- new.orig/debian/control ++++ new/debian/control +@@ -6,7 +6,8 @@ Uploaders: Ben Pfaff = 8), autoconf (>= 2.64), automake (>= 1.10) | automake1.10, + libssl-dev, bzip2, openssl, graphviz, +- python-all (>= 2.6.6-3~), procps, libtool ++ python-all (>= 2.6.6-3~), procps, libtool, ++ dh-systemd (>= 1.4) + Standards-Version: 3.9.3 + Homepage: http://openvswitch.org/ + +@@ -48,7 +49,7 @@ Description: Open vSwitch common compone + Package: openvswitch-switch + Architecture: linux-any + Suggests: openvswitch-datapath-module +-Depends: ${shlibs:Depends}, ${misc:Depends}, ${python:Depends}, openvswitch-common (= ${binary:Version}), kmod | module-init-tools, procps, uuid-runtime, netbase, python-argparse ++Depends: ${shlibs:Depends}, ${misc:Depends}, ${python:Depends}, openvswitch-common (= ${binary:Version}), kmod | module-init-tools, procps, uuid-runtime, netbase, python-argparse, systemd + Description: Open vSwitch switch implementations + Open vSwitch is a production quality, multilayer, software-based, + Ethernet virtual switch. It is designed to enable massive network +Index: new/Makefile.in +=================================================================== +--- new.orig/Makefile.in ++++ new/Makefile.in +@@ -762,7 +762,7 @@ am__noinst_HEADERS_DIST = BUILD.Windows + debian/openvswitch-ipsec.install debian/openvswitch-pki.dirs \ + debian/openvswitch-pki.postinst debian/openvswitch-pki.postrm \ + debian/openvswitch-switch.README.Debian \ +- debian/openvswitch-switch.dirs debian/openvswitch-switch.init \ ++ debian/openvswitch-switch.dirs \ + debian/openvswitch-switch.install \ + debian/openvswitch-switch.logrotate \ + debian/openvswitch-switch.manpages \ +@@ -1180,7 +1180,7 @@ EXTRA_DIST = BUILD.Windows CONTRIBUTING + debian/openvswitch-ipsec.install debian/openvswitch-pki.dirs \ + debian/openvswitch-pki.postinst debian/openvswitch-pki.postrm \ + debian/openvswitch-switch.README.Debian \ +- debian/openvswitch-switch.dirs debian/openvswitch-switch.init \ ++ debian/openvswitch-switch.dirs \ + debian/openvswitch-switch.install \ + debian/openvswitch-switch.logrotate \ + debian/openvswitch-switch.manpages \ +Index: new/debian/automake.mk +=================================================================== +--- new.orig/debian/automake.mk ++++ new/debian/automake.mk +@@ -26,7 +26,6 @@ EXTRA_DIST += \ + debian/openvswitch-pki.postrm \ + debian/openvswitch-switch.README.Debian \ + debian/openvswitch-switch.dirs \ +- debian/openvswitch-switch.init \ + debian/openvswitch-switch.install \ + debian/openvswitch-switch.logrotate \ + debian/openvswitch-switch.manpages \ diff --git a/pvepatches/series b/pvepatches/series index df23692..8fe1947 100644 --- a/pvepatches/series +++ b/pvepatches/series @@ -1,4 +1,6 @@ remove-unneeded-from-control.patch fix-init-script-patch fix-init-depends.patch -use-log-cons-for-syslog.patch +#use-log-cons-for-syslog.patch +install-systemd-services.patch +use-systemctl-inside-ifupdown.patch diff --git a/pvepatches/use-systemctl-inside-ifupdown.patch b/pvepatches/use-systemctl-inside-ifupdown.patch new file mode 100644 index 0000000..ad52225 --- /dev/null +++ b/pvepatches/use-systemctl-inside-ifupdown.patch @@ -0,0 +1,18 @@ +Index: new/debian/ifupdown.sh +=================================================================== +--- new.orig/debian/ifupdown.sh ++++ new/debian/ifupdown.sh +@@ -29,8 +29,11 @@ if (ovs_vsctl --version) > /dev/null 2>& + exit 0 + fi + +-if /etc/init.d/openvswitch-switch status > /dev/null 2>&1; then :; else +- /etc/init.d/openvswitch-switch start ++SERVICE_UNIT=/lib/systemd/system/openvswitch-nonetwork.service ++if [ -f $SERVICE_UNIT ] && [ -x /bin/systemctl ]; then ++ if ! systemctl --quiet is-active openvswitch-nonetwork.service; then ++ systemctl start openvswitch-nonetwork.service ++ fi + fi + + if [ "${MODE}" = "start" ]; then