iptables-1.8.11-4.el10

* Wed Nov 13 2024 Phil Sutter <psutter@redhat.com> [1.8.11-4.el10]
- Fix for RPM build warnings '--with legacy' (Phil Sutter) [RHEL-67473]
- spec: Use bcond macro (Phil Sutter) [RHEL-67473]
Resolves: RHEL-67473
This commit is contained in:
Phil Sutter 2024-11-13 23:28:49 +01:00
parent 71e0709775
commit 04f3de2395

View File

@ -8,7 +8,7 @@
%global ipXtc_so_ver 2 %global ipXtc_so_ver 2
# build legacy sub-packages only on non-rhel distributions # build legacy sub-packages only on non-rhel distributions
%global do_legacy_pkg ! 0%{?rhel} %bcond legacy %[ ! 0%{?rhel} ]
%define _unpackaged_files_terminate_build 0 %define _unpackaged_files_terminate_build 0
@ -16,7 +16,7 @@ Name: iptables
Summary: Tools for managing Linux kernel packet filtering capabilities Summary: Tools for managing Linux kernel packet filtering capabilities
URL: https://www.netfilter.org/projects/iptables URL: https://www.netfilter.org/projects/iptables
Version: 1.8.11 Version: 1.8.11
Release: 3%{?dist} Release: 4%{?dist}
Source: %{url}/files/%{name}-%{version}.tar.xz Source: %{url}/files/%{name}-%{version}.tar.xz
Source1: iptables.init Source1: iptables.init
Source2: iptables-config Source2: iptables-config
@ -62,6 +62,8 @@ The iptables utility controls the network packet filtering code in the
Linux kernel. If you need to set up firewalls and/or IP masquerading, Linux kernel. If you need to set up firewalls and/or IP masquerading,
you should install this package. you should install this package.
%if %{with legacy}
%package legacy %package legacy
Summary: Legacy tools for managing Linux kernel packet filtering capabilities Summary: Legacy tools for managing Linux kernel packet filtering capabilities
Requires: %{name}-legacy-libs%{?_isa} = %{version}-%{release} Requires: %{name}-legacy-libs%{?_isa} = %{version}-%{release}
@ -80,9 +82,12 @@ nft-variants in iptables-nft package for backwards compatibility reasons.
If you need to set up firewalls and/or IP masquerading, you should not install If you need to set up firewalls and/or IP masquerading, you should not install
this package but either nftables or iptables-nft instead. this package but either nftables or iptables-nft instead.
# with legacy
%endif
%package libs %package libs
Summary: libxtables and iptables extensions userspace support Summary: libxtables and iptables extensions userspace support
%if ! %{do_legacy_pkg} %if %{without legacy}
Obsoletes: iptables-legacy-libs-debuginfo < 1.8.10-9 Obsoletes: iptables-legacy-libs-debuginfo < 1.8.10-9
Obsoletes: iptables-legacy-libs < 1.8.10-9 Obsoletes: iptables-legacy-libs < 1.8.10-9
%endif %endif
@ -93,6 +98,8 @@ libxtables and associated shared object files
Libxtables provides unified access to iptables extensions in userspace. Data Libxtables provides unified access to iptables extensions in userspace. Data
and logic for those is kept in per-extension shared object files. and logic for those is kept in per-extension shared object files.
%if %{with legacy}
%package legacy-libs %package legacy-libs
Summary: iptables legacy libraries Summary: iptables legacy libraries
Obsoletes: %{name}-libs < %{version}-%{release} Obsoletes: %{name}-libs < %{version}-%{release}
@ -106,17 +113,22 @@ For more information about this, please have a look at
http://www.netfilter.org/documentation/FAQ/netfilter-faq-4.html#ss4.5 http://www.netfilter.org/documentation/FAQ/netfilter-faq-4.html#ss4.5
# with legacy
%endif
%package devel %package devel
Summary: Development package for iptables Summary: Development package for iptables
Requires: %{name}-libs%{?_isa} = %{version}-%{release} Requires: %{name}-libs%{?_isa} = %{version}-%{release}
Requires: pkgconfig Requires: pkgconfig
%if ! %{do_legacy_pkg} %if %{without legacy}
Obsoletes: iptables-legacy-devel < 1.8.10-9 Obsoletes: iptables-legacy-devel < 1.8.10-9
%endif %endif
%description devel %description devel
libxtables development headers and pkgconfig files libxtables development headers and pkgconfig files
%if %{with legacy}
%package legacy-devel %package legacy-devel
Summary: Development package for legacy iptables Summary: Development package for legacy iptables
Requires: %{name}-legacy-libs%{?_isa} = %{version}-%{release} Requires: %{name}-legacy-libs%{?_isa} = %{version}-%{release}
@ -140,6 +152,9 @@ iptables services for IPv4 and IPv6
This package provides the services iptables and ip6tables that have been split This package provides the services iptables and ip6tables that have been split
out of the base package since they are not active by default anymore. out of the base package since they are not active by default anymore.
# with legacy
%endif
%package nft-services %package nft-services
Summary: Services for nft-variants of iptables, ebtables and arptables Summary: Services for nft-variants of iptables, ebtables and arptables
Requires: %{name}-nft = %{version}-%{release} Requires: %{name}-nft = %{version}-%{release}
@ -154,7 +169,7 @@ Obsoletes: iptables-ebtables <= 1.8.4
Obsoletes: iptables-nft-compat <= 1.8.7-19 Obsoletes: iptables-nft-compat <= 1.8.7-19
%{?systemd_ordering} %{?systemd_ordering}
BuildArch: noarch BuildArch: noarch
%if ! %{do_legacy_pkg} %if %{without legacy}
Obsoletes: iptables-services < 1.8.10-9 Obsoletes: iptables-services < 1.8.10-9
%endif %endif
@ -287,8 +302,14 @@ for fam in ip ip6; do
link_ext libxt_NAT lib${fam}t_MASQUERADE link_ext libxt_NAT lib${fam}t_MASQUERADE
done done
# fix absolute symlink
ln -sf --relative %{buildroot}%{_sbindir}/xtables-legacy-multi \
%{buildroot}%{_bindir}/iptables-xml
%ldconfig_scriptlets %ldconfig_scriptlets
%if %{with legacy}
%post legacy %post legacy
pfx=%{_sbindir}/iptables pfx=%{_sbindir}/iptables
pfx6=%{_sbindir}/ip6tables pfx6=%{_sbindir}/ip6tables
@ -316,6 +337,9 @@ fi
%?ldconfig %?ldconfig
%systemd_postun iptables.service ip6tables.service %systemd_postun iptables.service ip6tables.service
# with legacy
%endif
%post nft-services %post nft-services
%systemd_post iptables.service ip6tables.service %systemd_post iptables.service ip6tables.service
%systemd_post arptables.service ebtables.service %systemd_post arptables.service ebtables.service
@ -389,7 +413,7 @@ if [ $1 -eq 0 ]; then
done done
fi fi
%if %{do_legacy_pkg} %if %{with legacy}
%files legacy %files legacy
%{_sbindir}/ip{,6}tables-legacy* %{_sbindir}/ip{,6}tables-legacy*
@ -397,6 +421,7 @@ fi
%{_bindir}/iptables-xml %{_bindir}/iptables-xml
%{_mandir}/man1/iptables-xml* %{_mandir}/man1/iptables-xml*
%{_mandir}/man8/xtables-legacy* %{_mandir}/man8/xtables-legacy*
%{_datadir}/xtables/iptables.xslt
%ghost %{_sbindir}/ip{,6}tables{,-save,-restore} %ghost %{_sbindir}/ip{,6}tables{,-save,-restore}
%files legacy-libs %files legacy-libs
@ -417,7 +442,7 @@ fi
%dir %{legacy_actions}/ip{,6}tables %dir %{legacy_actions}/ip{,6}tables
%{legacy_actions}/ip{,6}tables/{save,panic} %{legacy_actions}/ip{,6}tables/{save,panic}
# do_legacy_pkg # with legacy
%endif %endif
%files nft-services %files nft-services
@ -480,6 +505,10 @@ fi
%ghost %{_mandir}/man8/ebtables.8.gz %ghost %{_mandir}/man8/ebtables.8.gz
%changelog %changelog
* Wed Nov 13 2024 Phil Sutter <psutter@redhat.com> [1.8.11-4.el10]
- Fix for RPM build warnings '--with legacy' (Phil Sutter) [RHEL-67473]
- spec: Use bcond macro (Phil Sutter) [RHEL-67473]
* Wed Nov 13 2024 Phil Sutter <psutter@redhat.com> [1.8.11-3.el10] * Wed Nov 13 2024 Phil Sutter <psutter@redhat.com> [1.8.11-3.el10]
- More upgrade path from RHEL-10.0-beta fixing (Phil Sutter) [RHEL-66725] - More upgrade path from RHEL-10.0-beta fixing (Phil Sutter) [RHEL-66725]