strongswan PACKAGECONFIG
v2 cover strongswan PACKAGECONFIG
These patches add a couple new PACKAGECONFIG options for EAP, and update the default options to use swanctl, rather than deprecated components.
v2:
- Make systemd-charon conditional on systemd DISTRO_FEATURE
- Don't resend "strongswan: add some PACKAGECONFIG options for EAP" since it was already committed
- Add a patch to remove ldap from PACKAGECONFIG by default
Nick Rosbrook (2):
strongswan: do not use deprecated stroke and starter by default
strongswan: remove ldap from default PACKAGECONFIG
.../recipes-support/strongswan/strongswan_5.8.4.bb | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-)
Signature · 1 line
2.17.1
PATCH v2 1/2 strongswan: do not use deprecated stroke and starter by default
The swanctl and vici configuration of strongswan is preferred, as the stroke plugin used with starter is deprecated. As a reasonable default, add swanctl and systemd-charon to PACKAGECONFIG by default, removing charon and stroke.
While here, make sure strongswan-starter.service is only installed when charon is enabled. The current unconditional installation of strongswan-starter.service can break systems which install strongswan.service for use with swanctl.
--- .../recipes-support/strongswan/strongswan_5.8.4.bb | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-)
meta-networking/recipes-support/strongswan/strongswan_5.8.4.bb +10 -2
@@ -25,7 +25,8 @@ EXTRA_OECONF = " \ EXTRA_OECONF += "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '--with-systemdsystemunitdir=${systemd_unitdir}/system/', '--without-systemdsystemunitdir', d)}" -PACKAGECONFIG ??= "charon curl gmp openssl stroke sqlite3 \ +PACKAGECONFIG ??= "curl gmp openssl sqlite3 swanctl \ + ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd-charon', '', d)} \ ${@bb.utils.filter('DISTRO_FEATURES', 'ldap', d)} \ " PACKAGECONFIG[aesni] = "--enable-aesni,--disable-aesni,,${PN}-plugin-aesni"
@@ -135,4 +136,11 @@ RDEPENDS_${PN} += "\ RPROVIDES_${PN} += "${PN}-systemd" RREPLACES_${PN} += "${PN}-systemd" RCONFLICTS_${PN} += "${PN}-systemd" -SYSTEMD_SERVICE_${PN} = "${@bb.utils.contains('PACKAGECONFIG', 'swanctl', '${BPN}.service', '', d)} ${BPN}-starter.service" + +# The deprecated legacy 'strongswan-starter' service should only be used when charon and +# stroke are enabled. When swanctl is in use, 'strongswan.service' is needed. +# See: https://wiki.strongswan.org/projects/strongswan/wiki/Charon-systemd +SYSTEMD_SERVICE_${PN} = " \ + ${@bb.utils.contains('PACKAGECONFIG', 'swanctl', '${BPN}.service', '', d)} \ + ${@bb.utils.contains('PACKAGECONFIG', 'charon', '${BPN}-starter.service', '', d)} \ +"
Signature · 1 line
2.17.1
Re: [meta-networking][PATCH v2 1/2] strongswan: do not use deprecated stroke and starter by default
it seems to fail
https://errors.yoctoproject.org/Errors/Details/537881/
Quoted 45 lines · Nick Rosbrook
The swanctl and vici configuration of strongswan is preferred, as the stroke plugin used with starter is deprecated. As a reasonable default, add swanctl and systemd-charon to PACKAGECONFIG by default, removing charon and stroke.
While here, make sure strongswan-starter.service is only installed when charon is enabled. The current unconditional installation of strongswan-starter.service can break systems which install strongswan.service for use with swanctl.
Signed-off-by Nick Rosbrook <[email protected]>--- .../recipes-support/strongswan/strongswan_5.8.4.bb | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-)meta-networking/recipes-support/strongswan/strongswan_5.8.4.bb +10
-3@@ -25,7 +25,8 @@ EXTRA_OECONF = " \ EXTRA_OECONF += "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '--with-systemdsystemunitdir=${systemd_unitdir}/system/', '--without-systemdsystemunitdir', d)}" -PACKAGECONFIG ??= "charon curl gmp openssl stroke sqlite3 \ +PACKAGECONFIG ??= "curl gmp openssl sqlite3 swanctl \ + ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd-charon', '', d)} \ ${@bb.utils.filter('DISTRO_FEATURES', 'ldap', d)} \ " PACKAGECONFIG[aesni] = "--enable-aesni,--disable-aesni,,${PN}-plugin-aesni"@@ -135,4 +136,11 @@ RDEPENDS_${PN} += "\ RPROVIDES_${PN} += "${PN}-systemd" RREPLACES_${PN} += "${PN}-systemd" RCONFLICTS_${PN} += "${PN}-systemd" -SYSTEMD_SERVICE_${PN} = "${@bb.utils.contains('PACKAGECONFIG', 'swanctl', '${BPN}.service', '', d)} ${BPN}-starter.service" + +# The deprecated legacy 'strongswan-starter' service should only be used when charon and +# stroke are enabled. When swanctl is in use, 'strongswan.service' is needed. +# See: https://wiki.strongswan.org/projects/strongswan/wiki/Charon-systemd +SYSTEMD_SERVICE_${PN} = " \ + ${@bb.utils.contains('PACKAGECONFIG', 'swanctl', '${BPN}.service', '', d)} \ + ${@bb.utils.contains('PACKAGECONFIG', 'charon', '${BPN}-starter.service', '', d)} \ +" --2.17.1
Re: [meta-networking][PATCH v2 1/2] strongswan: do not use deprecated stroke and starter by default
Quoted 4 lines · Khem Raj
it seems to fail
Ah, I think I figured it out. Is this build for a non-systemd distro? I think 'charon' needs to be the false value in the DISTRO_FEATURES contains systemd check.
PATCH v2 2/2 strongswan: remove ldap from default PACKAGECONFIG
In reply to Nick RosbrookSince ldap is not a standard DISTRO_FEATURE, leave it disabled by default.
--- meta-networking/recipes-support/strongswan/strongswan_5.8.4.bb | 1 - 1 file changed, 1 deletion(-)
meta-networking/recipes-support/strongswan/strongswan_5.8.4.bb +0 -1
@@ -27,7 +27,6 @@ EXTRA_OECONF += "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '--with-syst PACKAGECONFIG ??= "curl gmp openssl sqlite3 swanctl \ ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd-charon', '', d)} \ - ${@bb.utils.filter('DISTRO_FEATURES', 'ldap', d)} \ " PACKAGECONFIG[aesni] = "--enable-aesni,--disable-aesni,,${PN}-plugin-aesni" PACKAGECONFIG[bfd] = "--enable-bfd-backtraces,--disable-bfd-backtraces,binutils"
Signature · 1 line
2.17.1