Summary: User space tool to set up tables of ARP rules in kernel
Name: arptables
Version: 0.0.4
Release: 7%{?dist}
License: GPLv2+
Group: System Environment/Base
URL: http://ebtables.sourceforge.net/
Source0: http://downloads.sourceforge.net/ebtables/arptables/arptables-v%{version}.tar.gz
Source1: arptables.service
Source2: arptables-helper
# http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt
# http://marc.info/?l=netfilter-devel&m=137908241011194&w=2
Source3: COPYING
Source4: arptables-save.8
Source5: arptables-restore.8
Patch1: arptables-0.0.4-covscan_fix01_simple.patch
Patch2: arptables-0.0.4-covscan_fix02_buf_overflow.patch
Patch3: arptables-0.0.4-man-install.patch
BuildRequires: systemd
Requires(post): systemd
Requires(preun): systemd
Requires(postun): systemd
Obsoletes: arptables_jf < 0.0.8-37
Provides: arptables_jf = 0.0.8-37
%description
The arptables is a user space tool used to set up and maintain
the tables of ARP rules in the Linux kernel. These rules inspect
the ARP frames which they see. arptables is analogous to the iptables
user space tool, but is less complicated.
%prep
%setup -q -n arptables-v%{version}
%patch1 -p3 -b .covscan_fix01_simple
%patch2 -p3 -b .covscan_fix02_buf_overflow
%patch3 -p3 -b .man-install
cp %{SOURCE3} COPYING
cp %{SOURCE4} .
cp %{SOURCE5} .
%build
# Makefile uses $(KERNEL_DIR) to redefine where to look for header files.
# But when it's set to standard system include directory gcc ignores it
# (see gcc(1)). It however looks that the code is not ready for using
# system headers (instead included ones) so we don't use this option.
make all 'COPT_FLAGS=%{optflags}' %{_smp_mflags}
%install
make install DESTDIR=%{buildroot} BINDIR=%{_sbindir} MANDIR=%{_mandir}
install -p -D -m 644 %{SOURCE1} %{buildroot}%{_unitdir}/arptables.service
mkdir -p %{buildroot}%{_libexecdir}/
install -p -D -m 755 %{SOURCE2} %{buildroot}%{_libexecdir}/
rm -rf %{buildroot}%{_initrddir}
mkdir -p %{buildroot}%{_sysconfdir}/sysconfig
echo '# Configure prior to use' > %{buildroot}%{_sysconfdir}/sysconfig/arptables
%post
%systemd_post arptables.service
%preun
%systemd_preun arptables.service
%postun
%systemd_postun_with_restart arptables.service
%files
%doc COPYING
%{_sbindir}/arptables*
%{_libexecdir}/arptables-helper
%{_mandir}/*/arptables*
%{_unitdir}/arptables.service
%config(noreplace) %{_sysconfdir}/sysconfig/arptables
%changelog
* Fri Jan 24 2014 Daniel Mach <dmach@redhat.com> - 0.0.4-7
- Mass rebuild 2014-01-24
* Fri Dec 27 2013 Daniel Mach <dmach@redhat.com> - 0.0.4-6
- Mass rebuild 2013-12-27
* Thu Nov 14 2013 Jesper Dangaard Brouer <brouer@redhat.com> - 0.0.4-5
- fix issues reported by static analysis tools
Resolves: rhbz#1027762
- add man-pages for arptables-{save,restore}
Resolves: rhbz#1025726
* Mon Sep 16 2013 Jiri Popelka <jpopelka@redhat.com> - 0.0.4-4
- revert previous change, the code is not ready for this
* Mon Sep 16 2013 Jiri Popelka <jpopelka@redhat.com> - 0.0.4-3
- use system kernel headers
* Fri Sep 13 2013 Jiri Popelka <jpopelka@redhat.com> - 0.0.4-2
- install with '-p' (#1007964)
* Fri Sep 13 2013 Jiri Popelka <jpopelka@redhat.com> - 0.0.4-1
- renamed arptables_jf to arptables