[packages/iputils] - up to s20180629

arekm arekm at pld-linux.org
Wed Feb 20 10:15:21 CET 2019


commit f7e1ca50db089a964a544efc367182a4a056484c
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date:   Wed Feb 20 10:15:02 2019 +0100

    - up to s20180629

 iputils-bindnow.patch | 42 ----------------------------------------
 iputils-pf.patch      |  8 ++++----
 iputils-pmake.patch   | 39 -------------------------------------
 iputils.spec          | 53 +++++++++++++++++++++++++++++++++------------------
 4 files changed, 38 insertions(+), 104 deletions(-)
---
diff --git a/iputils.spec b/iputils.spec
index 1c5c5f7..e74c581 100644
--- a/iputils.spec
+++ b/iputils.spec
@@ -7,17 +7,15 @@ Summary(pl.UTF-8):	Użytki przeznaczone dla pracy z siecią IPv4/IPv6
 Summary(ru.UTF-8):	Набор базовых сетевых утилит (ping, tracepath etc.)
 Summary(uk.UTF-8):	Набір базових мережевих утиліт (ping, tracepath etc.)
 Name:		iputils
-Version:	s20151218
-Release:	3
+Version:	s20180629
+Release:	1
 Epoch:		2
 License:	BSD
 Group:		Networking/Admin
-Source0:	http://www.skbuff.net/iputils/%{name}-%{version}.tar.bz2
-# Source0-md5:	8aaa7395f27dff9f57ae016d4bc753ce
-Patch0:		%{name}-pmake.patch
-Patch1:		%{name}-pf.patch
-Patch2:		%{name}-bindnow.patch
-URL:		http://www.linuxfoundation.org/collaborate/workgroups/networking/iputils
+Source0:	https://github.com/iputils/iputils/archive/%{version}.tar.gz
+# Source0-md5:	866547f2ffb17b67049472c770703c83
+Patch0:		%{name}-pf.patch
+URL:		https://github.com/iputils/iputils
 %if %{with doc}
 BuildRequires:	docbook-dtd31-sgml
 BuildRequires:	docbook-utils >= 0.6.10
@@ -89,19 +87,19 @@ pakiety ARP z użyciem podanego adresu źródłowego.
 %prep
 %setup -q
 %patch0 -p1
-%patch1 -p1
-%patch2 -p1
 
 %build
-%{__make} all \
-	CC="%{__cc}" \
-	CCOPT="%{rpmcflags} %{rpmcppflags} -D_GNU_SOURCE -DHAVE_SIN6_SCOPEID=1"
-
 cd ninfod
 %configure
-%{__make}
 cd ..
 
+%{__make} \
+	CFLAGS="%{rpmcflags} %{rpmcppflags}" \
+	LDLIB="%{rpmldflags}" \
+	LDFLAGS="%{rpmldflags}"
+
+%{__make} -C ninfod
+
 %if %{with doc}
 %{__make} html
 %{__make} man
@@ -111,17 +109,25 @@ cd ..
 rm -rf $RPM_BUILD_ROOT
 install -d $RPM_BUILD_ROOT{%{_sbindir},%{_mandir}/man8,/bin,/sbin}
 
-install -p clockdiff ipg rarpd rdisc tftpd tracepath tracepath6 traceroute6 \
+install -p clockdiff ipg rarpd rdisc tftpd tracepath traceroute6 \
 	$RPM_BUILD_ROOT%{_sbindir}
 install -p arping $RPM_BUILD_ROOT/sbin
-install -p ping ping6 $RPM_BUILD_ROOT/bin
+install -p ping $RPM_BUILD_ROOT/bin
 
 install -p ninfod/ninfod $RPM_BUILD_ROOT%{_sbindir}
 # TODO: PLDify, subpackage?
 #install ninfod/ninfod.sh $RPM_BUILD_ROOT/etc/rc.d/init.d
 
