caddyserver / dist

Resources for packaging and distributing Caddy
Apache License 2.0
119 stars 118 forks source link

Problem with Cloudsmith Ubuntu,Debian repositories #112

Closed myazaki closed 8 months ago

myazaki commented 8 months ago

Hello,

I have been using the Ubuntu/Debian repositories for few year now without any issues. I followed this https://caddyserver.com/docs/install#debian-ubuntu-raspbian tutorial to got everything up and running. But for a couple of days I am getting following error when running sudo apt update:

N: Skipping acquire of configured file 'main/binary-i386/Packages' as repository 'https://dl.cloudsmith.io/public/caddy/stable/deb/debian any-version InRelease' doesn't support architecture 'i386'

I am on Ubuntu 22.04.4 LTS x86_64.

caddy-stable.list looks like this:

# Source: Caddy
# Site: https://github.com/caddyserver/caddy
# Repository: Caddy / stable
# Description: Fast, multi-platform web server with automatic HTTPS

deb [signed-by=/usr/share/keyrings/caddy-stable-archive-keyring.gpg] https://dl.cloudsmith.io/public/caddy/stable/deb/debian any-version main

deb-src [signed-by=/usr/share/keyrings/caddy-stable-archive-keyring.gpg] https://dl.cloudsmith.io/public/caddy/stable/deb/debian any-version main

I have tried to specify the architecture in the brakets adding "arch=amd64," but it does not work with publickey. What am I missing?

Many thanks in advance

mholt commented 8 months ago

I actually just had this problem too.

Cloudsmith's official install instructions work (the one that involves piping into bash) -- I think their manual ones look different too -- maybe we need to update our docs with the new manual steps.

myazaki commented 8 months ago

Strange I followed the recommended settings here https://cloudsmith.io/~caddy/repos/stable/setup/ and got into the same situation, probably need to change the storage of GPG keys:

> sudo curl -1sLf \
> 'https://dl.cloudsmith.io/public/caddy/stable/setup.deb.sh' \
> | sudo -E bash
Executing the  setup script for the 'caddy/stable' repository ...

   OK: Checking for required executable 'curl' ... 
   OK: Checking for required executable 'apt-get' ... 
   OK: Detecting your OS distribution and release using system methods ...
 ^^^^: ... Detected/provided for your OS/distribution, version and architecture:
 >>>>:
 >>>>: ... distro=ubuntu  version=22.04  codename=jammy  arch=x86_64  
 >>>>:
   OK: Checking for apt dependency 'apt-transport-https' ... 
   OK: Checking for apt dependency 'ca-certificates' ... 
   OK: Checking for apt dependency 'gnupg' ... 
  RUN: Importing 'caddy/stable' repository GPG keys ...gpg: WARNING: unsafe ownership on homedir '/home/tom/.gnupg'
   OK: Checking for apt signed-by key support ...
   OK: Importing 'caddy/stable' repository GPG keys ...
   OK: Checking if upstream install config is OK ... 
   OK: Installing 'caddy/stable' repository via apt ... 
   OK: Updating apt repository metadata cache ... 
   OK: The repository has been installed successfully - You're ready to rock!

sudo apt update

N: Skipping acquire of configured file 'main/binary-i386/Packages' as repository 'https://dl.cloudsmith.io/public/caddy/stable/deb/ubuntu jammy InRelease' doesn't support architecture 'i386'
myazaki commented 8 months ago

did not work even with a manual install method from here https://cloudsmith.io/~caddy/repos/stable/setup/ :-/

francislavoie commented 8 months ago

See also https://github.com/caddyserver/caddy/issues/6121

/cc @lskillen in case you have any insight on what might've changed?

myazaki commented 8 months ago

See also caddyserver/caddy#6121

/cc @lskillen in case you have any insight on what might've changed?

@mohammed90 solution from caddyserver/caddy#6121 helped to resolve my issue as well.

lskillen commented 8 months ago

See also caddyserver/caddy#6121

/cc @lskillen in case you have any insight on what might've changed?

@francislavoie Yeah, this seems related to some optimization work to reduce the empty indexes generated on the server-side (i.e. if there are no i386 packages then it won't generate those indexes anymore). However, some versions of apt try to request from a standard list of architectures (e.g., 32-bit even if the architecture is 64-bit, since it's still possible to execute them, and the config list hasn't been pinned to one architecture) by default. I'm assuming you don't want i386 packages (:grin:) so I think what I'll get the team to do on our side is to ensure we generate an empty i386 index, and then work out how we can (maybe) instrument the config list automatically with architecture.

francislavoie commented 8 months ago

Perfect, thanks for confirming it's an issue on your side :+1: we weren't sure if we were doing something wrong

lskillen commented 8 months ago

Perfect, thanks for confirming it's an issue on your side 👍 we weren't sure if we were doing something wrong

@francislavoie / @mholt Should be fixed now (empty i386 indexes generating). 💯 We've also created a ticket for automatic selection of architecture, although this won't apply if you've got manual instructions (which is fine, but just wanted to highlight it!)

francislavoie commented 8 months ago

Thank you!

mholt commented 8 months ago

Thank you so much for your continued support @lskillen !