aptly icon indicating copy to clipboard operation
aptly copied to clipboard

Only main component from ubuntu repo gets published to S3 bucket

Open UglyAnimal opened this issue 5 months ago • 2 comments

Hello,

I try to make a mirror of ubuntu focal and publish it to S3 bucket. I run following commands:

gpg --no-default-keyring --keyring trustedkeys.gpg --keyserver keyserver.ubuntu.com --recv-keys 3B4FE6ACC0B21F32 871920D1991BC93C
aptly mirror create -architectures=amd64 ubuntu-focal-main http://fi.archive.ubuntu.com/ubuntu focal main
aptly mirror update ubuntu-focal-main
aptly mirror create -architectures=amd64 ubuntu-focal-restricted http://fi.archive.ubuntu.com/ubuntu focal restricted
aptly mirror update ubuntu-focal-restricted
aptly snapshot create ubuntu-focal-main-$(date +%Y%m%d) from mirror ubuntu-focal-main
aptly snapshot create ubuntu-focal-restricted-$(date +%Y%m%d) from mirror ubuntu-focal-restricted
aptly snapshot merge ubuntu-focal-all-$(date +%Y%m%d) ubuntu-focal-main-$(date +%Y%m%d) ubuntu-focal-restricted-$(date +%Y%m%d)
aptly publish snapshot ubuntu-focal-all-$(date +%Y%m%d) s3:ubuntu-mirror-sandbox:

Only main component gets published to S3 bucket. Restricted component is not published.

If i try to use -component to upload also restricted, it fails with error:

aptly publish snapshot -component=main,restricted ubuntu-focal-all-$(date +%Y%m%d) s3:ubuntu-mirror-sandbox:
ERROR: unable to publish: snapshot with name s3:ubuntu-mirror-sandbox: not found

This results in following error when try to run apt update:

W: Skipping acquire of configured file 'restricted/binary-amd64/Packages' as repository 'https://URLHERE focal InRelease' doesn't have the component 'restricted' (component misspelt in sources.list?)
W: Skipping acquire of configured file 'restricted/i18n/Translation-en_US' as repository 'https://URLHERE focal InRelease' doesn't have the component 'restricted' (component misspelt in sources.list?)
W: Skipping acquire of configured file 'restricted/i18n/Translation-en' as repository 'https://URLHERE focal InRelease' doesn't have the component 'restricted' (component misspelt in sources.list?)
W: Skipping acquire of configured file 'restricted/cnf/Commands-amd64' as repository 'https://URLHERE  focal InRelease' doesn't have the component 'restricted' (component misspelt in sources.list?)

I have following in /etc/apt/sources.list:

deb [signed-by=/etc/apt/trusted.gpg.d/aptly.gpg] https://URLHERE focal main restricted

Aptly version is:

aptly@ubuntu:~$ aptly version
aptly version: 1.6.2

Ubuntu version:

root@ubuntu:~# cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=20.04
DISTRIB_CODENAME=focal
DISTRIB_DESCRIPTION="Ubuntu 20.04.6 LTS"

UglyAnimal avatar Jul 09 '25 13:07 UglyAnimal

This worked just fine:

aptly publish snapshot -component=main,restricted ubuntu-focal-main-$(date +%Y%m%d) ubuntu-focal-restricted-$(date +%Y%m%d) s3:ubuntu-mirror-sandbox:

So how can I publish merged snapshot with main and restricted components to S3? Is it even possible?

UglyAnimal avatar Jul 10 '25 09:07 UglyAnimal

This worked just fine:

aptly publish snapshot -component=main,restricted ubuntu-focal-main-$(date +%Y%m%d) ubuntu-focal-restricted-$(date +%Y%m%d) s3:ubuntu-mirror-sandbox:

So how can I publish merged snapshot with main and restricted components to S3? Is it even possible?

From the doc

By default, aptly mirrors all components from remote repository and merges them into one “single component”. If we’d like to preserve package split by components, individual mirrors should be created for each component:

So it is not possible to have a "merged" snapshot and publish it preserving components.

alguimodd avatar Jul 10 '25 13:07 alguimodd