blob: 61becbe8d60fb88b8bd8e938fb799fb3e911e27b [file] [log] [blame]
// 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.
// This component represents the set of capabilities required to use the package stack in recovery
// mode.
{
include: [
"inspect/client.shard.cml",
"syslog/client.shard.cml",
"trace/offer.shard.cml",
],
children: [
{
name: "pkg-cache",
url: "#meta/pkg-cache.cm",
},
{
name: "pkg-resolver",
url: "#meta/pkg-resolver.cm",
},
{
name: "system-updater",
url: "#meta/system-updater.cm",
},
{
// TODO(https://fxbug.dev/42144087) investigate how isolated-ota should work with commits. GC is
// traditionally blocked on the previous updated being committed. Here, we relax this
// restriction because it does not make sense for recovery, and use a fake
// system-update-committer that always reports the system is committed.
name: "fake-system-update-committer",
url: "#meta/fake-system-update-committer.cm",
},
],
offer: [
// Routes from the parent to children. All are required if you are a
// client of this component!
{
directory: "blob-exec",
from: "parent",
to: "#pkg-cache",
rights: [
"execute",
"rw*",
],
},
{
// Needed for passing repository configs to pkg-resolver
directory: "config-data",
from: "parent",
to: "#pkg-resolver",
rights: [ "r*" ],
},
{
// Needed for handing pkg-resolver the appropriate SSL certificates for network traffic
directory: "root-ssl-certificates",
from: "parent",
to: "#pkg-resolver",
rights: [ "r*" ],
},
{
// Needed so system-updater knows what board to install for.
directory: "build-info",
from: "parent",
to: "#system-updater",
rights: [ "r*" ],
},
{
protocol: [
"fuchsia.logger.LogSink",
"fuchsia.metrics.MetricEventLoggerFactory",
],
from: "parent",
to: [
"#fake-system-update-committer",
"#pkg-cache",
"#pkg-resolver",
"#system-updater",
],
},
{
protocol: [ "fuchsia.boot.Arguments" ],
from: "parent",
to: "#pkg-cache",
},
{
protocol: [
"fuchsia.net.name.Lookup",
"fuchsia.posix.socket.Provider",
],
from: "parent",
to: "#pkg-resolver",
},
{
protocol: "fuchsia.paver.Paver",
from: "parent",
to: "#system-updater",
},
// Routes between children
{
protocol: "fuchsia.update.CommitStatusProvider",
from: "#fake-system-update-committer",
to: "#pkg-cache",
},
{
protocol: [ "fuchsia.pkg.PackageCache" ],
from: "#pkg-cache",
to: "#pkg-resolver",
},
{
protocol: [
"fuchsia.pkg.PackageCache",
"fuchsia.pkg.RetainedPackages",
"fuchsia.space.Manager",
],
from: "#pkg-cache",
to: "#system-updater",
},
{
protocol: "fuchsia.pkg.PackageResolver-ota",
from: "#pkg-resolver",
as: "fuchsia.pkg.PackageResolver",
to: "#system-updater",
},
],
expose: [
{
protocol: [ "fuchsia.update.installer.Installer" ],
from: "#system-updater",
to: "parent",
},
],
}