From 845fcf50881718a653667129a066927820c5ecf0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Filip=20Janu=C5=A1?= Date: Wed, 24 Mar 2021 09:59:42 +0100 Subject: [PATCH] Disable Nis support for RHEL9+ --- postfix.spec | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/postfix.spec b/postfix.spec index 794e4e2..8ff7694 100644 --- a/postfix.spec +++ b/postfix.spec @@ -49,7 +49,7 @@ Name: postfix Summary: Postfix Mail Transport Agent Version: 3.5.9 -Release: 3%{?dist} +Release: 4%{?dist} Epoch: 2 URL: http://www.postfix.org License: (IBM and GPLv2+) or (EPL-2.0 and GPLv2+) @@ -104,6 +104,10 @@ BuildRequires: make BuildRequires: libdb-devel, perl-generators, pkgconfig, zlib-devel BuildRequires: systemd-units, libicu-devel, libnsl2-devel BuildRequires: gcc, m4, findutils +%if 0%{?rhel} >= 9 +%else +BuildRequires: libnsl2-devel +%endif %{?with_ldap:BuildRequires: openldap-devel} %{?with_lmdb:BuildRequires: lmdb-devel} @@ -250,7 +254,11 @@ done %build unset AUXLIBS AUXLIBS_LDAP AUXLIBS_LMDB AUXLIBS_PCRE AUXLIBS_MYSQL AUXLIBS_PGSQL AUXLIBS_SQLITE AUXLIBS_CDB CCARGS="-fPIC -fcommon" +%if 0%{?rhel} >= 9 +AUXLIBS="" +%else AUXLIBS="-lnsl" +%endif %ifarch s390 s390x ppc CCARGS="${CCARGS} -fsigned-char" @@ -305,7 +313,9 @@ CCARGS="${CCARGS} -fsigned-char" CCARGS="${CCARGS} -DDEF_CONFIG_DIR=\\\"%{postfix_config_dir}\\\"" CCARGS="${CCARGS} $(getconf LFS_CFLAGS)" - +%if 0%{?rhel} >= 9 + CCARGS="${CCARGS} -DNO_NIS" +%endif LDFLAGS="%{?__global_ldflags} %{?_hardened_build:-Wl,-z,relro,-z,now}" # SHLIB_RPATH is needed to find private libraries @@ -776,6 +786,9 @@ fi %endif %changelog +* Wed Mar 24 2021 Filip Januš - 2:3.5.9-4 +- Disable nis support for RHEL9+ + * Mon Feb 08 2021 Pavel Raiskup - 2:3.5.9-3 - rebuild for libpq ABI fix rhbz#1908268