diff --git a/MODULE.bazel b/MODULE.bazel index 010c0c6..f15e813 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -75,6 +75,11 @@ apt.install( lock = "//examples/debian_flat_repo:bullseye_rproject.lock.json", manifest = "//examples/debian_flat_repo:bullseye_rproject.yaml", ) +apt.install( + name = "bullseye_all", + lock = "//examples/debian_snapshot_all_arch:bullseye_all.lock.json", + manifest = "//examples/debian_snapshot_all_arch:bullseye_all.yaml", +) apt.install( name = "apt_security", manifest = "//examples/debian_snapshot_security:security.yaml", @@ -95,4 +100,4 @@ apt.install( lock = "//examples/debian_flat_repo:nvidia_ubuntu2404_cuda.lock.json", manifest = "//examples/debian_flat_repo:nvidia_ubuntu2404_cuda.yaml", ) -use_repo(apt, "apt_security", "apt_security_resolve", "bullseye", "bullseye_nolock", "bullseye_rproject", "noble", "nvidia_ubuntu2404_cuda", "shared_dependencies") +use_repo(apt, "apt_security", "apt_security_resolve", "bullseye", "bullseye_all", "bullseye_all_resolve", "bullseye_nolock", "bullseye_rproject", "noble", "nvidia_ubuntu2404_cuda", "shared_dependencies") diff --git a/examples/debian_snapshot_all_arch/BUILD.bazel b/examples/debian_snapshot_all_arch/BUILD.bazel new file mode 100644 index 0000000..f9b04ad --- /dev/null +++ b/examples/debian_snapshot_all_arch/BUILD.bazel @@ -0,0 +1,32 @@ +load("@aspect_bazel_lib//lib:jq.bzl", "jq") +load("@aspect_bazel_lib//lib:testing.bzl", "assert_contains") + +jq( + name = "pick_quake_arch", + srcs = [ + "@bullseye_all_resolve//:lockfile", + ], + args = ["-rj"], + filter = ".packages.quake[] | .arch", +) + +assert_contains( + name = "test_quake_arch", + actual = ":pick_quake_arch", + expected = "all", +) + +jq( + name = "pick_quake_version", + srcs = [ + "@bullseye_all_resolve//:lockfile", + ], + args = ["-rj"], + filter = ".packages.quake[] | .version", +) + +assert_contains( + name = "test_quake_version", + actual = ":pick_quake_version", + expected = "67", +) diff --git a/examples/debian_snapshot_all_arch/bullseye_all.lock.json b/examples/debian_snapshot_all_arch/bullseye_all.lock.json new file mode 100644 index 0000000..464ea01 --- /dev/null +++ b/examples/debian_snapshot_all_arch/bullseye_all.lock.json @@ -0,0 +1,30 @@ +{ + "packages": { + "game-data-packager-runtime": { + "all": { + "arch": "all", + "dependencies": [], + "name": "game-data-packager-runtime", + "sha256": "eee39c4ef95519191f8a3c2582661a4ba812962203046cfe5f97af00d73045ed", + "url": "https://snapshot-cloudflare.debian.org/archive/debian/20240210T223313Z/pool/contrib/g/game-data-packager/game-data-packager-runtime_67_all.deb", + "version": "67" + } + }, + "quake": { + "all": { + "arch": "all", + "dependencies": [ + { + "name": "game-data-packager-runtime", + "version": "67" + } + ], + "name": "quake", + "sha256": "54298c07795d65cf216262980a8be700f2859aa6be16c7441b688e7d7a627af6", + "url": "https://snapshot-cloudflare.debian.org/archive/debian/20240210T223313Z/pool/contrib/g/game-data-packager/quake_67_all.deb", + "version": "67" + } + } + }, + "version": 2 +} \ No newline at end of file diff --git a/examples/debian_snapshot_all_arch/bullseye_all.yaml b/examples/debian_snapshot_all_arch/bullseye_all.yaml new file mode 100644 index 0000000..7f92d58 --- /dev/null +++ b/examples/debian_snapshot_all_arch/bullseye_all.yaml @@ -0,0 +1,20 @@ +# Packages for examples/debian_snapshot_all_arch. +# +# Anytime this file is changed, the lockfile needs to be regenerated. +# +# To generate the bullseye_all.lock.json run the following command +# +# bazel run @bullseye_all//:lock +# +# See debian_package_index at WORKSPACE.bazel +version: 1 + +sources: + - channel: bullseye contrib + url: https://snapshot-cloudflare.debian.org/archive/debian/20240210T223313Z + +archs: + - all + +packages: + - quake