fix(sign): construct RPM path using build directory in sign spooler

Co-developed-by: Gemini AI <renich+gemini@woralelandia.com>

Signed-off-by: Rénich Bon Ćirić <renich@woralelandia.com>
This commit is contained in:
Rénich Bon Ćirić 2026-06-16 12:22:21 -06:00
commit 18f7c93ea8
Signed by: renich
GPG key ID: AB2A9F49384FE324

View file

@ -188,12 +188,23 @@ def process_queue():
except Exception as e:
logger.warning(f"Failed to write public key to {pubkey_path}: {e}")
# Get build info and construct RPM path
try:
build_info = kojihub.get_build(build_id)
build_dir = koji.pathinfo.build(build_info)
except Exception as e:
logger.error(f"Failed to get build info for {build_id}: {e}")
os.makedirs(FAILED_DIR, exist_ok=True)
os.rename(file_path, os.path.join(FAILED_DIR, filename))
continue
success = True
for rpm in rpms:
rpm_id = rpm['id']
rpm_nvr = rpm['nvr']
rpm_path = rpm['path']
full_rpm_path = os.path.join(koji_dir, rpm_path)
# Construct RPM path using koji.pathinfo
rpm_rel_path = koji.pathinfo.rpm(rpm)
full_rpm_path = os.path.join(koji_dir, build_dir, rpm_rel_path)
try:
logger.info(f"Signing RPM {rpm_nvr} via rpmsign and Siguldry PKCS#11")