From 4f26b38d814d04d10a30b4dd11a720603f757796 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vin=C3=ADcius=20Ferr=C3=A3o?= <2031761+viniciusferrao@users.noreply.github.com> Date: Thu, 20 Aug 2026 18:05:38 -0300 Subject: [PATCH] build(server): make perl-DB_File a weak dependency of xCAT-server perl-DB_File is only used by the Confluent client (lib/xcat/Confluent/Client.pm). EL10 dropped libdb, EPEL re-adds it only on its own architectures, and riscv64 has no perl-DB_File at all, so a hard Requires makes xCAT-server uninstallable on a riscv64 management node. Ask for it weakly: dnf installs it where it exists and skips it where it does not; the Confluent client stays optional. The dependency generator also turns Confluent/Client.pm's "use DB_File" into a hard perl(DB_File) requirement regardless of the Recommends, so that one generated requirement is excluded as well, appended to whatever filter the build root already set. Weak dependencies need rpm 4.12, so both only apply on a build host that has it (EL8 and later, or SUSE 15 and later); older build hosts keep the hard requirement they have today. --- xCAT-server/xCAT-server.spec | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/xCAT-server/xCAT-server.spec b/xCAT-server/xCAT-server.spec index 2c4f4b1a6..b964f90fd 100644 --- a/xCAT-server/xCAT-server.spec +++ b/xCAT-server/xCAT-server.spec @@ -51,7 +51,19 @@ Requires: perl-IO-Socket-SSL perl-XML-Simple perl-XML-Parser perl-Digest-SHA1 pe # therefore not auto-required, and (unlike SNMP, Expect, JSON, Net::Ping, # Time::HiRes and Text::Balanced) are not pulled in transitively by perl-xCAT # either. List them here or the affected subcommands die at load time. -Requires: perl-Net-Telnet perl-Net-DNS perl-Crypt-CBC perl-Crypt-Rijndael perl-DB_File +Requires: perl-Net-Telnet perl-Net-DNS perl-Crypt-CBC perl-Crypt-Rijndael +# DB_File is only used by the Confluent client (lib/xcat/Confluent/Client.pm). EL10 +# dropped libdb: EPEL still carries perl-DB_File for x86_64 and ppc64le, but riscv64 has +# no EPEL at all, so on EL10 ask for the module weakly -- it is installed where it exists +# and skipped where it cannot. The dependency generator still turns that "use DB_File" +# into a hard perl(DB_File) requirement; drop it there too, appending to any filter the +# build root already set. Every other platform keeps the hard requirement it has today. +%if 0%{?rhel} >= 10 +Recommends: perl-DB_File +%global __requires_exclude %{?__requires_exclude:%{__requires_exclude}|}^perl\\(DB_File\\)$ +%else +Requires: perl-DB_File +%endif %endif Obsoletes: atftp-xcat %endif