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

Keep .spec in git #1016

Closed
wants to merge 1 commit into from
Closed

Keep .spec in git #1016

wants to merge 1 commit into from

Conversation

martinpitt
Copy link
Member

@martinpitt martinpitt commented Jun 14, 2022

Give up on .spec.in and directly keep the .spec in git. This aligns a
lot better with what packit wants to do, and avoids having explicit
post-upstream-clone: actions.

We still want to build tarballs with a correct .spec (for using with
rpmbuild -bb and VM image preparation), so make sure that they get the
patched file.

@martinpitt
Copy link
Member Author

packit srpm failed with this:

ValueError: '/tmp/tmp48d6s1r0/cockpit-podman-49.1.5.gaedec28.tar.xz' is not in the subpath of '/tmp/tmp48d6s1r0/packaging' OR one path is relative and the other is absolute.

It already failed the same way in my previous attempt when I dropped specfile_path:. I put that back as I thought it might maybe require it (even though the docs say that it's optional), but that didn't help.

@lachmanfrantisek, @TomasTomecek : What am I doing wrong here? This PR is actually meaning to go towards the approach that packit wants, i.e. we want to reduce our packit.yaml. I.e. I'm happy to structure this otherwise, in some "that's the standard way". Thank you in advance!

@martinpitt
Copy link
Member Author

I changed the approach to not leave the generated .spec file in the tree, it might confuse packit.

@martinpitt
Copy link
Member Author

Nope, still won't budge. Somehow packit really doesn't like a spec file which is not in the project root dir?

@@ -1,14 +1,12 @@
upstream_project_url: https://github.com/cockpit-project/cockpit-podman
# enable notification of failed downstream jobs as issues
issue_repository: https://github.com/cockpit-project/cockpit-podman
specfile_path: cockpit-podman.spec
Copy link
Member Author

Choose a reason for hiding this comment

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

See https://github.com/packit/packit-service/issues/1511 -- there's a bug that propose-downstream fails without an explicit specfile_path:, so we'll most likely have to bring that back anyway (with a bug ref). That will surface when testing the releasing, but until then we first need to sort out the packit srpm build.

@martinpitt
Copy link
Member Author

Same issue in cockpit-project/cockpit#17450. I can reproduce this locally with packit srpm, will have a look after lunch.

@martinpitt
Copy link
Member Author

@lachmanfrantisek, @TomasTomecek : Isolated, reproduced, filed packit/packit#1621 about it.

@martinpitt
Copy link
Member Author

Still fails srpm build, I followed up to packit/packit#1621

@martinpitt
Copy link
Member Author

The packit issue was fixed, so let's try this again.

@martinpitt
Copy link
Member Author

Argh, this is still broken. I can reproduce this locally:

❱❱❱ packit srpm
2022-08-31 17:37:51.075 command_handler.py INFO   Nothing to clean.
2022-08-31 17:37:51.075 utils.py          ERROR  Preparation of the repository for creation of an SRPM failed: Specfile /var/home/martin/upstream/cockpit-podman/cockpit-podman.spec not found on ref spec.

So it seems that once again violates the "Else recursively search the tree and use the first spec file found." documentation.

❱❱❱ find -name '*.spec'
./packaging/cockpit-podman.spec

Give up on .spec.in and directly keep the .spec in git. This aligns a
lot better with what packit wants to do, and avoids having explicit
`post-upstream-clone:` actions.

We still want to build tarballs with a correct .spec (for using with
`rpmbuild -tb` and VM image preparation), so make sure that they get a
patched file with correct Version:.
@martinpitt
Copy link
Member Author

Not important, and not worth the hassle.

@martinpitt martinpitt closed this Jul 3, 2023
@martinpitt martinpitt deleted the spec branch July 3, 2023 04:21
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.

None yet

1 participant