7fa5434dbc
ci/woodpecker/tag/docker Pipeline was successful
Virtual repos merge helm, pypi, rpm, npm, gems, ansible, goproxy and puppet but not deb, so several apt repos (e.g. github_deb remotes plus a local deb) cannot be served as one apt source. - merge member Packages for flat (`./`) and `dists/<suite>` layouts; member order wins duplicate (Package, Version, Architecture) - generate an unsigned Release with Acquire-By-Hash, serving indexes by name and by SHA256 from both retained generations - prefix Filename with the member name and 302 downloads to the member route - cache merges per suite on the shared virtual cache, capped at 32 suites per virtual (LRU) - add docs/deb/virtual.md, unit tests and dockerised apt e2e for flat and suite layouts Reviewed-on: #138 Co-authored-by: unkin-agent <unkin-agent@unkin.net> Co-committed-by: unkin-agent <unkin-agent@unkin.net>
1.2 KiB
1.2 KiB
deb virtual
A deb virtual serves one apt source over local and remote deb members at
/api/v1/virtual/<name>/, in either the flat (./) or dists/<suite> layout.
- Packages indexes are merged; on a duplicate (Package, Version, Architecture) the earlier member wins.
- The Release is generated unsigned with
Acquire-By-Hash: yes; indexes are served by name and by SHA256 from the current and previous merge. Filenamepoints at the virtual (<member>/<path>), which 302s to the owning member.- All members must share one layout; mixing flat and suite members is unsupported (suite requests fail with 502).
- A member error fails the request with 502. Merges are cached for 60s per suite, up to 32 suites per virtual.
resource "artifactapi_virtual" "deb" {
name = "deb"
package_type = "deb"
members = [artifactapi_local_deb.internal.name, artifactapi_remote_github_deb.tool.name]
}
# /etc/apt/sources.list.d/artifactapi.list (flat)
deb [trusted=yes] https://artifactapi.example.com/api/v1/virtual/deb/ ./
# suite layout
deb [trusted=yes] https://artifactapi.example.com/api/v1/virtual/debian/ trixie main
Upload to the local member directly; the virtual is read-only.