strongswan: add strongswan-mod-socket 16367/head
authorStijn Tintel <stijn@linux-ipv6.be>
Sat, 14 Aug 2021 18:08:27 +0000 (21:08 +0300)
committerPhilip Prindeville <philipp@redfish-solutions.com>
Fri, 4 Feb 2022 00:44:06 +0000 (17:44 -0700)
This a virtual package that is satisfied by either
strongswan-mod-socket-default or strongswan-mod-socket-dynamic, and is
required by the charon daemon. When neither of these packages is
installed, charon will not function.

Closes #16261, #16263 and #16367.

Signed-off-by: Noel Kuntze <noel.kuntze@thermi.consulting>
Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
net/strongswan/Makefile

index 2635696a72d93c56a434d0310de8fab126dfab73..78b500d2c8814e7077ae55f9d27bb48a8d4f473f 100644 (file)
@@ -343,7 +343,7 @@ endef
 define Package/strongswan-charon
 $(call Package/strongswan/Default)
   TITLE+= IKEv1/IKEv2 keying daemon
-  DEPENDS:= strongswan
+  DEPENDS:= strongswan strongswan-mod-socket
 endef
 
 define Package/strongswan-charon/description
@@ -445,6 +445,9 @@ define BuildPlugin
     $$(call Package/strongswan/Default)
     TITLE:= StrongSwan $(2) plugin
     DEPENDS:= strongswan $(3)
+ifneq ($(4),)
+    PROVIDES:=strongswan-mod-$(4)
+endif
   endef
 
   define Package/strongswan-mod-$(1)/install
@@ -460,6 +463,13 @@ define BuildPlugin
   $$(eval $$(call BuildPackage,strongswan-mod-$(1)))
 endef
 
+define BuildPluginProvides
+ifeq ($(4),)
+    $$(error BuildPluginProvides requires provider suffix)
+endif
+  $(call BuildPlugin,$1,$2,$3,$4)
+endef
+
 CONFIGURE_ARGS+= \
        --disable-scripts \
        --disable-static \
@@ -726,8 +736,8 @@ $(eval $(call BuildPlugin,sha1,SHA1 crypto,))
 $(eval $(call BuildPlugin,sha2,SHA2 crypto,))
 $(eval $(call BuildPlugin,sha3,SHA3 and SHAKE crypto,))
 $(eval $(call BuildPlugin,smp,SMP configuration and control interface,+PACKAGE_strongswan-mod-smp:libxml2))
-$(eval $(call BuildPlugin,socket-default,default socket implementation for charon,))
-$(eval $(call BuildPlugin,socket-dynamic,dynamic socket implementation for charon,))
+$(eval $(call BuildPluginProvides,socket-default,default socket implementation for charon,,socket))
+$(eval $(call BuildPluginProvides,socket-dynamic,dynamic socket implementation for charon,,socket))
 $(eval $(call BuildPlugin,sql,SQL database interface,))
 $(eval $(call BuildPlugin,sqlite,SQLite database interface,+strongswan-mod-sql +PACKAGE_strongswan-mod-sqlite:libsqlite3))
 $(eval $(call BuildPlugin,sshkey,SSH key decoding,))