summaryrefslogtreecommitdiffstats
path: root/meta-networking/recipes-support/strongswan/strongswan_6.0.2.bb
diff options
context:
space:
mode:
authorWang Mingyu <wangmy@fujitsu.com>2025-07-16 14:41:01 +0800
committerKhem Raj <raj.khem@gmail.com>2025-07-15 23:54:16 -0700
commit2b9e429a242d8899c77281b6c2387b63534b8d82 (patch)
treec2b70f0085019775cca12b3ddf297ba35ad585a8 /meta-networking/recipes-support/strongswan/strongswan_6.0.2.bb
parentf77f1072da45ecbecc74bcc7203b92bc353eb097 (diff)
downloadmeta-openembedded-2b9e429a242d8899c77281b6c2387b63534b8d82.tar.gz
strongswan: upgrade 6.0.1 -> 6.0.2
0001-pki-Fix-signature-of-help-to-match-that-of-a-callbac.patch 0002-callback-job-Replace-return_false-in-constructors-wi.patch 0003-Cast-uses-of-return_-nop-and-enumerator_create_empty.patch removed since they're included in 6.0.2 Changelog: ============= - Support for per-CPU SAs (RFC 9611) has been added (Linux 6.13+). - Basic support for AGGFRAG mode (RFC 9347) has been added (Linux 6.14+). - POSIX regular expressions can be used to match remote identities. - Switching configs based on EAP-Identities is supported. Setting 'remote.eap_id' now always initiates an EAP-Identity exchange. - On Linux, sequence numbers from acquires are used when installing SAs. This allows handling narrowing properly. - During rekeying, the narrowed traffic selectors are now proposed instead of the configured ones. - The default AH/ESP proposals contain all supported key exchange methods plus 'none' to make PFS optional and accept proposals of older peers. - GRO for ESP in enabled for NAT-T UDP sockets, which can improve performance if the esp4|6_offload modules are loaded. - charon-nm sets the VPN connection as persistent, preventing NetworkManager from tearing down the connection if the network connectivity changes. - ML-KEM is supported via OpenSSL 3.5+. - The wolfssl plugin is now compatible to wolfSSL's FIPS module. - The libsoup plugin has been migrated to libsoup 3, libsoup 2 is not supported anymore. - The long defunct uci plugin has been removed. - Log messages by watcher_t are now logged in a separate log group ('wch'). Signed-off-by: Wang Mingyu <wangmy@fujitsu.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-networking/recipes-support/strongswan/strongswan_6.0.2.bb')
-rw-r--r--meta-networking/recipes-support/strongswan/strongswan_6.0.2.bb191
1 files changed, 191 insertions, 0 deletions
diff --git a/meta-networking/recipes-support/strongswan/strongswan_6.0.2.bb b/meta-networking/recipes-support/strongswan/strongswan_6.0.2.bb
new file mode 100644
index 0000000000..aa4524ab3e
--- /dev/null
+++ b/meta-networking/recipes-support/strongswan/strongswan_6.0.2.bb
@@ -0,0 +1,191 @@
1DESCRIPTION = "strongSwan is an OpenSource IPsec implementation for the \
2Linux operating system."
3SUMMARY = "strongSwan is an OpenSource IPsec implementation"
4HOMEPAGE = "http://www.strongswan.org"
5SECTION = "net"
6LICENSE = "GPL-2.0-only"
7LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
8DEPENDS = "flex-native flex bison-native"
9DEPENDS:append = "${@bb.utils.contains('DISTRO_FEATURES', 'tpm2', ' tpm2-tss', '', d)}"
10
11SRC_URI = "https://download.strongswan.org/strongswan-${PV}.tar.bz2"
12
13SRC_URI[sha256sum] = "b8bfc897b84001fd810a281918d6c9ce37503cae0f41b39c43d4aba0201277cf"
14
15UPSTREAM_CHECK_REGEX = "strongswan-(?P<pver>\d+(\.\d+)+)\.tar"
16
17EXTRA_OECONF = " \
18 --without-lib-prefix \
19 --with-dev-headers=${includedir}/strongswan \
20"
21
22EXTRA_OECONF += "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '--with-systemdsystemunitdir=${systemd_unitdir}/system/', '--without-systemdsystemunitdir', d)}"
23
24PACKAGECONFIG ?= "curl openssl sqlite3 swanctl \
25 ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd-charon', 'charon', d)} \
26 ${@bb.utils.contains('DISTRO_FEATURES', 'tpm2', 'tpm2', '', d)} \
27 ${@bb.utils.contains('DISTRO_FEATURES', 'ima', 'tnc-imc imc-hcd imc-os imc-scanner imc-attestation', '', d)} \
28 ${@bb.utils.contains('DISTRO_FEATURES', 'ima', 'tnc-imv imv-hcd imv-os imv-scanner imv-attestation', '', d)} \
29"
30
31PACKAGECONFIG[aes] = "--enable-aes,--disable-aes,,${PN}-plugin-aes"
32PACKAGECONFIG[aesni] = "--enable-aesni,--disable-aesni,,${PN}-plugin-aesni"
33PACKAGECONFIG[bfd] = "--enable-bfd-backtraces,--disable-bfd-backtraces,binutils"
34PACKAGECONFIG[charon] = "--enable-charon,--disable-charon,"
35PACKAGECONFIG[curl] = "--enable-curl,--disable-curl,curl,${PN}-plugin-curl"
36PACKAGECONFIG[des] = "--enable-des,--disable-des,,${PN}-plugin-des"
37PACKAGECONFIG[eap-identity] = "--enable-eap-identity,--disable-eap-identity,,${PN}-plugin-eap-identity"
38PACKAGECONFIG[eap-mschapv2] = "--enable-eap-mschapv2,--disable-eap-mschapv2,,${PN}-plugin-eap-mschapv2"
39PACKAGECONFIG[fips-prf] = "--enable-fips-prf,--disable-fips-prf,,${PN}-plugin-fips-prf"
40PACKAGECONFIG[gmp] = "--enable-gmp,--disable-gmp,gmp,${PN}-plugin-gmp"
41PACKAGECONFIG[hmac] = "--enable-hmac,--disable-hmac,,${PN}-plugin-hmac"
42PACKAGECONFIG[ldap] = "--enable-ldap,--disable-ldap,openldap,${PN}-plugin-ldap"
43PACKAGECONFIG[md5] = "--enable-md5,--disable-md5,,${PN}-plugin-md5"
44PACKAGECONFIG[mysql] = "--enable-mysql,--disable-mysql,mysql5,${PN}-plugin-mysql"
45PACKAGECONFIG[nm] = "--enable-nm,--disable-nm,networkmanager,${PN}-nm"
46PACKAGECONFIG[openssl] = "--enable-openssl,--disable-openssl,openssl,${PN}-plugin-openssl"
47PACKAGECONFIG[pkcs12] = "--enable-pkcs12,--disable-pkcs12,,${PN}-plugin-pkcs12"
48PACKAGECONFIG[rc2] = "--enable-rc2,--disable-rc2,,${PN}-plugin-rc2"
49PACKAGECONFIG[sha1] = "--enable-sha1,--disable-sha1,,${PN}-plugin-sha1"
50PACKAGECONFIG[sha2] = "--enable-sha2,--disable-sha2,,${PN}-plugin-sha2"
51PACKAGECONFIG[soup] = "--enable-soup,--disable-soup,libsoup-2.4,${PN}-plugin-soup"
52PACKAGECONFIG[sqlite3] = "--enable-sqlite,--disable-sqlite,sqlite3,${PN}-plugin-sqlite"
53PACKAGECONFIG[stroke] = "--enable-stroke,--disable-stroke,,${PN}-plugin-stroke"
54PACKAGECONFIG[swanctl] = "--enable-swanctl,--disable-swanctl,,libgcc"
55PACKAGECONFIG[curve25519] = "--enable-curve25519,--disable-curve25519,, ${PN}-plugin-curve25519"
56
57# requires swanctl
58PACKAGECONFIG[systemd-charon] = "--enable-systemd,--disable-systemd,systemd,"
59
60# tpm needs meta-tpm layer
61PACKAGECONFIG[tpm2] = "--enable-tpm,--disable-tpm,,${PN}-plugin-tpm"
62
63
64# integraty configuration needs meta-integraty
65#imc
66PACKAGECONFIG[tnc-imc] = "--enable-tnc-imc,--disable-tnc-imc,, ${PN}-plugin-tnc-imc ${PN}-plugin-tnc-tnccs"
67PACKAGECONFIG[imc-test] = "--enable-imc-test,--disable-imc-test,,"
68PACKAGECONFIG[imc-scanner] = "--enable-imc-scanner,--disable-imc-scanner,,"
69PACKAGECONFIG[imc-os] = "--enable-imc-os,--disable-imc-os,,"
70PACKAGECONFIG[imc-attestation] = "--enable-imc-attestation,--disable-imc-attestation,,"
71PACKAGECONFIG[imc-swima] = "--enable-imc-swima, --disable-imc-swima, json-c,"
72PACKAGECONFIG[imc-hcd] = "--enable-imc-hcd, --disable-imc-hcd,,"
73
74#imv set
75PACKAGECONFIG[tnc-imv] = "--enable-tnc-imv,--disable-tnc-imv,, ${PN}-plugin-tnc-imv ${PN}-plugin-tnc-tnccs"
76PACKAGECONFIG[imv-test] = "--enable-imv-test,--disable-imv-test,,"
77PACKAGECONFIG[imv-scanner] = "--enable-imv-scanner,--disable-imv-scanner,,"
78PACKAGECONFIG[imv-os] = "--enable-imv-os,--disable-imv-os,,"
79PACKAGECONFIG[imv-attestation] = "--enable-imv-attestation,--disable-imv-attestation,,"
80PACKAGECONFIG[imv-swima] = "--enable-imv-swima, --disable-imv-swima, json-c,"
81PACKAGECONFIG[imv-hcd] = "--enable-imv-hcd, --disable-imv-hcd,,"
82
83PACKAGECONFIG[tnc-ifmap] = "--enable-tnc-ifmap,--disable-tnc-ifmap, libxml2, ${PN}-plugin-tnc-ifmap"
84PACKAGECONFIG[tnc-pdp] = "--enable-tnc-pdp,--disable-tnc-pdp,, ${PN}-plugin-tnc-pdp"
85
86PACKAGECONFIG[tnccs-11] = "--enable-tnccs-11,--disable-tnccs-11,libxml2, ${PN}-plugin-tnccs-11"
87PACKAGECONFIG[tnccs-20] = "--enable-tnccs-20,--disable-tnccs-20,, ${PN}-plugin-tnccs-20"
88PACKAGECONFIG[tnccs-dynamic] = "--enable-tnccs-dynamic,--disable-tnccs-dynamic,,${PN}-plugin-tnccs-dynamic"
89
90inherit autotools systemd pkgconfig
91
92RRECOMMENDS:${PN} = "kernel-module-ah4 \
93 kernel-module-esp4 \
94 kernel-module-xfrm-user \
95 "
96
97FILES:${PN} += "${libdir}/ipsec/lib*${SOLIBS}"
98FILES:${PN}-dbg += "${bindir}/.debug ${sbindir}/.debug ${libdir}/ipsec/.debug ${libexecdir}/ipsec/.debug"
99FILES:${PN}-dev += "${libdir}/ipsec/lib*${SOLIBSDEV} ${libdir}/ipsec/*.la ${libdir}/ipsec/include/config.h"
100FILES:${PN}-staticdev += "${libdir}/ipsec/*.a"
101
102CONFFILES:${PN} = "${sysconfdir}/*.conf ${sysconfdir}/ipsec.d/*.conf ${sysconfdir}/strongswan.d/*.conf"
103
104PACKAGES += "${PN}-plugins"
105ALLOW_EMPTY:${PN}-plugins = "1"
106
107PACKAGE_BEFORE_PN = "${PN}-imcvs ${PN}-imcvs-dbg"
108ALLOW_EMPTY:${PN}-imcvs = "1"
109
110FILES:${PN}-imcvs = "${libdir}/ipsec/imcvs/*.so"
111FILES:${PN}-imcvs-dbg += "${libdir}/ipsec/imcvs/.debug"
112
113PACKAGES =+ "${PN}-nm ${PN}-nm-dbg"
114FILES:${PN}-nm = "${libexecdir}/ipsec/charon-nm ${datadir}/dbus-1/system.d/nm-strongswan-service.conf"
115FILES:${PN}-nm-dbg = "${libexecdir}/ipsec/.debug/charon-nm"
116
117PACKAGES_DYNAMIC += "^${PN}-plugin-.*$"
118NOAUTOPACKAGEDEBUG = "1"
119
120python split_strongswan_plugins () {
121 sysconfdir = d.expand('${sysconfdir}/strongswan.d/charon')
122 libdir = d.expand('${libdir}/ipsec/plugins')
123 dbglibdir = os.path.join(libdir, '.debug')
124
125 def add_plugin_conf(f, pkg, file_regex, output_pattern, modulename):
126 dvar = d.getVar('PKGD')
127 oldfiles = d.getVar('CONFFILES:' + pkg)
128 newfile = '/' + os.path.relpath(f, dvar)
129
130 if not oldfiles:
131 d.setVar('CONFFILES:' + pkg, newfile)
132 else:
133 d.setVar('CONFFILES:' + pkg, oldfiles + " " + newfile)
134
135 split_packages = do_split_packages(d, libdir, r'libstrongswan-(.*)\.so', '${PN}-plugin-%s', 'strongSwan %s plugin', prepend=True)
136 do_split_packages(d, sysconfdir, r'(.*)\.conf', '${PN}-plugin-%s', 'strongSwan %s plugin', prepend=True, hook=add_plugin_conf)
137
138 split_dbg_packages = do_split_packages(d, dbglibdir, r'libstrongswan-(.*)\.so', '${PN}-plugin-%s-dbg', 'strongSwan %s plugin - Debugging files', prepend=True, extra_depends='${PN}-dbg')
139 split_dev_packages = do_split_packages(d, libdir, r'libstrongswan-(.*)\.la', '${PN}-plugin-%s-dev', 'strongSwan %s plugin - Development files', prepend=True, extra_depends='${PN}-dev')
140 split_staticdev_packages = do_split_packages(d, libdir, r'libstrongswan-(.*)\.a', '${PN}-plugin-%s-staticdev', 'strongSwan %s plugin - Development files (Static Libraries)', prepend=True, extra_depends='${PN}-staticdev')
141
142 if split_packages:
143 pn = d.getVar('PN')
144 d.setVar('RRECOMMENDS:' + pn + '-plugins', ' '.join(split_packages))
145 d.appendVar('RRECOMMENDS:' + pn + '-dbg', ' ' + ' '.join(split_dbg_packages))
146 d.appendVar('RRECOMMENDS:' + pn + '-dev', ' ' + ' '.join(split_dev_packages))
147 d.appendVar('RRECOMMENDS:' + pn + '-staticdev', ' ' + ' '.join(split_staticdev_packages))
148}
149
150PACKAGESPLITFUNCS:prepend = "split_strongswan_plugins "
151
152# Install some default plugins based on default strongSwan ./configure options
153# See https://wiki.strongswan.org/projects/strongswan/wiki/Pluginlist
154RDEPENDS:${PN} += "\
155 ${PN}-plugin-attr \
156 ${PN}-plugin-cmac \
157 ${PN}-plugin-constraints \
158 ${PN}-plugin-dnskey \
159 ${PN}-plugin-drbg \
160 ${PN}-plugin-kdf \
161 ${PN}-plugin-kernel-netlink \
162 ${PN}-plugin-nonce \
163 ${PN}-plugin-pem \
164 ${PN}-plugin-pgp \
165 ${PN}-plugin-pkcs1 \
166 ${PN}-plugin-pkcs7 \
167 ${PN}-plugin-pkcs8 \
168 ${PN}-plugin-pubkey \
169 ${PN}-plugin-random \
170 ${PN}-plugin-resolve \
171 ${PN}-plugin-revocation \
172 ${PN}-plugin-socket-default \
173 ${PN}-plugin-sshkey \
174 ${PN}-plugin-updown \
175 ${PN}-plugin-vici \
176 ${PN}-plugin-x509 \
177 ${PN}-plugin-xauth-generic \
178 ${PN}-plugin-xcbc \
179 "
180
181RPROVIDES:${PN} += "${PN}-systemd"
182RREPLACES:${PN} += "${PN}-systemd"
183RCONFLICTS:${PN} += "${PN}-systemd"
184
185# The deprecated legacy 'strongswan-starter' service should only be used when charon and
186# stroke are enabled. When swanctl is in use, 'strongswan.service' is needed.
187# See: https://wiki.strongswan.org/projects/strongswan/wiki/Charon-systemd
188SYSTEMD_SERVICE:${PN} = " \
189 ${@bb.utils.contains('PACKAGECONFIG', 'swanctl', '${BPN}.service', '', d)} \
190 ${@bb.utils.contains('PACKAGECONFIG', 'charon', '${BPN}-starter.service', '', d)} \
191"