diff options
author | Matthew Thode <prometheanfire@gentoo.org> | 2018-09-23 15:21:21 -0500 |
---|---|---|
committer | Matthew Thode <prometheanfire@gentoo.org> | 2018-09-23 15:21:37 -0500 |
commit | 32da9e276ee7e0af61535e3c9ab605678347ba8e (patch) | |
tree | 13a839aa877e0dbadf10f76a99ce51a727e2d5ca | |
parent | sys-auth/pambase: Commit forgotten patch (diff) | |
download | gentoo-32da9e276ee7e0af61535e3c9ab605678347ba8e.tar.gz gentoo-32da9e276ee7e0af61535e3c9ab605678347ba8e.tar.bz2 gentoo-32da9e276ee7e0af61535e3c9ab605678347ba8e.zip |
net-misc/openvswitch: bumping to 2.10.0-r1 for some systemd changes
Package-Manager: Portage-2.3.49, Repoman-2.3.11
RepoMan-Options: --force
-rw-r--r-- | net-misc/openvswitch/files/ovs-delete-transient-ports.service | 10 | ||||
-rw-r--r-- | net-misc/openvswitch/files/ovs-vswitchd2.service | 26 | ||||
-rw-r--r-- | net-misc/openvswitch/files/ovsdb-server2.service | 24 | ||||
-rw-r--r-- | net-misc/openvswitch/files/ovsdb-server_conf2 | 3 | ||||
-rw-r--r-- | net-misc/openvswitch/openvswitch-2.10.0-r1.ebuild (renamed from net-misc/openvswitch/openvswitch-2.10.0.ebuild) | 8 |
5 files changed, 68 insertions, 3 deletions
diff --git a/net-misc/openvswitch/files/ovs-delete-transient-ports.service b/net-misc/openvswitch/files/ovs-delete-transient-ports.service new file mode 100644 index 000000000000..4cd4d7f57f97 --- /dev/null +++ b/net-misc/openvswitch/files/ovs-delete-transient-ports.service @@ -0,0 +1,10 @@ +[Unit] +Description=Open vSwitch Delete Transient Ports +After=ovsdb-server.service +Before=ovs-vswitchd.service +AssertPathExists=/var/run/openvswitch/db.sock + +[Service] +Type=oneshot +RemainAfterExit=yes +ExecStart=/usr/share/openvswitch/scripts/ovs-ctl delete-transient-ports diff --git a/net-misc/openvswitch/files/ovs-vswitchd2.service b/net-misc/openvswitch/files/ovs-vswitchd2.service new file mode 100644 index 000000000000..3092fdaaa669 --- /dev/null +++ b/net-misc/openvswitch/files/ovs-vswitchd2.service @@ -0,0 +1,26 @@ +[Unit] +Description=Open vSwitch Daemon +Documentation=man:ovs-vswitchd +Wants=network.target +Before=network.target network.service +Requires=ovsdb-server.service +After=ovsdb-server.service network-pre.target systemd-udev-settle.service +ReloadPropagatedFrom=ovsdb-server.service +AssertPathIsReadWrite=/var/run/openvswitch/db.sock + +[Service] +Type=forking +Restart=on-failure +Environment=HOME=/var/run/openvswitch +EnvironmentFile=-/run/openvswitch/useropts +EnvironmentFile=-/etc/conf.d/ovs-vswitchd +ExecStart=/usr/share/openvswitch/scripts/ovs-ctl \ + --no-ovsdb-server --no-monitor --system-id=random \ + ${OVSUSER} start $OPTIONS +ExecStop=/usr/share/openvswitch/scripts/ovs-ctl --no-ovsdb-server stop +ExecReload=/usr/share/openvswitch/scripts/ovs-ctl --no-ovsdb-server \ + --no-monitor --system-id=random ${OVSUSER} restart $OPTIONS +TimeoutSec=300 + +[Install] +WantedBy=multi-user.target diff --git a/net-misc/openvswitch/files/ovsdb-server2.service b/net-misc/openvswitch/files/ovsdb-server2.service new file mode 100644 index 000000000000..5ff6f9044660 --- /dev/null +++ b/net-misc/openvswitch/files/ovsdb-server2.service @@ -0,0 +1,24 @@ +[Unit] +Description=Open vSwitch Database Unit +Documentation=man:ovsdb-server +After=syslog.target network-pre.target +Before=network.target network.service +Wants=ovs-delete-transient-ports.service + +[Service] +Type=forking +Restart=on-failure +EnvironmentFile=-/etc/conf.d/ovsdb-server +ExecStartPre=/bin/chown ${OVS_USER_ID} /var/run/openvswitch /var/log/openvswitch +ExecStartPre=/bin/sh -c 'rm -f /run/openvswitch/useropts; if [ "$${OVS_USER_ID/:*/}" != "root" ]; then /usr/bin/echo "OVSUSER=--ovs-user=${OVS_USER_ID}" > /run/openvswitch/useropts; fi' +EnvironmentFile=-/run/openvswitch/useropts +ExecStart=/usr/share/openvswitch/scripts/ovs-ctl \ + --no-ovs-vswitchd --no-monitor --system-id=random \ + ${OVSUSER} \ + start $OPTIONS +ExecStop=/usr/share/openvswitch/scripts/ovs-ctl --no-ovs-vswitchd stop +ExecReload=/usr/share/openvswitch/scripts/ovs-ctl --no-ovs-vswitchd \ + ${OVSUSER} \ + --no-monitor restart $OPTIONS +RuntimeDirectory=openvswitch +RuntimeDirectoryMode=0755 diff --git a/net-misc/openvswitch/files/ovsdb-server_conf2 b/net-misc/openvswitch/files/ovsdb-server_conf2 index 97367b9717e7..07eca5e6c9f7 100644 --- a/net-misc/openvswitch/files/ovsdb-server_conf2 +++ b/net-misc/openvswitch/files/ovsdb-server_conf2 @@ -9,6 +9,9 @@ PRIVATE_KEY="db:Open_vSwitch,SSL,private_key" CERTIFICATE="db:Open_vSwitch,SSL,certificate" BOOTSTRAP_CA_CERT="db:Open_vSwitch,SSL,ca_cert" +# Default user +OVS_USER_ID="root:root" + # Alternative path for the database (default is /etc/openvswitch/conf.db) # DATABASE="/etc/openvswitch/conf.db" diff --git a/net-misc/openvswitch/openvswitch-2.10.0.ebuild b/net-misc/openvswitch/openvswitch-2.10.0-r1.ebuild index b0141c8947f0..302aafe58fec 100644 --- a/net-misc/openvswitch/openvswitch-2.10.0.ebuild +++ b/net-misc/openvswitch/openvswitch-2.10.0-r1.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2018 Gentoo Foundation +# Copyright 1999-2018 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=6 @@ -106,8 +106,9 @@ src_install() { newinitd "${FILESDIR}/ovsdb-server-r1" ovsdb-server newinitd "${FILESDIR}/ovs-vswitchd-r1" ovs-vswitchd - systemd_dounit "${FILESDIR}/ovsdb-server.service" - systemd_dounit "${FILESDIR}/ovs-vswitchd.service" + systemd_newunit "${FILESDIR}/ovsdb-server2.service" ovsdb-server.service + systemd_newunit "${FILESDIR}/ovs-vswitchd2.service" ovs-vswitchd.service + systemd_newunit rhel/usr_lib_systemd_system_ovs-delete-transient-ports.service ovs-delete-transient-ports.service systemd_newtmpfilesd "${FILESDIR}/openvswitch.tmpfiles" openvswitch.conf insinto /etc/logrotate.d @@ -131,6 +132,7 @@ pkg_postinst() { fi done + # only needed on non-systemd, but helps anyway elog "Use the following command to create an initial database for ovsdb-server:" elog " emerge --config =${CATEGORY}/${PF}" elog "(will create a database in /var/lib/openvswitch/conf.db)" |