Skip to content

Build deb with dovecot delay patch #249

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

Closed
hagenest opened this issue Mar 25, 2024 · 10 comments · Fixed by #270
Closed

Build deb with dovecot delay patch #249

hagenest opened this issue Mar 25, 2024 · 10 comments · Fixed by #270
Assignees

Comments

@hagenest
Copy link
Contributor

hagenest commented Mar 25, 2024

We need a deb with dovecot with the patch for #72 included.

I first tried doing this at build.opensuse.org - but building debs with tons of additional backports from debian doesn't seem to be supported there - or at least not at all documented.

We now have (at least) 2 options:

  • Build in the OBS anyway, but with dovecot-main + patch
    • Pro: We automatically get a PPA, relatively easy
    • Con: We build a bleeding-edge package for older dependencies in debian, this could lead to much more work in the long run
  • Build the deb in the GitHub CI => Host a PPA on page.deltachat
    • Pro: We can easily fork the package from Debian
    • Con: We have to provide a PPA by ourself.

IMO option 2 would be the preferable option, at least until we decide to move chatmail to nixos 😆
Will implement the building part now, we have to see how we best provide a repository then

@hagenest hagenest self-assigned this Mar 25, 2024
@link2xt
Copy link
Contributor

link2xt commented Mar 25, 2024

We have forked Debian repo at https://github.com/chatmail/dovecot
For option 2 this only needs GitHub action added.

@hagenest
Copy link
Contributor Author

any ideas how we best provide a repository?

@link2xt
Copy link
Contributor

link2xt commented Mar 25, 2024

I don't actually get what the problem with the first option is. Does build.opensuse.org support only the latest Debian version?

@hagenest
Copy link
Contributor Author

This may sound stupid, but after your last message I searched again for some kind of documentation and now I got it. I tried to build the package like described here: https://www.sidorenko.io/post/2016/05/build-packages-with-openbuild-service/

This did not work - but I now found this page (which for some reason doesn't seem indexed by search engines): https://en.opensuse.org/openSUSE:Build_Service_Debian_builds

And this explanation actually works :) So yeah, I'm now all in favor of the first option again.
Apologies for being very confidently incorrect when opening this issue 😅

@hagenest
Copy link
Contributor Author

hagenest commented Apr 2, 2024

Hooray, we have a deb and repo: https://download.opensuse.org/repositories/home:/deltachat/Debian_12/

https://build.opensuse.org/package/show/home:deltachat/

Here is the explanation for adding the repo, I'll add instructions tomorrow: https://en.opensuse.org/openSUSE:Build_Service_Debian_builds#Adding_repository_signing_key

@hpk42
Copy link
Contributor

hpk42 commented Apr 3, 2024

https://build.opensuse.org/package/show/home:deltachat/ gives 404
and i still don't quite get what is the source for https://download.opensuse.org/repositories/home:/deltachat/Debian_12/

the input flowing into the build-process there should be committed into a separate "deltachat/debian-builds" one with a proper README -- along with being explicit what kind of permissions/passwords are neccessary.
Ideally, a 3rd party should be able to build their own debian-packages (without opensuse) and use that for their chatmail service.

@hagenest
Copy link
Contributor Author

The obs is doing odd things - it automatically creates a signing key, but does not sign the deb. The docs imply that it should do that. I'll ask around in the obs matrix channel; until I get a reply this is issue is blocked.

We can use the deb, but for that we would have to disable the signing check in apt and that doesn't seem a reasonable solution.

@link2xt
Copy link
Contributor

link2xt commented Apr 10, 2024

I always thought Debian solution is usually to sign repositories, not individual .deb files, at least for official repositories. When I compiled Dovecot manually, I just installed it with dpkg without any signing at all.

There is a Release.gpg signature for the whole repo, it contains checksums for Packages file which contains checksums for .deb packages.

@hagenest
Copy link
Contributor Author

okay, now it finally works. @link2xt, you are correct. And I finally found out how to add the repository. and the key in a way that debian likes. Apparently using apt-add-repository, editing /etc/apt/sources.list.d/obs.sources or creating a new sources file does not work. But creating /etc/apt/sources.list works.

So, here are the steps:

Add our signing key to the apt keyring

curl https://build.opensuse.org/projects/home:deltachat/signing_keys/download?kind=gpg | sudo gpg --dearmor -o /etc/apt/keyrings/obs-home-deltachat.gpg

Add to /etc/apt/sources.list:

deb [signed-by=/etc/apt/keyrings/obs-home-deltachat.gpg] https://download.opensuse.org/repositories/home:/deltachat/Debian_12/ ./

Install dovecot 🥳

sudo apt update
sudo apt install dovecot-core

@hagenest
Copy link
Contributor Author

happy to announce that we now have an ARM build for dovecot too :) There is a debian runnner for ARM in the OBS, it's just that the docs are wrong, lol

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 a pull request may close this issue.

3 participants