From 1583473e3df354afd39a2ecac5d849598d5b2664 Mon Sep 17 00:00:00 2001 From: Daniel Hilst <392820+dhilst@users.noreply.github.com> Date: Fri, 2 Oct 2026 14:02:42 -0300 Subject: [PATCH] fix(xcat-core): xCATsn installs its templates under share/xcat/xCAT The xCATsn templates archive held xCAT/templates/..., so xCATsn installed the templates under /opt/xcat/share/xcat/xCAT/templates. The xCAT build wrote the same archive rooted at templates/ into the shared SOURCES directory, and the existence check let xCATsn reuse it when xCAT wrote first. stage_xcatsn_templates now runs tar from xCAT/, so the members start with templates/, and it always writes the archive. The archive matches the one the xCAT build writes. Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com> --- build-utils/lib/XCAT/BuildUtils.pm | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/build-utils/lib/XCAT/BuildUtils.pm b/build-utils/lib/XCAT/BuildUtils.pm index e429f494e..cdc558137 100644 --- a/build-utils/lib/XCAT/BuildUtils.pm +++ b/build-utils/lib/XCAT/BuildUtils.pm @@ -481,7 +481,7 @@ sub stage_xcat_probe_sources { =head3 stage_xcatsn_templates Descriptions: Write the templates archive that xCATsn.spec extracts into - %{prefix}/share/xcat. + %{prefix}/share/xcat, with members rooted at templates/. Arguments: $checkout - the xcat-core source tree @@ -500,9 +500,8 @@ sub stage_xcatsn_templates { my $tarball = "$sources_dir/templates.tar.gz"; sh_or_die(qq(tar --sort=name --owner=0 --group=0 --mtime="\@$epoch" ) - . qq(-czf "$tarball" -C "$checkout" xCAT/templates), - "Error creating $tarball") - unless -f $tarball; + . qq(-czf "$tarball" -C "$checkout/xCAT" templates), + "Error creating $tarball"); return $tarball; }