On Tuesday 27 of January 2004 11:51, Paweł Sikora wrote:
> On Tuesday 27 of January 2004 09:32, Jacek Konieczny wrote:
> > Bo to userspace. Powinno być jedno w Ac, niezależne od kernela na którym
> > było kompilowane. To się da zrobić. I powinno się zrobić.
>
> latka juz zrobiona. calosc podesle pozniej, jak wroce.
gkh zrobione.
--
The only thing necessary for the triumph of evil
is for good men to do nothing.
- Edmund Burke
--- iputils.spec.orig 2003-09-28 23:44:05.000000000 +0200
+++ iputils.spec 2004-01-27 13:26:14.883496440 +0100
@@ -1,27 +1,30 @@
# $Revision: 1.57 $, $Date: 2003/09/28 21:44:05 $
-#
-# Conditional build
-# _without_docs - don't build documentation
#
+# Conditional build
+%bcond_without docs # don't build documentation
+
Summary: Utilities for IPv4/IPv6 networking
Summary(pl): Użytki przeznaczone dla pracy z siecią IPv4/IPv6
Summary(ru): îÁÂĎŇ ÂÁÚĎ×ŮČ ÓĹÔĹ×ŮČ ŐÔÉĚÉÔ (ping, tracepath etc.)
Summary(uk): îÁÂŚŇ ÂÁÚĎ×ÉČ ÍĹŇĹÖĹ×ÉČ ŐÔÉĚŚÔ (ping, tracepath etc.)
Name: iputils
-Version: ss020927
+Version: ss021109
Release: 1
Epoch: 1
License: BSD
Group: Networking/Admin
-Source0: ftp://ftp.inr.ac.ru/ip-routing/%{name}-%{version}.tar.gz
-# Source0-md5: b5493f7a2997130a4f86c486c9993b86
-Patch0: %{name}-no_cr_in_errors.patch
+Source0: ftp://ftp.inr.ac.ru/ip-routing/%{name}-%{version}-try.tar.bz2
+Patch0: %{name}-ping6-no_cr_in_errors.patch
Patch1: %{name}-ping_sparcfix.patch
Patch2: %{name}-pmake.patch
-Patch3: %{name}-20001007-rh7.patch
-%{!?_without_docs:BuildRequires: docbook-dtd30-sgml}
-%{!?_without_docs:BuildRequires: docbook-dtd31-sgml}
-%{!?_without_docs:BuildRequires: docbook-utils >= 0.6.10}
+Patch3: %{name}-Makefile.patch
+Patch4: %{name}-gkh.patch
+BuildRequires: glibc-kernel-headers >= 7:2.6.1.1-1
+%if %{with docs}
+BuildRequires: docbook-dtd30-sgml
+BuildRequires: docbook-dtd31-sgml
+BuildRequires: docbook-utils >= 0.6.10
+%endif
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%description
@@ -72,10 +75,11 @@
%prep
%setup -q -n %{name}
-%patch0 -p1
+%patch0 -p0
%patch1 -p1
%patch2 -p1
-%patch3 -p1
+%patch3 -p0
+%patch4 -p1
%build
# empty LDLIBS - don't link with -lresolv, it's not necessary
@@ -83,7 +87,7 @@
CCOPT="%{rpmcflags} -D_GNU_SOURCE -DHAVE_SIN6_SCOPEID=1" \
LDLIBS=""
-%{!?_without_docs: %{__make} html}
+%{?with_docs: %{__make} html}
%{__make} man
%install
@@ -103,7 +107,7 @@
%files
%defattr(644,root,root,755)
-%doc RELNOTES Modules %{!?_without_docs: doc/*.html}
+%doc RELNOTES %{?with_docs: doc/*.html}
%attr(0755,root,root) %{_sbindir}/tracepat*
%attr(0755,root,root) %{_sbindir}/rdisc
%attr(4754,root,adm) %{_sbindir}/traceroute6
@@ -114,7 +118,6 @@
%{_mandir}/man8/rdisc.8*
%{_mandir}/man8/tracepath*.8*
%{_mandir}/man8/traceroute6.8*
-%{_mandir}/man8/pg3.8*
%files ping
%defattr(644,root,root,755)
diff -uNd iputils.orig/arping.c iputils/arping.c
--- iputils.orig/arping.c 2001-10-06 00:42:47.000000000 +0200
+++ iputils/arping.c 2004-01-27 11:27:30.664542344 +0100
@@ -9,6 +9,7 @@
* Authors: Alexey Kuznetsov, <[EMAIL PROTECTED]>
*/
+#include <asm/byteorder.h>
#include <stdlib.h>
#include <sys/param.h>
#include <sys/socket.h>
@@ -19,6 +20,8 @@
#include <sys/ioctl.h>
#include <linux/if.h>
#include <linux/if_arp.h>
+#include <linux/if_ether.h>
+#include <linux/if_packet.h>
#include <sys/uio.h>
#include <netdb.h>
diff -uNd iputils.orig/clockdiff.c iputils/clockdiff.c
--- iputils.orig/clockdiff.c 2002-02-23 01:10:59.000000000 +0100
+++ iputils/clockdiff.c 2004-01-27 11:22:55.422385512 +0100
@@ -1,3 +1,4 @@
+#include <asm/byteorder.h>
#include <time.h>
#include <sys/types.h>
#include <sys/param.h>
Wspólne podkatalogi: iputils.orig/doc i iputils/doc
Wspólne podkatalogi: iputils.orig/include-glibc i iputils/include-glibc
Wspólne podkatalogi: iputils.orig/libipsec i iputils/libipsec
Wspólne podkatalogi: iputils.orig/Modules i iputils/Modules
diff -uNd iputils.orig/ping_common.h iputils/ping_common.h
--- iputils.orig/ping_common.h 2004-01-27 11:03:34.000000000 +0100
+++ iputils/ping_common.h 2004-01-27 11:22:29.051394512 +0100
@@ -1,3 +1,4 @@
+#include <asm/byteorder.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
Wspólne podkatalogi: iputils.orig/racoon i iputils/racoon
diff -uNd iputils.orig/rarpd.c iputils/rarpd.c
--- iputils.orig/rarpd.c 2001-12-02 19:45:06.000000000 +0100
+++ iputils/rarpd.c 2004-01-27 11:28:45.313194024 +0100
@@ -9,6 +9,7 @@
* Authors: Alexey Kuznetsov, <[EMAIL PROTECTED]>
*/
+#include <asm/byteorder.h>
#include <stdio.h>
#include <syslog.h>
#include <dirent.h>
@@ -26,6 +27,7 @@
#include <sys/signal.h>
#include <linux/if.h>
#include <linux/if_arp.h>
+#include <linux/if_ether.h>
#include <netinet/in.h>
#include <linux/if_packet.h>
#include <linux/filter.h>
diff -uNd iputils.orig/rdisc.c iputils/rdisc.c
--- iputils.orig/rdisc.c 2001-08-24 19:39:00.000000000 +0200
+++ iputils/rdisc.c 2004-01-27 11:23:29.389221768 +0100
@@ -25,6 +25,7 @@
* 2550 Garcia Avenue
* Mountain View, California 94043
*/
+#include <asm/byteorder.h>
#include <stdio.h>
#include <errno.h>
#include <signal.h>
Wspólne podkatalogi: iputils.orig/setkey i iputils/setkey
diff -uNd iputils.orig/tftpd.c iputils/tftpd.c
--- iputils.orig/tftpd.c 2002-01-24 01:31:41.000000000 +0100
+++ iputils/tftpd.c 2004-01-27 11:27:59.908096648 +0100
@@ -48,6 +48,7 @@
* This version includes many modifications by Jim Guyton <[EMAIL PROTECTED]>
*/
+#include <asm/byteorder.h>
#include <sys/types.h>
#include <sys/ioctl.h>
#include <sys/stat.h>
diff -uNd iputils.orig/tracepath6.c iputils/tracepath6.c
--- iputils.orig/tracepath6.c 2001-09-02 04:03:46.000000000 +0200
+++ iputils/tracepath6.c 2004-01-27 11:29:03.889370016 +0100
@@ -9,6 +9,7 @@
* Authors: Alexey Kuznetsov, <[EMAIL PROTECTED]>
*/
+#include <asm/byteorder.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
diff -uNd iputils.orig/tracepath.c iputils/tracepath.c
--- iputils.orig/tracepath.c 2002-11-09 05:54:46.000000000 +0100
+++ iputils/tracepath.c 2004-01-27 11:22:01.263618896 +0100
@@ -9,6 +9,7 @@
* Authors: Alexey Kuznetsov, <[EMAIL PROTECTED]>
*/
+#include <asm/byteorder.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
diff -uNd iputils.orig/traceroute6.c iputils/traceroute6.c
--- iputils.orig/traceroute6.c 2002-10-03 05:29:23.000000000 +0200
+++ iputils/traceroute6.c 2004-01-27 11:29:23.286421216 +0100
@@ -230,6 +230,7 @@
* Tue Dec 20 03:50:13 PST 1988
*/
+#include <asm/byteorder.h>
#include <sys/param.h>
#include <sys/time.h>
#include <sys/socket.h>
--- Makefile.orig 2002-11-09 04:01:11.000000000 +0100
+++ Makefile 2004-01-27 13:15:21.861770832 +0100
@@ -1,5 +1,4 @@
# Path to parent kernel include files directory
-KERNEL_INCLUDE=/usr/src/linux/include
LIBC_INCLUDE=/usr/include
DEFINES=
@@ -17,11 +16,6 @@
GLIBCFIX=-Iinclude-glibc -include include-glibc/glibc-bugs.h
endif
-ifeq ($(KERNEL_INCLUDE)/linux/pfkeyv2.h,$(wildcard $(KERNEL_INCLUDE)/linux/pfkeyv2.h))
- SUBDIRS=libipsec setkey
- LDLIBS+=-Llibipsec -lipsec
- IPSECDEF=-DDO_IPSEC -Ilibipsec
-endif
#options if you compile with libc5, and without a bind>=4.9.4 libresolv
@@ -31,13 +25,13 @@
# What a pity, all new gccs are buggy and -Werror does not work. Sigh.
#CCOPT=-D_GNU_SOURCE -O2 -Wstrict-prototypes -Wall -g -Werror
CCOPT=-D_GNU_SOURCE -O2 -Wstrict-prototypes -Wall -g
-CFLAGS=$(CCOPT) $(GLIBCFIX) -I$(KERNEL_INCLUDE) -I../include $(IPSECDEF) $(DEFINES)
+CFLAGS=$(CCOPT) $(GLIBCFIX) -I../include $(DEFINES)
IPV4_TARGETS=tracepath ping clockdiff rdisc arping tftpd rarpd
IPV6_TARGETS=tracepath6 traceroute6 ping6
TARGETS=$(IPV4_TARGETS) $(IPV6_TARGETS)
-all: check-kernel subdirs $(TARGETS)
+all: $(TARGETS)
tftpd: tftpd.o tftpsubs.o
@@ -51,27 +45,6 @@
rdisc_srv.o: rdisc.c
$(CC) $(CFLAGS) -DRDISC_SERVER -o rdisc_srv.o rdisc.c
-check-kernel:
-ifeq ($(KERNEL_INCLUDE),)
- @echo "Please, set correct KERNEL_INCLUDE"; false
-else
- @set -e; \
- if [ ! -r $(KERNEL_INCLUDE)/linux/autoconf.h ]; then \
- echo "Please, set correct KERNEL_INCLUDE"; false; fi
-endif
-
-subdirs:
-ifneq ($(SUBDIRS),)
- @set -e; \
- for i in $(SUBDIRS); \
- do $(MAKE) -C $$i; done; \
- cd racoon; ./configure; make
-endif
-
-
-modules: check-kernel
- $(MAKE) KERNEL_INCLUDE=$(KERNEL_INCLUDE) -C Modules
-
man:
$(MAKE) -C doc man
--- ping6.c.orig 2002-09-20 17:08:11.000000000 +0200
+++ ping6.c 2004-01-27 03:52:42.704942760 +0100
@@ -788,38 +788,40 @@
printf("Destination unreachable: ");
switch (code) {
case ICMPV6_NOROUTE:
- printf("No route");
+ printf("No route\n");
break;
case ICMPV6_ADM_PROHIBITED:
- printf("Administratively prohibited");
+ printf("Administratively prohibited\n");
break;
case ICMPV6_NOT_NEIGHBOUR:
- printf("Not neighbour");
+ printf("Not neighbour\n");
break;
case ICMPV6_ADDR_UNREACH:
- printf("Address unreachable");
+ printf("Address unreachable\n");
break;
case ICMPV6_PORT_UNREACH:
- printf("Port unreachable");
+ printf("Port unreachable\n");
break;
default:
- printf("Unknown code %d", code);
+ printf("Unknown code %d\n", code);
break;
}
break;
case ICMPV6_PKT_TOOBIG:
printf("Packet too big: mtu=%u", info);
if (code)
- printf(", code=%d", code);
+ printf(", code=%d\n", code);
+ else
+ putchar('\n');
break;
case ICMPV6_TIME_EXCEED:
printf("Time exceeded: ");
if (code == ICMPV6_EXC_HOPLIMIT)
- printf("Hop limit");
+ printf("Hop limit\n");
else if (code == ICMPV6_EXC_FRAGTIME)
- printf("Defragmentation failure");
+ printf("Defragmentation failure\n");
else
- printf("code %d", code);
+ printf("code %d\n", code);
break;
case ICMPV6_PARAMPROB:
printf("Parameter problem: ");
@@ -831,25 +833,25 @@
printf("Unknown option ");
else
printf("code %d ", code);
- printf ("at %u", info);
+ printf ("at %u\n", info);
break;
case ICMPV6_ECHO_REQUEST:
- printf("Echo request");
+ printf("Echo request\n");
break;
case ICMPV6_ECHO_REPLY:
- printf("Echo reply");
+ printf("Echo reply\n");
break;
case ICMPV6_MGM_QUERY:
- printf("MLD Query");
+ printf("MLD Query\n");
break;
case ICMPV6_MGM_REPORT:
- printf("MLD Report");
+ printf("MLD Report\n");
break;
case ICMPV6_MGM_REDUCTION:
- printf("MLD Reduction");
+ printf("MLD Reduction\n");
break;
default:
- printf("unknown icmp type");
+ printf("unknown icmp type\n");
}
return 0;
__________________________________________________________
nie pytaj co inni zrobili dla pld, pomysl ile sam zrobiles