package/usbguard: needs at least a crypto backend
authorFabrice Fontaine <fontaine.fabrice@gmail.com>
Wed, 4 Aug 2021 10:07:36 +0000 (12:07 +0200)
committerArnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Thu, 5 Aug 2021 16:47:45 +0000 (18:47 +0200)
Since its addition in commit fbff7d7289cc95db991184f890f4ca1fcf8a101e,
usbguard needs a crypto backend otherwise the build will fail on:

checking for sodium... no
checking for libcrypto... no
checking for powerpc-buildroot-linux-uclibc-libgcrypt-config... no
checking for libgcrypt-config... no
checking for LIBGCRYPT - version >= 1.5.0... no
configure: error: The selected crypto backend library is not available.

So select sodium as the default crypto backend as this is the default
choice in configure.ac.

Fixes:
 - http://autobuild.buildroot.org/results/fb9865e2c65ea1dd9a657e1181a6c8c49481fda7

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
package/usbguard/Config.in
package/usbguard/usbguard.mk

index 58ee5c4b250702516ca0e6bd79e56745227f89bf..41f19dc1a07b1a141298a444b1150295f10cb4b3 100644 (file)
@@ -8,6 +8,7 @@ config BR2_PACKAGE_USBGUARD
        depends on !BR2_TOOLCHAIN_USES_MUSL
        select BR2_PACKAGE_PROTOBUF
        select BR2_PACKAGE_LIBQB
+       select BR2_PACKAGE_LIBSODIUM if !BR2_PACKAGE_LIBGCRYPT && !BR2_PACKAGE_LIBOPENSSL
        help
          The USBGuard software framework
 
index 1518f92fc530631e0675a1c2c121c2867b875e74..a0d1c8446ffdcf3fef049101c80087a4657d6943 100644 (file)
@@ -18,23 +18,19 @@ USBGUARD_CONF_OPTS = \
 
 USBGUARD_DEPENDENCIES += libqb protobuf
 
-ifeq ($(BR2_PACKAGE_LIBOPENSSL),y)
+ifeq ($(BR2_PACKAGE_LIBSODIUM),y)
+USBGUARD_CONF_OPTS += --with-crypto-library=sodium
+USBGUARD_DEPENDENCIES += libsodium
+else ifeq ($(BR2_PACKAGE_LIBOPENSSL),y)
 USBGUARD_CONF_OPTS += --with-crypto-library=openssl
 USBGUARD_DEPENDENCIES += libopenssl
-endif
-
-ifeq ($(BR2_PACKAGE_LIBGCRYPT),y)
+else ifeq ($(BR2_PACKAGE_LIBGCRYPT),y)
 USBGUARD_CONF_ENV += \
        ac_cv_path_LIBGCRYPT_CONFIG=$(STAGING_DIR)/usr/bin/libgcrypt-config
 USBGUARD_CONF_OPTS += --with-crypto-library=gcrypt
 USBGUARD_DEPENDENCIES += libgcrypt
 endif
 
-ifeq ($(BR2_PACKAGE_LIBSODIUM),y)
-USBGUARD_CONF_OPTS += --with-crypto-library=sodium
-USBGUARD_DEPENDENCIES += libsodium
-endif
-
 ifeq ($(BR2_PACKAGE_SYSTEMD),y)
 USBGUARD_CONF_OPTS += --enable-systemd
 USBGUARD_DEPENDENCIES += systemd