Bump to add a patch to fix bug #387375; take the chance to merge the two init scripts...
authorDiego Elio Pettenò <flameeyes@gentoo.org>
Fri, 21 Oct 2011 22:51:52 +0000 (22:51 +0000)
committerDiego Elio Pettenò <flameeyes@gentoo.org>
Fri, 21 Oct 2011 22:51:52 +0000 (22:51 +0000)
Package-Manager: portage-2.2.0_alpha69/cvs/Linux x86_64

net-misc/quagga/ChangeLog
net-misc/quagga/Manifest
net-misc/quagga/files/quagga-services.init.3 [new file with mode: 0644]
net-misc/quagga/quagga-0.99.20-r1.ebuild [new file with mode: 0644]

index aa2e3ae5dbb4da5c67e977a696920a1c80947dde..ff08ec8ec410930e07cb67bc2563208836968951 100644 (file)
@@ -1,6 +1,14 @@
 # ChangeLog for net-misc/quagga
 # Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-misc/quagga/ChangeLog,v 1.125 2011/10/17 11:27:41 flameeyes Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-misc/quagga/ChangeLog,v 1.126 2011/10/21 22:51:52 flameeyes Exp $
+
+*quagga-0.99.20-r1 (21 Oct 2011)
+
+  21 Oct 2011; Diego E. Pettenò <flameeyes@gentoo.org>
+  +quagga-0.99.20-r1.ebuild, +files/quagga-services.init.3:
+  Bump to add a patch to fix bug #387375; take the chance to merge the two init
+  scripts, so that zebra is the only real script, and the rest are actually
+  symlinks.
 
   17 Oct 2011; Diego E. Pettenò <flameeyes@gentoo.org> -quagga-0.99.18.ebuild,
   -quagga-0.99.19-r1.ebuild, -files/quagga-services.init, -files/zebra.init.2:
index 882fd493bd81f8d7f50de0486398a7ce1f709a86..365d204ed9daf350bffd372720debadd73c6119c 100644 (file)
@@ -2,18 +2,21 @@
 Hash: SHA1
 
 AUX quagga-services.init.2 1384 RMD160 471b8e335c0df594ed9dbb7a6197f8235469d1bc SHA1 e119166d59bf70526d4f11cc3fd3f7969210aae2 SHA256 51f604e45d82831fe2d34ec9a15ab65c6aaa21c7a3bc6856c97372cabbc06108
+AUX quagga-services.init.3 1198 RMD160 f68fd5d19b6a5d12990d50e97b479d1202a3039b SHA1 db102980ad6588c3efa93468f8c3d729903d5817 SHA256 760c70c9df995fb270ffd50e80fc4a4ba42c7fa6326855de53a6fff43cf4f82d
 AUX quagga.pam 975 RMD160 df2433b76a16f2c8747f9569e88ed90c9c1f2bae SHA1 bfcd1bbbd4162fd70541f0d754a0e5a818025bc9 SHA256 aa68ac97d7a951324bc3c4124a1c70f6fa88a45da860f636ac01cbcbfa36db70
 AUX zebra.init.3 1433 RMD160 f2012ec6a67b0e86c75dd098327befca6b74867a SHA1 858117c5db56edc8207bcab8d2d461b654e5a86b SHA256 ce174d7b8a277f0e1c2ba2c6991b133c1cbd4f3f445406f741e1e4becc236918
 DIST ht-20040304-classless-bgp.patch 1581 RMD160 e08f18b725d2f899f0c4abe7df37dc6608e88baf SHA1 5216bfbcb0f0c42846d56afe7ab778895197a039 SHA256 39993890f9e31d662ed0564c732fb22392a901beb45b64261ffeadd9edf27887
 DIST quagga-0.99.20-backports-1.tar.bz2 1882 RMD160 4b2e723ba456d95baaf2d81c587f6aa9410c82a3 SHA1 3685ae30111df87d30665f8975aa8f49d3f82031 SHA256 2cca223deb57a56f5c58c49d8cdb50d1eef54537d476b0fb38369dbc5a505807
+DIST quagga-0.99.20-backports-2.tar.xz 1968 RMD160 401eae32b81debe0020ccf6c7b31263e8f17da2e SHA1 0b3fcae1c44de63735858bfcf181eb7ad8618b91 SHA256 6c2ab6f39bf6a006539603bbeca59c095e1f66ec96199f175bb12cc7d8ef532a
 DIST quagga-0.99.20.tar.gz 2232520 RMD160 c6a47537cc70ade9102ca57c81c268c037ce0649 SHA1 59fb388075aab25f4eaea8bcba677961ed518efa SHA256 b7a98cc6b022bb0cb405557b3d920cf513150f64384dbd0a2248b5bd248df58b
+EBUILD quagga-0.99.20-r1.ebuild 3426 RMD160 9a7cc7b5f639f1b87e78f62ce4bb8a0927a78597 SHA1 721f67fd2795b691256f0e83dba51032b043ae48 SHA256 b5b99234f94f0b95ac7b8553517c721bcb505d8d48790a79aebb7627c288ef16
 EBUILD quagga-0.99.20.ebuild 3434 RMD160 81c4d2beb7d456b254b1004cfd96aad9b74e2221 SHA1 05116ff40e7fcf245a565a65c674f117fd6dcab5 SHA256 a682d5a3c8fbd632213d761bd41c7687491df42815804cad9de8e7c6d92d96ec
