6e3d83
%global ebminor 4
6e3d83
6e3d83
Name:			ebtables
6e3d83
Version:		2.0.10
6e3d83
Release:		16%{?dist}
6e3d83
Summary:		Ethernet Bridge frame table administration tool
6e3d83
License:		GPLv2+
6e3d83
Group:			System Environment/Base
6e3d83
URL:			http://ebtables.sourceforge.net/
6e3d83
Source0:		http://downloads.sourceforge.net/ebtables/ebtables-v%{version}-%{ebminor}.tar.gz
6e3d83
Source1:		ebtables-save
6e3d83
Source2:		ebtables.systemd
6e3d83
Source3:		ebtables.service
6e3d83
Patch0:			ebtables-2.0.10-norootinst.patch
6e3d83
Patch3:			ebtables-2.0.9-lsb.patch
6e3d83
Patch4:			ebtables-2.0.10-linkfix.patch
6e3d83
Patch5:			ebtables-2.0.0-audit.patch
6e3d83
Patch6:			ebtables-2.0.10-noflush.patch
6e3d83
Patch7:			ebtables-2.0.10-lockdirfix.patch
6e3d83
Patch8:			ebtables-2.0.10-flock.patch
6e3d83
BuildRequires:		systemd-units
6e3d83
Requires(post):		systemd
6e3d83
Requires(preun):	systemd
6e3d83
Requires(postun):	systemd
6e3d83
6e3d83
%description
6e3d83
Ethernet bridge tables is a firewalling tool to transparently filter network
6e3d83
traffic passing a bridge. The filtering possibilities are limited to link
6e3d83
layer filtering and some basic filtering on higher network layers.
6e3d83
6e3d83
This tool is the userspace control for the bridge and ebtables kernel
6e3d83
components.
6e3d83
6e3d83
The ebtables tool can be used together with the other Linux filtering tools,
6e3d83
like iptables. There are no known incompatibility issues.
6e3d83
6e3d83
%prep
6e3d83
%setup -q -n ebtables-v%{version}-%{ebminor}
6e3d83
%patch0 -p1 -b .norootinst
6e3d83
%patch3 -p1 -b .lsb
6e3d83
# extension modules need to link to libebtc.so for ebt_errormsg
6e3d83
%patch4 -p1 -b .linkfix
6e3d83
%patch5 -p1 -b .AUDIT
6e3d83
%patch6 -p1 -b .noflush
6e3d83
%patch7 -p1 -b .lockdir
6e3d83
%patch8 -p1 -b .flock
6e3d83
6e3d83
# Convert to UTF-8
6e3d83
f=THANKS; iconv -f iso-8859-1 -t utf-8 $f -o $f.utf8 ; mv $f.utf8 $f
6e3d83
6e3d83
%build
6e3d83
make %{?_smp_mflags} CFLAGS="${RPM_OPT_FLAGS}" LIBDIR="/%{_lib}/ebtables" BINDIR="/sbin" MANDIR="%{_mandir}" LDFLAGS="${RPM_LD_FLAGS} -Wl,-z,now"
6e3d83
6e3d83
%install
6e3d83
mkdir -p %{buildroot}%{_initrddir}
6e3d83
mkdir -p %{buildroot}%{_unitdir}
6e3d83
install -m 644 -p %{SOURCE3} %{buildroot}%{_unitdir}/
6e3d83
mkdir -p %{buildroot}%{_libexecdir}
6e3d83
install -m0755 %{SOURCE2} %{buildroot}%{_libexecdir}/ebtables
6e3d83
mkdir -p %{buildroot}%{_sysconfdir}/sysconfig
6e3d83
make DESTDIR="%{buildroot}" LIBDIR="/%{_lib}/ebtables" BINDIR="/sbin" MANDIR="%{_mandir}" install
6e3d83
touch %{buildroot}%{_sysconfdir}/sysconfig/ebtables.filter
6e3d83
touch %{buildroot}%{_sysconfdir}/sysconfig/ebtables.nat
6e3d83
touch %{buildroot}%{_sysconfdir}/sysconfig/ebtables.broute
6e3d83
6e3d83
# Do not need the sysvinit
6e3d83
rm -rf %{buildroot}%{_initrddir}
6e3d83
6e3d83
# install ebtables-save bash script
6e3d83
rm -f %{buildroot}/sbin/ebtables-save
6e3d83
install %{SOURCE1} %{buildroot}/sbin/ebtables-save
6e3d83
6e3d83
# move libebtc.so into the ldpath
6e3d83
mv %{buildroot}/%{_lib}/ebtables/libebtc.so %{buildroot}/%{_lib}/
6e3d83
6e3d83
%post
6e3d83
%systemd_post ebtables.service
6e3d83
/sbin/ldconfig
6e3d83
6e3d83
%preun
6e3d83
%systemd_preun ebtables.service
6e3d83
6e3d83
%postun
6e3d83
%systemd_postun_with_restart ebtables.service
6e3d83
/sbin/ldconfig
6e3d83
6e3d83
%files
6e3d83
%defattr(-, root, root, 0755)
6e3d83
%doc ChangeLog COPYING THANKS
6e3d83
%doc %{_mandir}/man8/ebtables.8*
6e3d83
%config(noreplace) %{_sysconfdir}/ethertypes
6e3d83
%config(noreplace) %{_sysconfdir}/sysconfig/ebtables-config
6e3d83
%{_unitdir}/ebtables.service
6e3d83
%{_libexecdir}/ebtables
6e3d83
/%{_lib}/libebtc.so
6e3d83
/%{_lib}/ebtables/
6e3d83
/sbin/ebtables*
6e3d83
%ghost %{_sysconfdir}/sysconfig/ebtables.filter
6e3d83
%ghost %{_sysconfdir}/sysconfig/ebtables.nat
6e3d83
%ghost %{_sysconfdir}/sysconfig/ebtables.broute
6e3d83
6e3d83
%changelog
6e3d83
* Wed Oct 25 2017 Phil Sutter <psutter@redhat.com> - 2.0.10-16
6e3d83
- Fix for potentially stale lock files (RHBZ#1495893)
6e3d83
6e3d83
* Thu Jun 30 2016 Thomas Woerner <twoerner@redhat.com> - 2.0.10-15
6e3d83
- Backported lockdirfix to use (/var)/run from Fedora (RHBZ#1346376)
6e3d83
6e3d83
* Tue May 17 2016 Thomas Woerner <twoerner@redhat.com> - 2.0.10-14
6e3d83
- Fixed persmissions of ebtables.service (RHBZ#1288586)
6e3d83
- Added upstream patch to add noflush option to ebtables-restore (RHBZ#1334271)
6e3d83
6e3d83
* Tue Mar 04 2014 Jiri Popelka <jpopelka@redhat.com> - 2.0.10-13
6e3d83
- do not eviscerate -fstack-protector(-strong) from CFLAGS (#1070801)
6e3d83
6e3d83
* Fri Jan 24 2014 Daniel Mach <dmach@redhat.com> - 2.0.10-12
6e3d83
- Mass rebuild 2014-01-24
6e3d83
6e3d83
* Tue Jan  7 2014 Thomas Woerner <twoerner@redhat.com> - 2.0.10-11
6e3d83
- fixed rebuild problem, using MY_CFLAGS from latest fedora package
6e3d83
  (RHBZ#1048855)
6e3d83
6e3d83
* Fri Dec 27 2013 Daniel Mach <dmach@redhat.com> - 2.0.10-10
6e3d83
- Mass rebuild 2013-12-27
6e3d83
6e3d83
* Tue Nov  5 2013 Thomas Woerner <twoerner@redhat.com> - 2.0.10-9
6e3d83
- fixed missing systemd unit file (RHBZ#818953)
6e3d83
  merged fedora patches from Tom Callaway
6e3d83
- fixed NETWORK test in the init script (RHBZ#1026784)
6e3d83
- fixed needed rpmdiff failures (RHBZ#883988)
6e3d83
6e3d83
* Thu Mar 21 2013 Tom Callaway <spot@fedoraproject.org> - 2.0.10-8
6e3d83
- add audit module
6e3d83
6e3d83
* Wed Feb 13 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0.10-7
6e3d83
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
6e3d83
6e3d83
* Wed Jul 18 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0.10-6
6e3d83
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
6e3d83
6e3d83
* Thu Apr  5 2012 Tom Callaway <spot@fedoraproject.org> - 2.0.10-5
6e3d83
- update to 2.0.10-4 (upstream numbering is goofy)
6e3d83
- fix missing symbol issue with extension modules (bz810006)
6e3d83
6e3d83
* Thu Feb 16 2012 Thomas Woerner <twoerner@redhat.com> - 2.0.10-4
6e3d83
- replaced ebtables-save perl script by bash script to get rid of the perl 
6e3d83
  requirement
6e3d83
6e3d83
* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0.10-3
6e3d83
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
6e3d83
6e3d83
* Thu Aug 11 2011 Tom Callaway <spot@fedoraproject.org> - 2.0.10-2
6e3d83
- update to 2.0.10-2
6e3d83
6e3d83
* Mon Jul 11 2011 Tom Callaway <spot@fedoraproject.org> - 2.0.10-1
6e3d83
- update to 2.0.10-1
6e3d83
6e3d83
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0.9-6
6e3d83
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
6e3d83
6e3d83
* Mon Feb 15 2010 Tom "spot" Callaway <tcallawa@redhat.com> - 2.0.9-5
6e3d83
- update to 2.0.9-2
6e3d83
6e3d83
* Fri Jan 29 2010 Thomas Woerner <twoerner@redhat.com> - 2.0.9-4
6e3d83
- moved ebtables modules to /lib[64]/ebtables (rhbz#558886)
6e3d83
6e3d83
* Fri Jan 15 2010 Thomas Woerner <twoerner@redhat.com> - 2.0.9-3
6e3d83
- fixed init script to be lsb conform (rhbz#536828)
6e3d83
- fixed download link according to package review
6e3d83
6e3d83
* Wed Aug 19 2009 Tom "spot" Callaway <tcallawa@redhat.com> - 2.0.9-2
6e3d83
- fix source0 url
6e3d83
6e3d83
* Mon Jul 27 2009 Tom "spot" Callaway <tcallawa@redhat.com> - 2.0.9-1
6e3d83
- update to 2.0.9
6e3d83
6e3d83
* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0.8-7
6e3d83
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
6e3d83
6e3d83
* Tue Feb 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0.8-6
6e3d83
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
6e3d83
6e3d83
* Tue Feb 19 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 2.0.8-5
6e3d83
- Autorebuild for GCC 4.3
6e3d83
6e3d83
* Sun Oct 28 2007 Tom "spot" Callaway <tcallawa@redhat.com> 2.0.8-4
6e3d83
- bump to 2.0.8-2 from upstream
6e3d83
- keep _libdir/ebtables, even though upstream just moved away from it.
6e3d83
6e3d83
* Thu Aug 23 2007 Tom "spot" Callaway <tcallawa@redhat.com> 2.0.8-3
6e3d83
- use _libdir/ebtables to match upstream RPATH (bugzilla 248865)
6e3d83
- correct license tag
6e3d83
- use upstream init script
6e3d83
- enable build-id
6e3d83
- use cflags for all compiles
6e3d83
- be sane with DESTDIR
6e3d83
6e3d83
* Mon Jul  9 2007 Tom "spot" Callaway <tcallawa@redhat.com> 2.0.8-2
6e3d83
- remove "Fedora Core" reference in spec
6e3d83
6e3d83
* Mon Jul  2 2007 Tom "spot" Callaway <tcallawa@redhat.com> 2.0.8-1
6e3d83
- final 2.0.8 release
6e3d83
6e3d83
* Wed Jan 17 2007 Tom "spot" Callaway <tcallawa@redhat.com> 2.0.8-0.8.rc3
6e3d83
- fix release order
6e3d83
6e3d83
* Wed Jan 17 2007 Tom "spot" Callaway <tcallawa@redhat.com> 2.0.8-0.1.rc3
6e3d83
- bump to rc3
6e3d83
6e3d83
* Thu Oct 05 2006 Christian Iseli <Christian.Iseli@licr.org> 2.0.8-0.7.rc2
6e3d83
 - rebuilt for unwind info generation, broken in gcc-4.1.1-21
6e3d83
6e3d83
* Mon Sep 18 2006 Tom "spot" Callaway <tcallawa@redhat.com> 2.0.8-0.6.rc2
6e3d83
- fix versioning
6e3d83
6e3d83
* Thu Sep 14 2006 Tom "spot" Callaway <tcallawa@redhat.com> 2.0.8-0.3.rc2
6e3d83
- fix bugzilla 206257
6e3d83
6e3d83
* Tue Sep 12 2006 Tom "spot" Callaway <tcallawa@redhat.com> 2.0.8-0.2.rc2
6e3d83
- fix for FC-6
6e3d83
6e3d83
* Mon Apr 24 2006 Tom "spot" Callaway <tcallawa@redhat.com> 2.0.8-0.1.rc2
6e3d83
- bump to rc2
6e3d83
6e3d83
* Sun Apr  2 2006 Tom "spot" Callaway <tcallawa@redhat.com> 2.0.8-0.5.rc1
6e3d83
- learn to use "install" correctly. :/
6e3d83
6e3d83
* Sun Apr  2 2006 Tom "spot" Callaway <tcallawa@redhat.com> 2.0.8-0.4.rc1
6e3d83
- package up the shared libs too
6e3d83
6e3d83
* Wed Mar 29 2006 Tom "spot" Callaway <tcallawa@redhat.com> 2.0.8-0.3.rc1
6e3d83
- use -fPIC
6e3d83
6e3d83
* Wed Mar 29 2006 Tom "spot" Callaway <tcallawa@redhat.com> 2.0.8-0.2.rc1
6e3d83
- broken tagging
6e3d83
6e3d83
* Tue Jan 10 2006 Tom "spot" Callaway <tcallawa@redhat.com> 2.0.8-0.1.rc1
6e3d83
- bump to 2.0.8-rc1
6e3d83
6e3d83
* Mon Jul  4 2005 Tom "spot" Callaway <tcallawa@redhat.com> 2.0.6-7
6e3d83
- buildsystem error requires artificial release bump
6e3d83
6e3d83
* Mon Jul  4 2005 Tom "spot" Callaway <tcallawa@redhat.com> 2.0.6-6
6e3d83
- actually touch ghosted files
6e3d83
6e3d83
* Fri Jul  1 2005 Tom "spot" Callaway <tcallawa@redhat.com> 2.0.6-5
6e3d83
- fix sysv file
6e3d83
6e3d83
* Fri Jul  1 2005 Tom "spot" Callaway <tcallawa@redhat.com> 2.0.6-4
6e3d83
- remove INSTALL file
6e3d83
- add some text to description, correct typos
6e3d83
- fix %%postun
6e3d83
- add PreReqs
6e3d83
- add %%ghost config files
6e3d83
6e3d83
* Tue May 31 2005 Tom "spot" Callaway <tcallawa@redhat.com> 2.0.6-3
6e3d83
- reworked for Fedora Extras
6e3d83
- add gcc4 fix
6e3d83
- move init file into SOURCE1
6e3d83
6e3d83
* Thu Dec 02 2004 Dag Wieers <dag@wieers.com> - 2.0.6-2
6e3d83
- Added patch for gcc 3.4. (Nigel Smith)
6e3d83
6e3d83
* Tue Apr 27 2004 Dag Wieers <dag@wieers.com> - 2.0.6-2
6e3d83
- Cosmetic changes.
6e3d83
6e3d83
* Tue Apr 27 2004 Dag Wieers <dag@wieers.com> - 2.0.6-1
6e3d83
- Initial package. (using DAR)