diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
commit | 4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch) | |
tree | ba5f07bf3f9d22d82e54a462313f5d244036c768 /net-misc/cbqinit |
reinit the tree, so we can have metadata
Diffstat (limited to 'net-misc/cbqinit')
-rw-r--r-- | net-misc/cbqinit/Manifest | 8 | ||||
-rw-r--r-- | net-misc/cbqinit/cbqinit-0.7.3-r3.ebuild | 35 | ||||
-rw-r--r-- | net-misc/cbqinit/files/cbq-1280.My_first_shaper.sample | 5 | ||||
-rw-r--r-- | net-misc/cbqinit/files/cbqinit-0.7.3-gentoo.patch | 53 | ||||
-rw-r--r-- | net-misc/cbqinit/files/rc_cbqinit-r1 | 30 | ||||
-rw-r--r-- | net-misc/cbqinit/metadata.xml | 8 |
6 files changed, 139 insertions, 0 deletions
diff --git a/net-misc/cbqinit/Manifest b/net-misc/cbqinit/Manifest new file mode 100644 index 000000000000..98caec5617fa --- /dev/null +++ b/net-misc/cbqinit/Manifest @@ -0,0 +1,8 @@ +AUX cbq-1280.My_first_shaper.sample 79 SHA256 e794aca2ca2ac3188f0ef8025381a13bdd6ecb4a197285f77385407bff7a678f SHA512 859b8fc0cd73ae348df0816c73bec4a835b645cf972700b04b2e53590bf10f0a44e18ec25a1f03585056570a04dc882dae29b68aeee107dce6a9fbcf5c3e9ee2 WHIRLPOOL 0c86ef5d74229af37f1166e72385462918ba38eb9c56bdcc7061f12ba45cbfbefcfe2732984f1fa2a9455aa7d61ac183e0be7a33ca7d8aa010facfe0940c05b6 +AUX cbqinit-0.7.3-gentoo.patch 1904 SHA256 b7ff8f52b703287c71e2395d34b0b695e01fb090a87c147f739c1b072e618054 SHA512 b33e3e7e23d6363dcb4b66357f666bdc5b299b851798db7a935d3edaf2612ae3494e6d0e0ea68375409a2834a0d50d322170c9c3f2b97ab00054a19f5bb27d44 WHIRLPOOL 1f355512d41f829c654a2de19f3c1ea1e09ca77a54ce3540950322ab5b90bee72aea4f7f421594c15fb125b52dcc7dcdd11c8135b8c374a0d502ba3775b4c555 +AUX rc_cbqinit-r1 505 SHA256 8b1a3211654d1a8a328ff5f3707057db6a0d172c6427aa1cee2c6258855ef3ca SHA512 29ace7a58bfc942c29b4992b317704ce05d11c6e9a205f0d74e604d65036b0932bacd4768fd0a6fe449ebd0d9735cf9232e956d2dbf45b5fda66215eff5d61d2 WHIRLPOOL 29d3ba17d22337cc0dd1dab45d99d31a60ca35b08754b0cdaae3cea419a029a4c3e65d3223bfe01a819622b2a59f2f67dddc100be00405a5b679f200e75668f9 +DIST cbqinit-0.7.3 33438 SHA256 e7f9016be2efb340de7ce82d775ea3c863f1163b934d16438a6517689d1dc022 SHA512 ab1f66ebce4653f53d85314f47dc4d5e2f28c081f7c0385138c33cbc78e588d7190eedcf8354b744cfae8b34d536d610a944d492c9b49361109978016fa167a1 WHIRLPOOL 5a2b76d135b2ff67b9157bcd7af5da09385617308a9e6cdf22e729a0c3a38a0478f0b66f74e31e2f6da2af8cdfc36095ce2cb3ce7644d168ff69cc95512c652c +EBUILD cbqinit-0.7.3-r3.ebuild 801 SHA256 902692c2bfa241270964c1c312acffeaf9dd32848347feef847e0b7a514c926b SHA512 8c0ec5228b8f0b14b771dcb66ca4486e43781cf879679302ba8da9b40a86fbd999e5c6a7b15de7f6c64d36b6ca7f443526624ae02b0ecc0ac55aa9d2c86918b0 WHIRLPOOL a631ea2447a812d773c38ff3d8ef2d29b0a02fd0c108942e717b62f1d96dcd2849b1a9d198833a8f418298c3c08a38ab0530002abbdc94ce33708d35d54624d3 +MISC ChangeLog 3076 SHA256 b85f51f42a04a1ff1023ad7ec37a447052e532e120f6d2ac757053118a0e06bb SHA512 a976084543d8bd713e630c4bdb54857334448bb0069a21e4faffa9d974ba9eba30cb7d993a7f93bfa6cd526736382660d84dafa977d7b375912f5aee961efa3f WHIRLPOOL f594770f3a5bd8dc5052ed8814f02299374c9d42e2bea52cc52a3e60d5098e317edb1edd9cff43899ce7256075dd81fce7f37343e6ea15e552fed11b16c65396 +MISC ChangeLog-2015 3130 SHA256 e6ef9eb636becdbaa59c5dde9452d46cd0e8fbcf90d8673e9554e3695bb4e74d SHA512 db4cafa00dd24e936204ad07193333b5e3cc4d5a83d7163640c406109d7a9411d131decad9e8b47a2a0b03552c11c0132e3bcd876a6e6582dea8e9116c490c4c WHIRLPOOL 069705c51b1d860d6133c62cc66e96684a6315246e7e8d1b07596233a3d4321ab7e13a68416f4a0790aed778e357286e500262a93c773b79d0a3cd2c27ace379 +MISC metadata.xml 244 SHA256 ffdbeb4c645efad13e8aeb89f087143dae128eb717af78d46c47ffb81c11cb50 SHA512 d922092251c07becd0effd06de2ed063038394b7396c9a303e4e234ac514ec7a3c9f00e76503f4bb435ac5dce5401f3d05495def1ce94d63fa9d823dda1e3a54 WHIRLPOOL 90572f1bcc80e6f3ff795d929c267dd746b59b111f4f97342e700ee2f8f1f0ceb644f34a04a83f80d3cb6a5c9bba60f0c677a5cfbd1c910a68e855a7b6cfd578 diff --git a/net-misc/cbqinit/cbqinit-0.7.3-r3.ebuild b/net-misc/cbqinit/cbqinit-0.7.3-r3.ebuild new file mode 100644 index 000000000000..6ab3386730f8 --- /dev/null +++ b/net-misc/cbqinit/cbqinit-0.7.3-r3.ebuild @@ -0,0 +1,35 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +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} -> ${P}" + +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}"/${P} "${S}"/cbqinit || die + grep '^#' cbqinit > README +} + +src_prepare() { + eapply -p0 "${FILESDIR}"/${P}-gentoo.patch + sed -i -e 's:/sbin/ip:/bin/ip:' cbqinit || die + default +} + +src_install() { + dosbin cbqinit + newinitd "${FILESDIR}"/rc_cbqinit-r1 cbqinit + dodoc "${FILESDIR}"/cbq-1280.My_first_shaper.sample README +} diff --git a/net-misc/cbqinit/files/cbq-1280.My_first_shaper.sample b/net-misc/cbqinit/files/cbq-1280.My_first_shaper.sample new file mode 100644 index 000000000000..3b3c1a01804b --- /dev/null +++ b/net-misc/cbqinit/files/cbq-1280.My_first_shaper.sample @@ -0,0 +1,5 @@ +DEVICE=eth0,10Mbit,1Mbit +RATE=128Kbit +WEIGHT=10Kbit +PRIO=5 +RULE=192.128.1.0/24 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/rc_cbqinit-r1 b/net-misc/cbqinit/files/rc_cbqinit-r1 new file mode 100644 index 000000000000..2c811a54db26 --- /dev/null +++ b/net-misc/cbqinit/files/rc_cbqinit-r1 @@ -0,0 +1,30 @@ +#!/sbin/openrc-run +# Copyright 1999-2016 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 $? +} + +stop() { + ebegin "Stopping cbqinit" + /usr/sbin/cbqinit stop + eend +} diff --git a/net-misc/cbqinit/metadata.xml b/net-misc/cbqinit/metadata.xml new file mode 100644 index 000000000000..30d444a41f42 --- /dev/null +++ b/net-misc/cbqinit/metadata.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <!-- maintainer-needed --> + <upstream> + <remote-id type="sourceforge">cbqinit</remote-id> + </upstream> +</pkgmetadata> |