有没有办法识别公共 APT 存储库的可用套件 / 组件 / 架构?

有没有办法识别公共 APT 存储库的可用套件 / 组件 / 架构?

一些提供商会提供公共 APT 存储库的基本 URL,并且禁止在 HTTP 文件服务器中列出目录。有没有办法了解他们提供哪些套件/组件/架构?

就像先获取 的内容dists/*,然后获取 的内容dists/<suite>/*,然后获取 的内容dists/<suite>/<component>/*

对于链接http://http.us.debian.org/debian/我想查看列表:

stable stretch testing sid

然后对于给定的套件我想要查看列表:

main contrib non-free

进而:

amd64 mips

一切都在这样的路径中:

http://http.us.debian.org/debian/dists/stretch/main/binary-arm64/

具有封闭目录列表的 repo 示例为:https://apt.releases.hashicorp.com

答案1

如果你了解该套件,并且仓库足够现代,则组件和体系结构将在InRelease文件中,例如,http://http.us.debian.org/debian/dists/bullseye-backports/InRelease(或Release旧存储库的未签名文件):

% curl -sL http://http.us.debian.org/debian/dists/bullseye-backports/InRelease | head -n 20
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Origin: Debian Backports
Label: Debian Backports
Suite: bullseye-backports
Codename: bullseye-backports
Changelogs: https://metadata.ftp-master.debian.org/changelogs/@CHANGEPATH@_changelog
Date: Sat, 17 Dec 2022 14:18:28 UTC
Valid-Until: Sat, 24 Dec 2022 14:18:28 UTC
NotAutomatic: yes
ButAutomaticUpgrades: yes
Acquire-By-Hash: yes
No-Support-for-Architecture-all: Packages
Architectures: all amd64 arm64 armel armhf i386 mips64el mipsel ppc64el s390x
Components: main contrib non-free
Description: Debian 11 - Backports
SHA256:
 a46b4154da65694b056a9aab60e90f5615fb81629bd88b8204839c64bf89958e    86330 contrib/Contents-all
 52264b2b1e4abb6f8dd1c03894bf93ba7a794f25a10f0b9e0e287001780ff724    12849 contrib/Contents-all.diff/Index

但至少需要知道套件。我不知道如何仅从 repo 基础 URL 发现它。

答案2

对选定的 APT 数据库提供有限的支持,实现 madison CGI 接口:

sudo apt install devscripts
rmadison emacs
rmadison -u debian emacs
rmadison -u ubuntu emacs

在 Debian WEB 上,可以通过单个查询来查询所有注册源:

https://qa.debian.org/madison.php?package=emacs&table=all&a=&c=&s=#

输出如下所示:

 emacs | 45.0ubuntu1       | trusty           | all
 emacs | 46.1              | xenial           | all
 emacs | 47.0              | bionic           | all
 emacs | 1:26.3+1-1ubuntu2 | focal/universe   | source, all
 emacs | 1:27.1+1-3ubuntu5 | jammy/universe   | source, all
 emacs | 1:27.1+1-3ubuntu5 | kinetic/universe | source, all
 emacs | 1:27.1+1-3ubuntu5 | lunar/universe   | source, all

相关内容