From 0917ba4bfe671463436f043660c6c5993b24cbda Mon Sep 17 00:00:00 2001 From: "Alejandro R. Mosteo" Date: Thu, 25 Jan 2024 16:52:08 +0100 Subject: [PATCH 1/2] Document binary origins --- doc/catalog-format-spec.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/doc/catalog-format-spec.md b/doc/catalog-format-spec.md index 40a153d4b..2307460d6 100644 --- a/doc/catalog-format-spec.md +++ b/doc/catalog-format-spec.md @@ -455,6 +455,12 @@ static, i.e. they cannot depend on the context. several crates from the same repository (sometimes referred to as a *monorepo*). + - `binary`: optional (defauts to false) boolean used to design the origin + as binary. Binary origins are not compiled and can use dynamic + expressions to narrow down the platform to which they apply. An origin + using a dynamic expression is implicitly tagged as binary; see the + example below. + Examples of origin tables: ```toml @@ -479,6 +485,13 @@ static, i.e. they cannot depend on the context. subdir = "examples" ``` + ```toml + # A binary origin denoting a compiler + [origin."case(os)".linux."case(host-arch)".x86-64] + url = "https://github.com/alire-project/GNAT-FSF-builds/releases/download/gnat-12.1.0-1/gnat-x86_64-linux-12.1.0-1.tar.gz" + hashes = ["sha256:df1f36b306359d528799b1de8629a793523347a90c9d4b72efd23c62a7279555"] + ``` + - `available`: optional dynamic boolean expression. If it evaluates to `false`, the package is not available for the current platform. From 0ee0ec3d383b49075bba3f8b6eef3d66f332304b Mon Sep 17 00:00:00 2001 From: "Alejandro R. Mosteo" Date: Thu, 25 Jan 2024 17:30:15 +0100 Subject: [PATCH 2/2] Test for explicit binary origin --- .../my_index/crates/libhello_1.0.0.tgz | Bin 0 -> 435 bytes .../he/hello_world/hello_world-0.1.0.toml | 11 ++++++ .../my_index/index/index.toml | 1 + .../index/origin-binary-explicit/test.py | 37 ++++++++++++++++++ .../index/origin-binary-explicit/test.yaml | 5 +++ 5 files changed, 54 insertions(+) create mode 100644 testsuite/tests/index/origin-binary-explicit/my_index/crates/libhello_1.0.0.tgz create mode 100644 testsuite/tests/index/origin-binary-explicit/my_index/index/he/hello_world/hello_world-0.1.0.toml create mode 100644 testsuite/tests/index/origin-binary-explicit/my_index/index/index.toml create mode 100644 testsuite/tests/index/origin-binary-explicit/test.py create mode 100644 testsuite/tests/index/origin-binary-explicit/test.yaml diff --git a/testsuite/tests/index/origin-binary-explicit/my_index/crates/libhello_1.0.0.tgz b/testsuite/tests/index/origin-binary-explicit/my_index/crates/libhello_1.0.0.tgz new file mode 100644 index 0000000000000000000000000000000000000000..e0add12efd6ce9fa61f2b2c2e838add85e2da5b4 GIT binary patch literal 435 zcmV;k0ZjfMiwFQ~SD;-01MQVfPlG@ZhB^0FjGQ!4Tt1c_dNT2#Nn=ek@ksbsTPi}c zKx+TJyA(*f);2NpL!IXWyR);q;brDc;$Xs(B=byz801>p2Sm`PR6flW$e<{hj{>{)B&v<8NNP%6)`Bs0+u@wEq z3(7gJ93{dya)fCE#uVz`aoUK=8KTePHc2VlH6gIIZK4W#J9uRC-aB ze+hHB!CCD}(mGc5t<5B9&E(i$`}Eje|9K~8?5cm#|5E=Z!TLW4O|h$WzOhcRo)82< d5ClOG1VIo4K@bE%5ClO^o=