diff options
author | Diego Elio Pettenò <flameeyes@gentoo.org> | 2010-09-05 17:09:37 +0000 |
---|---|---|
committer | Diego Elio Pettenò <flameeyes@gentoo.org> | 2010-09-05 17:09:37 +0000 |
commit | 9f76fc356ceee9330010bf23f41fe4858f106eea (patch) | |
tree | 72823b4e907745e08010ff55faa266124b2e1247 /net-misc | |
parent | alpha/ia64 stable wrt #333865 (diff) | |
download | gentoo-2-9f76fc356ceee9330010bf23f41fe4858f106eea.tar.gz gentoo-2-9f76fc356ceee9330010bf23f41fe4858f106eea.tar.bz2 gentoo-2-9f76fc356ceee9330010bf23f41fe4858f106eea.zip |
Version bump (bug #311865), remove old non-stable ebuilds as they are vulnerable (bug #334303). Take co-maintainership of the package; change the libcap patch (sent upstream) and avoid using a tarball for the patches for now; the other two feature, optional patches are fetched from their respective websites if the flags are enabled; rewrite init scripts almost from scratch so that they recreate their state directory if missing, and make all the services, beside zebra, share the same init script file, drop --quiet, make sure that s-s-d knows about the pidfile as well; install sample files in the documentation directory and not /etc; only use libpcre if not using glibc (could actually be unneeded on other systems as well); don't add /usr/lib/quagga to the library path (the build system will take care of using rpath; if the libraries have to be linked against from third parties, open a bug as they should be in /usr/lib directly).
(Portage version: 2.2_rc75/cvs/Linux x86_64)
Diffstat (limited to 'net-misc')
-rw-r--r-- | net-misc/quagga/ChangeLog | 25 | ||||
-rw-r--r-- | net-misc/quagga/files/quagga-0.99.14-fix-ipremove.patch | 23 | ||||
-rw-r--r-- | net-misc/quagga/files/quagga-0.99.17-libcap.patch | 60 | ||||
-rw-r--r-- | net-misc/quagga/files/quagga-services.init | 40 | ||||
-rw-r--r-- | net-misc/quagga/files/zebra.init.2 | 44 | ||||
-rw-r--r-- | net-misc/quagga/metadata.xml | 49 | ||||
-rw-r--r-- | net-misc/quagga/quagga-0.99.13.ebuild | 111 | ||||
-rw-r--r-- | net-misc/quagga/quagga-0.99.14.ebuild | 112 | ||||
-rw-r--r-- | net-misc/quagga/quagga-0.99.15.ebuild | 112 | ||||
-rw-r--r-- | net-misc/quagga/quagga-0.99.17.ebuild | 109 |
10 files changed, 340 insertions, 345 deletions
diff --git a/net-misc/quagga/ChangeLog b/net-misc/quagga/ChangeLog index a8a2ba9bffff..9a554e0774b2 100644 --- a/net-misc/quagga/ChangeLog +++ b/net-misc/quagga/ChangeLog @@ -1,8 +1,29 @@ # ChangeLog for net-misc/quagga -# Copyright 1999-2009 Gentoo Foundation +# Copyright 1999-2010 Gentoo Foundation # Copyright 2003-2004 DataCore GmbH # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-misc/quagga/ChangeLog,v 1.85 2009/08/30 08:13:41 mrness Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-misc/quagga/ChangeLog,v 1.86 2010/09/05 17:09:36 flameeyes Exp $ + +*quagga-0.99.17 (05 Sep 2010) + + 05 Sep 2010; Diego E. Pettenò <flameeyes@gentoo.org> + -quagga-0.99.13.ebuild, -quagga-0.99.14.ebuild, + +files/quagga-0.99.14-fix-ipremove.patch, -quagga-0.99.15.ebuild, + +quagga-0.99.17.ebuild, +files/quagga-0.99.17-libcap.patch, + +files/quagga-services.init, +files/zebra.init.2, metadata.xml: + Version bump (bug #311865), remove old non-stable ebuilds as they are + vulnerable (bug #334303). Take co-maintainership of the package; change + the libcap patch (sent upstream) and avoid using a tarball for the patches + for now; the other two feature, optional patches are fetched from their + respective websites if the flags are enabled; rewrite init scripts almost + from scratch so that they recreate their state directory if missing, and + make all the services, beside zebra, share the same init script file, drop + --quiet, make sure that s-s-d knows about the pidfile as well; install + sample files in the documentation directory and not /etc; only use libpcre + if not using glibc (could actually be unneeded on other systems as well); + don't add /usr/lib/quagga to the library path (the build system will take + care of using rpath; if the libraries have to be linked against from third + parties, open a bug as they should be in /usr/lib directly). *quagga-0.99.15 (30 Aug 2009) diff --git a/net-misc/quagga/files/quagga-0.99.14-fix-ipremove.patch b/net-misc/quagga/files/quagga-0.99.14-fix-ipremove.patch new file mode 100644 index 000000000000..9f2dd01c6605 --- /dev/null +++ b/net-misc/quagga/files/quagga-0.99.14-fix-ipremove.patch @@ -0,0 +1,23 @@ +diff -ur quagga-0.99.14/zebra/interface.c quagga-0.99.14-fix-ipremove/zebra/interface.c +--- quagga-0.99.14/zebra/interface.c 2009-07-21 13:11:21.000000000 +0100 ++++ quagga-0.99.14-fix-ipremove/zebra/interface.c 2009-08-12 17:04:14.000000000 +0100 +@@ -1293,17 +1293,17 @@ + return CMD_WARNING; + } + +-#if 0 + /* Redistribute this information. */ + zebra_interface_address_delete_update (ifp, ifc); + + /* Remove connected route. */ + connected_down_ipv4 (ifp, ifc); + ++ if_subnet_delete(ifp, ifc); ++ + /* Free address information. */ + listnode_delete (ifp->connected, ifc); + connected_free (ifc); +-#endif + + return CMD_SUCCESS; + } diff --git a/net-misc/quagga/files/quagga-0.99.17-libcap.patch b/net-misc/quagga/files/quagga-0.99.17-libcap.patch new file mode 100644 index 000000000000..789197cd3585 --- /dev/null +++ b/net-misc/quagga/files/quagga-0.99.17-libcap.patch @@ -0,0 +1,60 @@ +From 63e97633d01908da6d3776ac61e4033e6fa91e5c Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Diego=20Elio=20Petten=C3=B2?= <flameeyes@gmail.com> +Date: Sun, 5 Sep 2010 18:19:09 +0200 +Subject: [PATCH] build: fix linking position for libcap +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + + * lib/Makefile.am: link libzebra to libcap, since it uses symbols + from there. + * zebra/Makefile.am: no need to link libcap here now, since it's not + used directly (libtool with apply transitive dependencies for + static linking). + +Signed-off-by: Diego Elio Pettenò <flameeyes@gmail.com> +--- + lib/Makefile.am | 2 +- + zebra/Makefile.am | 5 ++--- + 2 files changed, 3 insertions(+), 4 deletions(-) + +diff --git a/lib/Makefile.am b/lib/Makefile.am +index 315e919..6e69993 100644 +--- a/lib/Makefile.am ++++ b/lib/Makefile.am +@@ -18,7 +18,7 @@ BUILT_SOURCES = memtypes.h route_types.h + + libzebra_la_DEPENDENCIES = @LIB_REGEX@ + +-libzebra_la_LIBADD = @LIB_REGEX@ ++libzebra_la_LIBADD = @LIB_REGEX@ $(LIBCAP) + + pkginclude_HEADERS = \ + buffer.h checksum.h command.h filter.h getopt.h hash.h \ +diff --git a/zebra/Makefile.am b/zebra/Makefile.am +index 542f36f..d09a209 100644 +--- a/zebra/Makefile.am ++++ b/zebra/Makefile.am +@@ -5,7 +5,6 @@ DEFS = @DEFS@ -DSYSCONFDIR=\"$(sysconfdir)/\" -DMULTIPATH_NUM=@MULTIPATH_NUM@ + INSTALL_SDATA=@INSTALL@ -m 600 + + LIB_IPV6 = @LIB_IPV6@ +-LIBCAP = @LIBCAP@ + + ipforward = @IPFORWARD@ + if_method = @IF_METHOD@ +@@ -39,9 +38,9 @@ noinst_HEADERS = \ + connected.h ioctl.h rib.h rt.h zserv.h redistribute.h debug.h rtadv.h \ + interface.h ipforward.h irdp.h router-id.h kernel_socket.h + +-zebra_LDADD = $(otherobj) $(LIBCAP) $(LIB_IPV6) ../lib/libzebra.la ++zebra_LDADD = $(otherobj) ../lib/libzebra.la $(LIB_IPV6) + +-testzebra_LDADD = $(LIBCAP) $(LIB_IPV6) ../lib/libzebra.la ++testzebra_LDADD = ../lib/libzebra.la $(LIB_IPV6) + + zebra_DEPENDENCIES = $(otherobj) + +-- +1.7.2.2 + diff --git a/net-misc/quagga/files/quagga-services.init b/net-misc/quagga/files/quagga-services.init new file mode 100644 index 000000000000..0e5aff1d5b3c --- /dev/null +++ b/net-misc/quagga/files/quagga-services.init @@ -0,0 +1,40 @@ +#!/sbin/runscript +# Copyright 1999-2010 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-misc/quagga/files/quagga-services.init,v 1.1 2010/09/05 17:09:37 flameeyes Exp $ + +depend() { + need zebra +} + +start() { + if [ ! -e /etc/quagga/${SVCNAME}.conf ] ; then + eerror "Before starting ${SVCNAME} you have to configure it, by creating" + eerror "a /etc/quagga/${SVCNAME}.conf file." + eerror "" + eerror "A sample file has been installed in `ls /usr/share/doc/quagga-*/samples/${SVCNAME}.conf.sample`" + return 1 + fi + + if [ ! -d /var/run/quagga ] ; then + mkdir -p /var/run/quagga + chown quagga:quagga /var/run/quagga + chmod 0750 /var/run/quagga + fi + + ebegin "Starting ${SVCNAME}" + start-stop-daemon \ + --start --exec /usr/sbin/${SVCNAME} \ + --pidfile /var/run/quagga/${SVCNAME}.pid \ + -- -d -f /etc/quagga/${SVCNAME}.conf ${EXTRA_OPTS} \ + --pid_file /var/run/quagga/${SVCNAME}.pid + + eend $? +} + +stop() { + ebegin "Stopping ${SVCNAME}" + start-stop-daemon --stop \ + --pidfile /var/run/quagga/${SVCNAME}.pid + eend $? +} diff --git a/net-misc/quagga/files/zebra.init.2 b/net-misc/quagga/files/zebra.init.2 new file mode 100644 index 000000000000..bdc9cc886fd9 --- /dev/null +++ b/net-misc/quagga/files/zebra.init.2 @@ -0,0 +1,44 @@ +#!/sbin/runscript +# Copyright 1999-2010 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-misc/quagga/files/zebra.init.2,v 1.1 2010/09/05 17:09:37 flameeyes Exp $ + +depend() { + need net +} + +start() { + if [ ! -e /etc/quagga/${SVCNAME}.conf ] ; then + eerror "Before starting ${SVCNAME} you have to configure it, by creating" + eerror "a /etc/quagga/${SVCNAME}.conf file." + eerror "" + eerror "A sample file has been installed in `ls /usr/share/doc/quagga-*/samples/${SVCNAME}.conf.sample`" + return 1 + fi + + if [ ! -d /var/run/quagga ] ; then + mkdir -p /var/run/quagga + chown quagga:quagga /var/run/quagga + chmod 0750 /var/run/quagga + fi + + ebegin "Cleaning up stale zebra routes..." + ip route flush proto zebra + eend $? + + ebegin "Starting ${SVCNAME}" + start-stop-daemon \ + --start --exec /usr/sbin/${SVCNAME} \ + --pidfile /var/run/quagga/${SVCNAME}.pid \ + -- -d -f /etc/quagga/${SVCNAME}.conf ${EXTRA_OPTS} \ + --pid_file /var/run/quagga/${SVCNAME}.pid + + eend $? +} + +stop() { + ebegin "Stopping ${SVCNAME}" + start-stop-daemon --stop \ + --pidfile /var/run/quagga/${SVCNAME}.pid + eend $? +} diff --git a/net-misc/quagga/metadata.xml b/net-misc/quagga/metadata.xml index c3ffc9a3a2bc..d856f92661f4 100644 --- a/net-misc/quagga/metadata.xml +++ b/net-misc/quagga/metadata.xml @@ -6,14 +6,47 @@ <email>mrness@gentoo.org</email> <description>Primary Maintainer (until Amir returns...)</description> </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+ (*note Supported RFC::). 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 (*note SNMP Support::). Furthermore Quagga supports OSPFAPI (*note OSPFAPI Support::), 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> + <maintainer> + <email>flameeyes@gmail.com</email> + </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+ (*note Supported RFC::). 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 (*note SNMP Support::). Furthermore Quagga supports OSPFAPI + (*note OSPFAPI Support::), 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">Enable classless prefixes for BGP</flag> - <flag name="fix-connected-rt">Remove interface connected routes from kernel table on link loss so that no packets get routed to downed interface</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="realms">Enable realms support (see http://vcalinus.gemenii.ro/quaggarealms.html)</flag> - <flag name="tcpmd5">Enable TCP MD5 checksumming</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="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="fix-connected-rt"> + Remove interface connected routes from kernel table on link loss so that no packets get routed + to downed interface + </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="realms"> + Apply unofficial patch to enable realms support. Patch and information to be found at + http://vcalinus.gemenii.ro/quaggarealms.html and http://linux.mantech.ro/quagga+realm_en.php + </flag> + <flag name="tcpmd5"> + Enable TCP MD5 checksumming + </flag> + <flag name="tcp-zebra"> + Enable TCP zserv interface on port 2600 for Zebra/protocol-daemon communication. Unix domain + sockets are chosen otherwise. + </flag> </use> </pkgmetadata> diff --git a/net-misc/quagga/quagga-0.99.13.ebuild b/net-misc/quagga/quagga-0.99.13.ebuild deleted file mode 100644 index e21650a93543..000000000000 --- a/net-misc/quagga/quagga-0.99.13.ebuild +++ /dev/null @@ -1,111 +0,0 @@ -# Copyright 1999-2009 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-misc/quagga/quagga-0.99.13.ebuild,v 1.1 2009/06/23 21:12:04 mrness Exp $ - -EAPI="2" - -inherit eutils multilib autotools - -DESCRIPTION="A free routing daemon replacing Zebra supporting RIP, OSPF and BGP." -HOMEPAGE="http://quagga.net/" -SRC_URI="http://www.quagga.net/download/${P}.tar.gz - mirror://gentoo/${P}-patches-20090623.tar.gz" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ppc ~s390 ~sparc ~x86" -IUSE="caps ipv6 snmp pam pcre bgpclassless ospfapi realms multipath tcp-zebra" -RESTRICT="userpriv" - -COMMON_DEPEND="sys-libs/readline - caps? ( sys-libs/libcap ) - snmp? ( net-analyzer/net-snmp ) - pam? ( sys-libs/pam ) - pcre? ( dev-libs/libpcre )" -DEPEND="${COMMON_DEPEND} - >=sys-devel/libtool-2.2.4" -RDEPEND="${COMMON_DEPEND} - sys-apps/iproute2" - -src_prepare() { - epatch "${WORKDIR}/patch/${P}-ipaddr-bug486.diff" - epatch "${WORKDIR}/patch/${P}-link-libcap.patch" - epatch "${WORKDIR}/patch/${P}-libpcre.patch" - - # Classless prefixes for BGP - http://hasso.linux.ee/doku.php/english:network:quagga - use bgpclassless && epatch "${WORKDIR}/patch/ht-20040304-classless-bgp_adapted.patch" - - # Realms support (Calin Velea) - http://vcalinus.gemenii.ro/quaggarealms.html - use realms && epatch "${WORKDIR}/patch/${P}-realms.diff" - - eautoreconf -} - -src_configure() { - local myconf="--disable-static \ - $(use_enable caps capabilities) \ - $(use_enable snmp) \ - $(use_with pam libpam) \ - $(use_enable pcre pcreposix) \ - $(use_enable tcp-zebra)" - use ipv6 \ - && myconf="${myconf} --enable-ipv6 --enable-ripngd --enable-ospf6d --enable-rtadv" \ - || myconf="${myconf} --disable-ipv6 --disable-ripngd --disable-ospf6d" - use ospfapi \ - && myconf="${myconf} --enable-opaque-lsa --enable-ospf-te --enable-ospfclient" - use realms && myconf="${myconf} --enable-realms" - use multipath && myconf="${myconf} --enable-multipath=0" - - econf \ - --enable-user=quagga \ - --enable-group=quagga \ - --enable-vty-group=quagga \ - --with-cflags="${CFLAGS}" \ - --enable-vtysh \ - --sysconfdir=/etc/quagga \ - --enable-exampledir=/etc/quagga/samples \ - --localstatedir=/var/run/quagga \ - --libdir=/usr/$(get_libdir)/quagga \ - ${myconf} \ - || die "configure failed" -} - -src_install() { - einstall \ - localstatedir="${D}/var/run/quagga" \ - sysconfdir="${D}/etc/quagga" \ - exampledir="${D}/etc/quagga/samples" \ - libdir="${D}/usr/$(get_libdir)/quagga" || die "make install failed" - - dodir /var/run/quagga || die "failed to install /var/run/quagga" - - local i MY_SERVICES_LIST="zebra ripd ospfd bgpd" - use ipv6 && MY_SERVICES_LIST="${MY_SERVICES_LIST} ripngd ospf6d" - for i in ${MY_SERVICES_LIST} ; do - newinitd "${FILESDIR}/${i}.init" ${i} || die "failed to install ${i} init.d script" - done - newconfd "${FILESDIR}/zebra.conf" zebra || die "failed to install zebra conf.d script" - - if use pam; then - insinto /etc/pam.d - newins "${FILESDIR}/quagga.pam" quagga || die "failed to install pam.d file" - fi - - newenvd "${FILESDIR}/quagga.env" 99quagga || die "failed to install env file" -} - -pkg_preinst() { - enewgroup quagga - enewuser quagga -1 -1 /var/empty quagga -} - -pkg_postinst() { - # empty dir for pid files for the new priv separation auth - #set proper owner/group/perms even if dir already existed - install -d -m0770 -o root -g quagga "${ROOT}/etc/quagga" - install -d -m0755 -o quagga -g quagga "${ROOT}/var/run/quagga" - - einfo "Sample configuration files can be found in /etc/quagga/samples." - einfo "You have to create config files in /etc/quagga before" - einfo "starting one of the daemons." -} diff --git a/net-misc/quagga/quagga-0.99.14.ebuild b/net-misc/quagga/quagga-0.99.14.ebuild deleted file mode 100644 index 73a941727c2d..000000000000 --- a/net-misc/quagga/quagga-0.99.14.ebuild +++ /dev/null @@ -1,112 +0,0 @@ -# Copyright 1999-2009 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-misc/quagga/quagga-0.99.14.ebuild,v 1.1 2009/08/16 12:10:11 mrness Exp $ - -EAPI="2" - -inherit eutils multilib autotools - -DESCRIPTION="A free routing daemon replacing Zebra supporting RIP, OSPF and BGP." -HOMEPAGE="http://quagga.net/" -SRC_URI="http://www.quagga.net/download/${P}.tar.gz - mirror://gentoo/${P}-patches-20090816.tar.gz" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ppc ~s390 ~sparc ~x86" -IUSE="caps doc ipv6 snmp pam pcre bgpclassless ospfapi realms multipath tcp-zebra" -RESTRICT="userpriv" - -COMMON_DEPEND="sys-libs/readline - caps? ( sys-libs/libcap ) - snmp? ( net-analyzer/net-snmp ) - pam? ( sys-libs/pam ) - pcre? ( dev-libs/libpcre )" -DEPEND="${COMMON_DEPEND} - >=sys-devel/libtool-2.2.4" -RDEPEND="${COMMON_DEPEND} - sys-apps/iproute2" - -src_prepare() { - epatch "${WORKDIR}/patch/${P}-ipaddr-bug486.diff" - epatch "${WORKDIR}/patch/${P}-link-libcap.patch" - epatch "${WORKDIR}/patch/${P}-libpcre.patch" - - # Classless prefixes for BGP - http://hasso.linux.ee/doku.php/english:network:quagga - use bgpclassless && epatch "${WORKDIR}/patch/ht-20040304-classless-bgp_adapted.patch" - - # Realms support (Calin Velea) - http://vcalinus.gemenii.ro/quaggarealms.html - use realms && epatch "${WORKDIR}/patch/${P}-realms.diff" - - eautoreconf -} - -src_configure() { - local myconf="--disable-static \ - $(use_enable caps capabilities) \ - $(use_enable snmp) \ - $(use_with pam libpam) \ - $(use_enable pcre pcreposix) \ - $(use_enable tcp-zebra) - $(use_enable doc)" - use ipv6 \ - && myconf="${myconf} --enable-ipv6 --enable-ripngd --enable-ospf6d --enable-rtadv" \ - || myconf="${myconf} --disable-ipv6 --disable-ripngd --disable-ospf6d" - use ospfapi \ - && myconf="${myconf} --enable-opaque-lsa --enable-ospf-te --enable-ospfclient" - use realms && myconf="${myconf} --enable-realms" - use multipath && myconf="${myconf} --enable-multipath=0" - - econf \ - --enable-user=quagga \ - --enable-group=quagga \ - --enable-vty-group=quagga \ - --with-cflags="${CFLAGS}" \ - --enable-vtysh \ - --sysconfdir=/etc/quagga \ - --enable-exampledir=/etc/quagga/samples \ - --localstatedir=/var/run/quagga \ - --libdir=/usr/$(get_libdir)/quagga \ - ${myconf} \ - || die "configure failed" -} - -src_install() { - einstall \ - localstatedir="${D}/var/run/quagga" \ - sysconfdir="${D}/etc/quagga" \ - exampledir="${D}/etc/quagga/samples" \ - libdir="${D}/usr/$(get_libdir)/quagga" || die "make install failed" - - dodir /var/run/quagga || die "failed to install /var/run/quagga" - - local i MY_SERVICES_LIST="zebra ripd ospfd bgpd" - use ipv6 && MY_SERVICES_LIST="${MY_SERVICES_LIST} ripngd ospf6d" - for i in ${MY_SERVICES_LIST} ; do - newinitd "${FILESDIR}/${i}.init" ${i} || die "failed to install ${i} init.d script" - done - newconfd "${FILESDIR}/zebra.conf" zebra || die "failed to install zebra conf.d script" - - if use pam; then - insinto /etc/pam.d - newins "${FILESDIR}/quagga.pam" quagga || die "failed to install pam.d file" - fi - - newenvd "${FILESDIR}/quagga.env" 99quagga || die "failed to install env file" -} - -pkg_preinst() { - enewgroup quagga - enewuser quagga -1 -1 /var/empty quagga -} - -pkg_postinst() { - # empty dir for pid files for the new priv separation auth - #set proper owner/group/perms even if dir already existed - install -d -m0770 -o root -g quagga "${ROOT}/etc/quagga" - install -d -m0755 -o quagga -g quagga "${ROOT}/var/run/quagga" - - einfo "Sample configuration files can be found in /etc/quagga/samples." - einfo "You have to create config files in /etc/quagga before" - einfo "starting one of the daemons." -} diff --git a/net-misc/quagga/quagga-0.99.15.ebuild b/net-misc/quagga/quagga-0.99.15.ebuild deleted file mode 100644 index 0e962f4adaa3..000000000000 --- a/net-misc/quagga/quagga-0.99.15.ebuild +++ /dev/null @@ -1,112 +0,0 @@ -# Copyright 1999-2009 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-misc/quagga/quagga-0.99.15.ebuild,v 1.1 2009/08/30 08:13:41 mrness Exp $ - -EAPI="2" - -inherit eutils multilib autotools - -DESCRIPTION="A free routing daemon replacing Zebra supporting RIP, OSPF and BGP." -HOMEPAGE="http://quagga.net/" -SRC_URI="http://www.quagga.net/download/${P}.tar.gz - mirror://gentoo/${P}-patches-20090830.tar.gz" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ppc ~s390 ~sparc ~x86" -IUSE="caps doc ipv6 snmp pam pcre bgpclassless ospfapi realms multipath tcp-zebra" -RESTRICT="userpriv" - -COMMON_DEPEND="sys-libs/readline - caps? ( sys-libs/libcap ) - snmp? ( net-analyzer/net-snmp ) - pam? ( sys-libs/pam ) - pcre? ( dev-libs/libpcre )" -DEPEND="${COMMON_DEPEND} - >=sys-devel/libtool-2.2.4" -RDEPEND="${COMMON_DEPEND} - sys-apps/iproute2" - -src_prepare() { - epatch "${WORKDIR}/patch/${P}-ipaddr-bug486.diff" - epatch "${WORKDIR}/patch/${P}-link-libcap.patch" - epatch "${WORKDIR}/patch/${P}-libpcre.patch" - - # Classless prefixes for BGP - http://hasso.linux.ee/doku.php/english:network:quagga - use bgpclassless && epatch "${WORKDIR}/patch/ht-20040304-classless-bgp_adapted.patch" - - # Realms support (Calin Velea) - http://vcalinus.gemenii.ro/quaggarealms.html - use realms && epatch "${WORKDIR}/patch/${P}-realms.diff" - - eautoreconf -} - -src_configure() { - local myconf="--disable-static \ - $(use_enable caps capabilities) \ - $(use_enable snmp) \ - $(use_with pam libpam) \ - $(use_enable pcre pcreposix) \ - $(use_enable tcp-zebra) - $(use_enable doc)" - use ipv6 \ - && myconf="${myconf} --enable-ipv6 --enable-ripngd --enable-ospf6d --enable-rtadv" \ - || myconf="${myconf} --disable-ipv6 --disable-ripngd --disable-ospf6d" - use ospfapi \ - && myconf="${myconf} --enable-opaque-lsa --enable-ospf-te --enable-ospfclient" - use realms && myconf="${myconf} --enable-realms" - use multipath && myconf="${myconf} --enable-multipath=0" - - econf \ - --enable-user=quagga \ - --enable-group=quagga \ - --enable-vty-group=quagga \ - --with-cflags="${CFLAGS}" \ - --enable-vtysh \ - --sysconfdir=/etc/quagga \ - --enable-exampledir=/etc/quagga/samples \ - --localstatedir=/var/run/quagga \ - --libdir=/usr/$(get_libdir)/quagga \ - ${myconf} \ - || die "configure failed" -} - -src_install() { - einstall \ - localstatedir="${D}/var/run/quagga" \ - sysconfdir="${D}/etc/quagga" \ - exampledir="${D}/etc/quagga/samples" \ - libdir="${D}/usr/$(get_libdir)/quagga" || die "make install failed" - - dodir /var/run/quagga || die "failed to install /var/run/quagga" - - local i MY_SERVICES_LIST="zebra ripd ospfd bgpd" - use ipv6 && MY_SERVICES_LIST="${MY_SERVICES_LIST} ripngd ospf6d" - for i in ${MY_SERVICES_LIST} ; do - newinitd "${FILESDIR}/${i}.init" ${i} || die "failed to install ${i} init.d script" - done - newconfd "${FILESDIR}/zebra.conf" zebra || die "failed to install zebra conf.d script" - - if use pam; then - insinto /etc/pam.d - newins "${FILESDIR}/quagga.pam" quagga || die "failed to install pam.d file" - fi - - newenvd "${FILESDIR}/quagga.env" 99quagga || die "failed to install env file" -} - -pkg_preinst() { - enewgroup quagga - enewuser quagga -1 -1 /var/empty quagga -} - -pkg_postinst() { - # empty dir for pid files for the new priv separation auth - #set proper owner/group/perms even if dir already existed - install -d -m0770 -o root -g quagga "${ROOT}/etc/quagga" - install -d -m0755 -o quagga -g quagga "${ROOT}/var/run/quagga" - - einfo "Sample configuration files can be found in /etc/quagga/samples." - einfo "You have to create config files in /etc/quagga before" - einfo "starting one of the daemons." -} diff --git a/net-misc/quagga/quagga-0.99.17.ebuild b/net-misc/quagga/quagga-0.99.17.ebuild new file mode 100644 index 000000000000..b0f90ba92b1a --- /dev/null +++ b/net-misc/quagga/quagga-0.99.17.ebuild @@ -0,0 +1,109 @@ +# Copyright 1999-2010 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-misc/quagga/quagga-0.99.17.ebuild,v 1.1 2010/09/05 17:09:36 flameeyes Exp $ + +EAPI="2" + +CLASSLESS_BGP_PATCH=ht-20040304-classless-bgp.patch +REALMS_PATCH=quagga-0.99.14-realms-test2.diff + +inherit eutils multilib autotools pam + +DESCRIPTION="A free routing daemon replacing Zebra supporting RIP, OSPF and BGP." +HOMEPAGE="http://quagga.net/" +SRC_URI="http://www.quagga.net/download/${P}.tar.gz + bgpclassless? ( http://hasso.linux.ee/stuff/patches/quagga/${CLASSLESS_BGP_PATCH} ) + realms? ( http://linux.mantech.ro/download/quagga/${REALMS_PATCH} )" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ppc ~s390 ~sparc ~x86" +IUSE="caps doc ipv6 snmp pam bgpclassless ospfapi realms multipath tcp-zebra elibc_glibc" + +COMMON_DEPEND="sys-libs/readline + caps? ( sys-libs/libcap ) + snmp? ( net-analyzer/net-snmp ) + pam? ( sys-libs/pam ) + !elibc_glibc? ( dev-libs/libpcre )" +DEPEND="${COMMON_DEPEND} + >=sys-devel/libtool-2.2.4" +RDEPEND="${COMMON_DEPEND} + sys-apps/iproute2" + +pkg_setup() { + enewgroup quagga + enewuser quagga -1 -1 /var/empty quagga +} + +src_prepare() { + # https://bugzilla.quagga.net/show_bug.cgi?id=486 + epatch "${FILESDIR}/${PN}-0.99.14-fix-ipremove.patch" + + epatch "${FILESDIR}/${P}-libcap.patch" + + # Classless prefixes for BGP - http://hasso.linux.ee/doku.php/english:network:quagga + use bgpclassless && epatch "${DISTDIR}/${CLASSLESS_BGP_PATCH}" + + # Realms support (Calin Velea) - http://vcalinus.gemenii.ro/quaggarealms.html + use realms && epatch "${DISTDIR}/${REALMS_PATCH}" + + eautoreconf +} + +src_configure() { + local myconf="--disable-static \ + $(use_enable caps capabilities) \ + $(use_enable snmp) \ + $(use_with pam libpam) \ + $(use_enable !elibc_glibc pcreposix) \ + $(use_enable tcp-zebra) + $(use_enable doc)" + use ipv6 \ + && myconf="${myconf} --enable-ipv6 --enable-ripngd --enable-ospf6d --enable-rtadv" \ + || myconf="${myconf} --disable-ipv6 --disable-ripngd --disable-ospf6d" + use ospfapi \ + && myconf="${myconf} --enable-opaque-lsa --enable-ospf-te --enable-ospfclient" + use realms && myconf="${myconf} --enable-realms" + use multipath && myconf="${myconf} --enable-multipath=0" + + econf \ + --enable-user=quagga \ + --enable-group=quagga \ + --enable-vty-group=quagga \ + --with-cflags="${CFLAGS}" \ + --enable-vtysh \ + --sysconfdir=/etc/quagga \ + --enable-exampledir=/usr/share/doc/${PF}/samples \ + --localstatedir=/var/run/quagga \ + --libdir=/usr/$(get_libdir)/quagga \ + ${myconf} \ + || die "configure failed" +} + +src_install() { + emake DESTDIR="${D}" install || die "emake install failed" + + keepdir /etc/quagga || die + fowners root:quagga /etc/quagga || die + fperms 0770 /etc/quagga || die + + newinitd "${FILESDIR}"/zebra.init.2 zebra || die + + # install ripd as a file, symlink the rest + newinitd "${FILESDIR}"/quagga-services.init ripd || die + + for service in ospfd bgpd $(use ipv6 && echo ripngd ospf6d); do + ln -s ripd "${D}"/etc/init.d/${service} || die + done + + newpamd "${FILESDIR}/quagga.pam" quagga +} + +pkg_postinst() { + elog "Sample configuration files can be found in /usr/share/doc/${PF}/samples" + elog "You have to create config files in /etc/quagga before" + elog "starting one of the daemons." + elog "" + elog "You can pass additional options to the daemon by setting the EXTRA_OPTS" + elog "variable in their respective file in /etc/conf.d" +} |