summaryrefslogtreecommitdiffstats
path: root/debian
diff options
context:
space:
mode:
Diffstat (limited to 'debian')
-rw-r--r--debian/.gitignore7
-rw-r--r--debian/README26
-rwxr-xr-xdebian/autogen.sh11
-rw-r--r--debian/changelog444
-rw-r--r--debian/compat1
-rw-r--r--debian/control40
-rw-r--r--debian/copyright39
-rw-r--r--debian/docs3
-rwxr-xr-xdebian/import23
-rw-r--r--debian/lintian2
-rwxr-xr-xdebian/rules143
-rw-r--r--debian/vyatta-quagga.dirs4
-rw-r--r--debian/vyatta-quagga.files14
-rw-r--r--debian/vyatta-quagga.init.d141
-rw-r--r--debian/vyatta-quagga.logrotate17
-rw-r--r--debian/vyatta-quagga.manpages8
-rw-r--r--debian/vyatta-quagga.postinst32
-rw-r--r--debian/vyatta-quagga.postrm19
-rw-r--r--debian/vyatta-quagga.preinst89
-rw-r--r--debian/vyatta-quagga.prerm3
-rw-r--r--debian/vyatta-quagga.quagga.pam5
21 files changed, 1071 insertions, 0 deletions
diff --git a/debian/.gitignore b/debian/.gitignore
new file mode 100644
index 00000000..1ec0cf81
--- /dev/null
+++ b/debian/.gitignore
@@ -0,0 +1,7 @@
+build-stamp
+quagga
+vyatta-quagga
+*.substvars
+files
+*.debhelper
+*.log
diff --git a/debian/README b/debian/README
new file mode 100644
index 00000000..cd10e951
--- /dev/null
+++ b/debian/README
@@ -0,0 +1,26 @@
+The Debian Package vyatta-quagga
+----------------------------
+
+This package is the Vyatta build of the Quagga routing protocol
+daemons. The source is maintained in the GIT repository:
+ http://suva.vyatta.com/quagga.git
+
+The upstream CVS repository is:
+ :pserver:anoncvs@anoncvs.quagga.net:/var/cvsroot quagga
+
+To clone the source for this package:
+ git clone http://suva.vyatta.com/quagga.git
+
+To build:
+ git-buildpackage -us -uc
+
+To build from the source package, first add the following to
+/etc/apt/sources.list:
+ deb-src http://archive1.vyatta.com/vyatta community testing
+
+Then:
+ apt-get source vyatta-quagga
+ cd vyatta-quagga-VERSION
+ debuild -nc -b -uc -us
+
+ -- Tom Grennan <tgrennan@vyatta.com> Wed, 19 DEC 2007
diff --git a/debian/autogen.sh b/debian/autogen.sh
new file mode 100755
index 00000000..e8c94af8
--- /dev/null
+++ b/debian/autogen.sh
@@ -0,0 +1,11 @@
+#!/bin/sh
+
+
+rm -rf config
+rm -f aclocal.m4 config.guess config.statusconfig.sub configure INSTALL
+
+autoreconf --force --install
+
+rm -f config.sub config.guess
+ln -s /usr/share/misc/config.sub .
+ln -s /usr/share/misc/config.guess .
diff --git a/debian/changelog b/debian/changelog
new file mode 100644
index 00000000..27a97490
--- /dev/null
+++ b/debian/changelog
@@ -0,0 +1,444 @@
+vyatta-quagga (0.99.10-1) unstable; urgency=low
+
+ 3.1.4
+ [ Mark O'Brien ]
+
+
+ [ Paul Jakma ]
+ * [bgpd] bug #419: partial aspath-limit incorrectly causes session
+ reset
+
+ [ Mark O'Brien ]
+
+ -- Mark O'Brien <mobrien@firebolt.vyatta.com> Tue, 14 Oct 2008 17:30:19 -0700
+
+vyatta-quagga (0.99.9-13) unstable; urgency=low
+
+ 3.1.3
+ [ Mark O'Brien ]
+
+
+ [ Stephen Hemminger ]
+ * Put bug fix for route flapping back
+ * Revert "Only set ifindex on set pass"
+ * Revert "Fix management of route changes"
+ * Fix management of route changes
+ * Only set ifindex on set pass
+
+ [ Mark O'Brien ]
+
+ -- Mark O'Brien <mobrien@firebolt.vyatta.com> Tue, 19 Aug 2008 17:48:34 -0700
+
+vyatta-quagga (0.99.9-12) unstable; urgency=low
+
+ * Merge in upstream version 0.99.10
+ * Rename package from vyatta-quagga to quagga
+ 3.1.2
+
+ [ Stephen Hemminger ]
+ * Remove routes from FIB.
+ * Handle state transistions when there are multiple nexthops
+ * Update recursive route when nexthop changes
+ * Minor typo in zebra debugging
+ * Go back to hiding connected routes from down interfaces
+ * Handle races with add/delete of routes
+ * Revert "Only announce connected routes if link is detected"
+ * Update RIB/FIB on recursive route state changes
+ * Make some trivial functions on interfaces inline
+ * Fix compiler warnings from incorrect format strings
+
+ [ Mohit Mehta ]
+ * Fix Bug 3435 Protocol MIBs are not supported on upgraded system
+
+ [ Stephen Hemminger ]
+ * Rescan for next hops after static route change
+ * Set IPv4 TOS value for BGP
+ * active static route changes for ipv6
+ * Fix whitespace in config file
+ * Correctly identify/manage all connected static routes
+ * Make some rib data structures private
+ * Only announce connected routes if link is detected
+
+ [ Mark O'Brien ]
+
+ -- Stephen Hemminger <shemminger@vyatta.com> Thu, 31 Jul 2008 14:16:57 -0700
+
+vyatta-quagga (0.99.9-11) unstable; urgency=low
+
+ 3.1.1
+ [ Mark O'Brien ]
+
+
+ [ Stephen Hemminger ]
+ * Revert "Backout all changes related to using kernel for linkdetect"
+ * Revert "Use if_flags_update"
+ * Use if_flags_update
+ * Backout all changes related to using kernel for linkdetect
+ * Fix double free of bgp_table
+ * Check for node being freed twice
+ * Fix double free in bgp when using route client
+
+ [ Mark O'Brien ]
+
+ -- Mark O'Brien <mobrien@firebolt.vyatta.com> Sat, 28 Jun 2008 11:22:27 -0700
+
+vyatta-quagga (0.99.9-10) unstable; urgency=low
+
+ 3.1.0
+ [ Mark O'Brien ]
+
+
+ [ Stephen Hemminger ]
+ * Workaround for package rename vs pam problem
+ * Fix vtysh authorization
+ * Allow any user in quagga group to run vtysh
+ * netlink interface minor stuff
+ * get rid of duplicate includes
+ * fix compiler warnings
+ * only process some isisd files
+ * get rid of compiler warnings in OSPF
+ * ifdef out dead code
+ * fix warning from type mismatch
+ * ifdef out dead code
+ * flag field printf formatting in debug strings
+ * comment out unused code
+ * Fix compiler warnings
+ * get rid of compiler warnings
+ * Handle empty auth string properly
+ * Add ipv6 link detect hooks
+ * Change how link-detect is configured in build
+ * Turn on kernel link-detect
+ * ignore cscope and tags files
+
+ [ pilot ]
+ * + fix the set statement name
+ * + [bgpd] Added new route-map set statement: "as-path ignore"
+
+ [ rbalocca ]
+ * Ignore derived files
+
+ [ Stephen Hemminger ]
+ * only set non-blocking on netlink socket
+ * remove unneeded privledge changes
+ * Rearrange RIB structures to save memory
+ * Manage link state on non-connected static routes
+ * Ignore netlink interface events that don't change state
+
+ [ rbalocca ]
+ * Convert to our method of changelog creation
+
+ [ Stephen Hemminger ]
+ * Add interface state change logging
+ * set/check nl port id on messages
+ * Force line buffered mode.
+
+ [ Mohit Mehta ]
+ * Remove extraneous smux log messages for routing daemons connectivity
+ to snmpd
+
+ [ Stephen Hemminger ]
+ * remove watchlink - no longer used
+
+ [ Mohit Mehta ]
+ * Dependency for building quagga with snmp support enabled
+ * Modifications to quagga to enable bgp, ospf and rip mib traversals
+
+ [ Michael H. Warfield ]
+ * TCP MD5SIG patch
+
+ [ paul ]
+ * [bgpd] remove unnecessary 0 entries from struct message's
+ * [ripd] remove unnecessary 0 entries from struct message's
+ * [lib] Fix the struct message LOOKUP function to be more robust
+ * [lib/linklist] Enforce "nodes must have data" invariant more
+ rigorously
+
+ [ pilot ]
+ * + fix bug#326 by rib_lookup_and_pushup()
+
+ [ paul ]
+ * [c++] remove/rename some names in headers that clash with C++
+ reserved words
+ * [tests:bgp] Further tests for 0 sized as_path segments
+ * [isisd] Bug #437: fix ssert caused by bad list management
+ * [bgpd] fix crash on startup if compiled IPv4-only
+ * [solaris] add missing makefile.am dependency
+
+ [ ajs ]
+ * [link-detect] Improve BSD support.
+ * [link-detect] Improve BSD support.
+ * [link-detect] Try to get BSD link-detect to work properly.
+ * [link-detect] Static interface routes should behave properly with
+ link-detect.
+
+ [ paul ]
+ * [lib] add mising UL qualifier to numerical constant
+ * [bgpd] Fix number of DoS security issues, restricted to configured
+ peers.
+
+ [ Mark O'Brien ]
+
+ -- Mark O'Brien <mobrien@firebolt.vyatta.com> Tue, 17 Jun 2008 09:27:29 -0700
+
+vyatta-quagga (0.99.9-9) unstable; urgency=low
+
+ 3.0.5
+ [ Mark O'Brien ]
+
+
+ [ An-Cheng Huang ]
+ * fix package upgrade problem caused by prerm script.
+
+ [ Mark O'Brien ]
+
+ -- Mark O'Brien <mobrien@vyatta.com> Tue, 06 May 2008 12:43:40 -0700
+
+vyatta-quagga (0.99.9-8) unstable; urgency=low
+
+ 3.0.4
+ [ Mark O'Brien ]
+
+
+ [ Stephen Hemminger ]
+ * filter out all route change responses on listen socket
+ * quiet noisy errors from zebra
+
+ [ Mark O'Brien ]
+
+ -- Mark O'Brien <mobrien@vyatta.com> Mon, 05 May 2008 16:40:58 -0700
+
+vyatta-quagga (0.99.9-7) unstable; urgency=low
+
+ 3.0.3
+ [ Mark O'Brien ]
+
+
+ [ Stephen Hemminger ]
+ * mark static routes as inactive when link is down
+ * Don't build watchlink
+ * Don't build watchlink
+ * Check nexthop for internal routes
+ * Check nexthop status
+ * Two passes on update (ipv4 and ipv6)
+
+ [ rbalocca ]
+ * Indicate the VC4.0.2 release candidate in the changelog
+
+ [ Mark O'Brien ]
+
+ -- Mark O'Brien <mobrien@vyatta.com> Tue, 29 Apr 2008 16:42:45 -0700
+
+vyatta-quagga (0.99.9-6) unstable; urgency=low
+
+ VC4.0.2
+ [ Mark O'Brien ]
+
+
+ [ Stephen Hemminger ]
+ * Disable watchlink from the build
+ * go back to building watchlink
+ * Don't start watchlink
+
+ [ Mark O'Brien ]
+
+ -- Mark O'Brien <mobrien@vyatta.com> Sat, 19 Apr 2008 11:56:27 -0700
+
+vyatta-quagga (0.99.9-5) unstable; urgency=low
+
+ VC4.0.2 release candidate
+ [ Mark O'Brien ]
+
+ * 3.0.2
+
+ [ Stephen Hemminger ]
+ * interface running status fix
+ * Fix packet filter state machine
+
+ [ rbalocca ]
+ * Add upgrade test to prerm
+
+ [ Mark O'Brien ]
+
+ -- Mark O'Brien <mobrien@vyatta.com> Wed, 16 Apr 2008 09:50:28 -0700
+
+vyatta-quagga (0.99.9-4) unstable; urgency=low
+
+ 3.0.2
+ [ Mark O'Brien ]
+
+ * 3.0.1
+
+ [ Michael Larson ]
+ * bumped up netlink recv buffer limits for zebra--should alleviate
+ netlink error msgs that occur under large routing tables when layer
+ * support 64bit
+ * added interface/address exclusion support to watchlink. The correct
+ format is:
+ * modified watchlink parser to support the following behaviors:
+ * add wildcard for interfaces. use an "*" in place of an interface
+ name--and the address provided will exclude all
+
+ [ Stephen Hemminger ]
+ * Filter unwanted netlink messages
+ * fix build on on 64 bit platforms
+ * add locking to prevent file update problems
+
+ [ rbalocca ]
+ * Remove unused lintian "ignore" option
+
+ [ Mark O'Brien ]
+
+ -- Mark O'Brien <mobrien@vyatta.com> Fri, 04 Apr 2008 18:01:16 -0700
+
+vyatta-quagga (0.99.9-3) unstable; urgency=low
+
+ VC4.0.1
+ [ Mark O'Brien ]
+
+
+ [ Bob Gilligan ]
+ * Bugfix: 2845
+
+ [ Michael Larson ]
+ * revert behavior for watchlink to pulling/pushing address on
+ interface on IFF_RUNNING|IFF_UP event.
+ * And with the correct licensing headers.
+
+ [ Mohit Mehta ]
+ * Fix Bug 2750 bgp: large ASN shown as negative
+ * Fix Bug 2750 bgp: large ASN shown as negative
+
+ [ Stephen Hemminger ]
+ * Change license notice from VPL to GPLv2
+
+ [ Stig Thormodsrud ]
+ * Fix 2842: Protocol debug does not take affect until underlying log
+ level
+
+ [ Mark O'Brien ]
+
+ -- Mark O'Brien <mobrien@vyatta.com> Tue, 18 Mar 2008 19:05:11 -0700
+
+vyatta-quagga (0.99.9-2) unstable; urgency=low
+
+ vc4.0.0
+ [ Mark O'Brien ]
+
+
+ [ An-Cheng Huang ]
+ * remove generated files from repo
+
+ [ Justin Fletcher ]
+ * Log to syslog daemon
+
+ [ Michael Larson ]
+ * fix for static interface and static nexthop routes for quagga. Now
+ respects cable pull (IFF_RUNNING) events and admin (IFF_UP) events.
+ * initial check-in of watchlink project. compiles, runs and manages
+ state. needs additional testing and updates
+ * removed unnecessary files.
+ * packaging and make rules for base vyatta-quagga project to build
+ watchlink
+ * Added quagga like features to watchlink pgm: standard pid file
+ creation and background option. Also
+ * hooks to start/stop watchlink daemon with quagga
+ * create directory for watchlink to store link status
+ * moved creation of linkstatus directory from postinst to preinst
+ where it should be.
+ * cleaned up source a bit. added syslog error messages. added legal-
+ eeze.
+ * added support for filtering of interfaces. filter or exclusion list
+ needs to be be written to exclude
+ * removed stderr message when unable to open exclusion file. Also
+ downgraded syslog entry to
+ * added empty exclude file creation to make watchlink happy
+ * fix bug introduced with ptp support--indexing of database and
+ initialization of terminating address.
+ * fix for bc addr and fix for parsing iface for show cmds and filter
+ * need to qualify test for non-ethernet type interfaces to
+ newlink/dellink messages only.
+ * moved some stderr messages to syslog. removed stderr message when
+ receiving ack from kernel on netlink msg.
+ * modified watchlink to manage connected routes in local and main
+ tables per interface rather than pulling interface address on cable
+ pull event.
+ * force so_recvbuf size to 223232 (double of 111616) for netlink in
+ zebra. will also need to modify
+ * fix for bug 2750. will also submit to quagga dvlprs.
+
+ [ Stephen Hemminger ]
+ * avoid package conflict between iproute and vyatta-iproute
+ * Revert "avoid package conflict between iproute and vyatta-iproute"
+
+ [ Tom Grennan ]
+ * ignore autoreconf generated files
+ * ignore emacs backups
+ * add script to import updates from anoncvs.quagga.net
+ * import into the "upstream" branch
+ * initial vyatta-quagga debian config
+ * finish vyatta debian config
+ * use default daemon config files rather than /dev/null
+ * fix log files path
+ * set default logging
+ * ignore debuild generated debian/vyatta-quagga.substvars
+ * donot modify existing conffiles
+ * separate init of vtysh.conf from other daemons
+ * use "log syslog LEVEL" not "log file syslog LEVEL"
+ * ignore watchlink binary
+ * donot add user "vyatta" to vtysh.conf in preinit, this is now done
+ during system config
+
+ [ paul ]
+ * [bgpd] Fix typo, which prevented advertisement of MP (non-IPv4)
+ prefixes
+ * [privs/Solaris] Quagga should work in zones with IP instances
+ * [bgpd] Merge AS4 support
+ * [tests] Forgot to commit ecommunity_tests.c
+ * [news] Fix top-line version
+ * [snmp-smux] Fix problems if 'smux peer ...' is issued multiple times
+ * [ospf6d] Fix removal of defunct ASBR routes
+ * 2007-10-30 Nick Hilliard <nick@inex.ie>
+ * [bgpd] small fix for crash if 'listenon' argument is not given
+ * [bgpd] Fix typo in previous commit to bgp_main.c
+
+ [ pilot ]
+ * * rt_socket.c: (kernel_rtm_ipv4) prefix_buf could be passed
+ * Switch from LOOKUP() to lookup() for rtm_type (see bug #401 for
+ details).
+ * + fixed bug #402: now the second zebra process doesn't destroy
+ routes
+ * + sayonara old_pid!
+ * + fix minor regression in OSPF sending buffer adjustment logic
+ * + fix missing arg to zlog_warn()
+ * + Minor bugfix: IPv6 prefixes were logged incorrectly in RIB
+ debugging calls. Fixed.
+ * + rib_process() speedup for multi-nexthop route nodes
+ * + pidfiles are now always created with 0644 perms instead if
+ LOGFILE_MASK (0600)
+ * + fix the bug reported by Milan Kocian (IPv6 route handling was
+ broken by the RIB debug changeset).
+ * + fixed bug #418 (changing address on an existing interface doesn't
+ cause existing static routes to be revalidated)
+ * + fixed no_set_aspath_prepend() to correctly match existing "set"
+ statement
+
+ [ root ]
+ * added support for ifa_address field in rtm_newaddr message and in
+ links where the ifa_address != ifa_local then ifa_address is
+ populated in setaddr message. fix for bug 2650
+ * fix for bug 2648--downgraded some syslog messages and removed some
+ from console.
+ * fix for bug 2570. increased buffer length from 4096 to 8192
+ * fix for ppp--restrict watchlink to ethernet interface types only.
+ Filter by checking the ifi_type flag in ifinfomsg hdr from netlink.
+
+ [ Mark O'Brien ]
+
+ -- Mark O'Brien <mobrien@vyatta.com> Mon, 25 Feb 2008 17:39:54 -0800
+
+vyatta-quagga (0.99.9-1) unstable; urgency=low
+
+ * based on upstream/0.99.9 == d68aac0fbecabfb765a42b3c6e5693836dafda99
+
+ -- Tom Grennan <tgrennan@vyatta.com> Fri, 21 Dec 2007 19:29:50 +0000
+
diff --git a/debian/compat b/debian/compat
new file mode 100644
index 00000000..7ed6ff82
--- /dev/null
+++ b/debian/compat
@@ -0,0 +1 @@
+5
diff --git a/debian/control b/debian/control
new file mode 100644
index 00000000..12718e01
--- /dev/null
+++ b/debian/control
@@ -0,0 +1,40 @@
+Source: vyatta-quagga
+Section: contrib/net
+Priority: extra
+Maintainer: Stephen Hemminger <shemminger@vyatta.com>
+Build-Depends: debhelper (>= 5),
+ autotools-dev,
+ libncurses5-dev,
+ libreadline5-dev | libreadline-dev,
+ texinfo (>= 4.7),
+ libpam0g-dev | libpam-dev,
+ libcap1 | libcap-dev,
+ imagemagick,
+ ghostscript | gs-gpl,
+ groff,
+ po-debconf,
+ libsnmp-dev
+Standards-Version: 3.7.2
+Vcs-Git: http://suva.vyatta.com/git/vyatta-quagga.git
+
+Package: vyatta-quagga
+Architecture: any
+Depends: ${shlibs:Depends}, logrotate (>= 3.2-11), iproute, ${misc:Depends}
+Pre-Depends: adduser
+Conflicts: zebra, zebra-pj, quagga
+Replaces: zebra, zebra-pj, quagga
+Suggests: snmpd
+Description: BGP/OSPF/RIP routing daemon
+ GNU Quagga is free software which manages TCP/IP based routing protocols.
+ It supports BGP4, BGP4+, OSPFv2, OSPFv3, IS-IS, RIPv1, RIPv2, and RIPng as
+ well as the IPv6 versions of these.
+ .
+ As the precessor Zebra has been considered orphaned, the Quagga project
+ has been formed by members of the zebra mailing list and the former
+ zebra-pj project to continue developing.
+ .
+ Quagga uses threading if the kernel supports it, but can also run on
+ kernels that do not support threading. Each protocol has its own daemon.
+ .
+ It is more than a routed replacement, it can be used as a Route Server and
+ a Route Reflector.
diff --git a/debian/copyright b/debian/copyright
new file mode 100644
index 00000000..78f470e7
--- /dev/null
+++ b/debian/copyright
@@ -0,0 +1,39 @@
+This package and repository was debianized for the git-buildpackage
+tool by Tom Grennan <tgrennan@vyatta.com> on Dec 19, 2007. This was
+derived from the debian package by Christian Hammers <ch@debian.org>
+on 2003-07-01.
+
+The source is maintained in the GIT repository:
+ http://suva.vyatta.com/quagga.git
+
+The upstream CVS repository is:
+ :pserver:anoncvs@anoncvs.quagga.net:/var/cvsroot quagga
+
+Upstream Authors:
+
+ Authors of the original Zebra are
+ Kunihiro Ishiguro <kunihiro@zebra.org>
+ Toshiaki Takada <takada@zebra.org>
+ Yasuhiro Ohara <yasu@sfc.wide.ad.jp>
+
+ Main patch collector for quagga is
+ Paul Jakma <paul@jakma.org>
+
+Copyright:
+
+ Copyright (c) 1996, 97, 98, 99, 2000 Kunihiro Ishiguro <kunihiro@zebra.org>
+ Portions Copyright (c) 2003 Paul Jakma <paul@dishone.st>
+
+License:
+
+ The package libraries are subject to Library General Public License,
+ version 2. The remainder package contents are subject to GNU General
+ Pulic License, version 2.
+
+ Software distributed under the License is distributed on an "AS IS"
+ basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+ the License for the specific language governing rights and limitations
+ under the License.
+
+On Debian systems, the complete text of these licenses can be found in
+`/usr/share/common-licenses/{GPL-2,LGPL-2}'.
diff --git a/debian/docs b/debian/docs
new file mode 100644
index 00000000..6f83607c
--- /dev/null
+++ b/debian/docs
@@ -0,0 +1,3 @@
+AUTHORS
+NEWS
+README
diff --git a/debian/import b/debian/import
new file mode 100755
index 00000000..ac03e249
--- /dev/null
+++ b/debian/import
@@ -0,0 +1,23 @@
+#!/bin/bash
+
+# Import updates from main CVS repo
+
+if ! git branch -l | grep -q upstream ; then
+ git branch upstream origin/upstream
+fi
+
+# verbose args: -v -p-v
+git-cvsimport -d :pserver:anoncvs@anoncvs.quagga.net:/var/cvsroot -k -u -i -m -o upstream quagga
+
+# Annotate tags
+
+git tag -l |
+while read t ; do
+ if [ ! -r .git/refs/tags/$t ] ; then
+ r=$(git-show-ref -s $t)
+ git tag -d $t
+ git tag -a -m 'import cvs tag' $t $r
+ fi
+done
+
+echo "Remember to: git push suva:/git/quagga.git upstream"
diff --git a/debian/lintian b/debian/lintian
new file mode 100644
index 00000000..08d952e9
--- /dev/null
+++ b/debian/lintian
@@ -0,0 +1,2 @@
+vyatta-quagga: binary-without-manpage usr/sbin/vyatta-ospfclient
+vyatta-quagga: binary-without-manpage usr/sbin/vyatta-watchquagga
diff --git a/debian/rules b/debian/rules
new file mode 100755
index 00000000..170e9035
--- /dev/null
+++ b/debian/rules
@@ -0,0 +1,143 @@
+#!/usr/bin/make -f
+# -*- makefile -*-
+# Sample debian/rules that uses debhelper.
+# This file was originally written by Joey Hess and Craig Small.
+# As a special exception, when this file is copied by dh-make into a
+# dh-make output file, you may use that output file without restriction.
+# This special exception was added by Craig Small in version 0.37 of dh-make.
+
+# Uncomment this to turn on verbose mode.
+#export DH_VERBOSE=1
+
+
+# These are used for cross-compiling and for saving the configure script
+# from having to guess our platform (since we know it already)
+DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
+DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
+PACKAGE=vyatta-quagga
+PKGDIR=$(CURDIR)/debian/$(PACKAGE)
+BUILD_STAMP=debian/build-stamp
+CFLAGS = -Wall -g
+WANT_SNMP=1
+
+CFLAGS += -Os
+
+ifeq ($(WANT_SNMP),1)
+ xable_snmp = --enable-snmp
+else
+ xable_snmp = --disable-snmp
+endif
+
+configure = ./configure
+configure += --host=$(DEB_HOST_GNU_TYPE)
+configure += --build=$(DEB_BUILD_GNU_TYPE)
+configure += --prefix=/usr
+configure += --program-prefix=vyatta-
+configure += --libdir=/usr/lib/$(PACKAGE)
+configure += --localstatedir=/var/run/vyatta/quagga
+configure += --sysconfdir=/etc/vyatta/quagga
+configure += --mandir=/usr/share/man
+configure += --includedir=/usr/include/vyatta
+configure += --infodir=/usr/share/info/$(PACKAGE)
+configure += --enable-exampledir=/usr/share/doc/$(PACKAGE)/examples
+configure += --enable-vtysh
+configure += --enable-ipv6
+configure += --enable-isisd
+configure += --enable-watchquagga
+configure += --enable-opaque-lsa
+configure += --enable-ospfclient=yes
+configure += --enable-ospfapi=yes
+configure += --enable-ospf-te
+configure += --enable-multipath=64
+configure += --enable-user=quagga
+configure += --enable-group=quagga
+configure += --enable-vty-group=quaggavty
+configure += --enable-configfile-mask=0640
+configure += --enable-logfile-mask=0640
+configure += --enable-rtadv
+configure += --enable-gcc-rdynamic
+configure += $(xable_snmp)
+configure += --with-libpam
+configure += CFLAGS="$(CFLAGS)"
+# configure += LDFLAGS="-Wl,-z,defs"
+
+configure: configure.ac Makefile.am
+ chmod +x debian/autogen.sh
+ debian/autogen.sh
+
+config.status: configure
+ dh_testdir
+ rm -f config.cache
+ $(configure)
+
+build: $(BUILD_STAMP)
+
+$(BUILD_STAMP): config.status
+ dh_testdir
+ $(MAKE)
+ touch $@
+
+clean: clean-patched
+
+# Clean everything up, including everything auto-generated
+# at build time that needs not to be kept around in the Debian diff
+clean-patched:
+ dh_testdir
+ dh_testroot
+ if test -f Makefile ; then $(MAKE) clean distclean ; fi
+ rm -f $(BUILD_STAMP)
+ rm -f config.status config.sub config.guess config.log
+ rm -f aclocal.m4 configure Makefile.in Makefile INSTALL
+ rm -f etc/default/vyatta
+ rm -rf config
+ dh_clean
+
+install: build
+ dh_testdir
+ dh_testroot
+ dh_clean -k
+ dh_installdirs
+
+ $(MAKE) DESTDIR=$(PKGDIR) install
+
+ install -D --mode=0644 debian/lintian $(PKGDIR)/usr/share/lintian/overrides/$(PACKAGE)
+
+ifeq ($(WANT_SNMP), 1)
+ install -D --mode=0644 zebra/GNOME-PRODUCT-ZEBRA-MIB $(PKGDIR)/usr/share/snmp/mibs/GNOME-PRODUCT-ZEBRA-MIB.txt
+endif
+
+
+# Build architecture-dependent files here.
+binary-arch: build install
+ dh_testdir
+ dh_testroot
+
+ dh_installdirs
+ dh_link
+
+ dh_installchangelogs ChangeLog
+ dh_installdebconf
+ dh_installdocs
+ dh_installexamples
+ dh_installinit
+ dh_installpam --name=quagga
+ dh_installlogrotate
+
+ dh_strip
+ dh_compress
+ dh_fixperms
+ dh_makeshlibs --noscripts
+ dh_installdeb
+# dh_shlibdeps: removed "-L quagga" for Woody backport compatibility.
+ dh_shlibdeps
+ if [ -f "../.VYATTA_DEV_BUILD" ]; then \
+ dh_gencontrol -- -v999.dev; \
+ else \
+ dh_gencontrol; \
+ fi
+ dh_md5sums
+ dh_builddeb
+
+binary: binary-arch
+.PHONY: build clean binary-arch binary install
+
diff --git a/debian/vyatta-quagga.dirs b/debian/vyatta-quagga.dirs
new file mode 100644
index 00000000..8f5c59a8
--- /dev/null
+++ b/debian/vyatta-quagga.dirs
@@ -0,0 +1,4 @@
+etc/logrotate.d/
+etc/vyatta/
+var/log/vyatta/
+var/run/vyatta/
diff --git a/debian/vyatta-quagga.files b/debian/vyatta-quagga.files
new file mode 100644
index 00000000..38b1ab33
--- /dev/null
+++ b/debian/vyatta-quagga.files
@@ -0,0 +1,14 @@
+etc/quagga/
+opt/vyatta/
+usr/lib/vyatta-quagga/
+usr/share/lintian/overrides/
+usr/share/man/man1/vtysh.1
+usr/share/man/man8
+usr/share/man/man8/bgpd.8
+usr/share/man/man8/ospf6d.8
+usr/share/man/man8/ospfd.8
+usr/share/man/man8/ripd.8
+usr/share/man/man8/ripngd.8
+usr/share/man/man8/zebra.8
+usr/share/man/man8/isisd.8
+usr/share/snmp/mibs/
diff --git a/debian/vyatta-quagga.init.d b/debian/vyatta-quagga.init.d
new file mode 100644
index 00000000..4fc01c33
--- /dev/null
+++ b/debian/vyatta-quagga.init.d
@@ -0,0 +1,141 @@
+#!/bin/bash
+#
+### BEGIN INIT INFO
+# Provides: vyatta-quagga
+# Required-Start: $local_fs $network $remote_fs $syslog
+# Required-Stop: $local_fs $network $remote_fs $syslog
+# Default-Start: 2 3 4 5
+# Default-Stop: 0 1 6
+# Short-Description: start and stop the Quagga routing suite
+# Description: Quagga is a routing suite for IP routing protocols like
+# BGP, OSPF, RIP and others. This script contols the main
+# daemon "quagga" as well as the individual protocol daemons.
+# FIXME! this init script will be deprecated as daemon start/stop
+# is integrated with vyatta-cfg-quagga
+### END INIT INFO
+#
+
+. /lib/lsb/init-functions
+
+declare progname=${0##*/}
+declare action=$1; shift
+
+pid_dir=/var/run/vyatta/quagga
+log_dir=/var/log/vyatta/quagga
+
+for dir in $pid_dir $log_dir ; do
+ if [ ! -d $dir ]; then
+ mkdir -p $dir
+ chown quagga:quagga $dir
+ chmod 755 $dir
+ fi
+done
+
+declare -a common_args=( -d -P 0 )
+declare -a zebra_args=( ${common_args[@]} -l -S -s 1048576 -i $pid_dir/zebra.pid )
+declare -a ripd_args=( ${common_args[@]} -i $pid_dir/ripd.pid )
+declare -a ripngd_args=( ${common_args[@]} -i $pid_dir/ripngd.pid )
+declare -a ospfd_args=( ${common_args[@]} -i $pid_dir/ospfd.pid )
+declare -a ospf6d_args=( ${common_args[@]} -i $pid_dir/ospf6d.pid )
+declare -a isisd_args=( ${common_args[@]} -i $pid_dir/isisd.pid )
+declare -a bgpd_args=( ${common_args[@]} -i $pid_dir/bgpd.pid )
+
+vyatta_quagga_start ()
+{
+ local -a daemons
+ if [ $# -gt 0 ] ; then
+ daemons=( $* )
+ else
+ daemons+=( zebra )
+ daemons+=( ripd )
+ daemons+=( ripngd )
+ daemons+=( ospfd )
+ daemons+=( ospf6d )
+# daemons+=( isisd )
+ daemons+=( bgpd )
+ fi
+
+ log_action_begin_msg "Starting Quagga"
+ for daemon in ${daemons[@]} ; do
+ [ "$daemon" != zebra ] && \
+ log_action_cont_msg "$daemon"
+ start-stop-daemon \
+ --start \
+ --quiet \
+ --oknodo \
+ --pidfile=$pid_dir/${daemon}.pid \
+ --chdir $log_dir \
+ --exec "/usr/sbin/vyatta-${daemon}" \
+ -- `eval echo "$""{${daemon}_args[@]}"` || \
+ ( log_action_end_msg 1 ; return 1 )
+ done
+ log_action_end_msg 0
+}
+
+vyatta_quagga_stop ()
+{
+ local -a daemons
+
+ if [ $# -gt 0 ] ; then
+ daemons=( $* )
+ else
+ daemons=( bgpd isisd ospf6d ospfd ripngd ripd zebra )
+ fi
+ log_action_begin_msg "Stopping Quagga"
+ for daemon in ${daemons[@]} ; do
+ pidfile=$pid_dir/${daemon}.pid
+ if [ -r $pidfile ] ; then
+ pid=`cat $pidfile 2>/dev/null`
+ else
+ pid=`ps -o pid= -C vyatta-${daemon}`
+ fi
+ if [ -n "$pid" ] ; then
+ [ "$daemon" != zebra ] && \
+ log_action_cont_msg "$daemon"
+ start-stop-daemon \
+ --stop \
+ --quiet \
+ --oknodo \
+ --exec /usr/sbin/vyatta-${daemon}
+#
+# Now we have to wait until $DAEMON has _really_ stopped.
+#
+ for (( tries=0; tries<30; tries++ )) ; do
+ if [[ -d /proc/$pid ]] ; then
+ sleep 3
+ kill -0 $pid 2>/dev/null
+ else
+ break
+ fi
+ done
+ rm -f $pidfile
+ fi
+ done
+ log_action_end_msg $?
+ if echo ${daemons[@]} | grep -q zebra ; then
+ log_begin_msg "Removing all Quagga Routes"
+ ip route flush proto zebra
+ log_end_msg $?
+ fi
+}
+
+case "$action" in
+ start)
+ vyatta_quagga_start $*
+ ;;
+
+ stop|0)
+ vyatta_quagga_stop $*
+ ;;
+
+ restart|force-reload)
+ vyatta_quagga_stop $*
+ sleep 2
+ vyatta_quagga_start $*
+ ;;
+
+ *)
+ echo "Usage: $progname {start|stop|restart|force-reload} [daemon...]"
+ exit 1
+ ;;
+esac
diff --git a/debian/vyatta-quagga.logrotate b/debian/vyatta-quagga.logrotate
new file mode 100644
index 00000000..020eb83e
--- /dev/null
+++ b/debian/vyatta-quagga.logrotate
@@ -0,0 +1,17 @@
+/var/log/vyatta/quagga/*.log {
+ daily
+ rotate 5
+ sharedscripts
+ missingok
+ compress
+ create 640 quagga quaggavty
+
+ postrotate
+ for daemon in zebra bgpd ripd ospfd ripngd ospf6d isisd; do
+ if [ -e /var/run/vyatta/quagga/$daemon.pid ] ; then
+ kill -USR1 `cat /var/run/vyatta/quagga/$daemon.pid`
+ fi
+
+ done
+ endscript
+}
diff --git a/debian/vyatta-quagga.manpages b/debian/vyatta-quagga.manpages
new file mode 100644
index 00000000..24556b2d
--- /dev/null
+++ b/debian/vyatta-quagga.manpages
@@ -0,0 +1,8 @@
+doc/bgpd.8
+doc/ospf6d.8
+doc/ospfd.8
+doc/ripd.8
+doc/ripngd.8
+doc/vtysh.1
+doc/zebra.8
+doc/isisd.8
diff --git a/debian/vyatta-quagga.postinst b/debian/vyatta-quagga.postinst
new file mode 100644
index 00000000..366f8299
--- /dev/null
+++ b/debian/vyatta-quagga.postinst
@@ -0,0 +1,32 @@
+#!/bin/bash -e
+
+ETC_DIR=/etc/vyatta/quagga
+
+if [ -n "$DEBIAN_SCRIPT_DEBUG" ]; then set -v -x; DEBIAN_SCRIPT_TRACE=1; fi
+${DEBIAN_SCRIPT_TRACE:+ echo "#42#DEBUG# RUNNING $0 $*"}
+
+# if not written already, write the 'smux peer' values into the config files
+# of respective routing daemons to communicate with snmp
+
+if ! grep -q smux $ETC_DIR/ospfd.conf; then
+ echo "smux peer .1.3.6.1.4.1.3317.1.2.5" >> $ETC_DIR/ospfd.conf
+fi
+if ! grep -q smux $ETC_DIR/bgpd.conf; then
+ echo "smux peer .1.3.6.1.4.1.3317.1.2.2" >> $ETC_DIR/bgpd.conf
+fi
+if ! grep -q smux $ETC_DIR/ripd.conf; then
+ echo "smux peer .1.3.6.1.4.1.3317.1.2.3" >> $ETC_DIR/ripd.conf
+fi
+
+# This is most likely due to the answer "no" to the "really stop the server"
+# question in the prerm script.
+if [ "$1" = "abort-upgrade" ]; then
+ exit 0
+fi
+
+. /usr/share/debconf/confmodule
+
+db_stop
+
+#DEBHELPER#
+
diff --git a/debian/vyatta-quagga.postrm b/debian/vyatta-quagga.postrm
new file mode 100644
index 00000000..dac97986
--- /dev/null
+++ b/debian/vyatta-quagga.postrm
@@ -0,0 +1,19 @@
+#!/bin/bash
+
+if [ -n "$DEBIAN_SCRIPT_DEBUG" ]; then set -v -x; DEBIAN_SCRIPT_TRACE=1; fi
+${DEBIAN_SCRIPT_TRACE:+ echo "#42#DEBUG# RUNNING $0 $*"}
+# set -e not because of userdel
+# set -u not because of debhelper
+
+if [ "$1" = "purge" ]; then
+ for daemon in zebra bgpd ripd ospfd ripngd ospf6d isisd; do
+ rm -f /var/run/vyatta/${daemon}.pid
+ rm -f /var/log/vyatta/${daemon}*
+ done
+ [ -z "`ls /var/run/vyatta 2>/dev/null`" ] && rmdir /var/run/vyatta
+ [ -z "`ls /var/log/vyatta 2>/dev/null`" ] && rmdir /var/log/vyatta
+ rm -f /etc/vyatta/Quagga.conf /etc/vyatta/vtysh.conf
+ userdel quagga >/dev/null 2>&1
+fi
+
+#DEBHELPER#
diff --git a/debian/vyatta-quagga.preinst b/debian/vyatta-quagga.preinst
new file mode 100644
index 00000000..29c18b2b
--- /dev/null
+++ b/debian/vyatta-quagga.preinst
@@ -0,0 +1,89 @@
+#!/bin/bash
+
+if [ -n "$DEBIAN_SCRIPT_DEBUG" ]; then set -v -x; DEBIAN_SCRIPT_TRACE=1; fi
+${DEBIAN_SCRIPT_TRACE:+ echo "#42#DEBUG# RUNNING $0 $*"}
+set -e
+set -u
+
+LOG_DIR=/var/log/vyatta/quagga
+LOG_PDIR=${LOG_DIR%/*}
+RUN_DIR=/var/run/vyatta/quagga
+RUN_PDIR=${RUN_DIR%/*}
+ETC_DIR=/etc/vyatta/quagga
+ETC_PDIR=${ETC_DIR%/*}
+
+# creating quaggavty group if it isn't already there
+if ! getent group quaggavty >/dev/null; then
+ addgroup --system quaggavty >/dev/null
+fi
+
+# creating quagga group if it isn't already there
+if ! getent group quagga >/dev/null; then
+ addgroup --system quagga >/dev/null
+fi
+
+# creating quagga user if he isn't already there
+if ! getent passwd quagga >/dev/null; then
+ adduser \
+ --system \
+ --ingroup quagga \
+ --home /var/run/vyatta/ \
+ --gecos "Vyatta Quagga routing suite" \
+ --shell /bin/false \
+ quagga >/dev/null
+fi
+
+# Do not change permissions when upgrading as it would violate policy.
+if [ "$1" = "install" ]; then
+
+ # Logfiles are group readable in case users were put into the quagga group.
+ mkdir -p $LOG_PDIR
+ chmod 0755 $LOG_PDIR
+ mkdir -p $LOG_DIR
+ chmod 0775 $LOG_DIR
+ chown quagga:quagga $LOG_DIR
+
+ # Strict permissions for the sockets.
+ mkdir -p $RUN_PDIR
+ chmod 0755 $RUN_PDIR
+ mkdir -p $RUN_DIR
+ chmod 0755 $RUN_DIR
+ chown quagga:quagga $RUN_DIR
+
+ # create empty config files
+ mkdir -p $ETC_PDIR
+ chmod 0755 $ETC_PDIR
+ mkdir -p $ETC_DIR
+ chmod 0775 $ETC_DIR
+ chown quagga:quaggavty $ETC_DIR
+ for daemon in zebra ripd ripngd ospfd ospf6d isisd bgpd ; do
+ if [ ! -e $ETC_DIR/${daemon}.conf ] ; then
+ touch $ETC_DIR/${daemon}.conf
+ chown quagga:quaggavty $ETC_DIR/${daemon}.conf
+ chmod 0640 $ETC_DIR/${daemon}.conf
+ cat <<-EOF > $ETC_DIR/${daemon}.conf
+ log syslog
+ log facility local7
+ EOF
+ fi
+ done
+
+
+ echo "smux peer .1.3.6.1.4.1.3317.1.2.5" >> $ETC_DIR/ospfd.conf
+ echo "smux peer .1.3.6.1.4.1.3317.1.2.2" >> $ETC_DIR/bgpd.conf
+ echo "smux peer .1.3.6.1.4.1.3317.1.2.3" >> $ETC_DIR/ripd.conf
+
+ if [ ! -e $ETC_DIR/vtysh.conf ] ; then
+ touch $ETC_DIR/vtysh.conf
+ chown quagga:quaggavty $ETC_DIR/vtysh.conf
+ chmod 0640 $ETC_DIR/vtysh.conf
+ cat <<-EOF >> $ETC_DIR/vtysh.conf
+ username root nopassword
+ EOF
+ fi
+
+ # Disable debian/ubuntu package init
+ update-rc.d -f quagga remove
+fi
+
+#DEBHELPER#
diff --git a/debian/vyatta-quagga.prerm b/debian/vyatta-quagga.prerm
new file mode 100644
index 00000000..69792d27
--- /dev/null
+++ b/debian/vyatta-quagga.prerm
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+case "$1" in upgrade) exit 0;; esac
diff --git a/debian/vyatta-quagga.quagga.pam b/debian/vyatta-quagga.quagga.pam
new file mode 100644
index 00000000..6dd5d474
--- /dev/null
+++ b/debian/vyatta-quagga.quagga.pam
@@ -0,0 +1,5 @@
+# This allows root to do vtysh without passwords
+auth sufficient pam_rootok.so
+
+# Only users in group quaggavty can run vtysh
+auth required pam_wheel.so trust group=quaggavty