diff --git a/MODULE.bazel b/MODULE.bazel index d9d880f..8e1afc8 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -7,7 +7,7 @@ module( ) bazel_dep(name = "bazel_skylib", version = "1.5.0") -bazel_dep(name = "aspect_bazel_lib", version = "2.5.0") +bazel_dep(name = "aspect_bazel_lib", version = "2.5.1") bazel_lib_toolchains = use_extension("@aspect_bazel_lib//lib:extensions.bzl", "toolchains") bazel_lib_toolchains.tar() diff --git a/distroless/BUILD.bazel b/distroless/BUILD.bazel index 3815366..940f271 100644 --- a/distroless/BUILD.bazel +++ b/distroless/BUILD.bazel @@ -33,4 +33,5 @@ bzl_library( name = "toolchains", srcs = ["toolchains.bzl"], visibility = ["//visibility:public"], + deps = ["@aspect_bazel_lib//lib:repositories"], ) diff --git a/distroless/dependencies.bzl b/distroless/dependencies.bzl index 73a3780..9c129ba 100644 --- a/distroless/dependencies.bzl +++ b/distroless/dependencies.bzl @@ -17,7 +17,7 @@ def http_archive(name, **kwargs): # changes in this function should be marked as BREAKING in the commit message # and released only in semver majors. # This is all fixed by bzlmod, so we just tolerate it for now. -def rules_distroless_dependencies(): +def distroless_dependencies(): # The minimal version of bazel_skylib we require http_archive( name = "bazel_skylib", @@ -30,7 +30,7 @@ def rules_distroless_dependencies(): http_archive( name = "aspect_bazel_lib", - sha256 = "f5ea76682b209cc0bd90d0f5a3b26d2f7a6a2885f0c5f615e72913f4805dbb0d", - strip_prefix = "bazel-lib-2.5.0", - url = "https://github.com/aspect-build/bazel-lib/releases/download/v2.5.0/bazel-lib-v2.5.0.tar.gz", + sha256 = "a59096e01b43d86c6667a869f0e90e0c4b1d4cb03c3d3a972a32ff687c750ac2", + strip_prefix = "bazel-lib-2.5.1", + url = "https://github.com/aspect-build/bazel-lib/releases/download/v2.5.1/bazel-lib-v2.5.1.tar.gz", ) diff --git a/distroless/private/BUILD.bazel b/distroless/private/BUILD.bazel index 0d0c991..320a1a3 100644 --- a/distroless/private/BUILD.bazel +++ b/distroless/private/BUILD.bazel @@ -57,6 +57,7 @@ bzl_library( srcs = ["passwd.bzl"], visibility = ["//distroless:__subpackages__"], deps = [ + ":util", "@aspect_bazel_lib//lib:expand_template", "@aspect_bazel_lib//lib:tar", "@aspect_bazel_lib//lib:utils", @@ -77,6 +78,7 @@ bzl_library( visibility = ["//distroless:__subpackages__"], deps = [ ":tar", + ":util", "@aspect_bazel_lib//lib:tar", ], ) @@ -92,5 +94,14 @@ bzl_library( name = "tar", srcs = ["tar.bzl"], visibility = ["//distroless:__subpackages__"], - deps = ["@aspect_bazel_lib//lib:tar"], + deps = [ + "@aspect_bazel_lib//lib:tar", + "@bazel_skylib//lib:sets", + ], +) + +bzl_library( + name = "util", + srcs = ["util.bzl"], + visibility = ["//distroless:__subpackages__"], ) diff --git a/distroless/private/cacerts.bzl b/distroless/private/cacerts.bzl index 48e9aa3..056fe3c 100644 --- a/distroless/private/cacerts.bzl +++ b/distroless/private/cacerts.bzl @@ -53,8 +53,10 @@ def _cacerts_impl(ctx): output = ctx.actions.declare_file(ctx.attr.name + ".tar.gz") mtree = tar_lib.create_mtree(ctx) - mtree.add_file_with_parents("/etc/ssl/certs/ca-certificates.crt", cacerts) - mtree.add_file_with_parents("/usr/share/doc/ca-certificates/copyright", copyright) + mtree.add_parents("/etc/ssl/certs", time = ctx.attr.time) + mtree.add_file("/etc/ssl/certs/ca-certificates.crt", cacerts, time = ctx.attr.time, mode = ctx.attr.mode) + mtree.add_parents("/usr/share/doc/ca-certificates", time = ctx.attr.time) + mtree.add_file("/usr/share/doc/ca-certificates/copyright", copyright, time = ctx.attr.time, mode = ctx.attr.mode) mtree.build(output = output, mnemonic = "CaCertsTarGz", inputs = [cacerts, copyright]) return [ @@ -74,6 +76,14 @@ cacerts = rule( allow_single_file = [".tar.xz", ".tar.gz", ".tar"], mandatory = True, ), + "mode": attr.string( + doc = "mode for the entries", + default = "0555", + ), + "time": attr.string( + doc = "time for the entries", + default = "0.0", + ), }, implementation = _cacerts_impl, toolchains = [tar_lib.TOOLCHAIN_TYPE], diff --git a/distroless/private/group.bzl b/distroless/private/group.bzl index 81e3b8c..01f0598 100644 --- a/distroless/private/group.bzl +++ b/distroless/private/group.bzl @@ -1,18 +1,12 @@ -"osrelease" +"group" -load("@aspect_bazel_lib//lib:expand_template.bzl", "expand_template") load("@aspect_bazel_lib//lib:tar.bzl", "tar") load("@aspect_bazel_lib//lib:utils.bzl", "propagate_common_rule_attributes") load("@bazel_skylib//rules:write_file.bzl", "write_file") +load(":tar.bzl", "tar_lib") +load(":util.bzl", "util") -def _get_attr(o, k, d): - if k in o: - return o[k] - if hasattr(o, k): - return getattr(o, k) - return d - -def group(name, groups, **kwargs): +def group(name, entries, time = "0.0", mode = "0644", **kwargs): """ Create a group file from array of dicts. @@ -20,7 +14,9 @@ def group(name, groups, **kwargs): Args: name: name of the target - groups: an array of dicts which will be serialized into single group file. + entries: an array of dicts which will be serialized into single group file. + mode: mode for the entry + time: time for the entry **kwargs: other named arguments to expanded targets. see [common rule attributes](https://bazel.build/reference/be/common-definitions#common-attributes). """ common_kwargs = propagate_common_rule_attributes(kwargs) @@ -29,36 +25,29 @@ def group(name, groups, **kwargs): content = [ # See https://www.ibm.com/docs/en/aix/7.2?topic=files-etcgroup-file#group_security__a3179518__title__1 ":".join([ - entry["name"], - _get_attr(entry, "password", "!"), # not used. Group administrators are provided instead of group passwords. - str(entry["gid"]), - ",".join(entry["users"]), + util.get_attr(entry, "name"), + util.get_attr(entry, "password", "!"), # not used. Group administrators are provided instead of group passwords. + str(util.get_attr(entry, "gid")), + ",".join(util.get_attr(entry, "users", [])), ]) - for entry in groups + for entry in entries ] + [""], out = "%s.content" % name, **common_kwargs ) - # TODO: remove this expansion target once https://github.com/aspect-build/bazel-lib/issues/653 is fixed. - expand_template( - name = "%s_mtree" % name, - out = "%s.mtree" % name, - data = [":%s_content" % name], - stamp = 0, - template = [ - "#mtree", - "etc/group uid=0 gid=0 mode=0644 time=0.0 type=file content={content}", - "", - ], - substitutions = { - "{content}": "$(BINDIR)/$(rootpath :%s_content)" % name, - }, - **common_kwargs + mtree = tar_lib.create_mtree() + mtree.entry( + "etc/group", + "file", + mode = mode, + time = time, + content = "$(BINDIR)/$(rootpath :%s_content)" % name, ) + tar( name = name, srcs = [":%s_content" % name], - mtree = ":%s_mtree" % name, + mtree = mtree.content(), **common_kwargs ) diff --git a/distroless/private/home.bzl b/distroless/private/home.bzl index 028c47d..eebec3a 100644 --- a/distroless/private/home.bzl +++ b/distroless/private/home.bzl @@ -2,6 +2,7 @@ load("@aspect_bazel_lib//lib:tar.bzl", "tar") load(":tar.bzl", "tar_lib") +load(":util.bzl", "util") def home(name, dirs, **kwargs): """ @@ -12,22 +13,21 @@ def home(name, dirs, **kwargs): dirs: array of home directory dicts. **kwargs: other named arguments to that is passed to tar. see [common rule attributes](https://bazel.build/reference/be/common-definitions#common-attributes). """ - mtree = [] + mtree = tar_lib.create_mtree() for home in dirs: - mtree.extend( - tar_lib.mtree.add_directory_with_parents( - home["home"], - uid = str(home["uid"]), - gid = str(home["gid"]), - # the default matches https://github.com/bazelbuild/rules_docker/blob/3040e1fd74659a52d1cdaff81359f57ee0e2bb41/contrib/passwd.bzl#L81C24-L81C27 - mode = getattr(home, "gid", "700"), - ), + mtree.add_dir( + util.get_attr(home, "home"), + uid = str(util.get_attr(home, "uid")), + gid = str(util.get_attr(home, "gid")), + time = str(util.get_attr(home, "time", 0)), + # the default matches https://github.com/bazelbuild/rules_docker/blob/3040e1fd74659a52d1cdaff81359f57ee0e2bb41/contrib/passwd.bzl#L81C24-L81C27 + mode = str(util.get_attr(home, "mode", "700")), ) tar( name = name, srcs = [], - mtree = mtree, + mtree = mtree.content(), **kwargs ) diff --git a/distroless/private/java_keystore.bzl b/distroless/private/java_keystore.bzl index 9008829..bb70536 100644 --- a/distroless/private/java_keystore.bzl +++ b/distroless/private/java_keystore.bzl @@ -23,7 +23,8 @@ def _java_keystore_impl(ctx): output = ctx.actions.declare_file(ctx.attr.name + ".tar.gz") mtree = tar_lib.create_mtree(ctx) - mtree.add_file_with_parents("/etc/ssl/certs/java/cacerts", jks) + mtree.add_parents("/etc/ssl/certs/java", mode = ctx.attr.mode, time = ctx.attr.time) + mtree.add_file("/etc/ssl/certs/java/cacerts", jks, mode = ctx.attr.mode, time = ctx.attr.time) mtree.build(output = output, mnemonic = "JavaKeyStore", inputs = [jks]) return [ @@ -46,6 +47,14 @@ java_keystore = rule( mandatory = True, allow_empty = False, ), + "mode": attr.string( + doc = "mode for the entries", + default = "0555", + ), + "time": attr.string( + doc = "time for the entries", + default = "0.0", + ), }, implementation = _java_keystore_impl, toolchains = [ diff --git a/distroless/private/os_release.bzl b/distroless/private/os_release.bzl index 9d2490c..92a717e 100644 --- a/distroless/private/os_release.bzl +++ b/distroless/private/os_release.bzl @@ -1,11 +1,17 @@ -"osrelease" +"os release" -load("@aspect_bazel_lib//lib:expand_template.bzl", "expand_template") load("@aspect_bazel_lib//lib:tar.bzl", "tar") load("@aspect_bazel_lib//lib:utils.bzl", "propagate_common_rule_attributes") load("@bazel_skylib//rules:write_file.bzl", "write_file") +load(":tar.bzl", "tar_lib") -def os_release(name, content, path = "/usr/lib/os-release", **kwargs): +def os_release( + name, + content, + path = "/usr/lib/os-release", + mode = "0555", + time = "0", + **kwargs): """ Create an Operating System Identification file from a key, value dictionary. @@ -17,6 +23,8 @@ def os_release(name, content, path = "/usr/lib/os-release", **kwargs): See https://www.freedesktop.org/software/systemd/man/latest/os-release.html#Options for well known keys. path: where to put the file in the result archive. default: `/usr/lib/os-release` + mode: mode for the entry + time: time for the entry **kwargs: other named arguments to expanded targets. see [common rule attributes](https://bazel.build/reference/be/common-definitions#common-attributes). """ common_kwargs = propagate_common_rule_attributes(kwargs) @@ -30,25 +38,21 @@ def os_release(name, content, path = "/usr/lib/os-release", **kwargs): **common_kwargs ) - # TODO: remove this expansion target once https://github.com/aspect-build/bazel-lib/issues/653 is fixed. - expand_template( - name = "%s_mtree" % name, - out = "%s.mtree" % name, - data = [":%s_content" % name], - stamp = 0, - template = [ - "#mtree", - "%s uid=0 gid=0 mode=0755 time=0 type=file content={content}" % path.lstrip("/"), - "", - ], - substitutions = { - "{content}": "$(BINDIR)/$(rootpath :%s_content)" % name, - }, - **common_kwargs + mtree = tar_lib.create_mtree() + + i = path.rfind("/") + mtree.add_parents(path[0:i], time = time) + mtree.entry( + path.lstrip("/").lstrip("./"), + "file", + mode = mode, + time = time, + content = "$(BINDIR)/$(rootpath :%s_content)" % name, ) + tar( name = name, srcs = [":%s_content" % name], - mtree = ":%s_mtree" % name, + mtree = mtree.content(), **common_kwargs ) diff --git a/distroless/private/passwd.bzl b/distroless/private/passwd.bzl index 4535b67..9ab0b87 100644 --- a/distroless/private/passwd.bzl +++ b/distroless/private/passwd.bzl @@ -1,13 +1,13 @@ "osrelease" -load("@aspect_bazel_lib//lib:expand_template.bzl", "expand_template") load("@aspect_bazel_lib//lib:tar.bzl", "tar") load("@aspect_bazel_lib//lib:utils.bzl", "propagate_common_rule_attributes") load("@bazel_skylib//rules:write_file.bzl", "write_file") +load(":tar.bzl", "tar_lib") # WARNING: the mode `0o644` is important # See: https://github.com/bazelbuild/rules_docker/blob/3040e1fd74659a52d1cdaff81359f57ee0e2bb41/contrib/passwd.bzl#L149C54-L149C57 -def passwd(name, passwds, mode = "644", **kwargs): +def passwd(name, entries, mode = "0644", time = "0.0", **kwargs): """ Create a passwd file from array of dicts. @@ -15,14 +15,15 @@ def passwd(name, passwds, mode = "644", **kwargs): Args: name: name of the target - passwds: an array of dicts which will be serialized into single passwd file. + entries: an array of dicts which will be serialized into single passwd file. An example; ``` dict(gid = 0, uid = 0, home = "/root", shell = "/bin/bash", username = "root") ``` - mode: the mode bits for the passwd file + mode: mode for the entry + time: time for the entry **kwargs: other named arguments to expanded targets. see [common rule attributes](https://bazel.build/reference/be/common-definitions#common-attributes). """ common_kwargs = propagate_common_rule_attributes(kwargs) @@ -39,32 +40,24 @@ def passwd(name, passwds, mode = "644", **kwargs): entry["home"], entry["shell"], ]) - for entry in passwds + for entry in entries ] + [""], out = "%s.content" % name, **common_kwargs ) - # TODO: remove this expansion target once https://github.com/aspect-build/bazel-lib/issues/653 is fixed. - expand_template( - name = "%s_mtree" % name, - out = "%s.mtree" % name, - data = [":%s_content" % name], - stamp = 0, - template = [ - "#mtree", - "./etc/passwd uid=0 gid=0 mode={mode} time=0 type=file content={content}", - "", - ], - substitutions = { - "{content}": "$(BINDIR)/$(rootpath :%s_content)" % name, - "{mode}": mode, - }, - **common_kwargs + mtree = tar_lib.create_mtree() + mtree.entry( + "/etc/passwd", + "file", + mode = mode, + time = time, + content = "$(BINDIR)/$(rootpath :%s_content)" % name, ) + tar( name = name, srcs = [":%s_content" % name], - mtree = ":%s_mtree" % name, + mtree = mtree.content(), **common_kwargs ) diff --git a/distroless/private/tar.bzl b/distroless/private/tar.bzl index a23a504..203f201 100644 --- a/distroless/private/tar.bzl +++ b/distroless/private/tar.bzl @@ -1,6 +1,7 @@ "mtree helpers" load("@aspect_bazel_lib//lib:tar.bzl", tar = "tar_lib") +load("@bazel_skylib//lib:sets.bzl", "sets") DEFAULT_GID = "0" DEFAULT_UID = "0" @@ -14,6 +15,11 @@ def _mtree_line(dest, type, content = None, uid = DEFAULT_UID, gid = DEFAULT_GID if not dest.startswith("/"): dest = "/" + dest dest = "." + dest + + # dest = dest.removeprefix("./") + # if type == "dir" and not dest.endswith("/"): + # dest = dest + "/" + spec = [ dest, "uid=" + uid, @@ -29,7 +35,6 @@ def _mtree_line(dest, type, content = None, uid = DEFAULT_UID, gid = DEFAULT_GID def _add_parents(path, uid = DEFAULT_UID, gid = DEFAULT_GID, time = DEFAULT_TIME, mode = DEFAULT_MODE): lines = [] segments = path.split("/") - segments.pop() for i in range(0, len(segments)): parent = "/".join(segments[:i + 1]) if not parent: @@ -39,16 +44,6 @@ def _add_parents(path, uid = DEFAULT_UID, gid = DEFAULT_GID, time = DEFAULT_TIME ) return lines -def _add_file_with_parents(path, file): - lines = _add_parents(path) - lines.append(_mtree_line(path, "file", content = file.path)) - return lines - -def _add_directory_with_parents(path, **kwargs): - lines = _add_parents(path, **kwargs) - lines.append(_mtree_line(path, "dir", **kwargs)) - return lines - def _build_tar(ctx, mtree, output, inputs = [], compression = "gzip", mnemonic = "Tar"): bsdtar = ctx.toolchains[tar.toolchain_type] @@ -72,28 +67,37 @@ def _build_tar(ctx, mtree, output, inputs = [], compression = "gzip", mnemonic = def _build_mtree(ctx, content): mtree_out = ctx.actions.declare_file(ctx.label.name + ".spec") + content.add("#end") ctx.actions.write(mtree_out, content = content) return mtree_out -def _create_mtree(ctx): - content = ctx.actions.args() - content.set_param_file_format("multiline") +def _array_content(): + content = [] + return struct( + add = lambda c: content.append(c), + add_all = lambda c, uniquify = False: content.extend(c) if uniquify else content.extend(sets.make(c).to_list()), + to_list = lambda: content, + ) + +def _create_mtree(ctx = None): + if ctx: + content = ctx.actions.args() + content.set_param_file_format("multiline") + else: + content = _array_content() + content.add("#mtree") return struct( - line = lambda **kwargs: content.add(_mtree_line(**kwargs)), - add_file_with_parents = lambda *args, **kwargs: content.add_all(_add_file_with_parents(*args), uniquify = kwargs.pop("uniqify", True)), - add_parents = lambda *args, **kwargs: content.add_all(_add_parents(*args), uniquify = kwargs.pop("uniqify", True)), + entry = lambda path, type, **kwargs: content.add(_mtree_line(path, type, **kwargs)), + add_file = lambda path, file, **kwargs: content.add(_mtree_line(path, "file", content = file.path, **kwargs)), + add_dir = lambda path, **kwargs: content.add(_mtree_line(path, "dir", **kwargs)), + add_parents = lambda path, **kwargs: content.add_all(_add_parents(path, **kwargs), uniquify = True), build = lambda **kwargs: _build_tar(ctx, _build_mtree(ctx, content), **kwargs), - build_mtree = lambda **kwargs: _build_mtree(ctx, content), + content = lambda: content.to_list() + ["#end"], ) tar_lib = struct( TOOLCHAIN_TYPE = tar.toolchain_type, create_mtree = _create_mtree, - mtree = struct( - line = _mtree_line, - add_directory_with_parents = _add_directory_with_parents, - add_file_with_parents = _add_file_with_parents, - ), common = tar.common, ) diff --git a/distroless/private/util.bzl b/distroless/private/util.bzl new file mode 100644 index 0000000..6bb4cb5 --- /dev/null +++ b/distroless/private/util.bzl @@ -0,0 +1,14 @@ +"util" + +def _get_attr(o, k, d = None): + if k in o: + return o[k] + if hasattr(o, k): + return getattr(o, k) + if d != None: + return d + fail("missing key %s" % k) + +util = struct( + get_attr = _get_attr, +) diff --git a/distroless/tests/asserts.bzl b/distroless/tests/asserts.bzl index eb52fe6..32ba744 100644 --- a/distroless/tests/asserts.bzl +++ b/distroless/tests/asserts.bzl @@ -12,7 +12,7 @@ def assert_tar_listing(name, actual, expected): name = actual_listing, srcs = [actual], outs = ["_{}.listing".format(name)], - cmd = "cat $(execpath {}) | $(BSDTAR_BIN) -cf $@ --format=mtree --options 'cksum,sha1' @-".format(actual), + cmd = "cat $(execpath {}) | $(BSDTAR_BIN) -cf $@ --format=mtree --options 'sha1,!nlink' @-".format(actual), toolchains = ["@bsd_tar_toolchains//:resolved_toolchain"], ) diff --git a/distroless/toolchains.bzl b/distroless/toolchains.bzl index be38e07..d436042 100644 --- a/distroless/toolchains.bzl +++ b/distroless/toolchains.bzl @@ -1,4 +1,7 @@ "macro for registering toolchains required" -def distroless_register_toolchains(name, register = True): - register_tar_toolchains(register = register) +load("@aspect_bazel_lib//lib:repositories.bzl", "register_expand_template_toolchains", "register_tar_toolchains") + +def distroless_register_toolchains(): + register_tar_toolchains() + register_expand_template_toolchains() diff --git a/docs/rules.md b/docs/rules.md index dbc26a2..be72ab0 100644 --- a/docs/rules.md +++ b/docs/rules.md @@ -7,7 +7,7 @@ Public API re-exports ## cacerts
-cacerts(name, package)
+cacerts(name, mode, package, time)
 
