Skip to content

chore(cmdeploy/dovecot): add multi-dist/Debian trixie support - #1002

Open
j4n wants to merge 5 commits into
mainfrom
j4n/dovecot-multidist
Open

chore(cmdeploy/dovecot): add multi-dist/Debian trixie support #1002
j4n wants to merge 5 commits into
mainfrom
j4n/dovecot-multidist

Conversation

@j4n

@j4n j4n commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

This adds support for deploying dovecot for bookworm and trixie from the new paths merged in https://github.com/chatmail/dovecot/pulls/8, details see below.

@j4n
j4n requested a review from missytake June 5, 2026 16:10
@j4n
j4n force-pushed the j4n/dovecot-multidist branch from d746e93 to c8b9e72 Compare June 5, 2026 16:15
@j4n j4n changed the title dovecot: add multi-dist/Debian trixie support WIP: chore(cmdeploy/dovecot): add multi-dist/Debian trixie support Jun 5, 2026
@j4n
j4n force-pushed the j4n/dovecot-multidist branch 2 times, most recently from 39a960d to d61ff01 Compare June 5, 2026 21:42
@j4n j4n changed the title WIP: chore(cmdeploy/dovecot): add multi-dist/Debian trixie support chore(cmdeploy/dovecot): add multi-dist/Debian trixie support Jun 6, 2026
@j4n
j4n force-pushed the j4n/dovecot-multidist branch 3 times, most recently from 7af1b96 to be45292 Compare June 8, 2026 13:03
@j4n j4n mentioned this pull request Jun 8, 2026
@j4n
j4n force-pushed the j4n/dovecot-multidist branch from be45292 to b71ea6a Compare June 8, 2026 13:12
@j4n

j4n commented Jun 8, 2026

Copy link
Copy Markdown
Contributor Author

Ok, status on this:

  • We have started building the packages at https://github.com/chatmail/dovecot; the major change was that uploads now go to /dovecot/codename/version/*.deb and Github releases have a _codename.deb ending. I have manually created uploads for bookworm (hardlinked) and trixie and added the renamed files to the current Github release (incidentally closing Proposal: Always publish new builds on unique URLs dovecot#5).
  • This branch adds the multi-dist deploy code
  • The docker images are built for 12 and 13 upon pushes on this branch and run the cmlxc integration tests
  • The normal tests hinge on proper cmlxc support, which I hear is in the works but might take a bit longer, hence the tests here fail.

@j4n
j4n force-pushed the j4n/dovecot-multidist branch 5 times, most recently from 520a2ed to 7ab93f2 Compare June 11, 2026 08:56
@j4n

j4n commented Jun 11, 2026

Copy link
Copy Markdown
Contributor Author

Tried an upgrade scenario, cmdeploy run failes because of a Python version mismatch on the remove venv, added a commit that compares them and purges if necessary.

@j4n
j4n force-pushed the j4n/dovecot-multidist branch 3 times, most recently from 29aecca to 4c7b872 Compare June 29, 2026 13:45
@j4n

j4n commented Jun 29, 2026

Copy link
Copy Markdown
Contributor Author

To test this branch, just switch to it before deploying:

local $ ssh target
remote # git clone https://github.com/chatmail/relay && cd relay
remote relay/ # git checkout j4n/dovecot-multidist
# optionally, should normally not result in merge conflicts
remote relay/ # git rebase main
remote relay/ # cmdeploy run --ssh-host @local

or the equivalent if you work with a remote deploy.

@j4n
j4n force-pushed the j4n/dovecot-multidist branch from 4c7b872 to f8adfe3 Compare July 9, 2026 12:14
@j4n
j4n force-pushed the j4n/dovecot-multidist branch 2 times, most recently from 7e7bb66 to 1c36f47 Compare July 27, 2026 14:55
@j4n j4n self-assigned this Jul 31, 2026
@j4n
j4n force-pushed the j4n/dovecot-multidist branch 2 times, most recently from a79e8e0 to 72445ec Compare August 10, 2026 08:54
@j4n
j4n force-pushed the j4n/dovecot-multidist branch 3 times, most recently from 623ab2a to 33c85ff Compare August 10, 2026 11:41
@j4n

j4n commented Aug 17, 2026

Copy link
Copy Markdown
Contributor Author

This now also has the security backport packages from chatmail/dovecot#10

j4n added 5 commits August 17, 2026 14:01
Prevent Trixie from somehow pulling in dovecot 2.4 before we get to install.
- Install .debs via apt-get install instead of dpkg+fix-broken
- Package hashes are now keyed by (arch, codename, pkg):
  - download.delta.chat uploads now go to dovecot/{distro}/{version}/
  - GitHub release packages get a _{distro}.deb suffix to allow for
    combined releases.

Tests:
- updated to support this and add a test to check for the unsupported
  release version case
- fix make_host to accept extra args from Command fact
- assert single apt-get install command
`cmdeploy run` fails after system upgrade to Debian 13 with "Fatal Python
error: init_fs_encoding: failed to get the Python codec of the filesystem
encoding" indicating a Python version missmatch. Check for both versions and
remove old `remote_venv_dir` on mismatch to allow clean reinitialization by
subsequent pip.virtualenv().
- Fix dovecot package download URLs for new
  [release](https://github.com/chatmail/dovecot/releases/tag/upstream%2F2.3.21%2Bdfsg1-3%2Bchatmail2)
  with
    - debian-security backport for 12 CVEs
    - distro-specific suffix (+deb{release}u1), enabling a simplified
      primary URL path and combined github releases
- Use VERSION_ID from os-release as deb_release instead of codename
  mapping, reorder hash-dict to match Github release page
- Remove redundant parsing/validation, let function validate against hash dict
- Update test expectations and test new versioning derivation
@j4n
j4n force-pushed the j4n/dovecot-multidist branch from 33c85ff to a8028ea Compare August 17, 2026 12:01
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