mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-08-05 12:38:09 -07:00
sys-apps/usbguard: 1.1.2 + EAPI 8
Signed-off-by: Sebastian Pipping <sping@gentoo.org> Package-Manager: Portage-3.0.30, Repoman-3.0.3
This commit is contained in:
@@ -1,2 +1,3 @@
|
||||
DIST usbguard-1.1.0.tar.gz 1648078 BLAKE2B 99dd7fef6cf93f72b87a00874757c1a2447530aa48405f2d260c3f3295881e3e6521c77195467af84c5b4554510250149eba5181eb44e9a997a120217e32bbea SHA512 f882e8ba38743c044984520d5514035e0e76e185328c2f16226ce8fb14b5dbde0c021327b3dabfdea36e18428be5fb23b559f6837ef7f81dabb5e9b4ed4e1e91
|
||||
DIST usbguard-1.1.1.tar.gz 1651887 BLAKE2B ef736740592fb9a9589d53eaccd17fd8f0ebb4ca6f39794674aaad2edb3e259048452a63e6966a527a040cea83576d79a37b870d85cc4fff7603a6502dab4973 SHA512 7810471a3778b4bca644565cefa2666f98d53c2747bff7262b9bbb0327e7dba7a1e8c067c96d89e6742ccec5f65410f4e273bf84ee2bb1fbc7ff5738df3af780
|
||||
DIST usbguard-1.1.2.tar.gz 1695585 BLAKE2B 7aa1f6168b16bf3b67136dd927a69a097b29a276c604d2e7e4394be4c30682dcfe8d3fd78ca7af8e5275c42ff21b47562dd5b9a93cacf1b53c9945bdfbf5c7df SHA512 03b6dd026a0fe6a7a055208f09a56e2cc86985570388e33fde08671b8aa2d60ea4a0e59505e9646ddf50f42f5b6310d1b230379f9c26ec99c7ca736f3b4ad850
|
||||
|
||||
99
sys-apps/usbguard/usbguard-1.1.2.ebuild
Normal file
99
sys-apps/usbguard/usbguard-1.1.2.ebuild
Normal file
@@ -0,0 +1,99 @@
|
||||
# Copyright 1999-2022 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
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-3: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)
|
||||
--localstatedir=/var # i.e. not /var/lib, bug 852296
|
||||
$(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/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
|
||||
|
||||
find "${D}" -name '*.la' -delete || die # bug 850655
|
||||
}
|
||||
|
||||
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
|
||||
}
|
||||
Reference in New Issue
Block a user