From efc1948dca96b0ec128959dc156db7324142ec08 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pavel=20=C5=A0imerda?= Date: Thu, 25 Sep 2014 21:06:55 +0200 Subject: [PATCH] use upstream patch for json/json-c dependency --- strongswan-5.2.0-json.patch | 44 ++++++++++++++++++++++++++++--------- strongswan.spec | 5 ++++- 2 files changed, 38 insertions(+), 11 deletions(-) diff --git a/strongswan-5.2.0-json.patch b/strongswan-5.2.0-json.patch index 2b80f56..abd787d 100644 --- a/strongswan-5.2.0-json.patch +++ b/strongswan-5.2.0-json.patch @@ -1,33 +1,57 @@ +commit fafed376e7f4bb00014a101f0156c475fd964374 +Author: Tobias Brunner +Date: Wed Jul 30 16:01:41 2014 +0200 + + imv-swid: Use pkg-config to check for libjson-c + + The package/library is called libjson-c on recent distributions. + Some like Ubuntu 14.04 provide symlinks with the old name but these + will eventually disappear. Using pkg-config allows us to easily check + for it (with a fallback) and configure the proper compiler flags. + + Fixes #663. + diff --git a/configure.ac b/configure.ac -index 497240f..13faf8d 100644 +index 497240f..695fa45 100644 --- a/configure.ac +++ b/configure.ac -@@ -876,8 +876,8 @@ if test x$tss = xtrousers; then +@@ -876,8 +876,10 @@ if test x$tss = xtrousers; then fi if test x$imv_swid = xtrue; then - AC_CHECK_LIB([json],[main],[LIBS="$LIBS"],[AC_MSG_ERROR([JSON library libjson not found])],[]) - AC_CHECK_HEADER([json/json.h],,[AC_MSG_ERROR([JSON header json/json.h not found!])]) -+ AC_CHECK_LIB([json-c],[main],[LIBS="$LIBS"],[AC_MSG_ERROR([JSON library libjson not found])],[]) -+ AC_CHECK_HEADER([json-c/json.h],,[AC_MSG_ERROR([JSON header json/json.h not found!])]) ++ PKG_CHECK_MODULES(json, [json-c], [], ++ [PKG_CHECK_MODULES(json, [json])]) ++ AC_SUBST(json_CFLAGS) ++ AC_SUBST(json_LIBS) fi if test x$dumm = xtrue; then diff --git a/src/libpts/plugins/imv_swid/Makefile.am b/src/libpts/plugins/imv_swid/Makefile.am -index 77f33e6..547254d 100644 +index 77f33e6..9305484 100644 --- a/src/libpts/plugins/imv_swid/Makefile.am +++ b/src/libpts/plugins/imv_swid/Makefile.am +@@ -5,7 +5,7 @@ AM_CPPFLAGS = \ + -I$(top_srcdir)/src/libpts + + AM_CFLAGS = \ +- $(PLUGIN_CFLAGS) ++ $(PLUGIN_CFLAGS) $(json_CFLAGS) + + imcv_LTLIBRARIES = imv-swid.la + @@ -13,7 +13,7 @@ imv_swid_la_LIBADD = \ $(top_builddir)/src/libimcv/libimcv.la \ $(top_builddir)/src/libpts/libpts.la \ $(top_builddir)/src/libstrongswan/libstrongswan.la \ - -ljson -+ -ljson-c ++ $(json_LIBS) imv_swid_la_SOURCES = \ imv_swid.c imv_swid_state.h imv_swid_state.c \ diff --git a/src/libpts/plugins/imv_swid/imv_swid_rest.h b/src/libpts/plugins/imv_swid/imv_swid_rest.h -index 93e3d6a..7566a93 100644 +index 93e3d6a..32392cb 100644 --- a/src/libpts/plugins/imv_swid/imv_swid_rest.h +++ b/src/libpts/plugins/imv_swid/imv_swid_rest.h @@ -26,7 +26,7 @@ @@ -35,12 +59,12 @@ index 93e3d6a..7566a93 100644 #include -#include -+#include ++#include typedef struct imv_swid_rest_t imv_swid_rest_t; diff --git a/src/libpts/plugins/imv_swid/imv_swid_state.h b/src/libpts/plugins/imv_swid/imv_swid_state.h -index 7ffabfd..1ab7942 100644 +index 7ffabfd..a6a8d03 100644 --- a/src/libpts/plugins/imv_swid/imv_swid_state.h +++ b/src/libpts/plugins/imv_swid/imv_swid_state.h @@ -28,7 +28,7 @@ @@ -48,7 +72,7 @@ index 7ffabfd..1ab7942 100644 #include -#include -+#include ++#include typedef struct imv_swid_state_t imv_swid_state_t; typedef enum imv_swid_handshake_state_t imv_swid_handshake_state_t; diff --git a/strongswan.spec b/strongswan.spec index ccb4b15..440ef3b 100644 --- a/strongswan.spec +++ b/strongswan.spec @@ -8,7 +8,7 @@ Name: strongswan Version: 5.2.0 -Release: 6%{?prerelease:.%{prerelease}}%{?dist} +Release: 7%{?prerelease:.%{prerelease}}%{?dist} Summary: An OpenSource IPsec-based VPN and TNC solution Group: System Environment/Daemons License: GPLv2+ @@ -382,6 +382,9 @@ fi %endif %changelog +* Thu Sep 25 2014 Pavel Šimerda - 5.2.0-7 +- use upstream patch for json/json-c dependency + * Thu Sep 25 2014 Pavel Šimerda - 5.2.0-6 - Resolves: #1146145 - Strongswan is compiled without xauth-noauth plugin