diff --git a/WORKSPACE.bazel b/WORKSPACE.bazel index d0e1aa6..5dc901c 100644 --- a/WORKSPACE.bazel +++ b/WORKSPACE.bazel @@ -68,6 +68,17 @@ load("@nvidia_ubuntu2404_cuda//:packages.bzl", "nvidia_ubuntu2404_cuda_packages" nvidia_ubuntu2404_cuda_packages() +# bazel run @bullseye_all//:lock +deb_index( + name = "bullseye_all", + lock = "//examples/debian_snapshot_all_arch:bullseye_all.lock.json", + manifest = "//examples/debian_snapshot_all_arch:bullseye_all.yaml", +) + +load("@bullseye_all//:packages.bzl", "bullseye_all_packages") + +bullseye_all_packages() + deb_index( name = "apt_security", manifest = "//examples/debian_snapshot_security:security.yaml", 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