-
Notifications
You must be signed in to change notification settings - Fork 49
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
propose-upstream does not adjust the spec's Version: #1515
Comments
I filed #223 in the past, although your issue is very concrete. The best practice so far is to manually adjust If this |
No. The per-job description of actions can be found here: https://packit.dev/docs/actions/#propose-downstream-command
Anaconda is on the same boat here and we already made a few changes on this front (e.g. packit/packit#1413). (And I must say it's really hard to do correctly to avoid any circular dependencies between steps done during propose-downstream. And be consistent between CLI and service.) On a more constructive note:
|
I think so -- at least the builtin default does the right thing for COPR, i.e. replace the spec's
Right, but if it contains it, then I feel this should be preferred to the version in the cloned git? These days, most upstream projects don't keep the git-tracked spec up to date with the version, that's outright impossible with COPRs from PRs even. Do you think it would be possible to apply the normal "search for a .spec file" approach in the upstream tarball for propose-downstream first, and only then fall back to all the |
OK, so we have basically three action items:
|
Last update of the action items:
|
Maybe call this Figure out some way, so that by default this actions doesn't do anything, and it's run only if requested by the user or defined. This way we could maintain backwards compatibility. |
Regarding the syntax, we have multiple options:
The person who will work on this will see what is better to use. |
Hi, I was looking into the If I understand correctly, the real problem here is that the archive we try to get is not correct. But checking how you create the specfile in Would it be possible for you to use in Source0 the version macro maybe? Or do you still think providing something similar to |
Absolutely, yes, thanks for spotting! That also explains why we don't run into this problem in e.g. c-podman. Its spec file uses the version macro in the way you mention:
and does the upstream-side templating through this indirection:
I'll try the same for cockpit. If that works, I think we can close this -- indeed my initial "Ideally packit would take cockpit.spec from the downloaded release tarball -- everything is correct there" proposal is difficult due to the chicken-and-egg problem. Thanks @lbarcziova ! |
Great! Let me know if there will be any problems after this change and in that case we can still implement some action. |
@lbarcziova ! Works! cockpit-project/cockpit#17450 Thanks for your help! |
Source0 can and should be constructed from the `%{version}` macro. This will allow packit to download the correct source tarball on releases. This is the approach that we already do in c-podman and friends. Revert the hack from 7f996df, and drop the now unnecessary `@PATH@` handling from create-spec. Fixes packit/packit-service#1515
Source0 can and should be constructed from the `%{version}` macro. This will allow packit to download the correct source tarball on releases. This is the approach that we already do in c-podman and friends. Revert the hack from 7f996df, and drop the now unnecessary `@PATH@` handling from create-spec. Fixes packit/packit-service#1515
Source0 can and should be constructed from the `%{version}` macro. This will allow packit to download the correct source tarball on releases. This is the approach that we already do in c-podman and friends. Revert the hack from 7f996df, and drop the now unnecessary `@PATH@` handling from create-spec. Fixes packit/packit-service#1515
We tried to use packit for Fedora with cockpit, using this packit.yaml. Aside from the already filed hacks (#1505 and packit/packit#1560), we have this hack:
We need this because our git repo does not contain a cockpit.spec, it needs to be built from a template. This works fine for COPR builds, but not for propose_downstream -- the release failed like this:
So apparently that "fix spec file" magic does not get applied to propose_downstream stage?
Ideally packit would take cockpit.spec from the downloaded release tarball -- everything is correct there. I tried to drop post-upstream-clone, and propose_downstream immediately failed with "no spec file", so that doesn't work.
After some 10 other approaches which failed, I now have this hack:
to build the checkout's cockpit.spec with the expected version number.
With that hack, it worked: proose-downstream log and created Fedora PR
So in summary, I found it really difficult to get propose-upstream working in this scenario (spec file needs to be built). Is there some best practice here?
The text was updated successfully, but these errors were encountered: