aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRonny (tastytea) Gutbrod <gentoo@tastytea.de>2021-08-30 15:35:17 +0200
committerRonny (tastytea) Gutbrod <gentoo@tastytea.de>2021-08-30 15:35:17 +0200
commit5a615ae4fac1588080cbe33bf9c719b71520c482 (patch)
tree97325abcee1925e8d605ff7f1f7326f6d00a3fe3
parentdev-vcs/gitqlient: drop old 1.3.2 (diff)
downloadguru-5a615ae4.tar.gz
guru-5a615ae4.tar.bz2
guru-5a615ae4.zip
net-im/biboumi: Prevent implicit suid by fcaps.
fcaps.eclass sets u+s with USE="-filecaps" by default. Signed-off-by: Ronny (tastytea) Gutbrod <gentoo@tastytea.de>
-rw-r--r--net-im/biboumi/biboumi-9.0-r1.ebuild99
1 files changed, 99 insertions, 0 deletions
diff --git a/net-im/biboumi/biboumi-9.0-r1.ebuild b/net-im/biboumi/biboumi-9.0-r1.ebuild
new file mode 100644
index 000000000..7b679f006
--- /dev/null
+++ b/net-im/biboumi/biboumi-9.0-r1.ebuild
@@ -0,0 +1,99 @@
+# Copyright 2020-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit cmake fcaps
+
+MY_PV="${PV/_/-}"
+
+DESCRIPTION="XMPP gateway to IRC"
+HOMEPAGE="https://biboumi.louiz.org/"
+SRC_URI="https://git.louiz.org/biboumi/snapshot/biboumi-${MY_PV}.tar.xz"
+
+LICENSE="ZLIB"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="+idn logrotate postgres +sqlite +ssl systemd udns"
+
+DEPEND="
+ dev-libs/expat
+ virtual/libiconv
+ sys-apps/util-linux
+ sqlite? ( dev-db/sqlite )
+ postgres? ( dev-db/postgresql:* )
+ idn? ( net-dns/libidn )
+ udns? ( net-libs/udns )
+ ssl? ( dev-libs/botan:2 )
+ !ssl? ( dev-libs/libgcrypt )
+ systemd? ( sys-apps/systemd )
+"
+BDEPEND="dev-python/sphinx"
+RDEPEND="
+ ${DEPEND}
+ acct-user/biboumi
+"
+
+S="${WORKDIR}/${PN}-${MY_PV}"
+
+DOCS=( README.rst CHANGELOG.rst doc/user.rst )
+
+# Allow biboumi to run an identd on port 113.
+FILECAPS=( -m 755 cap_net_bind_service+ep usr/bin/biboumi )
+
+src_prepare() {
+ cmake_src_prepare
+
+ if ! use systemd; then # Don't install biboumi.service.
+ sed -i '/DESTINATION lib\/systemd\/system/d' CMakeLists.txt || die
+ fi
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DWITH_BOTAN="$(usex ssl)"
+ -DWITH_LIBIDN="$(usex idn)"
+ -DWITH_SYSTEMD="$(usex systemd)"
+ -DWITH_UDNS="$(usex udns)"
+ -DWITH_SQLITE3="$(usex sqlite)"
+ -DWITH_POSTGRESQL="$(usex postgres)"
+
+ -DWITHOUT_SYSTEMD="$(usex systemd no yes)"
+ -DWITHOUT_POSTGRESQL="$(usex postgres no yes)"
+ ) # The WITHOUT_* is really needed.
+
+ cmake_src_configure
+}
+
+src_compile() {
+ cmake_src_compile
+
+ cmake_build man
+}
+
+src_install() {
+ cmake_src_install
+
+ if ! use systemd; then
+ newinitd "${FILESDIR}/${PN}.initd" "${PN}"
+ fi
+
+ if use logrotate; then
+ insinto etc/logrotate.d
+ if use systemd; then
+ newins "${FILESDIR}/${PN}.logrotate.systemd" "${PN}"
+ else
+ newins "${FILESDIR}/${PN}.logrotate.openrc" "${PN}"
+ fi
+ fi
+
+ diropts --owner=biboumi --group=biboumi --mode=750
+ if use sqlite; then
+ keepdir var/lib/biboumi
+ fi
+ keepdir var/log/biboumi
+
+ insinto etc/biboumi
+ insopts --group=biboumi --mode=640
+ newins conf/biboumi.cfg biboumi.cfg.example
+}