Add example config files and move config to /etc/sysconfig. Fixes bug #1313936

This commit is contained in:
Kevin Fenzi 2016-04-10 13:58:34 -06:00
parent 59d2e797fc
commit 58963c8af1
3 changed files with 14 additions and 2 deletions

4
nftables.conf Normal file
View File

@ -0,0 +1,4 @@
#
# This this will contain your nftables rules and
# is read by the systemd service when restarting
#

View File

@ -13,5 +13,5 @@ ExecReload=/sbin/nft 'flush ruleset; include "/etc/nftables.conf";'
ExecStop=/sbin/nft flush ruleset ExecStop=/sbin/nft flush ruleset
RemainAfterExit=yes RemainAfterExit=yes
Install] [Install]
WantedBy=multi-user.target WantedBy=multi-user.target

View File

@ -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: 3%{?dist} Release: 4%{?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
@ -13,6 +13,7 @@ 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 Source1: nftables.service
Source2: nftables.conf
#BuildRequires: autogen #BuildRequires: autogen
#BuildRequires: autoconf #BuildRequires: autoconf
@ -47,6 +48,9 @@ chmod 644 $RPM_BUILD_ROOT/%{_mandir}/man8/nft*
mkdir -p $RPM_BUILD_ROOT/%{_unitdir} mkdir -p $RPM_BUILD_ROOT/%{_unitdir}
cp -a %{SOURCE1} $RPM_BUILD_ROOT/%{_unitdir}/ cp -a %{SOURCE1} $RPM_BUILD_ROOT/%{_unitdir}/
mkdir -p $RPM_BUILD_ROOT/%{_sysconfdir}/sysconfig
cp -a %{SOURCE2} $RPM_BUILD_ROOT/%{_sysconfdir}/sysconfig/
%post %post
%systemd_post nftables.service %systemd_post nftables.service
@ -59,11 +63,15 @@ cp -a %{SOURCE1} $RPM_BUILD_ROOT/%{_unitdir}/
%files %files
%doc COPYING TODO %doc COPYING TODO
%config(noreplace) %{_sysconfdir}/nftables/ %config(noreplace) %{_sysconfdir}/nftables/
%config(noreplace) %{_sysconfdir}/sysconfig/nftables.conf
%{_sbindir}/nft %{_sbindir}/nft
%{_mandir}/man8/nft* %{_mandir}/man8/nft*
%{_unitdir}/nftables.service %{_unitdir}/nftables.service
%changelog %changelog
* Sun Apr 10 2016 Kevin Fenzi <kevin@scrye.com> - 0.5-4
- Add example config files and move config to /etc/sysconfig. Fixes bug #1313936
* Fri Mar 25 2016 Kevin Fenzi <kevin@scrye.com> - 0.5-3 * Fri Mar 25 2016 Kevin Fenzi <kevin@scrye.com> - 0.5-3
- Add systemd unit file. Fixes bug #1313936 - Add systemd unit file. Fixes bug #1313936