Add systemd unit file. Fixes bug #1313936
This commit is contained in:
parent
7e332e0e33
commit
59d2e797fc
17
nftables.service
Normal file
17
nftables.service
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=Netfilter Tables
|
||||||
|
Documentation=man:nft(8)
|
||||||
|
Wants=network-pre.target
|
||||||
|
Before=network-pre.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=oneshot
|
||||||
|
ProtectSystem=full
|
||||||
|
ProtectHome=true
|
||||||
|
ExecStart=/sbin/nft -f /etc/nftables.conf
|
||||||
|
ExecReload=/sbin/nft 'flush ruleset; include "/etc/nftables.conf";'
|
||||||
|
ExecStop=/sbin/nft flush ruleset
|
||||||
|
RemainAfterExit=yes
|
||||||
|
|
||||||
|
Install]
|
||||||
|
WantedBy=multi-user.target
|
@ -3,7 +3,7 @@
|
|||||||
Name: nftables
|
Name: nftables
|
||||||
Version: 0.5
|
Version: 0.5
|
||||||
#Release: 0.1.%{snapdate}git%{?dist}
|
#Release: 0.1.%{snapdate}git%{?dist}
|
||||||
Release: 2%{?dist}
|
Release: 3%{?dist}
|
||||||
# Upstream released a 0.100 version, then 0.4. Need Epoch to get back on track.
|
# Upstream released a 0.100 version, then 0.4. Need Epoch to get back on track.
|
||||||
Epoch: 1
|
Epoch: 1
|
||||||
Summary: Netfilter Tables userspace utillites
|
Summary: Netfilter Tables userspace utillites
|
||||||
@ -12,6 +12,7 @@ License: GPLv2
|
|||||||
URL: http://netfilter.org/projects/nftables/
|
URL: http://netfilter.org/projects/nftables/
|
||||||
#Source0: http://ftp.netfilter.org/pub/nftables/snapshot/nftables-%{snapdate}.tar.bz2
|
#Source0: http://ftp.netfilter.org/pub/nftables/snapshot/nftables-%{snapdate}.tar.bz2
|
||||||
Source0: http://ftp.netfilter.org/pub/nftables/nftables-%{version}.tar.bz2
|
Source0: http://ftp.netfilter.org/pub/nftables/nftables-%{version}.tar.bz2
|
||||||
|
Source1: nftables.service
|
||||||
|
|
||||||
#BuildRequires: autogen
|
#BuildRequires: autogen
|
||||||
#BuildRequires: autoconf
|
#BuildRequires: autoconf
|
||||||
@ -24,6 +25,7 @@ BuildRequires: gmp-devel
|
|||||||
BuildRequires: readline-devel
|
BuildRequires: readline-devel
|
||||||
BuildRequires: libnftnl-devel
|
BuildRequires: libnftnl-devel
|
||||||
BuildRequires: docbook2X
|
BuildRequires: docbook2X
|
||||||
|
BuildRequires: systemd
|
||||||
|
|
||||||
%description
|
%description
|
||||||
Netfilter Tables userspace utilities.
|
Netfilter Tables userspace utilities.
|
||||||
@ -42,13 +44,29 @@ make %{?_smp_mflags}
|
|||||||
find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} ';'
|
find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} ';'
|
||||||
chmod 644 $RPM_BUILD_ROOT/%{_mandir}/man8/nft*
|
chmod 644 $RPM_BUILD_ROOT/%{_mandir}/man8/nft*
|
||||||
|
|
||||||
|
mkdir -p $RPM_BUILD_ROOT/%{_unitdir}
|
||||||
|
cp -a %{SOURCE1} $RPM_BUILD_ROOT/%{_unitdir}/
|
||||||
|
|
||||||
|
%post
|
||||||
|
%systemd_post nftables.service
|
||||||
|
|
||||||
|
%preun
|
||||||
|
%systemd_preun nftables.service
|
||||||
|
|
||||||
|
%postun
|
||||||
|
%systemd_postun_with_restart nftables.service
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%doc COPYING TODO
|
%doc COPYING TODO
|
||||||
%config(noreplace) %{_sysconfdir}/nftables/
|
%config(noreplace) %{_sysconfdir}/nftables/
|
||||||
%{_sbindir}/nft
|
%{_sbindir}/nft
|
||||||
%{_mandir}/man8/nft*
|
%{_mandir}/man8/nft*
|
||||||
|
%{_unitdir}/nftables.service
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Fri Mar 25 2016 Kevin Fenzi <kevin@scrye.com> - 0.5-3
|
||||||
|
- Add systemd unit file. Fixes bug #1313936
|
||||||
|
|
||||||
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1:0.5-2
|
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1:0.5-2
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user