1 |
commit: 80d5d4f48c0f6a6810a6e823e54aa0ec2c62cca1 |
2 |
Author: Eugene Glorg <eugene <AT> railglorg <DOT> net> |
3 |
AuthorDate: Wed Feb 23 19:41:55 2022 +0000 |
4 |
Commit: Sam James <sam <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Feb 26 02:36:27 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=80d5d4f4 |
7 |
|
8 |
net-misc/balance: add net_bind_service capability |
9 |
|
10 |
This changes binary capabilities and allows binding |
11 |
to privileged ports for non-root |
12 |
|
13 |
Signed-off-by: Eugene Glorg <glorg <AT> railglorg.net> |
14 |
Closes: https://github.com/gentoo/gentoo/pull/24325 |
15 |
Signed-off-by: Sam James <sam <AT> gentoo.org> |
16 |
|
17 |
net-misc/balance/balance-3.57-r1.ebuild | 43 +++++++++++++++++++++++++++++++++ |
18 |
1 file changed, 43 insertions(+) |
19 |
|
20 |
diff --git a/net-misc/balance/balance-3.57-r1.ebuild b/net-misc/balance/balance-3.57-r1.ebuild |
21 |
new file mode 100644 |
22 |
index 000000000000..b988c64b8a44 |
23 |
--- /dev/null |
24 |
+++ b/net-misc/balance/balance-3.57-r1.ebuild |
25 |
@@ -0,0 +1,43 @@ |
26 |
+# Copyright 1999-2022 Gentoo Authors |
27 |
+# Distributed under the terms of the GNU General Public License v2 |
28 |
+ |
29 |
+EAPI=8 |
30 |
+ |
31 |
+inherit fcaps toolchain-funcs |
32 |
+ |
33 |
+DESCRIPTION="TCP Load Balancing Port Forwarder" |
34 |
+HOMEPAGE="http://www.inlab.de/balance.html" |
35 |
+SRC_URI="http://www.inlab.de/${P}.tar.gz" |
36 |
+ |
37 |
+LICENSE="GPL-2" |
38 |
+SLOT="0" |
39 |
+KEYWORDS="~amd64 ~ppc ~x86" |
40 |
+IUSE="" |
41 |
+ |
42 |
+DEPEND="" |
43 |
+RDEPEND="" |
44 |
+ |
45 |
+PATCHES=( "${FILESDIR}"/${P}-Makefile.patch ) |
46 |
+ |
47 |
+FILECAPS=( |
48 |
+ 'CAP_NET_BIND_SERVICE' '/usr/sbin/balance' |
49 |
+) |
50 |
+ |
51 |
+src_prepare() { |
52 |
+ default |
53 |
+ |
54 |
+ tc-export CC |
55 |
+} |
56 |
+ |
57 |
+src_install() { |
58 |
+ default |
59 |
+ |
60 |
+ #autocreated on program start, if missing |
61 |
+ rm -rv "${ED}/var/run" || die |
62 |
+} |
63 |
+ |
64 |
+pkg_postinst() { |
65 |
+ fcaps_pkg_postinst |
66 |
+ elog "To run as non-root, be sure to have rendezvous directory created" |
67 |
+ elog "with either 'mkdir -m 01777 /var/run/balance' or using tmpfiles." |
68 |
+} |