blob: 9b59668f0f781809d28cd42e20bf837df8c559f1 [file] [log] [blame] [edit]
# Copyright 2022 The ChromiumOS Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
load("//bazel/portage/build_defs:sdk.bzl", "sdk_from_archive", "sdk_update")
load("@bazel_skylib//rules:common_settings.bzl", "bool_flag")
load("@rules_pkg//pkg:tar.bzl", "pkg_tar")
pkg_tar(
name = "extra_tarball",
srcs = [
"//bazel/portage/sdk/etc",
"//bazel/portage/sdk/run/lock",
"//bazel/portage/sdk/usr/bin",
"//bazel/portage/sdk/usr/lib64",
"//bazel/portage/sdk/usr/src",
],
extension = "tar.gz",
visibility = ["//bazel:internal"],
)
sdk_from_archive(
name = "sdk_from_archive",
src = "@files//:cros-sdk-2023.09.08.050046",
progress_message = "Extracting bootstrap SDK tarball",
# This rule just extracts an archive, do not bother dispatching to remotes.
tags = ["no-remote"],
visibility = ["//bazel:internal"],
)
# The stage1 bootstrap SDK.
# sdk_update will monkey patch portage and get the SDK setup so we can perform
# rootless builds.
sdk_update(
name = "stage1",
base = ":sdk_from_archive",
extra_tarballs = [
":extra_tarball",
],
visibility = ["@//bazel:internal"],
)