From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 8FA1C138334 for ; Fri, 3 Jan 2020 00:23:39 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id C4FA8E0AB9; Fri, 3 Jan 2020 00:23:38 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 96783E0AB9 for ; Fri, 3 Jan 2020 00:23:38 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 4604134DB77 for ; Fri, 3 Jan 2020 00:23:36 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 649F475 for ; Fri, 3 Jan 2020 00:23:34 +0000 (UTC) From: "Sebastian Pipping" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sebastian Pipping" Message-ID: <1578010954.418a356ac55fb3ac19acd269ec593ce436a0f456.sping@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: sys-apps/usbguard/files/, sys-apps/usbguard/ X-VCS-Repository: repo/gentoo X-VCS-Files: sys-apps/usbguard/Manifest sys-apps/usbguard/files/usbguard-0.7.6-usbguard-dbus.openrc sys-apps/usbguard/files/usbguard-0.7.6-usbguard.openrc sys-apps/usbguard/metadata.xml sys-apps/usbguard/usbguard-0.7.6-r1.ebuild X-VCS-Directories: sys-apps/usbguard/ sys-apps/usbguard/files/ X-VCS-Committer: sping X-VCS-Committer-Name: Sebastian Pipping X-VCS-Revision: 418a356ac55fb3ac19acd269ec593ce436a0f456 X-VCS-Branch: master Date: Fri, 3 Jan 2020 00:23:34 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 6a60771c-e89e-4b7c-96da-9518fa4670bc X-Archives-Hash: 8fa948265d3a96b6dc8be207d1b6130f commit: 418a356ac55fb3ac19acd269ec593ce436a0f456 Author: Sebastian Pipping gentoo org> AuthorDate: Fri Jan 3 00:17:53 2020 +0000 Commit: Sebastian Pipping gentoo org> CommitDate: Fri Jan 3 00:22:34 2020 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=418a356a sys-apps/usbguard: 0.7.6 (new package) Revision 1 is used because 0.7.6(-r0) exists in Pentoo. Signed-off-by: Sebastian Pipping gentoo.org> Package-Manager: Portage-2.3.84, Repoman-2.3.20 sys-apps/usbguard/Manifest | 1 + .../files/usbguard-0.7.6-usbguard-dbus.openrc | 12 ++++ .../usbguard/files/usbguard-0.7.6-usbguard.openrc | 12 ++++ sys-apps/usbguard/metadata.xml | 8 +++ sys-apps/usbguard/usbguard-0.7.6-r1.ebuild | 81 ++++++++++++++++++++++ 5 files changed, 114 insertions(+) diff --git a/sys-apps/usbguard/Manifest b/sys-apps/usbguard/Manifest new file mode 100644 index 00000000000..4929554c1e1 --- /dev/null +++ b/sys-apps/usbguard/Manifest @@ -0,0 +1 @@ +DIST usbguard-0.7.6.tar.gz 1189194 BLAKE2B 4fefd9ccf13b094f64942559f481144f08986dc71154b87c1623459d2429c07e2738a17877d3f6c275e83ce904067b1284c588c9a95023c7205cc5e21ca118f0 SHA512 0b0d42276e48baac2dc1f9031eec25e3f622a8d6178cb0400b97c7d32005bfa158b60fd286fdc66206a8684658fefaf6389ef93511e942f025e75671d7455628 diff --git a/sys-apps/usbguard/files/usbguard-0.7.6-usbguard-dbus.openrc b/sys-apps/usbguard/files/usbguard-0.7.6-usbguard-dbus.openrc new file mode 100755 index 00000000000..2c923123c18 --- /dev/null +++ b/sys-apps/usbguard/files/usbguard-0.7.6-usbguard-dbus.openrc @@ -0,0 +1,12 @@ +#!/sbin/openrc-run +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +command="/usr/sbin/usbguard-dbus" +command_args="--system" +command_background="true" +pidfile="/run/usbguard-dbus.pid" + +depend() { + need dbus usbguard +} diff --git a/sys-apps/usbguard/files/usbguard-0.7.6-usbguard.openrc b/sys-apps/usbguard/files/usbguard-0.7.6-usbguard.openrc new file mode 100755 index 00000000000..3ea514cce16 --- /dev/null +++ b/sys-apps/usbguard/files/usbguard-0.7.6-usbguard.openrc @@ -0,0 +1,12 @@ +#!/sbin/openrc-run +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +command="/usr/sbin/usbguard-daemon" +command_args="-k -c /etc/usbguard/usbguard-daemon.conf" +command_background="true" +pidfile="/run/usbguard.pid" + +depend() { + need udev localmount +} diff --git a/sys-apps/usbguard/metadata.xml b/sys-apps/usbguard/metadata.xml new file mode 100644 index 00000000000..6d2298876fa --- /dev/null +++ b/sys-apps/usbguard/metadata.xml @@ -0,0 +1,8 @@ + + + + + sping@gentoo.org + Sebastian Pipping + + diff --git a/sys-apps/usbguard/usbguard-0.7.6-r1.ebuild b/sys-apps/usbguard/usbguard-0.7.6-r1.ebuild new file mode 100644 index 00000000000..ec5fcfb642d --- /dev/null +++ b/sys-apps/usbguard/usbguard-0.7.6-r1.ebuild @@ -0,0 +1,81 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +DESCRIPTION="Daemon protecting your computer against BadUSB" +HOMEPAGE="https://github.com/USBGuard/usbguard" +SRC_URI="https://github.com/USBGuard/usbguard/releases/download/${P}/${P}.tar.gz" + +LICENSE="GPL-2+" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="bash-completion dbus ldap policykit systemd" + +REQUIRED_USE="policykit? ( dbus )" + +CDEPEND=" + dev-libs/pegtl + >=dev-libs/libsodium-0.4.5:= + >=dev-libs/protobuf-2.5.0:= + >=sys-cluster/libqb-0.16.0:= + sys-devel/gcc:*[cxx] + >=sys-libs/libcap-ng-0.7.0 + >=sys-libs/libseccomp-2.0.0 + >=sys-process/audit-2.7.7 + bash-completion? ( >=app-shells/bash-completion-2.0 ) + dbus? ( + >=dev-libs/dbus-glib-0.100 + dev-libs/glib:2 + sys-apps/dbus + policykit? ( sys-auth/polkit[introspection] ) + ) + ldap? ( net-nds/openldap ) + systemd? ( sys-apps/systemd ) + " +RDEPEND="${CDEPEND} + virtual/udev + " +DEPEND="${CDEPEND} + app-text/asciidoc + dev-cpp/catch:1 + dbus? ( + dev-libs/libxml2 + dev-libs/libxslt + dev-util/gdbus-codegen + ) + " + +src_configure() { + local myargs=( + $(use_with dbus) + $(use_with ldap) + $(use_with policykit polkit) + $(use_enable systemd) + --disable-dependency-tracking + ) + + econf "${myargs[@]}" +} + +src_install() { + default + + keepdir /var/lib/log/usbguard + + newinitd "${FILESDIR}"/${P}-usbguard.openrc usbguard + use dbus && newinitd "${FILESDIR}"/${P}-usbguard-dbus.openrc usbguard-dbus +} + +pkg_postinst() { + ewarn + ewarn 'BEFORE STARTING USBGUARD please be sure to create/generate' + ewarn ' a rules file at /etc/usbguard/rules.conf' + ewarn ' so that you do not' + ewarn ' GET LOCKED OUT' + ewarn " of this system (\"$(hostname)\")." + ewarn + ewarn 'This command may be of help:' + ewarn ' sudo sh -c "usbguard generate-policy > /etc/usbguard/rules.conf"' + ewarn +}