1 |
commit: 9a73ceca960a687e8457fa24a382fa04ef4dc6f9 |
2 |
Author: Mike Gilbert <floppym <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Dec 25 18:19:04 2021 +0000 |
4 |
Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Dec 25 18:19:04 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9a73ceca |
7 |
|
8 |
sys-apps/systemd: backport build fix for USE="-dns-over-tls -gcrypt" |
9 |
|
10 |
Closes: https://bugs.gentoo.org/829944 |
11 |
Signed-off-by: Mike Gilbert <floppym <AT> gentoo.org> |
12 |
|
13 |
sys-apps/systemd/files/250-fix-openssl.patch | 102 +++++++++++++++++++++++++++ |
14 |
sys-apps/systemd/systemd-250.ebuild | 1 + |
15 |
2 files changed, 103 insertions(+) |
16 |
|
17 |
diff --git a/sys-apps/systemd/files/250-fix-openssl.patch b/sys-apps/systemd/files/250-fix-openssl.patch |
18 |
new file mode 100644 |
19 |
index 000000000000..520ba0b66427 |
20 |
--- /dev/null |
21 |
+++ b/sys-apps/systemd/files/250-fix-openssl.patch |
22 |
@@ -0,0 +1,102 @@ |
23 |
+From 9bcf483b117b23ae25bf4a5d39ddc3eade8659a6 Mon Sep 17 00:00:00 2001 |
24 |
+From: Yu Watanabe <watanabe.yu+github@×××××.com> |
25 |
+Date: Fri, 24 Dec 2021 10:06:13 +0900 |
26 |
+Subject: [PATCH] meson: fix build with -Dcryptolib=openssl |
27 |
+ -Ddns-over-tls=false |
28 |
+ |
29 |
+Previously, when -Ddns-over-tls=false, libopenssl was missing in the |
30 |
+dependency of resolved. |
31 |
+Also, this drops libgpg_error when it is not necessary. |
32 |
+ |
33 |
+Replaces #21878. |
34 |
+--- |
35 |
+ meson.build | 3 +-- |
36 |
+ src/resolve/meson.build | 9 +-------- |
37 |
+ 2 files changed, 2 insertions(+), 10 deletions(-) |
38 |
+ |
39 |
+diff --git a/meson.build b/meson.build |
40 |
+index c0cbadecb123..0b7c1918ad4c 100644 |
41 |
+--- a/meson.build |
42 |
++++ b/meson.build |
43 |
+@@ -1474,7 +1474,7 @@ conf.set10('PREFER_OPENSSL', |
44 |
+ opt == 'openssl' or (opt == 'auto' and conf.get('HAVE_OPENSSL') == 1 and conf.get('HAVE_GCRYPT') == 0)) |
45 |
+ conf.set10('HAVE_OPENSSL_OR_GCRYPT', |
46 |
+ conf.get('HAVE_OPENSSL') == 1 or conf.get('HAVE_GCRYPT') == 1) |
47 |
+-lib_openssl_or_gcrypt = conf.get('PREFER_OPENSSL') == 1 ? libopenssl : libgcrypt |
48 |
++lib_openssl_or_gcrypt = conf.get('PREFER_OPENSSL') == 1 ? [libopenssl] : [libgcrypt, libgpg_error] |
49 |
+ |
50 |
+ dns_over_tls = get_option('dns-over-tls') |
51 |
+ if dns_over_tls != 'false' |
52 |
+@@ -2200,7 +2200,6 @@ if conf.get('ENABLE_RESOLVE') == 1 |
53 |
+ libsystemd_resolve_core], |
54 |
+ dependencies : [threads, |
55 |
+ lib_openssl_or_gcrypt, |
56 |
+- libgpg_error, |
57 |
+ libm, |
58 |
+ libidn], |
59 |
+ install_rpath : rootlibexecdir, |
60 |
+diff --git a/src/resolve/meson.build b/src/resolve/meson.build |
61 |
+index 0580fbeec625..2cdf24b1cbef 100644 |
62 |
+--- a/src/resolve/meson.build |
63 |
++++ b/src/resolve/meson.build |
64 |
+@@ -135,7 +135,7 @@ systemd_resolved_sources += custom_target( |
65 |
+ output : 'resolved-dnssd-gperf.c', |
66 |
+ command : [gperf, '@INPUT@', '--output-file', '@OUTPUT@']) |
67 |
+ |
68 |
+-systemd_resolved_dependencies = [threads, libgpg_error, libm] |
69 |
++systemd_resolved_dependencies = [threads, libm] + [lib_openssl_or_gcrypt] |
70 |
+ if conf.get('ENABLE_DNS_OVER_TLS') == 1 |
71 |
+ if conf.get('DNS_OVER_TLS_USE_GNUTLS') == 1 |
72 |
+ systemd_resolved_sources += files( |
73 |
+@@ -178,14 +178,12 @@ tests += [ |
74 |
+ [libsystemd_resolve_core, |
75 |
+ libshared], |
76 |
+ [lib_openssl_or_gcrypt, |
77 |
+- libgpg_error, |
78 |
+ libm]], |
79 |
+ |
80 |
+ [['src/resolve/test-dns-packet.c'], |
81 |
+ [libsystemd_resolve_core, |
82 |
+ libshared], |
83 |
+ [lib_openssl_or_gcrypt, |
84 |
+- libgpg_error, |
85 |
+ libm]], |
86 |
+ |
87 |
+ [['src/resolve/test-resolved-etc-hosts.c', |
88 |
+@@ -194,21 +192,18 @@ tests += [ |
89 |
+ [libsystemd_resolve_core, |
90 |
+ libshared], |
91 |
+ [lib_openssl_or_gcrypt, |
92 |
+- libgpg_error, |
93 |
+ libm]], |
94 |
+ |
95 |
+ [['src/resolve/test-resolved-packet.c'], |
96 |
+ [libsystemd_resolve_core, |
97 |
+ libshared], |
98 |
+ [lib_openssl_or_gcrypt, |
99 |
+- libgpg_error, |
100 |
+ libm]], |
101 |
+ |
102 |
+ [['src/resolve/test-dnssec.c'], |
103 |
+ [libsystemd_resolve_core, |
104 |
+ libshared], |
105 |
+ [lib_openssl_or_gcrypt, |
106 |
+- libgpg_error, |
107 |
+ libm], |
108 |
+ [], 'HAVE_OPENSSL_OR_GCRYPT'], |
109 |
+ |
110 |
+@@ -216,7 +211,6 @@ tests += [ |
111 |
+ [libsystemd_resolve_core, |
112 |
+ libshared], |
113 |
+ [lib_openssl_or_gcrypt, |
114 |
+- libgpg_error, |
115 |
+ libm], |
116 |
+ [], '', 'manual'], |
117 |
+ ] |
118 |
+@@ -226,6 +220,5 @@ fuzzers += [ |
119 |
+ [libsystemd_resolve_core, |
120 |
+ libshared], |
121 |
+ [lib_openssl_or_gcrypt, |
122 |
+- libgpg_error, |
123 |
+ libm]], |
124 |
+ ] |
125 |
|
126 |
diff --git a/sys-apps/systemd/systemd-250.ebuild b/sys-apps/systemd/systemd-250.ebuild |
127 |
index bc4018c9efa4..26dc346527a3 100644 |
128 |
--- a/sys-apps/systemd/systemd-250.ebuild |
129 |
+++ b/sys-apps/systemd/systemd-250.ebuild |
130 |
@@ -237,6 +237,7 @@ src_prepare() { |
131 |
|
132 |
# Add local patches here |
133 |
PATCHES+=( |
134 |
+ "${FILESDIR}"/250-fix-openssl.patch |
135 |
) |
136 |
|
137 |
if ! use vanilla; then |