diff --git a/strongswan-4.5.3-fmt-warnings.patch b/strongswan-4.5.3-fmt-warnings.patch new file mode 100644 index 0000000..5d87e83 --- /dev/null +++ b/strongswan-4.5.3-fmt-warnings.patch @@ -0,0 +1,31 @@ +--- src/checksum/checksum_builder.c ++++ src/checksum/checksum_builder.c 2011/09/08 15:45:10 +@@ -64,9 +64,9 @@ static void build_checksum(char *path, c + fprintf(stderr, "dlopen failed: %s\n", dlerror()); + } + } +- printf("\t{\"%-20s%7u, 0x%08x, %6u, 0x%08x},\n", ++ printf("\t{\"%-20s%7zu, 0x%08x, %6zu, 0x%08x},\n", + name, fsize, fsum, ssize, ssum); +- fprintf(stderr, "\"%-20s%7u / 0x%08x %6u / 0x%08x\n", ++ fprintf(stderr, "\"%-20s%7zu / 0x%08x %6zu / 0x%08x\n", + name, fsize, fsum, ssize, ssum); + } + +@@ -106,14 +106,14 @@ static void build_binary_checksum(char * + pos = strrchr(binary, '.'); + if (pos && streq(pos, ".so")) + { +- snprintf(name, sizeof(name), "%.*s\",", pos - binary, binary); ++ snprintf(name, sizeof(name), "%.*s\",", (int)(pos - binary), binary); + if (streq(name, "libstrongswan\",")) + { + snprintf(sname, sizeof(sname), "%s", "library_init"); + } + else + { +- snprintf(sname, sizeof(sname), "%.*s_init", pos - binary, binary); ++ snprintf(sname, sizeof(sname), "%.*s_init", (int)(pos - binary), binary); + } + build_checksum(path, name, sname); + } diff --git a/strongswan.changes b/strongswan.changes index c30245d..5a87988 100644 --- a/strongswan.changes +++ b/strongswan.changes @@ -1,5 +1,5 @@ ------------------------------------------------------------------- -Thu Sep 8 12:42:51 UTC 2011 - mt@suse.com +Thu Sep 8 16:06:46 UTC 2011 - mt@suse.com - Updated to strongSwan 4.5.2 release, changes overview since 4.5.2: * Our private libraries (e.g. libstrongswan) are not installed directly in @@ -26,6 +26,7 @@ Thu Sep 8 12:42:51 UTC 2011 - mt@suse.com * The IKEv2 close action does not use the same value as the ipsec.conf dpdaction setting, but the value defined by its own closeaction keyword. The action is triggered if the remote peer closes a CHILD_SA unexpectedly. +- Fixed some fmt warnings in libchecksum, adopted paths in the spec file ------------------------------------------------------------------- Sun May 29 16:37:00 UTC 2011 - jcnengel@googlemail.com diff --git a/strongswan.spec b/strongswan.spec index 29039eb..b637443 100644 --- a/strongswan.spec +++ b/strongswan.spec @@ -23,7 +23,8 @@ Version: 4.5.3 Release: 0 %define upstream_version %{version} %define strongswan_docdir %{_docdir}/%{name} -%define strongswan_plugins %{_libexecdir}/ipsec/plugins +%define strongswan_libdir %{_libdir}/ipsec +%define strongswan_plugins %{strongswan_libdir}/plugins %define with_mysql 1 %define with_sqlite 0%{suse_version} >= 1110 %define with_gcrypt 0%{suse_version} >= 1110 @@ -43,6 +44,7 @@ Source2: %{name}.init.in Source3: %{name}-%{version}-rpmlintrc Source4: README.SUSE Patch1: %{name}_modprobe_syslog.patch +Patch2: %{name}-%{version}-fmt-warnings.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: bison flex gmp-devel gperf pkg-config BuildRequires: libcap-devel @@ -61,6 +63,7 @@ BuildRequires: libgcrypt-devel %if %with_nm BuildRequires: NetworkManager-devel %endif +BuildRequires: iptables libnl >= 1.1 %description StrongSwan is an OpenSource IPsec-based VPN Solution for Linux @@ -245,6 +248,7 @@ and the load testing plugin for IKEv2 daemon. %prep %setup -q -n %{name}-%{upstream_version} %patch1 -p0 +%patch2 -p0 sed -e 's|@libexecdir@|%_libexecdir|g' \ < $RPM_SOURCE_DIR/strongswan.init.in \ > strongswan.init @@ -325,8 +329,8 @@ cat << EOT > ${RPM_BUILD_ROOT}%{_sysconfdir}/ipsec.secrets # EOT # -rm -f $RPM_BUILD_ROOT%{_libdir}/lib*.{so,a,la} -find $RPM_BUILD_ROOT%{_libexecdir}/ipsec \ +rm -f $RPM_BUILD_ROOT%{strongswan_libdir}/lib{charon,hydra,strongswan}.so +find $RPM_BUILD_ROOT%{strongswan_libdir} \ -name "*.a" -o -name "*.la" | xargs -r rm -f # install -m755 -d ${RPM_BUILD_ROOT}%{strongswan_docdir}/ @@ -440,15 +444,16 @@ fi %files libs0 %defattr(-,root,root) %config(noreplace) %attr(600,root,root) %{_sysconfdir}/strongswan.conf -%{_libdir}/libhydra.so.0 -%{_libdir}/libhydra.so.0.0.0 -%{_libdir}/libcharon.so.0 -%{_libdir}/libcharon.so.0.0.0 -%{_libdir}/libstrongswan.so.0 -%{_libdir}/libstrongswan.so.0.0.0 %dir %{_libexecdir}/ipsec %dir %{_libexecdir}/ipsec/pool -%{_libexecdir}/ipsec/libchecksum.so +%dir %{strongswan_libdir} +%{strongswan_libdir}/libchecksum.so +%{strongswan_libdir}/libhydra.so.0 +%{strongswan_libdir}/libhydra.so.0.0.0 +%{strongswan_libdir}/libcharon.so.0 +%{strongswan_libdir}/libcharon.so.0.0.0 +%{strongswan_libdir}/libstrongswan.so.0 +%{strongswan_libdir}/libstrongswan.so.0.0.0 %dir %{strongswan_plugins} %{strongswan_plugins}/libstrongswan-addrblock.so %{strongswan_plugins}/libstrongswan-aes.so