Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build-id generation not subjected to %exclude #2801

Open
dmnks opened this issue Dec 4, 2023 · 0 comments
Open

Build-id generation not subjected to %exclude #2801

dmnks opened this issue Dec 4, 2023 · 0 comments
Labels
packaging Package building, SPEC files, etc.

Comments

@dmnks
Copy link
Contributor

dmnks commented Dec 4, 2023

This appears to be a bug in that we let rpmbuild generate .build-id symlinks even for files that are %excluded from the given subpackage.

The original report: https://bugzilla.redhat.com/show_bug.cgi?id=2142890

Mark Wielaard proposed a patch in the above BZ which looks like this (untested):

diff --git a/build/files.c b/build/files.c
index aab128aaa..803a97248 100644
--- a/build/files.c
+++ b/build/files.c
@@ -1896,7 +1896,8 @@ static int generateBuildIDs(FileList fl, ARGV_t *files)
     int needDbg = 0;
     for (i = 0, flp = fl->files.recs; i < fl->files.used; i++, flp++) {
        struct stat sbuf;
-       if (lstat(flp->diskPath, &sbuf) == 0 && S_ISREG (sbuf.st_mode)) {
+       if (lstat(flp->diskPath, &sbuf) == 0 && S_ISREG (sbuf.st_mode)
+           && (flp->flags & RPMFILE_EXCLUDE) == 0) {
            /* We determine whether this is a main or
               debug ELF based on path.  */
            int isDbg = strncmp (flp->cpioPath,
@dmnks dmnks self-assigned this Dec 6, 2023
@dmnks dmnks added the packaging Package building, SPEC files, etc. label Jan 16, 2024
@dmnks dmnks removed their assignment Mar 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
packaging Package building, SPEC files, etc.
Projects
Status: Todo
Development

No branches or pull requests

1 participant