[gentoo-commits] repo/gentoo:master commit in: net-misc/htbinit/files/

2023-11-22 Thread Ulrich Müller
commit: a7696163d034ae029c2647a796b81fe1c5187972
Author: Ulrich Müller  gentoo  org>
AuthorDate: Wed Nov 22 18:56:27 2023 +
Commit: Ulrich Müller  gentoo  org>
CommitDate: Wed Nov 22 18:56:27 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a7696163

net-misc/htbinit/files: Update patches

Some of them applied only with a fuzz factor.

Signed-off-by: Ulrich Müller  gentoo.org>

 net-misc/htbinit/files/htb.init-v0.8.5_tos.patch | 10 +-
 net-misc/htbinit/files/htb.init_find_fix.patch   |  6 +++---
 net-misc/htbinit/files/htb_0.8.5_esfq.patch  |  6 +++---
 net-misc/htbinit/files/htb_0.8.5_ipv6.patch  | 16 
 net-misc/htbinit/files/prio_rule.patch   |  4 ++--
 net-misc/htbinit/files/timecheck_fix.patch   |  6 +++---
 6 files changed, 24 insertions(+), 24 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 f45b5c073493..438ba7d83962 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,8 +1,8 @@
 --- 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.
+ # Maximum packet size HTB creates rate maps for. The default should
+ # be sufficient for most cases, it certainly is for Ethernet.
  #
 +# TOS= optional, default "none"
 +#
@@ -11,7 +11,7 @@
  ### SFQ qdisc parameters
  #
  # The SFQ queueing discipline is a cheap way to fairly share class bandwidth
-@@ -435,6 +435,7 @@
+@@ -435,6 +439,7 @@
  HTB_CLASS="RATE\|CEIL\|BURST\|CBURST\|PRIO\|LEAF\|MTU"
  HTB_CLASS="$HTB_CLASS\|PRIO_RULE\|PRIO_MARK\|PRIO_REALM"
  HTB_CLASS="$HTB_CLASS\|LIMIT\|QUANTUM\|PERTURB"
@@ -19,7 +19,7 @@
  
  
  #
-@@ -646,7 +647,7 @@
+@@ -646,7 +651,7 @@
### Set defaults & load class
MTU=""; LEAF=none; PERTURB=10
RATE=""; BURST=""; CEIL=""; CBURST=""
@@ -28,7 +28,7 @@

PRIO_RULE=$PRIO_RULE_DEFAULT
PRIO_MARK=$PRIO_MARK_DEFAULT
-@@ -868,12 +869,19 @@
+@@ -868,12 +873,19 @@
u32_d="${DPORT:+match ip dport $DPORT $DMASK}"
u32_d="${DADDR:+match ip dst $DADDR} $u32_d"
  

diff --git a/net-misc/htbinit/files/htb.init_find_fix.patch 
b/net-misc/htbinit/files/htb.init_find_fix.patch
index 27fce89ef2da..200fcfbfb411 100644
--- a/net-misc/htbinit/files/htb.init_find_fix.patch
+++ b/net-misc/htbinit/files/htb.init_find_fix.patch
@@ -1,6 +1,6 @@
 --- a/htb.init
 +++ b/htb.init
