diff options
Diffstat (limited to 'sys-apps/usbguard')
-rw-r--r-- | sys-apps/usbguard/Manifest | 2 | ||||
-rw-r--r-- | sys-apps/usbguard/usbguard-1.1.3.ebuild | 99 |
2 files changed, 101 insertions, 0 deletions
diff --git a/sys-apps/usbguard/Manifest b/sys-apps/usbguard/Manifest index 8bcb39066227..c19583cfb475 100644 --- a/sys-apps/usbguard/Manifest +++ b/sys-apps/usbguard/Manifest @@ -2,5 +2,7 @@ AUX usbguard-0.7.6-usbguard-dbus.openrc 278 BLAKE2B 58f11c693e25436605af6ad41a1f AUX usbguard-0.7.6-usbguard.openrc 309 BLAKE2B d5297058d0ee8ce0f9fc91f2158f4aef5f077e1087800449a0319038d677a2a70274305058cd104ba30529b3c9daf82ffbe16ca5cdf20a3b4817e66d499d08c5 SHA512 512a08f59caf9de22b0776473a1ea9a4322b05c6286c99dac3055e0c6d52c78542448c33e19708338080cfdcdfcfb0f9868e8c523155e978c0161c262081da09 AUX usbguard-1.1.2-gcc-13.patch 460 BLAKE2B 100711b02a6198f149c2637f2f5926a66405bebeaaa02967c7a6a29fbf62f053f006a8b37f13425d4db75b4ac2aa21f3caaee6a976034076c3b640af575db2c4 SHA512 ed34efbc15cec047fa6aff29022dd68019939334d7b107b2110d24b1b888fcb5735449ca4f328be63b386f418cc90c5eca97409ae7e9617488f980d500df9ba0 DIST usbguard-1.1.2.tar.gz 1695585 BLAKE2B 7aa1f6168b16bf3b67136dd927a69a097b29a276c604d2e7e4394be4c30682dcfe8d3fd78ca7af8e5275c42ff21b47562dd5b9a93cacf1b53c9945bdfbf5c7df SHA512 03b6dd026a0fe6a7a055208f09a56e2cc86985570388e33fde08671b8aa2d60ea4a0e59505e9646ddf50f42f5b6310d1b230379f9c26ec99c7ca736f3b4ad850 +DIST usbguard-1.1.3.tar.gz 1667784 BLAKE2B 20a7a819f233c3c5a85192c07f4a51206d71d760d8643e0dfacbc20f050102c76fb694a6e14cd9b8d9bcb45a4f4717483b3448d2bbd1be30cc027680925a5cf9 SHA512 530bfea12ec8497c30d530c73f868207aad8b0e0e917cb7c7506f6148681a6a4ff12de5cddcfea458eb2b91ce8bb8b0e68d42e2590a4dc6b15f43c18f8256cf1 EBUILD usbguard-1.1.2.ebuild 2549 BLAKE2B 990be447b5e76257cefd0cfbb7ff681936c73f2ba4c0fdb7585a995acb65530275d0d9456be28a2ee8980aadc7cda2da1389dc816ea96d47e3e4e3a28ccc45d9 SHA512 0a752d94e69ec15f0ebc3205fd4fc1bc5a2a5152fd8f9b0227ca4df490c4bd5af5b846995048df4815761d72f0a08dc823767af68adddfce4d661b4d51c7ae5a +EBUILD usbguard-1.1.3.ebuild 2496 BLAKE2B 38bd82d57bb2deb77a8cc308617a8b0c98a7a97a4cfb29216fc931c65eb4fe07cc1911bc04b36e0bc6dfb78cc8d56e50f38edebe197cb8d72d18fff82dabb66b SHA512 04421c53c7c722d443845a4d5715353387f713690716ed53f1f0c41908ce6be9d9fd03ca08301472f5a2b00f87e5e758ad92ca760758187559c3b13b1fb87c39 MISC metadata.xml 496 BLAKE2B 9048989ee69331d9771acbc3749e32822733a475e3b03021c388294c2ede49954e32168e299c18d1477b95681dce3081061315678cd49633d7eb53dea60f4e5d SHA512 4f2a4fb3753cd347e3f1cde14834ec32ac1e9ae53bf08626a49434b63b191fee38d33d2e27da880c80ce188bf05f7d8c4b376a665fa0ad8c2cbbd1aa39f95bb6 diff --git a/sys-apps/usbguard/usbguard-1.1.3.ebuild b/sys-apps/usbguard/usbguard-1.1.3.ebuild new file mode 100644 index 000000000000..f8823d85342a --- /dev/null +++ b/sys-apps/usbguard/usbguard-1.1.3.ebuild @@ -0,0 +1,99 @@ +# Copyright 1999-2024 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 +} |