Accepting request 930812 from home:dspinella:branches:security:netfilter
- Add build dependency on libalternatives - Run spec-cleaner OBS-URL: https://build.opensuse.org/request/show/930812 OBS-URL: https://build.opensuse.org/package/show/security:netfilter/ebtables?expand=0&rev=76
This commit is contained in:
parent
9ea1208ce0
commit
77ea56de7a
@ -1,3 +1,9 @@
|
||||
-------------------------------------------------------------------
|
||||
Thu Nov 11 08:36:14 UTC 2021 - Danilo Spinella <danilo.spinella@suse.com>
|
||||
|
||||
- Add build dependency on libalternatives
|
||||
- Run spec-cleaner
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Oct 15 07:30:28 UTC 2021 - Johannes Segitz <jsegitz@suse.com>
|
||||
|
||||
|
@ -21,12 +21,10 @@
|
||||
%else
|
||||
%bcond_with libalternatives
|
||||
%endif
|
||||
|
||||
#Compat macro for new _fillupdir macro introduced in Nov 2017
|
||||
%if ! %{defined _fillupdir}
|
||||
%define _fillupdir /var/adm/fillup-templates
|
||||
%define _fillupdir %{_localstatedir}/adm/fillup-templates
|
||||
%endif
|
||||
|
||||
Name: ebtables
|
||||
Version: 2.0.11
|
||||
Release: 0
|
||||
@ -35,8 +33,8 @@ License: GPL-2.0-or-later
|
||||
Group: Productivity/Networking/Security
|
||||
URL: http://ebtables.sf.net/
|
||||
#Git-Clone: git://git.netfilter.org/ebtables
|
||||
Source0: http://ftp.netfilter.org/pub/ebtables/ebtables-%version.tar.gz
|
||||
Source1: http://ftp.netfilter.org/pub/ebtables/ebtables-%version.tar.gz.sig
|
||||
Source0: http://ftp.netfilter.org/pub/ebtables/ebtables-%{version}.tar.gz
|
||||
Source1: http://ftp.netfilter.org/pub/ebtables/ebtables-%{version}.tar.gz.sig
|
||||
Source2: ebtables.keyring
|
||||
Source3: ebtables.service
|
||||
Source4: ebtables.systemd
|
||||
@ -46,14 +44,14 @@ BuildRequires: systemd-rpm-macros
|
||||
BuildRequires: xz
|
||||
Requires: netcfg >= 11.6
|
||||
Requires(pre): %fillup_prereq
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
%{?systemd_ordering}
|
||||
%if %{with libalternatives}
|
||||
BuildRequires: alts
|
||||
Requires: alts
|
||||
%else
|
||||
Requires(post): update-alternatives
|
||||
Requires(postun): update-alternatives
|
||||
Requires(postun):update-alternatives
|
||||
%endif
|
||||
%{?systemd_ordering}
|
||||
|
||||
%description
|
||||
A firewalling tool to transparently filter network traffic passing a
|
||||
@ -87,7 +85,7 @@ mv include/linux/netfilter_bridge/ebt_ulog.{h.save,h}
|
||||
# The way ebtables is built requires ASNEEDED=0 forever [bnc#567267]
|
||||
export SUSE_ASNEEDED=0
|
||||
%configure
|
||||
make %{?_smp_mflags}
|
||||
%make_build
|
||||
|
||||
%install
|
||||
# The way ebtables is built requires ASNEEDED=0 forever [bnc#567267]
|
||||
@ -96,28 +94,28 @@ mkdir -p "%{buildroot}/%{_sysconfdir}/init.d"
|
||||
%make_install
|
||||
mkdir -p %{buildroot}%{_fillupdir}
|
||||
mkdir -p %{buildroot}%{_unitdir}
|
||||
install -p %_sourcedir/ebtables.service %{buildroot}%{_unitdir}/
|
||||
install -p %{_sourcedir}/ebtables.service %{buildroot}%{_unitdir}/
|
||||
sed -i "s|@LIBEXECDIR@|%{_libexecdir}|g" %{buildroot}%{_unitdir}/*.service
|
||||
chmod -x %{buildroot}%{_unitdir}/*.service
|
||||
mkdir -p %{buildroot}%{_libexecdir}
|
||||
install -m0755 %_sourcedir/ebtables.systemd %{buildroot}%{_libexecdir}/%{name}-helper
|
||||
install -m0755 %{_sourcedir}/ebtables.systemd %{buildroot}%{_libexecdir}/%{name}-helper
|
||||
ln -s %{_sbindir}/service %{buildroot}%{_sbindir}/rc%{name}
|
||||
touch %{buildroot}%{_fillupdir}/sysconfig.%{name}.filter
|
||||
touch %{buildroot}%{_fillupdir}/sysconfig.%{name}.nat
|
||||
touch %{buildroot}%{_fillupdir}/sysconfig.%{name}.broute
|
||||
rm -rfv %{buildroot}%{_initrddir}
|
||||
rm -rfv %{buildroot}%{_initddir}
|
||||
# not used
|
||||
rm -f "%{buildroot}/%{_sysconfdir}/ebtables-config"
|
||||
for i in ebtables ebtables-restore ebtables-save; do
|
||||
%if ! %{with libalternatives}
|
||||
ln -fsv "/etc/alternatives/$i" "%{buildroot}/%{_sbindir}/$i"
|
||||
%if ! %{with libalternatives}
|
||||
ln -fsv "%{_sysconfdir}/alternatives/$i" "%{buildroot}/%{_sbindir}/$i"
|
||||
%else
|
||||
ln -fsv %{_bindir}/alts "%{buildroot}/%_sbindir/$i"
|
||||
%endif
|
||||
ln -fsv %{_bindir}/alts "%{buildroot}/%{_sbindir}/$i"
|
||||
%endif
|
||||
done
|
||||
echo ".so ebtables-legacy.8" >"%buildroot/%_mandir/man8/ebtables.8"
|
||||
echo ".so ebtables-legacy.8" >"%{buildroot}/%{_mandir}/man8/ebtables.8"
|
||||
# no headers to make use of it
|
||||
rm -f "%buildroot/%_libdir/libebtc.la" "%buildroot/%_libdir/libebtc.so"
|
||||
rm -f "%{buildroot}/%{_libdir}/libebtc.la" "%{buildroot}/%{_libdir}/libebtc.so"
|
||||
|
||||
%if %{with libalternatives}
|
||||
mkdir -p %{buildroot}%{_datadir}/libalternatives/ebtables
|
||||
@ -171,10 +169,9 @@ fi
|
||||
%postun -n libebtc0 -p /sbin/ldconfig
|
||||
|
||||
%files
|
||||
%defattr(-,root,root)
|
||||
%license COPYING
|
||||
%doc ChangeLog
|
||||
%{_mandir}/man8/ebtables*.8*
|
||||
%{_mandir}/man8/ebtables*.8%{?ext_man}
|
||||
%{_libexecdir}/%{name}-helper
|
||||
%{_unitdir}/%{name}.service
|
||||
%if ! %{with libalternatives}
|
||||
@ -199,6 +196,6 @@ fi
|
||||
%{_sbindir}/rcebtables
|
||||
|
||||
%files -n libebtc0
|
||||
%_libdir/libebtc.so.0*
|
||||
%{_libdir}/libebtc.so.0*
|
||||
|
||||
%changelog
|
||||
|
Loading…
Reference in New Issue
Block a user