From 2c41b49bfc18edc37c1a8404f1416f6484046a08 Mon Sep 17 00:00:00 2001 From: Florence Blanc-Renaud Date: Wed, 3 May 2023 18:07:16 +0200 Subject: [PATCH] spec file: force nodejs < 20 on fedora < 39 On fedora < 39, nodejs 20 is not the default version. As a consequence, the installation of nodejs20 adds the command /usr/bin/node-20 instead of /usr/bin/node. FreeIPA build is using the node command and fails if the command is missing. Force nodejs < 20 on fedora < 39 to make sure the node command is installed. Fixes: https://pagure.io/freeipa/issue/9374 Signed-off-by: Florence Blanc-Renaud Reviewed-By: Rob Crittenden --- freeipa.spec.in | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/freeipa.spec.in b/freeipa.spec.in index 8e14c5f55..c2063ba12 100755 --- a/freeipa.spec.in +++ b/freeipa.spec.in @@ -306,7 +306,12 @@ BuildRequires: libpwquality-devel BuildRequires: libsss_idmap-devel BuildRequires: libsss_certmap-devel BuildRequires: libsss_nss_idmap-devel >= %{sssd_version} +%if 0%{?fedora} >= 39 || 0%{?rhel} >= 10 +# Do not use nodejs20 on fedora < 39, https://pagure.io/freeipa/issue/9374 BuildRequires: nodejs(abi) +%else +BuildRequires: nodejs(abi) < 111 +%endif # use old dependency on RHEL 8 for now %if 0%{?fedora} >= 31 || 0%{?rhel} >= 9 BuildRequires: python3-rjsmin