[packages/wireguard-tools] - wireguard-tools is now a separate package, kernel module has been merged into kernel 5.6

baggins baggins at pld-linux.org
Mon May 4 08:41:17 CEST 2020


commit b3b7b091c5bc98b3fdf370bd34206705af3ec6d5
Author: Jan Rękorajski <baggins at pld-linux.org>
Date:   Mon May 4 08:37:34 2020 +0200

    - wireguard-tools is now a separate package, kernel module has been merged into kernel 5.6

 WireGuard.spec       | 117 ---------------------------------------------------
 kernel-5.4.29.patch  |  14 ------
 wireguard-tools.spec |  54 ++++++++++++++++++++++++
 3 files changed, 54 insertions(+), 131 deletions(-)
---
diff --git a/WireGuard.spec b/WireGuard.spec
deleted file mode 100644
index 7035ef3..0000000
--- a/WireGuard.spec
+++ /dev/null
@@ -1,117 +0,0 @@
-# Conditional build:
-%bcond_without	kernel		# don't build kernel modules
-%bcond_without	userspace	# don't build userspace tools
-
-%if 0%{?_pld_builder:1} && %{with kernel} && %{with userspace}
-%{error:kernel and userspace cannot be built at the same time on PLD builders}
-exit 1
-%endif
-
-%if %{without userspace}
-# nothing to be placed to debuginfo package
-%define		_enable_debug_packages	0
-%endif
-
-%define		rel	2
-%define		pname	WireGuard
-Summary:	WireGuard is an extremely simple yet fast and modern VPN that utilizes state-of-the-art cryptography
-Name:		%{pname}%{?_pld_builder:%{?with_kernel:-kernel}}%{_alt_kernel}
-Version:	0.0.20191219
-Release:	%{rel}%{?_pld_builder:%{?with_kernel:@%{_kernel_ver_str}}}
-License:	GPL v2
-Group:		Networking/Daemons
-Source0:	https://git.zx2c4.com/WireGuard/snapshot/%{pname}-%{version}.tar.xz
-# Source0-md5:	5175ca88850993dc88a4c9d924ee79d4
-Patch0:		kernel-5.4.29.patch
-URL:		https://www.wireguard.com/
-%{?with_kernel:%{expand:%buildrequires_kernel kernel%%{_alt_kernel}-module-build >= 3:3.10}}
-BuildRequires:	libmnl-devel
-BuildRequires:	rpmbuild(macros) >= 1.701
-BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
-
-%description
-WireGuard is an extremely simple yet fast and modern VPN that utilizes
-state-of-the-art cryptography. It aims to be faster, simpler, leaner,
-and more useful than IPSec, while avoiding the massive headache. It
-intends to be considerably more performant than OpenVPN. WireGuard is
-designed as a general purpose VPN for running on embedded interfaces
-and super computers alike, fit for many different circumstances.
-
-This package contains user space tools. You need to also install
-kernel module from kernel-*-misc-wireguard package.
-
-%define	kernel_pkg()\
-%package -n kernel%{_alt_kernel}-misc-wireguard\
-Summary:	WireGuard kernel module\
-Release:	%{rel}@%{_kernel_ver_str}\
-Group:		Base/Kernel\
-Requires(post,postun):	/sbin/depmod\
-%requires_releq_kernel\
-Requires(postun):	%releq_kernel\
-\
-%description -n kernel%{_alt_kernel}-misc-wireguard\
-WireGuard kernel module.\
-%if %{with kernel}\
-%files -n kernel%{_alt_kernel}-misc-wireguard\
-%defattr(644,root,root,755)\
-/lib/modules/%{_kernel_ver}/misc/*.ko*\
-%endif\
-\
-%post	-n kernel%{_alt_kernel}-misc-wireguard\
-%depmod %{_kernel_ver}\
-\
-%postun	-n kernel%{_alt_kernel}-misc-wireguard\
-%depmod %{_kernel_ver}\
-%{nil}
-
-%define build_kernel_pkg()\
-%build_kernel_modules -C src -m wireguard\
-%install_kernel_modules -D installed -m src/wireguard -d misc\
-%{nil}
-
-%{?with_kernel:%{expand:%create_kernel_packages}}
-
-%prep
-%setup -q -n %{pname}-%{version}
-%patch0 -p1
-
-%build
-%{?with_kernel:%{expand:%build_kernel_packages}}
-
-%if %{with userspace}
-%{make} -C src/tools
-%endif
-
-%install
-rm -rf $RPM_BUILD_ROOT
-
-%if %{with kernel}
-install -d $RPM_BUILD_ROOT
-cp -a installed/* $RPM_BUILD_ROOT
-%endif
-
-%if %{with userspace}
-%{make} -C src/tools install \
-	PREFIX=$RPM_BUILD_ROOT%{_prefix} \
-	SYSCONFDIR=$RPM_BUILD_ROOT%{_sysconfdir} \
-	SYSTEMDUNITDIR=$RPM_BUILD_ROOT%{systemdunitdir} \
-	WITH_SYSTEMDUNITS=yes
-%endif
-
-%clean
-rm -rf $RPM_BUILD_ROOT
-
-%postun
-%systemd_reload
-
-%if %{with userspace}
-%files
-%defattr(644,root,root,755)
-%doc contrib/examples README.md
-%attr(755,root,root) %{_bindir}/wg
-%attr(755,root,root) %{_bindir}/wg-quick
-%dir %{_sysconfdir}/wireguard
-%{systemdunitdir}/wg-quick at .service
-%{_mandir}/man8/wg-quick.8*
-%{_mandir}/man8/wg.8*
-%endif
diff --git a/wireguard-tools.spec b/wireguard-tools.spec
new file mode 100644
index 0000000..b2b1168
--- /dev/null
+++ b/wireguard-tools.spec
@@ -0,0 +1,54 @@
+Summary:	WireGuard is an extremely simple yet fast and modern VPN that utilizes state-of-the-art cryptography
+Name:		wireguard-tools
+Version:	1.0.20200319
+Release:	1
+License:	GPL v2
+Group:		Networking/Daemons
+Source0:	https://git.zx2c4.com/wireguard-tools/snapshot/%{name}-%{version}.tar.xz
+# Source0-md5:	36cd9411f56bc5dcaac29bbab6fd9c67
+URL:		https://www.wireguard.com/
+BuildRequires:	libmnl-devel
+BuildRequires:	rpmbuild(macros) >= 1.701
+BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+WireGuard is an extremely simple yet fast and modern VPN that utilizes
+state-of-the-art cryptography. It aims to be faster, simpler, leaner,
+and more useful than IPSec, while avoiding the massive headache. It
+intends to be considerably more performant than OpenVPN. WireGuard is
+designed as a general purpose VPN for running on embedded interfaces
+and super computers alike, fit for many different circumstances.
+
+This package contains user space tools. You need to also install
+kernel module from kernel-*-misc-wireguard package.
+
+%prep
+%setup -q
+
+%build
+%{make} -C src V=1
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+%{make} -C src install \
+	PREFIX=$RPM_BUILD_ROOT%{_prefix} \
+	SYSCONFDIR=$RPM_BUILD_ROOT%{_sysconfdir} \
+	SYSTEMDUNITDIR=$RPM_BUILD_ROOT%{systemdunitdir} \
+	WITH_SYSTEMDUNITS=yes
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%postun
+%systemd_reload
+
+%files
+%defattr(644,root,root,755)
+%doc contrib README.md
+%attr(755,root,root) %{_bindir}/wg
+%attr(755,root,root) %{_bindir}/wg-quick
+%dir %{_sysconfdir}/wireguard
+%{systemdunitdir}/wg-quick at .service
+%{_mandir}/man8/wg-quick.8*
+%{_mandir}/man8/wg.8*
diff --git a/kernel-5.4.29.patch b/kernel-5.4.29.patch
deleted file mode 100644
index a3c7d4f..0000000
--- a/kernel-5.4.29.patch
+++ /dev/null
@@ -1,14 +0,0 @@
---- WireGuard-0.0.20191219/src/queueing.h~	2019-12-19 01:12:35.000000000 +0100
-+++ WireGuard-0.0.20191219/src/queueing.h	2020-04-05 10:52:10.887319410 +0200
-@@ -97,7 +97,11 @@
- 	skb->dev = NULL;
- #ifdef CONFIG_NET_SCHED
- 	skb->tc_index = 0;
-+#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 4, 29)
- 	skb_reset_tc(skb);
-+#else
-+	skb_reset_redirect(skb);
-+#endif
- #endif
- 	skb->hdr_len = skb_headroom(skb);
- 	skb_reset_mac_header(skb);
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/wireguard-tools.git/commitdiff/b3b7b091c5bc98b3fdf370bd34206705af3ec6d5



More information about the pld-cvs-commit mailing list