Accepting request 518693 from security:netfilter

SLE cleaning

OBS-URL: https://build.opensuse.org/request/show/518693
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/iproute2?expand=0&rev=91
This commit is contained in:
Dominique Leuenberger 2017-08-28 14:16:40 +00:00 committed by Git OBS Bridge
commit 868767b014
14 changed files with 244 additions and 98 deletions

View File

@ -1,7 +1,7 @@
From 184ea2afa279c94248db86f74a3f4fd3ba3cded1 Mon Sep 17 00:00:00 2001
From: Michal Kubecek <mkubecek@suse.cz>
Date: Tue, 25 Nov 2014 08:39:36 +0100
Subject: [PATCH] Revert "emp: fix warning on deprecated bison directive"
Subject: Revert "emp: fix warning on deprecated bison directive"
Patch-mainline: Never, temporary workaround
This reverts commit edd3979272e46d17456a4dabc3e9acf59e561d5a.
@ -11,7 +11,7 @@ For SLE11 only. Its bison [version 2.3] does not allow new syntax.
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tc/emp_ematch.y b/tc/emp_ematch.y
index bc08da2..7043a80 100644
index 2e6cf3530ef2..753e3075df71 100644
--- a/tc/emp_ematch.y
+++ b/tc/emp_ematch.y
@@ -9,7 +9,7 @@
@ -24,5 +24,5 @@ index bc08da2..7043a80 100644
%union {
unsigned int i;
--
1.8.4.5
2.14.1

View File

@ -0,0 +1,27 @@
From: Michal Kubecek <mkubecek@suse.cz>
Date: Fri, 15 Jan 2016 07:31:30 +0100
Subject: add explicit typecast to avoid gcc warning
Patch-mainline: No
---
lib/utils.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/utils.c b/lib/utils.c
index 0919bb201229..8709e82de5bc 100644
--- a/lib/utils.c
+++ b/lib/utils.c
@@ -707,8 +707,8 @@ int matches(const char *cmd, const char *pattern)
int inet_addr_match(const inet_prefix *a, const inet_prefix *b, int bits)
{
- const __u32 *a1 = a->data;
- const __u32 *a2 = b->data;
+ const __u32 *a1 = (__u32*)a->data;
+ const __u32 *a2 = (__u32*)b->data;
int words = bits >> 0x05;
bits &= 0x1f;
--
2.14.1

View File

@ -1,13 +1,19 @@
From: Michal Kubecek <mkubecek@suse.cz>
Date: Fri, 15 Jan 2016 07:29:44 +0100
Subject: adjust installation directories for openSUSE/SLE
Patch-mainline: Never, SUSE specific
Match the directory layout of openSUSE and SLE.
---
Makefile | 4 ++--
netem/Makefile | 6 ++++--
tc/q_netem.c | 2 +-
3 files changed, 7 insertions(+), 5 deletions(-)
Index: iproute2-4.11.0/Makefile
===================================================================
--- iproute2-4.11.0.orig/Makefile
+++ iproute2-4.11.0/Makefile
diff --git a/Makefile b/Makefile
index 18de7dcb315b..d8702a769a07 100644
--- a/Makefile
+++ b/Makefile
@@ -9,7 +9,7 @@ endif
PREFIX?=/usr
@ -26,10 +32,10 @@ Index: iproute2-4.11.0/Makefile
ifneq ($(SHARED_LIBS),y)
DEFINES+= -DNO_SHARED_LIBS
endif
Index: iproute2-4.11.0/netem/Makefile
===================================================================
--- iproute2-4.11.0.orig/netem/Makefile
+++ iproute2-4.11.0/netem/Makefile
diff --git a/netem/Makefile b/netem/Makefile
index a68e2fdb3037..efff5850d9c1 100644
--- a/netem/Makefile
+++ b/netem/Makefile
@@ -5,6 +5,8 @@ HOSTCC ?= $(CC)
CCOPTS = $(CBUILD_CFLAGS)
LDLIBS += -lm
@ -51,11 +57,11 @@ Index: iproute2-4.11.0/netem/Makefile
done
clean:
Index: iproute2-4.11.0/tc/q_netem.c
===================================================================
--- iproute2-4.11.0.orig/tc/q_netem.c
+++ iproute2-4.11.0/tc/q_netem.c
@@ -113,7 +113,7 @@ static int get_distribution(const char *
diff --git a/tc/q_netem.c b/tc/q_netem.c
index 0975ae111de9..3a7084563eaf 100644
--- a/tc/q_netem.c
+++ b/tc/q_netem.c
@@ -113,7 +113,7 @@ static int get_distribution(const char *type, __s16 *data, int maxdata)
char *line = NULL;
char name[128];
@ -64,3 +70,6 @@ Index: iproute2-4.11.0/tc/q_netem.c
if ((f = fopen(name, "r")) == NULL) {
fprintf(stderr, "No distribution data for %s (%s: %s)\n",
type, name, strerror(errno));
--
2.14.1

View File

@ -1,11 +1,19 @@
From: Jan Engelhardt <jengelh@inai.de>
Date: Tue, 9 Oct 2012 14:27:11 +0200
Subject: doc: revert PDF creation
Patch-mainline: Never, temporary workaround
Revert 0ecf26fc7d2f24570b4c04a668c437b8656a40a7, since it
makes PDF creation fail on SUSE <= 12.2.
(cannot find linuxdoc-sgml.sty; seems like /usr/lib/sgml-tool
is not in the search path with texlive 2011/suse122.)
---
doc/Makefile | 22 ++++++----------------
1 file changed, 6 insertions(+), 16 deletions(-)
diff --git a/doc/Makefile b/doc/Makefile
index b92957e..1df6081 100644
index 0c51872afac5..e7514e4c3c9a 100644
--- a/doc/Makefile
+++ b/doc/Makefile
@@ -6,7 +6,7 @@ PSFILES=ip-cref.ps ip-tunnels.ps api-ip6-flowlabels.ps ss.ps nstat.ps arpd.ps rt
@ -52,3 +60,6 @@ index b92957e..1df6081 100644
%.ps: %.dvi
$(DVIPS) $< -o $@
--
2.14.1

View File

@ -1,14 +1,18 @@
From: Oleksandr Chumachenko <ledest@gmail.com>
Date: Sun, 28 Dec 2014 17:35:02 +0100
Date: Thu, 18 Dec 2014 17:35:02 +0100
Subject: examples: fix bashisms in example script
Patch-mainline: Not yet, waiting for author's response
As the script is declared to be for /bin/sh, it shouldn't use bash
specific syntax.
---
examples/gaiconf | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
Index: iproute2-3.17.0/examples/gaiconf
===================================================================
--- iproute2-3.17.0.orig/examples/gaiconf
+++ iproute2-3.17.0/examples/gaiconf
diff --git a/examples/gaiconf b/examples/gaiconf
index d75292b900cc..c87778f88f3b 100644
--- a/examples/gaiconf
+++ b/examples/gaiconf
@@ -11,7 +11,7 @@ DEFAULT_GAICONF=/etc/gai.conf
verbose=
debug=
@ -44,3 +48,6 @@ Index: iproute2-3.17.0/examples/gaiconf
{
echo "Usage: $0 [-v] {--list | --config [ ${DEFAULT_GAICONF} ] | --default}"
exit 1
--
2.14.1

View File

@ -1,30 +0,0 @@
---
lib/utils.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
Index: iproute2-4.8.0/lib/utils.c
===================================================================
--- iproute2-4.8.0.orig/lib/utils.c
+++ iproute2-4.8.0/lib/utils.c
@@ -49,6 +49,10 @@ int get_hex(char c)
return -1;
}
+#ifndef HZ
+#define HZ sysconf(_SC_CLK_TCK)
+#endif
+
int get_integer(int *val, const char *arg, int base)
{
long res;
@@ -683,8 +687,8 @@ int matches(const char *cmd, const char
int inet_addr_match(const inet_prefix *a, const inet_prefix *b, int bits)
{
- const __u32 *a1 = a->data;
- const __u32 *a2 = b->data;
+ const __u32 *a1 = (__u32*)a->data;
+ const __u32 *a2 = (__u32*)b->data;
int words = bits >> 0x05;
bits &= 0x1f;

View File

@ -1,3 +1,27 @@
-------------------------------------------------------------------
Tue Aug 22 12:58:39 UTC 2017 - mkubecek@suse.cz
- patch cleanup for SLE15 package:
* rename iproute2-dirs.diff
-> adjust-installation-directories-for-openSUSE-SLE.patch
* split iproute2-HZ.diff into
use-sysconf-_SC_CLK_TCK-if-HZ-undefined.patch and
add-explicit-typecast-to-avoid-gcc-warning.patch
* rename revert-pdf-creation.diff
-> doc-revert-PDF-creation.patch
* rename revert-bison-fix.diff
-> Revert-emp-fix-warning-on-deprecated-bison-directive.patch
* rename kernel_xfrm6_raw.patch
-> xfrm-support-displaying-transformations-used-for-Mob.patch
* refresh man-fix-documentation-references-in-manual-pages.patch
* rename iproute2-split-make.patch
-> split-link-and-compile-steps-for-binaries.patch
* rename iproute2-3.16.0-fix-bashisms.patch
-> examples-fix-bashisms-in-example-script.patch
- apply all patches in both specfiles to make sure everything is
built from fully patched sources
- move SLE11 workarounds to the end of the series
-------------------------------------------------------------------
Tue Jul 11 12:26:19 UTC 2017 - mkubecek@suse.cz

View File

@ -27,7 +27,6 @@ Url: http://www.linuxfoundation.org/collaborate/workgroups/networking
Source: http://kernel.org/pub/linux/utils/net/iproute2/iproute2-%rversion.tar.xz
Source2: http://kernel.org/pub/linux/utils/net/iproute2/iproute2-%rversion.tar.sign
Patch1: iproute2-3.16.0-fix-bashisms.patch
BuildArch: noarch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: bison
@ -51,6 +50,16 @@ BuildRequires: pkgconfig(libmnl)
BuildRequires: pkgconfig(xtables) >= 1.4.11
%endif
Patch1: adjust-installation-directories-for-openSUSE-SLE.patch
Patch2: use-sysconf-_SC_CLK_TCK-if-HZ-undefined.patch
Patch3: add-explicit-typecast-to-avoid-gcc-warning.patch
Patch4: xfrm-support-displaying-transformations-used-for-Mob.patch
Patch5: man-fix-documentation-references-in-manual-pages.patch
Patch6: split-link-and-compile-steps-for-binaries.patch
Patch7: examples-fix-bashisms-in-example-script.patch
Patch101: doc-revert-PDF-creation.patch
Patch102: Revert-emp-fix-warning-on-deprecated-bison-directive.patch
%description
This package contains the PDF documentation from iproute2,
as well as examples and other outdated files.
@ -58,6 +67,19 @@ as well as examples and other outdated files.
%prep
%setup -qn iproute2-%rversion
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch5 -p1
%patch6 -p1
%patch7 -p1
%if 0%{?sles_version} == 11 || (0%{?suse_version} && 0%{?suse_version} <= 1220)
%patch101 -p1
%endif
%if 0%{?sles_version} == 11
%patch102 -p1
%endif
find . -name *.orig -delete
%build
# build with -fPIC. For details see

View File

@ -1,3 +1,27 @@
-------------------------------------------------------------------
Tue Aug 22 12:58:39 UTC 2017 - mkubecek@suse.cz
- patch cleanup for SLE15 package:
* rename iproute2-dirs.diff
-> adjust-installation-directories-for-openSUSE-SLE.patch
* split iproute2-HZ.diff into
use-sysconf-_SC_CLK_TCK-if-HZ-undefined.patch and
add-explicit-typecast-to-avoid-gcc-warning.patch
* rename revert-pdf-creation.diff
-> doc-revert-PDF-creation.patch
* rename revert-bison-fix.diff
-> Revert-emp-fix-warning-on-deprecated-bison-directive.patch
* rename kernel_xfrm6_raw.patch
-> xfrm-support-displaying-transformations-used-for-Mob.patch
* refresh man-fix-documentation-references-in-manual-pages.patch
* rename iproute2-split-make.patch
-> split-link-and-compile-steps-for-binaries.patch
* rename iproute2-3.16.0-fix-bashisms.patch
-> examples-fix-bashisms-in-example-script.patch
- apply all patches in both specfiles to make sure everything is
built from fully patched sources
- move SLE11 workarounds to the end of the series
-------------------------------------------------------------------
Tue Jul 11 12:26:19 UTC 2017 - mkubecek@suse.cz

View File

@ -32,13 +32,6 @@ Source: http://kernel.org/pub/linux/utils/net/iproute2/%name-%rversion.t
Source2: http://kernel.org/pub/linux/utils/net/iproute2/%name-%rversion.tar.sign
Source666: pre_checkin.sh
Source667: %name.keyring
Patch1: iproute2-dirs.diff
Patch2: iproute2-HZ.diff
Patch3: revert-pdf-creation.diff
Patch4: revert-bison-fix.diff
Patch5: kernel_xfrm6_raw.patch
Patch6: man-fix-documentation-references-in-manual-pages.patch
Patch7: iproute2-split-make.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: bison
BuildRequires: db-devel
@ -55,6 +48,16 @@ BuildRequires: pkgconfig(xtables) >= 1.4.11
Provides: iproute = %version-%release
Provides: %name(xfrm6_raw) = %version-%release
Patch1: adjust-installation-directories-for-openSUSE-SLE.patch
Patch2: use-sysconf-_SC_CLK_TCK-if-HZ-undefined.patch
Patch3: add-explicit-typecast-to-avoid-gcc-warning.patch
Patch4: xfrm-support-displaying-transformations-used-for-Mob.patch
Patch5: man-fix-documentation-references-in-manual-pages.patch
Patch6: split-link-and-compile-steps-for-binaries.patch
Patch7: examples-fix-bashisms-in-example-script.patch
Patch101: doc-revert-PDF-creation.patch
Patch102: Revert-emp-fix-warning-on-deprecated-bison-directive.patch
%description
iproute2 is a collection of user-space utilities to set up networking
under Linux from the command-line. It can inspect and configure,
@ -83,14 +86,19 @@ bash command line completion support for iproute.
%prep
%setup -qn %name-%rversion
%patch -P 1 -P 2 -p1
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch5 -p1
%patch6 -p1
%patch7 -p1
%if 0%{?sles_version} == 11 || (0%{?suse_version} && 0%{?suse_version} <= 1220)
%patch -P 3 -p1
%patch101 -p1
%endif
%if 0%{?sles_version} == 11
%patch -P 4 -p1
%patch102 -p1
%endif
%patch -P 5 -P 6 -P 7 -p1
find . -name *.orig -delete
%build

View File

@ -25,10 +25,10 @@ index acd5f4a20522..738acd545f6a 100644
.SH AUTHOR
lnstat was written by Harald Welte <laforge@gnumonks.org>.
diff --git a/man/man8/ss.8 b/man/man8/ss.8
index f4d5264f3036..2be5295d58f3 100644
index 81de69de8042..092570884cf6 100644
--- a/man/man8/ss.8
+++ b/man/man8/ss.8
@@ -131,7 +131,7 @@ Read filter information from FILE.
@@ -142,7 +142,7 @@ Read filter information from FILE.
Each line of FILE is interpreted like single command line option. If FILE is - stdin is used.
.TP
.B FILTER := [ state STATE-FILTER ] [ EXPRESSION ]
@ -37,7 +37,7 @@ index f4d5264f3036..2be5295d58f3 100644
.SH STATE-FILTER
@@ -186,7 +186,7 @@ Find all local processes connected to X server.
@@ -197,7 +197,7 @@ Find all local processes connected to X server.
List all the tcp sockets in state FIN-WAIT-1 for our apache to network 193.233.7/24 and look at their timers.
.SH SEE ALSO
.BR ip (8),
@ -47,5 +47,5 @@ index f4d5264f3036..2be5295d58f3 100644
.BR RFC " 793 "
- https://tools.ietf.org/rfc/rfc793.txt (TCP states)
--
2.7.0
2.14.1

View File

@ -1,7 +1,19 @@
Index: iproute2-4.9.0/misc/Makefile
===================================================================
--- iproute2-4.9.0.orig/misc/Makefile
+++ iproute2-4.9.0/misc/Makefile
From: Marcus Meissner <meissner@suse.com>
Date: Sat, 10 Jun 2017 14:29:22 +0000
Subject: split link and compile steps for binaries
Patch-mainline: Submitted - 20170804
Do not compile and link in one step so that CFLAGS and LDFLAGS are only
applied to the phase they are intended for. This is needed for PIE default
to work.
---
misc/Makefile | 17 +++++++++--------
1 file changed, 9 insertions(+), 8 deletions(-)
diff --git a/misc/Makefile b/misc/Makefile
index 72807678054b..bb9009bdb1f8 100644
--- a/misc/Makefile
+++ b/misc/Makefile
@@ -17,23 +17,24 @@ endif
ifeq ($(IP_CONFIG_SETNS),y)
CFLAGS += -DHAVE_SETNS
@ -35,3 +47,6 @@ Index: iproute2-4.9.0/misc/Makefile
ssfilter.c: ssfilter.y
$(QUIET_YACC)bison ssfilter.y -o ssfilter.c
--
2.14.1

View File

@ -0,0 +1,27 @@
From: Michal Kubecek <mkubecek@suse.cz>
Date: Fri, 15 Jan 2016 07:30:15 +0100
Subject: use sysconf(_SC_CLK_TCK) if HZ undefined
Patch-mainline: No
---
lib/utils.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/lib/utils.c b/lib/utils.c
index e77bd302530b..0919bb201229 100644
--- a/lib/utils.c
+++ b/lib/utils.c
@@ -49,6 +49,10 @@ int get_hex(char c)
return -1;
}
+#ifndef HZ
+#define HZ sysconf(_SC_CLK_TCK)
+#endif
+
int get_integer(int *val, const char *arg, int base)
{
long res;
--
2.14.1

View File

@ -1,21 +1,20 @@
From: Jan Engelhardt <jengelh@inai.de>
Date: 2015-01-21 22:57:10.562539816 +0100
xfrm: support displaying transformations used for Mobile IPv6
Date: Wed, 21 Jan 2015 22:57:10 +0100
Subject: xfrm: support displaying transformations used for Mobile IPv6
Patch-mainline: No
Patch taken from mip6d-ng c397c3b4a16bb2e31a86f6c5e344a1278d1577c5
and included in openSUSE so as to facilitate mip6d-ng.
---
ip/ipxfrm.c | 2 +-
ip/xfrm_policy.c | 1 +
ip/xfrm_state.c | 1 +
3 files changed, 3 insertions(+), 1 deletion(-)
Index: iproute2-4.6.0/ip/ipxfrm.c
===================================================================
--- iproute2-4.6.0.orig/ip/ipxfrm.c
+++ iproute2-4.6.0/ip/ipxfrm.c
diff --git a/ip/ipxfrm.c b/ip/ipxfrm.c
index d5eb22e25476..b72858d8a210 100644
--- a/ip/ipxfrm.c
+++ b/ip/ipxfrm.c
@@ -114,7 +114,7 @@ struct typeent {
static const struct typeent xfrmproto_types[] = {
{ "esp", IPPROTO_ESP }, { "ah", IPPROTO_AH }, { "comp", IPPROTO_COMP },
@ -25,10 +24,10 @@ Index: iproute2-4.6.0/ip/ipxfrm.c
{ NULL, -1 }
};
Index: iproute2-4.6.0/ip/xfrm_policy.c
===================================================================
--- iproute2-4.6.0.orig/ip/xfrm_policy.c
+++ iproute2-4.6.0/ip/xfrm_policy.c
diff --git a/ip/xfrm_policy.c b/ip/xfrm_policy.c
index de689c4d86c4..6ee2ec6abeba 100644
--- a/ip/xfrm_policy.c
+++ b/ip/xfrm_policy.c
@@ -93,6 +93,7 @@ static void usage(void)
fprintf(stderr, "%s | ", strxf_xfrmproto(IPPROTO_ESP));
fprintf(stderr, "%s | ", strxf_xfrmproto(IPPROTO_AH));
@ -37,11 +36,11 @@ Index: iproute2-4.6.0/ip/xfrm_policy.c
fprintf(stderr, "%s | ", strxf_xfrmproto(IPPROTO_ROUTING));
fprintf(stderr, "%s\n", strxf_xfrmproto(IPPROTO_DSTOPTS));
fprintf(stderr, "MODE := transport | tunnel | beet | ro | in_trigger\n");
Index: iproute2-4.6.0/ip/xfrm_state.c
===================================================================
--- iproute2-4.6.0.orig/ip/xfrm_state.c
+++ iproute2-4.6.0/ip/xfrm_state.c
@@ -72,6 +72,7 @@ static void usage(void)
diff --git a/ip/xfrm_state.c b/ip/xfrm_state.c
index e11c93bf1c3b..b501e6d04727 100644
--- a/ip/xfrm_state.c
+++ b/ip/xfrm_state.c
@@ -73,6 +73,7 @@ static void usage(void)
fprintf(stderr, "%s | ", strxf_xfrmproto(IPPROTO_ESP));
fprintf(stderr, "%s | ", strxf_xfrmproto(IPPROTO_AH));
fprintf(stderr, "%s | ", strxf_xfrmproto(IPPROTO_COMP));
@ -49,3 +48,6 @@ Index: iproute2-4.6.0/ip/xfrm_state.c
fprintf(stderr, "%s | ", strxf_xfrmproto(IPPROTO_ROUTING));
fprintf(stderr, "%s\n", strxf_xfrmproto(IPPROTO_DSTOPTS));
fprintf(stderr, "ALGO-LIST := [ ALGO-LIST ] ALGO\n");
--
2.14.1