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

Fixes to rpmlib(DynamicBuildrequires) dependencies #914

Merged
merged 3 commits into from Oct 28, 2019

Conversation

pmatilai
Copy link
Member

Details in the commit messages, executive summary:

  • Packages are not permitted to provide rpmlib() capabilities, so don't (the use-case is covered by other means)
  • src.rpm requires are generally build-time requires, rpmlib() is the odd man out. Mark build-time rpmlib() dependencies with MISSINGOK to allow install-time to skip them.

This replaces the earlier PR #878. Original issue reported at https://pagure.io/copr/copr/issue/1038

Packages can never provide rpmlib() capabilities, don't pollute the
namespace with invalid (if mostly harmless) data. The use-case of
identifying whether there are dynamically generated buildrequires in
an src.rpm is satisfied by looking for RPMSENSE_FIND_REQUIRES type
requires as of commit bee5dc9.
rpmlib() dependencies are an install-time barrier, but dependencies
in src.rpm are considered build-time dependencies. This paradox
is the crux of the problem in https://pagure.io/copr/copr/issue/1038.

We could move the rpmlib(DynamicBuildRequires) someplace else
(eg buildrecommends) to avoid the issue, but then the dependency has
technically every right to be there, and changing it would break
existing software (mock) relying on what we already released.
Adding MISSINGOK flag allows rpm to legitimately skip it while
installing, the build-side does its own checking independently.

This is not ideal as it requires backporting of commit
1ac1661 to older releases to fix,
but this is the least-worst compromise we were able to come up with.
@pmatilai
Copy link
Member Author

The downside is that old releases don't honor RPMSENSE_MISSINGOK in src.rpm rpmlib() checking, that two-liner patch needs to be backported to relevant releases. OTOH, rpm2cpio can always be used to extract contents so nobody is held hostage.

As noted in the commits, this is just the least-worst compromise we could come up with.

@pmatilai pmatilai added the bug label Oct 24, 2019
@pmatilai pmatilai added this to the 4.15.0.1 milestone Oct 24, 2019
@ffesti
Copy link
Contributor

ffesti commented Oct 24, 2019

This looks like a good solution - especially if we backport the RPMSENSE_MISSINGOK change to older version.

Copy link
Member

@Conan-Kudo Conan-Kudo left a comment

Choose a reason for hiding this comment

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

It's a decent compromise, code-wise looks sane too.

@pmatilai
Copy link
Member Author

Okay, so shall it be then.

@pmatilai pmatilai merged commit 819c6c8 into rpm-software-management:master Oct 28, 2019
@pmatilai pmatilai deleted the dpr-pr branch October 28, 2019 13:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants