fedora-rust / rust-update-set

Created 2 years ago
Maintained by salimma
A tool to simplify the process of updating a set of Rust packages
Members 3

rust-update-set tool

A tool to help Fedora Packagers update rust packages.

Fedora developers use a lot of time updating rust packages since there are often many missing crates at the beginning, or crates where the version in Fedora is too old. Updating spec file using rust2rpm requires some improvments including preserving additional patches, comments, macros, etc. Also, to update a package, we should make sure it will not introduce a transitive closure of dependent crates. rust-update-set tool was made to help (semi-)automate common workflows to save time and effort.

Description

rust-update-set is a Fedora Packager tool which tries to automate some common tasks like:

  • recursively check out all packages need to be updated or missing deps need to be packaged
  • preserve changes in old spec file when updating spec file using rust2rpm
  • check update compatibility and create packages with suffix when a transitive closure is introduced
  • automate parallel Copr builds of sets of packages in dependency order
  • chain-build all packages in Koji with requested side tag
  • merging and chain-building all packages across release branches
  • create compat crate rust-{crate}{older} when updating some packages will break other packages.
  • help review a rust update in Bodhi and verify no compatibility issue introduced

and more.

Usage

Update rust packages

$ rust-update-set update package_A package_B:version ...

This will recursively check out all packages need to be updated or created when trying to update package_A, package_B, etc. Changes from old spec files will be patched to new spec files and failures are expected in this process. Users need to double check when the patching fails or succeeds with warnings before pushing and building all packages. This will also do a update compatibility check, if some updated packages break other packages, a compat crate will be created with package name rust-{crate}{old_version}

Update other release branches

$ rust-update-set update --branch f36

This will update release branches for all packages by running 'git rebase rawhide'

Push changes to forked repos

$ rust-update-set push

This will fork repos, commit changes and push to forked repos. Failures are also expected when repos are already forked and ahead of origin commits. Users need to double check before building all packages. FIX: this is mostly for testing, can be amended to push to actual release repo

Push changes to release branches

$ rust-update-set push --branch f36

This will push updates to release branches for all packages by running 'git push'

Mockbuild new packages locally for testing new packages

$ rust-update-set mockbuild --release rawhide

This will mockbuild all new packages with release specified (default: rawhide) by running 'fedpkg --release RELEASE mockbuild' in package directory.

Create review for new packages

$ rust-update-set create-review

This will create Fedora Review for new pakcages by running 'fedora-create-review spec_file srpm_file' in package directory.

Request Repos/Branches for new packages and compat packages

$ rust-update-set request-repos
$ rust-update-set request-branches --all-release
$ rust-update-set request-branches f36

This will request repository and release branches for new packages and compat packages

Build all packages in Copr project

$ rust-update-set copr-build --copr-project project_name

This will specify an build order and build all packages in Copr project with name project_name. If the project does not exist, this command will also create a Copr project.

Chain-build all packages in Koji using fedpkg chain-build

$ rust-update-set chain-build

This will specify an build order and build all packages in Koji with a requested side tag using 'fedpkg request-side-tag' and 'fedpkg chain-build'

Chain-build release branches

$ rust-update-set chain-build --branch f36

This will specify an build order and build all packages in Koji with a requested side tag using 'fedpkg request-side-tag' and 'fedpkg chain-build'

Check compatibility without checking out repos

$ rust-update-set check package_A package_B:version

This will perform a compatibility check without checking out all repos. Users can use this command to check what packages should be updated as a whole set.

Check compatibility for a Bodhi update

$ rust-update-set bodhi-check --bodhi-id bodhi_update_id

This will perfrom a compatibility check for all builds within a bodhi update. Update reviewers can use this command to check if the update set will introduce transitive closure. This command will also show all compat crates inside the update set and results from repo query, which can be used for further manual compatibility review.