diff mbox series

[1/1] package/systemd: fix build with openssl and gnutls

Message ID 20211230094443.1727912-1-fontaine.fabrice@gmail.com
State Accepted
Headers show
Series [1/1] package/systemd: fix build with openssl and gnutls | expand

Commit Message

Fabrice Fontaine Dec. 30, 2021, 9:44 a.m. UTC
Combination of cryptolib=openssl and dns-over-tls=gnutls is disallowed
since version 250 and
https://github.com/systemd/systemd/commit/e37ad765c86d2a763a2d655068dfe59789f18e3e
resulting in the following build failure since commit
e9fb26cbb8dafd28f50a912bcaddb1056769ec17:

../output-1/build/systemd-250/meson.build:1482:16: ERROR: Problem encountered: Sorry, -Ddns-over-tls=gnutls is not supported when openssl is used as the cryptolib

Fixes:
 - http://autobuild.buildroot.org/results/2fcd4ad64b32cc4835866c9d99e05ab8c9bc794a

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
 package/systemd/systemd.mk | 38 ++++++++++++++++++--------------------
 1 file changed, 18 insertions(+), 20 deletions(-)

Comments

Thomas Petazzoni Dec. 30, 2021, 12:27 p.m. UTC | #1
On Thu, 30 Dec 2021 10:44:43 +0100
Fabrice Fontaine <fontaine.fabrice@gmail.com> wrote:

> Combination of cryptolib=openssl and dns-over-tls=gnutls is disallowed
> since version 250 and
> https://github.com/systemd/systemd/commit/e37ad765c86d2a763a2d655068dfe59789f18e3e
> resulting in the following build failure since commit
> e9fb26cbb8dafd28f50a912bcaddb1056769ec17:
> 
> ../output-1/build/systemd-250/meson.build:1482:16: ERROR: Problem encountered: Sorry, -Ddns-over-tls=gnutls is not supported when openssl is used as the cryptolib
> 
> Fixes:
>  - http://autobuild.buildroot.org/results/2fcd4ad64b32cc4835866c9d99e05ab8c9bc794a
> 
> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> ---
>  package/systemd/systemd.mk | 38 ++++++++++++++++++--------------------
>  1 file changed, 18 insertions(+), 20 deletions(-)

Applied to master, thanks.

Thomas
diff mbox series

Patch

diff --git a/package/systemd/systemd.mk b/package/systemd/systemd.mk
index 3b0356ac9a..0b52cc47d1 100644
--- a/package/systemd/systemd.mk
+++ b/package/systemd/systemd.mk
@@ -115,13 +115,6 @@  else
 SYSTEMD_CONF_OPTS += -Delfutils=false
 endif
 
-ifeq ($(BR2_PACKAGE_GNUTLS),y)
-SYSTEMD_DEPENDENCIES += gnutls
-SYSTEMD_CONF_OPTS += -Dgnutls=true
-else
-SYSTEMD_CONF_OPTS += -Dgnutls=false
-endif
-
 ifeq ($(BR2_PACKAGE_IPTABLES),y)
 SYSTEMD_DEPENDENCIES += iptables
 SYSTEMD_CONF_OPTS += -Dlibiptc=true
@@ -230,13 +223,6 @@  else
 SYSTEMD_CONF_OPTS += -Dp11kit=false
 endif
 
-ifeq ($(BR2_PACKAGE_OPENSSL),y)
-SYSTEMD_DEPENDENCIES += openssl
-SYSTEMD_CONF_OPTS += -Dopenssl=true
-else
-SYSTEMD_CONF_OPTS += -Dopenssl=false
-endif
-
 ifeq ($(BR2_PACKAGE_PCRE2),y)
 SYSTEMD_DEPENDENCIES += pcre2
 SYSTEMD_CONF_OPTS += -Dpcre2=true
@@ -491,14 +477,26 @@  else
 SYSTEMD_CONF_OPTS += -Dnss-resolve=false -Dresolve=false
 endif
 
-ifeq ($(BR2_PACKAGE_GNUTLS),y)
-SYSTEMD_CONF_OPTS += -Ddns-over-tls=gnutls -Ddefault-dns-over-tls=opportunistic
-SYSTEMD_DEPENDENCIES += gnutls
-else ifeq ($(BR2_PACKAGE_OPENSSL),y)
-SYSTEMD_CONF_OPTS += -Ddns-over-tls=openssl -Ddefault-dns-over-tls=opportunistic
+ifeq ($(BR2_PACKAGE_OPENSSL),y)
+SYSTEMD_CONF_OPTS += \
+	-Dgnutls=false \
+	-Dopenssl=true \
+	-Ddns-over-tls=openssl \
+	-Ddefault-dns-over-tls=opportunistic
 SYSTEMD_DEPENDENCIES += openssl
+else ifeq ($(BR2_PACKAGE_GNUTLS),y)
+SYSTEMD_CONF_OPTS += \
+	-Dgnutls=true \
+	-Dopenssl=false \
+	-Ddns-over-tls=gnutls \
+	-Ddefault-dns-over-tls=opportunistic
+SYSTEMD_DEPENDENCIES += gnutls
 else
-SYSTEMD_CONF_OPTS += -Ddns-over-tls=false -Ddefault-dns-over-tls=no
+SYSTEMD_CONF_OPTS += \
+	-Dgnutls=false \
+	-Dopenssl=false \
+	-Ddns-over-tls=false \
+	-Ddefault-dns-over-tls=no
 endif
 
 ifeq ($(BR2_PACKAGE_SYSTEMD_TIMESYNCD),y)