[packages/trickle] patches from fedora, filterout -Werror=format-security temporarily
glen
glen at pld-linux.org
Mon Oct 15 11:12:35 CEST 2012
commit 7042cf304522be797ab2d43e9964e11aa9a5edad
Author: Elan Ruusamäe <glen at delfi.ee>
Date: Mon Oct 15 12:12:03 2012 +0300
patches from fedora, filterout -Werror=format-security temporarily
trickle-1.07-CVE-2009-0415.patch | 11 +++++
...le-1.07-bwsta_getdelay-stop-if-no-packets.patch | 24 ++++++++++
trickle-1.07-include_netdb.patch | 56 ++++++++++++++++++++++
trickle-1.07-libdir.patch | 23 +++++++++
trickle.spec | 16 +++++--
5 files changed, 127 insertions(+), 3 deletions(-)
---
diff --git a/trickle.spec b/trickle.spec
index f6c2b66..c9ef2a7 100644
--- a/trickle.spec
+++ b/trickle.spec
@@ -4,13 +4,17 @@
Summary: portable lightweight userspace bandwidth shaper
Name: trickle
Version: 1.07
-Release: 0.5
+Release: 0.6
License: BSD
Group: Applications/Networking
Source0: http://www.monkey.org/~marius/trickle/%{name}-%{version}.tar.gz
# Source0-md5: 860ebc4abbbd82957c20a28bd9390d7d
Patch0: %{name}-build.patch
Patch1: %{name}-fwrite.patch
+Patch2: %{name}-1.07-CVE-2009-0415.patch
+Patch3: %{name}-1.07-bwsta_getdelay-stop-if-no-packets.patch
+Patch4: %{name}-1.07-include_netdb.patch
+Patch5: %{name}-1.07-libdir.patch
URL: http://www.monkey.org/~marius/trickle/
BuildRequires: autoconf
BuildRequires: automake
@@ -18,6 +22,9 @@ BuildRequires: libevent-devel
BuildRequires: libtool
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+# FIXME
+%define filterout_c -Werror=format-security
+
%description
trickle is a portable lightweight userspace bandwidth shaper. It can
run in collaborative mode (together with trickled) or in stand alone
@@ -34,6 +41,10 @@ and does not require root privileges.
%setup -q
%patch0 -p1
%patch1 -p1
+%patch2 -p1
+%patch3 -p1
+%patch4 -p1
+%patch5 -p1
%build
# ugly hack
@@ -47,13 +58,12 @@ and does not require root privileges.
%install
rm -rf $RPM_BUILD_ROOT
-
install -d $RPM_BUILD_ROOT%{_sysconfdir}
%{__make} install \
DESTDIR="$RPM_BUILD_ROOT"
-install trickled.conf $RPM_BUILD_ROOT%{_sysconfdir}
+cp -p trickled.conf $RPM_BUILD_ROOT%{_sysconfdir}
%clean
rm -rf $RPM_BUILD_ROOT
diff --git a/trickle-1.07-CVE-2009-0415.patch b/trickle-1.07-CVE-2009-0415.patch
new file mode 100644
index 0000000..3b632d0
--- /dev/null
+++ b/trickle-1.07-CVE-2009-0415.patch
@@ -0,0 +1,11 @@
+diff -up trickle-1.07/trickle.c.cve trickle-1.07/trickle.c
+--- trickle-1.07/trickle.c.cve 2004-12-13 01:15:51.000000000 +0100
++++ trickle-1.07/trickle.c 2009-02-12 20:21:46.000000000 +0100
+@@ -49,7 +49,6 @@ main(int argc, char **argv)
+ char buf[MAXPATHLEN], sockname[MAXPATHLEN], *path, **pathp;
+ struct stat sb;
+ char *trypaths[] = {
+- LIBNAME,
+ LIBDIR "/" LIBNAME,
+ NULL
+ };
diff --git a/trickle-1.07-bwsta_getdelay-stop-if-no-packets.patch b/trickle-1.07-bwsta_getdelay-stop-if-no-packets.patch
new file mode 100644
index 0000000..5ff6eda
--- /dev/null
+++ b/trickle-1.07-bwsta_getdelay-stop-if-no-packets.patch
@@ -0,0 +1,24 @@
+From 3b22c327ff6ac3ee51332919e91ae63d47225a9b Mon Sep 17 00:00:00 2001
+From: Alon Levy <alevy at redhat.com>
+Date: Thu, 15 Sep 2011 18:05:13 +0300
+Subject: [PATCH] bwsta_getdelay: stop if no packets
+
+---
+ bwstat.c | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/bwstat.c b/bwstat.c
+index a1c1085..9567275 100644
+--- a/bwstat.c
++++ b/bwstat.c
+@@ -210,7 +210,7 @@ bwstat_getdelay(struct bwstat *bs, size_t *len, uint lim, short which)
+
+ ent += xent;
+ }
+- } while (pool > 0 && ncli > 0);
++ } while (pool > 0 && ncli > 0 && (TAILQ_FIRST(&poolq) != TAILQ_END(&poolq)));
+
+ /*
+ * This is the case of a client that is not using its limit.
+--
+1.7.6.2
diff --git a/trickle-1.07-include_netdb.patch b/trickle-1.07-include_netdb.patch
new file mode 100644
index 0000000..1d4528d
--- /dev/null
+++ b/trickle-1.07-include_netdb.patch
@@ -0,0 +1,56 @@
+diff -up trickle-1.06/client.c.include_netdb trickle-1.06/client.c
+--- trickle-1.06/client.c.include_netdb 2003-05-09 04:16:42.000000000 +0200
++++ trickle-1.06/client.c 2008-06-07 17:16:50.000000000 +0200
+@@ -6,7 +6,7 @@
+ *
+ * $Id: client.c,v 1.14 2003/05/09 02:16:42 marius Exp $
+ */
+-
++#include <netdb.h>
+ #include <sys/types.h>
+
+ #ifdef HAVE_CONFIG_H
+diff -up trickle-1.06/tricklectl.c.include_netdb trickle-1.06/tricklectl.c
+--- trickle-1.06/tricklectl.c.include_netdb 2003-06-03 01:13:28.000000000 +0200
++++ trickle-1.06/tricklectl.c 2008-06-07 17:18:01.000000000 +0200
+@@ -6,7 +6,7 @@
+ *
+ * $Id: tricklectl.c,v 1.4 2003/06/02 23:13:28 marius Exp $
+ */
+-
++#include <netdb.h>
+ #include <sys/types.h>
+
+ #ifdef HAVE_CONFIG_H
+diff -up trickle-1.06/trickled.c.include_netdb trickle-1.06/trickled.c
+--- trickle-1.06/trickled.c.include_netdb 2003-05-09 04:16:42.000000000 +0200
++++ trickle-1.06/trickled.c 2008-06-07 17:16:34.000000000 +0200
+@@ -13,6 +13,7 @@
+ * initial spike
+ */
+
++#include <netdb.h>
+ #include <sys/types.h>
+
+ #ifdef HAVE_CONFIG_H
+--- trickle-1.07/trickledu.c.old 2008-08-29 04:19:47.000000000 +0300
++++ trickle-1.07/trickledu.c 2008-08-29 04:20:37.000000000 +0300
+@@ -7,6 +7,7 @@
+ * $Id: trickledu.c,v 1.16 2004/02/13 06:11:21 marius Exp $
+ */
+
++#include <netdb.h>
+ #include <sys/types.h>
+
+ #ifdef HAVE_CONFIG_H
+diff -up trickle-1.06/trickle-overload.c.include_netdb trickle-1.06/trickle-overload.c
+--- trickle-1.06/trickle-overload.c.include_netdb 2003-06-03 01:13:28.000000000 +0200
++++ trickle-1.06/trickle-overload.c 2008-06-07 17:21:51.000000000 +0200
+@@ -10,6 +10,7 @@
+ /* Ick. linux sucks. */
+ #define _GNU_SOURCE
+
++#include <netdb.h>
+ #include <sys/types.h>
+
+ #ifdef HAVE_CONFIG_H
diff --git a/trickle-1.07-libdir.patch b/trickle-1.07-libdir.patch
new file mode 100644
index 0000000..97012ac
--- /dev/null
+++ b/trickle-1.07-libdir.patch
@@ -0,0 +1,23 @@
+--- trickle-1.07/configure.in.libdir 2005-01-09 05:19:38.000000000 +0900
++++ trickle-1.07/configure.in 2008-06-17 00:16:32.000000000 +0900
+@@ -212,7 +212,7 @@
+ csysconfdir="$sysconfdir"
+ fi
+
+-clibdir="$prefix/lib/trickle"
++clibdir="$libdir/trickle"
+
+ AC_DEFINE_UNQUOTED(SYSCONFDIR, "$csysconfdir")
+ AC_DEFINE_UNQUOTED(LIBDIR, "$clibdir")
+--- trickle-1.07/configure.libdir 2005-01-09 05:20:06.000000000 +0900
++++ trickle-1.07/configure 2008-06-17 00:21:05.000000000 +0900
+@@ -21005,7 +21005,7 @@
+ csysconfdir="$sysconfdir"
+ fi
+
+-clibdir="$prefix/lib/trickle"
++clibdir="$libdir/trickle"
+
+ cat >>confdefs.h <<_ACEOF
+ #define SYSCONFDIR "$csysconfdir"
+
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/trickle.git/commitdiff/7042cf304522be797ab2d43e9964e11aa9a5edad
More information about the pld-cvs-commit
mailing list