OpenPKG CVS Repository
http://cvs.openpkg.org/
____________________________________________________________________________
Server: cvs.openpkg.org Name: Ralf S. Engelschall
Root: /e/openpkg/cvs Email: [EMAIL PROTECTED]
Module: openpkg-src openpkg-web Date: 12-Mar-2003 11:16:50
Branch: HEAD Handle: 2003031210164503
Added files:
openpkg-src/zebra vtysh.conf zebra.patch
Modified files:
openpkg-src/zebra rc.zebra zebra.spec
openpkg-web news.txt
Log:
fully work-off this package
Summary:
Revision Changes Path
1.4 +18 -8 openpkg-src/zebra/rc.zebra
1.1 +6 -0 openpkg-src/zebra/vtysh.conf
1.1 +99 -0 openpkg-src/zebra/zebra.patch
1.28 +26 -15 openpkg-src/zebra/zebra.spec
1.3658 +1 -0 openpkg-web/news.txt
____________________________________________________________________________
patch -p0 <<'@@ .'
Index: openpkg-src/zebra/rc.zebra
============================================================================
$ cvs diff -u -r1.3 -r1.4 rc.zebra
--- openpkg-src/zebra/rc.zebra 19 Apr 2002 09:19:11 -0000 1.3
+++ openpkg-src/zebra/rc.zebra 12 Mar 2003 10:16:48 -0000 1.4
@@ -5,18 +5,28 @@
%config
zebra_enable="yes"
+ zebra_protocols="rip ospf bgp"
%start -p 200 -u root
opServiceEnabled zebra || exit 0
- @l_prefix@/sbin/zebra -d
- @l_prefix@/sbin/ripd -d
- @l_prefix@/sbin/ospfd -d
- @l_prefix@/sbin/bgpd -d
+ ( cd @l_prefix@/etc/zebra
+ @l_prefix@/sbin/zebra -d
+ for protocol in $zebra_protocols; do
+ if [ -f @l_prefix@/sbin/${protocol}d ]; then
+ @l_prefix@/sbin/${protocol}d -d
+ fi
+ done
+ @l_prefix@/bin/vtysh -b
+ )
%stop -p 200 -u root
opServiceEnabled zebra || exit 0
- kill -TERM `cat @l_prefix@/var/zebra/bgpd.pid`
- kill -TERM `cat @l_prefix@/var/zebra/ospfd.pid`
- kill -TERM `cat @l_prefix@/var/zebra/ripd.pid`
- kill -TERM `cat @l_prefix@/var/zebra/zebra.pid`
+ if [ -f @l_prefix@/var/zebra/zebra.pid ]; then
+ kill -TERM `cat @l_prefix@/var/zebra/zebra.pid` >/dev/null 2>&1 || true
+ fi
+ for protocol in $zebra_protocols; do
+ if [ -f @l_prefix@/var/zebra/${protocol}d.pid ]; then
+ kill -TERM `cat @l_prefix@/var/zebra/${protocol}d.pid` >/dev/null 2>&1
|| true
+ fi
+ done
@@ .
patch -p0 <<'@@ .'
Index: openpkg-src/zebra/vtysh.conf
============================================================================
$ cvs diff -u -r0 -r1.1 vtysh.conf
--- /dev/null 2003-03-12 11:16:49.000000000 +0100
+++ vtysh.conf 2003-03-12 11:16:50.000000000 +0100
@@ -0,0 +1,6 @@
+!
+! vtysh.conf -- Zebra VTY Shell Configuration
+!
+username zebra nopassword
+log file @l_prefix@/var/zebra/vtysh.log
+!
@@ .
patch -p0 <<'@@ .'
Index: openpkg-src/zebra/zebra.patch
============================================================================
$ cvs diff -u -r0 -r1.1 zebra.patch
--- /dev/null 2003-03-12 11:16:49.000000000 +0100
+++ zebra.patch 2003-03-12 11:16:50.000000000 +0100
@@ -0,0 +1,99 @@
+--- ripd/ripd.c
++++ ripd/ripd.c
+@@ -51,6 +51,10 @@
+
+ /* RIP queries. */
+ long rip_global_queries = 0;
++
++/* Should we trust netmasks or rather apply_classful_mask_ipv4()
++ in rip_output_process() ? */
++char rip_should_trust_netmasks = 0;
+
+ /* Prototypes. */
+ void rip_event (enum rip_event, int);
+@@ -1963,7 +1967,9 @@
+ zlog_info("%s/%d before RIPv1 mask check ",
+ inet_ntoa (classfull.prefix), classfull.prefixlen);
+
+- apply_classful_mask_ipv4 (&classfull);
++ if (!rip_should_trust_netmasks)
++ apply_classful_mask_ipv4 (&classfull);
++
+ p = &classfull;
+
+ if (IS_RIP_DEBUG_PACKET)
+@@ -2705,6 +2711,26 @@
+
+ return CMD_SUCCESS;
+ }
++
++DEFUN (rip_trust_netmasks,
++ rip_trust_netmasks_cmd,
++ "trust netmasks",
++ "Tell Zebra to trust netmasks and not to recalculate them.\n"
++ "Netmasks will be trusted.\n")
++{
++ rip_should_trust_netmasks = 1;
++ return CMD_SUCCESS;
++}
++
++DEFUN (no_rip_trust_netmasks,
++ no_rip_trust_netmasks_cmd,
++ "no trust netmasks",
++ "Tell Zebra not to trust netmasks and recalculate them.\n"
++ "Netmasks will be recalculated.\n")
++{
++ rip_should_trust_netmasks = 0;
++ return CMD_SUCCESS;
++}
+
+ struct route_table *rip_distance_table;
+
+@@ -3503,6 +3529,8 @@
+ install_element (RIP_NODE, &no_rip_distance_source_cmd);
+ install_element (RIP_NODE, &rip_distance_source_access_list_cmd);
+ install_element (RIP_NODE, &no_rip_distance_source_access_list_cmd);
++ install_element (RIP_NODE, &rip_trust_netmasks_cmd);
++ install_element (RIP_NODE, &no_rip_trust_netmasks_cmd);
+
+ /* Debug related init. */
+ rip_debug_init ();
+--- zebra/ioctl.c.orig Tue Oct 23 11:31:29 2001
++++ zebra/ioctl.c Fri Oct 4 19:45:04 2002
+@@ -349,6 +349,7 @@
+ int ret;
+ struct ifreq ifreq;
+
++ bzero(&ifreq, sizeof(struct ifreq));
+ ifreq_set_name (&ifreq, ifp);
+
+ ifreq.ifr_flags = ifp->flags;
+@@ -371,6 +372,7 @@
+ int ret;
+ struct ifreq ifreq;
+
++ bzero(&ifreq, sizeof(struct ifreq));
+ ifreq_set_name (&ifreq, ifp);
+
+ ifreq.ifr_flags = ifp->flags;
+@@ -473,6 +475,9 @@
+ mask.sin6_len = sizeof (struct sockaddr_in6);
+ #endif
+ memcpy (&addreq.ifra_prefixmask, &mask, sizeof (struct sockaddr_in6));
++
++ addreq.ifra_lifetime.ia6t_vltime = 0xffffffff;
++ addreq.ifra_lifetime.ia6t_pltime = 0xffffffff;
+
+ addreq.ifra_lifetime.ia6t_pltime = ND6_INFINITE_LIFETIME;
+ addreq.ifra_lifetime.ia6t_vltime = ND6_INFINITE_LIFETIME;
+--- lib/vty.h.orig Sun Aug 18 16:34:00 2002
++++ lib/vty.h Wed Mar 12 11:10:05 2003
+@@ -128,7 +128,7 @@
+ };
+
+ /* Integrated configuration file. */
+-#define INTEGRATE_DEFAULT_CONFIG "Zebra.conf"
++#define INTEGRATE_DEFAULT_CONFIG "zebra.conf.integrate"
+
+ /* Small macro to determine newline is newline only or linefeed needed. */
+ #define VTY_NEWLINE ((vty->type == VTY_TERM) ? "\r\n" : "\n")
@@ .
patch -p0 <<'@@ .'
Index: openpkg-src/zebra/zebra.spec
============================================================================
$ cvs diff -u -r1.27 -r1.28 zebra.spec
--- openpkg-src/zebra/zebra.spec 3 Jan 2003 10:55:49 -0000 1.27
+++ openpkg-src/zebra/zebra.spec 12 Mar 2003 10:16:48 -0000 1.28
@@ -33,7 +33,7 @@
Group: Network
License: GPL
Version: 0.93b
-Release: 20020913
+Release: 20030312
# list of sources
Source0: ftp://ftp.zebra.org/pub/zebra/zebra-%{version}.tar.gz
@@ -42,11 +42,12 @@
Source3: ospfd.conf
Source4: ripd.conf
Source5: zebra.conf
+Patch0: zebra.patch
# build information
Prefix: %{l_prefix}
BuildRoot: %{l_buildroot}
-BuildPreReq: OpenPKG, openpkg >= 20020206, gcc
+BuildPreReq: OpenPKG, openpkg >= 20020206, gcc, readline
PreReq: OpenPKG, openpkg >= 20020206
AutoReq: no
AutoReqProv: no
@@ -63,6 +64,7 @@
%prep
%setup -q
+ %patch -p0
%build
# patch configure script for correct pid directory
@@ -73,10 +75,16 @@
# configure package
CC="%{l_cc}" \
CFLAGS="%{l_cflags -O}" \
+ CPPFLAGS="%{l_cppflags}" \
+ LDFLAGS="%{l_ldflags}" \
./configure \
--prefix=%{l_prefix} \
--sysconfdir=%{l_prefix}/etc/zebra \
- --disable-ipv6
+ --enable-vtysh \
+ --disable-ospf6d \
+ --disable-ripngd \
+ --disable-ipv6 \
+ --without-libpam
# build package
%{l_make} %{l_mflags -O}
@@ -88,28 +96,31 @@
%{l_make} %{l_mflags} install AM_MAKEFLAGS="DESTDIR=$RPM_BUILD_ROOT"
# strip down package
- rm -f $RPM_BUILD_ROOT%{l_prefix}/man/man1/vtysh.1
+ rm -f $RPM_BUILD_ROOT%{l_prefix}/man/man8/ospf6d.8
+ rm -f $RPM_BUILD_ROOT%{l_prefix}/man/man8/ripngd.8
rm -f $RPM_BUILD_ROOT%{l_prefix}/info/dir
strip $RPM_BUILD_ROOT%{l_prefix}/sbin/* >/dev/null 2>&1 || true
# replace default configuration
rm -f $RPM_BUILD_ROOT%{l_prefix}/etc/zebra/*
- %{l_shtool} install -c -m 600 -e 's;@l_prefix@;%{l_prefix};g' \
- %{SOURCE bgpd.conf} $RPM_BUILD_ROOT%{l_prefix}/etc/zebra/
- %{l_shtool} install -c -m 600 -e 's;@l_prefix@;%{l_prefix};g' \
- %{SOURCE ospfd.conf} $RPM_BUILD_ROOT%{l_prefix}/etc/zebra/
- %{l_shtool} install -c -m 600 -e 's;@l_prefix@;%{l_prefix};g' \
- %{SOURCE ripd.conf} $RPM_BUILD_ROOT%{l_prefix}/etc/zebra/
- %{l_shtool} install -c -m 600 -e 's;@l_prefix@;%{l_prefix};g' \
- %{SOURCE zebra.conf} $RPM_BUILD_ROOT%{l_prefix}/etc/zebra/
+ %{l_shtool} install -c -m 600 \
+ -e 's;@l_prefix@;%{l_prefix};g' \
+ %{SOURCE zebra.conf} %{SOURCE vtysh.conf} \
+ %{SOURCE ripd.conf} %{SOURCE ospfd.conf} %{SOURCE bgpd.conf} \
+ $RPM_BUILD_ROOT%{l_prefix}/etc/zebra/
+ %{l_shtool} install -c -m 600 /dev/null \
+ $RPM_BUILD_ROOT%{l_prefix}/etc/zebra/zebra.conf.integrate
# install run-command script
- %{l_shtool} mkdir -f -p -m 755 $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d
- %{l_shtool} install -c -m 755 -e 's;@l_prefix@;%{l_prefix};g' \
+ %{l_shtool} mkdir -f -p -m 755 \
+ $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d
+ %{l_shtool} install -c -m 755 \
+ -e 's;@l_prefix@;%{l_prefix};g' \
%{SOURCE rc.zebra} $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/
# make sure pid and log directory exists
- %{l_shtool} mkdir -f -p -m 755 $RPM_BUILD_ROOT%{l_prefix}/var/zebra
+ %{l_shtool} mkdir -f -p -m 755 \
+ $RPM_BUILD_ROOT%{l_prefix}/var/zebra
# determine package file list
%{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
@@ .
patch -p0 <<'@@ .'
Index: openpkg-web/news.txt
============================================================================
$ cvs diff -u -r1.3657 -r1.3658 news.txt
--- openpkg-web/news.txt 12 Mar 2003 08:54:23 -0000 1.3657
+++ openpkg-web/news.txt 12 Mar 2003 10:16:45 -0000 1.3658
@@ -1,3 +1,4 @@
+12-Mar-2003: Upgraded package: P<zebra-0.93b-20030312>
12-Mar-2003: Upgraded package: P<sasl-2.1.12-20030312>
12-Mar-2003: Upgraded package: P<ethereal-0.9.11-20030312>
12-Mar-2003: Upgraded package: P<gnutls-0.8.4-20030312>
@@ .
______________________________________________________________________
The OpenPKG Project www.openpkg.org
CVS Repository Commit List [EMAIL PROTECTED]