diff options
author | Sebastian Pipping <sping@gentoo.org> | 2020-01-03 01:17:53 +0100 |
---|---|---|
committer | Sebastian Pipping <sping@gentoo.org> | 2020-01-03 01:22:34 +0100 |
commit | 418a356ac55fb3ac19acd269ec593ce436a0f456 (patch) | |
tree | 3d9453242ca2743f6dbc63affde13d7328666b08 /sys-apps/usbguard | |
parent | dev-vcs/cvs-fast-export: drop old (diff) | |
download | gentoo-418a356ac55fb3ac19acd269ec593ce436a0f456.tar.gz gentoo-418a356ac55fb3ac19acd269ec593ce436a0f456.tar.bz2 gentoo-418a356ac55fb3ac19acd269ec593ce436a0f456.zip |
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 <sping@gentoo.org>
Package-Manager: Portage-2.3.84, Repoman-2.3.20
Diffstat (limited to 'sys-apps/usbguard')
-rw-r--r-- | sys-apps/usbguard/Manifest | 1 | ||||
-rwxr-xr-x | sys-apps/usbguard/files/usbguard-0.7.6-usbguard-dbus.openrc | 12 | ||||
-rwxr-xr-x | sys-apps/usbguard/files/usbguard-0.7.6-usbguard.openrc | 12 | ||||
-rw-r--r-- | sys-apps/usbguard/metadata.xml | 8 | ||||
-rw-r--r-- | sys-apps/usbguard/usbguard-0.7.6-r1.ebuild | 81 |
5 files changed, 114 insertions, 0 deletions
diff --git a/sys-apps/usbguard/Manifest b/sys-apps/usbguard/Manifest new file mode 100644 index 000000000000..4929554c1e13 --- /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 000000000000..2c923123c186 --- /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 000000000000..3ea514cce169 --- /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 000000000000..6d2298876faa --- /dev/null +++ b/sys-apps/usbguard/metadata.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>sping@gentoo.org</email> + <name>Sebastian Pipping</name> + </maintainer> +</pkgmetadata> 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 000000000000..ec5fcfb642d2 --- /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 +} |