2013-04-13 20:58:36 +00:00
|
|
|
%global USE_FIPSCHECK true
|
|
|
|
%global USE_LIBCAP_NG true
|
|
|
|
%global USE_LABELED_IPSEC true
|
|
|
|
%global USE_CRL_FETCHING true
|
|
|
|
%global USE_DNSSEC true
|
|
|
|
%global USE_NM true
|
|
|
|
%global USE_LINUX_AUDIT true
|
|
|
|
|
|
|
|
%global _hardened_build 1
|
|
|
|
|
2013-10-31 03:17:42 +00:00
|
|
|
%global fipscheck_version 1.3.0
|
2013-04-13 20:58:36 +00:00
|
|
|
%global buildefence 0
|
|
|
|
%global development 0
|
|
|
|
|
|
|
|
#global prever rc1
|
|
|
|
|
|
|
|
Name: libreswan
|
|
|
|
Summary: IPsec implementation with IKEv1 and IKEv2 keying protocols
|
2015-06-01 16:48:33 +00:00
|
|
|
Version: 3.13
|
2014-10-22 20:14:24 +00:00
|
|
|
Release: %{?prever:0.}1%{?prever:.%{prever}}%{?dist}
|
2013-04-13 20:58:36 +00:00
|
|
|
License: GPLv2
|
|
|
|
Url: https://www.libreswan.org/
|
|
|
|
Source: https://download.libreswan.org/%{name}-%{version}%{?prever}.tar.gz
|
|
|
|
Group: System Environment/Daemons
|
2014-01-18 01:46:01 +00:00
|
|
|
BuildRequires: gmp-devel bison flex pkgconfig
|
2013-04-13 20:58:36 +00:00
|
|
|
BuildRequires: systemd
|
|
|
|
Requires(post): coreutils bash systemd
|
|
|
|
Requires(preun): systemd
|
|
|
|
Requires(postun): systemd
|
|
|
|
|
|
|
|
Conflicts: openswan < %{version}-%{release}
|
|
|
|
Obsoletes: openswan < %{version}-%{release}
|
|
|
|
Provides: openswan = %{version}-%{release}
|
2013-08-19 23:29:49 +00:00
|
|
|
Provides: openswan-doc = %{version}-%{release}
|
2013-04-13 20:58:36 +00:00
|
|
|
|
|
|
|
BuildRequires: pkgconfig hostname
|
2013-12-11 01:30:56 +00:00
|
|
|
BuildRequires: nss-devel >= 3.14.3, nspr-devel
|
2013-04-13 20:58:36 +00:00
|
|
|
BuildRequires: pam-devel
|
|
|
|
%if %{USE_DNSSEC}
|
|
|
|
BuildRequires: unbound-devel
|
|
|
|
%endif
|
|
|
|
%if %{USE_FIPSCHECK}
|
2013-10-31 03:17:42 +00:00
|
|
|
BuildRequires: fipscheck-devel >= %{fipscheck_version}
|
|
|
|
Requires: fipscheck%{_isa} >= %{fipscheck_version}
|
2013-04-13 20:58:36 +00:00
|
|
|
%endif
|
|
|
|
%if %{USE_LINUX_AUDIT}
|
|
|
|
Buildrequires: audit-libs-devel
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%if %{USE_LIBCAP_NG}
|
|
|
|
BuildRequires: libcap-ng-devel
|
|
|
|
%endif
|
|
|
|
%if %{USE_CRL_FETCHING}
|
|
|
|
BuildRequires: openldap-devel curl-devel
|
|
|
|
%endif
|
|
|
|
%if %{buildefence}
|
|
|
|
BuildRequires: ElectricFence
|
|
|
|
%endif
|
|
|
|
# Only needed if xml man pages are modified and need regeneration
|
|
|
|
# BuildRequires: xmlto
|
|
|
|
|
|
|
|
Requires: nss-tools, nss-softokn
|
2013-10-31 03:17:42 +00:00
|
|
|
Requires: iproute >= 2.6.8
|
2013-04-13 20:58:36 +00:00
|
|
|
|
|
|
|
%description
|
2013-05-13 18:34:29 +00:00
|
|
|
Libreswan is a free implementation of IPsec & IKE for Linux. IPsec is
|
2013-04-13 20:58:36 +00:00
|
|
|
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
|
2013-05-13 18:34:29 +00:00
|
|
|
through the untrusted net is encrypted by the ipsec gateway machine and
|
2013-04-13 20:58:36 +00:00
|
|
|
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
|
|
|
|
Libreswan. To build KLIPS, see the kmod-libreswan.spec file.
|
|
|
|
|
|
|
|
Libreswan also supports IKEv2 (RFC4309) and Secure Labeling
|
|
|
|
|
|
|
|
Libreswan is based on Openswan-2.6.38 which in turn is based on FreeS/WAN-2.04
|
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -q -n libreswan-%{version}%{?prever}
|
|
|
|
|
|
|
|
%build
|
|
|
|
%if %{buildefence}
|
|
|
|
%define efence "-lefence"
|
|
|
|
%endif
|
|
|
|
|
|
|
|
#796683: -fno-strict-aliasing
|
|
|
|
%{__make} \
|
|
|
|
%if %{development}
|
|
|
|
USERCOMPILE="-g -DGCC_LINT %(echo %{optflags} | sed -e s/-O[0-9]*/ /) %{?efence} -fPIE -pie -fno-strict-aliasing -Wformat-nonliteral -Wformat-security" \
|
|
|
|
%else
|
|
|
|
USERCOMPILE="-g -DGCC_LINT %{optflags} %{?efence} -fPIE -pie -fno-strict-aliasing -Wformat-nonliteral -Wformat-security" \
|
|
|
|
%endif
|
|
|
|
USERLINK="-g -pie -Wl,-z,relro,-z,now %{?efence}" \
|
|
|
|
INITSYSTEM=systemd \
|
|
|
|
USE_NM=%{USE_NM} \
|
|
|
|
USE_XAUTHPAM=true \
|
2013-10-31 03:17:42 +00:00
|
|
|
%if %{USE_FIPSCHECK}
|
2013-04-13 20:58:36 +00:00
|
|
|
USE_FIPSCHECK="%{USE_FIPSCHECK}" \
|
2013-12-11 01:30:56 +00:00
|
|
|
FIPSPRODUCTCHECK=%{_sysconfdir}/system-fips \
|
2013-10-31 03:17:42 +00:00
|
|
|
%endif
|
2013-04-13 20:58:36 +00:00
|
|
|
USE_LIBCAP_NG="%{USE_LIBCAP_NG}" \
|
|
|
|
USE_LABELED_IPSEC="%{USE_LABELED_IPSEC}" \
|
|
|
|
%if %{USE_CRL_FETCHING}
|
|
|
|
USE_LDAP=true \
|
|
|
|
USE_LIBCURL=true \
|
|
|
|
%endif
|
|
|
|
USE_DNSSEC="%{USE_DNSSEC}" \
|
|
|
|
INC_USRLOCAL=%{_prefix} \
|
|
|
|
FINALLIBEXECDIR=%{_libexecdir}/ipsec \
|
|
|
|
MANTREE=%{_mandir} \
|
|
|
|
INC_RCDEFAULT=%{_initrddir} \
|
|
|
|
programs
|
|
|
|
FS=$(pwd)
|
|
|
|
|
|
|
|
%if %{USE_FIPSCHECK}
|
|
|
|
# Add generation of HMAC checksums of the final stripped binaries
|
|
|
|
%define __spec_install_post \
|
|
|
|
%{?__debug_package:%{__debug_install_post}} \
|
|
|
|
%{__arch_install_post} \
|
|
|
|
%{__os_install_post} \
|
2013-10-31 03:17:42 +00:00
|
|
|
fipshmac -d %{buildroot}%{_libdir}/fipscheck %{buildroot}%{_libexecdir}/ipsec/* \
|
2013-04-13 20:58:36 +00:00
|
|
|
fipshmac -d %{buildroot}%{_libdir}/fipscheck %{buildroot}%{_sbindir}/ipsec \
|
|
|
|
%{nil}
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%install
|
2014-01-18 01:46:01 +00:00
|
|
|
rm -rf %{buildroot}
|
2013-04-13 20:58:36 +00:00
|
|
|
%{__make} \
|
|
|
|
DESTDIR=%{buildroot} \
|
|
|
|
INC_USRLOCAL=%{_prefix} \
|
|
|
|
FINALLIBEXECDIR=%{_libexecdir}/ipsec \
|
|
|
|
MANTREE=%{buildroot}%{_mandir} \
|
|
|
|
INC_RCDEFAULT=%{_initrddir} \
|
|
|
|
INSTMANFLAGS="-m 644" \
|
|
|
|
INITSYSTEM=systemd \
|
|
|
|
install
|
|
|
|
FS=$(pwd)
|
|
|
|
rm -rf %{buildroot}/usr/share/doc/libreswan
|
|
|
|
|
|
|
|
install -d -m 0755 %{buildroot}%{_localstatedir}/run/pluto
|
2013-10-31 03:17:42 +00:00
|
|
|
# used when setting --perpeerlog without --perpeerlogbase
|
2013-04-13 20:58:36 +00:00
|
|
|
install -d -m 0700 %{buildroot}%{_localstatedir}/log/pluto/peer
|
|
|
|
install -d %{buildroot}%{_sbindir}
|
|
|
|
|
|
|
|
%if %{USE_FIPSCHECK}
|
|
|
|
mkdir -p %{buildroot}%{_libdir}/fipscheck
|
2013-10-31 03:17:42 +00:00
|
|
|
install -d %{buildroot}%{_sysconfdir}/prelink.conf.d/
|
|
|
|
install -m644 packaging/fedora/libreswan-prelink.conf %{buildroot}%{_sysconfdir}/prelink.conf.d/libreswan-fips.conf
|
2013-04-13 20:58:36 +00:00
|
|
|
%endif
|
|
|
|
|
2013-12-11 01:30:56 +00:00
|
|
|
echo "include %{_sysconfdir}/ipsec.d/*.secrets" > %{buildroot}%{_sysconfdir}/ipsec.secrets
|
|
|
|
rm -fr %{buildroot}%{_sysconfdir}/rc.d/rc*
|
2013-04-13 20:58:36 +00:00
|
|
|
|
2013-05-13 18:34:29 +00:00
|
|
|
%files
|
2014-07-10 15:32:06 +00:00
|
|
|
%doc CHANGES COPYING CREDITS README LICENSE
|
2013-04-13 20:58:36 +00:00
|
|
|
%doc docs/*.*
|
|
|
|
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/ipsec.conf
|
|
|
|
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/sysconfig/pluto
|
|
|
|
%attr(0600,root,root) %config(noreplace) %{_sysconfdir}/ipsec.secrets
|
|
|
|
%attr(0700,root,root) %dir %{_sysconfdir}/ipsec.d
|
|
|
|
%attr(0700,root,root) %dir %{_sysconfdir}/ipsec.d/cacerts
|
|
|
|
%attr(0700,root,root) %dir %{_sysconfdir}/ipsec.d/crls
|
|
|
|
%attr(0700,root,root) %dir %{_sysconfdir}/ipsec.d/policies
|
|
|
|
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/ipsec.d/policies/*
|
|
|
|
%attr(0700,root,root) %dir %{_localstatedir}/log/pluto/peer
|
|
|
|
%attr(0755,root,root) %dir %{_localstatedir}/run/pluto
|
|
|
|
%attr(0644,root,root) %{_unitdir}/ipsec.service
|
|
|
|
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/pam.d/pluto
|
|
|
|
%{_sbindir}/ipsec
|
|
|
|
%{_libexecdir}/ipsec
|
2014-07-10 15:21:30 +00:00
|
|
|
%doc %{_mandir}/*/*
|
2013-04-13 20:58:36 +00:00
|
|
|
|
|
|
|
%if %{USE_FIPSCHECK}
|
|
|
|
%{_libdir}/fipscheck/*.hmac
|
2013-10-31 03:17:42 +00:00
|
|
|
# We own the directory so we don't have to require prelink
|
|
|
|
%attr(0755,root,root) %dir %{_sysconfdir}/prelink.conf.d/
|
2014-07-10 15:12:45 +00:00
|
|
|
%config(noreplace) %{_sysconfdir}/prelink.conf.d/libreswan-fips.conf
|
2013-04-13 20:58:36 +00:00
|
|
|
%endif
|
|
|
|
|
|
|
|
%preun
|
|
|
|
%systemd_preun ipsec.service
|
|
|
|
|
|
|
|
%postun
|
|
|
|
%systemd_postun_with_restart ipsec.service
|
|
|
|
|
2013-05-13 18:34:29 +00:00
|
|
|
%post
|
2013-04-13 20:58:36 +00:00
|
|
|
%systemd_post ipsec.service
|
2013-12-11 01:30:56 +00:00
|
|
|
if [ ! -f %{_sysconfdir}/ipsec.d/cert8.db ] ; then
|
|
|
|
TEMPFILE=$(/bin/mktemp %{_sysconfdir}/ipsec.d/nsspw.XXXXXXX)
|
|
|
|
[ $? -gt 0 ] && TEMPFILE=%{_sysconfdir}/ipsec.d/nsspw.$$
|
|
|
|
echo > ${TEMPFILE}
|
|
|
|
certutil -N -f ${TEMPFILE} -d %{_sysconfdir}/ipsec.d
|
|
|
|
restorecon %{_sysconfdir}/ipsec.d/*db 2>/dev/null || :
|
|
|
|
rm -f ${TEMPFILE}
|
2013-10-31 03:17:42 +00:00
|
|
|
fi
|
2013-04-13 20:58:36 +00:00
|
|
|
|
|
|
|
%changelog
|
2015-06-01 16:48:33 +00:00
|
|
|
* Mon Jun 01 2015 Paul Wouters <pwouters@redhat.com> - 3.13-1
|
|
|
|
- Updated to 3.13 for CVE-2015-3204
|
|
|
|
|
2014-11-07 04:46:08 +00:00
|
|
|
* Fri Nov 07 2014 Paul Wouters <pwouters@redhat.com> - 3.12-1
|
|
|
|
- Updated to 3.12 Various IKEv2 fixes
|
|
|
|
|
2014-10-22 20:14:24 +00:00
|
|
|
* Wed Oct 22 2014 Paul Wouters <pwouters@redhat.com> - 3.11-1
|
|
|
|
- Updated to 3.11 (many fixes, including startup fixes)
|
2014-10-24 01:37:32 +00:00
|
|
|
- Resolves: rhbz#1144941 libreswan 3.10 upgrade breaks old ipsec.secrets configs
|
|
|
|
- Resolves: rhbz#1147072 ikev1 aggr mode connection fails after libreswan upgrade
|
|
|
|
- Resolves: rhbz#1144831 Libreswan appears to start with systemd before all the NICs are up and running
|
2014-10-22 20:14:24 +00:00
|
|
|
|
2014-09-09 16:34:29 +00:00
|
|
|
* Tue Sep 09 2014 Paul Wouters <pwouters@redhat.com> - 3.10-3
|
|
|
|
- Fix some coverity issues, auto=route on bootup and snprintf on 32bit machines
|
|
|
|
|
2014-09-01 22:01:11 +00:00
|
|
|
* Mon Sep 01 2014 Paul Wouters <pwouters@redhat.com> - 3.10-1
|
|
|
|
- Updated to 3.10, major bugfix release, new xauth status options
|
|
|
|
|
2014-08-17 05:48:38 +00:00
|
|
|
* Sun Aug 17 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.9-1.1
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
|
|
|
|
|
2014-07-10 15:12:45 +00:00
|
|
|
* Thu Jul 10 2014 Paul Wouters <pwouters@redhat.com> - 3.9-1
|
|
|
|
- Updated to 3.9. IKEv2 enhancements, ESP/IKE algo enhancements
|
|
|
|
- Mark libreswan-fips.conf as config file
|
2014-07-10 15:21:30 +00:00
|
|
|
- attr modifier for man pages no longer needed
|
2014-07-10 15:32:06 +00:00
|
|
|
- BUGS file no longer exists upstream
|
2014-07-10 15:12:45 +00:00
|
|
|
|
2014-06-07 05:17:50 +00:00
|
|
|
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.8-1.1
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
|
|
|
|
|
2014-01-18 01:46:01 +00:00
|
|
|
* Sat Jan 18 2014 Paul Wouters <pwouters@redhat.com> - 3.8-1
|
|
|
|
- Updated to 3.8, fixes rhbz#CVE-2013-6467 (rhbz#1054102)
|
|
|
|
|
2013-12-11 01:30:56 +00:00
|
|
|
* Wed Dec 11 2013 Paul Wouters <pwouters@redhat.com> - 3.7-1
|
|
|
|
- Updated to 3.7, fixes CVE-2013-4564
|
2014-01-18 01:46:01 +00:00
|
|
|
- Fixes creating a bogus NSS db on startup (rhbz#1005410)
|
2013-12-11 01:30:56 +00:00
|
|
|
|
2013-10-31 03:17:42 +00:00
|
|
|
* Thu Oct 31 2013 Paul Wouters <pwouters@redhat.com> - 3.6-1
|
|
|
|
- Updated to 3.6 (IKEv2, MODECFG, Cisco interop fixes)
|
|
|
|
- Generate empty NSS db if none exists
|
|
|
|
|
2013-08-19 23:29:49 +00:00
|
|
|
* Mon Aug 19 2013 Paul Wouters <pwouters@redhat.com> - 3.5-3
|
|
|
|
- Add a Provides: for openswan-doc
|
|
|
|
|
2013-08-03 06:53:33 +00:00
|
|
|
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.5-1.1
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
|
|
|
|
|
2013-07-15 18:41:11 +00:00
|
|
|
* Mon Jul 15 2013 Paul Wouters <pwouters@redhat.com> - 3.5-2
|
|
|
|
- Added interop patch for (some?) Cisco VPN clients sending 16 zero
|
|
|
|
bytes of extraneous IKE data
|
|
|
|
- Removed fipscheck_version
|
|
|
|
|
2013-07-13 20:24:07 +00:00
|
|
|
* Sat Jul 13 2013 Paul Wouters <pwouters@redhat.com> - 3.5-1
|
|
|
|
- Updated to 3.5
|
|
|
|
|
2013-06-06 09:10:06 +00:00
|
|
|
* Thu Jun 06 2013 Paul Wouters <pwouters@redhat.com> - 3.4-1
|
|
|
|
- Updated to 3.4, which only contains style changes to kernel coding style
|
|
|
|
- IN MEMORIAM: June 3rd, 2013 Hugh Daniel
|
|
|
|
|
2013-05-13 18:34:29 +00:00
|
|
|
* Mon May 13 2013 Paul Wouters <pwouters@redhat.com> - 3.3-1
|
|
|
|
- Updated to 3.3, which resolves CVE-2013-2052
|
|
|
|
|
2013-04-13 20:58:36 +00:00
|
|
|
* Sat Apr 13 2013 Paul Wouters <pwouters@redhat.com> - 3.2-1
|
|
|
|
- Initial package for Fedora
|