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 support of CentOS Stream 9 #2085
Conversation
Build failed. ✔️ pre-commit SUCCESS in 7m 27s |
Build failed. ✔️ pre-commit SUCCESS in 1m 38s |
b2ad744
to
01a3317
Compare
Build failed. ✔️ pre-commit SUCCESS in 1m 27s |
@mfocko Please let me know when you need to test your patch in field. I have nispor packages ready for ship new version to CentOS stream. |
Build failed. ✔️ pre-commit SUCCESS in 1m 29s |
@cathay4t I think you should be able to test… Few things first though:
|
Build failed. ✔️ pre-commit SUCCESS in 1m 30s |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me! Thanks both of you!
Let's try this on stage 🚀
@property | ||
def pkg_tool(self) -> str: | ||
"""Returns the packaging tool. Prefers the package-level override.""" | ||
return self.package_config.pkg_tool or self.config.pkg_tool |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't you think package-level
might be an overloaded term here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure I understand :D Do you mean the confusion between package as in packaging tool vs Packit config?
config["lookaside"], | ||
config["lookaside_cgi"], | ||
|
||
class LookasideCache: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Btw. A really nice refactoring!
My packit CLI is installed via Using this config: ---
downstream_package_name: nispor
upstream_project_url: https://github.com/nispor/nispor
issue_repository: https://github.com/nispor/nispor
update_release: false
upstream_package_name: nispor
upstream_tag_template: v{version}
copy_upstream_release_description: false
actions:
post-upstream-clone:
- bash -c "cp /tmp/nispor.spec ./"
jobs:
- job: propose_downstream
trigger: release
pkg_tool: centpkg
dist_git_branches:
- c9s I invoked I still get error: Full debug can be found in https://gist.github.com/cathay4t/a75b04dbcb79ef300bcac0a2351554f3 |
@cathay4t thanks for trying. You didn't get a parsing error so you should have the correct Packit installed. I'll wait for Matěj about the issue itself. Next time, you can also use the RPM builds produced by Packit itself, e.g. https://dashboard.packit.dev/results/copr-builds/1016150
|
Oh, I know! I'm an idiot… it must be taken from the job config! |
Introducing new `dist_git_branches` -- `c9s` for CentOS stream 9 downstream build. To make it work, you need store gitlab token in `~/.config/packit.yml`, like: ```config authentication: gitlab.com: token: glpat-<secrets> ``` You need to run packit in the upstream git repo with command: ```bash packit --config ~/packit_ds_nispor.yml propose-downstream ``` Example packit.yml(since nispor has no spec in upstream tarball, we use /tmp/nispor.spec for test purpose): ```yml --- downstream_package_name: nispor upstream_project_url: https://github.com/nispor/nispor issue_repository: https://github.com/nispor/nispor update_release: false upstream_package_name: nispor upstream_tag_template: v{version} copy_upstream_release_description: false actions: post-upstream-clone: - bash -c "cp /tmp/nispor.spec ./" jobs: - job: propose_downstream trigger: release dist_git_branches: - c9s - fedora ``` Signed-off-by: Gris Ge <fge@redhat.com> (cherry picked from commit 1d74e96)
OK, I've been testing it locally… using the job config from the CLI feels like a no-go for the complexity of ---
downstream_package_name: nispor
upstream_project_url: https://github.com/nispor/nispor
issue_repository: https://github.com/nispor/nispor
update_release: false
upstream_package_name: nispor
upstream_tag_template: v{version}
copy_upstream_release_description: false
actions:
post-upstream-clone:
- bash -c "cp /tmp/nispor.spec ./"
packages:
nispor-fedora: {}
nispor-centos:
pkg_tool: centpkg
jobs:
- job: propose_downstream
trigger: release
packages: [nispor-fedora]
dist_git_branches:
- fedora
- job: propose_downstream
trigger: release
packages: [nispor-centos]
dist_git_branches:
- c9s @cathay4t Could you please try with this? (I got to this; feel free to close and verify that you don't upload the same archive to lookaside cache). |
Build failed. ✔️ pre-commit SUCCESS in 9m 39s |
Follow-up to packit/packit#2085 Related to CentOS Stream support Signed-off-by: Matej Focko <mfocko@redhat.com>
self.dist_git_base_url: str = ( | ||
dist_git_base_url | ||
or (pkg_tool and DISTGIT_INSTANCES[pkg_tool].url) | ||
or getenv("DISTGIT_URL", DISTGIT_INSTANCES["fedpkg"].url) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd probably have a look at hardly, if it makes sense to default to the packaging tool from the user config, rather than the environment variable.
Allow overriding pkg_tool at the package level rather than being defined globally in user config. In case it is not defined, fall back to the global config. Related to the CentOS Stream support. Signed-off-by: Matej Focko <mfocko@redhat.com>
Factor out the dist-git information from separate variables Related to CentOS Stream support Signed-off-by: Matej Focko <mfocko@redhat.com>
Signed-off-by: Matej Focko <mfocko@redhat.com>
Factor out the lookaside cache code (just the one that uses directly the cache's API, or pyrpkg API) to a separate class that supports: * constructing the sources * checking for existing uploads Related to CentOS Stream support Signed-off-by: Matej Focko <mfocko@redhat.com>
Signed-off-by: Matej Focko <mfocko@redhat.com>
Co-authored-by: František Lachman <flachman@redhat.com> Signed-off-by: Matej Focko <mfocko@redhat.com>
oh… rev-dep tests, needs to be merged manually |
Build failed. ✔️ pre-commit SUCCESS in 1m 31s |
fix(c9s): update the constants from Packit TODO: Write new tests or update the old ones to cover new functionality. Update doc-strings where appropriate. Update or write new documentation in packit/packit.dev. Related to packit/packit#2085 Related to CentOS Stream support Merge after packit/packit#2085 Reviewed-by: František Lachman <flachman@redhat.com>
The MR you created to nispor centos stream looks good and merged. I tried for nmstate new release, still got error: https://gist.github.com/cathay4t/a6eea0f3dc73349e3817207614cb85b0 Somehow your packit enumerate all spec files in my filesystem With your PR, the packit.yaml is ugly than my original patch and not working any more. |
As the log shows, you are still using |
Hi, follow-up from the arch discussion:
If you hit any issue, feel free to ping me on Slack or create an issue :) |
It will be (in the ideal case) in production next week, but we still need to test this properly on stage in the meantime. But @mfocko wants to do a blog post with howto and a few warnings that it's really really fresh and not-battle tested..;) |
Based on the changes from the closed #2015
Signed-off-by: Gris Ge fge@redhat.com
(cherry picked from commit 1d74e96)
TODO:
packit/packit.dev
.RELEASE NOTES BEGIN
Packit now supports the
pkg_tool
option in the config (at the top-level or with specific packages when using the monorepo syntax). This option can be used for switching betweenfedpkg
orcentpkg
.RELEASE NOTES END