blob: 0c3a1087dd059f95f08de52eb49b937b89023406 [file] [log] [blame]
# 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("@rules_pkg//pkg:mappings.bzl", "pkg_attributes", "pkg_files", "strip_prefix")
load("@rules_pkg//pkg:tar.bzl", "pkg_tar")
# Chromite has some recursive symlinks which we need to exclude
pkg_files(
name = "__files__",
srcs = glob([
"api/**",
"bin/**",
"cidb/**",
"cli/**",
"config/**",
# "conftest.py",
"contrib/**",
"cbuildbot/**",
"cros/**",
# "docs/**",
# ".env",
"format/**",
"infra/**",
"__init__.py",
"lib/**",
"licensing/**",
# "pytest.ini",
# "run_tests",
"scripts/**",
"PRESUBMIT.cfg",
"sdk/**",
"service/**",
"signing/**",
"ssh_keys/**",
"test/**",
"third_party/**",
"utils/**",
], exclude=[
# Contains utf-8 characters
"third_party/swarming.client/example/**",
"**/__pycache__/**"
]),
attributes = pkg_attributes(
mode = "0755",
),
prefix = "/mnt/host/source/chromite",
strip_prefix = strip_prefix.from_pkg(),
visibility = ["//visibility:private"],
)
pkg_tar(
name = "src",
srcs = [
":__files__",
],
extension = "tar.zst",
compressor = "@//bazel/ebuild/private:zstd",
compressor_args = "--threads=0",
visibility = ["@//bazel:internal"],
)