Apt-get下载deb流程简记:修订间差异
来自三线的随记
(创建页面,内容为“=== 简记 === 架构值取自 dpkg --print-architecture 可以通过 <code>--add-architecture</code> 修改 假设有一个sources.list 定义如下 # Tailscale…”) |
小 (Admin移动页面Apt-get 下载deb流程简记至Apt-get下载deb流程简记,不留重定向) |
(没有差异)
|
2023年6月19日 (一) 18:38的最新版本
简记
架构值取自
dpkg --print-architecture
可以通过 --add-architecture
修改
假设有一个sources.list 定义如下
# Tailscale packages for ubuntu xenial deb https://pkgs.tailscale.com/stable/ubuntu xenial main
那么他的Packages地址就是
https://pkgs.tailscale.com/stable/ubuntu/dists/xenial/main/binary-${架构}/Packages 例如: https://pkgs.tailscale.com/stable/ubuntu/dists/xenial/main/binary-i386/Packages https://pkgs.tailscale.com/stable/ubuntu/dists/xenial/main/binary-i386/Packages.gz
然后Packages文件里面会描述相关的版本,依赖,下载地址,校验码等信息,例如:
Package: tailscale Version: 1.42.0 Section: net Priority: extra Architecture: amd64 Maintainer: Tailscale Inc <[email protected]> Installed-Size: 42894 Replaces: tailscale-relay Depends: iptables, iproute2 Recommends: tailscale-archive-keyring (>= 1.35.181) Conflicts: tailscale-relay Homepage: https://www.tailscale.com Description: The easiest, most secure, cross platform way to use WireGuard + oauth2 + 2FA/SSO Filename: pool/tailscale_1.42.0_amd64.deb Size: 23655910 MD5sum: b457a8d0fe4037af52e0dc31b948ea66 SHA1: b5472e16934e70b9c1922ae92d050f09458dd20b SHA256: 2492c2dd9e2aa55ef9524c6e49449a6c327a54bbe36b06127a7309f048d9b271
然后apt-get就会根据以上定义到如下地址去找deb文件
https://pkgs.tailscale.com/stable/ubuntu/pool/tailscale_1.42.0_i386.deb
Related article: https://unix.stackexchange.com/questions/521328/how-does-apt-get-work-in-detail