Skip to content

package_system/deb: support flat repositories - #405

Merged
martinpitt merged 1 commit into
amutable:mainfrom
tofugarden:flat-deb-repo-support
Nov 16, 2026
Merged

martinpitt merged 1 commit into
amutable:mainfrom
tofugarden:flat-deb-repo-support

Conversation

@tofugarden

@tofugarden tofugarden commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

Repository suites ending in a slash were rejected. They are now recognized as
flat repositories, where both the release and package index are at the path
specified by the suite argument.

Fixes #400

Functional check:

Add to catalog/BUCK, replacing the default debian.testing release:

load("@tine//package_system/deb:rules.bzl", "deb_remote_repository")

kubernetes_repo_url = "https://pkgs.k8s.io/core:/stable:/v1.37/deb"
deb_remote_repository(
    name = "kubernetes.repository",
    baseurl = kubernetes_repo_url,
    suite = "/",
    architectures = _DEBIAN_ARCHITECTURES,
    visibility = ["PUBLIC"],
    signing_keys = {
        "DE15B14486CD377B9E876E1A234654DA9A296436": f"{kubernetes_repo_url}/Release.key",
    },
)

debian.release(
    name = "debian.testing",
    architectures = _DEBIAN_ARCHITECTURES,
    archive_snapshot = "20261107T205437Z",
    # The archive signs a Release with its current key and with the previous key.
    signing_keys = debian.signing_keys("archive-key-12", "archive-key-13"),
    visibility = ["PUBLIC"],
    additional_repositories = [
        ":kubernetes.repository",
    ],
)

Snapshot the new repo:

% bin/tine buck run tine//tools:refresh-catalog -- --box debian.testing.box

Add a new package to examples/image:demo:

image.archive(
    ...
    packages = [...]
    + distribution.select({
        ...
        "debian": ["kubelet"],
    }),
    ...
)

Build the image:

% bin/tine buck run tine//examples/image:demo.debian

Repository suites ending in a slash were rejected. They are now recognized as
flat repositories, where both the release and package index are at the path
specified by the suite argument.

Signed-off-by: tofugarden <30895757+tofugarden@users.noreply.github.com>
@tofugarden
tofugarden force-pushed the flat-deb-repo-support branch 2 times, most recently from 9d48683 to d2eed99 Compare November 13, 2026 17:26

@martinpitt martinpitt left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@martinpitt
martinpitt enabled auto-merge (rebase) November 16, 2026 05:27
@martinpitt
martinpitt merged commit 3d9a8ba into amutable:main Nov 16, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support "flat" deb repositories

2 participants