1 |
commit: 1441cac1e60e036d847edf253d6bfbf313576c73 |
2 |
Author: Austin English <wizardedit <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue May 3 23:34:45 2016 +0000 |
4 |
Commit: Austin English <wizardedit <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed May 4 00:08:37 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1441cac1 |
7 |
|
8 |
net-misc/htbinit: use #!/sbin/openrc-run instead of #!/sbin/runscript |
9 |
|
10 |
Gentoo-Bug: https://bugs.gentoo.org/573846 |
11 |
|
12 |
Package-Manager: portage-2.2.26 |
13 |
|
14 |
net-misc/htbinit/files/htbinit.rc | 4 +-- |
15 |
net-misc/htbinit/htbinit-0.8.5-r7.ebuild | 61 ++++++++++++++++++++++++++++++++ |
16 |
2 files changed, 63 insertions(+), 2 deletions(-) |
17 |
|
18 |
diff --git a/net-misc/htbinit/files/htbinit.rc b/net-misc/htbinit/files/htbinit.rc |
19 |
index 7a27d58..8a77984 100644 |
20 |
--- a/net-misc/htbinit/files/htbinit.rc |
21 |
+++ b/net-misc/htbinit/files/htbinit.rc |
22 |
@@ -1,5 +1,5 @@ |
23 |
-#!/sbin/runscript |
24 |
-# Copyright 1999-2012 Gentoo Foundation |
25 |
+#!/sbin/openrc-run |
26 |
+# Copyright 1999-2016 Gentoo Foundation |
27 |
# Distributed under the terms of the GNU General Public License v2 |
28 |
# $Id$ |
29 |
|
30 |
|
31 |
diff --git a/net-misc/htbinit/htbinit-0.8.5-r7.ebuild b/net-misc/htbinit/htbinit-0.8.5-r7.ebuild |
32 |
new file mode 100644 |
33 |
index 0000000..00dabd9 |
34 |
--- /dev/null |
35 |
+++ b/net-misc/htbinit/htbinit-0.8.5-r7.ebuild |
36 |
@@ -0,0 +1,61 @@ |
37 |
+# Copyright 1999-2016 Gentoo Foundation |
38 |
+# Distributed under the terms of the GNU General Public License v2 |
39 |
+# $Id$ |
40 |
+ |
41 |
+EAPI=5 |
42 |
+inherit eutils linux-info |
43 |
+ |
44 |
+DESCRIPTION="Sets up Hierachical Token Bucket based traffic control (QoS) with iproute2" |
45 |
+HOMEPAGE="http://www.sourceforge.net/projects/htbinit" |
46 |
+SRC_URI="mirror://sourceforge/htbinit/htb.init-v${PV}" |
47 |
+ |
48 |
+LICENSE="GPL-2" |
49 |
+SLOT="0" |
50 |
+KEYWORDS="amd64 ~ppc x86" |
51 |
+IUSE="ipv6 esfq" |
52 |
+ |
53 |
+DEPEND="sys-apps/iproute2" |
54 |
+RDEPEND="${DEPEND}" |
55 |
+ |
56 |
+S=${WORKDIR} |
57 |
+ |
58 |
+pkg_setup() { |
59 |
+ for i in NET_SCH_HTB NET_SCH_SFQ NET_CLS_FW NET_CLS_U32 NET_CLS_ROUTE4 ; do |
60 |
+ CONFIG_CHECK="${CONFIG_CHECK} ~${i}" |
61 |
+ done |
62 |
+ use esfq && CONFIG_CHECK="${CONFIG_CHECK} ~NET_SCH_ESFQ" |
63 |
+ linux-info_pkg_setup |
64 |
+} |
65 |
+ |
66 |
+src_unpack() { |
67 |
+ cp "${DISTDIR}"/htb.init-v${PV} "${S}"/htb.init || die |
68 |
+} |
69 |
+ |
70 |
+src_prepare() { |
71 |
+ sed -i 's|/etc/sysconfig/htb|/etc/htb|g' "${S}"/htb.init |
72 |
+ epatch "${FILESDIR}"/htb.init-v0.8.5_tos.patch |
73 |
+ use ipv6 && epatch "${FILESDIR}"/htb_0.8.5_ipv6.diff |
74 |
+ use esfq && epatch "${FILESDIR}"/htb_0.8.5_esfq.diff |
75 |
+ epatch "${FILESDIR}"/prio_rule.patch |
76 |
+ epatch "${FILESDIR}"/timecheck_fix.patch |
77 |
+ epatch "${FILESDIR}"/htb.init_find_fix.patch |
78 |
+ sed -i -e 's:/sbin/ip:/bin/ip:g' "${S}"/htb.init # bug #474700 |
79 |
+} |
80 |
+ |
81 |
+src_compile() { |
82 |
+ : |
83 |
+} |
84 |
+ |
85 |
+src_install() { |
86 |
+ dosbin htb.init |
87 |
+ newinitd "${FILESDIR}"/htbinit.rc htbinit |
88 |
+ keepdir /etc/htb |
89 |
+} |
90 |
+ |
91 |
+pkg_postinst() { |
92 |
+ if [[ -z ${REPLACING_VERSIONS} ]] ; then |
93 |
+ elog 'Run "rc-update add htbinit default" to run htb.init at startup.' |
94 |
+ elog 'Please, read carefully the htb.init documentation.' |
95 |
+ elog 'New directory to store configuration is /etc/htb.' |
96 |
+ fi |
97 |
+} |