diff options
author | Sebastian Pipping <sping@gentoo.org> | 2022-02-24 16:36:45 +0100 |
---|---|---|
committer | Sebastian Pipping <sping@gentoo.org> | 2022-02-24 16:40:45 +0100 |
commit | 4a666d0693261ff26090f2e000e16e52282a70d7 (patch) | |
tree | 34003187a425848871db0bd196163294af1f7fbc /sys-apps | |
parent | sci-chemistry/molsketch: add version 0.7.2 (diff) | |
download | gentoo-4a666d0693261ff26090f2e000e16e52282a70d7.tar.gz gentoo-4a666d0693261ff26090f2e000e16e52282a70d7.tar.bz2 gentoo-4a666d0693261ff26090f2e000e16e52282a70d7.zip |
sys-apps/usbguard: 1.1.0
Bug: https://bugs.gentoo.org/833947
Signed-off-by: Sebastian Pipping <sping@gentoo.org>
Package-Manager: Portage-3.0.30, Repoman-3.0.3
Diffstat (limited to 'sys-apps')
-rw-r--r-- | sys-apps/usbguard/Manifest | 1 | ||||
-rw-r--r-- | sys-apps/usbguard/usbguard-1.1.0.ebuild | 96 |
2 files changed, 97 insertions, 0 deletions
diff --git a/sys-apps/usbguard/Manifest b/sys-apps/usbguard/Manifest index 225f9dec596e..da236eb4f73d 100644 --- a/sys-apps/usbguard/Manifest +++ b/sys-apps/usbguard/Manifest @@ -1 +1,2 @@ DIST usbguard-1.0.0.tar.gz 1260374 BLAKE2B ea9b48f14a4091f4ce61b6c171947cf2412c47e9aa3edb816e933f7aad6247b32e89bee90675ca5a0136b460fef8f2d423c0c81ad49d52453d0d3803b881503a SHA512 068a9be8bd5ea05efcdad79e2c4beb5e8b646b4703fbe1f8bb262e37ae9a6284a6eeb811a6bd441250a38bce1e45b7f44ad15726aa5963da2e1b56e85f5e16fd +DIST usbguard-1.1.0.tar.gz 1648078 BLAKE2B 99dd7fef6cf93f72b87a00874757c1a2447530aa48405f2d260c3f3295881e3e6521c77195467af84c5b4554510250149eba5181eb44e9a997a120217e32bbea SHA512 f882e8ba38743c044984520d5514035e0e76e185328c2f16226ce8fb14b5dbde0c021327b3dabfdea36e18428be5fb23b559f6837ef7f81dabb5e9b4ed4e1e91 diff --git a/sys-apps/usbguard/usbguard-1.1.0.ebuild b/sys-apps/usbguard/usbguard-1.1.0.ebuild new file mode 100644 index 000000000000..cb6d70408cdb --- /dev/null +++ b/sys-apps/usbguard/usbguard-1.1.0.ebuild @@ -0,0 +1,96 @@ +# Copyright 1999-2022 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" + +# https://github.com/USBGuard/usbguard/issues/449 +# https://bugs.gentoo.org/769692 +REQUIRED_USE+=" test? ( static-libs )" + +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 + dbus? ( + dev-libs/glib:2 + sys-apps/dbus + 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:0 + dbus? ( + dev-libs/libxml2 + dev-libs/libxslt + dev-util/gdbus-codegen + ) + " + +RESTRICT="!test? ( test )" + +src_prepare() { + default + eautoreconf +} + +src_configure() { + local myargs=( + --with-bash-completion-dir=$(get_bashcompdir) + $(use_with dbus) + $(use_with dbus polkit) + $(use_with ldap) + $(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 +} |