| // Copyright 2022 The Fuchsia Authors. All rights reserved. |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| { |
| include: [ |
| "inspect/client.shard.cml", |
| "syslog/client.shard.cml", |
| ], |
| program: { |
| runner: "elf", |
| binary: "bin/pkg_resolver", |
| }, |
| capabilities: [ |
| { |
| protocol: [ |
| "fuchsia.component.resolution.Resolver", |
| "fuchsia.pkg.Cup", |
| "fuchsia.pkg.internal.OtaDownloader", |
| "fuchsia.pkg.PackageResolver", |
| "fuchsia.pkg.PackageResolver-ota", |
| "fuchsia.pkg.RepositoryManager", |
| "fuchsia.pkg.resolution.PackageResolver", |
| "fuchsia.pkg.rewrite.Engine", |
| ], |
| }, |
| { |
| resolver: "full-resolver", |
| path: "/svc/fuchsia.component.resolution.Resolver", |
| }, |
| ], |
| use: [ |
| { |
| protocol: [ |
| "fuchsia.metrics.MetricEventLoggerFactory", |
| "fuchsia.net.http.Loader", |
| "fuchsia.pkg.http.Client", |
| "fuchsia.pkg.PackageCache", |
| ], |
| from: "parent", |
| }, |
| |
| // used by component resolver |
| { |
| protocol: "fuchsia.pkg.PackageResolver", |
| from: "self", |
| }, |
| { |
| protocol: [ "fuchsia.tracing.provider.Registry" ], |
| from: "parent", |
| |
| // Trace manager may be excluded from builds where tracing is not |
| // expected to be used for observability, such as in the bringup |
| // product and non-eng builds of any product. |
| availability: "optional", |
| }, |
| { |
| directory: "config-data", |
| rights: [ "r*" ], |
| path: "/config/data", |
| }, |
| { |
| config: "fuchsia.pkgresolver.BlobNetworkHeaderTimeoutSeconds", |
| key: "blob_network_header_timeout_seconds", |
| type: "uint32", |
| availability: "optional", |
| }, |
| { |
| config: "fuchsia.pkgresolver.BlobNetworkBodyTimeoutSeconds", |
| key: "blob_network_body_timeout_seconds", |
| type: "uint32", |
| availability: "optional", |
| }, |
| { |
| config: "fuchsia.pkgresolver.TufNetworkHeaderTimeoutSeconds", |
| key: "tuf_network_header_timeout_seconds", |
| type: "uint32", |
| availability: "optional", |
| }, |
| |
| // Note: in an ideal world, we'd declare a storage capability here for |
| // /data, but we can't *quite* do that because TestRealmBuilder doesn't |
| // support mock storage capabilities, and we have some tests that want |
| // to inject failures when interacting with /data to verify pkg-resolver's |
| // resilience. To mock that out, we have to use a directory capability. |
| // So pkg-resolver's integration tests that include this shard will |
| // use a directory capability for /data, and the load-bearing |
| // pkg-resolver.cml will specify a storage capability for /data. |
| ], |
| expose: [ |
| { |
| protocol: [ |
| "fuchsia.component.resolution.Resolver", |
| "fuchsia.pkg.Cup", |
| "fuchsia.pkg.internal.OtaDownloader", |
| "fuchsia.pkg.PackageResolver", |
| "fuchsia.pkg.PackageResolver-ota", |
| "fuchsia.pkg.RepositoryManager", |
| "fuchsia.pkg.resolution.PackageResolver", |
| "fuchsia.pkg.rewrite.Engine", |
| ], |
| from: "self", |
| }, |
| { |
| resolver: "full-resolver", |
| from: "self", |
| }, |
| ], |
| config: { |
| // The type of delivery blob to fetch. |
| delivery_blob_type: { type: "uint32" }, |
| |
| // The timeout, in seconds, to use when performing TUF metadata network operations. |
| tuf_metadata_timeout_seconds: { type: "uint32" }, |
| |
| // The timeout, in seconds, to use when waiting for an HTTP response header when requesting |
| // TUF metadata. |
| tuf_network_header_timeout_seconds: { type: "uint32" }, |
| |
| // The timeout, in seconds, to use when GET'ing a blob HTTP header. |
| blob_network_header_timeout_seconds: { type: "uint32" }, |
| |
| // The timeout, in seconds, to use when waiting for a blob's HTTP body bytes. |
| blob_network_body_timeout_seconds: { type: "uint32" }, |
| |
| // The maximum number of times to try resuming a blob download using HTTP range requests. |
| blob_download_resumption_attempts_limit: { type: "uint32" }, |
| |
| // The maximum number of blobs to download concurrently. |
| blob_download_concurrency_limit: { type: "uint16" }, |
| }, |
| } |