- major patch cleanup so it will be easier to get patches upstream
- fix for #68212, previous fix actually didn't work for ping6 - renewed the ia64 align patches - update README.bonding - clear up the code from warnings - spec file cleanup
This commit is contained in:
parent
25380c1c5b
commit
f86a533db1
@ -15,19 +15,17 @@
|
||||
!(hp = gethostbyaddr((char *)&addr, 4, AF_INET)))
|
||||
--- iputils/ping6.c.addrcache 2002-09-20 17:08:11.000000000 +0200
|
||||
+++ iputils/ping6.c 2003-05-15 16:41:19.000000000 +0200
|
||||
@@ -893,7 +893,14 @@
|
||||
@@ -893,7 +893,12 @@
|
||||
*/
|
||||
char * pr_addr(struct in6_addr *addr)
|
||||
{
|
||||
- struct hostent *hp = NULL;
|
||||
+ static struct hostent *hp = NULL;
|
||||
+ static struct in6_addr addr_cache = {{{0,0,0,0}}};
|
||||
+ static struct hostent *hp;
|
||||
+ static struct in6_addr addr_cache;
|
||||
+
|
||||
+ if ( addr->s6_addr32[0] == addr_cache.s6_addr32[0] &&
|
||||
+ addr->s6_addr32[1] == addr_cache.s6_addr32[1] &&
|
||||
+ addr->s6_addr32[2] == addr_cache.s6_addr32[2] &&
|
||||
+ addr->s6_addr32[3] == addr_cache.s6_addr32[3] )
|
||||
+ if (memcmp(addr, &addr_cache, sizeof(addr_cache)) == 0)
|
||||
+ return hp ? hp->h_name : pr_addr_n(addr);
|
||||
+ memcpy(&addr_cache, addr, sizeof(addr_cache));
|
||||
|
||||
if (!(options&F_NUMERIC))
|
||||
hp = gethostbyaddr((__u8*)addr, sizeof(struct in6_addr), AF_INET6);
|
||||
|
@ -1,40 +0,0 @@
|
||||
--- iputils/ping.c 2005-05-18 01:37:05.621810488 -0400
|
||||
+++ iputils/ping.c.new 2005-05-18 01:41:27.113018222 -0400
|
||||
@@ -101,7 +101,7 @@ static struct {
|
||||
int cmsg_len;
|
||||
|
||||
struct sockaddr_in source;
|
||||
-char *device;
|
||||
+char *device=NULL;
|
||||
int pmtudisc = -1;
|
||||
|
||||
|
||||
@@ -177,7 +177,7 @@ main(int argc, char **argv)
|
||||
ptr[3] = i4;
|
||||
options |= F_STRICTSOURCE;
|
||||
} else {
|
||||
- device = optarg;
|
||||
+ device = strdup(optarg);
|
||||
}
|
||||
break;
|
||||
}
|
||||
--- iputils/ping6.c 2005-05-18 01:37:05.620833925 -0400
|
||||
+++ iputils/ping6.c.new 2005-05-18 01:41:23.599346390 -0400
|
||||
@@ -155,7 +155,7 @@ static int pr_icmph(__u8 type, __u8 code
|
||||
static void usage(void) __attribute((noreturn));
|
||||
|
||||
struct sockaddr_in6 source;
|
||||
-char *device;
|
||||
+char *device=NULL;
|
||||
int pmtudisc=-1;
|
||||
|
||||
static int icmp_sock;
|
||||
@@ -248,7 +248,7 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
options |= F_STRICTSOURCE;
|
||||
} else {
|
||||
- device = optarg;
|
||||
+ device = strdup(optarg);
|
||||
}
|
||||
break;
|
||||
case 'M':
|
@ -1,14 +1,3 @@
|
||||
--- iputils/doc/Makefile.rh7 2002-02-23 01:17:57.000000000 +0100
|
||||
+++ iputils/doc/Makefile 2004-05-12 14:55:16.724448173 +0200
|
||||
@@ -2,7 +2,7 @@
|
||||
HTMLFILES=$(subst .sgml,.html,$(SGMLFILES)) index.html
|
||||
MANFILES=$(subst .sgml,.8,$(SGMLFILES))
|
||||
|
||||
-all: html
|
||||
+all:
|
||||
|
||||
html: $(HTMLFILES) iputils.html
|
||||
|
||||
--- iputils/Makefile.rh7 2002-09-20 20:23:55.000000000 +0200
|
||||
+++ iputils/Makefile 2004-05-12 15:08:25.638310270 +0200
|
||||
@@ -24,8 +24,8 @@
|
||||
@ -17,8 +6,8 @@
|
||||
#CCOPT=-D_GNU_SOURCE -O2 -Wstrict-prototypes -Wall -g -Werror
|
||||
-CCOPT=-D_GNU_SOURCE -O2 -Wstrict-prototypes -Wall -g
|
||||
-CFLAGS=$(CCOPT) $(GLIBCFIX) $(DEFINES)
|
||||
+#CCOPT=-D_GNU_SOURCE -O2 -Wstrict-prototypes -Wall -g
|
||||
+#CFLAGS=$(CCOPT) $(GLIBCFIX) $(DEFINES)
|
||||
+CCOPT?=-D_GNU_SOURCE -O2 -Wstrict-prototypes -Wall -g
|
||||
+CFLAGS?=$(CCOPT) $(GLIBCFIX) $(DEFINES)
|
||||
|
||||
IPV4_TARGETS=tracepath ping clockdiff rdisc arping tftpd rarpd
|
||||
IPV6_TARGETS=tracepath6 traceroute6 ping6
|
||||
|
@ -1,11 +0,0 @@
|
||||
--- iputils/arping.c.unaligned 2001-10-06 00:42:47.000000000 +0200
|
||||
+++ iputils/arping.c 2003-10-02 15:14:42.000000000 +0200
|
||||
@@ -332,7 +332,7 @@
|
||||
timeout = atoi(optarg);
|
||||
break;
|
||||
case 'I':
|
||||
- device = optarg;
|
||||
+ device = strdup(optarg);
|
||||
break;
|
||||
case 'f':
|
||||
quit_on_reply=1;
|
@ -58,7 +58,7 @@ diff -up iputils-s20070202/arping.c.arping_timeout iputils-s20070202/arping.c
|
||||
sigaddset(&sset, SIGINT);
|
||||
sigprocmask(SIG_BLOCK, &sset, &osset);
|
||||
- recv_pack(packet, cc, &from[0]);
|
||||
+ if (recv_pack(packet, cc, &from) && count == 0 && !forever)
|
||||
+ if (recv_pack(packet, cc, from) && count == 0 && !forever)
|
||||
+ finish();
|
||||
sigprocmask(SIG_SETMASK, &osset, NULL);
|
||||
}
|
||||
|
43
iputils-20070202-ia64_align.patch
Normal file
43
iputils-20070202-ia64_align.patch
Normal file
@ -0,0 +1,43 @@
|
||||
diff -up iputils-s20071127/ping.c.ia64_align iputils-s20071127/ping.c
|
||||
--- iputils-s20071127/ping.c.ia64_align 2008-06-02 08:56:32.000000000 +0200
|
||||
+++ iputils-s20071127/ping.c 2008-06-02 08:56:32.000000000 +0200
|
||||
@@ -200,13 +200,13 @@ main(int argc, char **argv)
|
||||
ptr[3] = i4;
|
||||
options |= F_STRICTSOURCE;
|
||||
} else {
|
||||
- device = optarg;
|
||||
+ device = strdup(optarg);
|
||||
}
|
||||
#else
|
||||
if (inet_pton(AF_INET, optarg, &source.sin_addr) > 0)
|
||||
options |= F_STRICTSOURCE;
|
||||
else
|
||||
- device = optarg;
|
||||
+ device = strdup(optarg);
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
diff -up iputils-s20071127/arping.c.ia64_align iputils-s20071127/arping.c
|
||||
--- iputils-s20071127/arping.c.ia64_align 2008-06-02 08:56:32.000000000 +0200
|
||||
+++ iputils-s20071127/arping.c 2008-06-02 08:56:32.000000000 +0200
|
||||
@@ -351,7 +351,7 @@ main(int argc, char **argv)
|
||||
timeout = atoi(optarg);
|
||||
break;
|
||||
case 'I':
|
||||
- device = optarg;
|
||||
+ device = strdup(optarg);
|
||||
break;
|
||||
case 'f':
|
||||
quit_on_reply=1;
|
||||
diff -up iputils-s20071127/ping6.c.ia64_align iputils-s20071127/ping6.c
|
||||
--- iputils-s20071127/ping6.c.ia64_align 2008-06-02 08:56:32.000000000 +0200
|
||||
+++ iputils-s20071127/ping6.c 2008-06-02 08:56:32.000000000 +0200
|
||||
@@ -256,7 +256,7 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
options |= F_STRICTSOURCE;
|
||||
} else {
|
||||
- device = optarg;
|
||||
+ device = strdup(optarg);
|
||||
}
|
||||
break;
|
||||
case 'M':
|
@ -1,36 +1,30 @@
|
||||
--- iputils-s20070202/ping.c.idn 2007-08-06 14:45:36.000000000 +0200
|
||||
+++ iputils-s20070202/ping.c 2007-08-06 14:45:36.000000000 +0200
|
||||
@@ -58,6 +58,12 @@
|
||||
@@ -58,6 +58,9 @@
|
||||
* This program has to run SUID to ROOT to access the ICMP socket.
|
||||
*/
|
||||
|
||||
+#define LIBIDN
|
||||
+#ifdef LIBIDN
|
||||
+#include <idna.h>
|
||||
+#include <locale.h>
|
||||
+#endif
|
||||
+
|
||||
#include "ping_common.h"
|
||||
|
||||
#include <netinet/ip.h>
|
||||
@@ -122,6 +128,12 @@
|
||||
@@ -122,6 +128,10 @@
|
||||
char *target, hnamebuf[MAXHOSTNAMELEN];
|
||||
char rspace[3 + 4 * NROUTES + 1]; /* record route space */
|
||||
|
||||
+#ifdef LIBIDN
|
||||
+ char *idn;
|
||||
+ int rc = 0;
|
||||
+ setlocale(LC_ALL, "");
|
||||
+#endif
|
||||
+
|
||||
icmp_sock = socket(AF_INET, SOCK_RAW, IPPROTO_ICMP);
|
||||
socket_errno = errno;
|
||||
|
||||
@@ -242,13 +254,35 @@
|
||||
@@ -242,13 +254,27 @@
|
||||
if (argc == 1)
|
||||
options |= F_NUMERIC;
|
||||
} else {
|
||||
+#ifdef LIBIDN
|
||||
+ rc = idna_to_ascii_lz (target, &idn, 0);
|
||||
+ if (rc == IDNA_SUCCESS)
|
||||
+ hp = gethostbyname (idn);
|
||||
@ -39,15 +33,12 @@
|
||||
+ exit(2);
|
||||
+ }
|
||||
+ free(idn);
|
||||
+#else
|
||||
hp = gethostbyname(target);
|
||||
+#endif
|
||||
- hp = gethostbyname(target);
|
||||
if (!hp) {
|
||||
fprintf(stderr, "ping: unknown host %s\n", target);
|
||||
exit(2);
|
||||
}
|
||||
memcpy(&whereto.sin_addr, hp->h_addr, 4);
|
||||
+#ifdef LIBIDN
|
||||
+ rc = idna_to_unicode_lzlz (hp->h_name, &idn, 0);
|
||||
+ if (rc == IDNA_SUCCESS)
|
||||
+ strncpy(hnamebuf, idn, sizeof(hnamebuf) - 1);
|
||||
@ -56,9 +47,7 @@
|
||||
+ exit(2);
|
||||
+ }
|
||||
+ free(idn);
|
||||
+#else
|
||||
strncpy(hnamebuf, hp->h_name, sizeof(hnamebuf) - 1);
|
||||
+#endif
|
||||
- strncpy(hnamebuf, hp->h_name, sizeof(hnamebuf) - 1);
|
||||
hnamebuf[sizeof(hnamebuf) - 1] = 0;
|
||||
hostname = hnamebuf;
|
||||
}
|
||||
@ -80,78 +69,62 @@
|
||||
|
||||
--- iputils-s20070202/ping6.c.idn 2007-08-06 14:45:36.000000000 +0200
|
||||
+++ iputils-s20070202/ping6.c 2007-08-06 14:45:36.000000000 +0200
|
||||
@@ -66,6 +66,12 @@
|
||||
@@ -66,6 +66,9 @@
|
||||
* More statistics could always be gathered.
|
||||
* This program has to run SUID to ROOT to access the ICMP socket.
|
||||
*/
|
||||
+#define IDN
|
||||
+#ifdef IDN
|
||||
+#define _GNU_SOURCE
|
||||
+#include <locale.h>
|
||||
+#endif
|
||||
+
|
||||
#include "ping_common.h"
|
||||
|
||||
#include <linux/filter.h>
|
||||
@@ -210,6 +216,10 @@
|
||||
@@ -210,6 +216,8 @@
|
||||
int err, csum_offset, sz_opt;
|
||||
static uint32_t scope_id = 0;
|
||||
|
||||
+#ifdef IDN
|
||||
+ setlocale(LC_ALL, "");
|
||||
+#endif
|
||||
+
|
||||
icmp_sock = socket(AF_INET6, SOCK_RAW, IPPROTO_ICMPV6);
|
||||
socket_errno = errno;
|
||||
|
||||
@@ -296,6 +306,9 @@
|
||||
@@ -296,6 +306,7 @@
|
||||
|
||||
memset(&hints, 0, sizeof(hints));
|
||||
hints.ai_family = AF_INET6;
|
||||
+#ifdef IDN
|
||||
+ hints.ai_flags = AI_IDN;
|
||||
+#endif
|
||||
gai = getaddrinfo(target, NULL, &hints, &ai);
|
||||
if (gai) {
|
||||
fprintf(stderr, "unknown host\n");
|
||||
@@ -328,6 +341,9 @@
|
||||
@@ -328,6 +341,7 @@
|
||||
|
||||
memset(&hints, 0, sizeof(hints));
|
||||
hints.ai_family = AF_INET6;
|
||||
+#ifdef IDN
|
||||
+ hints.ai_flags = AI_IDN;
|
||||
+#endif
|
||||
gai = getaddrinfo(target, NULL, &hints, &ai);
|
||||
if (gai) {
|
||||
fprintf(stderr, "unknown host\n");
|
||||
--- iputils-s20070202/ping_common.c.idn 2007-08-06 14:45:36.000000000 +0200
|
||||
+++ iputils-s20070202/ping_common.c 2007-08-06 14:47:41.000000000 +0200
|
||||
@@ -1,3 +1,8 @@
|
||||
+#define LIBIDN
|
||||
+#ifdef LIBIDN
|
||||
@@ -1,3 +1,5 @@
|
||||
+#include <locale.h>
|
||||
+#endif
|
||||
+
|
||||
#include "ping_common.h"
|
||||
#include <ctype.h>
|
||||
#include <sched.h>
|
||||
@@ -97,6 +102,9 @@
|
||||
@@ -97,6 +102,7 @@
|
||||
|
||||
void common_options(int ch)
|
||||
{
|
||||
+#ifdef LIBIDN
|
||||
+ setlocale(LC_ALL, "C");
|
||||
+#endif
|
||||
switch(ch) {
|
||||
case 'a':
|
||||
options |= F_AUDIBLE;
|
||||
@@ -222,6 +230,9 @@
|
||||
@@ -222,6 +230,7 @@
|
||||
default:
|
||||
abort();
|
||||
}
|
||||
+#ifdef LIBIDN
|
||||
+ setlocale(LC_ALL, "");
|
||||
+#endif
|
||||
}
|
||||
|
||||
|
||||
|
126
iputils-20071127-warnings.patch
Normal file
126
iputils-20071127-warnings.patch
Normal file
@ -0,0 +1,126 @@
|
||||
diff -up iputils-s20071127/ping_common.c.warnings iputils-s20071127/ping_common.c
|
||||
--- iputils-s20071127/ping_common.c.warnings 2008-06-02 13:29:27.000000000 +0200
|
||||
+++ iputils-s20071127/ping_common.c 2008-06-02 13:29:27.000000000 +0200
|
||||
@@ -338,7 +338,7 @@ resend:
|
||||
* high preload or pipe size is very confusing. */
|
||||
if ((preload < screen_width && pipesize < screen_width) ||
|
||||
in_flight() < screen_width)
|
||||
- write(STDOUT_FILENO, ".", 1);
|
||||
+ printf(".");
|
||||
}
|
||||
return interval - tokens;
|
||||
}
|
||||
@@ -391,7 +391,7 @@ resend:
|
||||
|
||||
if (i == 0 && !(options & F_QUIET)) {
|
||||
if (options & F_FLOOD)
|
||||
- write(STDOUT_FILENO, "E", 1);
|
||||
+ printf("E");
|
||||
else
|
||||
perror("ping: sendmsg");
|
||||
}
|
||||
@@ -717,9 +717,9 @@ restamp:
|
||||
|
||||
if (options & F_FLOOD) {
|
||||
if (!csfailed)
|
||||
- write(STDOUT_FILENO, "\b \b", 3);
|
||||
+ printf("\b \b");
|
||||
else
|
||||
- write(STDOUT_FILENO, "\bC", 1);
|
||||
+ printf("\bC");
|
||||
} else {
|
||||
int i;
|
||||
__u8 *cp, *dp;
|
||||
diff -up iputils-s20071127/clockdiff.c.warnings iputils-s20071127/clockdiff.c
|
||||
--- iputils-s20071127/clockdiff.c.warnings 2007-11-27 01:57:27.000000000 +0100
|
||||
+++ iputils-s20071127/clockdiff.c 2008-06-02 13:29:27.000000000 +0200
|
||||
@@ -628,8 +628,6 @@ main(int argc, char *argv[])
|
||||
}
|
||||
}
|
||||
|
||||
- nice(-16);
|
||||
-
|
||||
if ((measure_status = (ip_opt_len ? measure_opt : measure)(&server)) < 0) {
|
||||
if (errno)
|
||||
perror("measure");
|
||||
diff -up iputils-s20071127/ping6.c.warnings iputils-s20071127/ping6.c
|
||||
--- iputils-s20071127/ping6.c.warnings 2008-06-02 13:30:06.000000000 +0200
|
||||
+++ iputils-s20071127/ping6.c 2008-06-02 13:31:14.000000000 +0200
|
||||
@@ -667,7 +667,7 @@ int receive_error_msg()
|
||||
if (options & F_QUIET)
|
||||
goto out;
|
||||
if (options & F_FLOOD)
|
||||
- write(STDOUT_FILENO, "E", 1);
|
||||
+ printf("E");
|
||||
else if (e->ee_errno != EMSGSIZE)
|
||||
fprintf(stderr, "ping: local error: %s\n", strerror(e->ee_errno));
|
||||
else
|
||||
@@ -690,7 +690,7 @@ int receive_error_msg()
|
||||
if (options & F_QUIET)
|
||||
goto out;
|
||||
if (options & F_FLOOD) {
|
||||
- write(STDOUT_FILENO, "\bE", 2);
|
||||
+ printf("\bE");
|
||||
} else {
|
||||
printf("From %s icmp_seq=%u ", pr_addr(&sin6->sin6_addr), ntohs(icmph.icmp6_seq));
|
||||
pr_icmph(e->ee_type, e->ee_code, e->ee_info);
|
||||
@@ -838,7 +838,7 @@ parse_reply(struct msghdr *msg, int cc,
|
||||
return 0;
|
||||
nerrors++;
|
||||
if (options & F_FLOOD) {
|
||||
- write(STDOUT_FILENO, "\bE", 2);
|
||||
+ printf("\bE");
|
||||
return 0;
|
||||
}
|
||||
printf("From %s: icmp_seq=%u ", pr_addr(&from->sin6_addr), ntohs(icmph1->icmp6_seq));
|
||||
diff -up iputils-s20071127/ping.c.warnings iputils-s20071127/ping.c
|
||||
--- iputils-s20071127/ping.c.warnings 2008-06-02 13:29:27.000000000 +0200
|
||||
+++ iputils-s20071127/ping.c 2008-06-02 13:29:27.000000000 +0200
|
||||
@@ -367,7 +367,7 @@ main(int argc, char **argv)
|
||||
}
|
||||
source.sin_port = 0;
|
||||
close(probe_fd);
|
||||
- } while (0);
|
||||
+ }
|
||||
|
||||
if (whereto.sin_addr.s_addr == 0)
|
||||
whereto.sin_addr.s_addr = source.sin_addr.s_addr;
|
||||
@@ -594,7 +594,7 @@ int receive_error_msg()
|
||||
if (options & F_QUIET)
|
||||
goto out;
|
||||
if (options & F_FLOOD)
|
||||
- write(STDOUT_FILENO, "E", 1);
|
||||
+ printf("E");
|
||||
else if (e->ee_errno != EMSGSIZE)
|
||||
fprintf(stderr, "ping: local error: %s\n", strerror(e->ee_errno));
|
||||
else
|
||||
@@ -630,7 +630,7 @@ int receive_error_msg()
|
||||
if (options & F_QUIET)
|
||||
goto out;
|
||||
if (options & F_FLOOD) {
|
||||
- write(STDOUT_FILENO, "\bE", 2);
|
||||
+ printf("\bE");
|
||||
} else {
|
||||
printf("From %s icmp_seq=%u ", pr_addr(sin->sin_addr.s_addr), ntohs(icmph.un.echo.sequence));
|
||||
pr_icmph(e->ee_type, e->ee_code, e->ee_info, NULL);
|
||||
@@ -795,7 +795,7 @@ parse_reply(struct msghdr *msg, int cc,
|
||||
return !error_pkt;
|
||||
if (options & F_FLOOD) {
|
||||
if (error_pkt)
|
||||
- write(STDOUT_FILENO, "\bE", 2);
|
||||
+ printf("\bE");
|
||||
return !error_pkt;
|
||||
}
|
||||
printf("From %s: icmp_seq=%u ",
|
||||
@@ -812,9 +812,9 @@ parse_reply(struct msghdr *msg, int cc,
|
||||
}
|
||||
if ((options & F_FLOOD) && !(options & (F_VERBOSE|F_QUIET))) {
|
||||
if (!csfailed)
|
||||
- write(STDOUT_FILENO, "!E", 2);
|
||||
+ printf("!E");
|
||||
else
|
||||
- write(STDOUT_FILENO, "!EC", 3);
|
||||
+ printf("!EC");
|
||||
return 0;
|
||||
}
|
||||
if (!(options & F_VERBOSE) || uid)
|
87
iputils.spec
87
iputils.spec
@ -1,27 +1,29 @@
|
||||
Summary: Network monitoring tools including ping
|
||||
Name: iputils
|
||||
Version: 20071127
|
||||
Release: 2%{?dist}
|
||||
Release: 3%{?dist}
|
||||
License: BSD
|
||||
URL: http://www.skbuff.net/iputils
|
||||
Group: System Environment/Daemons
|
||||
|
||||
Source0: http://www.skbuff.net/iputils/%{name}-s%{version}.tar.bz2
|
||||
Source1: ifenslave.tar.gz
|
||||
Source3: rdisc.initd
|
||||
|
||||
Patch0: iputils-20020927-rh.patch
|
||||
Patch3: iputils-20020124-countermeasures.patch
|
||||
Patch4: iputils-20020927-addrcache.patch
|
||||
Patch5: iputils-20020927-ping-subint.patch
|
||||
Patch9: iputils-20020927-unaligned.patch
|
||||
Patch13: iputils-20020927-ia64_align.patch
|
||||
Patch21: iputils-ping_cleanup.patch
|
||||
Patch22: iputils-ifenslave.patch
|
||||
Patch25: iputils-20020927-arping-infiniband.patch
|
||||
Patch26: iputils-20070202-idn.patch
|
||||
Patch27: iputils-20070202-open-max.patch
|
||||
Patch28: iputils-20070202-traffic_class.patch
|
||||
Patch29: iputils-20070202-arping_timeout.patch
|
||||
Patch30: iputils-20071127-output.patch
|
||||
Patch1: iputils-20020124-countermeasures.patch
|
||||
Patch2: iputils-20020927-addrcache.patch
|
||||
Patch3: iputils-20020927-ping-subint.patch
|
||||
Patch4: iputils-ping_cleanup.patch
|
||||
Patch5: iputils-ifenslave.patch
|
||||
Patch6: iputils-20020927-arping-infiniband.patch
|
||||
Patch7: iputils-20070202-idn.patch
|
||||
Patch8: iputils-20070202-open-max.patch
|
||||
Patch9: iputils-20070202-traffic_class.patch
|
||||
Patch10: iputils-20070202-arping_timeout.patch
|
||||
Patch11: iputils-20071127-output.patch
|
||||
Patch12: iputils-20070202-ia64_align.patch
|
||||
Patch13: iputils-20071127-warnings.patch
|
||||
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||
BuildRequires: docbook-utils perl-SGMLSpm
|
||||
@ -43,28 +45,28 @@ the target machine is alive and receiving network traffic.
|
||||
%setup -q -a 1 -n %{name}-s%{version}
|
||||
|
||||
%patch0 -p1 -b .rh
|
||||
%patch3 -p1 -b .countermeasures
|
||||
%patch4 -p1 -b .addrcache
|
||||
%patch5 -p1 -b .ping-subint
|
||||
%patch9 -p1 -b .unaligned
|
||||
%patch13 -p1 -b .align
|
||||
%patch21 -p1 -b .cleanup
|
||||
%patch22 -p1 -b .addr
|
||||
%patch25 -p1 -b .infiniband
|
||||
%patch26 -p1 -b .idn
|
||||
%patch27 -p1 -b .open-max
|
||||
%patch28 -p1 -b .traffic_class
|
||||
%patch29 -p1 -b .arping_timeout
|
||||
%patch30 -p1 -b .output
|
||||
%patch1 -p1 -b .countermeasures
|
||||
%patch2 -p1 -b .addrcache
|
||||
%patch3 -p1 -b .ping-subint
|
||||
%patch4 -p1 -b .cleanup
|
||||
%patch5 -p1 -b .addr
|
||||
%patch6 -p1 -b .infiniband
|
||||
%patch7 -p1 -b .idn
|
||||
%patch8 -p1 -b .open-max
|
||||
%patch9 -p1 -b .traffic_class
|
||||
%patch10 -p1 -b .arping_timeout
|
||||
%patch11 -p1 -b .output
|
||||
%patch12 -p1 -b .ia64_align
|
||||
%patch13 -p1 -b .warnings
|
||||
|
||||
%build
|
||||
%ifarch s390 s390x
|
||||
export CFLAGS="$RPM_OPT_FLAGS -fPIE"
|
||||
export CFLAGS="$RPM_OPT_FLAGS -fPIE -Werror"
|
||||
%else
|
||||
export CFLAGS="$RPM_OPT_FLAGS -fpie"
|
||||
export CFLAGS="$RPM_OPT_FLAGS -fpie -Werror"
|
||||
%endif
|
||||
export LDFLAGS="-pie"
|
||||
make %{?_smp_mflags}
|
||||
make %{?_smp_mflags} arping clockdiff ping ping6 rdisc tracepath tracepath6
|
||||
gcc -Wall $RPM_OPT_FLAGS ifenslave.c -o ifenslave
|
||||
make -C doc man
|
||||
|
||||
@ -74,16 +76,10 @@ rm -rf ${RPM_BUILD_ROOT}
|
||||
mkdir -p ${RPM_BUILD_ROOT}%{_sbindir}
|
||||
mkdir -p ${RPM_BUILD_ROOT}/{bin,sbin}
|
||||
install -c clockdiff ${RPM_BUILD_ROOT}%{_sbindir}/
|
||||
%ifos linux
|
||||
install -cp arping ${RPM_BUILD_ROOT}/sbin/
|
||||
ln -s /sbin/arping ${RPM_BUILD_ROOT}%{_sbindir}/arping
|
||||
install -cp ping ${RPM_BUILD_ROOT}/bin/
|
||||
install -cp ifenslave ${RPM_BUILD_ROOT}/sbin/
|
||||
%else
|
||||
install -cp arping ${RPM_BUILD_ROOT}%{_sbindir}/
|
||||
install -cp ping ${RPM_BUILD_ROOT}%{_sbindir}/
|
||||
install -cp ifenslave ${RPM_BUILD_ROOT}%{_sbindir}/
|
||||
%endif
|
||||
install -cp rdisc ${RPM_BUILD_ROOT}/sbin/
|
||||
install -cp ping6 ${RPM_BUILD_ROOT}/bin/
|
||||
install -cp tracepath ${RPM_BUILD_ROOT}/bin/
|
||||
@ -108,6 +104,7 @@ install -dp ${RPM_BUILD_ROOT}%{_sysconfdir}/rc.d/init.d
|
||||
install -m 755 -p %SOURCE3 ${RPM_BUILD_ROOT}%{_sysconfdir}/rc.d/init.d/rdisc
|
||||
|
||||
iconv -f ISO88591 -t UTF8 RELNOTES -o RELNOTES.tmp
|
||||
touch -r RELNOTES RELNOTES.tmp
|
||||
mv -f RELNOTES.tmp RELNOTES
|
||||
|
||||
%post
|
||||
@ -115,8 +112,8 @@ mv -f RELNOTES.tmp RELNOTES
|
||||
|
||||
%preun
|
||||
if [ $1 = 0 ]; then
|
||||
service rdisc stop >/dev/null 2>&1
|
||||
/sbin/chkconfig --del rdisc
|
||||
service rdisc stop >/dev/null 2>&1
|
||||
/sbin/chkconfig --del rdisc
|
||||
fi
|
||||
|
||||
%postun
|
||||
@ -135,16 +132,10 @@ rm -rf ${RPM_BUILD_ROOT}
|
||||
%defattr(-,root,root,-)
|
||||
%doc RELNOTES README.bonding
|
||||
%{_sbindir}/clockdiff
|
||||
%ifos linux
|
||||
/sbin/arping
|
||||
%{_sbindir}/arping
|
||||
%attr(4755,root,root) /bin/ping
|
||||
/sbin/ifenslave
|
||||
%else
|
||||
%attr(4755,root,root) %{_sbindir}/ping
|
||||
%{_sbindir}/arping
|
||||
%{_sbindir}/ifenslave
|
||||
%endif
|
||||
/sbin/rdisc
|
||||
%attr(4755,root,root) /bin/ping6
|
||||
/bin/tracepath
|
||||
@ -156,6 +147,14 @@ rm -rf ${RPM_BUILD_ROOT}
|
||||
%{_sysconfdir}/rc.d/init.d/rdisc
|
||||
|
||||
%changelog
|
||||
* Tue Jun 03 2008 Martin Nagy <mnagy@redhat.com> - 20071127-3
|
||||
- major patch cleanup so it will be easier to get patches upstream
|
||||
- fix for #68212, previous fix actually didn't work for ping6
|
||||
- renewed the ia64 align patches
|
||||
- update README.bonding
|
||||
- clear up the code from warnings
|
||||
- spec file cleanup
|
||||
|
||||
* Tue Mar 25 2008 Martin Nagy <mnagy@redhat.com> - 20071127-2
|
||||
- fix inconsistent behaviour of ping (#360881)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user