-@@ -468,8 +468,8 @@
+@@ -473,8 +473,8 @@
### List of classes in $HTB_PATH
htb_class_list () {
for dev in `htb_device_list`; do
@@ -11,7 +11,7 @@
-printf "%f\n"| sort
done
} # htb_class_list
-@@ -483,8 +483,8 @@
+@@ -488,8 +488,8 @@
### Validate cache against config files
htb_valid_cache () {
for dev in `htb_device_list`; do
@@ -22,7 +22,7 @@
  wc -l` -gt 0 ] && VALID=0
[ $VALID -ne 1 ] && break
done
-@@ -493,7 +493,7 @@
+@@ -498,7 +498,7 @@
  
### Find class config for device $1, which is newer than cache
htb_cache_older () {

diff --git a/net-misc/htbinit/files/htb_0.8.5_esfq.patch 
b/net-misc/htbinit/files/htb_0.8.5_esfq.patch
index 506c505f8e47..fc7c92ddb4cb 100644
--- a/net-misc/htbinit/files/htb_0.8.5_esfq.patch
+++ b/net-misc/htbinit/files/htb_0.8.5_esfq.patch
@@ -9,7 +9,7 @@
  #
  # Tells the script to attach specified leaf queueing discipline to HTB
  # class. By default, no leaf qdisc is used.
-@@ -261,6 +261,15 @@
+@@ -265,6 +265,15 @@
  # will never take place which is what you probably don't want. The
  # default value of 10 seconds is probably a good value.
  #
@@ -25,7 +25,7 @@
  ### PFIFO/BFIFO qdisc parameters
  #
  # Those are simple FIFO queueing disciplines. They only have one parameter
-@@ -427,14 +445,14 @@
+@@ -440,14 +449,14 @@
  
  ### Modules to probe for. Uncomment the last HTB_PROBE
  ### line if you have QoS support compiled into kernel
@@ -42,7 +42,7 @@
  HTB_CLASS="$HTB_CLASS\|TOS"
  
  
-@@ -801,6 +819,8 @@
+@@ -815,6 +824,8 @@
LEAFPARM="${PERTURB:+perturb $PERTURB} 
${QUANTUM:+quantum $QUANTUM}"
elif [ "$LEAF" = "pfifo" -o "$LEAF" = "bfifo" ]; then
LEAFPARM="${LIMIT:+limit $LIMIT}"

diff --git a/net-misc/htbinit/files/htb_0.8.5_ipv6.patch 
b/net-misc/htbinit/files/htb_0.8.5_ipv6.patch
index 6e99319f2c62..526e7fcb85c5 100644
--- a/net-misc/htbinit/files/htb_0.8.5_ipv6.patch
+++ b/net-misc/htbinit/files/htb_0.8.5_ipv6.patch
@@ -1,6 +1,6 @@
 --- a/htb.init
 +++ b/htb.init
-@@ -275,6 +284,7 @@
+@@ -279,6 +279,7 @@
  ### 

[gentoo-commits] repo/gentoo:master commit in: net-misc/htbinit/

2023-11-22 Thread Ulrich Müller
commit: 1af79cecc93d314d1d97fc09d88345afa20d5527
Author: Michael Mair-Keimberger  levelnine  at>
AuthorDate: Wed Nov  1 19:04:17 2023 +
Commit: Ulrich Müller  gentoo  org>
CommitDate: Wed Nov 22 18:42:14 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1af79cec

net-misc/htbinit: EAPI8 bump, ebuild improvements

Signed-off-by: Michael Mair-Keimberger  levelnine.at>
Signed-off-by: Ulrich Müller  gentoo.org>

 net-misc/htbinit/htbinit-0.8.5-r8.ebuild | 72 
 1 file changed, 72 insertions(+)

diff --git a/net-misc/htbinit/htbinit-0.8.5-r8.ebuild 
b/net-misc/htbinit/htbinit-0.8.5-r8.ebuild
new file mode 100644
index ..438692db1db6
--- /dev/null
+++ b/net-misc/htbinit/htbinit-0.8.5-r8.ebuild
@@ -0,0 +1,72 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit linux-info
+
+DESCRIPTION="Sets up Hierachical Token Bucket based traffic control (QoS) with 
iproute2"
+HOMEPAGE="https://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="esfq"
+
+DEPEND="sys-apps/iproute2"
+RDEPEND="${DEPEND}"
+
+PATCHES=(
+   "${FILESDIR}"/htb.init-v0.8.5_tos.patch
+   "${FILESDIR}"/prio_rule.patch
+   "${FILESDIR}"/timecheck_fix.patch
+   "${FILESDIR}"/htb.init_find_fix.patch
+   "${FILESDIR}"/htb_0.8.5_ipv6.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
+}
+
+src_unpack() {
+   cp "${DISTDIR}"/htb.init-v${PV} "${S}"/htb.init || die
+}
+
+src_prepare() {
+   default
+
+   sed -i 's|/etc/sysconfig/htb|/etc/htb|g' "${S}"/htb.init || die
+
+   use esfq && eapply "${FILESDIR}"/htb_0.8.5_esfq.patch
+
+   # bug #474700
+   sed -i -e 's:/sbin/ip:/bin/ip:g' "${S}"/htb.init || die
+}
+
+src_compile() {
+   :
+}
+
+src_install() {
+   dosbin htb.init
+
+   newinitd "${FILESDIR}"/htbinit.rc htbinit
+
+   keepdir /etc/htb
+}
+
+pkg_postinst() {
+   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.'
+   fi
+}



[gentoo-commits] repo/gentoo:master commit in: net-misc/htbinit/

2023-11-22 Thread Ulrich Müller
commit: 1f66ffe07f255dc7ff7a5ff421f06aa0555db28f
Author: Michael Mair-Keimberger  levelnine  at>
AuthorDate: Wed Nov  1 19:01:03 2023 +
Commit: Ulrich Müller  gentoo  org>
CommitDate: Wed Nov 22 18:42:13 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1f66ffe0

net-misc/htbinit: update HOMEPAGE, fix LICENSE

Signed-off-by: Michael Mair-Keimberger  levelnine.at>
Signed-off-by: Ulrich Müller  gentoo.org>

 net-misc/htbinit/htbinit-0.8.5-r7.ebuild | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/net-misc/htbinit/htbinit-0.8.5-r7.ebuild 
b/net-misc/htbinit/htbinit-0.8.5-r7.ebuild
index 1ae14a2d6a5b..3ac43d29785a 100644
--- a/net-misc/htbinit/htbinit-0.8.5-r7.ebuild
+++ b/net-misc/htbinit/htbinit-0.8.5-r7.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=7
@@ -6,11 +6,11 @@ EAPI=7
 inherit linux-info
 
 DESCRIPTION="Sets up Hierachical Token Bucket based traffic control (QoS) with 
iproute2"
-HOMEPAGE="https://www.sourceforge.net/projects/htbinit/;
+HOMEPAGE="https://sourceforge.net/projects/htbinit/;
 SRC_URI="mirror://sourceforge/htbinit/htb.init-v${PV}"
 S="${WORKDIR}"
 
-LICENSE="GPL-2"
+LICENSE="GPL-2+"
 SLOT="0"
 KEYWORDS="amd64 ~ppc x86"
 IUSE="esfq ipv6"



[gentoo-commits] repo/gentoo:master commit in: net-misc/htbinit/files/, net-misc/htbinit/

2021-04-19 Thread Sam James
commit: 6ae3ebb95783618f3d3d047d38ef6fd700920076
Author: Sam James  gentoo  org>
AuthorDate: Tue Apr 20 01:19:19 2021 +
Commit: Sam James  gentoo  org>
CommitDate: Tue Apr 20 01:20:45 2021 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6ae3ebb9

net-misc/htbinit: port to EAPI 7

Signed-off-by: Sam James  gentoo.org>

 net-misc/htbinit/files/htb.init-v0.8.5_tos.patch   |  4 +--
 net-misc/htbinit/files/htb.init_find_fix.patch |  4 +--
 .../{htb_0.8.5_esfq.diff => htb_0.8.5_esfq.patch}  |  4 +--
 .../{htb_0.8.5_ipv6.diff => htb_0.8.5_ipv6.patch}  |  4 +--
 net-misc/htbinit/files/prio_rule.patch |  4 +--
 net-misc/htbinit/files/timecheck_fix.patch |  4 +--
 net-misc/htbinit/htbinit-0.8.5-r7.ebuild   | 37 ++
 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 a798508631d..f45b5c07349 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 1b3e32a..27fce89ef2d 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.0 +0100
-+++ htb.init   2006-09-08 00:22:11.0 +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
similarity index 94%
rename from net-misc/htbinit/files/htb_0.8.5_esfq.diff
rename to net-misc/htbinit/files/htb_0.8.5_esfq.patch
index 3130f6868a4..506c505f8e4 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.0 +0100
-+++ htb.init   2006-09-07 23:32:58.0 +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
similarity index 97%
rename from net-misc/htbinit/files/htb_0.8.5_ipv6.diff
rename to net-misc/htbinit/files/htb_0.8.5_ipv6.patch
index 815f99545a6..6e99319f2c6 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.0 +0100
-+++ htb.init   2006-09-07 23:32:58.0 +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 28471aabb84..429a1bed0ad 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.0 +0100
-+++ htb.init   2006-09-08 00:03:32.0 +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 de3791af997..4797ea6fd0a 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.0 +0100
-+++ htb.init   2006-09-08 00:11:36.0 +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 c7a38b5aae1..1ae14a2d6a5 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=(

[gentoo-commits] repo/gentoo:master commit in: net-misc/htbinit/

2018-05-20 Thread Aaron Bauman
commit: 1f877412315082cc9cde4798b384fba7e4cdb9e1
Author: Michael Mair-Keimberger  gmail  com>
AuthorDate: Sun May 20 12:07:43 2018 +
Commit: Aaron Bauman  gentoo  org>
CommitDate: Sun May 20 23:25:05 2018 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1f877412

net-misc/htbinit: use HTTPS

 net-misc/htbinit/htbinit-0.8.5-r7.ebuild | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/net-misc/htbinit/htbinit-0.8.5-r7.ebuild 
b/net-misc/htbinit/htbinit-0.8.5-r7.ebuild
index 551fa1f2136..2fab64e9f10 100644
--- a/net-misc/htbinit/htbinit-0.8.5-r7.ebuild
+++ b/net-misc/htbinit/htbinit-0.8.5-r7.ebuild
@@ -1,11 +1,11 @@
-# Copyright 1999-2016 Gentoo Foundation
+# Copyright 1999-2018 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=5
 inherit eutils linux-info
 
 DESCRIPTION="Sets up Hierachical Token Bucket based traffic control (QoS) with 
iproute2"
-HOMEPAGE="http://www.sourceforge.net/projects/htbinit;
+HOMEPAGE="https://www.sourceforge.net/projects/htbinit/;
 SRC_URI="mirror://sourceforge/htbinit/htb.init-v${PV}"
 
 LICENSE="GPL-2"



[gentoo-commits] repo/gentoo:master commit in: net-misc/htbinit/

2016-05-03 Thread Austin English
commit: f712af9a14a8970e58d21b225bf261d5569c9455
Author: Austin English  gentoo  org>
AuthorDate: Tue May  3 23:34:58 2016 +
Commit: Austin English  gentoo  org>
CommitDate: Wed May  4 00:08:37 2016 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f712af9a

net-misc/htbinit: remove old version

Package-Manager: portage-2.2.26

 net-misc/htbinit/htbinit-0.8.5-r6.ebuild | 61 
 1 file changed, 61 deletions(-)

diff --git a/net-misc/htbinit/htbinit-0.8.5-r6.ebuild 
b/net-misc/htbinit/htbinit-0.8.5-r6.ebuild
deleted file mode 100644
index 134522d..000
--- a/net-misc/htbinit/htbinit-0.8.5-r6.ebuild
+++ /dev/null
@@ -1,61 +0,0 @@
-# Copyright 1999-2014 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI=5
-inherit eutils linux-info
-
-DESCRIPTION="Sets up Hierachical Token Bucket based traffic control (QoS) with 
iproute2"
-HOMEPAGE="http://www.sourceforge.net/projects/htbinit;
-SRC_URI="mirror://sourceforge/htbinit/htb.init-v${PV}"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="amd64 ~ppc x86"
-IUSE="ipv6 esfq"
-
-DEPEND="sys-apps/iproute2"
-RDEPEND="${DEPEND}"
-
-S=${WORKDIR}
-
-pkg_setup() {
-   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
-}
-
-src_unpack() {
-   cp "${DISTDIR}"/htb.init-v${PV} "${S}"/htb.init || die
-}
-
-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
-}
-
-src_compile() {
-   :
-}
-
-src_install() {
-   dosbin htb.init
-   newinitd "${FILESDIR}"/htbinit.rc htbinit
-   keepdir /etc/htb
-}
-
-pkg_postinst() {
-   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.'
-   fi
-}



[gentoo-commits] repo/gentoo:master commit in: net-misc/htbinit/, net-misc/htbinit/files/

2016-05-03 Thread Austin English
commit: 1441cac1e60e036d847edf253d6bfbf313576c73
Author: Austin English  gentoo  org>
AuthorDate: Tue May  3 23:34:45 2016 +
Commit: Austin English  gentoo  org>
CommitDate: Wed May  4 00:08:37 2016 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1441cac1

net-misc/htbinit: use #!/sbin/openrc-run instead of #!/sbin/runscript

Gentoo-Bug: https://bugs.gentoo.org/573846

Package-Manager: portage-2.2.26

 net-misc/htbinit/files/htbinit.rc|  4 +--
 net-misc/htbinit/htbinit-0.8.5-r7.ebuild | 61 
 2 files changed, 63 insertions(+), 2 deletions(-)

diff --git a/net-misc/htbinit/files/htbinit.rc 
b/net-misc/htbinit/files/htbinit.rc
index 7a27d58..8a77984 100644
--- a/net-misc/htbinit/files/htbinit.rc
+++ b/net-misc/htbinit/files/htbinit.rc
@@ -1,5 +1,5 @@
-#!/sbin/runscript
-# Copyright 1999-2012 Gentoo Foundation
+#!/sbin/openrc-run
+# Copyright 1999-2016 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 # $Id$
 

diff --git a/net-misc/htbinit/htbinit-0.8.5-r7.ebuild 
b/net-misc/htbinit/htbinit-0.8.5-r7.ebuild
new file mode 100644
index 000..00dabd9
--- /dev/null
+++ b/net-misc/htbinit/htbinit-0.8.5-r7.ebuild
@@ -0,0 +1,61 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils linux-info
+
+DESCRIPTION="Sets up Hierachical Token Bucket based traffic control (QoS) with 
iproute2"
+HOMEPAGE="http://www.sourceforge.net/projects/htbinit;
+SRC_URI="mirror://sourceforge/htbinit/htb.init-v${PV}"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ~ppc x86"
+IUSE="ipv6 esfq"
+
+DEPEND="sys-apps/iproute2"
+RDEPEND="${DEPEND}"
+
+S=${WORKDIR}
+
+pkg_setup() {
+   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
+}
+
+src_unpack() {
+   cp "${DISTDIR}"/htb.init-v${PV} "${S}"/htb.init || die
+}
+
+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
+}
+
+src_compile() {
+   :
+}
+
+src_install() {
+   dosbin htb.init
+   newinitd "${FILESDIR}"/htbinit.rc htbinit
+   keepdir /etc/htb
+}
+
+pkg_postinst() {
+   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.'
+   fi
+}