Source: strongswan
Version: 5.5.3-2
Tags: patch
User: [email protected]
Usertags: rebootstrap

strongswan fails to cross build from source for !x86 when built on x86,
because it confuses build architecture and host architecture and thus
enables rdrand and aesni e.g. for ppc64el builds that lack these
instructions. Please consider applying the attached patch.

Helmut
diff --minimal -Nru strongswan-5.5.3/debian/changelog 
strongswan-5.5.3/debian/changelog
--- strongswan-5.5.3/debian/changelog   2017-06-28 13:07:19.000000000 +0200
+++ strongswan-5.5.3/debian/changelog   2017-06-30 20:01:29.000000000 +0200
@@ -1,3 +1,10 @@
+strongswan (5.5.3-2.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Fix FTCBFS: Fix build/host confusion (Closes: #-1)
+
+ -- Helmut Grohne <[email protected]>  Fri, 30 Jun 2017 20:01:29 +0200
+
 strongswan (5.5.3-2) unstable; urgency=medium
 
   * debian/control:
diff --minimal -Nru strongswan-5.5.3/debian/rules strongswan-5.5.3/debian/rules
--- strongswan-5.5.3/debian/rules       2017-06-23 14:06:44.000000000 +0200
+++ strongswan-5.5.3/debian/rules       2017-06-30 20:01:12.000000000 +0200
@@ -51,15 +51,15 @@
 
 # the padlock plugin only makes sense on i386
 # AESNI and RdRand only make sense on i386 and amd64
-ifeq ($(DEB_BUILD_ARCH_CPU),i386)
+ifeq ($(DEB_HOST_ARCH_CPU),i386)
   CONFIGUREARGS += --enable-padlock --enable-rdrand --enable-aesni
 endif
 
-ifeq ($(DEB_BUILD_ARCH_CPU),amd64)
+ifeq ($(DEB_HOST_ARCH_CPU),amd64)
   CONFIGUREARGS += --enable-rdrand --enable-aesni
 endif
 
-ifeq ($(DEB_BUILD_ARCH_OS),linux)
+ifeq ($(DEB_HOST_ARCH_OS),linux)
        # only enable network-manager and capabilities dropping on linux hosts
        # some plugins are linux-only too
        CONFIGUREARGS += --enable-nm \
@@ -72,7 +72,7 @@
                --enable-systemd --enable-swanctl
 endif
 
-ifeq ($(DEB_BUILD_ARCH_OS),kfreebsd)
+ifeq ($(DEB_HOST_ARCH_OS),kfreebsd)
        # recommended configure line for FreeBSD
        # http://wiki.strongswan.org/projects/strongswan/wiki/FreeBSD
        CONFIGUREARGS += --disable-kernel-netlink \
@@ -103,7 +103,7 @@
 override_dh_install-arch:
 
        # first special cases
-ifeq ($(DEB_BUILD_ARCH_OS),linux)
+ifeq ($(DEB_HOST_ARCH_OS),linux)
        # handle Linux-only plugins
        dh_install -p libstrongswan-standard-plugins 
usr/lib/ipsec/plugins/libstrongswan-connmark.so
        dh_install -p libstrongswan-standard-plugins 
usr/share/strongswan/templates/config/plugins/connmark.conf
@@ -127,7 +127,7 @@
        dh_install -p strongswan-starter lib/systemd/system/strongswan.service
 endif
 
-ifeq ($(DEB_BUILD_ARCH_OS),kfreebsd)
+ifeq ($(DEB_HOST_ARCH_OS),kfreebsd)
        # handle FreeBSD-only plugins
        dh_install -p libstrongswan 
usr/lib/ipsec/plugins/libstrongswan-kernel-pfkey.so
        dh_install -p libstrongswan 
usr/share/strongswan/templates/config/plugins/kernel-pfkey.conf
@@ -138,7 +138,7 @@
        dh_install -p libstrongswan etc/strongswan.d/charon/kernel-pfroute.conf
 endif
 
-ifeq ($(DEB_BUILD_ARCH_CPU),i386)
+ifeq ($(DEB_HOST_ARCH_CPU),i386)
        # special handling for padlock, as it is only built on i386
        dh_install -p libstrongswan-extra-plugins 
usr/lib/ipsec/plugins/libstrongswan-padlock.so
        dh_install -p libstrongswan-extra-plugins 
usr/share/strongswan/templates/config/plugins/padlock.conf
@@ -153,7 +153,7 @@
        dh_install -p libstrongswan-standard-plugins 
etc/strongswan.d/charon/aesni.conf
 endif
 
-ifeq ($(DEB_BUILD_ARCH_CPU), amd64)
+ifeq ($(DEB_HOST_ARCH_CPU), amd64)
        dh_install -p libstrongswan-extra-plugins 
usr/lib/ipsec/plugins/libstrongswan-rdrand.so
        dh_install -p libstrongswan-extra-plugins 
usr/share/strongswan/templates/config/plugins/rdrand.conf
        dh_install -p libstrongswan-extra-plugins 
etc/strongswan.d/charon/rdrand.conf

Reply via email to