Skip to content

Add pkg_rpm() "data" attribute to provide files for rpmbuild#964

Merged
tonyaiuto merged 1 commit intobazelbuild:mainfrom
wade-arista:main
Jun 27, 2025
Merged

Add pkg_rpm() "data" attribute to provide files for rpmbuild#964
tonyaiuto merged 1 commit intobazelbuild:mainfrom
wade-arista:main

Conversation

@wade-arista
Copy link
Copy Markdown
Contributor

@wade-arista wade-arista commented Jun 27, 2025

When building debuginfo packages, find-debuginfo is called by rpmbuild. To include the relevant source files, they will need to be accessible to find-debuginfo via rpmbuild.

There are a number of other pieces required for an end-to-end solution with debuginfo, but they're outside the scope of rules_pkg, e.g.

  • customized find-debuginfo that can run inside bazel
  • special _find_debuginfo_opts used to locate source files
  • figuring out which source files to pass to pkg_rpm() in the first place.

The key, though, is that pkg_rpm() accepts extra data in the first place.

Fixes: #965

When building debuginfo packages, find-debuginfo is called by
rpmbuild. To include the relevant source files, they will need to be
accessible to find-debuginfo via rpmbuild.

There are a number of other pieces required for an end-to-end solution
with debuginfo, but they're outside the scope of rules_pkg, e.g.

  - customized find-debuginfo that can run inside bazel
  - special _find_debuginfo_opts used to locate source files
  - figuring out which source files to pass to pkg_rpm() in the first
    place.

The key, though, is that pkg_rpm() accepts extra data in the first
place.

Fixes: #965
Copy link
Copy Markdown
Collaborator

@cgrindel cgrindel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. I'll leave it open for @aiuto to review as well.

Copy link
Copy Markdown
Collaborator

@tonyaiuto tonyaiuto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be great if you could do something with this in the rpmbuild example.
I see why this exists, but I have no clue about how and when you would need to use it.

@tonyaiuto tonyaiuto merged commit 5a77a59 into bazelbuild:main Jun 27, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

pkg_rpm cannot inject source files into debuginfo RPMs via find-debuginfo

3 participants