summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /net-misc/quagga
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip
proj/gentoo: Initial commit
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'net-misc/quagga')
-rw-r--r--net-misc/quagga/Manifest3
-rw-r--r--net-misc/quagga/files/quagga-0.99.22.4-ipctl-forwarding.patch22
-rw-r--r--net-misc/quagga/files/quagga-services.init.344
-rw-r--r--net-misc/quagga/files/quagga.pam26
-rw-r--r--net-misc/quagga/files/systemd/babeld.service16
-rw-r--r--net-misc/quagga/files/systemd/bgpd.service16
-rw-r--r--net-misc/quagga/files/systemd/isisd.service16
-rw-r--r--net-misc/quagga/files/systemd/ospf6d.service16
-rw-r--r--net-misc/quagga/files/systemd/ospfd.service16
-rw-r--r--net-misc/quagga/files/systemd/pimd.service17
-rw-r--r--net-misc/quagga/files/systemd/quagga.conf1
-rw-r--r--net-misc/quagga/files/systemd/ripd.service16
-rw-r--r--net-misc/quagga/files/systemd/ripngd.service16
-rw-r--r--net-misc/quagga/files/systemd/zebra.service16
-rw-r--r--net-misc/quagga/metadata.xml44
-rw-r--r--net-misc/quagga/quagga-0.99.23.1.ebuild116
-rw-r--r--net-misc/quagga/quagga-0.99.24.1.ebuild122
17 files changed, 523 insertions, 0 deletions
diff --git a/net-misc/quagga/Manifest b/net-misc/quagga/Manifest
new file mode 100644
index 000000000000..72daf29431ba
--- /dev/null
+++ b/net-misc/quagga/Manifest
@@ -0,0 +1,3 @@
+DIST ht-20040304-classless-bgp.patch 1581 SHA256 39993890f9e31d662ed0564c732fb22392a901beb45b64261ffeadd9edf27887 SHA512 3df102d8ab88aaee1f109a2310602d6f734f2268252e5e42df752df7db7abeac526e969289481c4abfe905dcd41c35dee65196c48ac320fe9d083305451476e8 WHIRLPOOL cef99d64d52ab8c28bd672fb93dfbd8d716a31c76a5403496a6d104a5ff39531d6085134124d41fe4ff7adf895fa001cbe77b6e42846d849d6c108c81583d04e
+DIST quagga-0.99.23.1.tar.xz 1682104 SHA256 202e8b7fbec810f28a84e3fbb6aafdaf08a3b51527c258807abc8a74ed617eb8 SHA512 7a222d4a5aa41deeb233f2e9ce922e5c29787c2f74c1b99177089e3183b69d3c0e4db5846676485a1990b728e007e687070ba4cecab67aa61f8be6c0851581cc WHIRLPOOL 90e37fcb1b87ec1ea618d42c19a1350f84ffe87f2cd4e6e4629a9e7edef1ba792a8f287b3367b31eb6f2d387e6c287da47a69c5cacf0a76be8099c1f79878888
+DIST quagga-0.99.24.1.tar.xz 1779120 SHA256 6fd6baadb136a801c29c1dd72d0fe69da9f19ae498e87bff7057778361e43b14 SHA512 71c340ce0f4e52c69892d8fed82d30956161b09b029fb0a82ba774664aa2303b493068664ea057870bec3c7c2a1ffea0a68fba0c400d6868efef691d7b055d2a WHIRLPOOL e7b4fd86561513b08244a5217821cc7d911b077eccd4c798484a4b13b4acabba133c664a463a7b2261e6e5e1bf3e2d37de9d2b6005a18e004e526f741a22bd9a
diff --git a/net-misc/quagga/files/quagga-0.99.22.4-ipctl-forwarding.patch b/net-misc/quagga/files/quagga-0.99.22.4-ipctl-forwarding.patch
new file mode 100644
index 000000000000..f6b726b591f7
--- /dev/null
+++ b/net-misc/quagga/files/quagga-0.99.22.4-ipctl-forwarding.patch
@@ -0,0 +1,22 @@
+Fix for missing definitions on some Hardened configurations
+Gentoo bug: https://bugs.gentoo.org/show_bug.cgi?id=437292
+
+diff -Naur quagga-0.99.16.orig/zebra/ipforward_sysctl.c quagga-0.99.16/zebra/ipforward_sysctl.c
+--- quagga-0.99.16.orig/zebra/ipforward_sysctl.c 2010-03-11 12:11:32.000000000 -0500
++++ quagga-0.99.16/zebra/ipforward_sysctl.c 2010-03-11 12:11:39.000000000 -0500
+@@ -31,6 +31,15 @@
+
+ #define MIB_SIZ 4
+
++/* Fix for recent (2.6.14) kernel headers */
++#ifndef IPCTL_FORWARDING
++ #define IPCTL_FORWARDING NET_IPV4_FORWARD
++#endif
++
++#ifndef IP6CTL_FORWARDING
++ #define IP6CTL_FORWARDING NET_IPV6_FORWARDING
++#endif
++
+ extern struct zebra_privs_t zserv_privs;
+
+ /* IPv4 forwarding control MIB. */
diff --git a/net-misc/quagga/files/quagga-services.init.3 b/net-misc/quagga/files/quagga-services.init.3
new file mode 100644
index 000000000000..88255a5e99f1
--- /dev/null
+++ b/net-misc/quagga/files/quagga-services.init.3
@@ -0,0 +1,44 @@
+#!/sbin/runscript
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+: ${CFGFILE:=/etc/quagga/${SVCNAME}.conf}
+
+pidfile=/run/quagga/${SVCNAME}.pid
+
+command=/usr/sbin/${SVCNAME}
+command_args="-d -f ${CFGFILE} ${EXTRA_OPTS} --pid_file ${pidfile}"
+
+get_service_config() {
+ [ -e "$CFGFILE" ] || return
+
+ awk '$1 == "'$1'" { s=$2 } END { print s }' "$CFGFILE"
+}
+
+depend() {
+ config "$CFGFILE"
+
+ [ ${SVCNAME} = "zebra" ] && need net || need zebra
+
+ [ "$(get_service_config log)" = "syslog" ] && \
+ use logger
+}
+
+start_pre() {
+ if [ ! -e "${CFGFILE}" ] ; then
+ eerror "Before starting ${SVCNAME} you have to configure it, by creating"
+ eerror "a ${CFGFILE} file."
+ eerror ""
+ eerror "A sample file has been installed in `echo /usr/share/doc/quagga-*/samples/${SVCNAME}.conf.sample*`"
+ return 1
+ fi
+
+ checkpath -d -m 0750 -o quagga:quagga /run/quagga
+
+ if [ ${SVCNAME} = "zebra" ]; then
+ ebegin "Cleaning up stale zebra routes..."
+ ip route flush proto zebra
+ eend $?
+ fi
+}
diff --git a/net-misc/quagga/files/quagga.pam b/net-misc/quagga/files/quagga.pam
new file mode 100644
index 000000000000..9a91ad852fbd
--- /dev/null
+++ b/net-misc/quagga/files/quagga.pam
@@ -0,0 +1,26 @@
+#%PAM-1.0
+#
+
+##### if running quagga as root:
+# Only allow root (and possibly wheel) to use this because enable access
+# is unrestricted.
+auth sufficient pam_rootok.so
+
+# Uncomment the following line to implicitly trust users in the "wheel" group.
+#auth sufficient pam_wheel.so trust use_uid
+# Uncomment the following line to require a user to be in the "wheel" group.
+#auth required pam_wheel.so use_uid
+###########################################################
+
+# If using quagga privileges and with a seperate group for vty access, then
+# access can be controlled via the vty access group, and pam can simply
+# check for valid user/password, eg:
+#
+# only allow local users.
+#auth required pam_securetty.so
+#auth include system-auth
+#auth required pam_nologin.so
+#account include system-auth
+#password include system-auth
+#session include system-auth
+#session optional pam_console.so
diff --git a/net-misc/quagga/files/systemd/babeld.service b/net-misc/quagga/files/systemd/babeld.service
new file mode 100644
index 000000000000..aa107afcacc1
--- /dev/null
+++ b/net-misc/quagga/files/systemd/babeld.service
@@ -0,0 +1,16 @@
+[Unit]
+Description=Babel routing daemon
+Documentation=man:zebra(8)
+BindTo=zebra.service
+After=network.target zebra.service
+ConditionPathExists=/etc/quagga/babeld.conf
+
+[Service]
+Type=forking
+PIDFile=/run/quagga/babeld.pid
+ExecStart=/usr/sbin/babeld -d
+ExecReload=/bin/kill -HUP $MAINPID
+Restart=on-abort
+
+[Install]
+WantedBy=multi-user.target
diff --git a/net-misc/quagga/files/systemd/bgpd.service b/net-misc/quagga/files/systemd/bgpd.service
new file mode 100644
index 000000000000..aae58be2c95e
--- /dev/null
+++ b/net-misc/quagga/files/systemd/bgpd.service
@@ -0,0 +1,16 @@
+[Unit]
+Description=BGP routing daemon
+Documentation=man:bgpd(8) man:zebra(8)
+BindTo=zebra.service
+After=network.target zebra.service
+ConditionPathExists=/etc/quagga/bgpd.conf
+
+[Service]
+Type=forking
+PIDFile=/run/quagga/bgpd.pid
+ExecStart=/usr/sbin/bgpd -d
+ExecReload=/bin/kill -HUP $MAINPID
+Restart=on-abort
+
+[Install]
+WantedBy=multi-user.target
diff --git a/net-misc/quagga/files/systemd/isisd.service b/net-misc/quagga/files/systemd/isisd.service
new file mode 100644
index 000000000000..fa5a716e8331
--- /dev/null
+++ b/net-misc/quagga/files/systemd/isisd.service
@@ -0,0 +1,16 @@
+[Unit]
+Description=IS-IS routing daemon
+Documentation=man:isis(8) man:zebra(8)
+BindTo=zebra.service
+After=network.target zebra.service
+ConditionPathExists=/etc/quagga/isisd.conf
+
+[Service]
+Type=forking
+PIDFile=/run/quagga/isisd.pid
+ExecStart=/usr/sbin/isisd -d
+ExecReload=/bin/kill -HUP $MAINPID
+Restart=on-abort
+
+[Install]
+WantedBy=multi-user.target
diff --git a/net-misc/quagga/files/systemd/ospf6d.service b/net-misc/quagga/files/systemd/ospf6d.service
new file mode 100644
index 000000000000..eacb89159406
--- /dev/null
+++ b/net-misc/quagga/files/systemd/ospf6d.service
@@ -0,0 +1,16 @@
+[Unit]
+Description=OSPF routing daemon for IPv6
+Documentation=man:ospfd(8) man:zebra(8)
+BindTo=zebra.service
+After=network.target zebra.service
+ConditionPathExists=/etc/quagga/ospf6d.conf
+
+[Service]
+Type=forking
+PIDFile=/run/quagga/ospf6d.pid
+ExecStart=/usr/sbin/ospf6d -d
+ExecReload=/bin/kill -HUP $MAINPID
+Restart=on-abort
+
+[Install]
+WantedBy=multi-user.target
diff --git a/net-misc/quagga/files/systemd/ospfd.service b/net-misc/quagga/files/systemd/ospfd.service
new file mode 100644
index 000000000000..57a946f8e0c1
--- /dev/null
+++ b/net-misc/quagga/files/systemd/ospfd.service
@@ -0,0 +1,16 @@
+[Unit]
+Description=OSPF routing daemon
+Documentation=man:ospfd(8) man:zebra(8)
+BindTo=zebra.service
+After=network.target zebra.service
+ConditionPathExists=/etc/quagga/ospfd.conf
+
+[Service]
+Type=forking
+PIDFile=/run/quagga/ospfd.pid
+ExecStart=/usr/sbin/ospfd -d
+ExecReload=/bin/kill -HUP $MAINPID
+Restart=on-abort
+
+[Install]
+WantedBy=multi-user.target
diff --git a/net-misc/quagga/files/systemd/pimd.service b/net-misc/quagga/files/systemd/pimd.service
new file mode 100644
index 000000000000..65ef1bf2dd42
--- /dev/null
+++ b/net-misc/quagga/files/systemd/pimd.service
@@ -0,0 +1,17 @@
+[Unit]
+Description=PIM-SSM routing daemon
+Documentation=man:zebra(8)
+BindTo=zebra.service
+After=network.target zebra.service
+ConditionPathExists=/etc/quagga/pimd.conf
+
+[Service]
+Type=forking
+PIDFile=/run/quagga/pimd.pid
+ExecStart=/usr/sbin/pimd -d
+ExecReload=/bin/kill -HUP $MAINPID
+SuccessExitStatus=1
+Restart=on-abort
+
+[Install]
+WantedBy=multi-user.target
diff --git a/net-misc/quagga/files/systemd/quagga.conf b/net-misc/quagga/files/systemd/quagga.conf
new file mode 100644
index 000000000000..296083753e0a
--- /dev/null
+++ b/net-misc/quagga/files/systemd/quagga.conf
@@ -0,0 +1 @@
+d /run/quagga 0750 quagga quagga
diff --git a/net-misc/quagga/files/systemd/ripd.service b/net-misc/quagga/files/systemd/ripd.service
new file mode 100644
index 000000000000..bf7c5ac6fe20
--- /dev/null
+++ b/net-misc/quagga/files/systemd/ripd.service
@@ -0,0 +1,16 @@
+[Unit]
+Description=RIP routing daemon
+Documentation=man:ripd(8) man:zebra(8)
+BindTo=zebra.service
+After=network.target zebra.service
+ConditionPathExists=/etc/quagga/ripd.conf
+
+[Service]
+Type=forking
+PIDFile=/run/quagga/ripd.pid
+ExecStart=/usr/sbin/ripd -d
+ExecReload=/bin/kill -HUP $MAINPID
+Restart=on-abort
+
+[Install]
+WantedBy=multi-user.target
diff --git a/net-misc/quagga/files/systemd/ripngd.service b/net-misc/quagga/files/systemd/ripngd.service
new file mode 100644
index 000000000000..465263ba33ff
--- /dev/null
+++ b/net-misc/quagga/files/systemd/ripngd.service
@@ -0,0 +1,16 @@
+[Unit]
+Description=RIP routing daemon for IPv6
+Documentation=man:ripngd(8) man:zebra(8)
+BindTo=zebra.service
+After=network.target zebra.service
+ConditionPathExists=/etc/quagga/ripngd.conf
+
+[Service]
+Type=forking
+PIDFile=/run/quagga/ripngd.pid
+ExecStart=/usr/sbin/ripngd -d
+ExecReload=/bin/kill -HUP $MAINPID
+Restart=on-abort
+
+[Install]
+WantedBy=multi-user.target
diff --git a/net-misc/quagga/files/systemd/zebra.service b/net-misc/quagga/files/systemd/zebra.service
new file mode 100644
index 000000000000..d2374411b459
--- /dev/null
+++ b/net-misc/quagga/files/systemd/zebra.service
@@ -0,0 +1,16 @@
+[Unit]
+Description=GNU Zebra routing manager
+Documentation=man:zebra(8)
+After=network.target
+ConditionPathExists=/etc/quagga/zebra.conf
+
+[Service]
+Type=forking
+PIDFile=/run/quagga/zebra.pid
+ExecStartPre=/bin/ip route flush proto zebra
+ExecStart=/usr/sbin/zebra -d
+ExecReload=/bin/kill -HUP $MAINPID
+Restart=on-abort
+
+[Install]
+WantedBy=multi-user.target
diff --git a/net-misc/quagga/metadata.xml b/net-misc/quagga/metadata.xml
new file mode 100644
index 000000000000..8a4fab8dcb40
--- /dev/null
+++ b/net-misc/quagga/metadata.xml
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>pinkbyte@gentoo.org</email>
+ <name>Sergey Popov</name>
+ </maintainer>
+ <longdescription>
+ Quagga is a modern fork of Zebra. Quagga is a routing software package that provides TCP/IP
+ based routing services with routing protocols support such as RIPv1, RIPv2, RIPng, OSPFv2,
+ OSPFv3, BGP-4, and BGP-4+. Quagga also supports special BGP Route Reflector and Route Server
+ behavior. In addition to traditional IPv4 routing protocols, Quagga also supports IPv6 routing
+ protocols. With SNMP daemon which supports SMUX protocol, Quagga provides routing protocol
+ MIBs. Furthermore Quagga supports OSPFAPI, a API interface to the OSPF LSDB. It supports
+ inspection as well as injection of normal and opaque OSPF LSAs. Applications like SRRD - The
+ Service Rounting Redundancy Daemon - can make use of OSPFAPI to inject opaque data into the OSPF
+ routing domain. SRRD, for example, implements a cluster server by using the OSPFAPI to flood
+ service state information into the routing domain
+ </longdescription>
+ <use>
+ <flag name="bgpclassless">
+ Apply unofficial patch to enable classless prefixes for BGP. Patch and information to be found
+ at http://hasso.linux.ee/doku.php/english:network:quagga
+ </flag>
+ <flag name="multipath">
+ Enable multipath routes support for any number of routes
+ </flag>
+ <flag name="ospfapi">
+ Enable OSPFAPI support for client applications accessing the OSPF link state database
+ </flag>
+ <flag name="tcp-zebra">
+ Enable TCP zserv interface on port 2600 for Zebra/protocol-daemon communication. Unix domain
+ sockets are chosen otherwise
+ </flag>
+ <flag name="readline">
+ Enable support for <pkg>sys-libs/readline</pkg> to provide the Quagga Virtual Terminal
+ Interface Shell (vtysh)
+ </flag>
+ <flag name="pam">
+ Add support for PAM (via <pkg>sys-libs/pam</pkg>) to the Quagga Virtual Terminal Interface
+ Shell (vtysh); if the readline USE flag is disabled, this flag is ignored
+ </flag>
+ </use>
+</pkgmetadata>
diff --git a/net-misc/quagga/quagga-0.99.23.1.ebuild b/net-misc/quagga/quagga-0.99.23.1.ebuild
new file mode 100644
index 000000000000..278ca25d99bb
--- /dev/null
+++ b/net-misc/quagga/quagga-0.99.23.1.ebuild
@@ -0,0 +1,116 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+CLASSLESS_BGP_PATCH=ht-20040304-classless-bgp.patch
+
+AUTOTOOLS_AUTORECONF=1
+inherit autotools-utils eutils flag-o-matic multilib pam readme.gentoo user
+
+DESCRIPTION="A free routing daemon replacing Zebra supporting RIP, OSPF and BGP"
+HOMEPAGE="http://quagga.net/"
+SRC_URI="mirror://nongnu/${PN}/${P}.tar.xz
+ bgpclassless? ( http://hasso.linux.ee/stuff/patches/quagga/${CLASSLESS_BGP_PATCH} )"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ppc ~s390 sparc x86"
+IUSE="bgpclassless caps doc elibc_glibc ipv6 multipath ospfapi pam +readline snmp tcp-zebra"
+
+COMMON_DEPEND="
+ caps? ( sys-libs/libcap )
+ snmp? ( net-analyzer/net-snmp )
+ readline? (
+ sys-libs/readline
+ pam? ( sys-libs/pam )
+ )
+ !elibc_glibc? ( dev-libs/libpcre )"
+DEPEND="${COMMON_DEPEND}
+ app-arch/xz-utils
+ sys-apps/gawk
+ sys-devel/libtool:2"
+RDEPEND="${COMMON_DEPEND}
+ sys-apps/iproute2"
+
+PATCHES=( "${FILESDIR}/${PN}-0.99.22.4-ipctl-forwarding.patch" )
+
+DISABLE_AUTOFORMATTING=1
+DOC_CONTENTS="Sample configuration files can be found in /usr/share/doc/${PF}/samples
+You have to create config files in /etc/quagga before
+starting one of the daemons.
+
+You can pass additional options to the daemon by setting the EXTRA_OPTS
+variable in their respective file in /etc/conf.d"
+
+pkg_setup() {
+ enewgroup quagga
+ enewuser quagga -1 -1 /var/empty quagga
+}
+
+src_prepare() {
+ # Classless prefixes for BGP
+ # http://hasso.linux.ee/doku.php/english:network:quagga
+ use bgpclassless && epatch "${DISTDIR}/${CLASSLESS_BGP_PATCH}"
+
+ autotools-utils_src_prepare
+}
+
+src_configure() {
+ append-flags -fno-strict-aliasing
+
+ # do not build PDF docs
+ export ac_cv_prog_PDFLATEX=no
+ export ac_cv_prog_LATEXMK=no
+
+ local myeconfargs=(
+ --enable-exampledir=/usr/share/doc/${PF}/samples
+ --enable-isisd --enable-isis-topology
+ --enable-user=quagga
+ --enable-group=quagga
+ --enable-vty-group=quagga
+ --with-cflags="${CFLAGS}"
+ --with-pkg-extra-version="-gentoo"
+ --sysconfdir=/etc/quagga
+ --localstatedir=/run/quagga
+ --disable-static
+ --disable-pie
+ $(use_enable caps capabilities)
+ $(usex snmp '--enable-snmp' '' '' '')
+ $(use_enable !elibc_glibc pcreposix)
+ $(use_enable tcp-zebra)
+ $(use_enable doc)
+ $(usex multipath $(use_enable multipath) '' '=0' '')
+ $(usex ospfapi '--enable-opaque-lsa --enable-ospf-te --enable-ospfclient' '' '' '')
+ $(use_enable readline vtysh)
+ $(use_with pam libpam)
+ $(use_enable ipv6)
+ $(use_enable ipv6 babeld) # babeld does not build properly with USE="-ipv6", bug #446289
+ $(use_enable ipv6 ripngd)
+ $(use_enable ipv6 ospf6d)
+ $(use_enable ipv6 rtadv)
+ )
+ autotools-utils_src_configure
+}
+
+src_install() {
+ autotools-utils_src_install
+ readme.gentoo_create_doc
+
+ keepdir /etc/quagga
+ fowners root:quagga /etc/quagga
+ fperms 0770 /etc/quagga
+
+ # install zebra as a file, symlink the rest
+ newinitd "${FILESDIR}"/quagga-services.init.3 zebra
+
+ for service in isisd ripd ospfd bgpd $(use ipv6 && echo babeld ospf6d ripngd); do
+ dosym zebra /etc/init.d/${service}
+ done
+
+ use readline && use pam && newpamd "${FILESDIR}/quagga.pam" quagga
+
+ insinto /etc/logrotate.d
+ newins redhat/quagga.logrotate quagga
+}
diff --git a/net-misc/quagga/quagga-0.99.24.1.ebuild b/net-misc/quagga/quagga-0.99.24.1.ebuild
new file mode 100644
index 000000000000..57e23b3d4c2a
--- /dev/null
+++ b/net-misc/quagga/quagga-0.99.24.1.ebuild
@@ -0,0 +1,122 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+CLASSLESS_BGP_PATCH=ht-20040304-classless-bgp.patch
+
+AUTOTOOLS_AUTORECONF=1
+inherit autotools-utils eutils flag-o-matic multilib pam readme.gentoo systemd user
+
+DESCRIPTION="A free routing daemon replacing Zebra supporting RIP, OSPF and BGP"
+HOMEPAGE="http://quagga.net/"
+SRC_URI="mirror://nongnu/${PN}/${P}.tar.xz
+ bgpclassless? ( http://hasso.linux.ee/stuff/patches/quagga/${CLASSLESS_BGP_PATCH} )"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ppc ~s390 ~sparc ~x86"
+IUSE="bgpclassless caps doc elibc_glibc ipv6 multipath ospfapi pam +readline snmp tcp-zebra"
+
+COMMON_DEPEND="
+ caps? ( sys-libs/libcap )
+ snmp? ( net-analyzer/net-snmp )
+ readline? (
+ sys-libs/readline:0
+ pam? ( sys-libs/pam )
+ )
+ !elibc_glibc? ( dev-libs/libpcre )"
+DEPEND="${COMMON_DEPEND}
+ app-arch/xz-utils
+ sys-apps/gawk
+ sys-devel/libtool:2"
+RDEPEND="${COMMON_DEPEND}
+ sys-apps/iproute2"
+
+PATCHES=( "${FILESDIR}/${PN}-0.99.22.4-ipctl-forwarding.patch" )
+
+DISABLE_AUTOFORMATTING=1
+DOC_CONTENTS="Sample configuration files can be found in /usr/share/doc/${PF}/samples
+You have to create config files in /etc/quagga before
+starting one of the daemons.
+
+You can pass additional options to the daemon by setting the EXTRA_OPTS
+variable in their respective file in /etc/conf.d"
+
+pkg_setup() {
+ enewgroup quagga
+ enewuser quagga -1 -1 /var/empty quagga
+}
+
+src_prepare() {
+ # Classless prefixes for BGP
+ # http://hasso.linux.ee/doku.php/english:network:quagga
+ use bgpclassless && epatch "${DISTDIR}/${CLASSLESS_BGP_PATCH}"
+
+ autotools-utils_src_prepare
+}
+
+src_configure() {
+ append-flags -fno-strict-aliasing
+
+ # do not build PDF docs
+ export ac_cv_prog_PDFLATEX=no
+ export ac_cv_prog_LATEXMK=no
+
+ local myeconfargs=(
+ --enable-exampledir=/usr/share/doc/${PF}/samples
+ --enable-irdp
+ --enable-isisd --enable-isis-topology
+ --enable-pimd
+ --enable-user=quagga
+ --enable-group=quagga
+ --enable-vty-group=quagga
+ --with-cflags="${CFLAGS}"
+ --with-pkg-extra-version="-gentoo"
+ --sysconfdir=/etc/quagga
+ --localstatedir=/run/quagga
+ --disable-static
+ --disable-pie
+ $(use_enable caps capabilities)
+ $(usex snmp '--enable-snmp' '' '' '')
+ $(use_enable !elibc_glibc pcreposix)
+ $(use_enable tcp-zebra)
+ $(use_enable doc)
+ $(usex multipath $(use_enable multipath) '' '=0' '')
+ $(usex ospfapi '--enable-opaque-lsa --enable-ospf-te --enable-ospfclient' '' '' '')
+ $(use_enable readline vtysh)
+ $(use_with pam libpam)
+ $(use_enable ipv6 babeld) # babeld does not build properly with USE="-ipv6", bug #446289
+ $(use_enable ipv6 ripngd)
+ $(use_enable ipv6 ospf6d)
+ $(use_enable ipv6 rtadv)
+ )
+ autotools-utils_src_configure
+}
+
+src_install() {
+ autotools-utils_src_install
+ readme.gentoo_create_doc
+
+ keepdir /etc/quagga
+ fowners root:quagga /etc/quagga
+ fperms 0770 /etc/quagga
+
+ # Install systemd-related stuff, bug #553136
+ systemd_dotmpfilesd "${FILESDIR}/systemd/quagga.conf"
+ systemd_dounit "${FILESDIR}/systemd/zebra.service"
+
+ # install zebra as a file, symlink the rest
+ newinitd "${FILESDIR}"/quagga-services.init.3 zebra
+
+ for service in bgpd isisd ospfd pimd ripd $(use ipv6 && echo babeld ospf6d ripngd); do
+ dosym zebra /etc/init.d/${service}
+ systemd_dounit "${FILESDIR}/systemd/${service}.service"
+ done
+
+ use readline && use pam && newpamd "${FILESDIR}/quagga.pam" quagga
+
+ insinto /etc/logrotate.d
+ newins redhat/quagga.logrotate quagga
+}