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

Allow to fully parse spec files with missing local sources #23

Merged
merged 1 commit into from
Mar 29, 2022

Conversation

nforro
Copy link
Member

@nforro nforro commented Mar 16, 2022

RPM is unable to fully parse a spec file if some sources are missing. Only so called non-build parse is possible in that case, but the result is not the same, it's like the sources weren't even defined.

Overcome that by creating a temporary dummy source for every source that is missing locally. Mimic file signatures of compressed sources to make RPM behave exactly the same when processing a dummy source.

Fixes #19.

@nforro nforro requested a review from FrNecas March 16, 2022 16:23
@softwarefactory-project-zuul
Copy link
Contributor

Build failed.

@softwarefactory-project-zuul
Copy link
Contributor

Build failed.

@softwarefactory-project-zuul
Copy link
Contributor

Build failed.

@softwarefactory-project-zuul
Copy link
Contributor

Build failed.

@softwarefactory-project-zuul
Copy link
Contributor

Build failed.

@softwarefactory-project-zuul
Copy link
Contributor

Build failed.

@softwarefactory-project-zuul
Copy link
Contributor

Build failed.

@softwarefactory-project-zuul
Copy link
Contributor

Build failed.

Copy link
Contributor

@FrNecas FrNecas left a comment

Choose a reason for hiding this comment

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

Nice workaround!

specfile/rpm.py Show resolved Hide resolved
@FrNecas
Copy link
Contributor

FrNecas commented Mar 25, 2022

As you mentioned earlier, zuul doesn't seem to like having target branch as something else than main/master. The mergeit label won't work (it requires the zuul check job to pass) so you will have to merge manually via Github

@nforro
Copy link
Member Author

nforro commented Mar 25, 2022

As you mentioned earlier, zuul doesn't seem to like having target branch as something else than main/master. The mergeit label won't work (it requires the zuul check job to pass) so you will have to merge manually via Github

It should work after I change the base branch (after PR #20 is merged).

@nforro nforro force-pushed the nforro-sources-patches branch 4 times, most recently from 6c28ab4 to 18e62d9 Compare March 28, 2022 12:50
@delete-merged-branch delete-merged-branch bot deleted the branch main March 29, 2022 14:36
@nforro nforro changed the base branch from nforro-sources-patches to main March 29, 2022 14:38
@softwarefactory-project-zuul
Copy link
Contributor

Build failed.

@nforro nforro added the mergeit Zuul, merge it! label Mar 29, 2022
RPM is unable to fully parse a spec file if some sources are missing.
Only so called non-build parse is possible in that case, but the result
is not the same, it's like the sources weren't even defined.

Overcome that by creating a temporary dummy source for every source
that is missing locally. Mimic file signatures of compressed sources
to make RPM behave exactly the same when processing a dummy source.

Signed-off-by: Nikola Forró <nforro@redhat.com>
@softwarefactory-project-zuul
Copy link
Contributor

Build failed.

@nforro nforro merged commit e8081d6 into main Mar 29, 2022
@delete-merged-branch delete-merged-branch bot deleted the nforro-rpm branch March 29, 2022 15:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
mergeit Zuul, merge it!
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Enable spec file parsing without remote sources/patches present
2 participants