From 2a3b5544b4189a2cb190ebbdb60142f43eafa8e8 Mon Sep 17 00:00:00 2001 From: Douglas Kosovic Date: Sat, 16 Mar 2019 19:14:06 +1000 Subject: [PATCH] Updated to 1.2.12 release Use upstream provided xz tarball instead of GitHub generated gz tarball. Delete any transient nm-l2tp-ipsec-*.secrets files from versions <= 1.2.10 %ghost transient ipsec.nm-l2tp.secrets files. Merged EPEL 7 spec file with Fedora spec file. --- .gitignore | 1 + NetworkManager-l2tp.spec | 52 ++++++++++++++++++++++++++++------------ sources | 2 +- 3 files changed, 39 insertions(+), 16 deletions(-) diff --git a/.gitignore b/.gitignore index ee190b5..10efdcd 100644 --- a/.gitignore +++ b/.gitignore @@ -10,3 +10,4 @@ /NetworkManager-l2tp-1.2.6.tar.gz /NetworkManager-l2tp-1.2.8.tar.gz /NetworkManager-l2tp-1.2.10.tar.gz +/NetworkManager-l2tp-1.2.12.tar.xz diff --git a/NetworkManager-l2tp.spec b/NetworkManager-l2tp.spec index dd1b69d..7fd7018 100644 --- a/NetworkManager-l2tp.spec +++ b/NetworkManager-l2tp.spec @@ -1,29 +1,26 @@ %if 0%{?fedora} < 28 && 0%{?rhel} < 8 %bcond_without libnm_glib %else -# Disable the legacy version by default %bcond_with libnm_glib %endif Summary: NetworkManager VPN plugin for L2TP and L2TP/IPsec Name: NetworkManager-l2tp -Version: 1.2.10 -Release: 4%{?dist} +Version: 1.2.12 +Release: 1%{?dist} License: GPLv2+ -URL: https://github.com/nm-l2tp/network-manager-l2tp -Source: https://github.com/nm-l2tp/network-manager-l2tp/archive/%{version}/%{name}-%{version}.tar.gz +URL: https://github.com/nm-l2tp/NetworkManager-l2tp +Source: https://github.com/nm-l2tp/NetworkManager-l2tp/releases/download/%{version}/%{name}-%{version}.tar.xz %global ppp_version %(sed -n 's/^#define\\s*VERSION\\s*"\\([^\\s]*\\)"$/\\1/p' %{_includedir}/pppd/patchlevel.h 2>/dev/null | grep . || echo bad) +BuildRequires: glib2-devel BuildRequires: gtk3-devel BuildRequires: NetworkManager-libnm-devel >= 1:1.2.0 -BuildRequires: glib2-devel +BuildRequires: libnma-devel >= 1.2.0 BuildRequires: ppp-devel BuildRequires: libtool intltool gettext BuildRequires: libsecret-devel -BuildRequires: libnma-devel >= 1.2.0 -BuildRequires: libsecret-devel - %if %with libnm_glib BuildRequires: NetworkManager-glib-devel >= 1:1.2.0 BuildRequires: libnm-gtk-devel >= 1.2.0 @@ -33,11 +30,14 @@ Requires: dbus Requires: NetworkManager >= 1:1.2.0 Requires: ppp = %{ppp_version} Requires: xl2tpd +%if 0%{?fedora} < 28 && 0%{?rhel} < 8 +Requires: libreswan +%else Recommends: libreswan +%endif %global __provides_exclude ^libnm-.*\\.so - %description This package contains software for integrating L2TP and L2TP over IPsec VPN support with the NetworkManager. @@ -51,15 +51,17 @@ This package contains software for integrating L2TP and L2TP over IPsec VPN support with the NetworkManager (GNOME files). %prep -%setup -q -n network-manager-l2tp-%{version} +%setup -q %build -autoreconf -fi -intltoolize +if [ ! -f configure ]; then + autoreconf -fi + intltoolize +fi %configure \ --disable-static \ -%if %without libnm_glib - --without-libnm-glib \ +%if %with libnm_glib + --with-libnm-glib \ %endif --with-pppd-plugin-dir=%{_libdir}/pppd/%{ppp_version} \ --with-dist-version=%{version}-%{release} @@ -74,14 +76,27 @@ make install DESTDIR=%{buildroot} INSTALL="%{__install} -p" rm -f %{buildroot}%{_libdir}/NetworkManager/lib*.la rm -f %{buildroot}%{_libdir}/pppd/%{ppp_version}/*.la +mkdir -p %{buildroot}%{_sysconfdir}/ipsec.d +mkdir -p %{buildroot}%{_sysconfdir}/strongswan/ipsec.d +touch %{buildroot}%{_sysconfdir}/ipsec.d/ipsec.nm-l2tp.secrets +touch %{buildroot}%{_sysconfdir}/strongswan/ipsec.d/ipsec.nm-l2tp.secrets + %find_lang %{name} +%pre +# remove any NetworkManager-l2tp <= 1.2.10 transient ipsec-*.secrets files. +rm -f %{_sysconfdir}/ipsec.d/nm-l2tp-ipsec-*.secrets +rm -f %{_sysconfdir}/strongswan/ipsec.d/nm-l2tp-ipsec-*.secrets +exit 0 + %files -f %{name}.lang %{_libdir}/NetworkManager/libnm-vpn-plugin-l2tp.so %{_sysconfdir}/dbus-1/system.d/nm-l2tp-service.conf %{_prefix}/lib/NetworkManager/VPN/nm-l2tp-service.name %{_libexecdir}/nm-l2tp-service %{_libdir}/pppd/%{ppp_version}/nm-l2tp-pppd-plugin.so +%ghost %attr(0600 - -) %{_sysconfdir}/ipsec.d/ipsec.nm-l2tp.secrets +%ghost %attr(0600 - -) %{_sysconfdir}/strongswan/ipsec.d/ipsec.nm-l2tp.secrets %doc AUTHORS README.md NEWS %license COPYING @@ -96,6 +111,13 @@ rm -f %{buildroot}%{_libdir}/pppd/%{ppp_version}/*.la %endif %changelog +* Sat Mar 16 2019 Douglas Kosovic - 1.2.12-1 +- Updated to 1.2.12 release +- Use upstream provided xz tarball instead of GitHub generated gz tarball. +- Delete any transient nm-l2tp-ipsec-*.secrets files from versions <= 1.2.10 +- %%ghost transient ipsec.nm-l2tp.secrets files. +- Merged EPEL 7 spec file with Fedora spec file. + * Thu Jan 31 2019 Fedora Release Engineering - 1.2.10-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild diff --git a/sources b/sources index fded46f..9ce6b01 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (NetworkManager-l2tp-1.2.10.tar.gz) = 185a52d9d4fe67a73678c01c29490a1f6ac015967267ca73dc889397ec386812e76026095cbe2cd7f568aa545d730e7413aa0a59657a7a74770ebd3018518a1c +SHA512 (NetworkManager-l2tp-1.2.12.tar.xz) = b3e6ab72e81df568b77afabd91cef40b35d2b9227087495b0b44f966ef937b6c78ccc94b019102c13fc76ba443f850fffe1ad7445f5967a1737532036e632422