blob: cc590cfcb74e80ed772604055608dab61f3e29ef [file] [edit]
// 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_cache",
},
capabilities: [
{
protocol: [
"fuchsia.component.resolution.Resolver-base",
"fuchsia.component.resolution.Resolver-full",
"fuchsia.fxfs.BlobReader",
"fuchsia.pkg.garbagecollector.Manager",
"fuchsia.pkg.internal.OtaDownloader",
"fuchsia.pkg.PackageCache",
"fuchsia.pkg.PackageResolver-base",
"fuchsia.pkg.PackageResolver-full",
"fuchsia.pkg.PackageResolver-ota",
"fuchsia.pkg.resolution.PackageResolver",
"fuchsia.pkg.RetainedBlobs",
"fuchsia.pkg.RetainedPackages",
"fuchsia.storage.mapping.FileMapper",
],
},
{
resolver: "base_resolver",
path: "/svc/fuchsia.component.resolution.Resolver-base",
},
{
resolver: "full_resolver",
path: "/svc/fuchsia.component.resolution.Resolver-full",
},
{
directory: "pkgfs",
rights: [ "rx*" ],
path: "/pkgfs",
},
{
directory: "build-info",
rights: [ "r*" ],
path: "/specific-base-packages/build-info/meta/fuchsia.domain_config/data",
},
{
directory: "config-data",
rights: [ "r*" ],
path: "/specific-base-packages/config-data/meta/data",
},
{
directory: "google-root-ssl-certificates",
rights: [ "r*" ],
path: "/specific-base-packages/google_root_ssl_certificates/data",
},
{
directory: "root-ssl-certificates",
rights: [ "r*" ],
path: "/specific-base-packages/root_ssl_certificates/data",
},
{
directory: "system",
rights: [ "rx*" ],
path: "/specific-base-packages/system_image",
},
],
use: [
{
directory: "blob-exec",
rights: [
"execute",
"rw*",
],
path: "/blob",
},
// Served package directories will look for blobs in this directory, if it is available,
// before looking in the "blob-exec" directory. This enables de-duping of VMOs backed by
// files that are in both bootfs and blobfs.
{
directory: "bootfs-blobs",
rights: [ "rx*" ],
path: "/bootfs-blobs",
availability: "optional",
},
{
protocol: [
"fuchsia.fxfs.BlobCreator",
"fuchsia.fxfs.BlobReader",
"fuchsia.kernel.VmexResource",
"fuchsia.metrics.MetricEventLoggerFactory",
"fuchsia.pkg.Authority",
"fuchsia.pkg.http.Client",
"fuchsia.update.CommitStatusProvider",
],
},
{
protocol: "fuchsia.tracing.provider.Registry",
availability: "optional",
},
{
protocol: [
"fuchsia.storage.block.Mapper",
"fuchsia.storage.mapping.MappingProvider",
],
availability: "optional",
},
{
// TODO(https://fxbug.dev/331302451) Use this config value instead of the presence of
// file data/pkgfs_disable_executability_restrictions in the system_image package to
// determine whether executability should be enforced.
//
// If true, then all package directories will be executable. Otherwise, only base
// packages will be executable.
config: "fuchsia.pkgcache.AllPackagesExecutable",
key: "all_packages_executable",
type: "bool",
},
{
// If true, pkg-cache requires the system_image package to be present and will exit with
// an error, which will trigger on_terminate: reboot, if it cannot be loaded. If false,
// pkg-cache will still attempt to load the system_image package but will not fail if
// it is missing.
config: "fuchsia.pkgcache.RequireSystemImage",
key: "require_system_image",
type: "bool",
},
{
// If true, upgradable packages can be set and upgraded (outside of OTA) and base
// resolver will resolve them.
config: "fuchsia.pkgcache.EnableUpgradablePackages",
key: "enable_upgradable_packages",
type: "bool",
},
{
// The maximum number of blobs that can be fetched concurrently.
config: "fuchsia.pkgcache.BlobFetchConcurrencyLimit",
key: "blob_fetch_concurrency_limit",
type: "uint16",
availability: "optional",
default: 2,
},
{
// The timeout, in seconds, to use when GET'ing a blob HTTP Header.
config: "fuchsia.pkgcache.BlobNetworkHeaderTimeoutSeconds",
key: "blob_network_header_timeout_seconds",
type: "uint32",
availability: "optional",
default: 30,
},
{
// The timeout, in seconds, to use when waiting for a chunk of a blob's HTTP Body bytes.
// Any amount of Body bytes received from the remote blob server will reset the timeout.
config: "fuchsia.pkgcache.BlobNetworkBodyTimeoutSeconds",
key: "blob_network_body_timeout_seconds",
type: "uint32",
availability: "optional",
default: 30,
},
{
// The maximum number of times to try resuming a blob download with HTTP range requests.
config: "fuchsia.pkgcache.BlobDownloadResumptionAttemptsLimit",
key: "blob_download_resumption_attempts_limit",
type: "uint32",
availability: "optional",
default: 50,
},
{
// If true, blob page requests are handled in the block driver and verified
// in-process via BlobPagerAndVerifier. If false, page requests are handled in Fxfs.
config: "fuchsia.pkgcache.UseDriverBlobPaging",
key: "use_driver_blob_paging",
type: "bool",
availability: "optional",
default: false,
},
{
// Duration in seconds to record and replay the `.boot` blob profile on startup when
// driver blob paging is enabled. If 0, startup profiling is disabled.
config: "fuchsia.fshost.StartupProfilingSeconds",
key: "startup_profiling_seconds",
type: "uint32",
availability: "optional",
default: 0,
},
{
config: "fuchsia.zircon.system.pkgfs.cmd",
key: "system_image_hash",
type: "string",
max_size: 100,
},
],
expose: [
{
resolver: "base_resolver",
from: "self",
},
{
resolver: "full_resolver",
from: "self",
},
{
protocol: [
"fuchsia.component.resolution.Resolver-base",
"fuchsia.component.resolution.Resolver-full",
"fuchsia.fxfs.BlobReader",
"fuchsia.pkg.garbagecollector.Manager",
"fuchsia.pkg.internal.OtaDownloader",
"fuchsia.pkg.PackageCache",
"fuchsia.pkg.PackageResolver-base",
"fuchsia.pkg.PackageResolver-full",
"fuchsia.pkg.PackageResolver-ota",
"fuchsia.pkg.resolution.PackageResolver",
"fuchsia.pkg.RetainedBlobs",
"fuchsia.pkg.RetainedPackages",
"fuchsia.storage.mapping.FileMapper",
],
from: "self",
},
{
directory: [
"build-info",
"config-data",
"google-root-ssl-certificates",
"pkgfs",
"root-ssl-certificates",
"system",
],
from: "self",
},
],
}