summaryrefslogtreecommitdiff
path: root/sys-apps/usbguard
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2021-12-22 14:08:05 +0000
committerV3n3RiX <venerix@koprulu.sector>2021-12-22 14:08:05 +0000
commit93a93e9a3b53c1a73142a305ea1f8136846942ee (patch)
treeb9791a06ab3284e27b568412c59316c66240c682 /sys-apps/usbguard
parent2771f79232c273bc2a57d23bf335dd81ccf6af28 (diff)
gentoo resync : 22.12.2021
Diffstat (limited to 'sys-apps/usbguard')
-rw-r--r--sys-apps/usbguard/Manifest1
-rw-r--r--sys-apps/usbguard/usbguard-1.0.0-r5.ebuild103
2 files changed, 104 insertions, 0 deletions
diff --git a/sys-apps/usbguard/Manifest b/sys-apps/usbguard/Manifest
index f70a50e1f0af..18d8014d0010 100644
--- a/sys-apps/usbguard/Manifest
+++ b/sys-apps/usbguard/Manifest
@@ -5,4 +5,5 @@ AUX usbguard-1.0.0-pthreads-link.patch 1013 BLAKE2B 78daa200908b47e3db9b77938395
DIST usbguard-1.0.0.tar.gz 1260374 BLAKE2B ea9b48f14a4091f4ce61b6c171947cf2412c47e9aa3edb816e933f7aad6247b32e89bee90675ca5a0136b460fef8f2d423c0c81ad49d52453d0d3803b881503a SHA512 068a9be8bd5ea05efcdad79e2c4beb5e8b646b4703fbe1f8bb262e37ae9a6284a6eeb811a6bd441250a38bce1e45b7f44ad15726aa5963da2e1b56e85f5e16fd
EBUILD usbguard-1.0.0-r2.ebuild 2375 BLAKE2B ae31b853b32157a6b5e654f2e3fc792f228fd190e96c3f67261751e6748b6908902ac1d22c315f17892082d164ff1e8c168bd167e7284361b33be7d367b63b15 SHA512 08fd0ac7e120c6cbc10decabdc42957a44fd3c00a0dac307dfa4d1e8d9e4da2950de1c6a47c793fcfa037894f00670baa8e084a3812ca1a4dec8e215e989899e
EBUILD usbguard-1.0.0-r4.ebuild 2511 BLAKE2B 0a75cbee4fa70f07e3fa8d38316ec679f54b08f35cdc85832e53da69d16b9e1b648f1703d9b6b99a4482abb1a35d5d71d5909c58b65a3fddf9d990d2e3cc687a SHA512 3b3a1fc45429735fd0f6b78b4edec726526a292071098722b513915b923341c910b7f5102c438e8599b14cf0031702b8a69047e9f69a2a88b7be244db350e65f
+EBUILD usbguard-1.0.0-r5.ebuild 2561 BLAKE2B daa9a737999a57030c36a9479df68fa3df9590fdcf059453f7900e0cd605b6a1a08c8d9b03ca898618d40ee886f2ec238f6bde2465fe93da5ab7713e2417c69a SHA512 dc922d992dce4c11a7cc6fe004a381ea5087921e0ecf9a5a1a393fc96191e4ce96655bb73ea4b71011af3751f08383a206708fe72cafffe5f927646e803edaeb
MISC metadata.xml 345 BLAKE2B ee71f0699ba99d30148f602e0af3b921c5c243e23e8587428df56ea8fa841f929103687b38d35fb7eb6812c0ccc2d811df0670db7a0beb915a61a8cf3914a7b2 SHA512 97c84d9a097784f95b0f33bef9855a3d81732eb29371de1c4ec2d9313c5346ad46832bec29bd6135fcf48540cbc683b2b13cf217f0f29df9995c0bd6b1b035b9
diff --git a/sys-apps/usbguard/usbguard-1.0.0-r5.ebuild b/sys-apps/usbguard/usbguard-1.0.0-r5.ebuild
new file mode 100644
index 000000000000..42ed8e9db739
--- /dev/null
+++ b/sys-apps/usbguard/usbguard-1.0.0-r5.ebuild
@@ -0,0 +1,103 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit autotools bash-completion-r1
+
+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/1" # due to libusbguard.so.<1>.0.0
+KEYWORDS="~amd64 ~x86"
+IUSE="dbus ldap policykit selinux static-libs systemd test umockdev"
+
+REQUIRED_USE="policykit? ( dbus )"
+
+# https://github.com/USBGuard/usbguard/issues/449
+# https://bugs.gentoo.org/769692
+REQUIRED_USE+=" test? ( static-libs )"
+
+CDEPEND="
+ <dev-libs/pegtl-3
+ >=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
+ dbus? (
+ dev-libs/glib:2
+ sys-apps/dbus
+ policykit? ( sys-auth/polkit[introspection] )
+ )
+ ldap? ( net-nds/openldap )
+ systemd? ( sys-apps/systemd )
+ umockdev? ( dev-util/umockdev )
+ "
+RDEPEND="${CDEPEND}
+ virtual/udev
+ selinux? ( sec-policy/selinux-usbguard )
+ "
+DEPEND="${CDEPEND}
+ app-text/asciidoc
+ dev-cpp/catch:1
+ dbus? (
+ dev-libs/libxml2
+ dev-libs/libxslt
+ dev-util/gdbus-codegen
+ )
+ "
+
+RESTRICT="!test? ( test )"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-1.0.0-pthreads-link.patch
+ "${FILESDIR}"/${PN}-1.0.0-bash-completion-configure.patch
+)
+
+src_prepare() {
+ default
+ eautoreconf
+}
+
+src_configure() {
+ local myargs=(
+ --with-bash-completion-dir=$(get_bashcompdir)
+ $(use_with dbus)
+ $(use_with ldap)
+ $(use_with policykit polkit)
+ $(use_enable static-libs static)
+ $(use_enable systemd)
+ $(use_enable umockdev)
+ )
+
+ econf "${myargs[@]}"
+}
+
+src_install() {
+ default
+
+ keepdir /etc/usbguard/IPCAccessControl.d # bug 808801
+ keepdir /var/lib/log/usbguard
+ chmod 0600 "${ED}"/etc/usbguard/IPCAccessControl.d/.keep* || die # bug 808801
+
+ newinitd "${FILESDIR}"/${PN}-0.7.6-usbguard.openrc usbguard
+ use dbus && newinitd "${FILESDIR}"/${PN}-0.7.6-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
+}