1 |
commit: 418a356ac55fb3ac19acd269ec593ce436a0f456 |
2 |
Author: Sebastian Pipping <sping <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Jan 3 00:17:53 2020 +0000 |
4 |
Commit: Sebastian Pipping <sping <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Jan 3 00:22:34 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=418a356a |
7 |
|
8 |
sys-apps/usbguard: 0.7.6 (new package) |
9 |
|
10 |
Revision 1 is used because 0.7.6(-r0) exists in Pentoo. |
11 |
|
12 |
Signed-off-by: Sebastian Pipping <sping <AT> gentoo.org> |
13 |
Package-Manager: Portage-2.3.84, Repoman-2.3.20 |
14 |
|
15 |
sys-apps/usbguard/Manifest | 1 + |
16 |
.../files/usbguard-0.7.6-usbguard-dbus.openrc | 12 ++++ |
17 |
.../usbguard/files/usbguard-0.7.6-usbguard.openrc | 12 ++++ |
18 |
sys-apps/usbguard/metadata.xml | 8 +++ |
19 |
sys-apps/usbguard/usbguard-0.7.6-r1.ebuild | 81 ++++++++++++++++++++++ |
20 |
5 files changed, 114 insertions(+) |
21 |
|
22 |
diff --git a/sys-apps/usbguard/Manifest b/sys-apps/usbguard/Manifest |
23 |
new file mode 100644 |
24 |
index 00000000000..4929554c1e1 |
25 |
--- /dev/null |
26 |
+++ b/sys-apps/usbguard/Manifest |
27 |
@@ -0,0 +1 @@ |
28 |
+DIST usbguard-0.7.6.tar.gz 1189194 BLAKE2B 4fefd9ccf13b094f64942559f481144f08986dc71154b87c1623459d2429c07e2738a17877d3f6c275e83ce904067b1284c588c9a95023c7205cc5e21ca118f0 SHA512 0b0d42276e48baac2dc1f9031eec25e3f622a8d6178cb0400b97c7d32005bfa158b60fd286fdc66206a8684658fefaf6389ef93511e942f025e75671d7455628 |
29 |
|
30 |
diff --git a/sys-apps/usbguard/files/usbguard-0.7.6-usbguard-dbus.openrc b/sys-apps/usbguard/files/usbguard-0.7.6-usbguard-dbus.openrc |
31 |
new file mode 100755 |
32 |
index 00000000000..2c923123c18 |
33 |
--- /dev/null |
34 |
+++ b/sys-apps/usbguard/files/usbguard-0.7.6-usbguard-dbus.openrc |
35 |
@@ -0,0 +1,12 @@ |
36 |
+#!/sbin/openrc-run |
37 |
+# Copyright 1999-2020 Gentoo Authors |
38 |
+# Distributed under the terms of the GNU General Public License v2 |
39 |
+ |
40 |
+command="/usr/sbin/usbguard-dbus" |
41 |
+command_args="--system" |
42 |
+command_background="true" |
43 |
+pidfile="/run/usbguard-dbus.pid" |
44 |
+ |
45 |
+depend() { |
46 |
+ need dbus usbguard |
47 |
+} |
48 |
|
49 |
diff --git a/sys-apps/usbguard/files/usbguard-0.7.6-usbguard.openrc b/sys-apps/usbguard/files/usbguard-0.7.6-usbguard.openrc |
50 |
new file mode 100755 |
51 |
index 00000000000..3ea514cce16 |
52 |
--- /dev/null |
53 |
+++ b/sys-apps/usbguard/files/usbguard-0.7.6-usbguard.openrc |
54 |
@@ -0,0 +1,12 @@ |
55 |
+#!/sbin/openrc-run |
56 |
+# Copyright 1999-2020 Gentoo Authors |
57 |
+# Distributed under the terms of the GNU General Public License v2 |
58 |
+ |
59 |
+command="/usr/sbin/usbguard-daemon" |
60 |
+command_args="-k -c /etc/usbguard/usbguard-daemon.conf" |
61 |
+command_background="true" |
62 |
+pidfile="/run/usbguard.pid" |
63 |
+ |
64 |
+depend() { |
65 |
+ need udev localmount |
66 |
+} |
67 |
|
68 |
diff --git a/sys-apps/usbguard/metadata.xml b/sys-apps/usbguard/metadata.xml |
69 |
new file mode 100644 |
70 |
index 00000000000..6d2298876fa |
71 |
--- /dev/null |
72 |
+++ b/sys-apps/usbguard/metadata.xml |
73 |
@@ -0,0 +1,8 @@ |
74 |
+<?xml version="1.0" encoding="UTF-8"?> |
75 |
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> |
76 |
+<pkgmetadata> |
77 |
+ <maintainer type="person"> |
78 |
+ <email>sping@g.o</email> |
79 |
+ <name>Sebastian Pipping</name> |
80 |
+ </maintainer> |
81 |
+</pkgmetadata> |
82 |
|
83 |
diff --git a/sys-apps/usbguard/usbguard-0.7.6-r1.ebuild b/sys-apps/usbguard/usbguard-0.7.6-r1.ebuild |
84 |
new file mode 100644 |
85 |
index 00000000000..ec5fcfb642d |
86 |
--- /dev/null |
87 |
+++ b/sys-apps/usbguard/usbguard-0.7.6-r1.ebuild |
88 |
@@ -0,0 +1,81 @@ |
89 |
+# Copyright 1999-2020 Gentoo Authors |
90 |
+# Distributed under the terms of the GNU General Public License v2 |
91 |
+ |
92 |
+EAPI=7 |
93 |
+ |
94 |
+DESCRIPTION="Daemon protecting your computer against BadUSB" |
95 |
+HOMEPAGE="https://github.com/USBGuard/usbguard" |
96 |
+SRC_URI="https://github.com/USBGuard/usbguard/releases/download/${P}/${P}.tar.gz" |
97 |
+ |
98 |
+LICENSE="GPL-2+" |
99 |
+SLOT="0" |
100 |
+KEYWORDS="~amd64 ~x86" |
101 |
+IUSE="bash-completion dbus ldap policykit systemd" |
102 |
+ |
103 |
+REQUIRED_USE="policykit? ( dbus )" |
104 |
+ |
105 |
+CDEPEND=" |
106 |
+ dev-libs/pegtl |
107 |
+ >=dev-libs/libsodium-0.4.5:= |
108 |
+ >=dev-libs/protobuf-2.5.0:= |
109 |
+ >=sys-cluster/libqb-0.16.0:= |
110 |
+ sys-devel/gcc:*[cxx] |
111 |
+ >=sys-libs/libcap-ng-0.7.0 |
112 |
+ >=sys-libs/libseccomp-2.0.0 |
113 |
+ >=sys-process/audit-2.7.7 |
114 |
+ bash-completion? ( >=app-shells/bash-completion-2.0 ) |
115 |
+ dbus? ( |
116 |
+ >=dev-libs/dbus-glib-0.100 |
117 |
+ dev-libs/glib:2 |
118 |
+ sys-apps/dbus |
119 |
+ policykit? ( sys-auth/polkit[introspection] ) |
120 |
+ ) |
121 |
+ ldap? ( net-nds/openldap ) |
122 |
+ systemd? ( sys-apps/systemd ) |
123 |
+ " |
124 |
+RDEPEND="${CDEPEND} |
125 |
+ virtual/udev |
126 |
+ " |
127 |
+DEPEND="${CDEPEND} |
128 |
+ app-text/asciidoc |
129 |
+ dev-cpp/catch:1 |
130 |
+ dbus? ( |
131 |
+ dev-libs/libxml2 |
132 |
+ dev-libs/libxslt |
133 |
+ dev-util/gdbus-codegen |
134 |
+ ) |
135 |
+ " |
136 |
+ |
137 |
+src_configure() { |
138 |
+ local myargs=( |
139 |
+ $(use_with dbus) |
140 |
+ $(use_with ldap) |
141 |
+ $(use_with policykit polkit) |
142 |
+ $(use_enable systemd) |
143 |
+ --disable-dependency-tracking |
144 |
+ ) |
145 |
+ |
146 |
+ econf "${myargs[@]}" |
147 |
+} |
148 |
+ |
149 |
+src_install() { |
150 |
+ default |
151 |
+ |
152 |
+ keepdir /var/lib/log/usbguard |
153 |
+ |
154 |
+ newinitd "${FILESDIR}"/${P}-usbguard.openrc usbguard |
155 |
+ use dbus && newinitd "${FILESDIR}"/${P}-usbguard-dbus.openrc usbguard-dbus |
156 |
+} |
157 |
+ |
158 |
+pkg_postinst() { |
159 |
+ ewarn |
160 |
+ ewarn 'BEFORE STARTING USBGUARD please be sure to create/generate' |
161 |
+ ewarn ' a rules file at /etc/usbguard/rules.conf' |
162 |
+ ewarn ' so that you do not' |
163 |
+ ewarn ' GET LOCKED OUT' |
164 |
+ ewarn " of this system (\"$(hostname)\")." |
165 |
+ ewarn |
166 |
+ ewarn 'This command may be of help:' |
167 |
+ ewarn ' sudo sh -c "usbguard generate-policy > /etc/usbguard/rules.conf"' |
168 |
+ ewarn |
169 |
+} |