2017-10-12 20:18:32 +02:00
|
|
|
#%%define Werror_cflags %%nil
|
|
|
|
%define _disable_ld_no_undefined 1
|
2016-12-02 19:06:04 +10:00
|
|
|
|
|
|
|
%bcond_without nm
|
2012-02-01 19:44:52 +04:00
|
|
|
|
2014-10-06 03:58:35 -04:00
|
|
|
Summary: IPSEC implementation
|
2012-02-01 19:44:52 +04:00
|
|
|
Name: strongswan
|
2019-03-15 18:07:26 +03:00
|
|
|
Version: 5.7.2
|
2017-10-12 20:18:32 +02:00
|
|
|
Release: 1
|
2012-11-27 19:30:22 +04:00
|
|
|
License: GPLv2+
|
2014-10-06 03:58:35 -04:00
|
|
|
Group: System/Servers
|
2016-12-02 19:06:04 +10:00
|
|
|
Url: https://www.strongswan.org/
|
|
|
|
Source0: http://download.strongswan.org/%{name}-%{version}.tar.bz2
|
2019-03-15 18:07:26 +03:00
|
|
|
Patch1: strongswan-5.6.0-uintptr_t.patch
|
|
|
|
Patch3: strongswan-5.6.2-CVE-2018-5388.patch
|
2017-10-12 20:18:32 +02:00
|
|
|
Source100: %{name}.rpmlintrc
|
2016-12-02 19:06:04 +10:00
|
|
|
BuildRequires: gettext-devel
|
2017-10-12 20:18:32 +02:00
|
|
|
BuildRequires: gmp-devel >= 4.1.4
|
2016-12-02 19:06:04 +10:00
|
|
|
BuildRequires: openldap-devel
|
|
|
|
BuildRequires: trousers-devel
|
|
|
|
BuildRequires: pkgconfig(libcurl)
|
2014-04-09 00:41:07 +11:00
|
|
|
BuildRequires: pkgconfig(libxml-2.0)
|
2016-12-02 19:06:04 +10:00
|
|
|
BuildRequires: pkgconfig(openssl)
|
2017-10-12 20:18:32 +02:00
|
|
|
BuildRequires: pkgconfig(sqlite3) >= 3.3.1
|
2014-10-06 03:58:35 -04:00
|
|
|
BuildRequires: pkgconfig(systemd)
|
|
|
|
%if %{with nm}
|
|
|
|
BuildRequires: pkgconfig(NetworkManager)
|
|
|
|
BuildRequires: pkgconfig(libnm-glib-vpn)
|
|
|
|
BuildRequires: pkgconfig(libnm-util)
|
|
|
|
BuildRequires: pkgconfig(libnm-glib)
|
2019-03-17 10:01:48 +03:00
|
|
|
BuildRequires: pkgconfig(libnm)
|
2014-10-06 03:58:35 -04:00
|
|
|
%endif
|
2017-10-12 20:18:32 +02:00
|
|
|
Requires(post,preun): rpm-helper
|
2012-02-01 19:44:52 +04:00
|
|
|
|
|
|
|
%description
|
2017-10-12 20:18:32 +02:00
|
|
|
FreeS/WAN is a free implementation of IPSEC & IKE for Linux. IPSEC is the
|
|
|
|
Internet Protocol Security and uses strong cryptography to provide both
|
|
|
|
authentication and encryption services. These services allow you to build
|
|
|
|
secure tunnels through untrusted networks. Everything passing through the
|
|
|
|
untrusted net is encrypted by the ipsec gateway machine and decrypted by the
|
|
|
|
gateway at the other end of the tunnel. The resulting tunnel is a virtual
|
|
|
|
private network or VPN.
|
|
|
|
This package contains the daemons and userland tools for setting up FreeS/WAN
|
|
|
|
on a freeswan enabled kernel.
|
2012-02-01 19:44:52 +04:00
|
|
|
|
2014-10-06 03:58:35 -04:00
|
|
|
%files
|
2016-03-23 18:38:59 +03:00
|
|
|
%doc README COPYING NEWS TODO
|
2014-10-06 03:58:35 -04:00
|
|
|
%dir %{_sysconfdir}/%{name}
|
|
|
|
%{_sysconfdir}/%{name}/ipsec.d/
|
|
|
|
%config(noreplace) %{_sysconfdir}/%{name}/ipsec.conf
|
2017-10-12 20:18:32 +02:00
|
|
|
%config(noreplace) %{_sysconfdir}/%{name}/ipsec.secrets
|
2014-10-06 03:58:35 -04:00
|
|
|
%config(noreplace) %{_sysconfdir}/%{name}/%{name}.conf
|
2017-10-12 20:18:32 +02:00
|
|
|
%{_sysconfdir}/dbus-1/system.d/nm-%{name}-service.conf
|
2014-10-06 03:58:35 -04:00
|
|
|
%{_unitdir}/%{name}.service
|
2016-12-02 19:06:04 +10:00
|
|
|
%{_sysconfdir}/%{name}/%{name}.d
|
|
|
|
%{_sysconfdir}/%{name}/swanctl
|
|
|
|
%{_datadir}/%{name}/templates/config/plugins/*.conf
|
|
|
|
%{_datadir}/%{name}/templates/config/%{name}.conf
|
|
|
|
%{_datadir}/%{name}/templates/config/%{name}.d/*.conf
|
|
|
|
%{_datadir}/%{name}/templates/database/imv/*.sql
|
2014-10-06 03:58:35 -04:00
|
|
|
%{_libdir}/%{name}/libcharon.so.0
|
|
|
|
%{_libdir}/%{name}/libcharon.so.0.0.0
|
|
|
|
%{_libdir}/%{name}/libtls.so.0
|
|
|
|
%{_libdir}/%{name}/libtls.so.0.0.0
|
|
|
|
%{_libdir}/%{name}/libpttls.so.0
|
|
|
|
%{_libdir}/%{name}/libpttls.so.0.0.0
|
2016-08-30 17:35:58 +03:00
|
|
|
%{_libdir}/%{name}/libtpmtss.so.0
|
|
|
|
%{_libdir}/%{name}/libtpmtss.so.0.0.0
|
2014-10-06 03:58:35 -04:00
|
|
|
%{_libdir}/%{name}/lib%{name}.so.0
|
|
|
|
%{_libdir}/%{name}/lib%{name}.so.0.0.0
|
2016-03-23 18:38:59 +03:00
|
|
|
%{_libdir}/%{name}/libvici.so.0
|
|
|
|
%{_libdir}/%{name}/libvici.so.0.0.0
|
2014-10-06 03:58:35 -04:00
|
|
|
%dir %{_libdir}/%{name}/plugins
|
|
|
|
%{_libdir}/%{name}/plugins/lib%{name}-aes.so
|
|
|
|
%{_libdir}/%{name}/plugins/lib%{name}-attr.so
|
|
|
|
%{_libdir}/%{name}/plugins/lib%{name}-cmac.so
|
|
|
|
%{_libdir}/%{name}/plugins/lib%{name}-constraints.so
|
2019-03-18 15:59:31 +03:00
|
|
|
%{_libdir}/%{name}/plugins/lib%{name}-counters.so
|
2017-10-12 20:18:32 +02:00
|
|
|
%{_libdir}/%{name}/plugins/lib%{name}-curve25519.so
|
2014-10-06 03:58:35 -04:00
|
|
|
%{_libdir}/%{name}/plugins/lib%{name}-des.so
|
|
|
|
%{_libdir}/%{name}/plugins/lib%{name}-dnskey.so
|
|
|
|
%{_libdir}/%{name}/plugins/lib%{name}-fips-prf.so
|
|
|
|
%{_libdir}/%{name}/plugins/lib%{name}-gmp.so
|
|
|
|
%{_libdir}/%{name}/plugins/lib%{name}-hmac.so
|
|
|
|
%{_libdir}/%{name}/plugins/lib%{name}-kernel-netlink.so
|
|
|
|
%{_libdir}/%{name}/plugins/lib%{name}-md5.so
|
2019-03-18 15:59:31 +03:00
|
|
|
%{_libdir}/%{name}/plugins/lib%{name}-mgf1.so
|
2014-10-06 03:58:35 -04:00
|
|
|
%{_libdir}/%{name}/plugins/lib%{name}-nonce.so
|
|
|
|
%{_libdir}/%{name}/plugins/lib%{name}-openssl.so
|
|
|
|
%{_libdir}/%{name}/plugins/lib%{name}-pem.so
|
|
|
|
%{_libdir}/%{name}/plugins/lib%{name}-pgp.so
|
|
|
|
%{_libdir}/%{name}/plugins/lib%{name}-pkcs1.so
|
|
|
|
%{_libdir}/%{name}/plugins/lib%{name}-pkcs8.so
|
|
|
|
%{_libdir}/%{name}/plugins/lib%{name}-pkcs12.so
|
|
|
|
%{_libdir}/%{name}/plugins/lib%{name}-rc2.so
|
|
|
|
%{_libdir}/%{name}/plugins/lib%{name}-sshkey.so
|
|
|
|
%{_libdir}/%{name}/plugins/lib%{name}-pubkey.so
|
|
|
|
%{_libdir}/%{name}/plugins/lib%{name}-random.so
|
|
|
|
%{_libdir}/%{name}/plugins/lib%{name}-resolve.so
|
|
|
|
%{_libdir}/%{name}/plugins/lib%{name}-revocation.so
|
|
|
|
%{_libdir}/%{name}/plugins/lib%{name}-sha1.so
|
|
|
|
%{_libdir}/%{name}/plugins/lib%{name}-sha2.so
|
|
|
|
%{_libdir}/%{name}/plugins/lib%{name}-socket-default.so
|
|
|
|
%{_libdir}/%{name}/plugins/lib%{name}-stroke.so
|
|
|
|
%{_libdir}/%{name}/plugins/lib%{name}-updown.so
|
|
|
|
%{_libdir}/%{name}/plugins/lib%{name}-x509.so
|
|
|
|
%{_libdir}/%{name}/plugins/lib%{name}-xauth-generic.so
|
|
|
|
%{_libdir}/%{name}/plugins/lib%{name}-xauth-eap.so
|
|
|
|
%{_libdir}/%{name}/plugins/lib%{name}-xcbc.so
|
|
|
|
%{_libdir}/%{name}/plugins/lib%{name}-md4.so
|
|
|
|
%{_libdir}/%{name}/plugins/lib%{name}-eap-md5.so
|
|
|
|
%{_libdir}/%{name}/plugins/lib%{name}-eap-gtc.so
|
|
|
|
%{_libdir}/%{name}/plugins/lib%{name}-eap-tls.so
|
|
|
|
%{_libdir}/%{name}/plugins/lib%{name}-eap-ttls.so
|
|
|
|
%{_libdir}/%{name}/plugins/lib%{name}-eap-peap.so
|
|
|
|
%{_libdir}/%{name}/plugins/lib%{name}-eap-mschapv2.so
|
|
|
|
%{_libdir}/%{name}/plugins/lib%{name}-farp.so
|
|
|
|
%{_libdir}/%{name}/plugins/lib%{name}-dhcp.so
|
|
|
|
%{_libdir}/%{name}/plugins/lib%{name}-curl.so
|
|
|
|
%{_libdir}/%{name}/plugins/lib%{name}-eap-identity.so
|
2016-03-23 18:38:59 +03:00
|
|
|
%{_libdir}/%{name}/plugins/lib%{name}-vici.so
|
2017-10-12 20:18:32 +02:00
|
|
|
%{_libdir}/%{name}/plugins/lib%{name}-systime-fix.so
|
2014-10-06 03:58:35 -04:00
|
|
|
%dir %{_libexecdir}/%{name}
|
|
|
|
%{_libexecdir}/%{name}/_copyright
|
|
|
|
%{_libexecdir}/%{name}/_updown
|
|
|
|
%{_libexecdir}/%{name}/charon
|
|
|
|
%{_libexecdir}/%{name}/scepclient
|
|
|
|
%{_libexecdir}/%{name}/starter
|
|
|
|
%{_libexecdir}/%{name}/stroke
|
|
|
|
%{_libexecdir}/%{name}/_imv_policy
|
|
|
|
%{_libexecdir}/%{name}/imv_policy_manager
|
2017-10-12 20:18:32 +02:00
|
|
|
#{_libexecdir}/%%{name}/pt-tls-client
|
2014-10-06 03:58:35 -04:00
|
|
|
%{_sbindir}/%{name}
|
2016-03-23 18:38:59 +03:00
|
|
|
%{_sbindir}/swanctl
|
2014-10-06 03:58:35 -04:00
|
|
|
%{_bindir}/pki
|
2017-10-12 20:18:32 +02:00
|
|
|
%{_bindir}/pt-tls-client
|
2014-10-06 03:58:35 -04:00
|
|
|
%{_mandir}/man5/%{name}.conf.5.*
|
|
|
|
%{_mandir}/man1/%{name}*.1.*
|
|
|
|
%{_mandir}/man5/%{name}_ipsec.conf.5.*
|
|
|
|
%{_mandir}/man5/%{name}_ipsec.secrets.5.*
|
2016-03-23 18:38:59 +03:00
|
|
|
%{_mandir}/man5/%{name}_swanctl.conf.5.*
|
2014-10-06 03:58:35 -04:00
|
|
|
%{_mandir}/man8/%{name}.8.*
|
|
|
|
%{_mandir}/man8/%{name}_scepclient.8.*
|
2016-03-23 18:38:59 +03:00
|
|
|
%{_mandir}/man8/%{name}_swanctl.8.*
|
2014-04-09 00:41:07 +11:00
|
|
|
|
2016-12-02 19:06:04 +10:00
|
|
|
%post
|
|
|
|
%_post_service %{name}
|
|
|
|
|
|
|
|
%preun
|
|
|
|
%_preun_service %{name}
|
|
|
|
|
2017-10-12 20:18:32 +02:00
|
|
|
#%%postun
|
|
|
|
#%%_postun_userdel strongswan
|
2016-12-02 19:06:04 +10:00
|
|
|
|
|
|
|
#----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
%if %{with nm}
|
|
|
|
%package charon-nm
|
|
|
|
Summary: NetworkManager plugin for Strongswan
|
|
|
|
Group: System/Servers
|
|
|
|
|
|
|
|
%description charon-nm
|
|
|
|
NetworkManager plugin integrates a subset of Strongswan capabilities
|
|
|
|
to NetworkManager.
|
|
|
|
|
|
|
|
%files charon-nm
|
|
|
|
%doc COPYING
|
|
|
|
%{_libexecdir}/%{name}/charon-nm
|
|
|
|
%endif
|
|
|
|
|
|
|
|
#----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
%package tnc-imcvs
|
|
|
|
Summary: Trusted network connect (TNC)'s IMC/IMV functionality
|
|
|
|
Group: System/Servers
|
|
|
|
Requires: %{name} = %{version}
|
|
|
|
|
|
|
|
%description tnc-imcvs
|
|
|
|
This package provides Trusted Network Connect's (TNC) IMC and IMV
|
|
|
|
functionality. Specifically it includes PTS based IMC/IMV for TPM based
|
|
|
|
remote attestation and scanner and test IMCs and IMVs. The Strongswan's
|
|
|
|
IMC/IMV dynamic libraries can be used by any third party TNC Client/Server
|
|
|
|
implementation possessing a standard IF-IMC/IMV interface.
|
|
|
|
|
2014-10-06 03:58:35 -04:00
|
|
|
%files tnc-imcvs
|
2017-10-12 20:18:32 +02:00
|
|
|
%doc COPYING
|
2014-10-06 03:58:35 -04:00
|
|
|
%{_libdir}/%{name}/libimcv.so.0
|
|
|
|
%{_libdir}/%{name}/libimcv.so.0.0.0
|
|
|
|
%{_libdir}/%{name}/libtnccs.so.0
|
|
|
|
%{_libdir}/%{name}/libtnccs.so.0.0.0
|
|
|
|
%{_libdir}/%{name}/libradius.so.0
|
|
|
|
%{_libdir}/%{name}/libradius.so.0.0.0
|
|
|
|
%dir %{_libdir}/%{name}/imcvs
|
|
|
|
%{_libdir}/%{name}/imcvs/imc-attestation.so
|
|
|
|
%{_libdir}/%{name}/imcvs/imc-scanner.so
|
|
|
|
%{_libdir}/%{name}/imcvs/imc-test.so
|
|
|
|
%{_libdir}/%{name}/imcvs/imc-os.so
|
|
|
|
%{_libdir}/%{name}/imcvs/imv-attestation.so
|
|
|
|
%{_libdir}/%{name}/imcvs/imv-scanner.so
|
|
|
|
%{_libdir}/%{name}/imcvs/imv-test.so
|
|
|
|
%{_libdir}/%{name}/imcvs/imv-os.so
|
|
|
|
%dir %{_libdir}/%{name}/plugins
|
|
|
|
%{_libdir}/%{name}/plugins/lib%{name}-pkcs7.so
|
|
|
|
%{_libdir}/%{name}/plugins/lib%{name}-sqlite.so
|
|
|
|
%{_libdir}/%{name}/plugins/lib%{name}-eap-tnc.so
|
|
|
|
%{_libdir}/%{name}/plugins/lib%{name}-tnc-imc.so
|
|
|
|
%{_libdir}/%{name}/plugins/lib%{name}-tnc-imv.so
|
|
|
|
%{_libdir}/%{name}/plugins/lib%{name}-tnc-tnccs.so
|
|
|
|
%{_libdir}/%{name}/plugins/lib%{name}-tnccs-20.so
|
|
|
|
%{_libdir}/%{name}/plugins/lib%{name}-tnccs-11.so
|
|
|
|
%{_libdir}/%{name}/plugins/lib%{name}-tnccs-dynamic.so
|
|
|
|
%{_libdir}/%{name}/plugins/lib%{name}-eap-radius.so
|
|
|
|
%{_libdir}/%{name}/plugins/lib%{name}-tnc-ifmap.so
|
|
|
|
%{_libdir}/%{name}/plugins/lib%{name}-tnc-pdp.so
|
|
|
|
%dir %{_libexecdir}/%{name}
|
|
|
|
%{_libexecdir}/%{name}/attest
|
2012-02-01 19:44:52 +04:00
|
|
|
|
2016-12-02 19:06:04 +10:00
|
|
|
#----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -q
|
2019-03-15 18:07:26 +03:00
|
|
|
%patch1 -p1
|
|
|
|
%patch3 -p1
|
2016-12-02 19:06:04 +10:00
|
|
|
|
|
|
|
%build
|
|
|
|
libtoolize --install --copy --force --automake
|
|
|
|
aclocal -I m4
|
|
|
|
autoconf
|
|
|
|
autoheader
|
|
|
|
automake --add-missing --copy
|
|
|
|
|
|
|
|
%serverbuild
|
|
|
|
%configure2_5x \
|
|
|
|
--disable-static \
|
|
|
|
--with-ipsec-script=%{name} \
|
|
|
|
--sysconfdir=%{_sysconfdir}/%{name} \
|
|
|
|
--with-ipsecdir=%{_libexecdir}/%{name} \
|
|
|
|
--with-ipseclibdir=%{_libdir}/%{name} \
|
|
|
|
--with-fips-mode=2 \
|
|
|
|
--enable-openssl \
|
|
|
|
--enable-md4 \
|
|
|
|
--enable-xauth-eap \
|
|
|
|
--enable-eap-md5 \
|
|
|
|
--enable-eap-gtc \
|
|
|
|
--enable-eap-tls \
|
|
|
|
--enable-eap-ttls \
|
|
|
|
--enable-eap-peap \
|
|
|
|
--enable-eap-mschapv2 \
|
|
|
|
--enable-farp \
|
|
|
|
--enable-dhcp \
|
|
|
|
--enable-sqlite \
|
|
|
|
--enable-tnc-ifmap \
|
|
|
|
--enable-tnc-pdp \
|
|
|
|
--enable-imc-test \
|
|
|
|
--enable-imv-test \
|
|
|
|
--enable-imc-scanner \
|
|
|
|
--enable-imv-scanner \
|
|
|
|
--enable-imc-attestation \
|
|
|
|
--enable-imv-attestation \
|
|
|
|
--enable-imv-os \
|
|
|
|
--enable-imc-os \
|
|
|
|
--enable-eap-tnc \
|
|
|
|
--enable-tnccs-20 \
|
|
|
|
--enable-tnccs-11 \
|
|
|
|
--enable-tnccs-dynamic \
|
|
|
|
--enable-tnc-imc \
|
|
|
|
--enable-tnc-imv \
|
2017-10-12 20:18:32 +02:00
|
|
|
--enable-tss-trousers \
|
2016-12-02 19:06:04 +10:00
|
|
|
--enable-eap-radius \
|
|
|
|
--enable-curl \
|
|
|
|
--enable-eap-identity \
|
2017-10-12 20:18:32 +02:00
|
|
|
--enable-systime-fix \
|
2014-10-06 03:58:35 -04:00
|
|
|
%if %{with nm}
|
2016-12-02 19:06:04 +10:00
|
|
|
--enable-nm \
|
2014-10-06 03:58:35 -04:00
|
|
|
%endif
|
2016-12-02 19:06:04 +10:00
|
|
|
|
|
|
|
%make
|
|
|
|
sed -i 's/\t/ /' src/starter/ipsec.conf
|
|
|
|
|
2017-10-12 20:18:32 +02:00
|
|
|
|
2016-12-02 19:06:04 +10:00
|
|
|
%install
|
|
|
|
%makeinstall_std
|
2017-10-12 20:18:32 +02:00
|
|
|
|
|
|
|
# Prefix man pages
|
2016-12-02 19:06:04 +10:00
|
|
|
for i in %{buildroot}%{_mandir}/*/*; do
|
2017-10-12 20:18:32 +02:00
|
|
|
if echo "$i" | grep -vq '/%{name}[^\/]*$'; then
|
|
|
|
mv "$i" "`echo "$i" | sed -re 's|/([^/]+)$|/%{name}_\1|'`"
|
|
|
|
fi
|
2016-12-02 19:06:04 +10:00
|
|
|
done
|
2017-10-12 20:18:32 +02:00
|
|
|
|
|
|
|
# Delete unwanted library files
|
2016-12-02 19:06:04 +10:00
|
|
|
rm %{buildroot}%{_libdir}/%{name}/*.so
|
|
|
|
find %{buildroot} -type f -name '*.la' -delete
|
2017-10-12 20:18:32 +02:00
|
|
|
|
|
|
|
# Fix config permissions
|
2016-12-02 19:06:04 +10:00
|
|
|
chmod 644 %{buildroot}%{_sysconfdir}/%{name}/%{name}.conf
|
2017-10-12 20:18:32 +02:00
|
|
|
|
|
|
|
# Protect configuration from ordinary user's eyes
|
2016-12-02 19:06:04 +10:00
|
|
|
chmod 700 %{buildroot}%{_sysconfdir}/%{name}
|
|
|
|
|
|
|
|
# Create ipsec.d directory tree.
|
|
|
|
install -d -m 700 %{buildroot}%{_sysconfdir}/%{name}/ipsec.d
|
|
|
|
for i in aacerts acerts certs cacerts crls ocspcerts private reqs; do
|
|
|
|
install -d -m 700 %{buildroot}%{_sysconfdir}/%{name}/ipsec.d/${i}
|
|
|
|
done
|
|
|
|
|
2017-10-12 20:18:32 +02:00
|
|
|
# Put a conf file in the right spot
|
|
|
|
mkdir -p %{buildroot}%{_sysconfdir}/dbus-1/system.d/
|
|
|
|
mv %{buildroot}%{_sysconfdir}/%{name}/dbus-1/system.d/nm-%{name}-service.conf %{buildroot}%{_sysconfdir}/dbus-1/system.d/
|
|
|
|
rm -rf %{buildroot}%{_sysconfdir}/%{name}/dbus-1/
|