Accepting request 544445 from network
OBS-URL: https://build.opensuse.org/request/show/544445 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/libteam?expand=0&rev=16
This commit is contained in:
commit
e8d59677b5
31
0001-allow-send_interface-dbus.patch
Normal file
31
0001-allow-send_interface-dbus.patch
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
From f0ebd1613f748f5ba4f873935d3e171cdeb8620c Mon Sep 17 00:00:00 2001
|
||||||
|
From: Nirmoy Das <ndas@suse.de>
|
||||||
|
Date: Wed, 22 Nov 2017 16:49:53 +0100
|
||||||
|
Subject: [PATCH] allow send_interface dbus
|
||||||
|
|
||||||
|
---
|
||||||
|
teamd/teamd.conf.in | 3 +++
|
||||||
|
1 file changed, 3 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/teamd/teamd.conf.in b/teamd/teamd.conf.in
|
||||||
|
index 6ca3282..8fca859 100644
|
||||||
|
--- a/teamd/teamd.conf.in
|
||||||
|
+++ b/teamd/teamd.conf.in
|
||||||
|
@@ -4,11 +4,14 @@
|
||||||
|
<busconfig>
|
||||||
|
<policy user="root">
|
||||||
|
<allow own_prefix="org.libteam.teamd"/>
|
||||||
|
+ <allow send_interface="org.libteam.teamd"/>
|
||||||
|
</policy>
|
||||||
|
<policy user="@teamd_user@">
|
||||||
|
<allow own_prefix="org.libteam.teamd"/>
|
||||||
|
+ <allow send_interface="org.libteam.teamd"/>
|
||||||
|
</policy>
|
||||||
|
<policy context="default">
|
||||||
|
<deny own_prefix="org.libteam.teamd"/>
|
||||||
|
+ <allow send_interface="org.libteam.teamd"/>
|
||||||
|
</policy>
|
||||||
|
</busconfig>
|
||||||
|
--
|
||||||
|
2.15.0
|
||||||
|
|
44
check_if_psr_ops_were_initialized.patch
Normal file
44
check_if_psr_ops_were_initialized.patch
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
Index: libteam-1.16/teamd/teamd_lw_psr.c
|
||||||
|
===================================================================
|
||||||
|
--- libteam-1.16.orig/teamd/teamd_lw_psr.c
|
||||||
|
+++ libteam-1.16/teamd/teamd_lw_psr.c
|
||||||
|
@@ -39,6 +39,9 @@ static int lw_psr_callback_periodic(stru
|
||||||
|
bool link_up = common_ppriv->link_up;
|
||||||
|
int err;
|
||||||
|
|
||||||
|
+ if (!psr_ppriv->ops)
|
||||||
|
+ return -EINVAL;
|
||||||
|
+
|
||||||
|
if (psr_ppriv->reply_received) {
|
||||||
|
link_up = true;
|
||||||
|
psr_ppriv->missed = 0;
|
||||||
|
@@ -65,6 +68,9 @@ static int lw_psr_callback_socket(struct
|
||||||
|
{
|
||||||
|
struct lw_psr_port_priv *psr_ppriv = priv;
|
||||||
|
|
||||||
|
+ if (!psr_ppriv->ops)
|
||||||
|
+ return -EINVAL;
|
||||||
|
+
|
||||||
|
return psr_ppriv->ops->receive(psr_ppriv);
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -120,6 +126,9 @@ int lw_psr_port_added(struct teamd_conte
|
||||||
|
struct lw_psr_port_priv *psr_ppriv = priv;
|
||||||
|
int err;
|
||||||
|
|
||||||
|
+ if (!psr_ppriv->ops)
|
||||||
|
+ return -EINVAL;
|
||||||
|
+
|
||||||
|
err = lw_psr_load_options(ctx, tdport, psr_ppriv);
|
||||||
|
if (err) {
|
||||||
|
teamd_log_err("Failed to load options.");
|
||||||
|
@@ -182,6 +191,9 @@ void lw_psr_port_removed(struct teamd_co
|
||||||
|
{
|
||||||
|
struct lw_psr_port_priv *psr_ppriv = priv;
|
||||||
|
|
||||||
|
+ if (!psr_ppriv->ops)
|
||||||
|
+ return;
|
||||||
|
+
|
||||||
|
teamd_loop_callback_del(ctx, LW_PERIODIC_CB_NAME, psr_ppriv);
|
||||||
|
teamd_loop_callback_del(ctx, LW_SOCKET_CB_NAME, psr_ppriv);
|
||||||
|
psr_ppriv->ops->sock_close(psr_ppriv);
|
14
ignore_ebusy_for_team_hwaddr_set.patch
Normal file
14
ignore_ebusy_for_team_hwaddr_set.patch
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
Index: libteam-1.18/libteam/libteam.c
|
||||||
|
===================================================================
|
||||||
|
--- libteam-1.18.orig/libteam/libteam.c
|
||||||
|
+++ libteam-1.18/libteam/libteam.c
|
||||||
|
@@ -1633,6 +1633,9 @@ int team_hwaddr_set(struct team_handle *
|
||||||
|
err = rtnl_link_change(th->nl_cli.sock, link, link, 0);
|
||||||
|
err = -nl2syserr(err);
|
||||||
|
|
||||||
|
+ if (err == -EBUSY)
|
||||||
|
+ err = 0;
|
||||||
|
+
|
||||||
|
nl_addr_put(nl_addr);
|
||||||
|
|
||||||
|
errout:
|
@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:0ad5eae9e1a7835e784c5e21e8df323ca29ccc3ab8a8187fdc9ff3f6765c9b34
|
|
||||||
size 564846
|
|
3
libteam-1.27.tar.gz
Normal file
3
libteam-1.27.tar.gz
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:e74f8f5bba0511c7e971836794be7d88df4644e398dfb706c7679850cd44cdff
|
||||||
|
size 559534
|
@ -1,3 +1,40 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Nov 22 16:52:51 CET 2017 - ndas@suse.de
|
||||||
|
|
||||||
|
- allow send_interface in dbus conf file for wicked.
|
||||||
|
[+ 0001-allow-send_interface-dbus.patch]
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Nov 22 11:17:03 UTC 2017 - jengelh@inai.de
|
||||||
|
|
||||||
|
- Update to new upstream release 1.27
|
||||||
|
* teamd: escape some sensitive characters in ifname with
|
||||||
|
double quotation marks
|
||||||
|
* libteam: resynchronize ifinfo after lost RTNLGRP_LINK
|
||||||
|
notifications
|
||||||
|
* teamd: check port link_up when a port is added with
|
||||||
|
loadbalance runner
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Nov 22 10:54:50 UTC 2017 - jengelh@inai.de
|
||||||
|
|
||||||
|
- Do not suppress errors from useradd
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Nov 22 11:26:44 CET 2017 - ndas@suse.de
|
||||||
|
|
||||||
|
- sync with SLES changes(bsc#1055708)
|
||||||
|
* Add check_if_psr_ops_were_initialized.patch:
|
||||||
|
** Fix teamd segfault when link_watch initialization callbacks fail
|
||||||
|
(e.g. lw_psr_port_added() in case of activebackup runner) due to
|
||||||
|
an attempt to change hwaddr on an enslaved, link up port device.
|
||||||
|
Note: enslavement triggers initialization callbacks.
|
||||||
|
* Add ignore_ebusy_for_team_hwaddr_set.patch:
|
||||||
|
** Make PortAdd and PortRemove dbus methods work for all runners.
|
||||||
|
Ignore attempts to change hwaddr of an already enslaved devices.
|
||||||
|
(fate#318389,fate#317728,fate#316923)
|
||||||
|
- Add start_teamd_from_usr_sbin.patch:
|
||||||
|
* Modify service file to start teamd instance from /usr/sbin.
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Mon Nov 21 00:59:27 UTC 2016 - jengelh@inai.de
|
Mon Nov 21 00:59:27 UTC 2016 - jengelh@inai.de
|
||||||
|
|
||||||
|
63
libteam.spec
63
libteam.spec
@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package libteam
|
# spec file for package libteam
|
||||||
#
|
#
|
||||||
# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
|
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
|
||||||
#
|
#
|
||||||
# All modifications and additions to the file contributed by third parties
|
# All modifications and additions to the file contributed by third parties
|
||||||
# remain the property of their copyright owners, unless otherwise agreed
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
@ -17,7 +17,7 @@
|
|||||||
|
|
||||||
|
|
||||||
Name: libteam
|
Name: libteam
|
||||||
Version: 1.26
|
Version: 1.27
|
||||||
Release: 0
|
Release: 0
|
||||||
Summary: Utilities for controlling 802.1AX team network device
|
Summary: Utilities for controlling 802.1AX team network device
|
||||||
License: LGPL-2.1+
|
License: LGPL-2.1+
|
||||||
@ -29,6 +29,7 @@ Url: http://libteam.org/
|
|||||||
Source: http://libteam.org/files/%name-%version.tar.gz
|
Source: http://libteam.org/files/%name-%version.tar.gz
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||||
BuildRequires: doxygen
|
BuildRequires: doxygen
|
||||||
|
BuildRequires: libcap-devel
|
||||||
BuildRequires: pkg-config
|
BuildRequires: pkg-config
|
||||||
BuildRequires: python-devel
|
BuildRequires: python-devel
|
||||||
BuildRequires: swig
|
BuildRequires: swig
|
||||||
@ -42,6 +43,15 @@ BuildRequires: pkgconfig(libnl-route-3.0) >= 3.2.0
|
|||||||
%if 0%{?suse_version} >= 1220
|
%if 0%{?suse_version} >= 1220
|
||||||
BuildRequires: systemd-rpm-macros
|
BuildRequires: systemd-rpm-macros
|
||||||
%endif
|
%endif
|
||||||
|
Patch0: check_if_psr_ops_were_initialized.patch
|
||||||
|
Patch1: start_teamd_from_usr_sbin.patch
|
||||||
|
Patch2: ignore_ebusy_for_team_hwaddr_set.patch
|
||||||
|
Patch3: 0001-allow-send_interface-dbus.patch
|
||||||
|
%define teamd_user teamd
|
||||||
|
%define teamd_group daemon
|
||||||
|
%define teamd_daemon_directory /run/teamd
|
||||||
|
%define teamd_dbus_policy_directory %_sysconfdir/dbus-1/system.d
|
||||||
|
%define teamd_dbus_policy_name org.libteam.teamd.conf
|
||||||
|
|
||||||
%description
|
%description
|
||||||
A library which is the user-space counterpart for the team network
|
A library which is the user-space counterpart for the team network
|
||||||
@ -109,39 +119,59 @@ programs that will manipulate team network devices.
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q
|
%setup -q
|
||||||
|
%patch0 -p1
|
||||||
|
%patch1 -p1
|
||||||
|
%patch2 -p1
|
||||||
|
%patch3 -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%configure --includedir="%_includedir/pkg/%name" --bindir="%_sbindir" \
|
%configure --includedir="%_includedir/pkg/%name" --bindir="%_sbindir" \
|
||||||
--disable-static
|
--disable-static \
|
||||||
|
--with-run-dir=%teamd_daemon_directory \
|
||||||
|
--with-user=%teamd_user \
|
||||||
|
--with-group=%teamd_group
|
||||||
# Use CFLAGS= to kill -Werror
|
# Use CFLAGS= to kill -Werror
|
||||||
make %{?_smp_mflags} CFLAGS="%optflags"
|
make %{?_smp_mflags} CFLAGS="%optflags"
|
||||||
|
|
||||||
pushd binding/python/;
|
pushd binding/python/
|
||||||
python ./setup.py build;
|
python ./setup.py build
|
||||||
popd;
|
popd
|
||||||
|
|
||||||
%install
|
%install
|
||||||
b="%buildroot";
|
b="%buildroot"
|
||||||
make install DESTDIR="$b";
|
%make_install
|
||||||
pushd binding/python/;
|
pushd binding/python/
|
||||||
python ./setup.py install --root="$b" --prefix="%_prefix";
|
python ./setup.py install --root="$b" --prefix="%_prefix"
|
||||||
popd;
|
popd
|
||||||
|
|
||||||
rm -f "$b/%_libdir"/*.la
|
rm -f "$b/%_libdir"/*.la
|
||||||
%if 0%{?_unitdir:1}
|
%if 0%{?_unitdir:1}
|
||||||
mkdir -p "$b/%_unitdir";
|
mkdir -p "$b/%_unitdir"
|
||||||
install -pm0644 teamd/redhat/systemd/*.service "$b/%_unitdir/";
|
install -pm0644 teamd/redhat/systemd/*.service "$b/%_unitdir/"
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%if 0%{?_sysconfdir:1}
|
||||||
|
mkdir -p "$b/%teamd_dbus_policy_directory/"
|
||||||
|
install -pm0644 teamd/dbus/teamd.conf "$b/%teamd_dbus_policy_directory/%teamd_dbus_policy_name"
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%check
|
%check
|
||||||
make check
|
make check
|
||||||
|
|
||||||
%pre tools
|
%pre tools
|
||||||
|
getent group daemon >/dev/null || %_sbindir/groupadd -r %teamd_group
|
||||||
|
getent passwd %teamd_user >/dev/null || \
|
||||||
|
%_sbindir/useradd -r -g %teamd_group -s /bin/false \
|
||||||
|
-c "Teamd daemon user" -d %{_localstatedir}/lib/empty %teamd_user
|
||||||
|
%_sbindir/usermod -g %teamd_group %teamd_user 2>/dev/null
|
||||||
|
test -L %teamd_daemon_directory || rm -rf %teamd_daemon_directory && :
|
||||||
%if 0%{?_unitdir:1}
|
%if 0%{?_unitdir:1}
|
||||||
%service_add_pre teamd@.service
|
%service_add_pre teamd@.service
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%post tools
|
%post tools
|
||||||
|
# reload dbus to apply new teamd's policy
|
||||||
|
/usr/bin/systemctl reload dbus.service 2>/dev/null || :
|
||||||
%if 0%{?_unitdir:1}
|
%if 0%{?_unitdir:1}
|
||||||
%service_add_post teamd@.service
|
%service_add_post teamd@.service
|
||||||
%endif
|
%endif
|
||||||
@ -155,6 +185,10 @@ make check
|
|||||||
%if 0%{?_unitdir:1}
|
%if 0%{?_unitdir:1}
|
||||||
%service_del_postun teamd@.service
|
%service_del_postun teamd@.service
|
||||||
%endif
|
%endif
|
||||||
|
# reload dbus to forget teamd's policy
|
||||||
|
if [ ${FIRST_ARG:-$1} -eq 0 ]; then
|
||||||
|
/usr/bin/systemctl reload dbus.service 2>/dev/null || :
|
||||||
|
fi
|
||||||
|
|
||||||
%post -n libteam5 -p /sbin/ldconfig
|
%post -n libteam5 -p /sbin/ldconfig
|
||||||
%postun -n libteam5 -p /sbin/ldconfig
|
%postun -n libteam5 -p /sbin/ldconfig
|
||||||
@ -180,6 +214,9 @@ make check
|
|||||||
%defattr(-,root,root)
|
%defattr(-,root,root)
|
||||||
%_sbindir/bond2team
|
%_sbindir/bond2team
|
||||||
%_sbindir/team*
|
%_sbindir/team*
|
||||||
|
%dir %_sysconfdir/dbus-1
|
||||||
|
%dir %teamd_dbus_policy_directory
|
||||||
|
%config %teamd_dbus_policy_directory/%teamd_dbus_policy_name
|
||||||
%_mandir/man1/*
|
%_mandir/man1/*
|
||||||
%_mandir/man5/*
|
%_mandir/man5/*
|
||||||
%_mandir/man8/*
|
%_mandir/man8/*
|
||||||
|
12
start_teamd_from_usr_sbin.patch
Normal file
12
start_teamd_from_usr_sbin.patch
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
Index: libteam-1.16/teamd/redhat/systemd/teamd@.service
|
||||||
|
===================================================================
|
||||||
|
--- libteam-1.16.orig/teamd/redhat/systemd/teamd@.service
|
||||||
|
+++ libteam-1.16/teamd/redhat/systemd/teamd@.service
|
||||||
|
@@ -3,6 +3,6 @@ Description=Team Daemon for device %I
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
BusName=org.libteam.teamd.%i
|
||||||
|
-ExecStart=/usr/bin/teamd -U -D -o -t %i -f /run/teamd/%i.conf
|
||||||
|
+ExecStart=/usr/sbin/teamd -U -D -o -t %i -f /run/teamd/%i.conf
|
||||||
|
Restart=on-failure
|
||||||
|
RestartPreventExitStatus=1
|
Loading…
Reference in New Issue
Block a user