From 0c82ef25271db6d75e7c3e162982b62796752afe Mon Sep 17 00:00:00 2001 From: "Ronny (tastytea) Gutbrod" Date: Wed, 22 Apr 2020 20:43:24 +0200 Subject: [PATCH 1/2] net-im/biboumi: New package. Signed-off-by: Ronny (tastytea) Gutbrod --- acct-group/biboumi/biboumi-0.ebuild | 10 ++ acct-group/biboumi/metadata.xml | 8 ++ acct-user/biboumi/biboumi-0.ebuild | 14 +++ acct-user/biboumi/metadata.xml | 8 ++ net-im/biboumi/Manifest | 1 + net-im/biboumi/biboumi-8.4.ebuild | 98 +++++++++++++++++++ net-im/biboumi/files/biboumi.initd | 21 ++++ net-im/biboumi/files/biboumi.logrotate.openrc | 10 ++ .../biboumi/files/biboumi.logrotate.systemd | 8 ++ net-im/biboumi/metadata.xml | 22 +++++ 10 files changed, 200 insertions(+) create mode 100644 acct-group/biboumi/biboumi-0.ebuild create mode 100644 acct-group/biboumi/metadata.xml create mode 100644 acct-user/biboumi/biboumi-0.ebuild create mode 100644 acct-user/biboumi/metadata.xml create mode 100644 net-im/biboumi/Manifest create mode 100644 net-im/biboumi/biboumi-8.4.ebuild create mode 100644 net-im/biboumi/files/biboumi.initd create mode 100644 net-im/biboumi/files/biboumi.logrotate.openrc create mode 100644 net-im/biboumi/files/biboumi.logrotate.systemd create mode 100644 net-im/biboumi/metadata.xml diff --git a/acct-group/biboumi/biboumi-0.ebuild b/acct-group/biboumi/biboumi-0.ebuild new file mode 100644 index 0000000000..35028819ce --- /dev/null +++ b/acct-group/biboumi/biboumi-0.ebuild @@ -0,0 +1,10 @@ +# Copyright 2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit acct-group + +KEYWORDS="~amd64" + +ACCT_GROUP_ID=-1 diff --git a/acct-group/biboumi/metadata.xml b/acct-group/biboumi/metadata.xml new file mode 100644 index 0000000000..5533c93d75 --- /dev/null +++ b/acct-group/biboumi/metadata.xml @@ -0,0 +1,8 @@ + + + + + gentoo@tastytea.de + Ronny (tastytea) Gutbrod + + diff --git a/acct-user/biboumi/biboumi-0.ebuild b/acct-user/biboumi/biboumi-0.ebuild new file mode 100644 index 0000000000..3c7f3923a7 --- /dev/null +++ b/acct-user/biboumi/biboumi-0.ebuild @@ -0,0 +1,14 @@ +# Copyright 2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit acct-user + +DESCRIPTION="User for net-im/biboumi" +KEYWORDS="~amd64" + +ACCT_USER_ID=-1 +ACCT_USER_GROUPS=( biboumi ) + +acct-user_add_deps diff --git a/acct-user/biboumi/metadata.xml b/acct-user/biboumi/metadata.xml new file mode 100644 index 0000000000..5533c93d75 --- /dev/null +++ b/acct-user/biboumi/metadata.xml @@ -0,0 +1,8 @@ + + + + + gentoo@tastytea.de + Ronny (tastytea) Gutbrod + + diff --git a/net-im/biboumi/Manifest b/net-im/biboumi/Manifest new file mode 100644 index 0000000000..7da872e6b4 --- /dev/null +++ b/net-im/biboumi/Manifest @@ -0,0 +1 @@ +DIST biboumi-8.4.tar.xz 142576 BLAKE2B 3be5f8caf406c480a2750d76eacfe9191bccd8bd0fc2ba0ffe6352bf6f6527ab60f16eb25c9820c063af6c9ff4f1b125eb8d51d53bae4392a0d276e7ad488087 SHA512 69f7a47aaf2729a6bffb047201305cef4b87da952aa103d82e715585bf7b2e97fca8159ced1d74c4b01508c874c0db274d7b8349d1579ee3e69fc0ced2c260c2 diff --git a/net-im/biboumi/biboumi-8.4.ebuild b/net-im/biboumi/biboumi-8.4.ebuild new file mode 100644 index 0000000000..280f4b3ea6 --- /dev/null +++ b/net-im/biboumi/biboumi-8.4.ebuild @@ -0,0 +1,98 @@ +# Copyright 2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit cmake fcaps + +DESCRIPTION="XMPP gateway to IRC" +HOMEPAGE="https://biboumi.louiz.org/" +SRC_URI="https://git.louiz.org/biboumi/snapshot/biboumi-${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="app-text/pandoc" +RDEPEND=" + ${DEPEND} + acct-user/biboumi" + +DOCS=( README.rst CHANGELOG.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_UDNS="$(usex udns no yes)" + -DWITHOUT_POSTGRESQL="$(usex postgres no yes)" + ) # The WITHOUT_* is really needed. + + cmake_src_configure +} + +src_compile() { + cmake_src_compile + + # The man page is not generated by the build system. + mkdir "${S}/man" || die + pandoc --standalone --to=man "doc/biboumi.1.rst" \ + --output="${S}/man/biboumi.1" || die +} + +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 + doins conf/biboumi.cfg +} diff --git a/net-im/biboumi/files/biboumi.initd b/net-im/biboumi/files/biboumi.initd new file mode 100644 index 0000000000..665db9120c --- /dev/null +++ b/net-im/biboumi/files/biboumi.initd @@ -0,0 +1,21 @@ +#!/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 $? +} diff --git a/net-im/biboumi/files/biboumi.logrotate.openrc b/net-im/biboumi/files/biboumi.logrotate.openrc new file mode 100644 index 0000000000..19964cf60f --- /dev/null +++ b/net-im/biboumi/files/biboumi.logrotate.openrc @@ -0,0 +1,10 @@ +/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 +} diff --git a/net-im/biboumi/files/biboumi.logrotate.systemd b/net-im/biboumi/files/biboumi.logrotate.systemd new file mode 100644 index 0000000000..b14f1df05f --- /dev/null +++ b/net-im/biboumi/files/biboumi.logrotate.systemd @@ -0,0 +1,8 @@ +/var/log/biboumi/*.log { + missingok + notifempty + sharedscripts + postrotate + systemctl reload biboumi.service + endscript +} diff --git a/net-im/biboumi/metadata.xml b/net-im/biboumi/metadata.xml new file mode 100644 index 0000000000..dabf900f88 --- /dev/null +++ b/net-im/biboumi/metadata.xml @@ -0,0 +1,22 @@ + + + + + gentoo@tastytea.de + Ronny (tastytea) Gutbrod + + + 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. + + + https://doc.biboumi.louiz.org/ + https://lab.louiz.org/louiz/biboumi/issues + + + Asynchronously resolve domain names using + net-libs/udns + Use app-admin/logrotate for rotating logs + + From d395466f9bfe2566f7fda5ff73e73ffc17641f61 Mon Sep 17 00:00:00 2001 From: "Ronny (tastytea) Gutbrod" Date: Thu, 23 Apr 2020 01:19:57 +0200 Subject: [PATCH 2/2] sys-libs/solo-udev-rules: New package. Signed-off-by: Ronny (tastytea) Gutbrod --- sys-libs/solo-udev-rules/Manifest | 1 + sys-libs/solo-udev-rules/metadata.xml | 11 ++++++ .../solo-udev-rules-4.0.0.ebuild | 37 +++++++++++++++++++ 3 files changed, 49 insertions(+) create mode 100644 sys-libs/solo-udev-rules/Manifest create mode 100644 sys-libs/solo-udev-rules/metadata.xml create mode 100644 sys-libs/solo-udev-rules/solo-udev-rules-4.0.0.ebuild diff --git a/sys-libs/solo-udev-rules/Manifest b/sys-libs/solo-udev-rules/Manifest new file mode 100644 index 0000000000..a457fb35ef --- /dev/null +++ b/sys-libs/solo-udev-rules/Manifest @@ -0,0 +1 @@ +DIST solo-4.0.0.tar.gz 1173865 BLAKE2B 1a2d62daf46d3a4a90a65d5034912b048c63a8f6fd3f4dde76fcb3c283d679bc96a7d3cf92945f6c6817f7e505cb540c4264f83ea7db872aa1b3daad864275ac SHA512 210ef65f0b667f0a0c6c096f5f1346574ba70e6f8476e8657ac4c862cbd75de66b644aba884dc37773ecbda4ecd0e495dbbdef3febfbc0e43a265435cfc0ea3f diff --git a/sys-libs/solo-udev-rules/metadata.xml b/sys-libs/solo-udev-rules/metadata.xml new file mode 100644 index 0000000000..6d28f98192 --- /dev/null +++ b/sys-libs/solo-udev-rules/metadata.xml @@ -0,0 +1,11 @@ + + + + + gentoo@tastytea.de + Ronny (tastytea) Gutbrod + + + https://github.com/solokeys/solo/issues + + diff --git a/sys-libs/solo-udev-rules/solo-udev-rules-4.0.0.ebuild b/sys-libs/solo-udev-rules/solo-udev-rules-4.0.0.ebuild new file mode 100644 index 0000000000..b92f77d9a4 --- /dev/null +++ b/sys-libs/solo-udev-rules/solo-udev-rules-4.0.0.ebuild @@ -0,0 +1,37 @@ +# Copyright 2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit udev + +MY_P="solo-${PV}" +DESCRIPTION="udev rules for the Solo FIDO2 & U2F USB+NFC security key" +HOMEPAGE=" + https://solokeys.com/ + https://github.com/solokeys/solo +" +SRC_URI="https://github.com/solokeys/solo/archive/${PV}.tar.gz -> ${MY_P}.tar.gz" + +LICENSE="|| ( Apache-2.0 MIT )" +SLOT="0" +KEYWORDS="~amd64" +IUSE="" + +RDEPEND="virtual/udev" +DEPEND="${RDEPEND}" + +S="${WORKDIR}/${MY_P}" + +src_compile() { + # Omitting src_compile() would invoke make, leaving it empty is not allowed. + echo -n +} + +src_install() { + udev_dorules udev/70-solokeys-access.rules +} + +pkg_postinst() { + udev_reload +}