1 |
commit: 4bdb8e4fd557eef61d98fe9155f749309dd250b7 |
2 |
Author: Sebastian Pipping <sping <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Sep 2 23:01:43 2022 +0000 |
4 |
Commit: Sebastian Pipping <sping <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Sep 2 23:02:52 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4bdb8e4f |
7 |
|
8 |
sys-apps/usbguard: 1.1.2 + EAPI 8 |
9 |
|
10 |
Signed-off-by: Sebastian Pipping <sping <AT> gentoo.org> |
11 |
Package-Manager: Portage-3.0.30, Repoman-3.0.3 |
12 |
|
13 |
sys-apps/usbguard/Manifest | 1 + |
14 |
sys-apps/usbguard/usbguard-1.1.2.ebuild | 99 +++++++++++++++++++++++++++++++++ |
15 |
2 files changed, 100 insertions(+) |
16 |
|
17 |
diff --git a/sys-apps/usbguard/Manifest b/sys-apps/usbguard/Manifest |
18 |
index d1582fa4270f..8b988f64204e 100644 |
19 |
--- a/sys-apps/usbguard/Manifest |
20 |
+++ b/sys-apps/usbguard/Manifest |
21 |
@@ -1,2 +1,3 @@ |
22 |
DIST usbguard-1.1.0.tar.gz 1648078 BLAKE2B 99dd7fef6cf93f72b87a00874757c1a2447530aa48405f2d260c3f3295881e3e6521c77195467af84c5b4554510250149eba5181eb44e9a997a120217e32bbea SHA512 f882e8ba38743c044984520d5514035e0e76e185328c2f16226ce8fb14b5dbde0c021327b3dabfdea36e18428be5fb23b559f6837ef7f81dabb5e9b4ed4e1e91 |
23 |
DIST usbguard-1.1.1.tar.gz 1651887 BLAKE2B ef736740592fb9a9589d53eaccd17fd8f0ebb4ca6f39794674aaad2edb3e259048452a63e6966a527a040cea83576d79a37b870d85cc4fff7603a6502dab4973 SHA512 7810471a3778b4bca644565cefa2666f98d53c2747bff7262b9bbb0327e7dba7a1e8c067c96d89e6742ccec5f65410f4e273bf84ee2bb1fbc7ff5738df3af780 |
24 |
+DIST usbguard-1.1.2.tar.gz 1695585 BLAKE2B 7aa1f6168b16bf3b67136dd927a69a097b29a276c604d2e7e4394be4c30682dcfe8d3fd78ca7af8e5275c42ff21b47562dd5b9a93cacf1b53c9945bdfbf5c7df SHA512 03b6dd026a0fe6a7a055208f09a56e2cc86985570388e33fde08671b8aa2d60ea4a0e59505e9646ddf50f42f5b6310d1b230379f9c26ec99c7ca736f3b4ad850 |
25 |
|
26 |
diff --git a/sys-apps/usbguard/usbguard-1.1.2.ebuild b/sys-apps/usbguard/usbguard-1.1.2.ebuild |
27 |
new file mode 100644 |
28 |
index 000000000000..77e050da627a |
29 |
--- /dev/null |
30 |
+++ b/sys-apps/usbguard/usbguard-1.1.2.ebuild |
31 |
@@ -0,0 +1,99 @@ |
32 |
+# Copyright 1999-2022 Gentoo Authors |
33 |
+# Distributed under the terms of the GNU General Public License v2 |
34 |
+ |
35 |
+EAPI=8 |
36 |
+ |
37 |
+inherit autotools bash-completion-r1 |
38 |
+ |
39 |
+DESCRIPTION="Daemon protecting your computer against BadUSB" |
40 |
+HOMEPAGE="https://github.com/USBGuard/usbguard" |
41 |
+SRC_URI="https://github.com/USBGuard/usbguard/releases/download/${P}/${P}.tar.gz" |
42 |
+ |
43 |
+LICENSE="GPL-2+" |
44 |
+SLOT="0/1" # due to libusbguard.so.<1>.0.0 |
45 |
+KEYWORDS="~amd64 ~x86" |
46 |
+IUSE="dbus ldap policykit selinux static-libs systemd test umockdev" |
47 |
+ |
48 |
+# https://github.com/USBGuard/usbguard/issues/449 |
49 |
+# https://bugs.gentoo.org/769692 |
50 |
+REQUIRED_USE+=" test? ( static-libs )" |
51 |
+ |
52 |
+CDEPEND=" |
53 |
+ dev-libs/pegtl |
54 |
+ >=dev-libs/libsodium-0.4.5:= |
55 |
+ >=dev-libs/protobuf-2.5.0:= |
56 |
+ >=sys-cluster/libqb-0.16.0:= |
57 |
+ sys-devel/gcc:*[cxx] |
58 |
+ >=sys-libs/libcap-ng-0.7.0 |
59 |
+ >=sys-libs/libseccomp-2.0.0 |
60 |
+ >=sys-process/audit-2.7.7 |
61 |
+ dbus? ( |
62 |
+ dev-libs/glib:2 |
63 |
+ sys-apps/dbus |
64 |
+ sys-auth/polkit[introspection] |
65 |
+ ) |
66 |
+ ldap? ( net-nds/openldap:= ) |
67 |
+ systemd? ( sys-apps/systemd ) |
68 |
+ umockdev? ( dev-util/umockdev ) |
69 |
+ " |
70 |
+RDEPEND="${CDEPEND} |
71 |
+ virtual/udev |
72 |
+ selinux? ( sec-policy/selinux-usbguard ) |
73 |
+ " |
74 |
+DEPEND="${CDEPEND} |
75 |
+ app-text/asciidoc |
76 |
+ <dev-cpp/catch-3:0 |
77 |
+ dbus? ( |
78 |
+ dev-libs/libxml2 |
79 |
+ dev-libs/libxslt |
80 |
+ dev-util/gdbus-codegen |
81 |
+ ) |
82 |
+ " |
83 |
+ |
84 |
+RESTRICT="!test? ( test )" |
85 |
+ |
86 |
+src_prepare() { |
87 |
+ default |
88 |
+ eautoreconf |
89 |
+} |
90 |
+ |
91 |
+src_configure() { |
92 |
+ local myargs=( |
93 |
+ --with-bash-completion-dir=$(get_bashcompdir) |
94 |
+ --localstatedir=/var # i.e. not /var/lib, bug 852296 |
95 |
+ $(use_with dbus) |
96 |
+ $(use_with dbus polkit) |
97 |
+ $(use_with ldap) |
98 |
+ $(use_enable static-libs static) |
99 |
+ $(use_enable systemd) |
100 |
+ $(use_enable umockdev) |
101 |
+ ) |
102 |
+ |
103 |
+ econf "${myargs[@]}" |
104 |
+} |
105 |
+ |
106 |
+src_install() { |
107 |
+ default |
108 |
+ |
109 |
+ keepdir /etc/usbguard/IPCAccessControl.d # bug 808801 |
110 |
+ keepdir /var/log/usbguard |
111 |
+ chmod 0600 "${ED}"/etc/usbguard/IPCAccessControl.d/.keep* || die # bug 808801 |
112 |
+ |
113 |
+ newinitd "${FILESDIR}"/${PN}-0.7.6-usbguard.openrc usbguard |
114 |
+ use dbus && newinitd "${FILESDIR}"/${PN}-0.7.6-usbguard-dbus.openrc usbguard-dbus |
115 |
+ |
116 |
+ find "${D}" -name '*.la' -delete || die # bug 850655 |
117 |
+} |
118 |
+ |
119 |
+pkg_postinst() { |
120 |
+ ewarn |
121 |
+ ewarn 'BEFORE STARTING USBGUARD please be sure to create/generate' |
122 |
+ ewarn ' a rules file at /etc/usbguard/rules.conf' |
123 |
+ ewarn ' so that you do not' |
124 |
+ ewarn ' GET LOCKED OUT' |
125 |
+ ewarn " of this system (\"$(hostname)\")." |
126 |
+ ewarn |
127 |
+ ewarn 'This command may be of help:' |
128 |
+ ewarn ' sudo sh -c "usbguard generate-policy > /etc/usbguard/rules.conf"' |
129 |
+ ewarn |
130 |
+} |