All Virtuozzo development lists (kernel + QEMU)
 help / color / mirror / Atom feed
From: Andrey Drobyshev <andrey.drobyshev@virtuozzo.com>
To: svt-core@virtuozzo.com
Cc: ilia.solovykh@virtuozzo.com, artem.vasiliev@virtuozzo.com,
	den@openvz.org, andrey.drobyshev@virtuozzo.com
Subject: [PATCH qemu.vzspecs hci-8.1 1/2] coverage: keep headers with absolute paths in sources archive #VSTOR-154473
Date: Fri, 13 Nov 2026 18:37:19 +0200	[thread overview]
Message-ID: <20261113163720.893889-1-andrey.drobyshev@virtuozzo.com> (raw)

QEMU adds its include dirs with absolute paths (-iquote <srcdir>/include).
So ninja records most of the headers, e.g. include/qemu/*.h, by absolute
path.  We dropped all absolute paths to skip system headers, and these
headers got dropped along with them.  As a result, the archive had no
include/ dir at all: 284 headers with coverage data were missing.

lcov then failed on the first missing one, and no qemu report was built:

  geninfo: ERROR: unable to open .../include/system/confidential-guest-support.h

Let's first make all paths relative to the source tree and only then
skip the ones outside of it.

Fixes: 78390c804b30 ("coverage: pack only compiled sources in a reproducible way #VSTOR-151318")
Signed-off-by: Andrey Drobyshev <andrey.drobyshev@virtuozzo.com>
---
 qemu-kvm.spec | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/qemu-kvm.spec b/qemu-kvm.spec
index 21d7c58a..55287fc3 100644
--- a/qemu-kvm.spec
+++ b/qemu-kvm.spec
@@ -2238,15 +2238,14 @@ find %{qemu_kvm_build} -name '*.gcno' -printf '%%h\n' | sort -u | \
 
 install -m 0644 %{SOURCE2} ./sonar-project.properties
 
-# Only pack the sources which compiler read (including generated ones).
-#
-# Ninja records every input of every object relative to the build dir:
-# drop system headers, rebase onto the tree root, filter the sources.
+# Pack only the source files the compiler actually used, generated ones
+# included.  Ninja knows them for each build.  We make every path relative
+# to the source tree and skip files outside it, like system headers.
 set -o pipefail
 ninja -C %{qemu_kvm_build} -t deps |
     sed -En 's/^[[:space:]]+//p' |
-    grep -v '^/' |
     (cd %{qemu_kvm_build} && xargs realpath -ms --relative-to=..) |
+    grep -v '^\.\./' |
     grep -E '\.([chS]|inc)$' |
     LC_ALL=C sort -u |
     tar --mtime=@0 --owner=0 --group=0 --numeric-owner \
-- 
2.47.1


             reply	other threads:[~2026-11-13 16:37 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-13 16:37 Andrey Drobyshev [this message]
2026-11-13 16:37 ` [PATCH qemu.vzspecs hci-8.1 2/2] coverage: pack sources of the static build too Andrey Drobyshev

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261113163720.893889-1-andrey.drobyshev@virtuozzo.com \
    --to=andrey.drobyshev@virtuozzo.com \
    --cc=artem.vasiliev@virtuozzo.com \
    --cc=den@openvz.org \
    --cc=ilia.solovykh@virtuozzo.com \
    --cc=svt-core@virtuozzo.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.