Gentoo Archives: gentoo-commits

From: Sebastian Pipping <sping@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-apps/usbguard/, sys-apps/usbguard/files/
Date: Sun, 31 Jan 2021 17:22:35
Message-Id: 1612113671.4513980b9b0042067415a706732fccde87014d7f.sping@gentoo
1 commit: 4513980b9b0042067415a706732fccde87014d7f
2 Author: Sebastian Pipping <sping <AT> gentoo <DOT> org>
3 AuthorDate: Sun Jan 31 17:19:19 2021 +0000
4 Commit: Sebastian Pipping <sping <AT> gentoo <DOT> org>
5 CommitDate: Sun Jan 31 17:21:11 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4513980b
7
8 sys-apps/usbguard: Fix pthreads linking issue
9
10 Thanks for the patch (that went upstream) to Dennis Schridde!
11 Closes: https://bugs.gentoo.org/754906
12 Signed-off-by: Sebastian Pipping <sping <AT> gentoo.org>
13 Package-Manager: Portage-3.0.14, Repoman-3.0.2
14
15 .../files/usbguard-1.0.0-pthreads-link.patch | 36 ++++++++++++++++++++++
16 sys-apps/usbguard/usbguard-0.7.8.ebuild | 13 +++++++-
17 sys-apps/usbguard/usbguard-1.0.0.ebuild | 11 +++++++
18 3 files changed, 59 insertions(+), 1 deletion(-)
19
20 diff --git a/sys-apps/usbguard/files/usbguard-1.0.0-pthreads-link.patch b/sys-apps/usbguard/files/usbguard-1.0.0-pthreads-link.patch
21 new file mode 100644
22 index 00000000000..7edeb86b60b
23 --- /dev/null
24 +++ b/sys-apps/usbguard/files/usbguard-1.0.0-pthreads-link.patch
25 @@ -0,0 +1,36 @@
26 +From 9249ff391ee0765ac5e8d4e113e28b8a908c136f Mon Sep 17 00:00:00 2001
27 +From: Dennis Schridde <devurandom@×××.net>
28 +Date: Sat, 16 Jan 2021 10:40:26 +0100
29 +Subject: [PATCH] Link against libpthread
30 +
31 +`CFLAGS` is needed in addition to `LIBS`, because on some systems it
32 +contains `-pthread` and `LIBS` is empty.
33 +
34 +Closes: https://github.com/USBGuard/usbguard/issues/432
35 +---
36 + Makefile.am | 5 ++++-
37 + 1 file changed, 4 insertions(+), 1 deletion(-)
38 +
39 +diff --git a/Makefile.am b/Makefile.am
40 +index 402854fd..34a2e960 100644
41 +--- a/Makefile.am
42 ++++ b/Makefile.am
43 +@@ -167,6 +167,7 @@ libusbguard_la_CPPFLAGS=\
44 + -I$(top_srcdir)/src/Library/public \
45 + -I$(top_builddir)/src/Library/IPC \
46 + ${BOOST_CPPFLAGS} \
47 ++ ${PTHREAD_CPPFLAGS} \
48 + @qb_CFLAGS@ \
49 + @protobuf_CFLAGS@ \
50 + @crypto_CFLAGS@ \
51 +@@ -185,7 +186,9 @@ libusbguard_la_LIBADD=\
52 + @pegtl_LIBS@ \
53 + @atomic_LIBS@ \
54 + @umockdev_LIBS@ \
55 +- ${BOOST_IOSTREAMS_LIB}
56 ++ ${BOOST_IOSTREAMS_LIB} \
57 ++ ${PTHREAD_CFLAGS} \
58 ++ ${PTHREAD_LIBS}
59 +
60 + EXTRA_DIST+=\
61 + src/Library/IPC/Devices.proto \
62
63 diff --git a/sys-apps/usbguard/usbguard-0.7.8.ebuild b/sys-apps/usbguard/usbguard-0.7.8.ebuild
64 index 317ca17a882..be1f9ae5b84 100644
65 --- a/sys-apps/usbguard/usbguard-0.7.8.ebuild
66 +++ b/sys-apps/usbguard/usbguard-0.7.8.ebuild
67 @@ -1,8 +1,10 @@
68 -# Copyright 1999-2020 Gentoo Authors
69 +# Copyright 1999-2021 Gentoo Authors
70 # Distributed under the terms of the GNU General Public License v2
71
72 EAPI=7
73
74 +inherit autotools
75 +
76 DESCRIPTION="Daemon protecting your computer against BadUSB"
77 HOMEPAGE="https://github.com/USBGuard/usbguard"
78 SRC_URI="https://github.com/USBGuard/usbguard/releases/download/${P}/${P}.tar.gz"
79 @@ -45,6 +47,15 @@ DEPEND="${CDEPEND}
80 )
81 "
82
83 +PATCHES=(
84 + "${FILESDIR}"/${PN}-1.0.0-pthreads-link.patch
85 +)
86 +
87 +src_prepare() {
88 + default
89 + eautoreconf
90 +}
91 +
92 src_configure() {
93 local myargs=(
94 $(use_with dbus)
95
96 diff --git a/sys-apps/usbguard/usbguard-1.0.0.ebuild b/sys-apps/usbguard/usbguard-1.0.0.ebuild
97 index 761a616c07c..78b104813da 100644
98 --- a/sys-apps/usbguard/usbguard-1.0.0.ebuild
99 +++ b/sys-apps/usbguard/usbguard-1.0.0.ebuild
100 @@ -3,6 +3,8 @@
101
102 EAPI=7
103
104 +inherit autotools
105 +
106 DESCRIPTION="Daemon protecting your computer against BadUSB"
107 HOMEPAGE="https://github.com/USBGuard/usbguard"
108 SRC_URI="https://github.com/USBGuard/usbguard/releases/download/${P}/${P}.tar.gz"
109 @@ -45,6 +47,15 @@ DEPEND="${CDEPEND}
110 )
111 "
112
113 +PATCHES=(
114 + "${FILESDIR}"/${PN}-1.0.0-pthreads-link.patch
115 +)
116 +
117 +src_prepare() {
118 + default
119 + eautoreconf
120 +}
121 +
122 src_configure() {
123 local myargs=(
124 $(use_with dbus)