Skip to content

release-manager: reversion no longer carries the channel - #54

Open
dkijania wants to merge 1 commit into
mainfrom
dkijania/reversion-drop-suite
Open

dkijania wants to merge 1 commit into
mainfrom
dkijania/reversion-drop-suite

Conversation

@dkijania

Copy link
Copy Markdown
Member

Why

MinaProtocol/mina#19996 stopped writing Suite into the control file: the channel is the apt component, not part of the package, so the same .deb can move between channels unchanged. The reversion in release-manager still took a channel (suite, new_suite). It never changed Suite (the reversion --suite help said it did), but it did two other things with it:

  • rewrote a Distribution: line. Binary packages do not have this field, so this did nothing;
  • when the package had /usr/share/doc/<pkg>/changelog.Debian.gz or changelog.gz, replaced the whole changelog with one new entry that names the channel and the current time. The package bytes then depended on the channel and on when the reversion ran, and the package history was lost.

What changes

  • ReversionConfig and reversion_debian_package lose suite and new_suite. A reversion changes Package and Version only.
  • The Distribution: rewrite and the changelog rewrite are removed.
  • reversion --suite and persist --suite are removed. Nothing in this repo or in mina (compatible) passes them.
  • promote and publish-from-cache call the reversion without the channel. They still use the channel for publishing and verification.
  • publish still gives the channel to deb-s3 as --component and --suite. That --suite is the repository Release file, which is correct, so it stays.

Testing

  • cargo test: 128 pass (127 on main, plus test_control_content_keeps_every_other_field: Suite and Distribution stay as they are, only Version changes).
  • cargo fmt --check clean; cargo clippy --all-targets gives the same 12 warnings as main.
  • End to end: a package with Suite: unstable and a changelog.Debian.gz, reversioned 1.0.0 → 2.0.0, compared with deb-toolkit diff:
    • main with --suite stable: the changelog content changes to a single entry mina-x (2.0.0) stable; …; Suite stays unstable.
    • this branch: the changelog content is unchanged; Suite stays unstable; the only control change is Version.

Not covered (found while testing, not changed here)

  • The reversion rebuilds with plain dpkg-deb --build, without fakeroot. Run as a normal user, every file in the new package is owned by that user (seen: root:root → darek:darek). As root in CI this does not show. main has the same behavior.
  • persist --new-version cannot work: it runs bash -c "reversion …", and no reversion command exists any more. Also extract_version_from_deb returns the architecture, not the version, for a <name>_<version>_<arch>.deb name. Nothing calls persist, so this PR only removes its --suite.

🤖 Generated with Claude Code

Remove `suite`/`new_suite` from ReversionConfig and the `--suite` flags
of `reversion` and `persist`. They never changed the `Suite` field
(the help said they did). They did two other things:

- rewrote a `Distribution:` line, which binary packages do not have;
- replaced the whole changelog with one new entry naming the channel
  and the current time, so the package bytes depended on the channel
  and on when the reversion ran, and the package history was lost.

A reversion now changes `Package` and `Version` only. The channel is
the apt component (deb-s3 `--component`/`--suite` in publish, which
stays), not part of the package. This follows MinaProtocol/mina#19996,
which stopped writing `Suite` into the control file.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.

1 participant