Update to iputils-s20121205 (#884436) and remove unnecessary patches

This commit is contained in:
Jan Synacek 2012-12-06 11:44:28 +01:00
parent 78401088f3
commit 16419d42b7
9 changed files with 22 additions and 226 deletions

1
.gitignore vendored
View File

@ -7,3 +7,4 @@ ifenslave.tar.gz
/iputils-s20121112.tar.bz2
/iputils-s20121121.tar.bz2
/iputils-s20121125.tar.bz2
/iputils-s20121205.tar.bz2

View File

@ -1,17 +0,0 @@
Add warning if trying to bind to a subinterface.
Author: Johannes Tevessen <j.tevessen@gmx.net>
Resolves: #81640
--- iputils-ss021109-vanilla/ping.c Thu Nov 7 23:53:21 2002
+++ iputils/ping.c Sun Jan 12 03:39:24 2003
@@ -285,6 +285,9 @@
perror("ping: IP_MULTICAST_IF");
exit(2);
}
+ } else if (icmp_sock >= 0) {
+ /* We possibly tried to SO_BINDTODEVICE() a subinterface like 'eth0:1' */
+ perror("Warning: cannot bind to specified iface, falling back");
}
}
}

View File

@ -1,8 +1,8 @@
Fedora-specific makefile patch.
--- iputils-s20121125/Makefile.orig 2012-12-05 15:30:04.000000000 +0100
+++ iputils-s20121125/Makefile 2012-12-05 15:31:50.349577490 +0100
@@ -32,7 +32,7 @@
--- iputils-s20121205/Makefile.orig 2012-12-05 15:46:14.000000000 +0100
+++ iputils-s20121205/Makefile 2012-12-06 11:38:14.752414482 +0100
@@ -46,7 +46,7 @@
# -------------------------------------
# What a pity, all new gccs are buggy and -Werror does not work. Sigh.
# CCOPT=-fno-strict-aliasing -Wstrict-prototypes -Wall -Werror -g
@ -11,7 +11,16 @@ Fedora-specific makefile patch.
CCOPTOPT=-O3
GLIBCFIX=-D_GNU_SOURCE
DEFINES=
@@ -77,7 +77,7 @@
@@ -73,7 +73,7 @@
endif
# USE_IDN: DEF_IDN, LIB_IDN
-ifneq ($(USE_IDN),no)
+ifneq ($(USE_IDN),yes)
DEF_IDN = -DUSE_IDN
LIB_IDN = $(call FUNC_LIB,$(USE_IDN),$(LDFLAG_IDN))
endif
@@ -101,7 +101,7 @@
IPV6_TARGETS=tracepath6 traceroute6 ping6
TARGETS=$(IPV4_TARGETS) $(IPV6_TARGETS)
@ -19,8 +28,8 @@ Fedora-specific makefile patch.
+CFLAGS+=$(RPM_OPT_FLAGS) $(CCOPTOPT) $(CCOPT) $(GLIBCFIX) $(DEFINES)
LDLIBS=$(LDLIB) $(ADDLIB)
LASTTAG:=`git describe HEAD | sed -e 's/-.*//'`
@@ -146,6 +146,7 @@
UNAME_N:=$(shell uname -n)
@@ -178,6 +178,7 @@
# -------------------------------------
# ninfod

View File

@ -1,13 +0,0 @@
Compile with libidn support.
--- iputils-s20121125/Makefile.orig 2012-11-26 11:27:31.000000000 +0100
+++ iputils-s20121125/Makefile 2012-11-26 11:28:02.128803095 +0100
@@ -21,7 +21,7 @@
# sysfs support (with libsysfs - deprecated)
USE_SYSFS=no
# IDN support (experimental)
-USE_IDN=no
+USE_IDN=yes
# Do not use getifaddrs
WITHOUT_IFADDRS=no
# arping default device

View File