-MISC ChangeLog 21220 RMD160 8b4e4e1a0ee813ba80a101e8f6c39adc5a3e2fc3 SHA1 ef1011859d9b5e08d567f2d867c61066e70dd3b8 SHA256 ff7b1473751e8b34f04763e6a2f694c8ed70da8dc859eed836840e38be1013f3
+MISC ChangeLog 21539 RMD160 a507d15dc6d4bcb5afc5343a09178309fe29957a SHA1 60bf01bf3ecf2daae6b710cd1e2073529d846982 SHA256 9a87de78a847c43ef0eb3e920837d04477c387807e85d133393c711e51af3ebc
 MISC metadata.xml 2326 RMD160 6a2082adc0e8daea8630e23f3747cdce46869b57 SHA1 85b921b42c3077bdf2effa627ee93ca1434ed037 SHA256 3c8117ca34349d02eb569dd2c63cf7f9bb847d35a1da72d82febcb82a798a450
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.18 (GNU/Linux)
 
-iEYEARECAAYFAk6cEO8ACgkQAiZjviIA2XiHwACgkiyehGYGY1rj0BNdNlqRkmwE
-jzMAoMoGL28xabS5149KpD+c2tXKXyNe
-=wOpM
+iEYEARECAAYFAk6h94QACgkQAiZjviIA2Xh/LACfc6WMWe9xKqEW1/HFGg4/9zsR
+wdAAoMT/LRLxO3H5EHrk/LwZCjFjHkY8
+=GrRI
 -----END PGP SIGNATURE-----
diff --git a/net-misc/quagga/files/quagga-services.init.3 b/net-misc/quagga/files/quagga-services.init.3
new file mode 100644 (file)
index 0000000..307f1a9
--- /dev/null
@@ -0,0 +1,44 @@
+#!/sbin/runscript
+# Copyright 1999-2011 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.3,v 1.1 2011/10/21 22:51:52 flameeyes Exp $
+
+: ${CFGFILE:=/etc/quagga/${SVCNAME}.conf}
+
+pidfile=/var/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 `ls /usr/share/doc/quagga-*/samples/${SVCNAME}.conf.sample`"
+        return 1
+    fi
+
+       checkpath -d -m 0750 -o quagga:quagga /var/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/quagga-0.99.20-r1.ebuild b/net-misc/quagga/quagga-0.99.20-r1.ebuild
new file mode 100644 (file)
index 0000000..a5fe666
--- /dev/null
@@ -0,0 +1,124 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-misc/quagga/quagga-0.99.20-r1.ebuild,v 1.1 2011/10/21 22:51:52 flameeyes Exp $
+
+EAPI="4"
+
+CLASSLESS_BGP_PATCH=ht-20040304-classless-bgp.patch
+
+BACKPORTS=2
+
+inherit eutils multilib autotools pam flag-o-matic
+
+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
+       ${BACKPORTS:+
+               http://dev.gentoo.org/~flameeyes/${PN}/${P}-backports-${BACKPORTS}.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="caps doc ipv6 snmp pam bgpclassless ospfapi multipath tcp-zebra elibc_glibc +readline"
+
+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-devel/libtool-2.2.4"
+RDEPEND="${COMMON_DEPEND}
+       sys-apps/openrc
+       sys-apps/iproute2"
+
+pkg_setup() {
+       enewgroup quagga
+       enewuser quagga -1 -1 /var/empty quagga
+}
+
+src_prepare() {
+       [[ -n ${BACKPORTS} ]] && \
+               EPATCH_FORCE=yes EPATCH_SUFFIX="patch" EPATCH_SOURCE="${S}/patches" \
+                       epatch
+
+       # Classless prefixes for BGP
+       # http://hasso.linux.ee/doku.php/english:network:quagga
+       use bgpclassless && epatch "${DISTDIR}/${CLASSLESS_BGP_PATCH}"
+
+       eautoreconf
+}
+
+src_configure() {
+       local myconf=
+
+       use ospfapi \
+                       && myconf="${myconf} --enable-opaque-lsa --enable-ospf-te --enable-ospfclient"
+
+       use multipath && myconf="${myconf} --enable-multipath=0"
+
+       append-flags -fno-strict-aliasing
+
+       econf \
+               --enable-user=quagga \
+               --enable-group=quagga \
+               --enable-vty-group=quagga \
+               --with-cflags="${CFLAGS}" \
+               --sysconfdir=/etc/quagga \
+               --enable-exampledir=/usr/share/doc/${PF}/samples \
+               --localstatedir=/var/run/quagga \
+               --disable-static \
+               --disable-pie \
+               \
+               $(use_enable caps capabilities) \
+               $(use_enable snmp) \
+               $(use_enable !elibc_glibc pcreposix) \
+               $(use_enable tcp-zebra) \
+               $(use_enable doc) \
+               \
+               $(use_enable readline vtysh) \
+               $(use_with pam libpam) \
+               \
+               $(use_enable ipv6) \
+               $(use_enable ipv6 ripngd) \
+               $(use_enable ipv6 ospf6d) \
+               $(use_enable ipv6 rtadv) \
+               \
+               ${myconf}
+}
+
+src_install() {
+       emake DESTDIR="${D}" install
+       find "${D}" -name '*.la' -delete || die
+
+       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 ripd ospfd bgpd $(use ipv6 && echo ripngd ospf6d); do
+               dosym zebra /etc/init.d/${service}
+       done
+
+       use readline && 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"
+       elog ""
+       elog "Starting from version 0.99.18, quagga no longer supports the realms patch."
+       elog "The patch was abandoned upstream and once again didn't apply; it needs a"
+       elog "dedicated maintainer, if it is still necessary."
+}