Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • bazel/ape
1 result
Show changes
Commits on Source (5)
load(":binaries.bzl", "BINARIES")
[
alias(
name = binary,
actual = "@{}".format(binary),
visibility = ["//visibility:public"],
)
for binary in (
"awk",
"b2sum",
"base32",
"base64",
"basename",
"basenc",
"bash",
"berry",
"brotli",
"bzip2",
"cat",
"chcon",
"chgrp",
"chown",
"chroot",
"cksum",
"clang-format",
"cmp",
"comm",
"csplit",
"ctags",
"curl",
"cut",
"dash",
"datasette",
"date",
"df",
"diff",
"diff3",
"dir",
"dircolors",
"dirname",
"du",
"emacs",
"emacsclient",
"env",
"expand",
"expr",
"factor",
"false",
"find",
"fmt",
"fold",
"gmake",
"greenbean",
"grep",
"groups",
"head",
"id",
"install",
"join",
"kill",
"less",
"life",
"link",
"ln",
"locate",
"logname",
"ls",
"lua",
"make",
"md5sum",
"mkfifo",
"mknod",
"mktemp",
"mktemper",
"nano",
"nesemu1",
"nice",
"ninja",
"nl",
"nohup",
"nproc",
"numfmt",
"od",
"paste",
"patch",
"pathchk",
"pigz",
"pinky",
"pledge",
"pr",
"printenv",
"printimage",
"ptx",
"pwd",
"python",
"qjs",
"readlink",
"realpath",
"redbean",
"rmdir",
"rsync",
"runcon",
"script",
"sdiff",
"sed",
"seq",
"sha1sum",
"sha224sum",
"sha256sum",
"sha384sum",
"sha512sum",
"shred",
"shuf",
"sleep",
"sort",
"split",
"sqlite3",
"stat",
"stty",
"sum",
"sync",
"tac",
"tail",
"tar",
"tee",
"test",
"tidy",
"timeout",
"tmux",
"touch",
"tr",
"tree",
"true",
"truncate",
"tsort",
"tty",
"ttyinfo",
"unexpand",
"uniq",
"unlink",
"unzip",
"uptime",
"users",
"vdir",
"verynice",
"vim",
"wall",
"wc",
"wget",
"who",
"whoami",
"xargs",
"xz",
"yes",
"zip",
"zsh",
"zstd",
)
for binary in BINARIES
]
# [1.0.0-alpha.4](https://git.gitlab.arm.com/bazel/ape/compare/v1.0.0-alpha.3...v1.0.0-alpha.4) (2024-02-22)
### Bug Fixes
- mirror binaries ([b6b4b78](https://git.gitlab.arm.com/bazel/ape/commit/b6b4b780e211707ed14d9d466571ba7bd3fab0a7))
# [1.0.0-alpha.3](https://git.gitlab.arm.com/bazel/ape/compare/v1.0.0-alpha.2...v1.0.0-alpha.3) (2024-02-19)
### Bug Fixes
......
......@@ -2,53 +2,53 @@
# TODO: update sections with relevant people
[Shell] @bazel
[Shell] @matthew.clarkson
*.sh
[Batch] @bazel
[Batch] @matthew.clarkson
*.bat
[JavaScript] @bazel
[JavaScript] @matthew.clarkson
*.js
*.mjs
[C] @bazel
[C] @matthew.clarkson
*.c
*.h
[C++] @bazel
[C++] @matthew.clarkson
*.cpp
*.hpp
*.cc
*.hh
[Rust] @bazel
[Rust] @matthew.clarkson
*.rs
[Documentation] @bazel
[Documentation] @matthew.clarkson
*.md
[Licensing] @bazel
[Licensing] @matthew.clarkson
/.reuse/dep5
/LICENSES/*
[Configuration] @bazel
[Configuration] @matthew.clarkson
.editorconfig
[CI] @bazel
[CI] @matthew.clarkson
.gitlab-ci.yml
[Release] @bazel
[Release] @matthew.clarkson
/.releaserc.yaml
[Node] @bazel
[Node] @matthew.clarkson
/package.json
/.npmrc
[Branding] @bazel
[Branding] @matthew.clarkson
/icon.svg
[Bazel] @bazel
[Bazel] @matthew.clarkson
/.bazelrc
/.bazelrc.ci
/.bazelignore
......
module(
name = "ape",
version = "1.0.0-alpha.3",
version = "1.0.0-alpha.4",
bazel_compatibility = [
">=7.0.0",
],
compatibility_level = 1,
)
bazel_dep(name = "rules_curl", version = "1.0.0-alpha.6", dev_dependency = True)
bazel_dep(name = "toolchain_utils", version = "1.0.0-beta.1")
bazel_dep(name = "download_utils", version = "1.0.0-beta.1")
......@@ -20,7 +22,10 @@ download_file = use_repo_rule("@download_utils//download/file:defs.bzl", "downlo
executable = True,
integrity = integrity,
output = "ape",
urls = ["https://cosmo.zip/pub/cosmos/v/3.2.4/bin/{}".format(binary)],
urls = [
"https://gitlab.arm.com/api/v4/projects/bazel%2Fape/packages/generic/cosmo.zip/3.2.4/{}".format(binary),
"https://cosmo.zip/pub/cosmos/v/3.2.4/bin/{}".format(binary),
],
)
for binary, integrity in {
"ape-arm64.elf": "sha256-h3zL1GUkMGVCbLSjyrQ1GsrZGGSfhlZVa7YEiC7q0I8=",
......@@ -56,7 +61,10 @@ export = use_extension("@toolchain_utils//toolchain/export:defs.bzl", "toolchain
executable = True,
integrity = integrity,
output = binary,
urls = ["https://cosmo.zip/pub/cosmos/v/3.2.4/bin/{}".format(binary)],
urls = [
"https://gitlab.arm.com/api/v4/projects/bazel%2Fape/packages/generic/cosmo.zip/3.2.4/{}".format(binary),
"https://cosmo.zip/pub/cosmos/v/3.2.4/bin/{}".format(binary),
],
),
ape_entrypoint(
name = binary,
......@@ -220,12 +228,26 @@ export = use_extension("@toolchain_utils//toolchain/export:defs.bzl", "toolchain
}.items()
]
# Switch these to `cosmo.zip` when they are added
# TODO: Switch these to `cosmo.zip` when they are added
download_file(
name = "cli.zip",
executable = False,
integrity = "sha256-ky+wwBWUS38eUFu5O3q/w7S2l7UGSJEDZAuYLmKGjc8=",
output = "cli.zip",
urls = [
"https://gitlab.arm.com/api/v4/projects/bazel%2Fape/packages/generic/superconfigure/0.0.33/cli.zip",
"https://github.com/ahgamut/superconfigure/releases/download/z0.0.33/cli.zip",
],
)
download_archive(
name = "cli",
srcs = ["bin/*"],
integrity = "sha256-ky+wwBWUS38eUFu5O3q/w7S2l7UGSJEDZAuYLmKGjc8=",
urls = ["https://github.com/ahgamut/superconfigure/releases/download/z0.0.33/cli.zip"],
urls = [
"https://gitlab.arm.com/api/v4/projects/bazel%2Fape/packages/generic/superconfigure/0.0.33/cli.zip",
"https://github.com/ahgamut/superconfigure/releases/download/z0.0.33/cli.zip",
],
)
[
......
This diff is collapsed.
......@@ -22,6 +22,10 @@ List the available executables:
bazel query 'kind(alias, @ape//:*)'
```
## Hermeticity
The module is fully hermetic, all binaries are downloaded and verified against subresource integrities.
## Cosmopolitian
The project provides pre-built, hermetic [Cosmopolitan pre-built binaries][cosmo.zip].
......
visibility("//...")
BINARIES = (
"awk",
"b2sum",
"base32",
"base64",
"basename",
"basenc",
"bash",
"berry",
"brotli",
"bzip2",
"cat",
"chcon",
"chgrp",
"chown",
"chroot",
"cksum",
"clang-format",
"cmp",
"comm",
"csplit",
"ctags",
"curl",
"cut",
"dash",
"datasette",
"date",
"df",
"diff",
"diff3",
"dir",
"dircolors",
"dirname",
"du",
"emacs",
"emacsclient",
"env",
"expand",
"expr",
"factor",
"false",
"find",
"fmt",
"fold",
"gmake",
"greenbean",
"grep",
"groups",
"head",
"id",
"install",
"join",
"kill",
"less",
"life",
"link",
"ln",
"locate",
"logname",
"ls",
"lua",
"make",
"md5sum",
"mkfifo",
"mknod",
"mktemp",
"mktemper",
"nano",
"nesemu1",
"nice",
"ninja",
"nl",
"nohup",
"nproc",
"numfmt",
"od",
"paste",
"patch",
"pathchk",
"pigz",
"pinky",
"pledge",
"pr",
"printenv",
"printimage",
"ptx",
"pwd",
"python",
"qjs",
"readlink",
"realpath",
"redbean",
"rmdir",
"rsync",
"runcon",
"script",
"sdiff",
"sed",
"seq",
"sha1sum",
"sha224sum",
"sha256sum",
"sha384sum",
"sha512sum",
"shred",
"shuf",
"sleep",
"sort",
"split",
"sqlite3",
"stat",
"stty",
"sum",
"sync",
"tac",
"tail",
"tar",
"tee",
"test",
"tidy",
"timeout",
"tmux",
"touch",
"tr",
"tree",
"true",
"truncate",
"tsort",
"tty",
"ttyinfo",
"unexpand",
"uniq",
"unlink",
"unzip",
"uptime",
"users",
"vdir",
"verynice",
"vim",
"wall",
"wc",
"wget",
"who",
"whoami",
"xargs",
"xz",
"yes",
"zip",
"zsh",
"zstd",
)
This diff is collapsed.
load("@rules_curl//curl/upload/file:defs.bzl", "curl_upload_file")
load("//:binaries.bzl", "BINARIES")
[
curl_upload_file(
name = ape,
src = "@{}//:ape".format(ape),
dst = ape,
url = "https://gitlab.arm.com/api/v4/projects/bazel%2Fape/packages/generic/cosmos.zip/3.2.4",
)
for ape in (
"ape-arm64.elf",
"ape-x86_64.elf",
"ape-x86_64.macho",
)
]
[
curl_upload_file(
name = binary,
src = "@cosmos-{}//:{}".format(binary, binary),
dst = binary,
url = "https://gitlab.arm.com/api/v4/projects/bazel%2Fape/packages/generic/cosmos.zip/3.2.4",
)
for binary in BINARIES
if binary not in ("diff", "diff3", "sdiff", "cmp", "patch")
]
# TODO: join this with above when `cosmos.zip` ships these binaries
[
curl_upload_file(
name = archive,
src = "@{}//:{}".format(archive, archive),
dst = archive,
url = "https://gitlab.arm.com/api/v4/projects/bazel%2Fape/packages/generic/superconfigure/0.0.33",
)
for archive in ("cli.zip",)
]
# Upload
Upload the αcτµαlly pδrταblε εxεcµταblε (APE) binaries to GitLab package registry.
This holds a mirror of the binaries in case upstream goes down.