@ -1,79 +0,0 @@
From da9c6e97214f88739212a23bb3bbe4f9d2ff6258 Mon Sep 17 00:00:00 2001
From: Jan Synacek <jsynacek@redhat.com>
Date: Tue, 27 Nov 2012 09:38:13 +0100
Subject: [PATCH 1/2] arping: Fix finding of a default interface when no -I is
specified.
By default, no interface string should be supplied. This ensures that we can
recognize if an interface was specified or omitted. Previously, when -I was not
used, default interface string was compiled-in and the automatic selection
didn't work correctly.
RH-Bugzilla: #879807
Signed-off-by: Jan Synacek <jsynacek@redhat.com>
---
Makefile | 4 +---
arping.c | 11 ++---------
2 files changed, 3 insertions(+), 12 deletions(-)
diff --git a/Makefile b/Makefile
index ae92f34..b5bf84f 100644
--- a/Makefile
+++ b/Makefile
@@ -24,8 +24,6 @@ USE_SYSFS=no
USE_IDN=yes
# Do not use getifaddrs
WITHOUT_IFADDRS=no
-# arping default device
-ARPING_DEFAULT_DEVICE=eth0
# rdisc server (-r option) support
ENABLE_RDISC_SERVER=no
# ping6 source routing (deprecated by RFC5095)
@@ -99,7 +97,7 @@ $(TARGETS): %: %.o
# -------------------------------------
# arping
-DEF_arping = $(DEF_SYSFS) $(DEF_CAP) $(DEF_IDN) $(DEF_WITHOUT_IFADDRS) -DDEFAULT_DEVICE=\"$(ARPING_DEFAULT_DEVICE)\"
+DEF_arping = $(DEF_SYSFS) $(DEF_CAP) $(DEF_IDN) $(DEF_WITHOUT_IFADDRS)
LIB_arping = $(LIB_SYSFS) $(LIB_CAP) $(LIB_IDN)
# clockdiff
diff --git a/arping.c b/arping.c
index f6433c2..ccb68a0 100644
--- a/arping.c
+++ b/arping.c
@@ -55,13 +55,6 @@ struct sysf_devattr_values;
static void usage(void) __attribute__((noreturn));
-#ifdef DEFAULT_DEVICE
-# define DEFAULT_DEVICE_STR DEFAULT_DEVICE
-#else
-# define DEFAULT_DEVICE_STR "no default"
-# define DEFAULT_DEVICE NULL
-#endif
-
struct device {
char *name;
int ifindex;
@@ -75,7 +68,7 @@ struct device {
int quit_on_reply=0;
struct device device = {
- .name = DEFAULT_DEVICE,
+ .name = NULL,
};
char *source;
struct in_addr src, dst;
@@ -128,7 +121,7 @@ void usage(void)
" -V : print version and exit\n"
" -c count : how many packets to send\n"
" -w timeout : how long to wait for a reply\n"
- " -I device : which ethernet device to use (" DEFAULT_DEVICE_STR ")\n"
+ " -I device : which ethernet device to use\n"
" -s source : source ip address\n"
" destination : ask for what ip address\n"
);
--
1.7.11.7

View File

@ -1,38 +0,0 @@
From e1f83df4d69f8d6d168fff308f5744e65d060490 Mon Sep 17 00:00:00 2001
From: Jan Synacek <jsynacek@redhat.com>
Date: Tue, 27 Nov 2012 13:58:40 +0100
Subject: [PATCH] ping,tracepath doc: Fix missing end tags.
Signed-off-by: Jan Synacek <jsynacek@redhat.com>
---
doc/ping.sgml | 1 +
doc/tracepath.sgml | 1 +
2 files changed, 2 insertions(+)
diff --git a/doc/ping.sgml b/doc/ping.sgml
index f77276b..fb3c3ac 100644
--- a/doc/ping.sgml
+++ b/doc/ping.sgml
@@ -130,6 +130,7 @@ If value is zero, kernel allocates random flow label.
<listitem><para>
Show help.
</para></listitem>
+ </varlistentry>
<varlistentry>
<term><option>-i <replaceable/interval/</option></term>
<listitem><para>
diff --git a/doc/tracepath.sgml b/doc/tracepath.sgml
index 8da7cc0..19c3903 100644
--- a/doc/tracepath.sgml
+++ b/doc/tracepath.sgml
@@ -72,6 +72,7 @@ Sets the initial packet length to <replaceable/pktlen/ instead of
<listitem><para>
Sets the initial destination port to use.
</para></listitem>
+ </varlistentry>
</variablelist>
</refsect1>
--
1.7.11.7

View File

@ -1,60 +0,0 @@
From 8e892529af268a4e86bae045e07c93b5d4c360b0 Mon Sep 17 00:00:00 2001
From: Jan Synacek <jsynacek@redhat.com>
Date: Tue, 27 Nov 2012 12:53:23 +0100
Subject: [PATCH 2/2] arping: Call usage() before limiting capabilities.
Otherwise, running arping binary without the capabilities set results in printing
warnings with the usage.
Signed-off-by: Jan Synacek <jsynacek@redhat.com>
---
arping.c | 26 +++++++++++++-------------
1 file changed, 13 insertions(+), 13 deletions(-)
diff --git a/arping.c b/arping.c
index ccb68a0..02e3d9c 100644
--- a/arping.c
+++ b/arping.c
@@ -959,19 +959,6 @@ main(int argc, char **argv)
int socket_errno;
int ch;
- limit_capabilities();
-
-#ifdef USE_IDN
- setlocale(LC_ALL, "");
-#endif
-
- enable_capability_raw();
-
- s = socket(PF_PACKET, SOCK_DGRAM, 0);
- socket_errno = errno;
-
- disable_capability_raw();
-
while ((ch = getopt(argc, argv, "h?bfDUAqc:w:s:I:V")) != EOF) {
switch(ch) {
case 'b':
@@ -1023,6 +1010,19 @@ main(int argc, char **argv)
target = *argv;
+ limit_capabilities();
+
+#ifdef USE_IDN
+ setlocale(LC_ALL, "");
+#endif
+
+ enable_capability_raw();
+
+ s = socket(PF_PACKET, SOCK_DGRAM, 0);
+ socket_errno = errno;
+
+ disable_capability_raw();
+
if (device.name && !*device.name)
device.name = NULL;
--
1.7.11.7

View File

@ -1,7 +1,7 @@
Summary: Network monitoring tools including ping
Name: iputils
Version: 20121125
Release: 3%{?dist}
Version: 20121205
Release: 1%{?dist}
# some parts are under the original BSD (ping.c)
# some are under GPLv2+ (tracepath.c)
License: BSD and GPLv2+
@ -16,12 +16,7 @@ Source5: rdisc.sysconfig
Source6: ninfod.service
Patch0: iputils-20020927-rh.patch
Patch2: iputils-20020927-ping-subint.patch
Patch3: iputils-ifenslave.patch
Patch4: iputils-20121112-idn.patch
Patch7: iputils-20121121-ifaddrs.patch
Patch8: iputils-20121125-usage-before-caps.patch
Patch9: iputils-20121125-doc-tags.patch
Patch10: iputils-20121125-ninfod-minor.patch
BuildRequires: docbook-utils perl-SGMLSpm
@ -71,12 +66,7 @@ Queries.
%setup -q -a 1 -n %{name}-s%{version}
%patch0 -p1 -b .rh
%patch2 -p1 -b .ping-subint
%patch3 -p1 -b .addr
%patch4 -p1 -b .idn
%patch7 -p1 -b .ifaddrs
%patch8 -p1 -b .usage-before-caps
%patch9 -p1 -b .doc-tags
%patch10 -p1 -b .ninfod-minor
%build
@ -185,6 +175,9 @@ mv -f RELNOTES.tmp RELNOTES
%attr(644,root,root) %{_mandir}/man8/ninfod.8.gz
%changelog
* Thu Dec 06 2012 Jan Synáček <jsynacek@redhat.com> - 20121205-1
- Update to iputils-s20121205 (#884436) and remove unnecessary patches
* Thu Dec 06 2012 Jan Synáček <jsynacek@redhat.com> - 20121125-3
- Package ninfod (#877530)
- Update systemd requirements

View File

@ -1,2 +1,2 @@
fb00899ec0f1e4e6c54faa7be25ea926 iputils-s20121125.tar.bz2
26dc2a36cc29e911a212ca10d7710077 iputils-s20121205.tar.bz2
6702c58e970e6a73fc8d9b7c9b63af35 ifenslave.tar.gz