[packages/libteam] - new - missing patch adds missing file taken from git - link patch fixes libteamdctl linking
qboosh
qboosh at pld-linux.org
Sat Jul 5 18:57:25 CEST 2014
commit 40d088c838b7931c73d7838cc16ea9b701389c77
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Sat Jul 5 15:49:10 2014 +0200
- new
- missing patch adds missing file taken from git
- link patch fixes libteamdctl linking
libteam-link.patch | 11 ++++
libteam-missing.patch | 61 ++++++++++++++++++++++
libteam.spec | 141 ++++++++++++++++++++++++++++++++++++++++++++++++++
3 files changed, 213 insertions(+)
---
diff --git a/libteam.spec b/libteam.spec
new file mode 100644
index 0000000..003424e
--- /dev/null
+++ b/libteam.spec
@@ -0,0 +1,141 @@
+Summary: Library for controlling team network device
+Summary(pl.UTF-8): Biblioteka do sterowania grupowymi urządzeniami sieciowymi
+Name: libteam
+Version: 1.11
+Release: 1
+License: LGPL v2.1+
+Group: Libraries
+#Source0Download: http://libteam.org/
+Source0: http://libteam.org/files/%{name}-%{version}.tar.gz
+# Source0-md5: 21a514f7c206cc0ccc2fd274a32d49fe
+Patch0: %{name}-missing.patch
+Patch1: %{name}-link.patch
+URL: http://libteam.org/
+BuildRequires: autoconf >= 2.50
+BuildRequires: automake
+BuildRequires: dbus-devel
+BuildRequires: jansson-devel
+BuildRequires: libdaemon-devel
+BuildRequires: libnl-devel >= 3.2
+BuildRequires: libtool >= 2:2
+BuildRequires: pkgconfig
+BuildRequires: zeromq-devel >= 3.2.0
+Requires: libnl >= 3.2
+Requires: zeromq >= 3.2.0
+BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+The purpose of the Team driver is to provide a mechanism to team
+multiple NICs (ports) into one logical one (teamdev) at L2 layer. The
+process is called "channel bonding", "Ethernet bonding", "channel
+teaming", "link aggregation", etc. This is already implemented in the
+Linux kernel by the bonding driver.
+
+One thing to note is that Team driver project does try to provide the
+similar functionality as the bonding driver, however architecturally
+it is quite different from bonding driver. Team driver is modular,
+userspace driven, very lean and efficient, and it does have some
+distinct advantages over bonding. The way Team is configured differs
+dramatically from the way bonding is.
+
+%description -l pl.UTF-8
+Celem sterownika Team jest dostarczenie mechanizmu do grupowania
+(team) wielu interfejsów (portów) sieciowych (czyli NIC) w jeden
+logiczny (teamdev) w warstwie L2. Proces ten jest nazywany
+"channel bonding", "Ethernet bonding", "channel teaming", "link
+aggregation" itp. Jest to już zaimplementowane w jądrze Linuksa
+poprzez sterownik bonding.
+
+Należy zauważyć, że projekt sterownika Team próbuje zapewnić
+podobną funkcjonalność co sterownik bonding, ale architektonicznie
+różni się od niego. Jest modularny, działa w przestrzeni użytkownika,
+jest bardzo lekki i wydajny, ma też kilka zalet, których nie ma
+bonding. Sposób konfiguracji sterownika Team znacząco różni się od
+konfiguracji sterownika bonding.
+
+%package devel
+Summary: Header files for libteam library
+Summary(pl.UTF-8): Pliki nagłówkowe biblioteki libteam
+Group: Development/Libraries
+Requires: %{name} = %{version}-%{release}
+Requires: libnl-devel >= 3.2
+
+%description devel
+Header files for libteam library.
+
+%description devel -l pl.UTF-8
+Pliki nagłówkowe biblioteki libteam.
+
+%package static
+Summary: Static libteam library
+Summary(pl.UTF-8): Statyczna biblioteka libteam
+Group: Development/Libraries
+Requires: %{name}-devel = %{version}-%{release}
+
+%description static
+Static libteam library.
+
+%description static -l pl.UTF-8
+Statyczna biblioteka libteam.
+
+%prep
+%setup -q
+%patch0 -p1
+%patch1 -p1
+
+%build
+%{__libtoolize}
+%{__aclocal} -I m4
+%{__autoconf}
+%{__autoheader}
+%{__automake}
+%configure \
+ --disable-silent-rules
+
+%{__make}
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+%{__make} install \
+ DESTDIR=$RPM_BUILD_ROOT
+
+# obsoleted by pkg-config
+%{__rm} $RPM_BUILD_ROOT%{_libdir}/lib*.la
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%post -p /sbin/ldconfig
+%postun -p /sbin/ldconfig
+
+%files
+%defattr(644,root,root,755)
+%doc README
+%attr(755,root,root) %{_bindir}/bond2team
+%attr(755,root,root) %{_bindir}/teamd
+%attr(755,root,root) %{_bindir}/teamdctl
+%attr(755,root,root) %{_bindir}/teamnl
+%attr(755,root,root) %{_libdir}/libteam.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/libteam.so.5
+%attr(755,root,root) %{_libdir}/libteamdctl.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/libteamdctl.so.0
+%{_mandir}/man1/bond2team.1*
+%{_mandir}/man5/teamd.conf.5*
+%{_mandir}/man8/teamd.8*
+%{_mandir}/man8/teamdctl.8*
+%{_mandir}/man8/teamnl.8*
+
+%files devel
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/libteam.so
+%attr(755,root,root) %{_libdir}/libteamdctl.so
+%{_includedir}/team.h
+%{_includedir}/teamdctl.h
+%{_pkgconfigdir}/libteam.pc
+%{_pkgconfigdir}/libteamdctl.pc
+
+%files static
+%defattr(644,root,root,755)
+%{_libdir}/libteam.a
+%{_libdir}/libteamdctl.a
diff --git a/libteam-link.patch b/libteam-link.patch
new file mode 100644
index 0000000..5361fe6
--- /dev/null
+++ b/libteam-link.patch
@@ -0,0 +1,11 @@
+--- libteam-1.11/libteamdctl/Makefile.am.orig 2014-03-31 16:45:20.000000000 +0200
++++ libteam-1.11/libteamdctl/Makefile.am 2014-07-05 15:07:52.779419209 +0200
+@@ -8,7 +8,7 @@
+ lib_LTLIBRARIES = libteamdctl.la
+ libteamdctl_la_SOURCES = libteamdctl.c cli_usock.c cli_dbus.c cli_zmq.c
+ libteamdctl_la_CFLAGS= $(AM_CFLAGS) $(DBUS_CFLAGS) -I${top_srcdir}/include -D_GNU_SOURCE
+-libteamdctl_la_LIBADD= $(DBUS_LIBS) $(ZMQ_LIBS)
++libteamdctl_la_LIBADD= $(DBUS_LIBS) $(ZMQ_LIBS) $(LIBDAEMON_LIBS)
+ libteamdctl_la_LDFLAGS = $(AM_LDFLAGS) -version-info @LIBTEAMDCTL_CURRENT@:@LIBTEAMDCTL_REVISION@:@LIBTEAMDCTL_AGE@
+
+ pkgconfigdir = $(libdir)/pkgconfig
diff --git a/libteam-missing.patch b/libteam-missing.patch
new file mode 100644
index 0000000..de83770
--- /dev/null
+++ b/libteam-missing.patch
@@ -0,0 +1,61 @@
+--- libteam-1.11/teamd/teamd_zmq_common.h.orig 1970-01-01 01:00:00.000000000 +0100
++++ libteam-1.11/teamd/teamd_zmq_common.h 2014-07-05 14:44:36.829477784 +0200
+@@ -0,0 +1,58 @@
++/*
++ * teamd_zmq_common.h - Teamd unix socket api common things
++ * Copyright (C) 2013 Jiri Zupka <jzupka at redhat.com>
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
++ */
++
++#ifndef _TEAMD_ZMQ_COMMON_H_
++#define _TEAMD_ZMQ_COMMON_H_
++
++#include <stdio.h>
++#include <errno.h>
++#include <sys/ioctl.h>
++#include <linux/sockios.h>
++
++#include "teamd.h"
++
++#define TEAMD_ZMQ_REQUEST_PREFIX "REQUEST"
++#define TEAMD_ZMQ_REPLY_ERR_PREFIX "REPLY_ERROR"
++#define TEAMD_ZMQ_REPLY_SUCC_PREFIX "REPLY_SUCCESS"
++
++static inline char *teamd_zmq_msg_getline(char **p_rest)
++{
++ char *start = NULL;
++ char *rest = NULL;
++ char *str = *p_rest;
++
++ if (!str)
++ return NULL;
++ while (1) {
++ if (*str == '\0')
++ break;
++ if ((*str != '\n') && !start)
++ start = str;
++ if ((*str == '\n') && start) {
++ *str = '\0';
++ rest = str + 1;
++ break;
++ }
++ str++;
++ }
++ *p_rest = rest;
++ return start;
++}
++
++#endif /* _TEAMD_ZMQ_COMMON_H_ */
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/libteam.git/commitdiff/40d088c838b7931c73d7838cc16ea9b701389c77
More information about the pld-cvs-commit
mailing list