net-im/biboumi: treeclean, moved to ::gentoo

Signed-off-by: Florian Schmaus <flow@gentoo.org>
This commit is contained in:
Florian Schmaus
2022-02-01 11:36:51 +01:00
parent 7cbd066097
commit a9af4fc744
8 changed files with 0 additions and 330 deletions

View File

@@ -1 +0,0 @@
DIST biboumi-9.0.tar.xz 161192 BLAKE2B 27c19f5c44e23caae07bd579b01d663e73cd8b432203ac95ae77e651936eea7cc443f389e589acebe5b36c32e96f215fdf0a86c97193726d601b53b709a2d66e SHA512 cfaacd831b56031906922472275c55fd6f1a5307ebe54959d21e3799ad4612499e8beeb34e8736df9eabc9fec1a861d17567250d64f316ace47395fd6c8f3c18

View File

@@ -1,99 +0,0 @@
# 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
}

View File

@@ -1,99 +0,0 @@
# Copyright 2020 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=( 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
}

View File

@@ -1,70 +0,0 @@
From b98434b5d04d1ada9b24475e17ee8947d96ad1e3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?louiz=E2=80=99?= <louiz@louiz.org>
Date: Sun, 16 Aug 2020 16:05:15 +0200
Subject: [PATCH] In CAP messages, handle the last arg as a list of
capabilities
Instead of just one. This fixes the issue of the "trailing whitespace" since we
now split it on ' '
Fix #3442
---
src/irc/irc_client.cpp | 25 ++++++++++++++-----------
tests/utils.cpp | 3 +++
2 files changed, 17 insertions(+), 11 deletions(-)
diff --git a/src/irc/irc_client.cpp b/src/irc/irc_client.cpp
index 3ae5ac6..5f0d9b9 100644
--- a/src/irc/irc_client.cpp
+++ b/src/irc/irc_client.cpp
@@ -1340,19 +1340,22 @@ long int IrcClient::get_throttle_limit() const
void IrcClient::on_cap(const IrcMessage &message)
{
const auto& sub_command = message.arguments[1];
- const auto& cap = message.arguments[2];
- auto it = this->capabilities.find(cap);
- if (it == this->capabilities.end())
+ const auto& caps = utils::split(message.arguments[2], ' ', false);
+ for (const auto& cap: caps)
{
- log_warning("Received a CAP message for something we didnt ask, or that we already handled.");
- return;
+ auto it = this->capabilities.find(cap);
+ if (it == this->capabilities.end())
+ {
+ log_warning("Received a CAP message for something we didnt ask, or that we already handled: [", cap, "]");
+ return;
+ }
+ Capability& capability = it->second;
+ if (sub_command == "ACK")
+ capability.on_ack();
+ else if (sub_command == "NACK")
+ capability.on_nack();
+ this->capabilities.erase(it);
}
- Capability& capability = it->second;
- if (sub_command == "ACK")
- capability.on_ack();
- else if (sub_command == "NACK")
- capability.on_nack();
- this->capabilities.erase(it);
if (this->capabilities.empty())
this->cap_end();
}
diff --git a/tests/utils.cpp b/tests/utils.cpp
index 6de19f0..6151733 100644
--- a/tests/utils.cpp
+++ b/tests/utils.cpp
@@ -28,6 +28,9 @@ TEST_CASE("String split")
CHECK(splitted.size() == 2);
CHECK(splitted[0] == "");
CHECK(splitted[1] == "a");
+ splitted = utils::split("multi-prefix ", ' ');
+ CHECK(splitted[0] == "multi-prefix");
+ CHECK(splitted.size() == 1);
}
TEST_CASE("tolower")
--
2.26.2

View File

@@ -1,21 +0,0 @@
#!/sbin/openrc-run
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
description="XMPP gateway to IRC"
pidfile="/var/run/biboumi.pid"
command="/usr/bin/biboumi"
command_args="${BIBOUMI_CONFIG:-/etc/biboumi/biboumi.cfg}"
command_user="${BIBOUMI_USER:-biboumi}"
command_background="true"
extra_commands="reload"
depend() {
use jabber-server
}
reload() {
ebegin "Reloading configuration of Biboumi"
start-stop-daemon --pidfile ${pidfile} --signal USR1
eend $?
}

View File

@@ -1,10 +0,0 @@
/var/log/biboumi/*.log {
missingok
notifempty
sharedscripts
postrotate
for service in /etc/init.d/biboumi*; do
rc-service $(basename ${service}) reload > /dev/null
done
endscript
}

View File

@@ -1,8 +0,0 @@
/var/log/biboumi/*.log {
missingok
notifempty
sharedscripts
postrotate
systemctl reload biboumi.service
endscript
}

View File

@@ -1,22 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="person">
<email>gentoo@tastytea.de</email>
<name>Ronny (tastytea) Gutbrod</name>
</maintainer>
<longdescription lang="en">
Biboumi is an XMPP gateway that connects to IRC servers and translates
between the two protocols. It can be used to access IRC channels using
any XMPP client as if these channels were XMPP MUCs.
</longdescription>
<upstream>
<doc>https://doc.biboumi.louiz.org/</doc>
<bugs-to>https://lab.louiz.org/louiz/biboumi/issues</bugs-to>
</upstream>
<use>
<flag name="udns">Asynchronously resolve domain names using
net-libs/udns</flag>
<flag name="logrotate">Use app-admin/logrotate for rotating logs</flag>
</use>
</pkgmetadata>