Skip to contentSkip to conversation

strongswan: fix some autobuild failures

PATCH New Thomas De Schampheleire 3 participants 6 messages Aug 7, 2013 – Aug 10, 2013

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 strongswan: fix some autobuild failures

strongswan suffers from several autobuild failures. This series addresses one of them: 'no rule to make target libtls.la'. While looking at it, I also saw a missing host-pkgconf dependency, although I did not see this in any of the autobuilds I checked.

---
 package/strongswan/strongswan-0001-force-tls-when-needed.patch |  72 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 package/strongswan/strongswan.mk                               |   9 +++++++++
 2 files changed, 81 insertions(+), 0 deletions(-)
#1 lore raw

PATCH 1/1 strongswan: needs host-pkgconf

package/strongswan/strongswan.mk +1 -0
@@ -9,6 +9,7 @@ STRONGSWAN_SOURCE = strongswan-$(STRONGS
 STRONGSWAN_SITE = http://download.strongswan.org
 STRONGSWAN_LICENSE = GPLv2+
 STRONGSWAN_LICENSE_FILES = COPYING LICENSE
+STRONGSWAN_DEPENDENCIES = host-pkgconf
 STRONGSWAN_CONF_OPT +=                                                             \
       --enable-pkcs11=yes                                                          \
       --enable-kernel-netlink=$(if $(BR2_INET_IPV6),yes,no)                        \
#2 lore raw

PATCH 1/1 strongswan: needs host-pkgconf

Quoted 15 lines · Thomas De Schampheleire

Signed-off-by: Thomas De Schampheleire
<[email protected]>

package/strongswan/strongswan.mk +1 -0
@@ -9,6 +9,7 @@ STRONGSWAN_SOURCE = strongswan-$(STRONGS
 STRONGSWAN_SITE = http://download.strongswan.org
 STRONGSWAN_LICENSE = GPLv2+
 STRONGSWAN_LICENSE_FILES = COPYING LICENSE
+STRONGSWAN_DEPENDENCIES = host-pkgconf
 STRONGSWAN_CONF_OPT +=                                               
             \
       --enable-pkcs11=yes                                            
Quoted 3 lines
             \
       --enable-kernel-netlink=$(if $(BR2_INET_IPV6),yes,no)          
             \
Signature · 3 lines
J?r?me Pouiller, Sysmic
Embedded Linux specialist
http://www.sysmic.fr
#3 lore raw

PATCH 1/1 strongswan: fix build error 'no rule to make target libtls.la'

In reply to Thomas De Schampheleire

In some strongswan configurations, an implicit dependency could be missing. This commit patches strongswan to force this dependency when needed.

Fixes several autobuild failures, like:
http://autobuild.buildroot.net/results/643f5b33973d5b12ffe6d84254bf3be9ed81d0ad/
http://autobuild.buildroot.net/results/24bcdcb83119e416c92458fa9ff2f5269957a743/

---
 package/strongswan/strongswan-0001-force-tls-when-needed.patch |  72 +++++++++++
 package/strongswan/strongswan.mk                               |   8 +
 2 files changed, 80 insertions(+), 0 deletions(-)
package/strongswan/strongswan-0001-force-tls-when-needed.patch new file +72 -0
new file mode 100644
@@ -0,0 +1,72 @@
+Force libtls when libpttls is enabled
+
+The libpttls library expects libtls.la to be present:
+libpttls_la_LIBADD = $(top_builddir)/src/libtls/libtls.la
+but there is no expressed dependency between them. Therefore, it is possible to
+create a configuration where libpttls is enabled and libtls is not, causing a
+build failure:
+
+make[4]: *** No rule to make target `../../src/libtls/libtls.la', needed by `libpttls.la'.  Stop.
+
+libpttls is enabled through USE_PTTLS, set when tnc_tnccs == true.
+  tnc_tnccs is true when any of tnc-imc, tnc_imv, tnccs_11, tnccs_dynamic or eap_tnc is true.
+
+libtls is enabled through USE_TLS, set when tls == true.
+  tls is true when any of eap_tls, eap_ttls or eap_peap is true.
+
+This patch forces tls to true, when tnc_tnccs is true, so that the required libtls.la dependency
+is built before it is used by libpttls.
+
+Signed-off-by: Thomas De Schampheleire <[email protected]>
+Upstream-status: will be submitted
+
+diff --git a/configure b/configure
+--- a/configure
++++ b/configure
+@@ -15900,10 +15900,6 @@ if test x$eap_sim = xtrue; then
+ 	simaka=true;
+ fi
+ 
+-if test x$eap_tls = xtrue -o x$eap_ttls = xtrue -o x$eap_peap = xtrue; then
+-	tls=true;
+-fi
+-
+ if test x$eap_radius = xtrue -o x$radattr = xtrue -o x$tnc_pdp = xtrue; then
+ 	radius=true;
+ fi
+@@ -15912,6 +15908,10 @@ if test x$tnc_imc = xtrue -o x$tnc_imv =
+ 	tnc_tnccs=true;
+ fi
+ 
++if test x$eap_tls = xtrue -o x$eap_ttls = xtrue -o x$eap_peap = xtrue -o x$tnc_tnccs = xtrue; then
++	tls=true;
++fi
++
+ if test x$imc_test = xtrue -o x$imv_test = xtrue -o x$imc_scanner = xtrue -o x$imv_scanner = xtrue -o x$imc_os = xtrue -o x$imv_os = xtrue -o x$imc_attestation = xtrue -o x$imv_attestation = xtrue; then
+ 	imcv=true;
+ fi
+diff --git a/configure.in b/configure.in
+--- a/configure.in
++++ b/configure.in
+@@ -313,10 +313,6 @@ if test x$eap_sim = xtrue; then
+ 	simaka=true;
+ fi
+ 
+-if test x$eap_tls = xtrue -o x$eap_ttls = xtrue -o x$eap_peap = xtrue; then
+-	tls=true;
+-fi
+-
+ if test x$eap_radius = xtrue -o x$radattr = xtrue -o x$tnc_pdp = xtrue; then
+ 	radius=true;
+ fi
+@@ -325,6 +321,10 @@ if test x$tnc_imc = xtrue -o x$tnc_imv =
+ 	tnc_tnccs=true;
+ fi
+ 
++if test x$eap_tls = xtrue -o x$eap_ttls = xtrue -o x$eap_peap = xtrue -o x$tnc_tnccs = xtrue; then
++	tls=true;
++fi
++
+ if test x$imc_test = xtrue -o x$imv_test = xtrue -o x$imc_scanner = xtrue -o x$imv_scanner = xtrue -o x$imc_os = xtrue -o x$imv_os = xtrue -o x$imc_attestation = xtrue -o x$imv_attestation = xtrue; then
+ 	imcv=true;
+ fi
package/strongswan/strongswan.mk +8 -0
@@ -66,4 +66,12 @@ STRONGSWAN_DEPENDENCIES +=              
       $(if $(BR2_PACKAGE_MYSQL_CLIENT),mysql_client)
 endif
 
+# Strongswan uses AC_LIB_PREFIX, which is relatively new.
+# Avoid make to try reconfiguring due to timestamp changes,
+# after patching configure{,.in}.
+define STRONGSWAN_AVOID_RECONF_HOOK
+	touch $(@D)/aclocal.m4
+endef
+STRONGSWAN_POST_PATCH_HOOKS += STRONGSWAN_AVOID_RECONF_HOOK
+
 $(eval $(autotools-package))
#4 lore raw

PATCH 1/1 strongswan: fix build error 'no rule to make target libtls.la'

Hi Thomas,

Quoted 48 lines · Thomas De Schampheleire

In some strongswan configurations, an implicit dependency could be missing.
This commit patches strongswan to force this dependency when needed.

Fixes several autobuild failures, like:

http://autobuild.buildroot.net/results/643f5b33973d5b12ffe6d84254bf3be9ed81d0ad/

http://autobuild.buildroot.net/results/24bcdcb83119e416c92458fa9ff2f5269957a743/

Signed-off-by: Thomas De Schampheleire
<[email protected]>

---
 package/strongswan/strongswan-0001-force-tls-when-needed.patch |  72 
+++++++++++
 package/strongswan/strongswan.mk                               |   8 
+
 2 files changed, 80 insertions(+), 0 deletions(-)

diff --git a/package/strongswan/strongswan-0001-force-tls-when-needed.patch b/package/strongswan/strongswan-0001-force-tls-when-needed.patch new file mode 100644

package/strongswan/strongswan-0001-force-tls-when-needed.patch new file +5 -0
@@ -0,0 +1,72 @@
+Force libtls when libpttls is enabled
+
+The libpttls library expects libtls.la to be present:
+libpttls_la_LIBADD = $(top_builddir)/src/libtls/libtls.la
+but there is no expressed dependency between them. Therefore, it is 

possible to
+create a configuration where libpttls is enabled and libtls is not, causing a

package/strongswan/strongswan-0001-force-tls-when-needed.patch new file +3 -0
+build failure:
+
+make[4]: *** No rule to make target `../../src/libtls/libtls.la', 

needed by `libpttls.la'. Stop.

package/strongswan/strongswan-0001-force-tls-when-needed.patch new file +3 -0
+
+libpttls is enabled through USE_PTTLS, set when tnc_tnccs == true.
+  tnc_tnccs is true when any of tnc-imc, tnc_imv, tnccs_11,

tnccs_dynamic or eap_tnc is true.

package/strongswan/strongswan-0001-force-tls-when-needed.patch new file +5 -0
+
+libtls is enabled through USE_TLS, set when tls == true.
+  tls is true when any of eap_tls, eap_ttls or eap_peap is true.
+
+This patch forces tls to true, when tnc_tnccs is true, so that the 
Quoted 2 lines

required libtls.la dependency
+is built before it is used by libpttls.

Agreed

[...]

Quoted 7 lines
package/strongswan/strongswan.mk +0 -0
@@ -66,4 +66,12 @@ STRONGSWAN_DEPENDENCIES +=
       $(if $(BR2_PACKAGE_MYSQL_CLIENT),mysql_client)
 endif

package/strongswan/strongswan.mk STRONGSWAN_DEPENDENCIES += · line 77

Quoted 10 lines
package/strongswan/strongswan.mk +8 -0
 
+# Strongswan uses AC_LIB_PREFIX, which is relatively new.
+# Avoid make to try reconfiguring due to timestamp changes,
+# after patching configure{,.in}.
+define STRONGSWAN_AVOID_RECONF_HOOK
+	touch $(@D)/aclocal.m4
+endef
+STRONGSWAN_POST_PATCH_HOOKS += STRONGSWAN_AVOID_RECONF_HOOK
+
 $(eval $(autotools-package))

Indeed, strongswan autoreconf does not seems to work. Although, I think it can be resolved by adding
lib-prefix.m4 (provided by m4 package) to m4/macro/ and adding "m4_include(m4/macros/lib-prefix.m4)"
before AC_LIB_PREFIX.

(I don't understand how it works for upstream)

Signature · 3 lines
J?r?me Pouiller, Sysmic
Embedded Linux specialist
http://www.sysmic.fr
#5 lore raw

PATCH 1/1 strongswan: fix some autobuild failures

In reply to Thomas De Schampheleire

Dear Thomas De Schampheleire,

Quoted 11 lines · Thomas De Schampheleire

strongswan suffers from several autobuild failures. This series addresses one of them: 'no rule to make target libtls.la'. While looking at it, I also saw a missing host-pkgconf dependency, although I did not see this in any of the autobuilds I checked.

---
 package/strongswan/strongswan-0001-force-tls-when-needed.patch |  72 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 package/strongswan/strongswan.mk                               |   9 +++++++++
 2 files changed, 81 insertions(+), 0 deletions(-)

Committed both patches, thanks.

Thomas

Signature · 4 lines
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com