From 52d1dac2027b01387e3afe4ea2a8433ccf6fbad1 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 8 May 2024 13:24:25 +0000 Subject: [PATCH 1/6] Update distroless_base Docker digest to 786007f --- examples/toolchains/cc_cross_osx_to_linux_amd64/WORKSPACE | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/toolchains/cc_cross_osx_to_linux_amd64/WORKSPACE b/examples/toolchains/cc_cross_osx_to_linux_amd64/WORKSPACE index e1e1bc55e..ae85601c1 100644 --- a/examples/toolchains/cc_cross_osx_to_linux_amd64/WORKSPACE +++ b/examples/toolchains/cc_cross_osx_to_linux_amd64/WORKSPACE @@ -147,7 +147,7 @@ load("@rules_oci//oci:pull.bzl", "oci_pull") oci_pull( name = "distroless_base", - digest = "sha256:ccaef5ee2f1850270d453fdf700a5392534f8d1a8ca2acda391fbb6a06b81c86", + digest = "sha256:786007f631d22e8a1a5084c5b177352d9dcac24b1e8c815187750f70b24a9fc6", image = "gcr.io/distroless/base", platforms = [ "linux/amd64", From 0dd4f06b7170ccfaba5e20ad2a5fbd47bdbba05e Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 8 May 2024 15:45:30 +0000 Subject: [PATCH 2/6] Update ubuntu Docker tag to lunar-20231128 --- .github/nix-server/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/nix-server/Dockerfile b/.github/nix-server/Dockerfile index 624824f33..184d10fb4 100644 --- a/.github/nix-server/Dockerfile +++ b/.github/nix-server/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:23.04 +FROM ubuntu:lunar-20231128 RUN apt-get update -qq && \ apt-get install openssh-server curl xz-utils sudo locales ca-certificates -y && \ From 3b8a58922c9f8da026ad9e7adf41c35cb1858014 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 8 May 2024 21:39:16 +0000 Subject: [PATCH 3/6] Update dependency io_bazel_rules_go to v0.47.1 --- WORKSPACE | 6 +++--- examples/toolchains/go/WORKSPACE | 6 +++--- testing/go-workspace/WORKSPACE | 6 +++--- toolchains/go/WORKSPACE | 6 +++--- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/WORKSPACE b/WORKSPACE index 08a14a7c8..040b4039f 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -48,10 +48,10 @@ load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") http_archive( name = "io_bazel_rules_go", - sha256 = "6dc2da7ab4cf5d7bfc7c949776b1b7c733f05e56edc4bcd9022bb249d2e2a996", + sha256 = "f74c98d6df55217a36859c74b460e774abc0410a47cc100d822be34d5f990f16", urls = [ - "https://mirror.bazel.build/github.com/bazelbuild/rules_go/releases/download/v0.39.1/rules_go-v0.39.1.zip", - "https://github.com/bazelbuild/rules_go/releases/download/v0.39.1/rules_go-v0.39.1.zip", + "https://mirror.bazel.build/github.com/bazelbuild/rules_go/releases/download/v0.47.1/rules_go-v0.47.1.zip", + "https://github.com/bazelbuild/rules_go/releases/download/v0.47.1/rules_go-v0.47.1.zip", ], ) diff --git a/examples/toolchains/go/WORKSPACE b/examples/toolchains/go/WORKSPACE index 4fb3ba4ce..d2800af3d 100644 --- a/examples/toolchains/go/WORKSPACE +++ b/examples/toolchains/go/WORKSPACE @@ -8,10 +8,10 @@ load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") http_archive( name = "io_bazel_rules_go", - sha256 = "6dc2da7ab4cf5d7bfc7c949776b1b7c733f05e56edc4bcd9022bb249d2e2a996", + sha256 = "f74c98d6df55217a36859c74b460e774abc0410a47cc100d822be34d5f990f16", urls = [ - "https://mirror.bazel.build/github.com/bazelbuild/rules_go/releases/download/v0.39.1/rules_go-v0.39.1.zip", - "https://github.com/bazelbuild/rules_go/releases/download/v0.39.1/rules_go-v0.39.1.zip", + "https://mirror.bazel.build/github.com/bazelbuild/rules_go/releases/download/v0.47.1/rules_go-v0.47.1.zip", + "https://github.com/bazelbuild/rules_go/releases/download/v0.47.1/rules_go-v0.47.1.zip", ], ) diff --git a/testing/go-workspace/WORKSPACE b/testing/go-workspace/WORKSPACE index e53dafead..ba7cce298 100644 --- a/testing/go-workspace/WORKSPACE +++ b/testing/go-workspace/WORKSPACE @@ -24,10 +24,10 @@ load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") http_archive( name = "io_bazel_rules_go", - sha256 = "6dc2da7ab4cf5d7bfc7c949776b1b7c733f05e56edc4bcd9022bb249d2e2a996", + sha256 = "f74c98d6df55217a36859c74b460e774abc0410a47cc100d822be34d5f990f16", urls = [ - "https://mirror.bazel.build/github.com/bazelbuild/rules_go/releases/download/v0.39.1/rules_go-v0.39.1.zip", - "https://github.com/bazelbuild/rules_go/releases/download/v0.39.1/rules_go-v0.39.1.zip", + "https://mirror.bazel.build/github.com/bazelbuild/rules_go/releases/download/v0.47.1/rules_go-v0.47.1.zip", + "https://github.com/bazelbuild/rules_go/releases/download/v0.47.1/rules_go-v0.47.1.zip", ], ) diff --git a/toolchains/go/WORKSPACE b/toolchains/go/WORKSPACE index f985f536c..087441fd2 100644 --- a/toolchains/go/WORKSPACE +++ b/toolchains/go/WORKSPACE @@ -31,10 +31,10 @@ load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") http_archive( name = "io_bazel_rules_go", - sha256 = "6dc2da7ab4cf5d7bfc7c949776b1b7c733f05e56edc4bcd9022bb249d2e2a996", + sha256 = "f74c98d6df55217a36859c74b460e774abc0410a47cc100d822be34d5f990f16", urls = [ - "https://mirror.bazel.build/github.com/bazelbuild/rules_go/releases/download/v0.39.1/rules_go-v0.39.1.zip", - "https://github.com/bazelbuild/rules_go/releases/download/v0.39.1/rules_go-v0.39.1.zip", + "https://mirror.bazel.build/github.com/bazelbuild/rules_go/releases/download/v0.47.1/rules_go-v0.47.1.zip", + "https://github.com/bazelbuild/rules_go/releases/download/v0.47.1/rules_go-v0.47.1.zip", ], ) From e9ff024bd9d4788c123a1c0144c45788777858ee Mon Sep 17 00:00:00 2001 From: Scott Walls Date: Thu, 9 May 2024 10:03:41 -0700 Subject: [PATCH 4/6] Catch case in which find_children is called on an empty dir --- core/nixpkgs.bzl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/core/nixpkgs.bzl b/core/nixpkgs.bzl index 242ab1c60..5da9ea7dc 100644 --- a/core/nixpkgs.bzl +++ b/core/nixpkgs.bzl @@ -468,6 +468,8 @@ def _nixpkgs_build_and_symlink(repository_ctx, nix_build_cmd, expr_args, build_f # Build a forest of symlinks (like new_local_package() does) to the # Nix store. for target in find_children(repository_ctx, output_path): + if target == '': + fail("It appears that you nix store may have a corrupt entry. Found empty directory: {}".format(output_path)) basename = target.rpartition("/")[-1] repository_ctx.symlink(target, basename) From 0c7262a8a76cf64911c9da342789957d47101740 Mon Sep 17 00:00:00 2001 From: Scott Walls Date: Thu, 9 May 2024 10:21:42 -0700 Subject: [PATCH 5/6] typo --- core/nixpkgs.bzl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/nixpkgs.bzl b/core/nixpkgs.bzl index 5da9ea7dc..a9ddff395 100644 --- a/core/nixpkgs.bzl +++ b/core/nixpkgs.bzl @@ -469,7 +469,7 @@ def _nixpkgs_build_and_symlink(repository_ctx, nix_build_cmd, expr_args, build_f # Nix store. for target in find_children(repository_ctx, output_path): if target == '': - fail("It appears that you nix store may have a corrupt entry. Found empty directory: {}".format(output_path)) + fail("It appears that your nix store may have a corrupt entry. Found empty directory: {}".format(output_path)) basename = target.rpartition("/")[-1] repository_ctx.symlink(target, basename) From c7a5653e5749151bf7671f385b95b3d3abefe072 Mon Sep 17 00:00:00 2001 From: Ben Radford Date: Fri, 10 May 2024 11:30:18 +0100 Subject: [PATCH 6/6] Have find_children return empty list for empty directory. --- core/nixpkgs.bzl | 7 ++++--- core/util.bzl | 5 ++++- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/core/nixpkgs.bzl b/core/nixpkgs.bzl index a9ddff395..46f05bda6 100644 --- a/core/nixpkgs.bzl +++ b/core/nixpkgs.bzl @@ -467,9 +467,10 @@ def _nixpkgs_build_and_symlink(repository_ctx, nix_build_cmd, expr_args, build_f # Build a forest of symlinks (like new_local_package() does) to the # Nix store. - for target in find_children(repository_ctx, output_path): - if target == '': - fail("It appears that your nix store may have a corrupt entry. Found empty directory: {}".format(output_path)) + targets = find_children(repository_ctx, output_path) + if not targets: + fail("It appears that your nix store may have a corrupt entry. Found empty directory: {}".format(output_path)) + for target in targets: basename = target.rpartition("/")[-1] repository_ctx.symlink(target, basename) diff --git a/core/util.bzl b/core/util.bzl index 804892a56..d1099497c 100644 --- a/core/util.bzl +++ b/core/util.bzl @@ -131,7 +131,10 @@ def find_children(repository_ctx, target_dir): "-print0", ] exec_result = execute_or_fail(repository_ctx, find_args) - return exec_result.stdout.rstrip("\000").split("\000") + if exec_result.stdout != "": + return exec_result.stdout.rstrip("\000").split("\000") + else: + return [] # Special case because splitting the empty string yields [""] def default_constraints(repository_ctx): """Calculate the default CPU and OS constraints based on the host platform.