From 0e6196524f9aae0147f945e3b55d3ec3c1b2d0b6 Mon Sep 17 00:00:00 2001 From: Daniel Hilst <392820+dhilst@users.noreply.github.com> Date: Wed, 23 Sep 2026 10:39:13 -0300 Subject: [PATCH] fix(xcat-core): repository indexing fails on every target on a shared build tree createrepo_dir passed --database, which writes *.sqlite.bz2. Building those needs SQLite, and SQLite needs POSIX locks. A build tree can live on an NFS re-export, where the kernel refuses locks outright: every attempt answers errno 524. So every target died with "Cannot open .repodata/primary.sqlite: Can not create db_info table: disk I/O error", and the build staged nothing. Measured on such a share, with a local control: a bare sqlite3 connect fails there and succeeds on local disk; createrepo_c fails with --database and succeeds without it, emitting primary/filelists/other as *.xml.zst. Nothing this project ships reads the sqlite metadata. dnf on el8+ and zypper both read the XML. Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com> --- buildrpms.pl | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/buildrpms.pl b/buildrpms.pl index e14bdd436..df22aaea2 100755 --- a/buildrpms.pl +++ b/buildrpms.pl @@ -657,14 +657,20 @@ sub setup_local_repos { } -# Index one repo dir with deterministic, upstream-matching metadata. createrepo_c's -# defaults already emit primary/filelists/other as *.xml.zst plus *.sqlite.bz2 -# (--database), exactly the upstream shape; --set-timestamp-to-revision pins the -# repomd timestamp to SOURCE_DATE_EPOCH. +# Index one repo dir with deterministic, upstream-matching metadata: primary/filelists/other as +# *.xml.zst, with --set-timestamp-to-revision pinning the repomd timestamp to SOURCE_DATE_EPOCH. +# +# NO --database. It writes *.sqlite.bz2, and building those needs SQLite, which needs POSIX +# locks. A build tree can live on an NFS re-export, where the kernel refuses locks outright: +# every attempt answers errno 524, and createrepo_c then dies on every target with +# "Cannot open .repodata/primary.sqlite: Can not create db_info table: disk I/O error". +# Without --database it succeeds there. +# +# Nothing this project ships reads the sqlite metadata. dnf on el8+ and zypper both read the XML. sub createrepo_dir { my ($dir, $extra) = @_; $extra //= ''; - sh_or_die(qq(createrepo_c --update --database ) + sh_or_die(qq(createrepo_c --update ) . qq(--revision "$SOURCE_DATE_EPOCH" --set-timestamp-to-revision $extra "$dir"), "Failed to createrepo_c $dir\n"); }