ebtables/ebtables.spec

123 lines
4.2 KiB
RPMSpec
Raw Normal View History

2019-09-30 10:37:43 -04:00
Name: ebtables
2020-07-28 17:41:00 +08:00
Version: 2.0.11
Release: 1
2019-09-30 10:37:43 -04:00
Summary: A filtering tool for a Linux-based bridging firewall
License: GPLv2+
URL: http://ebtables.sourceforge.net/
2020-07-28 17:41:00 +08:00
Source0: http://ftp.netfilter.org/pub/ebtables/ebtables-%{version}.tar.gz
2019-09-30 10:37:43 -04:00
Source2: ebtables.systemd
Source3: ebtables.service
2020-07-28 17:41:00 +08:00
Source4: ebtables-config
2019-09-30 10:37:43 -04:00
2020-07-28 17:41:00 +08:00
BuildRequires: systemd libtool
2019-09-30 10:37:43 -04:00
Requires: systemd %{_sbindir}/update-alternatives
Conflicts: setup < 2.10.4-1
%description
The ebtables program is a filtering tool for a Linux-based bridging firewall.It enables transparent filtering of network traffic passing through a Linux bridge.The filtering possibilities are limited to link layer filtering and some basic filtering on higher network layers.
The ebtables tool can be combined with the other Linux filtering tools to make a bridging firewall that is also capable of filtering these higher network layers. This is enabled through the bridge-netfilter architecture which is a part of the standard Linux kernel.
%package help
Summary: help documents for ebtables
%description help
Help package contains some doc and man help files for ebtables.
%prep
2020-07-28 17:41:00 +08:00
%autosetup -n %{name}-%{version}
2019-09-30 10:37:43 -04:00
f=THANKS; iconv -f iso-8859-1 -t utf-8 $f -o $f.utf8 ; mv $f.utf8 $f
%build
2020-07-28 17:41:00 +08:00
./autogen.sh
./configure --mandir=/usr/share/man --bindir=/usr/sbin --sbindir=/usr/sbin --libdir=/lib64/ebtables --sysconfdir=/etc
2019-09-30 10:37:43 -04:00
%make_build CFLAGS="${RPM_OPT_FLAGS}" LIBDIR="/%{_lib}/ebtables" BINDIR="%{_sbindir}" MANDIR="%{_mandir}" LDFLAGS="${RPM_LD_FLAGS} -Wl,-z,now"
%install
install -d %{buildroot}{%{_initrddir},%{_unitdir},%{_libexecdir},%{_sysconfdir}/sysconfig}
install -p %{SOURCE3} %{buildroot}%{_unitdir}/
2020-07-28 17:41:00 +08:00
install -p %{SOURCE4} %{buildroot}%{_sysconfdir}/sysconfig/ebtables-config
2019-09-30 10:37:43 -04:00
chmod -x %{buildroot}%{_unitdir}/*.service
install -m0755 %{SOURCE2} %{buildroot}%{_libexecdir}/ebtables
%make_install LIBDIR="/%{_lib}/ebtables" BINDIR="%{_sbindir}" MANDIR="%{_mandir}"
touch %{buildroot}%{_sysconfdir}/sysconfig/{ebtables.nat,ebtables.filter,ebtables.broute}
mv %{buildroot}/%{_lib}/ebtables/libebtc.so %{buildroot}/%{_lib}/
%post
%systemd_post ebtables.service
%?ldconfig
2020-07-28 17:41:00 +08:00
if [ "$(readlink -e %{_sbindir}/ebtables)" == %{_sbindir}/ebtables ] ; then
2019-09-30 10:37:43 -04:00
rm -f %{_sbindir}/ebtables
fi
%{_sbindir}/update-alternatives --install %{_sbindir}/ebtables ebtables %{_sbindir}/ebtables-legacy 10
2020-07-28 17:41:00 +08:00
if [ "$(readlink -e %{_sbindir}/ebtables-restore)" == %{_sbindir}/ebtables-restore ] ; then
rm -f %{_sbindir}/ebtables-restore
fi
%{_sbindir}/update-alternatives --install %{_sbindir}/ebtables-restore ebtables-restore %{_sbindir}/ebtables-legacy-restore 10
if [ "$(readlink -e %{_sbindir}/ebtables-save)" == %{_sbindir}/ebtables-save ] ; then
rm -f %{_sbindir}/ebtables-save
fi
%{_sbindir}/update-alternatives --install %{_sbindir}/ebtables-save ebtables-save %{_sbindir}/ebtables-legacy-save 10
2019-09-30 10:37:43 -04:00
%preun
%systemd_preun ebtables.service
%postun
%systemd_postun_with_restart ebtables.service
%?ldconfig
%files
%license COPYING
%{_unitdir}/ebtables.service
%{_libexecdir}/ebtables
/%{_lib}/libebtc.so
/%{_lib}/ebtables/
2020-01-15 04:49:32 +08:00
%{_sbindir}/ebtables-*
2020-07-28 17:41:00 +08:00
%{_sbindir}/ebtables*
2019-09-30 10:37:43 -04:00
%exclude %{_initrddir}
%exclude %{_sysconfdir}/ethertypes
%config(noreplace) %{_sysconfdir}/sysconfig/ebtables-config
%ghost %{_sbindir}/ebtables
2020-07-28 17:41:00 +08:00
%ghost %{_sbindir}/ebtables-restore
%ghost %{_sbindir}/ebtables-save
2019-09-30 10:37:43 -04:00
%ghost %{_sysconfdir}/sysconfig/{ebtables.filter,ebtables.nat,ebtables.broute}
%files help
%doc ChangeLog THANKS
2020-07-28 17:41:00 +08:00
%doc %{_mandir}/man8/ebtables-legacy.8*
2019-09-30 10:37:43 -04:00
%changelog
2020-07-28 17:41:00 +08:00
* Mon Jul 27 2020 openEuler Buildteam <buildteam@huawei.com> - 2.0.11-1
- Type:enhancement
- ID:NA
- SUG:NA
- DESC:Upgrade to version 2.0.11
2020-01-15 04:49:32 +08:00
* Wed Jan 15 2020 openEuler Buildteam <buildteam@openeuler.org> - 2.0.10-32
- Type:bugfix
- ID:NA
- SUG:NA
- DESC:fix build fail for firewalld
2020-01-14 22:46:01 +08:00
* Tue Jan 14 2020 zhangrui <zhangrui182@huawei.com> - 2.0.10-31
- Type:bugfix
- ID:NA
- SUG:NA
- DESC:fix build fail for firewalld
2019-09-30 10:37:43 -04:00
* Thu Sep 24 2019 gaoguanghui <gaoguanghui1@huawei.com> - 2.0.10-30
- Type:bugfix
- ID:NA
- SUG:NA
- DESC:this patch made future ebtables processes wait indefinitely for the lock to
become free
* Mon Sep 16 2019 yanzhihua <yanzhihua4@huawei.com> - 2.0.10-29
- Package init