[strongswan] merge two related patches
Pavel Šimerda
pavlix at fedoraproject.org
Mon May 26 14:46:42 UTC 2014
commit 54e666ec89b30c7252deaaf3eeabf79c3ca306b4
Author: Pavel Šimerda <psimerda at redhat.com>
Date: Mon May 26 16:43:54 2014 +0200
merge two related patches
libstrongswan-973315.patch | 137 ---------------------------------
libstrongswan-plugin.patch | 12 ---
strongswan-5.1.1-plugins.patch | 163 ++++++++++++++++++++++++++++++++++++++++
strongswan.spec | 11 ++-
4 files changed, 169 insertions(+), 154 deletions(-)
---
diff --git a/strongswan-5.1.1-plugins.patch b/strongswan-5.1.1-plugins.patch
new file mode 100644
index 0000000..e60521d
--- /dev/null
+++ b/strongswan-5.1.1-plugins.patch
@@ -0,0 +1,163 @@
+Index: strongswan-5.2.0dr4/src/libstrongswan/plugins/plugin_loader.c
+===================================================================
+--- strongswan-5.2.0dr4.orig/src/libstrongswan/plugins/plugin_loader.c
++++ strongswan-5.2.0dr4/src/libstrongswan/plugins/plugin_loader.c
+@@ -354,7 +354,7 @@ static plugin_entry_t *load_plugin(priva
+ return NULL;
+ }
+ }
+- handle = dlopen(file, RTLD_LAZY);
++ handle = dlopen(file, RTLD_NOW|RTLD_GLOBAL);
+ if (handle == NULL)
+ {
+ DBG1(DBG_LIB, "plugin '%s' failed to load: %s", name, dlerror());
+Index: strongswan-5.2.0dr4/src/libstrongswan/Makefile.am
+===================================================================
+--- strongswan-5.2.0dr4.orig/src/libstrongswan/Makefile.am
++++ strongswan-5.2.0dr4/src/libstrongswan/Makefile.am
+@@ -106,7 +106,7 @@ AM_CFLAGS = \
+ @COVERAGE_CFLAGS@
+
+ AM_LDFLAGS = \
+- -no-undefined
++ -no-undefined -rdynamic
+
+ AM_YFLAGS = -v -d
+
+Index: strongswan-5.2.0dr4/src/libstrongswan/plugins/cmac/Makefile.am
+===================================================================
+--- strongswan-5.2.0dr4.orig/src/libstrongswan/plugins/cmac/Makefile.am
++++ strongswan-5.2.0dr4/src/libstrongswan/plugins/cmac/Makefile.am
+@@ -13,4 +13,5 @@ endif
+ libstrongswan_cmac_la_SOURCES = \
+ cmac_plugin.h cmac_plugin.c cmac.h cmac.c
+
+-libstrongswan_cmac_la_LDFLAGS = -module -avoid-version
++libstrongswan_cmac_la_LDFLAGS = -no-undefined -module -avoid-version
++libstrongswan_cmac_la_LIBADD = $(top_builddir)/src/libstrongswan/libstrongswan.la
+\ No newline at end of file
+Index: strongswan-5.2.0dr4/src/libstrongswan/plugins/constraints/Makefile.am
+===================================================================
+--- strongswan-5.2.0dr4.orig/src/libstrongswan/plugins/constraints/Makefile.am
++++ strongswan-5.2.0dr4/src/libstrongswan/plugins/constraints/Makefile.am
+@@ -14,4 +14,5 @@ libstrongswan_constraints_la_SOURCES = \
+ constraints_plugin.h constraints_plugin.c \
+ constraints_validator.h constraints_validator.c
+
+-libstrongswan_constraints_la_LDFLAGS = -module -avoid-version
++libstrongswan_constraints_la_LDFLAGS = -no-undefined -module -avoid-version
++libstrongswan_constraints_la_LIBADD = $(top_builddir)/src/libstrongswan/libstrongswan.la
+Index: strongswan-5.2.0dr4/src/libstrongswan/plugins/hmac/Makefile.am
+===================================================================
+--- strongswan-5.2.0dr4.orig/src/libstrongswan/plugins/hmac/Makefile.am
++++ strongswan-5.2.0dr4/src/libstrongswan/plugins/hmac/Makefile.am
+@@ -13,4 +13,5 @@ endif
+ libstrongswan_hmac_la_SOURCES = \
+ hmac_plugin.h hmac_plugin.c hmac.h hmac.c
+
+-libstrongswan_hmac_la_LDFLAGS = -module -avoid-version
++libstrongswan_hmac_la_LDFLAGS = -no-undefined -module -avoid-version
++libstrongswan_hmac_la_LIBADD = $(top_builddir)/src/libstrongswan/libstrongswan.la
+Index: strongswan-5.2.0dr4/src/libstrongswan/plugins/nonce/Makefile.am
+===================================================================
+--- strongswan-5.2.0dr4.orig/src/libstrongswan/plugins/nonce/Makefile.am
++++ strongswan-5.2.0dr4/src/libstrongswan/plugins/nonce/Makefile.am
+@@ -14,4 +14,5 @@ libstrongswan_nonce_la_SOURCES = \
+ nonce_plugin.h nonce_plugin.c \
+ nonce_nonceg.c nonce_nonceg.h
+
+-libstrongswan_nonce_la_LDFLAGS = -module -avoid-version
++libstrongswan_nonce_la_LDFLAGS = -no-undefined -module -avoid-version
++libstrongswan_nonce_la_LIBADD = $(top_builddir)/src/libstrongswan/libstrongswan.la
+Index: strongswan-5.2.0dr4/src/libstrongswan/plugins/openssl/Makefile.am
+===================================================================
+--- strongswan-5.2.0dr4.orig/src/libstrongswan/plugins/openssl/Makefile.am
++++ strongswan-5.2.0dr4/src/libstrongswan/plugins/openssl/Makefile.am
+@@ -31,5 +31,6 @@ libstrongswan_openssl_la_SOURCES = \
+ openssl_hmac.c openssl_hmac.h \
+ openssl_gcm.c openssl_gcm.h
+
+-libstrongswan_openssl_la_LDFLAGS = -module -avoid-version
+-libstrongswan_openssl_la_LIBADD = -lcrypto
++libstrongswan_openssl_la_LDFLAGS = -no-undefined -module -avoid-version
++libstrongswan_openssl_la_LIBADD = -lcrypto \
++ $(top_builddir)/src/libstrongswan/libstrongswan.la
+Index: strongswan-5.2.0dr4/src/libstrongswan/plugins/pem/Makefile.am
+===================================================================
+--- strongswan-5.2.0dr4.orig/src/libstrongswan/plugins/pem/Makefile.am
++++ strongswan-5.2.0dr4/src/libstrongswan/plugins/pem/Makefile.am
+@@ -15,4 +15,5 @@ libstrongswan_pem_la_SOURCES = \
+ pem_builder.c pem_builder.h \
+ pem_encoder.c pem_encoder.h
+
+-libstrongswan_pem_la_LDFLAGS = -module -avoid-version
++libstrongswan_pem_la_LDFLAGS = -no-undefined -module -avoid-version
++libstrongswan_pem_la_LIBADD = $(top_builddir)/src/libstrongswan/libstrongswan.la
+Index: strongswan-5.2.0dr4/src/libstrongswan/plugins/pgp/Makefile.am
+===================================================================
+--- strongswan-5.2.0dr4.orig/src/libstrongswan/plugins/pgp/Makefile.am
++++ strongswan-5.2.0dr4/src/libstrongswan/plugins/pgp/Makefile.am
+@@ -17,4 +17,5 @@ libstrongswan_pgp_la_SOURCES = \
+ pgp_encoder.h pgp_encoder.c \
+ pgp_builder.h pgp_builder.c
+
+-libstrongswan_pgp_la_LDFLAGS = -module -avoid-version
++libstrongswan_pgp_la_LDFLAGS = -no-undefined -module -avoid-version
++libstrongswan_pgp_la_LIBADD = $(top_builddir)/src/libstrongswan/libstrongswan.la
+Index: strongswan-5.2.0dr4/src/libstrongswan/plugins/random/Makefile.am
+===================================================================
+--- strongswan-5.2.0dr4.orig/src/libstrongswan/plugins/random/Makefile.am
++++ strongswan-5.2.0dr4/src/libstrongswan/plugins/random/Makefile.am
+@@ -16,4 +16,5 @@ libstrongswan_random_la_SOURCES = \
+ random_plugin.h random_plugin.c \
+ random_rng.c random_rng.h
+
+-libstrongswan_random_la_LDFLAGS = -module -avoid-version
++libstrongswan_random_la_LDFLAGS = -no-undefined -module -avoid-version
++libstrongswan_random_la_LIBADD = $(top_builddir)/src/libstrongswan/libstrongswan.la
+Index: strongswan-5.2.0dr4/src/libstrongswan/plugins/revocation/Makefile.am
+===================================================================
+--- strongswan-5.2.0dr4.orig/src/libstrongswan/plugins/revocation/Makefile.am
++++ strongswan-5.2.0dr4/src/libstrongswan/plugins/revocation/Makefile.am
+@@ -14,4 +14,5 @@ libstrongswan_revocation_la_SOURCES = \
+ revocation_plugin.h revocation_plugin.c \
+ revocation_validator.h revocation_validator.c
+
+-libstrongswan_revocation_la_LDFLAGS = -module -avoid-version
++libstrongswan_revocation_la_LDFLAGS = -no-undefined -module -avoid-version
++libstrongswan_revocation_la_LIBADD = $(top_builddir)/src/libstrongswan/libstrongswan.la
+Index: strongswan-5.2.0dr4/src/libstrongswan/plugins/sqlite/Makefile.am
+===================================================================
+--- strongswan-5.2.0dr4.orig/src/libstrongswan/plugins/sqlite/Makefile.am
++++ strongswan-5.2.0dr4/src/libstrongswan/plugins/sqlite/Makefile.am
+@@ -14,5 +14,6 @@ libstrongswan_sqlite_la_SOURCES = \
+ sqlite_plugin.h sqlite_plugin.c \
+ sqlite_database.h sqlite_database.c
+
+-libstrongswan_sqlite_la_LDFLAGS = -module -avoid-version
+-libstrongswan_sqlite_la_LIBADD = -lsqlite3
++libstrongswan_sqlite_la_LDFLAGS = -no-undefined -module -avoid-version
++libstrongswan_sqlite_la_LIBADD = -lsqlite3 \
++ $(top_builddir)/src/libstrongswan/libstrongswan.la
+Index: strongswan-5.2.0dr4/src/libstrongswan/plugins/x509/Makefile.am
+===================================================================
+--- strongswan-5.2.0dr4.orig/src/libstrongswan/plugins/x509/Makefile.am
++++ strongswan-5.2.0dr4/src/libstrongswan/plugins/x509/Makefile.am
+@@ -19,4 +19,5 @@ libstrongswan_x509_la_SOURCES = \
+ x509_ocsp_request.h x509_ocsp_request.c \
+ x509_ocsp_response.h x509_ocsp_response.c
+
+-libstrongswan_x509_la_LDFLAGS = -module -avoid-version
++libstrongswan_x509_la_LDFLAGS = -no-undefined -module -avoid-version
++libstrongswan_x509_la_LIBADD = $(top_builddir)/src/libstrongswan/libstrongswan.la
+Index: strongswan-5.2.0dr4/src/libstrongswan/plugins/xcbc/Makefile.am
+===================================================================
+--- strongswan-5.2.0dr4.orig/src/libstrongswan/plugins/xcbc/Makefile.am
++++ strongswan-5.2.0dr4/src/libstrongswan/plugins/xcbc/Makefile.am
+@@ -13,4 +13,5 @@ endif
+ libstrongswan_xcbc_la_SOURCES = \
+ xcbc_plugin.h xcbc_plugin.c xcbc.h xcbc.c
+
+-libstrongswan_xcbc_la_LDFLAGS = -module -avoid-version
++libstrongswan_xcbc_la_LDFLAGS = -no-undefined -module -avoid-version
++libstrongswan_xcbc_la_LIBADD = $(top_builddir)/src/libstrongswan/libstrongswan.la
diff --git a/strongswan.spec b/strongswan.spec
index fe3fbba..d27a24f 100644
--- a/strongswan.spec
+++ b/strongswan.spec
@@ -2,7 +2,7 @@
Name: strongswan
Version: 5.2.0dr4
-Release: 2%{?dist}
+Release: 3%{?dist}
Summary: An OpenSource IPsec-based VPN and TNC solution
Group: System Environment/Daemons
License: GPLv2+
@@ -20,14 +20,13 @@ Source1: %{name}.sysvinit
Patch0: strongswan-5.1.1-selinux.patch
# Use RTLD_GLOBAL when loading plugins and link them to libstrongswan
#
-# The patchset hasn't been accepted upstream because of insufficient
+# The patch hasn't been accepted upstream because of insufficient
# information from the author. This situation needs to be fixed or
# the patch needs to be removed to avoid diverging from upstream
# permanently.
#
# http://wiki.strongswan.org/issues/538
-Patch1: libstrongswan-plugin.patch
-Patch2: libstrongswan-973315.patch
+Patch1: strongswan-5.1.1-plugins.patch
BuildRequires: gmp-devel autoconf automake
BuildRequires: libcurl-devel
BuildRequires: openldap-devel
@@ -84,7 +83,6 @@ PT-TLS to support TNC over TLS.
%setup -q
%patch0 -p1
%patch1 -p1
-%patch2 -p1
echo "For migration from 4.6 to 5.0 see http://wiki.strongswan.org/projects/strongswan/wiki/CharonPlutoIKEv1" > README.Fedora
@@ -341,6 +339,9 @@ fi
%endif
%changelog
+* Mon May 26 2014 Pavel Šimerda <psimerda at redhat.com> - 5.2.0dr4-3
+- merge two related patches
+
* Mon May 26 2014 Pavel Šimerda <psimerda at redhat.com> - 5.2.0dr4-2
- clean up the patches a bit
More information about the scm-commits
mailing list