From cfb7669cf663dd641d93c80c675371504eb93659 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pavel=20=C5=A0imerda?= Date: Thu, 9 Apr 2015 15:41:57 +0200 Subject: [PATCH] clean up the patches --- iproute.spec | 92 +- iproute2-2.6.35-print-route.patch | 13 - iproute2-3.11.0-rtt.patch | 13 - iproute2-3.12.0-lnstat-dump-to-stdout.patch | 13 - iproute2-3.12.0-lnstat-interval.patch | 34 - iproute2-3.15.0-optflags.patch | 13 - iproute2-3.16.0-ip-link-add-name.patch | 35 - iproute2-3.19.0-build.patch | 66 + iproute2-3.19.0-cbq-example.patch | 59 + iproute2-3.19.0-diff.patch | 1621 +++++++++++++++++++ iproute2-3.19.0-docs.patch | 643 ++++++++ iproute2-3.19.0-lnstat-interval.patch | 54 + iproute2-3.19.0-lnstat-stdout.patch | 33 + iproute2-3.19.0-proto-any.patch | 43 + iproute2-3.19.0-route-cloned.patch | 29 + iproute2-3.4.0-kernel.patch | 12 - iproute2-3.9.0-IPPROTO_IP_for_SA.patch | 12 - iproute2-example-cbq-service.patch | 22 - iproute2-tc-priority.patch | 57 - man-pages.patch | 89 - 20 files changed, 2619 insertions(+), 334 deletions(-) delete mode 100644 iproute2-2.6.35-print-route.patch delete mode 100644 iproute2-3.11.0-rtt.patch delete mode 100644 iproute2-3.12.0-lnstat-dump-to-stdout.patch delete mode 100644 iproute2-3.12.0-lnstat-interval.patch delete mode 100644 iproute2-3.15.0-optflags.patch delete mode 100644 iproute2-3.16.0-ip-link-add-name.patch create mode 100644 iproute2-3.19.0-build.patch create mode 100644 iproute2-3.19.0-cbq-example.patch create mode 100644 iproute2-3.19.0-diff.patch create mode 100644 iproute2-3.19.0-docs.patch create mode 100644 iproute2-3.19.0-lnstat-interval.patch create mode 100644 iproute2-3.19.0-lnstat-stdout.patch create mode 100644 iproute2-3.19.0-proto-any.patch create mode 100644 iproute2-3.19.0-route-cloned.patch delete mode 100644 iproute2-3.4.0-kernel.patch delete mode 100644 iproute2-3.9.0-IPPROTO_IP_for_SA.patch delete mode 100644 iproute2-example-cbq-service.patch delete mode 100644 iproute2-tc-priority.patch delete mode 100644 man-pages.patch diff --git a/iproute.spec b/iproute.spec index 7e54404..175f400 100644 --- a/iproute.spec +++ b/iproute.spec @@ -8,17 +8,66 @@ URL: http://kernel.org/pub/linux/utils/net/%{name}2/ Source0: http://kernel.org/pub/linux/utils/net/%{name}2/%{name}2-%{version}.tar.xz Source1: cbq-0000.example Source2: avpkt -Patch0: man-pages.patch -Patch1: iproute2-3.4.0-kernel.patch -Patch2: iproute2-3.15.0-optflags.patch -Patch3: iproute2-3.9.0-IPPROTO_IP_for_SA.patch -Patch4: iproute2-example-cbq-service.patch -Patch5: iproute2-2.6.35-print-route.patch -Patch6: iproute2-3.12.0-lnstat-dump-to-stdout.patch -# Rejected by upstream -Patch7: iproute2-3.11.0-tc-ok.patch -Patch8: iproute2-3.11.0-rtt.patch -Patch9: iproute2-3.12.0-lnstat-interval.patch + +# Selective git diff between release and master. Updating this pachage +# using current may require updating one or more of the subsequent +# patches. +# +# git diff v3.19.0..master man +Patch0: iproute2-3.19.0-diff.patch +# manpage/help improvements +# +# https://bugzilla.redhat.com/show_bug.cgi?id=1072441 +# https://bugzilla.redhat.com/show_bug.cgi?id=1075692 +# https://bugzilla.redhat.com/show_bug.cgi?id=1077191 +# https://bugzilla.redhat.com/show_bug.cgi?id=1105438 +# https://bugzilla.redhat.com/show_bug.cgi?id=1121261 +# +# TODO submit upstream +Patch1: iproute2-3.19.0-docs.patch +# build system improvements +# +# (no bugzilla tickets) +# +# TODO submit upstream +Patch2: iproute2-3.19.0-build.patch +# ip-xfrm: support 'proto any' with 'sport' and 'dport' +# +# https://bugzilla.redhat.com/show_bug.cgi?id=497355 +# +# TODO: submit upstream +Patch3: iproute2-3.19.0-proto-any.patch +# cbq: fix find syntax in example +# +# https://bugzilla.redhat.com/show_bug.cgi?id=539232 +# +# TODO: submit upstream +Patch4: iproute2-3.19.0-cbq-example.patch +# ip-route: don't hide routes with RTM_F_CLONED by default +# +# (no bugzilla ticket) +# +# TODO: submit upstream +Patch5: iproute2-3.19.0-route-cloned.patch +# lnstat: dump to stdout, not stderr +# +# TODO: submit upstream +Patch6: iproute2-3.19.0-lnstat-stdout.patch +# lnstat: run indefinitely by default +# +# https://bugzilla.redhat.com/show_bug.cgi?id=977845 +# +# TODO: submit upstream +Patch7: iproute2-3.19.0-lnstat-interval.patch +# tc: add -OK option +# +# http://thread.gmane.org/gmane.linux.network/284101 +# +# Rejected by upstream. +# +# TODO: Retry upstreaming and decide whether it's needed in Fedora. +Patch8: iproute2-3.11.0-tc-ok.patch + License: GPLv2+ and Public Domain BuildRequires: bison BuildRequires: flex @@ -63,18 +112,17 @@ The libnetlink static library. %prep %setup -q -n %{name}2-%{version} %patch0 -p1 -%patch1 -p1 -b .kernel -%patch2 -p1 -b .opt_flags -%patch3 -p1 -b .ipproto -%patch4 -p1 -b .fix_cbq -%patch5 -p1 -b .print-route -%patch6 -p1 -b .lnstat-dump-to-stdout -%patch7 -p1 -b .tc_ok -%patch8 -p1 -b .rtt -%patch9 -p1 -b .lnstat-interval -sed -i 's/^LIBDIR=/LIBDIR?=/' Makefile +%patch1 -p1 +%patch2 -p1 +%patch3 -p1 +%patch4 -p1 +%patch5 -p1 +%patch6 -p1 +%patch7 -p1 +%patch8 -p1 %build +export CFLAGS="%{optflags}" export LIBDIR=/%{_libdir} export IPT_LIB_DIR=/%{_lib}/xtables ./configure @@ -82,6 +130,8 @@ make %{?_smp_mflags} make -C doc %install +# TODO: Update upstream build system so that we don't need to handle +# installation manually. mkdir -p \ %{buildroot}%{_includedir} \ %{buildroot}%{_sbindir} \ diff --git a/iproute2-2.6.35-print-route.patch b/iproute2-2.6.35-print-route.patch deleted file mode 100644 index 04f3cf7..0000000 --- a/iproute2-2.6.35-print-route.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/ip/iproute.c b/ip/iproute.c -index 711576e..86c7ab7 100644 ---- a/ip/iproute.c -+++ b/ip/iproute.c -@@ -160,7 +160,7 @@ int print_route(const struct sockaddr_nl *who, struct nlmsghdr *n, void *arg) - if (r->rtm_family == AF_INET6 && table != RT_TABLE_MAIN) - ip6_multiple_tables = 1; - -- if (filter.cloned == !(r->rtm_flags&RTM_F_CLONED)) -+ if (filter.cloned && !(r->rtm_flags&RTM_F_CLONED)) - return 0; - - if (r->rtm_family == AF_INET6 && !ip6_multiple_tables) { diff --git a/iproute2-3.11.0-rtt.patch b/iproute2-3.11.0-rtt.patch deleted file mode 100644 index ef36077..0000000 --- a/iproute2-3.11.0-rtt.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/lib/utils.c b/lib/utils.c -index dae1b51..8a1a65d 100644 ---- a/lib/utils.c -+++ b/lib/utils.c -@@ -165,8 +165,6 @@ int get_time_rtt(unsigned *val, const char *arg, int *raw) - t = (double)res; - } - -- if (p == arg) -- return -1; - *raw = 1; - - if (*p) { diff --git a/iproute2-3.12.0-lnstat-dump-to-stdout.patch b/iproute2-3.12.0-lnstat-dump-to-stdout.patch deleted file mode 100644 index d16a4bb..0000000 --- a/iproute2-3.12.0-lnstat-dump-to-stdout.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/misc/lnstat.c b/misc/lnstat.c -index d6415ef..8608cfa 100644 ---- a/misc/lnstat.c -+++ b/misc/lnstat.c -@@ -351,7 +351,7 @@ int main(int argc, char **argv) - - switch (mode) { - case MODE_DUMP: -- lnstat_dump(stderr, lnstat_files); -+ lnstat_dump(stdout, lnstat_files); - break; - - case MODE_NORMAL: diff --git a/iproute2-3.12.0-lnstat-interval.patch b/iproute2-3.12.0-lnstat-interval.patch deleted file mode 100644 index b20f079..0000000 --- a/iproute2-3.12.0-lnstat-interval.patch +++ /dev/null @@ -1,34 +0,0 @@ -diff --git a/misc/lnstat.c b/misc/lnstat.c -index 8608cfa..8e8b1ba 100644 ---- a/misc/lnstat.c -+++ b/misc/lnstat.c -@@ -253,7 +253,7 @@ int main(int argc, char **argv) - MODE_JSON, - MODE_NORMAL, - } mode = MODE_NORMAL; -- unsigned long count = 1; -+ unsigned long count = 0; - struct table_hdr *header; - static struct field_params fp; - int num_req_files = 0; -@@ -366,7 +366,7 @@ int main(int argc, char **argv) - if (interval < 1 ) - interval = 1; - -- for (i = 0; i < count; i++) { -+ for (i = 0; i < count || !count; ) { - lnstat_update(lnstat_files); - if (mode == MODE_JSON) - print_json(stdout, lnstat_files, &fp); -@@ -377,8 +377,10 @@ int main(int argc, char **argv) - print_line(stdout, lnstat_files, &fp); - } - fflush(stdout); -- if (i < count - 1) -+ if (i < count - 1 || !count) - sleep(interval); -+ if (count) -+ ++i; - } - break; - } diff --git a/iproute2-3.15.0-optflags.patch b/iproute2-3.15.0-optflags.patch deleted file mode 100644 index 025f60a..0000000 --- a/iproute2-3.15.0-optflags.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/Makefile b/Makefile -index c881200..e8eeeb7 100644 ---- a/Makefile -+++ b/Makefile -@@ -34,7 +34,7 @@ CCOPTS = -O2 - WFLAGS := -Wall -Wstrict-prototypes -Wmissing-prototypes - WFLAGS += -Wmissing-declarations -Wold-style-definition -Wformat=2 - --CFLAGS = $(WFLAGS) $(CCOPTS) -I../include $(DEFINES) -+CFLAGS = $(WFLAGS) $(CCOPTS) -I../include $(DEFINES) $(RPM_OPT_FLAGS) - YACCFLAGS = -d -t -v - - SUBDIRS=lib ip tc bridge misc netem genl man diff --git a/iproute2-3.16.0-ip-link-add-name.patch b/iproute2-3.16.0-ip-link-add-name.patch deleted file mode 100644 index 8fcbc4d..0000000 --- a/iproute2-3.16.0-ip-link-add-name.patch +++ /dev/null @@ -1,35 +0,0 @@ -From f1b66ff83a0babbe99fef81b3a960d7a4ce8dbc6 Mon Sep 17 00:00:00 2001 -From: vadimk -Date: Sat, 30 Aug 2014 15:06:00 +0300 -Subject: [PATCH] ip link: Remove unnecessary device checking - -The real checking is performed later in iplink_modify(..) func which -checks device existence if NLM_F_CREATE flag is set. - -Also it fixes the case when impossible to add veth link which was -caused by 9a02651a87 (ip: check for missing dev arg when doing VF rate) -because these devices are not exist yet. - -Signed-off-by: Vadim Kochan -Acked-by: Oliver Hartkopp -Signed-off-by: Stephen Hemminger ---- - ip/iplink.c | 2 -- - 1 file changed, 2 deletions(-) - -diff --git a/ip/iplink.c b/ip/iplink.c -index 1a907d9..ea06871 100644 ---- a/ip/iplink.c -+++ b/ip/iplink.c -@@ -593,8 +593,6 @@ int iplink_parse(int argc, char **argv, struct iplink_req *req, - duparg2("dev", *argv); - *dev = *argv; - dev_index = ll_name_to_index(*dev); -- if (dev_index == 0) -- invarg("Unknown device", *argv); - } - argc--; argv++; - } --- -2.1.0 - diff --git a/iproute2-3.19.0-build.patch b/iproute2-3.19.0-build.patch new file mode 100644 index 0000000..ae6e9d8 --- /dev/null +++ b/iproute2-3.19.0-build.patch @@ -0,0 +1,66 @@ +From af8fba0402dda8e459399542d19d5a9afebe71b2 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Pavel=20=C5=A0imerda?= +Date: Fri, 13 Mar 2015 13:17:02 +0100 +Subject: [PATCH 2/7] turn Makefile more distribution friendly +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Changes: + + * Accept directory settings from environment. + * Remove redundant ROOTDIR variable. + * Set KERNEL_INCLUDE default to '/usr/include'. + * Use CFLAGS from environemnt. + +Note: In the long term it might be better to improve the configure +script to generate those parts of the Makefile in a manner similar +to autoconf. It might be even practical to autotoolize the package. + +Signed-Off-By: Pavel Å imerda +--- + Makefile | 22 +++++++++++----------- + 1 file changed, 11 insertions(+), 11 deletions(-) + +diff --git a/Makefile b/Makefile +index 9dbb29f..18faee4 100644 +--- a/Makefile ++++ b/Makefile +@@ -1,15 +1,15 @@ +-ROOTDIR=$(DESTDIR) +-PREFIX=/usr +-LIBDIR=$(PREFIX)/lib +-SBINDIR=/sbin +-CONFDIR=/etc/iproute2 +-DATADIR=$(PREFIX)/share +-DOCDIR=$(DATADIR)/doc/iproute2 +-MANDIR=$(DATADIR)/man +-ARPDDIR=/var/lib/arpd ++PREFIX?=/usr ++LIBDIR?=$(PREFIX)/lib ++SBINDIR?=/sbin ++CONFDIR?=/etc/iproute2 ++DATADIR?=$(PREFIX)/share ++DOCDIR?=$(DATADIR)/doc/iproute2 ++MANDIR?=$(DATADIR)/man ++ARPDDIR?=/var/lib/arpd ++KERNEL_INCLUDE?=/usr/include + + # Path to db_185.h include +-DBM_INCLUDE:=$(ROOTDIR)/usr/include ++DBM_INCLUDE:=$(DESTDIR)/usr/include + + SHARED_LIBS = y + +@@ -33,7 +33,7 @@ CCOPTS = -O2 + WFLAGS := -Wall -Wstrict-prototypes -Wmissing-prototypes + WFLAGS += -Wmissing-declarations -Wold-style-definition -Wformat=2 + +-CFLAGS = $(WFLAGS) $(CCOPTS) -I../include $(DEFINES) ++CFLAGS := $(WFLAGS) $(CCOPTS) -I../include $(DEFINES) $(CFLAGS) + YACCFLAGS = -d -t -v + + SUBDIRS=lib ip tc bridge misc netem genl man +-- +2.0.5 + diff --git a/iproute2-3.19.0-cbq-example.patch b/iproute2-3.19.0-cbq-example.patch new file mode 100644 index 0000000..c451573 --- /dev/null +++ b/iproute2-3.19.0-cbq-example.patch @@ -0,0 +1,59 @@ +From ee92ed5c996f95e1f14da3945cb8f92becbfdf2c Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Pavel=20=C5=A0imerda?= +Date: Fri, 13 Mar 2015 13:17:03 +0100 +Subject: [PATCH 4/7] cbq: fix find syntax in example +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Without modification, using the example resulted in the following error: + +[root@localhost sbin]# cbq restart +find: warning: you have specified the -maxdepth option after a +non-option argument (, but options are not positional (-maxdepth affects +tests specified before it as well as those specified after it). Please +specify options before other arguments. + +find: warning: you have specified the -maxdepth option after a +non-option argument (, but options are not positional (-maxdepth affects +tests specified before it as well as those specified after it). Please +specify options before other arguments. + +**CBQ: failed to compile CBQ configuration! + +See also: + + * https://bugzilla.redhat.com/show_bug.cgi?id=539232 + +Reported-By: Mads Kiilerich +Signed-Off-By: Pavel Å imerda +--- + examples/cbq.init-v0.7.3 | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/examples/cbq.init-v0.7.3 b/examples/cbq.init-v0.7.3 +index 35a0a05..1bc0d44 100644 +--- a/examples/cbq.init-v0.7.3 ++++ b/examples/cbq.init-v0.7.3 +@@ -578,14 +578,14 @@ cbq_show () { + ### Check configuration and load DEVICES, DEVFIELDS and CLASSLIST from $1 + cbq_init () { + ### Get a list of configured classes +- CLASSLIST=`find $1 \( -type f -or -type l \) -name 'cbq-*' \ +- -not -name '*~' -maxdepth 1 -printf "%f\n"| sort` ++ CLASSLIST=`find $1 -maxdepth 1 \( -type f -or -type l \) -name 'cbq-*' \ ++ -not -name '*~' -printf "%f\n"| sort` + [ -z "$CLASSLIST" ] && + cbq_failure "no configuration files found in $1!" + + ### Gather all DEVICE fields from $1/cbq-* +- DEVFIELDS=`find $1 \( -type f -or -type l \) -name 'cbq-*' \ +- -not -name '*~' -maxdepth 1| xargs sed -n 's/#.*//; \ ++ DEVFIELDS=`find $1 -maxdepth 1 \( -type f -or -type l \) -name 'cbq-*' \ ++ -not -name '*~' | xargs sed -n 's/#.*//; \ + s/[[:space:]]//g; /^DEVICE=[^,]*,[^,]*\(,[^,]*\)\?/ \ + { s/.*=//; p; }'| sort -u` + [ -z "$DEVFIELDS" ] && +-- +2.0.5 + diff --git a/iproute2-3.19.0-diff.patch b/iproute2-3.19.0-diff.patch new file mode 100644 index 0000000..66b8e49 --- /dev/null +++ b/iproute2-3.19.0-diff.patch @@ -0,0 +1,1621 @@ +diff --git a/man/man8/Makefile b/man/man8/Makefile +index e998928..152747a 100644 +--- a/man/man8/Makefile ++++ b/man/man8/Makefile +@@ -6,7 +6,7 @@ MAN8PAGES = $(TARGETS) ip.8 arpd.8 lnstat.8 routel.8 rtacct.8 rtmon.8 ss.8 \ + tc-mqprio.8 tc-netem.8 tc-pfifo.8 tc-pfifo_fast.8 tc-prio.8 tc-red.8 \ + tc-sfb.8 tc-sfq.8 tc-stab.8 tc-tbf.8 \ + bridge.8 rtstat.8 ctstat.8 nstat.8 routef.8 \ +- ip-addrlabel.8 ip-l2tp.8 \ ++ ip-addrlabel.8 ip-fou.8 ip-gue.8 ip-l2tp.8 \ + ip-maddress.8 ip-monitor.8 ip-mroute.8 ip-neighbour.8 \ + ip-netns.8 ip-ntable.8 ip-rule.8 ip-tunnel.8 ip-xfrm.8 \ + ip-tcp_metrics.8 ip-netconf.8 ip-token.8 +diff --git a/man/man8/arpd.8 b/man/man8/arpd.8 +index fc99b97..5050a98 100644 +--- a/man/man8/arpd.8 ++++ b/man/man8/arpd.8 +@@ -35,7 +35,7 @@ Suppress sending broadcast queries by the kernel. This option only makes sense t + Specifies the timeout of the negative cache. When resolution fails, arpd suppresses further attempts to resolve for this period. This option only makes sense together with option '-k'. This timeout should not be too much longer than the boot time of a typical host not supporting gratuitous ARP. Default value is 60 seconds. + .TP + -p