-
Notifications
You must be signed in to change notification settings - Fork 119
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
Publish .deb packages to Cloudsmith #49
Comments
Thanks! We're evaluating whether https://cloudsmith.io can serve us better, how exactly could I find out whether it supports what you need? I'm not sure what to look for. |
I looked at this cloudsmith doc page but I am not able to tell from this. I also tried to find a working example from cloudsmith but was unsuccessful. Maybe have a look at the structure of the debian repo of Jitsi: and their installation instructions. This is how it should look like. Especially this Release or InRelease (the signed version) files are what I am looking for. Bonus if you start signing your packages and distribute the gpg-key over a channel where a service like cloudsmith can not interfer, for example directly from caddyserver.com. |
Alright, well we have our latest version uploaded to cloudsmith if you'd like to give it a shot. https://cloudsmith.io/~caddy/repos/caddy/setup/#formats-deb I can't figure out how to download the I do see this when I
Re signing, see #42. Cloudsmith automatically signs releases we upload, you can find the GPG key in the link above. They do give us the option to upload our own GPG key (@mholt does have one he typically uses for signing commits) but uploading the private key seems like a bad idea. We could make Github sign them maybe, but we had trouble with that in the past when we tried to enable it for https://github.com/goreleaser/goreleaser which is the tool we use to build everything (including the |
Folks: Happy to help with questions over here! ;) You can contact support via Intercom at anytime too. |
Thanks @lskillen I have no idea how I didn't hit that one, I tried all kinds of similar combinations 🙈 |
Ha! It can be inscrutable unless you know what you're looking for. We have (short-term) plans to add a simple file listing index view for things like the debian (and other) indexes, but documenting helps. To break it down: https://dl.cloudsmith.io/public/caddy/caddy/deb/ubuntu/dists/focal/InRelease Parts defined by Cloudsmith:
Parts defined by Debian:
From the https://dl.cloudsmith.io/public/caddy/caddy/deb/ubuntu/dists/focal/main/binary-amd64/Packages Finally, and a bit weirdly, the We'll see about adding this additional detail to the documentation, since it's useful to know for exploring! Reference: https://wiki.debian.org/DebianRepository/Format Aside: If you'd like to control the keys, uploading your own private key is the way to go. It's what other companies distributing at-scale are doing, who either sell their products, or at least want to stamp their brand/name onto it. Typically they'll use both custom domains plus custom keys for distribution. It doesn't have to be the master key though, you can create subkeys for signing that are separately revokable from the master key: https://wiki.debian.org/Subkeys |
So those are the Properties right now:
Maybe you can set For the installation instructions I would recommend using the manual instructions on the Caddy installation guide as it is bad practice to download some script and pipe it to sh. And also maybe combine it for ubuntu with a bash part that extracts the codename from |
Changing the The way that most people deal with separate release channels is to use multiple repositories; e,g. instead of You certainly can just the built-in key too. The private key is stored encrypted on our side, and it doesn't change unless you tell Cloudsmith to rotate the key (or upload your own one). Although we always keep the old keys for reference, so that we can continue to service packages signed with an older key. The latest key is always the one used for signing metadata. |
That's great @lskillen, thanks for the rundown.
Yeah, I think having it in https://help.cloudsmith.io/docs/debian-repository would be great. It's where I looked first to try and figure out the structure.
Yeah that's the plan, once we've got everything in place.
Interesting, yeah we might do that. Right now, we skip uploading to gemfury on releases with a special tag (see https://github.com/caddyserver/caddy/blob/937ec342010894f7a6239883b10f6a107ff82c9f/.github/workflows/release.yml#L76) but we could upload to a separate repo for those pretty easily instead.
Right, okay. FYI @mholt ☝️ I'll let you decide how you want to handle that. |
Alright I just made these repos:
And I deleted the Might rename |
Sorry closed to fast, I keep this open until the install instructions are updated. |
Okay I just renamed the other one to
I hope to get everything sorted with @mholt's help before v2.3 is released (probably next week I think?) |
@lskillen caddyserver/caddy#3941 FYI if you'd like to take a peek? I opted to use the CLI tool directly rather than using the cloudsmith github action, because we have a bunch of files to upload and it seemed easier to do that way. I've been setting Edit: Nevermind, I read https://help.cloudsmith.io/docs/supported-formats and I see that I need to do |
@lskillen it seems that uploading a custom GPG key requires a paid plan? We planned on using the free tier, as Caddy is an open source project. Looking at https://cloudsmith.io/~caddy/repos/stable/settings/, I see:
|
Checked out caddyserver/caddy#3941 and it looks good to me. 👍 No issues with not using the GitHub action. We're (in the new year) going to release a "Setup CLI" action that preps an environment for you, but you're certainly free to roll your own. For the custom GPG key, no sweat. It works because, by default, we offer Team-based plan features and free storage/bandwidth to all OSS projects. When a project wants/needs a feature from our Velocity+ range of features, we do that via (slightly more formal) sponsorship. This is nothing crazy, and we don't make you sign anything; it just means we'd appreciate your help for promoting Cloudsmith in return for the free goodness. An example is a blog post, a more prominent linking back / endorsement, or occasional social media tweets; once you're happy! We're pretty flexible, and our marketing team is ultra-nice. :-) You can read more about it here: No matter what, I've enabled the custom GPG key support for the Caddy project already, for you. We also treat everyone as if they're a paying customer too, regardless of how they use Cloudsmith. |
@lskillen That's very generous -- thank you. We'd be happy to promote Cloudsmith as our preferred distributor for our Debian packages. We'll get a badge added to the README as soon as we get a chance (kind of swamped catching up on things over the holidays, and prepping the 2.3 release which I hope will use Cloudsmith.) |
Added the attribution in the README to my PR: https://github.com/caddyserver/caddy/pull/3941/files?short_path=b335630#diff-b335630551682c19a781afebcf4d07bf978fb1f8ac04c6bf87428ed5106870f5 |
As a test run, we released the .deb for |
Alright, we got signed builds of Caddy https://cloudsmith.io/~caddy/repos/testing/packages/ (that's the testing repo, stable release coming in the next few days) Only loose end to tie up is updating the docs to recommend using Cloudsmith instead of Gemfury. |
@lskillen the install instructions we think we'll go with for https://caddyserver.com/docs/download
My concern is with the So I have a feature request; would it be possible to make Like I'd expect to see this in the list file:
It would be better for UX; users might be confused seeing |
🚀 Ha! We were talking about that just yesterday with someone else. It partially works now, in that you can specify:
Just that the distribution part, or
We'll be looking to see if we can support using |
Cool, yeah that helps. Would be great if omitting the query would have that same behaviour 👍 |
Not a bad idea! I'm sure there are caveats that I haven't thought through, so I'd need to check with the team. You'll probably not be too surprised to know that package management is filled with caveats and odd edge-case behaviour that makes handling things universally, a lot of "fun". 😂 Our job is smooth over those, though! |
@lskillen Thanks for being so great to work with so far -- appreciate your help. Getting set up was a breeze. |
Glad to hear it, and you're very welcome! The team is very excited about having you on-board. Looking forward to helping you with package management for 2021 and beyond. 😁 If there's anything we can do to help, just shout here or Intercom (latter probably easier since you'll get access to the full team). Other than that, hope y'all have a Happy New Year! |
Alright, this is done! Closing. https://github.com/caddyserver/caddy/releases/tag/v2.3.0 https://caddyserver.com/docs/install#debian-ubuntu-raspbian To switch from Gemfury, you just need to delete your old list file, then use the steps above:
|
For anyone coming across this and searching for the correct setup in unattended-upgrades in Ubuntu 20.04:
As Debian 10 has the Origins-Pattern section in this file per default, the solution there is:
|
Hi!
so the issue is with the Debian ppa on gemfury.
It provides no InRelease or Release file. This file must contain a origin field (and maybe some others) so that unattended-upgrades can reference this as a "source" to which the auto updates are applied.
In Detail:
The Debian Repository Format specifies that there should be a InRelease file and in this file there are among others the optional fields:
Unattended-upgrades is configured in the
/etc/apt/apt.conf.d/50unattended-upgrades
file. This file has two relevant sections like this:In the first one its of the form
"<origin>:<archive>"
and in the second oneorigin
,codename
,label
andarchive
can be used. I am not exactly sure but I think archive is the same as Suite in the InRelease file.The info about unattended-upgrades is from this blog post since the original wiki entry is not so detailed.
So initially this is just the issue with the missing InRelease/Release file but I can see how this turns out to be a bigger thing that might require a move away from gemfury. I don't know how you handle this stuff, I am not a Debian packaging pro, I just stumbled over this stuff while trying to setup and understand unattended-upgrades.
I am curious hearing what you think about that.
Best
Daniel
The text was updated successfully, but these errors were encountered: