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

Packit: add jobs for downstream Fedora package builds #232

Merged
merged 1 commit into from
May 3, 2023

Conversation

lsm5
Copy link
Member

@lsm5 lsm5 commented Apr 28, 2023

Fixes: #231

@lsm5 lsm5 force-pushed the packit-downstream branch from d937085 to 4b6c7cc Compare April 28, 2023 16:04
Copy link
Contributor

@lachmanfrantisek lachmanfrantisek left a comment

Choose a reason for hiding this comment

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

👍

.packit.yaml Outdated Show resolved Hide resolved
@lsm5 lsm5 force-pushed the packit-downstream branch from ccfc6c2 to cbde9de Compare April 28, 2023 17:48
@lsm5 lsm5 marked this pull request as ready for review April 28, 2023 17:48
@lsm5
Copy link
Member Author

lsm5 commented Apr 28, 2023

@rhatdan let's get this in before you cut the next release

@lsm5
Copy link
Member Author

lsm5 commented Apr 28, 2023

+1

@lachmanfrantisek thanks for the review. I added your change too.

@lsm5 lsm5 marked this pull request as draft April 28, 2023 18:15
@lsm5
Copy link
Member Author

lsm5 commented Apr 28, 2023

hmm, the packit docs say by default it will modify the release in spec. Gotta set that to false.

@lsm5 lsm5 force-pushed the packit-downstream branch from cbde9de to 9ede6b3 Compare April 28, 2023 18:58
.packit.yaml Show resolved Hide resolved
@lsm5 lsm5 force-pushed the packit-downstream branch 14 times, most recently from 3c3c57b to 9fdef25 Compare May 2, 2023 19:09
@lsm5
Copy link
Member Author

lsm5 commented May 2, 2023

moved the spec file to rpm/ dir and set Version in it to 0 by default. Also added a helper script there for anyone looking to do local rpm builds with the latest tagged version.

The current version of the PR also allows setting Epoch differently on our copr (for copr_username: rhcontainerbot) and on koji. So, new rpm builds on copr and koji will not break existing users.

@lsm5 lsm5 force-pushed the packit-downstream branch from 9fdef25 to ce9da64 Compare May 2, 2023 19:27
Get rid of `container-selinux.spec.rpkg` in favour of
`rpm/container-selinux.spec` which gets synced with fedora dist-git on every
upstream release. The version in the new spec file is set to `0` by
default and gets updated by packit automatically on every packit task.

For local manual rpm builds using the spec, the helper script in the
`rpm/` subdir will update the Version field with the latest version
found in the upstream repo.

Packit will automatically create a PR on fedora dist-git on every new
upstream release. A sample PR will look like:
https://src.fedoraproject.org/rpms/container-selinux/pull-request/10#

A dry run for this can be triggered using:
`$ packit propose-downstream --local-content`

To run this command locally, you would need to have your packit
user-configuration-file set.
Ref: https://packit.dev/docs/configuration/#user-configuration-file

along with a fedora api key created at:
https://src.fedoraproject.org/settings#nav-api-tab with sufficient ACLs.

Fixes: containers#231

Co-authored-by: František Lachman <[email protected]>
Signed-off-by: Lokesh Mandvekar <[email protected]>
@lsm5 lsm5 force-pushed the packit-downstream branch from ce9da64 to be759f3 Compare May 2, 2023 19:28
@lsm5 lsm5 marked this pull request as ready for review May 2, 2023 19:36
@lsm5
Copy link
Member Author

lsm5 commented May 3, 2023

@lachmanfrantisek I made more changes to this PR to be in line with standard packit workflow. There's no more container-selinux.spec.rpkg now. The rpm/container-selinux.spec will now be synced with the container-selinux.spec in the official Fedora package once a new version is cut. Could you give it 1 final look please?

@lsm5
Copy link
Member Author

lsm5 commented May 3, 2023

@rhatdan PTAL. I guess this is good to go. The spec file in rpm/ subdir will be synced with the official fedora package via a PR like: https://src.fedoraproject.org/rpms/container-selinux/pull-request/10 that would need a human to review and merge. That's the only human step apart from monitoring bodhi updates.

If Frantisek has any further comments, I can work on those in a followup PR.

@rhatdan
Copy link
Member

rhatdan commented May 3, 2023

LGTM

@rhatdan rhatdan merged commit 10a6a27 into containers:main May 3, 2023
@lsm5 lsm5 deleted the packit-downstream branch May 4, 2023 12:51
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.

Packit: Use packit for bumping official fedora package
4 participants