aptly-dev / aptly

aptly - Debian repository management tool
https://www.aptly.info/
MIT License
2.54k stars 369 forks source link

Unable to get it working for Ubuntu Mantic - 404 error #1236

Closed vk6xebec closed 6 months ago

vk6xebec commented 6 months ago

Hello, I am unable to get this working for Ubuntu Mantic amd64.

I have tried various workarounds but I am not getting any joy. Most of the articles are old (2016 or architectures such as ARM).

This is what I have done so far

touch .aptly.conf
nano .aptly.conf 

aptly.conf file

  {
  "rootDir": "/home/qube/.aptly",
  "downloadConcurrency": 16,
  "downloadSpeedLimit": 0,
  "architectures": ["amd64"],
  "dependencyFollowSuggests": false,
  "dependencyFollowRecommends": false,
  "dependencyFollowAllVariants": false,
  "dependencyFollowSource": false,
  "dependencyVerboseResolve": false,
  "gpgDisableSign": true,
  "gpgDisableVerify": true,
  "gpgProvider": "gpg",
  "downloadSourcePackages": false,
  "skipLegacyPool": true,
  "ppaDistributorID": "ubuntu",
  "ppaCodename": "",
  "skipContentsPublishing": false,
  "FileSystemPublishEndpoints": {},
  "S3PublishEndpoints": {},
  "SwiftPublishEndpoints": {}
}

I ran these commands:

aptly mirror create ubuntu-mantic http://ports.ubuntu.com/ubuntu-ports/ mantic main

Success downloading http://ports.ubuntu.com/ubuntu-ports/dists/mantic/Release

Mirror [ubuntu-mantic]: http://ports.ubuntu.com/ubuntu-ports/ mantic successfully added.
You can run 'aptly mirror update ubuntu-mantic' to download repository contents.

aptly mirror update ubuntu-mantic

Downloading http://ports.ubuntu.com/ubuntu-ports/dists/mantic/Release...
Success downloading http://ports.ubuntu.com/ubuntu-ports/dists/mantic/Release
Downloading & parsing package files...
Downloading http://ports.ubuntu.com/ubuntu-ports/dists/mantic/main/binary-amd64/Packages.gz...
Error downloading http://ports.ubuntu.com/ubuntu-ports/dists/mantic/main/binary-amd64/Packages.gz: HTTP code 404 while fetching http://ports.ubuntu.com/ubuntu-ports/dists/mantic/main/binary-amd64/Packages.gz retrying...
Retrying 0 http://ports.ubuntu.com/ubuntu-ports/dists/mantic/main/binary-amd64/Packages.gz...
Giving up on http://ports.ubuntu.com/ubuntu-ports/dists/mantic/main/binary-amd64/Packages.gz...
Downloading http://ports.ubuntu.com/ubuntu-ports/dists/mantic/main/binary-amd64/Packages.xz...
Error downloading http://ports.ubuntu.com/ubuntu-ports/dists/mantic/main/binary-amd64/Packages.xz: HTTP code 404 while fetching http://ports.ubuntu.com/ubuntu-ports/dists/mantic/main/binary-amd64/Packages.xz retrying...
Retrying 0 http://ports.ubuntu.com/ubuntu-ports/dists/mantic/main/binary-amd64/Packages.xz...
Giving up on http://ports.ubuntu.com/ubuntu-ports/dists/mantic/main/binary-amd64/Packages.xz...
Downloading http://ports.ubuntu.com/ubuntu-ports/dists/mantic/main/binary-amd64/Packages...
Error downloading http://ports.ubuntu.com/ubuntu-ports/dists/mantic/main/binary-amd64/Packages: HTTP code 404 while fetching http://ports.ubuntu.com/ubuntu-ports/dists/mantic/main/binary-amd64/Packages retrying...
Retrying 0 http://ports.ubuntu.com/ubuntu-ports/dists/mantic/main/binary-amd64/Packages...
Giving up on http://ports.ubuntu.com/ubuntu-ports/dists/mantic/main/binary-amd64/Packages...
ERROR: unable to update: HTTP code 404 while fetching http://ports.ubuntu.com/ubuntu-ports/dists/mantic/main/binary-amd64/Packages

I have tried using -architectures=i386,amd64 -force-components -wth-udebs=true with no luck

(PS, I would like to use this repo to mirror https://ftp.kaist.ac.kr/ubuntu-ports/dists/jammy/main/)

What could I do to make it work and avoid the 404 error? I cannot find any amd64 compatible folder on the mirrors, unlike Debian's Bookwork release.

neolynx commented 6 months ago

Hi,

Looking into http://ports.ubuntu.com/ubuntu-ports/dists/mantic/main/, there is no amd64 architecture on that mirror. This is why aptly fails to download the Packages.gz.

Valid architectures of that mirror are arm64 and armhf for example:

$ aptly mirror create -architectures=armhf,arm64  ubuntu-mantic http://ports.ubuntu.com/ubuntu-ports/ mantic main
Downloading http://ports.ubuntu.com/ubuntu-ports/dists/mantic/InRelease...
Success downloading http://ports.ubuntu.com/ubuntu-ports/dists/mantic/InRelease
gpgv: can't allocate lock for '/var/lib/aptly/.gnupg/trustedkeys.gpg'
gpgv: Signature made Mon Oct 16 21:12:53 2023 UTC
gpgv:                using RSA key 871920D1991BC93C
gpgv: Good signature from "Ubuntu Archive Automatic Signing Key (2018) <ftpmaster@ubuntu.com>"

Mirror [ubuntu-mantic]: http://ports.ubuntu.com/ubuntu-ports/ mantic successfully added.
You can run 'aptly mirror update ubuntu-mantic' to download repository contents.

$ aptly mirror update ubuntu-mantic
Downloading http://ports.ubuntu.com/ubuntu-ports/dists/mantic/InRelease...
Success downloading http://ports.ubuntu.com/ubuntu-ports/dists/mantic/InRelease
gpgv: can't allocate lock for '/var/lib/aptly/.gnupg/trustedkeys.gpg'
gpgv: Signature made Mon Oct 16 21:12:53 2023 UTC
gpgv:                using RSA key 871920D1991BC93C
gpgv: Good signature from "Ubuntu Archive Automatic Signing Key (2018) <ftpmaster@ubuntu.com>"
Downloading & parsing package files...
Downloading http://ports.ubuntu.com/ubuntu-ports/dists/mantic/main/binary-armhf/Packages.gz...
Success downloading http://ports.ubuntu.com/ubuntu-ports/dists/mantic/main/binary-armhf/Packages.gz
Downloading http://ports.ubuntu.com/ubuntu-ports/dists/mantic/main/binary-arm64/Packages.gz...
Success downloading http://ports.ubuntu.com/ubuntu-ports/dists/mantic/main/binary-arm64/Packages.gz
Building download queue...
Download queue: 9310 items (10.39 GiB)
Downloading http://ports.ubuntu.com/ubuntu-ports/pool/main/m/mpg123/libmpg123-0_1.31.3-2_armhf.deb...