%global debug_package %{nil} Name: atomic-wireguard Version: 0.0.4 Release: 1%{?dist} Epoch: 1 URL: https://www.wireguard.com/ Summary: Fast, modern, secure VPN tunnel License: MIT Group: System Environment/Kernel BuildArch: noarch Source: https://github.com/jdoss/atomic-wireguard/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz BuildRequires: systemd Requires: gawk Requires: container-selinux >= 2.61 Requires: git Requires: podman >= 0.5.1 Requires: systemd >= 238 Requires(post): policycoreutils-python Requires(postun): policycoreutils-python Obsoletes: wireguard-dkms Obsoletes: wireguard-tools Provides: atomic-wireguard = %{epoch}:%{version}-%{release} %description atomic-wireguard is a container based method for building the WireGuard kernel module on Fedora Atomic Host, Fedora Workstation and Silverblue. WireGuard is a novel VPN that runs inside the Linux Kernel and uses state-of-the-art cryptography (the "Noise" protocol). 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. It runs over UDP. %prep %setup -q -n atomic-wireguard-%{version} %build %install install -p -d -m 0750 %{buildroot}%{_sysconfdir}/wireguard install -p -D -m 0644 %{_builddir}/atomic-wireguard-%{version}/atomic-wireguard %{buildroot}%{_sysconfdir}/sysconfig/atomic-wireguard install -p -D -m 0755 %{_builddir}/atomic-wireguard-%{version}/atomic-wireguard-module %{buildroot}%{_bindir}/atomic-wireguard-module install -p -D -m 0755 %{_builddir}/atomic-wireguard-%{version}/wg %{buildroot}%{_bindir}/wg install -p -D -m 0644 %{_builddir}/atomic-wireguard-%{version}/atomic-wireguard.service %{buildroot}%{_sysconfdir}/systemd/system/atomic-wireguard.service %clean rm -rf %{buildroot} %post semanage fcontext -a -t bin_t -s system_u /usr/bin/atomic-wireguard-module >/dev/null 2>&1 || : restorecon -vF /usr/bin/atomic-wireguard-module || : semanage fcontext -a -t bin_t -s system_u /usr/bin/wg >/dev/null 2>&1 || : restorecon -vF /usr/bin/wg || : %systemd_post atomic-wireguard.service if [ $1 -eq 1 ]; then /usr/bin/systemctl reload atomic-wireguard.service >/dev/null 2>&1 || : fi %pre %preun %systemd_preun atomic-wireguard.service %postun %systemd_postun atomic-wireguard.service if [ $1 -eq 0 ] ; then semanage fcontext -d -t bin_t -s system_u /usr/bin/atomic-wireguard-module || : semanage fcontext -d -t bin_t -s system_u /usr/bin/wg || : for OLD_IMAGES in $(podman images -n|grep wireguard|awk '{print $3}'); do podman rmi ${OLD_IMAGES} &> /dev/null || : done fi if [ $1 -ge 1 ]; then /usr/bin/systemctl reload atomic-wireguard.service >/dev/null 2>&1 || : fi %files %defattr(-,root,root,-) %dir %attr(0750, root, root) %{_sysconfdir}/wireguard %attr(0644, root, root) %config(noreplace) %{_sysconfdir}/sysconfig/atomic-wireguard %attr(0755, root, root) %{_bindir}/atomic-wireguard-module %attr(0755, root, root) %{_bindir}/wg %attr(0644, root, root) %{_sysconfdir}/systemd/system/atomic-wireguard.service %doc README.md %license LICENSE.md %{!?_licensedir:%global license %doc} %changelog * Fri Jul 12 2019 Joe Doss - 0.0.4-1 - Update to WireGuard snapshot 0.0.20190702 - Fix issue #14 * Sat Apr 6 2019 Joe Doss - 0.0.3-1 - Update to WireGuard snapshot 0.0.20190406 - Fix issue #12 * Mon May 21 2018 Joe Doss - 0.0.2-1 - Update to WireGuard snapshot 0.0.20180531 - Add in SHA256 hash check of the WireGuard tarball * Mon May 21 2018 Joe Doss - 0.0.1-1 - Initial atomic-wireguard 0.0.1 release