1 |
commit: 5a615ae4fac1588080cbe33bf9c719b71520c482 |
2 |
Author: Ronny (tastytea) Gutbrod <gentoo <AT> tastytea <DOT> de> |
3 |
AuthorDate: Mon Aug 30 13:35:17 2021 +0000 |
4 |
Commit: Ronny Gutbrod <gentoo <AT> tastytea <DOT> de> |
5 |
CommitDate: Mon Aug 30 13:35:17 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=5a615ae4 |
7 |
|
8 |
net-im/biboumi: Prevent implicit suid by fcaps. |
9 |
|
10 |
fcaps.eclass sets u+s with USE="-filecaps" by default. |
11 |
|
12 |
Signed-off-by: Ronny (tastytea) Gutbrod <gentoo <AT> tastytea.de> |
13 |
|
14 |
net-im/biboumi/biboumi-9.0-r1.ebuild | 99 ++++++++++++++++++++++++++++++++++++ |
15 |
1 file changed, 99 insertions(+) |
16 |
|
17 |
diff --git a/net-im/biboumi/biboumi-9.0-r1.ebuild b/net-im/biboumi/biboumi-9.0-r1.ebuild |
18 |
new file mode 100644 |
19 |
index 000000000..7b679f006 |
20 |
--- /dev/null |
21 |
+++ b/net-im/biboumi/biboumi-9.0-r1.ebuild |
22 |
@@ -0,0 +1,99 @@ |
23 |
+# Copyright 2020-2021 Gentoo Authors |
24 |
+# Distributed under the terms of the GNU General Public License v2 |
25 |
+ |
26 |
+EAPI=7 |
27 |
+ |
28 |
+inherit cmake fcaps |
29 |
+ |
30 |
+MY_PV="${PV/_/-}" |
31 |
+ |
32 |
+DESCRIPTION="XMPP gateway to IRC" |
33 |
+HOMEPAGE="https://biboumi.louiz.org/" |
34 |
+SRC_URI="https://git.louiz.org/biboumi/snapshot/biboumi-${MY_PV}.tar.xz" |
35 |
+ |
36 |
+LICENSE="ZLIB" |
37 |
+SLOT="0" |
38 |
+KEYWORDS="~amd64" |
39 |
+IUSE="+idn logrotate postgres +sqlite +ssl systemd udns" |
40 |
+ |
41 |
+DEPEND=" |
42 |
+ dev-libs/expat |
43 |
+ virtual/libiconv |
44 |
+ sys-apps/util-linux |
45 |
+ sqlite? ( dev-db/sqlite ) |
46 |
+ postgres? ( dev-db/postgresql:* ) |
47 |
+ idn? ( net-dns/libidn ) |
48 |
+ udns? ( net-libs/udns ) |
49 |
+ ssl? ( dev-libs/botan:2 ) |
50 |
+ !ssl? ( dev-libs/libgcrypt ) |
51 |
+ systemd? ( sys-apps/systemd ) |
52 |
+" |
53 |
+BDEPEND="dev-python/sphinx" |
54 |
+RDEPEND=" |
55 |
+ ${DEPEND} |
56 |
+ acct-user/biboumi |
57 |
+" |
58 |
+ |
59 |
+S="${WORKDIR}/${PN}-${MY_PV}" |
60 |
+ |
61 |
+DOCS=( README.rst CHANGELOG.rst doc/user.rst ) |
62 |
+ |
63 |
+# Allow biboumi to run an identd on port 113. |
64 |
+FILECAPS=( -m 755 cap_net_bind_service+ep usr/bin/biboumi ) |
65 |
+ |
66 |
+src_prepare() { |
67 |
+ cmake_src_prepare |
68 |
+ |
69 |
+ if ! use systemd; then # Don't install biboumi.service. |
70 |
+ sed -i '/DESTINATION lib\/systemd\/system/d' CMakeLists.txt || die |
71 |
+ fi |
72 |
+} |
73 |
+ |
74 |
+src_configure() { |
75 |
+ local mycmakeargs=( |
76 |
+ -DWITH_BOTAN="$(usex ssl)" |
77 |
+ -DWITH_LIBIDN="$(usex idn)" |
78 |
+ -DWITH_SYSTEMD="$(usex systemd)" |
79 |
+ -DWITH_UDNS="$(usex udns)" |
80 |
+ -DWITH_SQLITE3="$(usex sqlite)" |
81 |
+ -DWITH_POSTGRESQL="$(usex postgres)" |
82 |
+ |
83 |
+ -DWITHOUT_SYSTEMD="$(usex systemd no yes)" |
84 |
+ -DWITHOUT_POSTGRESQL="$(usex postgres no yes)" |
85 |
+ ) # The WITHOUT_* is really needed. |
86 |
+ |
87 |
+ cmake_src_configure |
88 |
+} |
89 |
+ |
90 |
+src_compile() { |
91 |
+ cmake_src_compile |
92 |
+ |
93 |
+ cmake_build man |
94 |
+} |
95 |
+ |
96 |
+src_install() { |
97 |
+ cmake_src_install |
98 |
+ |
99 |
+ if ! use systemd; then |
100 |
+ newinitd "${FILESDIR}/${PN}.initd" "${PN}" |
101 |
+ fi |
102 |
+ |
103 |
+ if use logrotate; then |
104 |
+ insinto etc/logrotate.d |
105 |
+ if use systemd; then |
106 |
+ newins "${FILESDIR}/${PN}.logrotate.systemd" "${PN}" |
107 |
+ else |
108 |
+ newins "${FILESDIR}/${PN}.logrotate.openrc" "${PN}" |
109 |
+ fi |
110 |
+ fi |
111 |
+ |
112 |
+ diropts --owner=biboumi --group=biboumi --mode=750 |
113 |
+ if use sqlite; then |
114 |
+ keepdir var/lib/biboumi |
115 |
+ fi |
116 |
+ keepdir var/log/biboumi |
117 |
+ |
118 |
+ insinto etc/biboumi |
119 |
+ insopts --group=biboumi --mode=640 |
120 |
+ newins conf/biboumi.cfg biboumi.cfg.example |
121 |
+} |