ebtables-2.0.10-26
- Replace calls to ldconfig with newly introduced macro. - Install binaries in /usr/sbin instead of /sbin. - Make use of Alternatives system.
This commit is contained in:
parent
158d794178
commit
840aed00b4
@ -2,7 +2,7 @@
|
||||
|
||||
Name: ebtables
|
||||
Version: 2.0.10
|
||||
Release: 25%{?dist}
|
||||
Release: 26%{?dist}
|
||||
Summary: Ethernet Bridge frame table administration tool
|
||||
License: GPLv2+
|
||||
Group: System Environment/Base
|
||||
@ -27,6 +27,8 @@ Requires(postun): systemd
|
||||
%if 0%{?fedora} > 24
|
||||
Conflicts: setup < 2.10.4-1
|
||||
%endif
|
||||
Requires(post): %{_sbindir}/update-alternatives
|
||||
Requires(postun): %{_sbindir}/update-alternatives
|
||||
|
||||
%description
|
||||
Ethernet bridge tables is a firewalling tool to transparently filter network
|
||||
@ -54,7 +56,7 @@ like iptables. There are no known incompatibility issues.
|
||||
f=THANKS; iconv -f iso-8859-1 -t utf-8 $f -o $f.utf8 ; mv $f.utf8 $f
|
||||
|
||||
%build
|
||||
make %{?_smp_mflags} CFLAGS="${RPM_OPT_FLAGS}" LIBDIR="/%{_lib}/ebtables" BINDIR="/sbin" MANDIR="%{_mandir}" LDFLAGS="${RPM_LD_FLAGS} -Wl,-z,now"
|
||||
make %{?_smp_mflags} CFLAGS="${RPM_OPT_FLAGS}" LIBDIR="/%{_lib}/ebtables" BINDIR="%{_sbindir}" MANDIR="%{_mandir}" LDFLAGS="${RPM_LD_FLAGS} -Wl,-z,now"
|
||||
|
||||
%install
|
||||
mkdir -p %{buildroot}%{_initrddir}
|
||||
@ -64,7 +66,7 @@ chmod -x %{buildroot}%{_unitdir}/*.service
|
||||
mkdir -p %{buildroot}%{_libexecdir}
|
||||
install -m0755 %{SOURCE2} %{buildroot}%{_libexecdir}/ebtables
|
||||
mkdir -p %{buildroot}%{_sysconfdir}/sysconfig
|
||||
make DESTDIR="%{buildroot}" LIBDIR="/%{_lib}/ebtables" BINDIR="/sbin" MANDIR="%{_mandir}" install
|
||||
make DESTDIR="%{buildroot}" LIBDIR="/%{_lib}/ebtables" BINDIR="%{_sbindir}" MANDIR="%{_mandir}" install
|
||||
touch %{buildroot}%{_sysconfdir}/sysconfig/ebtables.filter
|
||||
touch %{buildroot}%{_sysconfdir}/sysconfig/ebtables.nat
|
||||
touch %{buildroot}%{_sysconfdir}/sysconfig/ebtables.broute
|
||||
@ -73,8 +75,8 @@ touch %{buildroot}%{_sysconfdir}/sysconfig/ebtables.broute
|
||||
rm -rf %{buildroot}%{_initrddir}
|
||||
|
||||
# install ebtables-save bash script
|
||||
rm -f %{buildroot}/sbin/ebtables-save
|
||||
install %{SOURCE1} %{buildroot}/sbin/ebtables-save
|
||||
rm -f %{buildroot}%{_sbindir}/ebtables-save
|
||||
install %{SOURCE1} %{buildroot}%{_sbindir}/ebtables-save
|
||||
|
||||
# move libebtc.so into the ldpath
|
||||
mv %{buildroot}/%{_lib}/ebtables/libebtc.so %{buildroot}/%{_lib}/
|
||||
@ -84,16 +86,28 @@ mv %{buildroot}/%{_lib}/ebtables/libebtc.so %{buildroot}/%{_lib}/
|
||||
rm -f %{buildroot}%{_sysconfdir}/ethertypes
|
||||
%endif
|
||||
|
||||
# Prepare for Alternatives system
|
||||
mv %{buildroot}%{_sbindir}/ebtables %{buildroot}%{_sbindir}/ebtables-legacy
|
||||
touch %{buildroot}%{_sbindir}/ebtables
|
||||
|
||||
%post
|
||||
%systemd_post ebtables.service
|
||||
/sbin/ldconfig
|
||||
%?ldconfig
|
||||
if [ "$(readlink -e %{_sbindir}/ebtables)" == %{_sbindir}/ebtables ]; then
|
||||
rm -f %{_sbindir}/ebtables
|
||||
fi
|
||||
%{_sbindir}/update-alternatives --install \
|
||||
%{_sbindir}/ebtables ebtables %{_sbindir}/ebtables-legacy 10
|
||||
|
||||
%preun
|
||||
%systemd_preun ebtables.service
|
||||
|
||||
%postun
|
||||
%systemd_postun_with_restart ebtables.service
|
||||
/sbin/ldconfig
|
||||
%?ldconfig
|
||||
if [ $1 -eq 0 ]; then
|
||||
%{_sbindir}/update-alternatives --remove ebtables %{_sbindir}/ebtables-legacy
|
||||
fi
|
||||
|
||||
%files
|
||||
%doc ChangeLog COPYING THANKS
|
||||
@ -106,12 +120,18 @@ rm -f %{buildroot}%{_sysconfdir}/ethertypes
|
||||
%{_libexecdir}/ebtables
|
||||
/%{_lib}/libebtc.so
|
||||
/%{_lib}/ebtables/
|
||||
/sbin/ebtables*
|
||||
%{_sbindir}/ebtables-*
|
||||
%ghost %{_sbindir}/ebtables
|
||||
%ghost %{_sysconfdir}/sysconfig/ebtables.filter
|
||||
%ghost %{_sysconfdir}/sysconfig/ebtables.nat
|
||||
%ghost %{_sysconfdir}/sysconfig/ebtables.broute
|
||||
|
||||
%changelog
|
||||
* Tue Jul 10 2018 Phil Sutter <psutter@redhat.com> - 2.0.10-26
|
||||
- Replace calls to ldconfig with newly introduced macro.
|
||||
- Install binaries in /usr/sbin instead of /sbin.
|
||||
- Make use of Alternatives system.
|
||||
|
||||
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.10-25
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user