Skip to content

Commit

Permalink
Merge branch 'levsha/-IDX-2620-Use-dedicated-rules_pkg-instead-of-int…
Browse files Browse the repository at this point in the history
…egrated-' into 'master'

[IDX-2620] Use dedicated rules_pkg instead of integrated.

Integrated rules are deprecated: bazelbuild/bazel#8857 

See merge request dfinity-lab/public/ic!13364
  • Loading branch information
levsha committed Jul 6, 2023
2 parents 1447ac3 + a340292 commit 5783a17
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 9 deletions.
4 changes: 4 additions & 0 deletions .bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -128,4 +128,8 @@ build:fuzzing --//bazel:enable_fuzzing_code=True
query --ui_event_filters=-info,-debug --noshow_progress
cquery --ui_event_filters=-info,-debug --noshow_progress

# Turn off internal pkg_* rules as external rules_pkg should be used:
# https://github.com/bazelbuild/bazel/pull/8858
build --@bazel_tools//tools/build_defs/pkg:incompatible_no_build_defs_pkg

try-import %workspace%/user.bazelrc
2 changes: 1 addition & 1 deletion ic-os/setupos/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ exports_files([
"rootfs/docker-base.prod",
"rootfs/docker-base.sev",
"config/config.ini",
"config/ssh_authorized_keys",
"config/ssh_authorized_keys/admin",
"config/node_operator_private_key.pem",
"data/deployment.json.template",
"data/nns_public_key.pem",
Expand Down
6 changes: 3 additions & 3 deletions ic-os/setupos/defs.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Hold manifest common to all SetupOS variants.

load("@bazel_skylib//rules:copy_file.bzl", "copy_file")
load("//toolchains/sysimage:toolchain.bzl", "ext4_image", "fat32_image")
load("@bazel_tools//tools/build_defs/pkg:pkg.bzl", "pkg_tar")
load("@rules_pkg//:pkg.bzl", "pkg_tar")

# Declare the dependencies that we will have for the built filesystem images.
# This needs to be done separately from the build rules because we want to
Expand Down Expand Up @@ -82,7 +82,7 @@ def _custom_partitions(mode):
name = "config_tar",
srcs = [
Label("//ic-os/setupos:config/config.ini"),
Label("//ic-os/setupos:config/ssh_authorized_keys"),
Label("//ic-os/setupos:config/ssh_authorized_keys/admin"),
] + ([Label("//ic-os/setupos:config/node_operator_private_key.pem")] if mode == "dev" else []),
mode = "0644",
package_dir = "config",
Expand Down Expand Up @@ -122,7 +122,7 @@ def _custom_partitions(mode):
name = "partition-data.tar",
src = "data_tar",
partition_size = "1750M",
subdir = "./data",
subdir = "data",
target_compatible_with = [
"@platforms//os:linux",
],
Expand Down
5 changes: 2 additions & 3 deletions rs/rosetta-api/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
load("@rules_rust//rust:defs.bzl", "rust_binary", "rust_library", "rust_test")
load("@io_bazel_rules_docker//container:container.bzl", "container_image", "container_push")
load("@io_bazel_rules_docker//contrib:passwd.bzl", "passwd_entry", "passwd_file")
load("@bazel_tools//tools/build_defs/pkg:pkg.bzl", "pkg_tar")
load("@bazel_skylib//rules:write_file.bzl", "write_file")
load("@rules_pkg//pkg:tar.bzl", tar = "pkg_tar")
load("@rules_pkg//:pkg.bzl", "pkg_tar")
load("@rules_pkg//pkg:mappings.bzl", "pkg_attributes", "pkg_mkdirs")

package(default_visibility = ["//visibility:public"])
Expand Down Expand Up @@ -183,7 +182,7 @@ pkg_mkdirs(
],
)

tar(
pkg_tar(
name = "data_tar",
srcs = [":data_dir"],
)
Expand Down
2 changes: 1 addition & 1 deletion rs/tests/httpbin-rs/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
load("@rules_rust//rust:defs.bzl", "rust_binary")
load("@io_bazel_rules_docker//container:container.bzl", "container_image")
load("@io_bazel_rules_docker//contrib:passwd.bzl", "passwd_entry", "passwd_file")
load("@bazel_tools//tools/build_defs/pkg:pkg.bzl", "pkg_tar")
load("@rules_pkg//:pkg.bzl", "pkg_tar")

package(default_visibility = ["//visibility:public"])

Expand Down
2 changes: 1 addition & 1 deletion rs/tests/system_tests.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Rules for system-tests.
"""

load("@rules_rust//rust:defs.bzl", "rust_binary")
load("@bazel_tools//tools/build_defs/pkg:pkg.bzl", "pkg_tar")
load("@rules_pkg//:pkg.bzl", "pkg_tar")
load("//rs/tests:common.bzl", "GUESTOS_DEV_VERSION", "UNIVERSAL_VM_RUNTIME_DEPS")

def _run_system_test(ctx):
Expand Down

0 comments on commit 5783a17

Please sign in to comment.