!36 fix install error

From: @xinghe_1 
Reviewed-by: @kircher 
Signed-off-by: @kircher
This commit is contained in:
openeuler-ci-bot 2023-06-30 07:30:04 +00:00 committed by Gitee
commit c788894513
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -1,7 +1,7 @@
Name: ebtables Name: ebtables
Version: 2.0.11 Version: 2.0.11
Release: 7 Release: 8
Summary: A filtering tool for a Linux-based bridging firewall Summary: A filtering tool for a Linux-based bridging firewall
License: GPLv2+ License: GPLv2+
URL: http://ebtables.sourceforge.net/ URL: http://ebtables.sourceforge.net/
@ -62,20 +62,21 @@ echo "%{_libdir}/ebtables" > %{buildroot}/etc/ld.so.conf.d/%{name}-%{_arch}.conf
%post %post
%systemd_post ebtables.service %systemd_post ebtables.service
%?ldconfig %?ldconfig
if [ "$(readlink -e %{_sbindir}/ebtables)" == %{_sbindir}/ebtables ] ; then pfx=%{_sbindir}/ebtables
rm -f %{_sbindir}/ebtables manpfx=%{_mandir}/man8/ebtables
for sfx in "" "-restore" "-save"; do
if [ "$(readlink -e $pfx$sfx)" == $pfx$sfx ]; then
rm -f $pfx$sfx
fi
done
if [ "$(readlink -e $manpfx.8.gz)" == $manpfx.8.gz ]; then
rm -f $manpfx.8.gz
fi fi
%{_sbindir}/update-alternatives --install %{_sbindir}/ebtables ebtables %{_sbindir}/ebtables-legacy 10 %{_sbindir}/update-alternatives --install \
$pfx ebtables $pfx-legacy 10 \
if [ "$(readlink -e %{_sbindir}/ebtables-restore)" == %{_sbindir}/ebtables-restore ] ; then --slave $pfx-save ebtables-save $pfx-legacy-save \
rm -f %{_sbindir}/ebtables-restore --slave $pfx-restore ebtables-restore $pfx-legacy-restore \
fi --slave $manpfx.8.gz ebtables-man $manpfx-legacy.8.gz
%{_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
%preun %preun
%systemd_preun ebtables.service %systemd_preun ebtables.service
@ -83,6 +84,10 @@ fi
%postun %postun
%systemd_postun_with_restart ebtables.service %systemd_postun_with_restart ebtables.service
%?ldconfig %?ldconfig
if [ $1 -eq 0 ]; then
%{_sbindir}/update-alternatives --remove \
ebtables %{_sbindir}/ebtables-legacy
fi
%files %files
%license COPYING %license COPYING
@ -105,6 +110,12 @@ fi
%doc %{_mandir}/man8/ebtables-legacy.8* %doc %{_mandir}/man8/ebtables-legacy.8*
%changelog %changelog
* Fri Jun 30 2023 xinghe <xinghe2@h-partners.com> - 2.0.11-8
- Type:bugfix
- CVE:NA
- SUG:NA
- DESC:fix install error
* Mon Nov 28 2022 yanglu<yanglu72@h-partners.com> - 2.0.11-7 * Mon Nov 28 2022 yanglu<yanglu72@h-partners.com> - 2.0.11-7
- Type:bugfix - Type:bugfix
- CVE:NA - CVE:NA