summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2021-04-20 02:19:19 +0100
committerSam James <sam@gentoo.org>2021-04-20 02:20:45 +0100
commit6ae3ebb95783618f3d3d047d38ef6fd700920076 (patch)
treed09c4f35bae684878193e070c86314814f5641e3 /net-misc
parentnet-misc/udpxy: port to EAPI 7 (diff)
downloadgentoo-6ae3ebb95783618f3d3d047d38ef6fd700920076.tar.gz
gentoo-6ae3ebb95783618f3d3d047d38ef6fd700920076.tar.bz2
gentoo-6ae3ebb95783618f3d3d047d38ef6fd700920076.zip
net-misc/htbinit: port to EAPI 7
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'net-misc')
-rw-r--r--net-misc/htbinit/files/htb.init-v0.8.5_tos.patch4
-rw-r--r--net-misc/htbinit/files/htb.init_find_fix.patch4
-rw-r--r--net-misc/htbinit/files/htb_0.8.5_esfq.patch (renamed from net-misc/htbinit/files/htb_0.8.5_esfq.diff)4
-rw-r--r--net-misc/htbinit/files/htb_0.8.5_ipv6.patch (renamed from net-misc/htbinit/files/htb_0.8.5_ipv6.diff)4
-rw-r--r--net-misc/htbinit/files/prio_rule.patch4
-rw-r--r--net-misc/htbinit/files/timecheck_fix.patch4
-rw-r--r--net-misc/htbinit/htbinit-0.8.5-r7.ebuild37
7 files changed, 36 insertions, 25 deletions
diff --git a/net-misc/htbinit/files/htb.init-v0.8.5_tos.patch b/net-misc/htbinit/files/htb.init-v0.8.5_tos.patch
index a798508631d3..f45b5c073493 100644
--- a/net-misc/htbinit/files/htb.init-v0.8.5_tos.patch
+++ b/net-misc/htbinit/files/htb.init-v0.8.5_tos.patch
@@ -1,5 +1,5 @@
---- htb.init.old 2005-03-15 14:56:08.328305288 +0200
-+++ htb.init 2005-03-15 15:05:16.612953352 +0200
+--- a/htb.init
++++ b/htb.init
@@ -240,6 +240,10 @@
# Maximum packet size HTB creates rate maps for. The default should
# be sufficient for most cases, it certainly is for Ethernet.
diff --git a/net-misc/htbinit/files/htb.init_find_fix.patch b/net-misc/htbinit/files/htb.init_find_fix.patch
index 12222b3e32a5..27fce89ef2da 100644
--- a/net-misc/htbinit/files/htb.init_find_fix.patch
+++ b/net-misc/htbinit/files/htb.init_find_fix.patch
@@ -1,5 +1,5 @@
---- htb.init.old 2004-01-29 22:41:23.000000000 +0100
-+++ htb.init 2006-09-08 00:22:11.000000000 +0200
+--- a/htb.init
++++ b/htb.init
@@ -468,8 +468,8 @@
### List of classes in $HTB_PATH
htb_class_list () {
diff --git a/net-misc/htbinit/files/htb_0.8.5_esfq.diff b/net-misc/htbinit/files/htb_0.8.5_esfq.patch
index 3130f6868a4f..506c505f8e47 100644
--- a/net-misc/htbinit/files/htb_0.8.5_esfq.diff
+++ b/net-misc/htbinit/files/htb_0.8.5_esfq.patch
@@ -1,5 +1,5 @@
---- htb.init.old 2004-01-29 22:41:23.000000000 +0100
-+++ htb.init 2006-09-07 23:32:58.000000000 +0200
+--- a/htb.init
++++ b/htb.init
@@ -226,7 +226,7 @@
# priority. Also, classes with higher priority are offered excess
# bandwidth first.
diff --git a/net-misc/htbinit/files/htb_0.8.5_ipv6.diff b/net-misc/htbinit/files/htb_0.8.5_ipv6.patch
index 815f99545a61..6e99319f2c62 100644
--- a/net-misc/htbinit/files/htb_0.8.5_ipv6.diff
+++ b/net-misc/htbinit/files/htb_0.8.5_ipv6.patch
@@ -1,5 +1,5 @@
---- htb.init.old 2004-01-29 22:41:23.000000000 +0100
-+++ htb.init 2006-09-07 23:32:58.000000000 +0200
+--- a/htb.init
++++ b/htb.init
@@ -275,6 +284,7 @@
### Filtering parameters
#
diff --git a/net-misc/htbinit/files/prio_rule.patch b/net-misc/htbinit/files/prio_rule.patch
index 28471aabb84e..429a1bed0ad1 100644
--- a/net-misc/htbinit/files/prio_rule.patch
+++ b/net-misc/htbinit/files/prio_rule.patch
@@ -1,5 +1,5 @@
---- htb.init.old 2004-01-29 22:41:23.000000000 +0100
-+++ htb.init 2006-09-08 00:03:32.000000000 +0200
+--- a/htb.init
++++ b/htb.init
@@ -453,7 +457,7 @@
### Load & filter file $HTB_PATH/$1
htb_filter_file () {
diff --git a/net-misc/htbinit/files/timecheck_fix.patch b/net-misc/htbinit/files/timecheck_fix.patch
index de3791af997d..4797ea6fd0ab 100644
--- a/net-misc/htbinit/files/timecheck_fix.patch
+++ b/net-misc/htbinit/files/timecheck_fix.patch
@@ -1,5 +1,5 @@
---- htb.init.old 2004-01-29 22:41:23.000000000 +0100
-+++ htb.init 2006-09-08 00:11:36.000000000 +0200
+--- a/htb.init
++++ b/htb.init
@@ -891,7 +895,6 @@
TIME_TMP=`date +%w/%k:%M`
TIME_DOW=${TIME_TMP%%/*}
diff --git a/net-misc/htbinit/htbinit-0.8.5-r7.ebuild b/net-misc/htbinit/htbinit-0.8.5-r7.ebuild
index c7a38b5aae11..1ae14a2d6a5b 100644
--- a/net-misc/htbinit/htbinit-0.8.5-r7.ebuild
+++ b/net-misc/htbinit/htbinit-0.8.5-r7.ebuild
@@ -1,28 +1,36 @@
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=5
+EAPI=7
-inherit epatch linux-info
+inherit linux-info
DESCRIPTION="Sets up Hierachical Token Bucket based traffic control (QoS) with iproute2"
HOMEPAGE="https://www.sourceforge.net/projects/htbinit/"
SRC_URI="mirror://sourceforge/htbinit/htb.init-v${PV}"
+S="${WORKDIR}"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="amd64 ~ppc x86"
-IUSE="ipv6 esfq"
+IUSE="esfq ipv6"
DEPEND="sys-apps/iproute2"
RDEPEND="${DEPEND}"
-S=${WORKDIR}
+PATCHES=(
+ "${FILESDIR}"/htb.init-v0.8.5_tos.patch
+ "${FILESDIR}"/prio_rule.patch
+ "${FILESDIR}"/timecheck_fix.patch
+ "${FILESDIR}"/htb.init_find_fix.patch
+)
pkg_setup() {
+ local i
for i in NET_SCH_HTB NET_SCH_SFQ NET_CLS_FW NET_CLS_U32 NET_CLS_ROUTE4 ; do
CONFIG_CHECK="${CONFIG_CHECK} ~${i}"
done
+
use esfq && CONFIG_CHECK="${CONFIG_CHECK} ~NET_SCH_ESFQ"
linux-info_pkg_setup
}
@@ -32,14 +40,15 @@ src_unpack() {
}
src_prepare() {
- sed -i 's|/etc/sysconfig/htb|/etc/htb|g' "${S}"/htb.init
- epatch "${FILESDIR}"/htb.init-v0.8.5_tos.patch
- use ipv6 && epatch "${FILESDIR}"/htb_0.8.5_ipv6.diff
- use esfq && epatch "${FILESDIR}"/htb_0.8.5_esfq.diff
- epatch "${FILESDIR}"/prio_rule.patch
- epatch "${FILESDIR}"/timecheck_fix.patch
- epatch "${FILESDIR}"/htb.init_find_fix.patch
- sed -i -e 's:/sbin/ip:/bin/ip:g' "${S}"/htb.init # bug #474700
+ default
+
+ sed -i 's|/etc/sysconfig/htb|/etc/htb|g' "${S}"/htb.init || die
+
+ use esfq && eapply "${FILESDIR}"/htb_0.8.5_esfq.patch
+ use ipv6 && eapply "${FILESDIR}"/htb_0.8.5_ipv6.patch
+
+ # bug #474700
+ sed -i -e 's:/sbin/ip:/bin/ip:g' "${S}"/htb.init || die
}
src_compile() {
@@ -48,12 +57,14 @@ src_compile() {
src_install() {
dosbin htb.init
+
newinitd "${FILESDIR}"/htbinit.rc htbinit
+
keepdir /etc/htb
}
pkg_postinst() {
- if [[ -z ${REPLACING_VERSIONS} ]] ; then
+ if [[ -z "${REPLACING_VERSIONS}" ]] ; then
elog 'Run "rc-update add htbinit default" to run htb.init at startup.'
elog 'Please, read carefully the htb.init documentation.'
elog 'New directory to store configuration is /etc/htb.'