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

Add a git-snapshot (tarball) generator #72

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

praiskup
Copy link
Member

The src.rpm is distribution-specific format; the rpmbuild -bs doesn't necessarily generate the same output SRC.RPM if run on different distributions. The snapshot tarball is though generated in a distribution-agnostic way.

Note that this tarball generator still requires specfile parsing by RPM, and it may fail easily, see #71 for more info.

@siteshwar
Copy link

@praiskup The OpenScanHub task submitted for this pull request seems to introduce shellcheck warnings: https://openscanhub.fedoraproject.org/task/25262/

Shall those files be packaged with the sources?

@praiskup
Copy link
Member Author

Shall those files be packaged with the sources?

Are those issues really new? Seems like some csdiff mismatch.

@siteshwar
Copy link

Are those issues really new? Seems like some csdiff mismatch.

For some reason, these warnings do not show up in the base scan: https://openscanhub.fedoraproject.org/task/25265/log/stdout.log

And it happened a couple of times. Previous scan can be seen at https://openscanhub.fedoraproject.org/task/25254/

@praiskup
Copy link
Member Author

Isn't it because we did a rather non-trivial code movement within this repository recently aae2272?
In the vcs-diff-lint, we honor the code movements.

@siteshwar
Copy link

@praiskup It actually happened because Packit is submitting multiple scans for dist-git package and dist-git builds are being compared with dist-git-client builds. Related issues: packit/packit-service#2653

@lbarcziova It looks like another bug in Packit.

Copy link
Contributor

@FrostyX FrostyX left a comment

Choose a reason for hiding this comment

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

I didn't try to run this yet, ... only a first quick review.

_, distgit_instance_config = get_distgit_config(config, args.forked_from)
spec = _get_preprocessed_specfile(distgit_instance_config, args)

with tempfile.TemporaryDirectory(prefix="copr-test-walk") as workdir:
Copy link
Contributor

Choose a reason for hiding this comment

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

We should probably not use "copr" in the prefix

@@ -494,6 +570,8 @@ def main():
srpm(args, config)
elif args.action == "clone":
clone(args, config)
elif args.action == "snapshot":
snapshot(args, config)
Copy link
Contributor

Choose a reason for hiding this comment

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

Bikeshedding ... not sure if we should call this feature "snahpshot", or maybe "archive", or something else.

The src.rpm is distribution-specific format;  the `rpmbuild -bs` doesn't
necessarily generate the same output SRC.RPM if run on different
distributions.  The `snapshot` tarball is though generated in a
distribution-agnostic way.

Note that this tarball generator still requires specfile parsing by RPM,
and it may fail easily, see release-engineering#71 for more info.
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.

3 participants