forked from pool/iputils
Accepting request 347011 from home:posophe:branches:network:utilities
Update Can you just please review if the binaries are installed in the right place ? Thanks OBS-URL: https://build.opensuse.org/request/show/347011 OBS-URL: https://build.opensuse.org/package/show/network:utilities/iputils?expand=0&rev=40
This commit is contained in:
parent
56d494d8f8
commit
31dee10b86
@ -12,15 +12,15 @@ diff --git a/ping.c b/ping.c
|
||||
index 0357c3d..83a7aad 100644
|
||||
--- a/ping.c
|
||||
+++ b/ping.c
|
||||
@@ -103,6 +103,7 @@ static void usage(void) __attribute__((noreturn));
|
||||
static u_short in_cksum(const u_short *addr, int len, u_short salt);
|
||||
@@ -98,6 +98,7 @@
|
||||
static unsigned short in_cksum(const unsigned short *addr, int len, unsigned short salt);
|
||||
static void pr_icmph(__u8 type, __u8 code, __u32 info, struct icmphdr *icp);
|
||||
static int parsetos(char *str);
|
||||
+static void doexit (int);
|
||||
|
||||
static struct {
|
||||
struct cmsghdr cm;
|
||||
@@ -262,6 +263,8 @@ main(int argc, char **argv)
|
||||
@@ -504,6 +516,8 @@
|
||||
options |= F_SOURCEROUTE;
|
||||
}
|
||||
}
|
||||
@ -29,8 +29,8 @@ index 0357c3d..83a7aad 100644
|
||||
while (argc > 0) {
|
||||
target = *argv;
|
||||
|
||||
@@ -1398,3 +1401,9 @@ void usage(void)
|
||||
);
|
||||
@@ -1629,3 +1643,9 @@
|
||||
ping6_usage(1);
|
||||
exit(2);
|
||||
}
|
||||
+
|
@ -12,45 +12,24 @@ diff --git a/ping.c b/ping.c
|
||||
index b9d649531621..f9f4a28f5dc1 100644
|
||||
--- a/ping.c
|
||||
+++ b/ping.c
|
||||
@@ -654,17 +654,6 @@ int receive_error_msg()
|
||||
@ -898,17 +898,6 @@
|
||||
|
||||
acknowledge(ntohs(icmph.un.echo.sequence));
|
||||
|
||||
- if (!working_recverr) {
|
||||
- if (sock->socktype == SOCK_RAW && !sock->working_recverr) {
|
||||
- struct icmp_filter filt;
|
||||
- working_recverr = 1;
|
||||
- sock->working_recverr = 1;
|
||||
- /* OK, it works. Add stronger filter. */
|
||||
- filt.data = ~((1<<ICMP_SOURCE_QUENCH)|
|
||||
- (1<<ICMP_REDIRECT)|
|
||||
- (1<<ICMP_ECHOREPLY));
|
||||
- if (setsockopt(icmp_sock, SOL_RAW, ICMP_FILTER, (char*)&filt, sizeof(filt)) == -1)
|
||||
- filt.data = ~((1<<ICMP_SOURCE_QUENCH)|
|
||||
- (1<<ICMP_REDIRECT)|
|
||||
- (1<<ICMP_ECHOREPLY));
|
||||
- if (setsockopt(sock->fd, SOL_RAW, ICMP_FILTER, (char*)&filt, sizeof(filt)) == -1)
|
||||
- perror("\rWARNING: setsockopt(ICMP_FILTER)");
|
||||
- }
|
||||
-
|
||||
net_errors++;
|
||||
nerrors++;
|
||||
if (options & F_QUIET)
|
||||
@@ -820,19 +809,7 @@ parse_reply(struct msghdr *msg, int cc, void *addr, struct timeval *tv)
|
||||
icp->type != ICMP_SOURCE_QUENCH);
|
||||
if (error_pkt) {
|
||||
acknowledge(ntohs(icp1->un.echo.sequence));
|
||||
- if (working_recverr) {
|
||||
- return 0;
|
||||
- } else {
|
||||
- static int once;
|
||||
- /* Sigh, IP_RECVERR for raw socket
|
||||
- * was broken until 2.4.9. So, we ignore
|
||||
- * the first error and warn on the second.
|
||||
- */
|
||||
- if (once++ == 1)
|
||||
- fprintf(stderr, "\rWARNING: kernel is not very fresh, upgrade is recommended.\n");
|
||||
- if (once == 1)
|
||||
- return 0;
|
||||
- }
|
||||
+ return 0;
|
||||
}
|
||||
nerrors+=error_pkt;
|
||||
if (options&F_QUIET)
|
||||
--
|
||||
2.3.5
|
||||
|
||||
|
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:450f549fc5b620c23c5929aa6d54b7ddfc7ee1cb1e8efdc5e8bb21d8d0c5319f
|
||||
size 155344
|
@ -19,10 +19,11 @@ diff --git a/ping.c b/ping.c
|
||||
index 71b445d..0357c3d 100644
|
||||
--- a/ping.c
|
||||
+++ b/ping.c
|
||||
@@ -139,6 +139,16 @@ main(int argc, char **argv)
|
||||
@@ -441,6 +441,17 @@
|
||||
|
||||
/* Create sockets */
|
||||
enable_capability_raw();
|
||||
|
||||
+
|
||||
+ /*
|
||||
+ * ping depend on SIGALARM to exit sometimes,
|
||||
+ * but to popen, system, fork carry on parent signal handler
|
||||
@ -33,8 +34,9 @@ index 71b445d..0357c3d 100644
|
||||
+ sigprocmask(SIG_UNBLOCK, &s, NULL);
|
||||
+ set_signal(SIGALRM, doexit);
|
||||
+
|
||||
icmp_sock = socket(AF_INET, SOCK_RAW, IPPROTO_ICMP);
|
||||
socket_errno = errno;
|
||||
if (hints.ai_family != AF_INET6)
|
||||
create_socket(&sock4, AF_INET, hints.ai_socktype, IPPROTO_ICMP);
|
||||
if (hints.ai_family != AF_INET)
|
||||
|
||||
--
|
||||
1.8.1.4
|
@ -1,3 +1,54 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue Dec 1 13:39:07 UTC 2015 - p.drouand@gmail.com
|
||||
|
||||
- Update to version s20150815
|
||||
* use syntax compatible with busybox date in Makefile
|
||||
* Makefile: use #define as in previous code changes
|
||||
* ping: status() now returns received/transmitted instead of trans/recv
|
||||
* ping: don't mess with internals of struct msghdr
|
||||
* tracepath,doc: fix corrupted tag
|
||||
* made ping functions protocol independent
|
||||
* Allow ping to use IPv6 addresses
|
||||
* if IPv4 resolving fails fallback to ping6
|
||||
* ping: in usage print the 'ping -6' options as well
|
||||
* ping: allow option -4 which forces IPv4
|
||||
* combine sock and errno into a single structure
|
||||
* This patch allows running ping and ping6 without root privileges on
|
||||
* use better names for socket variables
|
||||
* travis.yml: install nettle-dev
|
||||
* Allow using nettle instead of libgcrypt for MD5
|
||||
* avoid compiler warning caused by snapshot.h
|
||||
* make `getaddrinfo()` and `getnameinfo()` usage consistent
|
||||
* enable IDN by default
|
||||
* ping: perform dual-stack ping by default
|
||||
* remove IPV4_TARGETS and IPV6_TARGETS
|
||||
* ping: remove obsolete preprocessor directives
|
||||
* ping: avoid name clashes between IPv4 and IPv6 code
|
||||
* ping: merge all ping header files into a single one
|
||||
* ping: merge `ping6` command into `ping`
|
||||
* ping: refactor ping options
|
||||
* ping: refactor ping socket code
|
||||
* ping: merge IPv4 and IPv6 `pr_addr()`
|
||||
* Use svg instead of png to get better image quality
|
||||
* iputils ping/ping6: Add a function to check if a packet is ours
|
||||
* ping: Add <linux/types.h> to fix compilation error.
|
||||
* ping6: Use GNUTLS API directly for MD5. (v2)
|
||||
* ping6: Use libgcrypt instead of gnutls for MD5.
|
||||
* ninfod: Regenerate configure by autoconf-2.69.
|
||||
* ninfod: libgcrypt support.
|
||||
* spec: Configure before building ninfod.
|
||||
* spec: Fix date in %changelog.
|
||||
* make,spec: Add rpm target.
|
||||
* ping,ping6 doc: More description on CAP_NET_RAW usage.
|
||||
- Update patches
|
||||
* iputils-s20101006-ping-interrupt.diff > iputils-ping-interrupt.diff
|
||||
* iputils-s20101006-sec-ping-unblock.diff > iputils-sec-ping-unblock.diff
|
||||
* iputils-remove-bogus-check-required-for-2.4.9-kernels.patch
|
||||
- Update home project page and download Url
|
||||
- Remove obsolete %clean section
|
||||
- Remove UsrMerge process; it has been done for more than two
|
||||
openSUSE releases now
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Apr 20 17:07:42 CEST 2015 - tiwai@suse.de
|
||||
|
||||
|
51
iputils.spec
51
iputils.spec
@ -21,21 +21,22 @@ BuildRequires: docbook_3
|
||||
BuildRequires: iso_ent
|
||||
BuildRequires: libcap-devel
|
||||
BuildRequires: libopenssl-devel
|
||||
BuildRequires: pkgconfig(libidn)
|
||||
BuildRequires: opensp
|
||||
BuildRequires: perl-SGMLS
|
||||
Summary: IPv4 and IPv6 Networking Utilities
|
||||
License: BSD-3-Clause and GPL-2.0+
|
||||
Group: Productivity/Networking/Other
|
||||
Version: s20121221
|
||||
Version: s20150815
|
||||
Release: 0
|
||||
Url: http://www.skbuff.net/iputils
|
||||
Source: http://www.skbuff.net/iputils/iputils-%{version}.tar.bz2
|
||||
Url: https://github.com/iputils/iputils
|
||||
Source: https://github.com/iputils/iputils/archive/%{version}.tar.gz
|
||||
# XXX: from linux/Documentation/networking/ifenslave.c
|
||||
Source1: ifenslave.c
|
||||
Patch2: iputils-traceroute6-stdint.diff
|
||||
Patch3: iputils-ifenslave.diff
|
||||
Patch8: iputils-s20101006-sec-ping-unblock.diff
|
||||
Patch9: iputils-s20101006-ping-interrupt.diff
|
||||
Patch8: iputils-sec-ping-unblock.diff
|
||||
Patch9: iputils-ping-interrupt.diff
|
||||
# PATCH-FIX-UPSTREAM iputils-remove-bogus-check-required-for-2.4.9-kernels.patch tiwai@suse.de - boo#927831
|
||||
Patch10: iputils-remove-bogus-check-required-for-2.4.9-kernels.patch
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
@ -55,7 +56,7 @@ cp -a %SOURCE1 .
|
||||
%patch10 -p1
|
||||
|
||||
%build
|
||||
make %{?_smp_mflags} KERNEL_INCLUDE=$PWD \
|
||||
make %{?_smp_mflags} CFLAGS='%{optflags} -fPIC' KERNEL_INCLUDE=$PWD \
|
||||
CCOPT='%optflags -fno-strict-aliasing -fpie -D_GNU_SOURCE' \
|
||||
LDLIBS='-Wl,-z,relro,-z,now -pie -lcap -lresolv' \
|
||||
CAPABILITIES=1 LDFLAG_GNUTLS='-lcrypto -lssl'
|
||||
@ -72,32 +73,14 @@ install clockdiff $RPM_BUILD_ROOT/%{_sbindir}
|
||||
install rdisc $RPM_BUILD_ROOT/%{_sbindir}/in.rdisc
|
||||
install tracepath $RPM_BUILD_ROOT/%{_sbindir}
|
||||
install tracepath6 $RPM_BUILD_ROOT/%{_sbindir}
|
||||
install traceroute6 $RPM_BUILD_ROOT/%{_sbindir}
|
||||
install ping $RPM_BUILD_ROOT/%{_bindir}
|
||||
install ping6 $RPM_BUILD_ROOT/%{_bindir}
|
||||
install ipg $RPM_BUILD_ROOT/%{_bindir}
|
||||
#UsrMerge
|
||||
mkdir -p $RPM_BUILD_ROOT/{bin,sbin}
|
||||
ln -sf %{_sbindir}/arping $RPM_BUILD_ROOT/sbin
|
||||
ln -sf %{_sbindir}/ifenslave $RPM_BUILD_ROOT/sbin
|
||||
ln -sf %{_sbindir}/clockdiff $RPM_BUILD_ROOT/sbin
|
||||
ln -sf %{_sbindir}/in.rdisc $RPM_BUILD_ROOT/sbin
|
||||
ln -sf %{_sbindir}/tracepath $RPM_BUILD_ROOT/sbin
|
||||
ln -sf %{_sbindir}/tracepath6 $RPM_BUILD_ROOT/sbin
|
||||
ln -sf %{_bindir}/ping $RPM_BUILD_ROOT/bin
|
||||
ln -sf %{_bindir}/ping6 $RPM_BUILD_ROOT/bin
|
||||
ln -sf %{_bindir}/ipg $RPM_BUILD_ROOT/bin
|
||||
#EndUsrMerge
|
||||
install tftpd $RPM_BUILD_ROOT/%{_bindir}
|
||||
install rarpd $RPM_BUILD_ROOT/%{_bindir}
|
||||
mkdir -p $RPM_BUILD_ROOT%_mandir/man8
|
||||
install -m 644 doc/arping.8 $RPM_BUILD_ROOT%_mandir/man8/
|
||||
install -m 644 doc/clockdiff.8 $RPM_BUILD_ROOT%_mandir/man8/
|
||||
install -m 644 doc/tracepath.8 $RPM_BUILD_ROOT%_mandir/man8/
|
||||
install -m 644 doc/ping.8 $RPM_BUILD_ROOT%_mandir/man8/
|
||||
install -m 644 doc/*.8 $RPM_BUILD_ROOT%_mandir/man8/
|
||||
install -m 644 doc/ping.8 $RPM_BUILD_ROOT%_mandir/man8/ping6.8
|
||||
install -m 644 doc/pg3.8 $RPM_BUILD_ROOT%_mandir/man8/
|
||||
install -m 644 doc/rdisc.8 $RPM_BUILD_ROOT%_mandir/man8/
|
||||
|
||||
%clean
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
|
||||
%post
|
||||
%set_permissions %{_bindir}/ping %{_bindir}/ping6
|
||||
@ -108,19 +91,17 @@ rm -rf $RPM_BUILD_ROOT
|
||||
%files
|
||||
%defattr(-,root,root)
|
||||
%doc RELNOTES
|
||||
%verify(not mode caps) %attr(4755,root,root) %{_bindir}/ping
|
||||
%{_bindir}/ipg
|
||||
%{_bindir}/rarpd
|
||||
%{_bindir}/tftpd
|
||||
%{_sbindir}/arping
|
||||
%{_sbindir}/ifenslave
|
||||
%{_sbindir}/clockdiff
|
||||
%verify(not mode caps) %attr(4755,root,root) %{_bindir}/ping
|
||||
%verify(not mode caps) %attr(4755,root,root) %{_bindir}/ping6
|
||||
%{_bindir}/ipg
|
||||
%{_sbindir}/tracepath
|
||||
%{_sbindir}/tracepath6
|
||||
%{_sbindir}/traceroute6
|
||||
%{_sbindir}/in.rdisc
|
||||
#UsrMerge
|
||||
/bin/*
|
||||
/sbin/*
|
||||
#EndUsrMerge
|
||||
%attr(644,root,root) %_mandir/man8/*
|
||||
|
||||
%changelog
|
||||
|
3
s20150815.tar.gz
Normal file
3
s20150815.tar.gz
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:1f9c11783e9db90b3ebc43145e412160d989fb133a573638745379957c73c082
|
||||
size 194508
|
Loading…
Reference in New Issue
Block a user