Create a ca-certificates.crt bundle from Common CA certificates. @@ -47,7 +47,9 @@ cacerts( | Name | Description | Type | Mandatory | Default | | :------------- | :------------- | :------------- | :------------- | :------------- | | name | A unique name for this target. | Name | required | | +| mode | mode for the entries | String | optional | "0555" | | package | - | Label | required | | +| time | time for the entries | String | optional | "0.0" | @@ -75,7 +77,7 @@ Flatten multiple archives into single archive. ## java_keystore
-java_keystore(name, certificates)
+java_keystore(name, certificates, mode, time)
 
Create a java keystore (database) of cryptographic keys, X.509 certificate chains, and trusted certificates. @@ -90,6 +92,8 @@ Currently only public X.509 are supported as part of the PUBLIC API contract. | :------------- | :------------- | :------------- | :------------- | :------------- | | name | A unique name for this target. | Name | required | | | certificates | - | List of labels | required | | +| mode | mode for the entries | String | optional | "0555" | +| time | time for the entries | String | optional | "0.0" | @@ -140,7 +144,7 @@ locale( ## group
-group(name, groups, kwargs)
+group(name, entries, time, mode, kwargs)
 
Create a group file from array of dicts. @@ -154,7 +158,9 @@ https://www.ibm.com/docs/en/aix/7.2?topic=files-etcgroup-file#group_security__a2 | Name | Description | Default Value | | :------------- | :------------- | :------------- | | name | name of the target | none | -| groups | an array of dicts which will be serialized into single group file. | none | +| entries | an array of dicts which will be serialized into single group file. | none | +| time | time for the entry | "0.0" | +| mode | mode for the entry | "0644" | | kwargs | other named arguments to expanded targets. see [common rule attributes](https://bazel.build/reference/be/common-definitions#common-attributes). | none | @@ -183,7 +189,7 @@ home(name, dirs, name, content, path, kwargs) +os_release(name, content, path, mode, time, kwargs) Create an Operating System Identification file from a key, value dictionary. @@ -199,6 +205,8 @@ https://www.freedesktop.org/software/systemd/man/latest/os-release.html | name | name of the target | none | | content | a key, value dictionary that will be serialized into = seperated lines.

See https://www.freedesktop.org/software/systemd/man/latest/os-release.html#Options for well known keys. | none | | path | where to put the file in the result archive. default: /usr/lib/os-release | "/usr/lib/os-release" | +| mode | mode for the entry | "0555" | +| time | time for the entry | "0" | | kwargs | other named arguments to expanded targets. see [common rule attributes](https://bazel.build/reference/be/common-definitions#common-attributes). | none | @@ -207,7 +215,7 @@ https://www.freedesktop.org/software/systemd/man/latest/os-release.html ## passwd
-passwd(name, passwds, mode, kwargs)
+passwd(name, entries, mode, time, kwargs)
 
Create a passwd file from array of dicts. @@ -221,8 +229,9 @@ https://www.ibm.com/docs/en/aix/7.3?topic=passwords-using-etcpasswd-file | Name | Description | Default Value | | :------------- | :------------- | :------------- | | name | name of the target | none | -| passwds | an array of dicts which will be serialized into single passwd file.

An example;

 dict(gid = 0, uid = 0, home = "/root", shell = "/bin/bash", username = "root") 
| none | -| mode | the mode bits for the passwd file | "644" | +| entries | an array of dicts which will be serialized into single passwd file.

An example;

 dict(gid = 0, uid = 0, home = "/root", shell = "/bin/bash", username = "root") 
| none | +| mode | mode for the entry | "0644" | +| time | time for the entry | "0.0" | | kwargs | other named arguments to expanded targets. see [common rule attributes](https://bazel.build/reference/be/common-definitions#common-attributes). | none | diff --git a/e2e/smoke/MODULE.bazel.lock b/e2e/smoke/MODULE.bazel.lock new file mode 100644 index 0000000..ec33289 --- /dev/null +++ b/e2e/smoke/MODULE.bazel.lock @@ -0,0 +1,852 @@ +{ + "lockFileVersion": 3, + "moduleFileHash": "db5d39be71ce66a953f7bb9b5f35b6b23af2a1b24248ba6d1933b423362bdc16", + "flags": { + "cmdRegistries": [ + "https://bcr.bazel.build/" + ], + "cmdModuleOverrides": {}, + "allowedYankedVersions": [], + "envVarAllowedYankedVersions": "", + "ignoreDevDependency": false, + "directDependenciesMode": "WARNING", + "compatibilityMode": "ERROR" + }, + "localOverrideHashes": { + "bazel_tools": "922ea6752dc9105de5af957f7a99a6933c0a6a712d23df6aad16a9c399f7e787", + "rules_distroless": "ea83ee959b226852f37be4f57dd4d3ba2bc2511150e2fa0360283d5bf370dda6" + }, + "moduleDepGraph": { + "": { + "name": "", + "version": "", + "key": "", + "repoName": "", + "executionPlatformsToRegister": [], + "toolchainsToRegister": [], + "extensionUsages": [], + "deps": { + "rules_distroless": "rules_distroless@_", + "bazel_skylib": "bazel_skylib@1.5.0", + "bazel_tools": "bazel_tools@_", + "local_config_platform": "local_config_platform@_" + } + }, + "rules_distroless@_": { + "name": "rules_distroless", + "version": "0.0.0", + "key": "rules_distroless@_", + "repoName": "rules_distroless", + "executionPlatformsToRegister": [], + "toolchainsToRegister": [], + "extensionUsages": [ + { + "extensionBzlFile": "@aspect_bazel_lib//lib:extensions.bzl", + "extensionName": "toolchains", + "usingModule": "rules_distroless@_", + "location": { + "file": "@@rules_distroless~override//:MODULE.bazel", + "line": 12, + "column": 37 + }, + "imports": { + "bsd_tar_toolchains": "bsd_tar_toolchains" + }, + "devImports": [], + "tags": [ + { + "tagName": "tar", + "attributeValues": {}, + "devDependency": false, + "location": { + "file": "@@rules_distroless~override//:MODULE.bazel", + "line": 13, + "column": 25 + } + } + ], + "hasDevUseExtension": false, + "hasNonDevUseExtension": true + } + ], + "deps": { + "bazel_skylib": "bazel_skylib@1.5.0", + "aspect_bazel_lib": "aspect_bazel_lib@2.5.1", + "bazel_tools": "bazel_tools@_", + "local_config_platform": "local_config_platform@_" + } + }, + "bazel_skylib@1.5.0": { + "name": "bazel_skylib", + "version": "1.5.0", + "key": "bazel_skylib@1.5.0", + "repoName": "bazel_skylib", + "executionPlatformsToRegister": [], + "toolchainsToRegister": [ + "//toolchains/unittest:cmd_toolchain", + "//toolchains/unittest:bash_toolchain" + ], + "extensionUsages": [], + "deps": { + "platforms": "platforms@0.0.8", + "bazel_tools": "bazel_tools@_", + "local_config_platform": "local_config_platform@_" + }, + "repoSpec": { + "bzlFile": "@bazel_tools//tools/build_defs/repo:http.bzl", + "ruleClassName": "http_archive", + "attributes": { + "name": "bazel_skylib~1.5.0", + "urls": [ + "https://github.com/bazelbuild/bazel-skylib/releases/download/1.5.0/bazel-skylib-1.5.0.tar.gz" + ], + "integrity": "sha256-zVWgYudjuTSZIfD124w5MyiNyLpPdt2UFqrGis7jy5Q=", + "strip_prefix": "", + "remote_patches": {}, + "remote_patch_strip": 0 + } + } + }, + "bazel_tools@_": { + "name": "bazel_tools", + "version": "", + "key": "bazel_tools@_", + "repoName": "bazel_tools", + "executionPlatformsToRegister": [], + "toolchainsToRegister": [ + "@local_config_cc_toolchains//:all", + "@local_config_sh//:local_sh_toolchain" + ], + "extensionUsages": [ + { + "extensionBzlFile": "@bazel_tools//tools/cpp:cc_configure.bzl", + "extensionName": "cc_configure_extension", + "usingModule": "bazel_tools@_", + "location": { + "file": "@@bazel_tools//:MODULE.bazel", + "line": 17, + "column": 29 + }, + "imports": { + "local_config_cc": "local_config_cc", + "local_config_cc_toolchains": "local_config_cc_toolchains" + }, + "devImports": [], + "tags": [], + "hasDevUseExtension": false, + "hasNonDevUseExtension": true + }, + { + "extensionBzlFile": "@bazel_tools//tools/osx:xcode_configure.bzl", + "extensionName": "xcode_configure_extension", + "usingModule": "bazel_tools@_", + "location": { + "file": "@@bazel_tools//:MODULE.bazel", + "line": 21, + "column": 32 + }, + "imports": { + "local_config_xcode": "local_config_xcode" + }, + "devImports": [], + "tags": [], + "hasDevUseExtension": false, + "hasNonDevUseExtension": true + }, + { + "extensionBzlFile": "@rules_java//java:extensions.bzl", + "extensionName": "toolchains", + "usingModule": "bazel_tools@_", + "location": { + "file": "@@bazel_tools//:MODULE.bazel", + "line": 24, + "column": 32 + }, + "imports": { + "local_jdk": "local_jdk", + "remote_java_tools": "remote_java_tools", + "remote_java_tools_linux": "remote_java_tools_linux", + "remote_java_tools_windows": "remote_java_tools_windows", + "remote_java_tools_darwin_x86_64": "remote_java_tools_darwin_x86_64", + "remote_java_tools_darwin_arm64": "remote_java_tools_darwin_arm64" + }, + "devImports": [], + "tags": [], + "hasDevUseExtension": false, + "hasNonDevUseExtension": true + }, + { + "extensionBzlFile": "@bazel_tools//tools/sh:sh_configure.bzl", + "extensionName": "sh_configure_extension", + "usingModule": "bazel_tools@_", + "location": { + "file": "@@bazel_tools//:MODULE.bazel", + "line": 35, + "column": 39 + }, + "imports": { + "local_config_sh": "local_config_sh" + }, + "devImports": [], + "tags": [], + "hasDevUseExtension": false, + "hasNonDevUseExtension": true + }, + { + "extensionBzlFile": "@bazel_tools//tools/test:extensions.bzl", + "extensionName": "remote_coverage_tools_extension", + "usingModule": "bazel_tools@_", + "location": { + "file": "@@bazel_tools//:MODULE.bazel", + "line": 39, + "column": 48 + }, + "imports": { + "remote_coverage_tools": "remote_coverage_tools" + }, + "devImports": [], + "tags": [], + "hasDevUseExtension": false, + "hasNonDevUseExtension": true + }, + { + "extensionBzlFile": "@bazel_tools//tools/android:android_extensions.bzl", + "extensionName": "remote_android_tools_extensions", + "usingModule": "bazel_tools@_", + "location": { + "file": "@@bazel_tools//:MODULE.bazel", + "line": 42, + "column": 42 + }, + "imports": { + "android_gmaven_r8": "android_gmaven_r8", + "android_tools": "android_tools" + }, + "devImports": [], + "tags": [], + "hasDevUseExtension": false, + "hasNonDevUseExtension": true + } + ], + "deps": { + "rules_cc": "rules_cc@0.0.9", + "rules_java": "rules_java@7.1.0", + "rules_license": "rules_license@0.0.7", + "rules_proto": "rules_proto@4.0.0", + "rules_python": "rules_python@0.4.0", + "platforms": "platforms@0.0.8", + "com_google_protobuf": "protobuf@3.19.6", + "zlib": "zlib@1.3", + "build_bazel_apple_support": "apple_support@1.5.0", + "local_config_platform": "local_config_platform@_" + } + }, + "local_config_platform@_": { + "name": "local_config_platform", + "version": "", + "key": "local_config_platform@_", + "repoName": "local_config_platform", + "executionPlatformsToRegister": [], + "toolchainsToRegister": [], + "extensionUsages": [], + "deps": { + "platforms": "platforms@0.0.8", + "bazel_tools": "bazel_tools@_" + } + }, + "aspect_bazel_lib@2.5.1": { + "name": "aspect_bazel_lib", + "version": "2.5.1", + "key": "aspect_bazel_lib@2.5.1", + "repoName": "aspect_bazel_lib", + "executionPlatformsToRegister": [], + "toolchainsToRegister": [ + "@copy_directory_toolchains//:all", + "@copy_to_directory_toolchains//:all", + "@jq_toolchains//:all", + "@yq_toolchains//:all", + "@coreutils_toolchains//:all", + "@expand_template_toolchains//:all", + "@bats_toolchains//:all", + "@bsd_tar_toolchains//:linux_amd64_toolchain", + "@bsd_tar_toolchains//:linux_arm64_toolchain", + "@bsd_tar_toolchains//:windows_amd64_toolchain", + "@bsd_tar_toolchains//:host_toolchain" + ], + "extensionUsages": [ + { + "extensionBzlFile": "@aspect_bazel_lib//lib:extensions.bzl", + "extensionName": "toolchains", + "usingModule": "aspect_bazel_lib@2.5.1", + "location": { + "file": "https://bcr.bazel.build/modules/aspect_bazel_lib/2.5.1/MODULE.bazel", + "line": 17, + "column": 37 + }, + "imports": { + "bats_toolchains": "bats_toolchains", + "bsd_tar_toolchains": "bsd_tar_toolchains", + "copy_directory_toolchains": "copy_directory_toolchains", + "copy_to_directory_toolchains": "copy_to_directory_toolchains", + "coreutils_toolchains": "coreutils_toolchains", + "expand_template_toolchains": "expand_template_toolchains", + "jq_toolchains": "jq_toolchains", + "yq_toolchains": "yq_toolchains" + }, + "devImports": [], + "tags": [ + { + "tagName": "copy_directory", + "attributeValues": {}, + "devDependency": false, + "location": { + "file": "https://bcr.bazel.build/modules/aspect_bazel_lib/2.5.1/MODULE.bazel", + "line": 18, + "column": 36 + } + }, + { + "tagName": "copy_to_directory", + "attributeValues": {}, + "devDependency": false, + "location": { + "file": "https://bcr.bazel.build/modules/aspect_bazel_lib/2.5.1/MODULE.bazel", + "line": 19, + "column": 39 + } + }, + { + "tagName": "jq", + "attributeValues": {}, + "devDependency": false, + "location": { + "file": "https://bcr.bazel.build/modules/aspect_bazel_lib/2.5.1/MODULE.bazel", + "line": 20, + "column": 24 + } + }, + { + "tagName": "yq", + "attributeValues": {}, + "devDependency": false, + "location": { + "file": "https://bcr.bazel.build/modules/aspect_bazel_lib/2.5.1/MODULE.bazel", + "line": 21, + "column": 24 + } + }, + { + "tagName": "coreutils", + "attributeValues": {}, + "devDependency": false, + "location": { + "file": "https://bcr.bazel.build/modules/aspect_bazel_lib/2.5.1/MODULE.bazel", + "line": 22, + "column": 31 + } + }, + { + "tagName": "tar", + "attributeValues": {}, + "devDependency": false, + "location": { + "file": "https://bcr.bazel.build/modules/aspect_bazel_lib/2.5.1/MODULE.bazel", + "line": 23, + "column": 25 + } + }, + { + "tagName": "expand_template", + "attributeValues": {}, + "devDependency": false, + "location": { + "file": "https://bcr.bazel.build/modules/aspect_bazel_lib/2.5.1/MODULE.bazel", + "line": 24, + "column": 37 + } + }, + { + "tagName": "bats", + "attributeValues": {}, + "devDependency": false, + "location": { + "file": "https://bcr.bazel.build/modules/aspect_bazel_lib/2.5.1/MODULE.bazel", + "line": 25, + "column": 26 + } + } + ], + "hasDevUseExtension": false, + "hasNonDevUseExtension": true + } + ], + "deps": { + "bazel_skylib": "bazel_skylib@1.5.0", + "platforms": "platforms@0.0.8", + "io_bazel_stardoc": "stardoc@0.5.4", + "bazel_tools": "bazel_tools@_", + "local_config_platform": "local_config_platform@_" + }, + "repoSpec": { + "bzlFile": "@bazel_tools//tools/build_defs/repo:http.bzl", + "ruleClassName": "http_archive", + "attributes": { + "name": "aspect_bazel_lib~2.5.1", + "urls": [ + "https://github.com/aspect-build/bazel-lib/releases/download/v2.5.1/bazel-lib-v2.5.1.tar.gz" + ], + "integrity": "sha256-pZCW4BtD2GxmZ6hp8OkODEsdTLA8PTqXKjL/aHx1CsI=", + "strip_prefix": "bazel-lib-2.5.1", + "remote_patches": { + "https://bcr.bazel.build/modules/aspect_bazel_lib/2.5.1/patches/go_dev_dep.patch": "sha256-KgABwDzOT+DugUHn9tHLOz05osnk2FLsS10d5zqG/M0=", + "https://bcr.bazel.build/modules/aspect_bazel_lib/2.5.1/patches/module_dot_bazel_version.patch": "sha256-ALv7nBoXO2m7QzKKTaITnYqNJlUhF072JYXlHaEPow4=" + }, + "remote_patch_strip": 1 + } + } + }, + "platforms@0.0.8": { + "name": "platforms", + "version": "0.0.8", + "key": "platforms@0.0.8", + "repoName": "platforms", + "executionPlatformsToRegister": [], + "toolchainsToRegister": [], + "extensionUsages": [], + "deps": { + "rules_license": "rules_license@0.0.7", + "bazel_tools": "bazel_tools@_", + "local_config_platform": "local_config_platform@_" + }, + "repoSpec": { + "bzlFile": "@bazel_tools//tools/build_defs/repo:http.bzl", + "ruleClassName": "http_archive", + "attributes": { + "name": "platforms", + "urls": [ + "https://github.com/bazelbuild/platforms/releases/download/0.0.8/platforms-0.0.8.tar.gz" + ], + "integrity": "sha256-gVBAZgU4ns7LbaB8vLUJ1WN6OrmiS8abEQFTE2fYnXQ=", + "strip_prefix": "", + "remote_patches": {}, + "remote_patch_strip": 0 + } + } + }, + "rules_cc@0.0.9": { + "name": "rules_cc", + "version": "0.0.9", + "key": "rules_cc@0.0.9", + "repoName": "rules_cc", + "executionPlatformsToRegister": [], + "toolchainsToRegister": [ + "@local_config_cc_toolchains//:all" + ], + "extensionUsages": [ + { + "extensionBzlFile": "@bazel_tools//tools/cpp:cc_configure.bzl", + "extensionName": "cc_configure_extension", + "usingModule": "rules_cc@0.0.9", + "location": { + "file": "https://bcr.bazel.build/modules/rules_cc/0.0.9/MODULE.bazel", + "line": 9, + "column": 29 + }, + "imports": { + "local_config_cc_toolchains": "local_config_cc_toolchains" + }, + "devImports": [], + "tags": [], + "hasDevUseExtension": false, + "hasNonDevUseExtension": true + } + ], + "deps": { + "platforms": "platforms@0.0.8", + "bazel_tools": "bazel_tools@_", + "local_config_platform": "local_config_platform@_" + }, + "repoSpec": { + "bzlFile": "@bazel_tools//tools/build_defs/repo:http.bzl", + "ruleClassName": "http_archive", + "attributes": { + "name": "rules_cc~0.0.9", + "urls": [ + "https://github.com/bazelbuild/rules_cc/releases/download/0.0.9/rules_cc-0.0.9.tar.gz" + ], + "integrity": "sha256-IDeHW5pEVtzkp50RKorohbvEqtlo5lh9ym5k86CQDN8=", + "strip_prefix": "rules_cc-0.0.9", + "remote_patches": { + "https://bcr.bazel.build/modules/rules_cc/0.0.9/patches/module_dot_bazel_version.patch": "sha256-mM+qzOI0SgAdaJBlWOSMwMPKpaA9b7R37Hj/tp5bb4g=" + }, + "remote_patch_strip": 0 + } + } + }, + "rules_java@7.1.0": { + "name": "rules_java", + "version": "7.1.0", + "key": "rules_java@7.1.0", + "repoName": "rules_java", + "executionPlatformsToRegister": [], + "toolchainsToRegister": [ + "//toolchains:all", + "@local_jdk//:runtime_toolchain_definition", + "@local_jdk//:bootstrap_runtime_toolchain_definition", + "@remotejdk11_linux_toolchain_config_repo//:all", + "@remotejdk11_linux_aarch64_toolchain_config_repo//:all", + "@remotejdk11_linux_ppc64le_toolchain_config_repo//:all", + "@remotejdk11_linux_s390x_toolchain_config_repo//:all", + "@remotejdk11_macos_toolchain_config_repo//:all", + "@remotejdk11_macos_aarch64_toolchain_config_repo//:all", + "@remotejdk11_win_toolchain_config_repo//:all", + "@remotejdk11_win_arm64_toolchain_config_repo//:all", + "@remotejdk17_linux_toolchain_config_repo//:all", + "@remotejdk17_linux_aarch64_toolchain_config_repo//:all", + "@remotejdk17_linux_ppc64le_toolchain_config_repo//:all", + "@remotejdk17_linux_s390x_toolchain_config_repo//:all", + "@remotejdk17_macos_toolchain_config_repo//:all", + "@remotejdk17_macos_aarch64_toolchain_config_repo//:all", + "@remotejdk17_win_toolchain_config_repo//:all", + "@remotejdk17_win_arm64_toolchain_config_repo//:all", + "@remotejdk21_linux_toolchain_config_repo//:all", + "@remotejdk21_linux_aarch64_toolchain_config_repo//:all", + "@remotejdk21_macos_toolchain_config_repo//:all", + "@remotejdk21_macos_aarch64_toolchain_config_repo//:all", + "@remotejdk21_win_toolchain_config_repo//:all" + ], + "extensionUsages": [ + { + "extensionBzlFile": "@rules_java//java:extensions.bzl", + "extensionName": "toolchains", + "usingModule": "rules_java@7.1.0", + "location": { + "file": "https://bcr.bazel.build/modules/rules_java/7.1.0/MODULE.bazel", + "line": 19, + "column": 27 + }, + "imports": { + "remote_java_tools": "remote_java_tools", + "remote_java_tools_linux": "remote_java_tools_linux", + "remote_java_tools_windows": "remote_java_tools_windows", + "remote_java_tools_darwin_x86_64": "remote_java_tools_darwin_x86_64", + "remote_java_tools_darwin_arm64": "remote_java_tools_darwin_arm64", + "local_jdk": "local_jdk", + "remotejdk11_linux_toolchain_config_repo": "remotejdk11_linux_toolchain_config_repo", + "remotejdk11_linux_aarch64_toolchain_config_repo": "remotejdk11_linux_aarch64_toolchain_config_repo", + "remotejdk11_linux_ppc64le_toolchain_config_repo": "remotejdk11_linux_ppc64le_toolchain_config_repo", + "remotejdk11_linux_s390x_toolchain_config_repo": "remotejdk11_linux_s390x_toolchain_config_repo", + "remotejdk11_macos_toolchain_config_repo": "remotejdk11_macos_toolchain_config_repo", + "remotejdk11_macos_aarch64_toolchain_config_repo": "remotejdk11_macos_aarch64_toolchain_config_repo", + "remotejdk11_win_toolchain_config_repo": "remotejdk11_win_toolchain_config_repo", + "remotejdk11_win_arm64_toolchain_config_repo": "remotejdk11_win_arm64_toolchain_config_repo", + "remotejdk17_linux_toolchain_config_repo": "remotejdk17_linux_toolchain_config_repo", + "remotejdk17_linux_aarch64_toolchain_config_repo": "remotejdk17_linux_aarch64_toolchain_config_repo", + "remotejdk17_linux_ppc64le_toolchain_config_repo": "remotejdk17_linux_ppc64le_toolchain_config_repo", + "remotejdk17_linux_s390x_toolchain_config_repo": "remotejdk17_linux_s390x_toolchain_config_repo", + "remotejdk17_macos_toolchain_config_repo": "remotejdk17_macos_toolchain_config_repo", + "remotejdk17_macos_aarch64_toolchain_config_repo": "remotejdk17_macos_aarch64_toolchain_config_repo", + "remotejdk17_win_toolchain_config_repo": "remotejdk17_win_toolchain_config_repo", + "remotejdk17_win_arm64_toolchain_config_repo": "remotejdk17_win_arm64_toolchain_config_repo", + "remotejdk21_linux_toolchain_config_repo": "remotejdk21_linux_toolchain_config_repo", + "remotejdk21_linux_aarch64_toolchain_config_repo": "remotejdk21_linux_aarch64_toolchain_config_repo", + "remotejdk21_macos_toolchain_config_repo": "remotejdk21_macos_toolchain_config_repo", + "remotejdk21_macos_aarch64_toolchain_config_repo": "remotejdk21_macos_aarch64_toolchain_config_repo", + "remotejdk21_win_toolchain_config_repo": "remotejdk21_win_toolchain_config_repo" + }, + "devImports": [], + "tags": [], + "hasDevUseExtension": false, + "hasNonDevUseExtension": true + } + ], + "deps": { + "platforms": "platforms@0.0.8", + "rules_cc": "rules_cc@0.0.9", + "bazel_skylib": "bazel_skylib@1.5.0", + "rules_proto": "rules_proto@4.0.0", + "rules_license": "rules_license@0.0.7", + "bazel_tools": "bazel_tools@_", + "local_config_platform": "local_config_platform@_" + }, + "repoSpec": { + "bzlFile": "@bazel_tools//tools/build_defs/repo:http.bzl", + "ruleClassName": "http_archive", + "attributes": { + "name": "rules_java~7.1.0", + "urls": [ + "https://github.com/bazelbuild/rules_java/releases/download/7.1.0/rules_java-7.1.0.tar.gz" + ], + "integrity": "sha256-o3pOX2OrgnFuXdau75iO2EYcegC46TYnImKJn1h81OE=", + "strip_prefix": "", + "remote_patches": {}, + "remote_patch_strip": 0 + } + } + }, + "rules_license@0.0.7": { + "name": "rules_license", + "version": "0.0.7", + "key": "rules_license@0.0.7", + "repoName": "rules_license", + "executionPlatformsToRegister": [], + "toolchainsToRegister": [], + "extensionUsages": [], + "deps": { + "bazel_tools": "bazel_tools@_", + "local_config_platform": "local_config_platform@_" + }, + "repoSpec": { + "bzlFile": "@bazel_tools//tools/build_defs/repo:http.bzl", + "ruleClassName": "http_archive", + "attributes": { + "name": "rules_license~0.0.7", + "urls": [ + "https://github.com/bazelbuild/rules_license/releases/download/0.0.7/rules_license-0.0.7.tar.gz" + ], + "integrity": "sha256-RTHezLkTY5ww5cdRKgVNXYdWmNrrddjPkPKEN1/nw2A=", + "strip_prefix": "", + "remote_patches": {}, + "remote_patch_strip": 0 + } + } + }, + "rules_proto@4.0.0": { + "name": "rules_proto", + "version": "4.0.0", + "key": "rules_proto@4.0.0", + "repoName": "rules_proto", + "executionPlatformsToRegister": [], + "toolchainsToRegister": [], + "extensionUsages": [], + "deps": { + "bazel_skylib": "bazel_skylib@1.5.0", + "rules_cc": "rules_cc@0.0.9", + "bazel_tools": "bazel_tools@_", + "local_config_platform": "local_config_platform@_" + }, + "repoSpec": { + "bzlFile": "@bazel_tools//tools/build_defs/repo:http.bzl", + "ruleClassName": "http_archive", + "attributes": { + "name": "rules_proto~4.0.0", + "urls": [ + "https://github.com/bazelbuild/rules_proto/archive/refs/tags/4.0.0.zip" + ], + "integrity": "sha256-Lr5z6xyuRA19pNtRYMGjKaynwQpck4H/lwYyVjyhoq4=", + "strip_prefix": "rules_proto-4.0.0", + "remote_patches": { + "https://bcr.bazel.build/modules/rules_proto/4.0.0/patches/module_dot_bazel.patch": "sha256-MclJO7tIAM2ElDAmscNId9pKTpOuDGHgVlW/9VBOIp0=" + }, + "remote_patch_strip": 0 + } + } + }, + "rules_python@0.4.0": { + "name": "rules_python", + "version": "0.4.0", + "key": "rules_python@0.4.0", + "repoName": "rules_python", + "executionPlatformsToRegister": [], + "toolchainsToRegister": [ + "@bazel_tools//tools/python:autodetecting_toolchain" + ], + "extensionUsages": [ + { + "extensionBzlFile": "@rules_python//bzlmod:extensions.bzl", + "extensionName": "pip_install", + "usingModule": "rules_python@0.4.0", + "location": { + "file": "https://bcr.bazel.build/modules/rules_python/0.4.0/MODULE.bazel", + "line": 7, + "column": 28 + }, + "imports": { + "pypi__click": "pypi__click", + "pypi__pip": "pypi__pip", + "pypi__pip_tools": "pypi__pip_tools", + "pypi__pkginfo": "pypi__pkginfo", + "pypi__setuptools": "pypi__setuptools", + "pypi__wheel": "pypi__wheel" + }, + "devImports": [], + "tags": [], + "hasDevUseExtension": false, + "hasNonDevUseExtension": true + } + ], + "deps": { + "bazel_tools": "bazel_tools@_", + "local_config_platform": "local_config_platform@_" + }, + "repoSpec": { + "bzlFile": "@bazel_tools//tools/build_defs/repo:http.bzl", + "ruleClassName": "http_archive", + "attributes": { + "name": "rules_python~0.4.0", + "urls": [ + "https://github.com/bazelbuild/rules_python/releases/download/0.4.0/rules_python-0.4.0.tar.gz" + ], + "integrity": "sha256-lUqom0kb5KCDMEosuDgBnIuMNyCnq7nEy4GseiQjDOo=", + "strip_prefix": "", + "remote_patches": { + "https://bcr.bazel.build/modules/rules_python/0.4.0/patches/propagate_pip_install_dependencies.patch": "sha256-v7S/dem/mixg63MF4KoRGDA4KEol9ab/tIVp+6Xq0D0=", + "https://bcr.bazel.build/modules/rules_python/0.4.0/patches/module_dot_bazel.patch": "sha256-kG4VIfWxQazzTuh50mvsx6pmyoRVA4lfH5rkto/Oq+Y=" + }, + "remote_patch_strip": 1 + } + } + }, + "protobuf@3.19.6": { + "name": "protobuf", + "version": "3.19.6", + "key": "protobuf@3.19.6", + "repoName": "protobuf", + "executionPlatformsToRegister": [], + "toolchainsToRegister": [], + "extensionUsages": [], + "deps": { + "bazel_skylib": "bazel_skylib@1.5.0", + "zlib": "zlib@1.3", + "rules_python": "rules_python@0.4.0", + "rules_cc": "rules_cc@0.0.9", + "rules_proto": "rules_proto@4.0.0", + "rules_java": "rules_java@7.1.0", + "bazel_tools": "bazel_tools@_", + "local_config_platform": "local_config_platform@_" + }, + "repoSpec": { + "bzlFile": "@bazel_tools//tools/build_defs/repo:http.bzl", + "ruleClassName": "http_archive", + "attributes": { + "name": "protobuf~3.19.6", + "urls": [ + "https://github.com/protocolbuffers/protobuf/archive/refs/tags/v3.19.6.zip" + ], + "integrity": "sha256-OH4sVZuyx8G8N5jE5s/wFTgaebJ1hpavy/johzC0c4k=", + "strip_prefix": "protobuf-3.19.6", + "remote_patches": { + "https://bcr.bazel.build/modules/protobuf/3.19.6/patches/relative_repo_names.patch": "sha256-w/5gw/zGv8NFId+669hcdw1Uus2lxgYpulATHIwIByI=", + "https://bcr.bazel.build/modules/protobuf/3.19.6/patches/remove_dependency_on_rules_jvm_external.patch": "sha256-THUTnVgEBmjA0W7fKzIyZOVG58DnW9HQTkr4D2zKUUc=", + "https://bcr.bazel.build/modules/protobuf/3.19.6/patches/add_module_dot_bazel_for_examples.patch": "sha256-s/b1gi3baK3LsXefI2rQilhmkb2R5jVJdnT6zEcdfHY=", + "https://bcr.bazel.build/modules/protobuf/3.19.6/patches/module_dot_bazel.patch": "sha256-S0DEni8zgx7rHscW3z/rCEubQnYec0XhNet640cw0h4=" + }, + "remote_patch_strip": 1 + } + } + }, + "zlib@1.3": { + "name": "zlib", + "version": "1.3", + "key": "zlib@1.3", + "repoName": "zlib", + "executionPlatformsToRegister": [], + "toolchainsToRegister": [], + "extensionUsages": [], + "deps": { + "platforms": "platforms@0.0.8", + "rules_cc": "rules_cc@0.0.9", + "bazel_tools": "bazel_tools@_", + "local_config_platform": "local_config_platform@_" + }, + "repoSpec": { + "bzlFile": "@bazel_tools//tools/build_defs/repo:http.bzl", + "ruleClassName": "http_archive", + "attributes": { + "name": "zlib~1.3", + "urls": [ + "https://github.com/madler/zlib/releases/download/v1.3/zlib-1.3.tar.gz" + ], + "integrity": "sha256-/wukwpIBPbwnUws6geH5qBPNOd4Byl4Pi/NVcC76WT4=", + "strip_prefix": "zlib-1.3", + "remote_patches": { + "https://bcr.bazel.build/modules/zlib/1.3/patches/add_build_file.patch": "sha256-Ei+FYaaOo7A3jTKunMEodTI0Uw5NXQyZEcboMC8JskY=", + "https://bcr.bazel.build/modules/zlib/1.3/patches/module_dot_bazel.patch": "sha256-fPWLM+2xaF/kuy+kZc1YTfW6hNjrkG400Ho7gckuyJk=" + }, + "remote_patch_strip": 0 + } + } + }, + "apple_support@1.5.0": { + "name": "apple_support", + "version": "1.5.0", + "key": "apple_support@1.5.0", + "repoName": "build_bazel_apple_support", + "executionPlatformsToRegister": [], + "toolchainsToRegister": [ + "@local_config_apple_cc_toolchains//:all" + ], + "extensionUsages": [ + { + "extensionBzlFile": "@build_bazel_apple_support//crosstool:setup.bzl", + "extensionName": "apple_cc_configure_extension", + "usingModule": "apple_support@1.5.0", + "location": { + "file": "https://bcr.bazel.build/modules/apple_support/1.5.0/MODULE.bazel", + "line": 17, + "column": 35 + }, + "imports": { + "local_config_apple_cc": "local_config_apple_cc", + "local_config_apple_cc_toolchains": "local_config_apple_cc_toolchains" + }, + "devImports": [], + "tags": [], + "hasDevUseExtension": false, + "hasNonDevUseExtension": true + } + ], + "deps": { + "bazel_skylib": "bazel_skylib@1.5.0", + "platforms": "platforms@0.0.8", + "bazel_tools": "bazel_tools@_", + "local_config_platform": "local_config_platform@_" + }, + "repoSpec": { + "bzlFile": "@bazel_tools//tools/build_defs/repo:http.bzl", + "ruleClassName": "http_archive", + "attributes": { + "name": "apple_support~1.5.0", + "urls": [ + "https://github.com/bazelbuild/apple_support/releases/download/1.5.0/apple_support.1.5.0.tar.gz" + ], + "integrity": "sha256-miM41vja0yRPgj8txghKA+TQ+7J8qJLclw5okNW0gYQ=", + "strip_prefix": "", + "remote_patches": {}, + "remote_patch_strip": 0 + } + } + }, + "stardoc@0.5.4": { + "name": "stardoc", + "version": "0.5.4", + "key": "stardoc@0.5.4", + "repoName": "stardoc", + "executionPlatformsToRegister": [], + "toolchainsToRegister": [], + "extensionUsages": [], + "deps": { + "bazel_skylib": "bazel_skylib@1.5.0", + "rules_java": "rules_java@7.1.0", + "rules_license": "rules_license@0.0.7", + "bazel_tools": "bazel_tools@_", + "local_config_platform": "local_config_platform@_" + }, + "repoSpec": { + "bzlFile": "@bazel_tools//tools/build_defs/repo:http.bzl", + "ruleClassName": "http_archive", + "attributes": { + "name": "stardoc~0.5.4", + "urls": [ + "https://github.com/bazelbuild/stardoc/releases/download/0.5.4/stardoc-0.5.4.tar.gz" + ], + "integrity": "sha256-7FcTnkZvquVj8vw5YJ2klIpHm7UbbWeu3X2bG4BZxDM=", + "strip_prefix": "", + "remote_patches": {}, + "remote_patch_strip": 0 + } + } + } + }, + "moduleExtensions": {} +} diff --git a/e2e/smoke/WORKSPACE.bazel b/e2e/smoke/WORKSPACE.bazel index c2fd208..6dca692 100644 --- a/e2e/smoke/WORKSPACE.bazel +++ b/e2e/smoke/WORKSPACE.bazel @@ -14,6 +14,6 @@ local_repository( # you should fetch it *before* calling this. # Alternatively, you can skip calling this function, so long as you've # already fetched all the dependencies. -load("@rules_distroless//distroless:dependencies.bzl", "rules_distroless_dependencies") +load("@rules_distroless//distroless:dependencies.bzl", "distroless_dependencies") -rules_distroless_dependencies() +distroless_dependencies() diff --git a/examples/cacerts/BUILD.bazel b/examples/cacerts/BUILD.bazel index 373d91c..865d349 100644 --- a/examples/cacerts/BUILD.bazel +++ b/examples/cacerts/BUILD.bazel @@ -14,11 +14,11 @@ assert_tar_listing( ./etc time=0.0 mode=755 gid=0 uid=0 type=dir ./etc/ssl time=0.0 mode=755 gid=0 uid=0 type=dir ./etc/ssl/certs time=0.0 mode=755 gid=0 uid=0 type=dir -./etc/ssl/certs/ca-certificates.crt nlink=0 time=0.0 mode=755 gid=0 uid=0 type=file size=200313 cksum=3175436394 sha1digest=01b4ff230afaeeda5cddaf9a002cec9bc9a6d1b4 +./etc/ssl/certs/ca-certificates.crt time=0.0 mode=555 gid=0 uid=0 type=file size=200313 sha1digest=01b4ff230afaeeda5cddaf9a002cec9bc9a6d1b4 ./usr time=0.0 mode=755 gid=0 uid=0 type=dir ./usr/share time=0.0 mode=755 gid=0 uid=0 type=dir ./usr/share/doc time=0.0 mode=755 gid=0 uid=0 type=dir ./usr/share/doc/ca-certificates time=0.0 mode=755 gid=0 uid=0 type=dir -./usr/share/doc/ca-certificates/copyright nlink=0 time=0.0 mode=755 gid=0 uid=0 type=file size=18940 cksum=3142022593 sha1digest=4c49e10ddbcfc0f36816df7f9cb503d665621017 +./usr/share/doc/ca-certificates/copyright time=0.0 mode=555 gid=0 uid=0 type=file size=18940 sha1digest=4c49e10ddbcfc0f36816df7f9cb503d665621017 """, ) diff --git a/examples/flatten/BUILD.bazel b/examples/flatten/BUILD.bazel index f522124..31892a3 100644 --- a/examples/flatten/BUILD.bazel +++ b/examples/flatten/BUILD.bazel @@ -4,7 +4,7 @@ load("//distroless/tests:asserts.bzl", "assert_tar_listing") passwd( name = "passwd", - passwds = [ + entries = [ { "gecos": ["root"], "gid": 0, @@ -52,14 +52,13 @@ assert_tar_listing( actual = "flatten", expected = """\ #mtree -./etc/passwd nlink=0 time=0.0 mode=644 gid=0 uid=0 type=file size=34 cksum=3470383902 sha1digest=240bc4b96dc5e13ffcc715bda7aaa9665fc1069c +./etc/passwd time=0.0 mode=644 gid=0 uid=0 type=file size=34 sha1digest=240bc4b96dc5e13ffcc715bda7aaa9665fc1069c ./examples time=1672560000.0 mode=755 gid=0 uid=0 type=dir ./examples/flatten time=1672560000.0 mode=755 gid=0 uid=0 type=dir ./examples/flatten/dir time=1672560000.0 mode=755 gid=0 uid=0 type=dir -./examples/flatten/dir/changelog nlink=0 time=1672560000.0 mode=755 gid=0 uid=0 type=file size=0 cksum=4294967295 sha1digest=da39a3ee5e6b4b0d3255bfef95601890afd80709 +./examples/flatten/dir/changelog time=1672560000.0 mode=755 gid=0 uid=0 type=file size=0 sha1digest=da39a3ee5e6b4b0d3255bfef95601890afd80709 ./examples/flatten/dir/sub time=1672560000.0 mode=755 gid=0 uid=0 type=dir -./examples/flatten/dir/sub/content.txt nlink=0 time=1672560000.0 mode=755 gid=0 uid=0 type=file size=0 cksum=4294967295 sha1digest=da39a3ee5e6b4b0d3255bfef95601890afd80709 -./home time=0.0 mode=700 gid=666 uid=666 type=dir +./examples/flatten/dir/sub/content.txt time=1672560000.0 mode=755 gid=0 uid=0 type=file size=0 sha1digest=da39a3ee5e6b4b0d3255bfef95601890afd80709 ./home/nonroot time=0.0 mode=700 gid=666 uid=666 type=dir ./root time=0.0 mode=700 gid=0 uid=0 type=dir """, diff --git a/examples/group/BUILD.bazel b/examples/group/BUILD.bazel index 565f5c8..68265c9 100644 --- a/examples/group/BUILD.bazel +++ b/examples/group/BUILD.bazel @@ -4,7 +4,7 @@ load("//distroless/tests:asserts.bzl", "assert_tar_listing") group( name = "group", - groups = [ + entries = [ # https://www.ibm.com/docs/kk/aix/7.2?topic=files-etcgroup-file#group_security__a3179518__title__1 dict( name = "root", @@ -37,6 +37,6 @@ assert_tar_listing( actual = "group", expected = """\ #mtree -./etc/group nlink=0 time=0.0 mode=644 gid=0 uid=0 type=file size=46 cksum=1308212548 sha1digest=73eab1fb5cf810c5811e9594a9180bee97011ed1 +./etc/group time=0.0 mode=644 gid=0 uid=0 type=file size=46 sha1digest=73eab1fb5cf810c5811e9594a9180bee97011ed1 """, ) diff --git a/examples/home/BUILD.bazel b/examples/home/BUILD.bazel index d5c107e..331331e 100644 --- a/examples/home/BUILD.bazel +++ b/examples/home/BUILD.bazel @@ -22,7 +22,6 @@ assert_tar_listing( actual = "home", expected = """\ #mtree -./home time=0.0 mode=700 gid=666 uid=666 type=dir ./home/nonroot time=0.0 mode=700 gid=666 uid=666 type=dir ./root time=0.0 mode=700 gid=0 uid=0 type=dir """, diff --git a/examples/java_keystore/BUILD.bazel b/examples/java_keystore/BUILD.bazel index 1623d53..a8efdca 100644 --- a/examples/java_keystore/BUILD.bazel +++ b/examples/java_keystore/BUILD.bazel @@ -28,10 +28,10 @@ assert_tar_listing( actual = "java_keystore", expected = """\ #mtree -./etc time=0.0 mode=755 gid=0 uid=0 type=dir -./etc/ssl time=0.0 mode=755 gid=0 uid=0 type=dir -./etc/ssl/certs time=0.0 mode=755 gid=0 uid=0 type=dir -./etc/ssl/certs/java time=0.0 mode=755 gid=0 uid=0 type=dir -./etc/ssl/certs/java/cacerts nlink=0 time=0.0 mode=755 gid=0 uid=0 type=file size=5349 cksum=3752477219 sha1digest=015078faa5537fcabb6c7e73fe2dedf8241b106d +./etc time=0.0 mode=555 gid=0 uid=0 type=dir +./etc/ssl time=0.0 mode=555 gid=0 uid=0 type=dir +./etc/ssl/certs time=0.0 mode=555 gid=0 uid=0 type=dir +./etc/ssl/certs/java time=0.0 mode=555 gid=0 uid=0 type=dir +./etc/ssl/certs/java/cacerts time=0.0 mode=555 gid=0 uid=0 type=file size=5349 sha1digest=015078faa5537fcabb6c7e73fe2dedf8241b106d """, ) diff --git a/examples/locale/BUILD.bazel b/examples/locale/BUILD.bazel index 7daede0..752917b 100644 --- a/examples/locale/BUILD.bazel +++ b/examples/locale/BUILD.bazel @@ -16,23 +16,23 @@ assert_tar_listing( ./usr/lib gname=root uname=root time=1696278177.0 mode=755 gid=0 uid=0 type=dir ./usr/lib/locale gname=root uname=root time=1696278177.0 mode=755 gid=0 uid=0 type=dir ./usr/lib/locale/C.UTF-8 gname=root uname=root time=1696278177.0 mode=755 gid=0 uid=0 type=dir -./usr/lib/locale/C.UTF-8/LC_ADDRESS nlink=0 gname=root uname=root time=1696278177.0 mode=644 gid=0 uid=0 type=file size=131 cksum=1894526643 sha1digest=e17f64601d95342e6977b3fe6779532c8a67a765 -./usr/lib/locale/C.UTF-8/LC_COLLATE nlink=0 gname=root uname=root time=1696278177.0 mode=644 gid=0 uid=0 type=file size=1519554 cksum=1748289584 sha1digest=5e4c048c98c444ac74ee722fc98a5a83b12c53e2 -./usr/lib/locale/C.UTF-8/LC_CTYPE nlink=0 gname=root uname=root time=1696278177.0 mode=644 gid=0 uid=0 type=file size=346132 cksum=1310021308 sha1digest=6a1ad80ed9b5b267137260eceb61ba2377a9d402 -./usr/lib/locale/C.UTF-8/LC_IDENTIFICATION nlink=0 gname=root uname=root time=1696278177.0 mode=644 gid=0 uid=0 type=file size=252 cksum=1126724133 sha1digest=7e5c3b48f452c3bd65d3185db6d568f83bdaa976 -./usr/lib/locale/C.UTF-8/LC_MEASUREMENT nlink=0 gname=root uname=root time=1696278177.0 mode=644 gid=0 uid=0 type=file size=23 cksum=2832611415 sha1digest=0a7d0d264f9ded94057020e807bfaa13a7573821 -./usr/lib/locale/C.UTF-8/LC_MONETARY nlink=0 gname=root uname=root time=1696278177.0 mode=644 gid=0 uid=0 type=file size=270 cksum=2346951072 sha1digest=e15e804a83f37be7902e75fe50b4791a32d8d1c0 -./usr/lib/locale/C.UTF-8/LC_NAME nlink=0 gname=root uname=root time=1696278177.0 mode=644 gid=0 uid=0 type=file size=62 cksum=4205828947 sha1digest=b5d16f1042c3c1c4bef85766aa2c20c1b0d8cff6 -./usr/lib/locale/C.UTF-8/LC_NUMERIC nlink=0 gname=root uname=root time=1696278177.0 mode=644 gid=0 uid=0 type=file size=50 cksum=1826161129 sha1digest=1bd2f3db04022b8cfe5cd7a7f90176f191e19425 -./usr/lib/locale/C.UTF-8/LC_PAPER nlink=0 gname=root uname=root time=1696278177.0 mode=644 gid=0 uid=0 type=file size=34 cksum=1931305775 sha1digest=567aaf639393135b76e22e72aaee1df95764e990 -./usr/lib/locale/C.UTF-8/LC_TELEPHONE nlink=0 gname=root uname=root time=1696278177.0 mode=644 gid=0 uid=0 type=file size=47 cksum=1105692602 sha1digest=3316c99e183186c5cad97a71674ef7431c3da845 -./usr/lib/locale/C.UTF-8/LC_TIME nlink=0 gname=root uname=root time=1696278177.0 mode=644 gid=0 uid=0 type=file size=3360 cksum=1452496685 sha1digest=e619a4db877e0b54fa14b8a3992da2b561b3239b +./usr/lib/locale/C.UTF-8/LC_ADDRESS gname=root uname=root time=1696278177.0 mode=644 gid=0 uid=0 type=file size=131 sha1digest=e17f64601d95342e6977b3fe6779532c8a67a765 +./usr/lib/locale/C.UTF-8/LC_COLLATE gname=root uname=root time=1696278177.0 mode=644 gid=0 uid=0 type=file size=1519554 sha1digest=5e4c048c98c444ac74ee722fc98a5a83b12c53e2 +./usr/lib/locale/C.UTF-8/LC_CTYPE gname=root uname=root time=1696278177.0 mode=644 gid=0 uid=0 type=file size=346132 sha1digest=6a1ad80ed9b5b267137260eceb61ba2377a9d402 +./usr/lib/locale/C.UTF-8/LC_IDENTIFICATION gname=root uname=root time=1696278177.0 mode=644 gid=0 uid=0 type=file size=252 sha1digest=7e5c3b48f452c3bd65d3185db6d568f83bdaa976 +./usr/lib/locale/C.UTF-8/LC_MEASUREMENT gname=root uname=root time=1696278177.0 mode=644 gid=0 uid=0 type=file size=23 sha1digest=0a7d0d264f9ded94057020e807bfaa13a7573821 +./usr/lib/locale/C.UTF-8/LC_MONETARY gname=root uname=root time=1696278177.0 mode=644 gid=0 uid=0 type=file size=270 sha1digest=e15e804a83f37be7902e75fe50b4791a32d8d1c0 +./usr/lib/locale/C.UTF-8/LC_NAME gname=root uname=root time=1696278177.0 mode=644 gid=0 uid=0 type=file size=62 sha1digest=b5d16f1042c3c1c4bef85766aa2c20c1b0d8cff6 +./usr/lib/locale/C.UTF-8/LC_NUMERIC gname=root uname=root time=1696278177.0 mode=644 gid=0 uid=0 type=file size=50 sha1digest=1bd2f3db04022b8cfe5cd7a7f90176f191e19425 +./usr/lib/locale/C.UTF-8/LC_PAPER gname=root uname=root time=1696278177.0 mode=644 gid=0 uid=0 type=file size=34 sha1digest=567aaf639393135b76e22e72aaee1df95764e990 +./usr/lib/locale/C.UTF-8/LC_TELEPHONE gname=root uname=root time=1696278177.0 mode=644 gid=0 uid=0 type=file size=47 sha1digest=3316c99e183186c5cad97a71674ef7431c3da845 +./usr/lib/locale/C.UTF-8/LC_TIME gname=root uname=root time=1696278177.0 mode=644 gid=0 uid=0 type=file size=3360 sha1digest=e619a4db877e0b54fa14b8a3992da2b561b3239b ./usr/lib/locale/C.UTF-8/LC_MESSAGES gname=root uname=root time=1696278177.0 mode=755 gid=0 uid=0 type=dir -./usr/lib/locale/C.UTF-8/LC_MESSAGES/SYS_LC_MESSAGES nlink=0 gname=root uname=root time=1696278177.0 mode=644 gid=0 uid=0 type=file size=48 cksum=1913332552 sha1digest=574d7e92bedf1373ec9506859b0d55ee7babbf20 +./usr/lib/locale/C.UTF-8/LC_MESSAGES/SYS_LC_MESSAGES gname=root uname=root time=1696278177.0 mode=644 gid=0 uid=0 type=file size=48 sha1digest=574d7e92bedf1373ec9506859b0d55ee7babbf20 ./usr/share gname=root uname=root time=1696278177.0 mode=755 gid=0 uid=0 type=dir ./usr/share/doc gname=root uname=root time=1696278177.0 mode=755 gid=0 uid=0 type=dir ./usr/share/doc/libc-bin gname=root uname=root time=1696278177.0 mode=755 gid=0 uid=0 type=dir -./usr/share/doc/libc-bin/copyright nlink=0 gname=root uname=root time=1663877162.0 mode=644 gid=0 uid=0 type=file size=25467 cksum=3366629126 sha1digest=5c4df62d190848821200ce4041d2753bd431a7eb +./usr/share/doc/libc-bin/copyright gname=root uname=root time=1663877162.0 mode=644 gid=0 uid=0 type=file size=25467 sha1digest=5c4df62d190848821200ce4041d2753bd431a7eb """, ) @@ -50,22 +50,22 @@ assert_tar_listing( ./usr/lib gname=root uname=root time=1696062665.0 mode=755 gid=0 uid=0 type=dir ./usr/lib/locale gname=root uname=root time=1696062665.0 mode=755 gid=0 uid=0 type=dir ./usr/lib/locale/C.utf8 gname=root uname=root time=1696062665.0 mode=755 gid=0 uid=0 type=dir -./usr/lib/locale/C.utf8/LC_ADDRESS nlink=0 gname=root uname=root time=1696062665.0 mode=644 gid=0 uid=0 type=file size=127 cksum=3322408091 sha1digest=12d0e0600557e0dcb3c64e56894b81230e2eaa72 -./usr/lib/locale/C.utf8/LC_COLLATE nlink=0 gname=root uname=root time=1696062665.0 mode=644 gid=0 uid=0 type=file size=1406 cksum=3234458588 sha1digest=f245e3207984879d0b736c9aa42f4268e27221b9 -./usr/lib/locale/C.utf8/LC_CTYPE nlink=0 gname=root uname=root time=1696062665.0 mode=644 gid=0 uid=0 type=file size=353616 cksum=186081347 sha1digest=86e9c921184546cc60c20c150de13f3da4266304 -./usr/lib/locale/C.utf8/LC_IDENTIFICATION nlink=0 gname=root uname=root time=1696062665.0 mode=644 gid=0 uid=0 type=file size=258 cksum=1453913099 sha1digest=1eeec3b2cb259530d76ef717e24af0fd34d94624 -./usr/lib/locale/C.utf8/LC_MEASUREMENT nlink=0 gname=root uname=root time=1696062665.0 mode=644 gid=0 uid=0 type=file size=23 cksum=2832611415 sha1digest=0a7d0d264f9ded94057020e807bfaa13a7573821 -./usr/lib/locale/C.utf8/LC_MONETARY nlink=0 gname=root uname=root time=1696062665.0 mode=644 gid=0 uid=0 type=file size=270 cksum=3013307797 sha1digest=110ed47e32d65c61ab8240202faa2114d025a009 -./usr/lib/locale/C.utf8/LC_NAME nlink=0 gname=root uname=root time=1696062665.0 mode=644 gid=0 uid=0 type=file size=62 cksum=4205828947 sha1digest=b5d16f1042c3c1c4bef85766aa2c20c1b0d8cff6 -./usr/lib/locale/C.utf8/LC_NUMERIC nlink=0 gname=root uname=root time=1696062665.0 mode=644 gid=0 uid=0 type=file size=50 cksum=1826161129 sha1digest=1bd2f3db04022b8cfe5cd7a7f90176f191e19425 -./usr/lib/locale/C.utf8/LC_PAPER nlink=0 gname=root uname=root time=1696062665.0 mode=644 gid=0 uid=0 type=file size=34 cksum=1931305775 sha1digest=567aaf639393135b76e22e72aaee1df95764e990 -./usr/lib/locale/C.utf8/LC_TELEPHONE nlink=0 gname=root uname=root time=1696062665.0 mode=644 gid=0 uid=0 type=file size=47 cksum=1105692602 sha1digest=3316c99e183186c5cad97a71674ef7431c3da845 -./usr/lib/locale/C.utf8/LC_TIME nlink=0 gname=root uname=root time=1696062665.0 mode=644 gid=0 uid=0 type=file size=3360 cksum=1452496685 sha1digest=e619a4db877e0b54fa14b8a3992da2b561b3239b +./usr/lib/locale/C.utf8/LC_ADDRESS gname=root uname=root time=1696062665.0 mode=644 gid=0 uid=0 type=file size=127 sha1digest=12d0e0600557e0dcb3c64e56894b81230e2eaa72 +./usr/lib/locale/C.utf8/LC_COLLATE gname=root uname=root time=1696062665.0 mode=644 gid=0 uid=0 type=file size=1406 sha1digest=f245e3207984879d0b736c9aa42f4268e27221b9 +./usr/lib/locale/C.utf8/LC_CTYPE gname=root uname=root time=1696062665.0 mode=644 gid=0 uid=0 type=file size=353616 sha1digest=86e9c921184546cc60c20c150de13f3da4266304 +./usr/lib/locale/C.utf8/LC_IDENTIFICATION gname=root uname=root time=1696062665.0 mode=644 gid=0 uid=0 type=file size=258 sha1digest=1eeec3b2cb259530d76ef717e24af0fd34d94624 +./usr/lib/locale/C.utf8/LC_MEASUREMENT gname=root uname=root time=1696062665.0 mode=644 gid=0 uid=0 type=file size=23 sha1digest=0a7d0d264f9ded94057020e807bfaa13a7573821 +./usr/lib/locale/C.utf8/LC_MONETARY gname=root uname=root time=1696062665.0 mode=644 gid=0 uid=0 type=file size=270 sha1digest=110ed47e32d65c61ab8240202faa2114d025a009 +./usr/lib/locale/C.utf8/LC_NAME gname=root uname=root time=1696062665.0 mode=644 gid=0 uid=0 type=file size=62 sha1digest=b5d16f1042c3c1c4bef85766aa2c20c1b0d8cff6 +./usr/lib/locale/C.utf8/LC_NUMERIC gname=root uname=root time=1696062665.0 mode=644 gid=0 uid=0 type=file size=50 sha1digest=1bd2f3db04022b8cfe5cd7a7f90176f191e19425 +./usr/lib/locale/C.utf8/LC_PAPER gname=root uname=root time=1696062665.0 mode=644 gid=0 uid=0 type=file size=34 sha1digest=567aaf639393135b76e22e72aaee1df95764e990 +./usr/lib/locale/C.utf8/LC_TELEPHONE gname=root uname=root time=1696062665.0 mode=644 gid=0 uid=0 type=file size=47 sha1digest=3316c99e183186c5cad97a71674ef7431c3da845 +./usr/lib/locale/C.utf8/LC_TIME gname=root uname=root time=1696062665.0 mode=644 gid=0 uid=0 type=file size=3360 sha1digest=e619a4db877e0b54fa14b8a3992da2b561b3239b ./usr/lib/locale/C.utf8/LC_MESSAGES gname=root uname=root time=1696062665.0 mode=755 gid=0 uid=0 type=dir -./usr/lib/locale/C.utf8/LC_MESSAGES/SYS_LC_MESSAGES nlink=0 gname=root uname=root time=1696062665.0 mode=644 gid=0 uid=0 type=file size=48 cksum=1913332552 sha1digest=574d7e92bedf1373ec9506859b0d55ee7babbf20 +./usr/lib/locale/C.utf8/LC_MESSAGES/SYS_LC_MESSAGES gname=root uname=root time=1696062665.0 mode=644 gid=0 uid=0 type=file size=48 sha1digest=574d7e92bedf1373ec9506859b0d55ee7babbf20 ./usr/share gname=root uname=root time=1696062665.0 mode=755 gid=0 uid=0 type=dir ./usr/share/doc gname=root uname=root time=1696062665.0 mode=755 gid=0 uid=0 type=dir ./usr/share/doc/libc-bin gname=root uname=root time=1696062665.0 mode=755 gid=0 uid=0 type=dir -./usr/share/doc/libc-bin/copyright nlink=0 gname=root uname=root time=1663877162.0 mode=644 gid=0 uid=0 type=file size=25467 cksum=3366629126 sha1digest=5c4df62d190848821200ce4041d2753bd431a7eb +./usr/share/doc/libc-bin/copyright gname=root uname=root time=1663877162.0 mode=644 gid=0 uid=0 type=file size=25467 sha1digest=5c4df62d190848821200ce4041d2753bd431a7eb """, ) diff --git a/examples/os_release/BUILD.bazel b/examples/os_release/BUILD.bazel index 0042a34..3790ccb 100644 --- a/examples/os_release/BUILD.bazel +++ b/examples/os_release/BUILD.bazel @@ -21,7 +21,9 @@ assert_tar_listing( actual = "os_release", expected = """\ #mtree -./usr/lib/os-release nlink=0 time=0.0 mode=755 gid=0 uid=0 type=file size=48 cksum=107085711 sha1digest=956eb93b9476f9fc8f93cb450adc4f716d158500 +./usr time=0.0 mode=755 gid=0 uid=0 type=dir +./usr/lib time=0.0 mode=755 gid=0 uid=0 type=dir +./usr/lib/os-release time=0.0 mode=555 gid=0 uid=0 type=file size=48 sha1digest=956eb93b9476f9fc8f93cb450adc4f716d158500 """, ) @@ -40,6 +42,7 @@ assert_tar_listing( actual = "os_release_alternative_path", expected = """\ #mtree -./etc/os-release nlink=0 time=0.0 mode=755 gid=0 uid=0 type=file size=67 cksum=1175356314 sha1digest=ebdde6fdd9cf9876b4b592772d85817b4b482327 +./etc time=0.0 mode=755 gid=0 uid=0 type=dir +./etc/os-release time=0.0 mode=555 gid=0 uid=0 type=file size=67 sha1digest=ebdde6fdd9cf9876b4b592772d85817b4b482327 """, ) diff --git a/examples/passwd/BUILD.bazel b/examples/passwd/BUILD.bazel index 905f4dd..3427e36 100644 --- a/examples/passwd/BUILD.bazel +++ b/examples/passwd/BUILD.bazel @@ -4,7 +4,7 @@ load("//distroless/tests:asserts.bzl", "assert_tar_listing") passwd( name = "passwd", - passwds = [ + entries = [ dict( gecos = ["root"], gid = 0, @@ -27,6 +27,6 @@ assert_tar_listing( actual = "passwd", expected = """\ #mtree -./etc/passwd nlink=0 time=0.0 mode=644 gid=0 uid=0 type=file size=36 cksum=216816702 sha1digest=a158dcecfd75d6502cdb1086eb5b0756d08fc423 +./etc/passwd time=0.0 mode=644 gid=0 uid=0 type=file size=36 sha1digest=a158dcecfd75d6502cdb1086eb5b0756d08fc423 """, )