diff options
author | Mike Frysinger <vapier@gentoo.org> | 2005-11-15 00:47:32 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2005-11-15 00:47:32 +0000 |
commit | c0cb7993ad6e0794f71cde41d77a1c2ce3cc9ea6 (patch) | |
tree | ad799d38f86b044b8cace63dce454a8dbb5b1c37 /net-misc/cbqinit | |
parent | Mark 0.8.10 stable on alpha, mark 0.8.11 ~alpha (diff) | |
download | gentoo-2-c0cb7993ad6e0794f71cde41d77a1c2ce3cc9ea6.tar.gz gentoo-2-c0cb7993ad6e0794f71cde41d77a1c2ce3cc9ea6.tar.bz2 gentoo-2-c0cb7993ad6e0794f71cde41d77a1c2ce3cc9ea6.zip |
Clean up ebuild, add a patch from Fedora, and add back in missing KEYWORDS along with arm love.
(Portage version: 2.0.53_rc7)
Diffstat (limited to 'net-misc/cbqinit')
-rw-r--r-- | net-misc/cbqinit/ChangeLog | 12 | ||||
-rw-r--r-- | net-misc/cbqinit/cbqinit-0.7.3-r1.ebuild | 31 | ||||
-rw-r--r-- | net-misc/cbqinit/files/cbqinit-0.7.3-gentoo.patch | 53 | ||||
-rw-r--r-- | net-misc/cbqinit/files/digest-cbqinit-0.7.3-r1 | 1 | ||||
-rw-r--r-- | net-misc/cbqinit/files/rc_cbqinit-r1 | 13 |
5 files changed, 108 insertions, 2 deletions
diff --git a/net-misc/cbqinit/ChangeLog b/net-misc/cbqinit/ChangeLog index 7a082789a026..3ca89e93a3f3 100644 --- a/net-misc/cbqinit/ChangeLog +++ b/net-misc/cbqinit/ChangeLog @@ -1,6 +1,14 @@ # ChangeLog for net-misc/cbqinit -# Copyright 2002-2004 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-misc/cbqinit/ChangeLog,v 1.11 2004/12/29 03:33:17 ciaranm Exp $ +# Copyright 1999-2005 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/net-misc/cbqinit/ChangeLog,v 1.12 2005/11/15 00:47:32 vapier Exp $ + +*cbqinit-0.7.3-r1 (15 Nov 2005) + + 15 Nov 2005; Mike Frysinger <vapier@gentoo.org> + +files/cbqinit-0.7.3-gentoo.patch, files/rc_cbqinit-r1, + +cbqinit-0.7.3-r1.ebuild: + Clean up ebuild, add a patch from Fedora, and add back in missing KEYWORDS + along with arm love. 29 Dec 2004; Ciaran McCreesh <ciaranm@gentoo.org> : Change encoding to UTF-8 for GLEP 31 compliance diff --git a/net-misc/cbqinit/cbqinit-0.7.3-r1.ebuild b/net-misc/cbqinit/cbqinit-0.7.3-r1.ebuild new file mode 100644 index 000000000000..6b9a9729868c --- /dev/null +++ b/net-misc/cbqinit/cbqinit-0.7.3-r1.ebuild @@ -0,0 +1,31 @@ +# Copyright 1999-2005 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-misc/cbqinit/cbqinit-0.7.3-r1.ebuild,v 1.1 2005/11/15 00:47:32 vapier Exp $ + +inherit eutils + +DESCRIPTION="Sets up class-based queue traffic control (QoS) with iproute2" +HOMEPAGE="http://www.sourceforge.net/projects/cbqinit" +SRC_URI="mirror://sourceforge/cbqinit/cbq.init-v${PV}" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~mips ~ppc ~sparc ~x86" +IUSE="" + +RDEPEND="sys-apps/iproute2" +DEPEND="" + +S=${WORKDIR} + +src_unpack() { + cp "${DISTDIR}"/cbq.init-v${PV} "${S}"/cbqinit || die + grep '^#' cbqinit > README + epatch "${FILESDIR}"/${P}-gentoo.patch +} + +src_install() { + dosbin cbqinit || die + newinitd "${FILESDIR}"/rc_cbqinit-r1 cbqinit + dodoc "${FILESDIR}"/cbq-1280.My_first_shaper.sample README +} diff --git a/net-misc/cbqinit/files/cbqinit-0.7.3-gentoo.patch b/net-misc/cbqinit/files/cbqinit-0.7.3-gentoo.patch new file mode 100644 index 000000000000..edd78da2451e --- /dev/null +++ b/net-misc/cbqinit/files/cbqinit-0.7.3-gentoo.patch @@ -0,0 +1,53 @@ +Use Gentoo friendly config paths and incorporate +cbq-0.7.1-avpkt-enhancement.patch from Fedora + +--- cbqinit ++++ cbqinit +@@ -484,8 +484,8 @@ + PRIO_REALM_DEFAULT=${PRIO_REALM:-300} + + ### Default CBQ_PATH & CBQ_CACHE settings +-CBQ_PATH=${CBQ_PATH:-/etc/sysconfig/cbq} +-CBQ_CACHE=${CBQ_CACHE:-/var/cache/cbq.init} ++CBQ_PATH=${CBQ_PATH:-/etc/cbqinit} ++CBQ_CACHE=${CBQ_CACHE:-/var/cache/cbqinit} + + ### Uncomment to enable logfile for debugging + #CBQ_DEBUG="/var/run/cbq-$1" +@@ -501,6 +501,9 @@ + CBQ_WORDS="$CBQ_WORDS|PRIO_MARK|PRIO_RULE|PRIO_REALM|BUFFER" + CBQ_WORDS="$CBQ_WORDS|LIMIT|PEAK|MTU|QUANTUM|PERTURB" + ++### Source AVPKT if it exists ++[ -r "${CBQ_PATH}/avpkt" ] && . "${CBQ_PATH}/avpkt" ++AVPKT=${AVPKT:-1000} + + ############################################################################# + ############################# SUPPORT FUNCTIONS ############################# +@@ -749,7 +752,7 @@ + + ### Setup root qdisc + class for device + tc qdisc add dev $dev root handle 1 cbq \ +- bandwidth $DEVBWDT avpkt 1000 cell 8 ++ bandwidth $DEVBWDT avpkt $AVPKT cell 8 + + ### Set weight of the root class if set + [ -n "$DEVWGHT" ] && +@@ -766,7 +769,7 @@ + ### Create the class + tc class add dev $DEVICE parent 1:$PARENT classid 1:$CLASS cbq \ + bandwidth $BANDWIDTH rate $RATE weight $WEIGHT prio $PRIO \ +- allot 1514 cell 8 maxburst 20 avpkt 1000 $BOUNDED $ISOLATED || ++ allot 1514 cell 8 maxburst 20 avpkt $AVPKT $BOUNDED $ISOLATED || + cbq_fail_off "failed to add class $CLASS with parent $PARENT on $DEVICE!" + + ### Create leaf qdisc if set +@@ -940,7 +943,7 @@ + ### Replace CBQ class + tc class replace dev $DEVICE classid 1:$CLASS cbq \ + bandwidth $BANDWIDTH rate $NEW_RATE weight $NEW_WGHT prio $PRIO \ +- allot 1514 cell 8 maxburst 20 avpkt 1000 $BOUNDED $ISOLATED ++ allot 1514 cell 8 maxburst 20 avpkt $AVPKT $BOUNDED $ISOLATED + + ### Replace leaf qdisc (if any) + if [ "$LEAF" = "tbf" ]; then diff --git a/net-misc/cbqinit/files/digest-cbqinit-0.7.3-r1 b/net-misc/cbqinit/files/digest-cbqinit-0.7.3-r1 new file mode 100644 index 000000000000..69332f51a251 --- /dev/null +++ b/net-misc/cbqinit/files/digest-cbqinit-0.7.3-r1 @@ -0,0 +1 @@ +MD5 c319f136059aadf7b3f0a38a12f3f3e0 cbq.init-v0.7.3 33438 diff --git a/net-misc/cbqinit/files/rc_cbqinit-r1 b/net-misc/cbqinit/files/rc_cbqinit-r1 index 2887db5162bc..b6ffad898e87 100644 --- a/net-misc/cbqinit/files/rc_cbqinit-r1 +++ b/net-misc/cbqinit/files/rc_cbqinit-r1 @@ -1,10 +1,23 @@ #!/sbin/runscript +# Copyright 1999-2005 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 depend() { need net } +checkconfig() { + if [ ! -d /etc/cbqinit ] ; then + eerror "You need to create some config files in /etc/cbqinit first" + eerror "Please read the README file" + return 1 + fi + + return 0 +} + start() { + checkconfig || return 1 ebegin "Starting cbqinit" /usr/sbin/cbqinit start eend $? |