+ln -s ping $RPM_BUILD_ROOT/bin/ping4
+ln -s ping $RPM_BUILD_ROOT/bin/ping6
+ln -s tracepath $RPM_BUILD_ROOT%{_sbindir}/tracepath4
+ln -s tracepath $RPM_BUILD_ROOT%{_sbindir}/tracepath6
+
 %if %{with doc}
 cp -p doc/*.8 $RPM_BUILD_ROOT%{_mandir}/man8
+echo ".so ping.8" > $RPM_BUILD_ROOT%{_mandir}/man8/ping4.8
+echo ".so ping.8" > $RPM_BUILD_ROOT%{_mandir}/man8/ping6.8
+echo ".so tracepath.8" > $RPM_BUILD_ROOT%{_mandir}/man8/tracepath4.8
 echo ".so tracepath.8" > $RPM_BUILD_ROOT%{_mandir}/man8/tracepath6.8
 %endif
 
@@ -131,19 +137,24 @@ echo ".so tracepath.8" > $RPM_BUILD_ROOT%{_mandir}/man8/tracepath6.8
 
 # we don't build pg kernel module
 %{__rm} $RPM_BUILD_ROOT%{_sbindir}/ipg
-%{?with_doc:%{__rm} $RPM_BUILD_ROOT%{_mandir}/man8/pg3*}
+%if %{with doc}
+%{__rm} $RPM_BUILD_ROOT%{_mandir}/man8/ipg.8*
+%{__rm} $RPM_BUILD_ROOT%{_mandir}/man8/pgset.8*
+%{__rm} $RPM_BUILD_ROOT%{_mandir}/man8/pg3*
+%endif
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
 %files
 %defattr(644,root,root,755)
-%doc RELNOTES %{?with_doc:doc/*.html}
+%doc README.md RELNOTES.old %{?with_doc:doc/*.html}
 %attr(4754,root,adm) %{_sbindir}/clockdiff
 %attr(755,root,root) %{_sbindir}/ninfod
 %attr(755,root,root) %{_sbindir}/rarpd
 %attr(755,root,root) %{_sbindir}/rdisc
 %attr(755,root,root) %{_sbindir}/tracepath
+%attr(755,root,root) %{_sbindir}/tracepath4
 %attr(755,root,root) %{_sbindir}/tracepath6
 %attr(4754,root,adm) %{_sbindir}/traceroute6
 %if %{with doc}
@@ -152,6 +163,7 @@ rm -rf $RPM_BUILD_ROOT
 %{_mandir}/man8/rarpd.8*
 %{_mandir}/man8/rdisc.8*
 %{_mandir}/man8/tracepath.8*
+%{_mandir}/man8/tracepath4.8*
 %{_mandir}/man8/tracepath6.8*
 %{_mandir}/man8/traceroute6.8*
 %endif
@@ -159,8 +171,11 @@ rm -rf $RPM_BUILD_ROOT
 %files -n ping
 %defattr(644,root,root,755)
 %attr(4755,root,root) %verify(not mode) /bin/ping
+%attr(4755,root,root) %verify(not mode) /bin/ping4
 %attr(4755,root,root) %verify(not mode) /bin/ping6
 %if %{with doc}
+%{_mandir}/man8/ping4.8*
+%{_mandir}/man8/ping6.8*
 %{_mandir}/man8/ping.8*
 %endif
 
diff --git a/iputils-bindnow.patch b/iputils-bindnow.patch
deleted file mode 100644
index 755e10d..0000000
--- a/iputils-bindnow.patch
+++ /dev/null
@@ -1,42 +0,0 @@
-Since these binaries are going to be setuid root, we want 
-don't want to allow lazy bindings, otherwise we allow some 
-information leakage.
-
-http://bugs.gentoo.org/77526
-
---- iputils-s20151218/Makefile.orig	2015-12-17 16:45:51.000000000 +0100
-+++ iputils-s20151218/Makefile	2015-12-27 20:30:00.256039502 +0100
-@@ -130,12 +130,13 @@
- %.o: %.c
- 	$(COMPILE.c) $< $(DEF_$(patsubst %.o,%,$@)) -o $@
- $(TARGETS): %: %.o
--	$(LINK.o) $^ $(LIB_$@) $(LDLIBS) -o $@
-+	$(LINK.o) $^ $(LDOPTS_$@) $(LIB_$@) $(LDLIBS) -o $@
- 
- # -------------------------------------
- # arping
- DEF_arping = $(DEF_SYSFS) $(DEF_CAP) $(DEF_IDN) $(DEF_WITHOUT_IFADDRS)
- LIB_arping = $(LIB_SYSFS) $(LIB_CAP) $(LIB_IDN)
-+LDOPTS_arping = -Wl,-z,now -Wl,-z,relro
- 
- ifneq ($(ARPING_DEFAULT_DEVICE),)
- DEF_arping += -DDEFAULT_DEVICE=\"$(ARPING_DEFAULT_DEVICE)\"
-@@ -149,8 +150,10 @@
- DEF_ping_common = $(DEF_CAP) $(DEF_IDN)
- DEF_ping  = $(DEF_CAP) $(DEF_IDN) $(DEF_WITHOUT_IFADDRS)
- LIB_ping  = $(LIB_CAP) $(LIB_IDN)
-+LDOPTS_ping = -Wl,-z,now -Wl,-z,relro
- DEF_ping6 = $(DEF_CAP) $(DEF_IDN) $(DEF_WITHOUT_IFADDRS) $(DEF_ENABLE_PING6_RTHDR) $(DEF_CRYPTO)
- LIB_ping6 = $(LIB_CAP) $(LIB_IDN) $(LIB_RESOLV) $(LIB_CRYPTO)
-+LDOPTS_ping6 = -Wl,-z,now -Wl,-z,relro
- 
- ping: ping_common.o
- ping6: ping_common.o
-@@ -176,6 +179,7 @@
- # traceroute6
- DEF_traceroute6 = $(DEF_CAP) $(DEF_IDN)
- LIB_traceroute6 = $(LIB_CAP) $(LIB_IDN)
-+LDOPTS_traceroute6 = -Wl,-z,now -Wl,-z,relro
- 
- # tftpd
- DEF_tftpd =
diff --git a/iputils-pf.patch b/iputils-pf.patch
index be88720..36fdfb1 100644
--- a/iputils-pf.patch
+++ b/iputils-pf.patch
@@ -1,11 +1,11 @@
 --- iputils/ping.c~	2006-03-14 14:53:31.000000000 +0200
 +++ iputils/ping.c	2006-03-14 14:55:07.000000000 +0200
-@@ -1216,7 +1216,7 @@
- 	insns[2] = (struct sock_filter)BPF_JUMP(BPF_JMP|BPF_JEQ|BPF_K, __constant_htons(ident), 0, 1);
+@@ -1665,7 +1665,7 @@ void ping4_install_filter(socket_st *soc
+ 	insns[2] = (struct sock_filter)BPF_JUMP(BPF_JMP|BPF_JEQ|BPF_K, htons(ident), 0, 1);
  
- 	if (setsockopt(icmp_sock, SOL_SOCKET, SO_ATTACH_FILTER, &filter, sizeof(filter)))
+ 	if (setsockopt(sock->fd, SOL_SOCKET, SO_ATTACH_FILTER, &filter, sizeof(filter)))
 -		perror("WARNING: failed to install socket filter\n");
 +		perror("WARNING: failed to install socket filter");
  }
  
- 
+ #define USAGE_NEWLINE	"\n           "
diff --git a/iputils-pmake.patch b/iputils-pmake.patch
deleted file mode 100644
index 1fa2ae4..0000000
--- a/iputils-pmake.patch
+++ /dev/null
@@ -1,39 +0,0 @@
---- iputils/doc/Makefile	Sat Feb 23 00:17:57 2002
-+++ iputils.new/doc/Makefile	Mon Mar  3 18:10:17 2003
-@@ -13,25 +13,25 @@
- # So, scope it to a temporary dir and clean all after each run.
- 
- $(HTMLFILES): index.db
--	@-rm -rf tmp.db2html
--	@mkdir tmp.db2html
--	@set -e; cd tmp.db2html; docbook2html ../$< ; mv *.html ..
--	@-rm -rf tmp.db2html
-+	@-rm -rf tmp.db2html$@
-+	@mkdir tmp.db2html$@
-+	@set -e; cd tmp.db2html$@; docbook2html ../$< ; mv *.html ..
-+	@-rm -rf tmp.db2html$@
- 
- iputils.html: iputils.db
--	@-rm -rf tmp.db2html
--	@mkdir tmp.db2html
--	@set -e; cd tmp.db2html; docbook2html -u -o html ../$< ; mv html/$@ ..
--	@-rm -rf tmp.db2html
-+	@-rm -rf tmp.db2html$@
-+	@mkdir tmp.db2html$@
-+	@set -e; cd tmp.db2html$@; docbook2html -u -o html ../$< ; mv html/$@ ..
-+	@-rm -rf tmp.db2html$@
- 
- # docbook2man produces utterly ugly output and I did not find
- # any way to customize this but hacking backend perl script a little.
- # Well, hence...
- 
- $(MANFILES): index.db
--	@-mkdir tmp.db2man
--	@set -e; cd tmp.db2man; nsgmls ../$< | sgmlspl ../docbook2man-spec.pl ;	mv $@ ..
--	@-rm -rf tmp.db2man
-+	@-mkdir tmp.db2man$@
-+	@set -e; cd tmp.db2man$@; nsgmls ../$< | sgmlspl ../docbook2man-spec.pl ;	mv $@ ..
-+	@-rm -rf tmp.db2man$@
- 
- clean:
- 	@rm -rf $(MANFILES) $(HTMLFILES) iputils.html tmp.db2html tmp.db2man
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/iputils.git/commitdiff/f7e1ca50db089a964a544efc367182a4a056484c



More information about the pld-cvs-commit mailing list