chromeos_update_engine

package
v0.0.0-...-d0b0efe Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 26, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Default_DeltaArchiveManifest_BlockSize    = uint32(4096)
	Default_DeltaArchiveManifest_MinorVersion = uint32(0)
)

Default values for DeltaArchiveManifest fields.

View Source
const (
	Default_PartitionUpdate_FecRoots = uint32(2)
)

Default values for PartitionUpdate fields.

Variables

View Source
var (
	InstallOperation_Type_name = map[int32]string{
		0:  "REPLACE",
		1:  "REPLACE_BZ",
		2:  "MOVE",
		3:  "BSDIFF",
		4:  "SOURCE_COPY",
		5:  "SOURCE_BSDIFF",
		8:  "REPLACE_XZ",
		6:  "ZERO",
		7:  "DISCARD",
		10: "BROTLI_BSDIFF",
		9:  "PUFFDIFF",
	}
	InstallOperation_Type_value = map[string]int32{
		"REPLACE":       0,
		"REPLACE_BZ":    1,
		"MOVE":          2,
		"BSDIFF":        3,
		"SOURCE_COPY":   4,
		"SOURCE_BSDIFF": 5,
		"REPLACE_XZ":    8,
		"ZERO":          6,
		"DISCARD":       7,
		"BROTLI_BSDIFF": 10,
		"PUFFDIFF":      9,
	}
)

Enum value maps for InstallOperation_Type.

View Source
var (
	CowMergeOperation_Type_name = map[int32]string{
		0: "COW_COPY",
	}
	CowMergeOperation_Type_value = map[string]int32{
		"COW_COPY": 0,
	}
)

Enum value maps for CowMergeOperation_Type.

View Source
var File_update_metadata_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type CowMergeOperation

type CowMergeOperation struct {
	Type      *CowMergeOperation_Type `protobuf:"varint,1,opt,name=type,enum=chromeos_update_engine.CowMergeOperation_Type" json:"type,omitempty"`
	SrcExtent *Extent                 `protobuf:"bytes,2,opt,name=src_extent,json=srcExtent" json:"src_extent,omitempty"`
	DstExtent *Extent                 `protobuf:"bytes,3,opt,name=dst_extent,json=dstExtent" json:"dst_extent,omitempty"`
	// contains filtered or unexported fields
}

Hints to VAB snapshot to skip writing some blocks if these blocks are identical to the ones on the source image. The src & dst extents for each CowMergeOperation should be contiguous, and they're a subset of an OTA InstallOperation. During merge time, we need to follow the pre-computed sequence to avoid read after write, similar to the inplace update schema.

func (*CowMergeOperation) Descriptor deprecated

func (*CowMergeOperation) Descriptor() ([]byte, []int)

Deprecated: Use CowMergeOperation.ProtoReflect.Descriptor instead.

func (*CowMergeOperation) GetDstExtent

func (x *CowMergeOperation) GetDstExtent() *Extent

func (*CowMergeOperation) GetSrcExtent

func (x *CowMergeOperation) GetSrcExtent() *Extent

func (*CowMergeOperation) GetType

func (*CowMergeOperation) ProtoMessage

func (*CowMergeOperation) ProtoMessage()

func (*CowMergeOperation) ProtoReflect

func (x *CowMergeOperation) ProtoReflect() protoreflect.Message

func (*CowMergeOperation) Reset

func (x *CowMergeOperation) Reset()

func (*CowMergeOperation) String

func (x *CowMergeOperation) String() string

type CowMergeOperation_Type

type CowMergeOperation_Type int32
const (
	CowMergeOperation_COW_COPY CowMergeOperation_Type = 0 // identical blocks
)

func (CowMergeOperation_Type) Descriptor

func (CowMergeOperation_Type) Enum

func (CowMergeOperation_Type) EnumDescriptor deprecated

func (CowMergeOperation_Type) EnumDescriptor() ([]byte, []int)

Deprecated: Use CowMergeOperation_Type.Descriptor instead.

func (CowMergeOperation_Type) Number

func (CowMergeOperation_Type) String

func (x CowMergeOperation_Type) String() string

func (CowMergeOperation_Type) Type

func (*CowMergeOperation_Type) UnmarshalJSON deprecated

func (x *CowMergeOperation_Type) UnmarshalJSON(b []byte) error

Deprecated: Do not use.

type DeltaArchiveManifest

type DeltaArchiveManifest struct {

	// Only present in major version = 1. List of install operations for the
	// kernel and rootfs partitions. For major version = 2 see the |partitions|
	// field.
	//
	// Deprecated: Do not use.
	InstallOperations []*InstallOperation `protobuf:"bytes,1,rep,name=install_operations,json=installOperations" json:"install_operations,omitempty"`
	// Deprecated: Do not use.
	KernelInstallOperations []*InstallOperation `protobuf:"bytes,2,rep,name=kernel_install_operations,json=kernelInstallOperations" json:"kernel_install_operations,omitempty"`
	// (At time of writing) usually 4096
	BlockSize *uint32 `protobuf:"varint,3,opt,name=block_size,json=blockSize,def=4096" json:"block_size,omitempty"`
	// If signatures are present, the offset into the blobs, generally
	// tacked onto the end of the file, and the length. We use an offset
	// rather than a bool to allow for more flexibility in future file formats.
	// If either is absent, it means signatures aren't supported in this
	// file.
	SignaturesOffset *uint64 `protobuf:"varint,4,opt,name=signatures_offset,json=signaturesOffset" json:"signatures_offset,omitempty"`
	SignaturesSize   *uint64 `protobuf:"varint,5,opt,name=signatures_size,json=signaturesSize" json:"signatures_size,omitempty"`
	// Only present in major version = 1. Partition metadata used to validate the
	// update. For major version = 2 see the |partitions| field.
	//
	// Deprecated: Do not use.
	OldKernelInfo *PartitionInfo `protobuf:"bytes,6,opt,name=old_kernel_info,json=oldKernelInfo" json:"old_kernel_info,omitempty"`
	// Deprecated: Do not use.
	NewKernelInfo *PartitionInfo `protobuf:"bytes,7,opt,name=new_kernel_info,json=newKernelInfo" json:"new_kernel_info,omitempty"`
	// Deprecated: Do not use.
	OldRootfsInfo *PartitionInfo `protobuf:"bytes,8,opt,name=old_rootfs_info,json=oldRootfsInfo" json:"old_rootfs_info,omitempty"`
	// Deprecated: Do not use.
	NewRootfsInfo *PartitionInfo `protobuf:"bytes,9,opt,name=new_rootfs_info,json=newRootfsInfo" json:"new_rootfs_info,omitempty"`
	// old_image_info will only be present for delta images.
	OldImageInfo *ImageInfo `protobuf:"bytes,10,opt,name=old_image_info,json=oldImageInfo" json:"old_image_info,omitempty"`
	NewImageInfo *ImageInfo `protobuf:"bytes,11,opt,name=new_image_info,json=newImageInfo" json:"new_image_info,omitempty"`
	// The minor version, also referred as "delta version", of the payload.
	// Minor version 0 is full payload, everything else is delta payload.
	MinorVersion *uint32 `protobuf:"varint,12,opt,name=minor_version,json=minorVersion,def=0" json:"minor_version,omitempty"`
	// Only present in major version >= 2. List of partitions that will be
	// updated, in the order they will be updated. This field replaces the
	// |install_operations|, |kernel_install_operations| and the
	// |{old,new}_{kernel,rootfs}_info| fields used in major version = 1. This
	// array can have more than two partitions if needed, and they are identified
	// by the partition name.
	Partitions []*PartitionUpdate `protobuf:"bytes,13,rep,name=partitions" json:"partitions,omitempty"`
	// The maximum timestamp of the OS allowed to apply this payload.
	// Can be used to prevent downgrading the OS.
	MaxTimestamp *int64 `protobuf:"varint,14,opt,name=max_timestamp,json=maxTimestamp" json:"max_timestamp,omitempty"`
	// Metadata related to all dynamic partitions.
	DynamicPartitionMetadata *DynamicPartitionMetadata `` /* 129-byte string literal not displayed */
	// If the payload only updates a subset of partitions on the device.
	PartialUpdate *bool `protobuf:"varint,16,opt,name=partial_update,json=partialUpdate" json:"partial_update,omitempty"`
	// contains filtered or unexported fields
}

func (*DeltaArchiveManifest) Descriptor deprecated

func (*DeltaArchiveManifest) Descriptor() ([]byte, []int)

Deprecated: Use DeltaArchiveManifest.ProtoReflect.Descriptor instead.

func (*DeltaArchiveManifest) GetBlockSize

func (x *DeltaArchiveManifest) GetBlockSize() uint32

func (*DeltaArchiveManifest) GetDynamicPartitionMetadata

func (x *DeltaArchiveManifest) GetDynamicPartitionMetadata() *DynamicPartitionMetadata

func (*DeltaArchiveManifest) GetInstallOperations deprecated

func (x *DeltaArchiveManifest) GetInstallOperations() []*InstallOperation

Deprecated: Do not use.

func (*DeltaArchiveManifest) GetKernelInstallOperations deprecated

func (x *DeltaArchiveManifest) GetKernelInstallOperations() []*InstallOperation

Deprecated: Do not use.

func (*DeltaArchiveManifest) GetMaxTimestamp

func (x *DeltaArchiveManifest) GetMaxTimestamp() int64

func (*DeltaArchiveManifest) GetMinorVersion

func (x *DeltaArchiveManifest) GetMinorVersion() uint32

func (*DeltaArchiveManifest) GetNewImageInfo

func (x *DeltaArchiveManifest) GetNewImageInfo() *ImageInfo

func (*DeltaArchiveManifest) GetNewKernelInfo deprecated

func (x *DeltaArchiveManifest) GetNewKernelInfo() *PartitionInfo

Deprecated: Do not use.

func (*DeltaArchiveManifest) GetNewRootfsInfo deprecated

func (x *DeltaArchiveManifest) GetNewRootfsInfo() *PartitionInfo

Deprecated: Do not use.

func (*DeltaArchiveManifest) GetOldImageInfo

func (x *DeltaArchiveManifest) GetOldImageInfo() *ImageInfo

func (*DeltaArchiveManifest) GetOldKernelInfo deprecated

func (x *DeltaArchiveManifest) GetOldKernelInfo() *PartitionInfo

Deprecated: Do not use.

func (*DeltaArchiveManifest) GetOldRootfsInfo deprecated

func (x *DeltaArchiveManifest) GetOldRootfsInfo() *PartitionInfo

Deprecated: Do not use.

func (*DeltaArchiveManifest) GetPartialUpdate

func (x *DeltaArchiveManifest) GetPartialUpdate() bool

func (*DeltaArchiveManifest) GetPartitions

func (x *DeltaArchiveManifest) GetPartitions() []*PartitionUpdate

func (*DeltaArchiveManifest) GetSignaturesOffset

func (x *DeltaArchiveManifest) GetSignaturesOffset() uint64

func (*DeltaArchiveManifest) GetSignaturesSize

func (x *DeltaArchiveManifest) GetSignaturesSize() uint64

func (*DeltaArchiveManifest) ProtoMessage

func (*DeltaArchiveManifest) ProtoMessage()

func (*DeltaArchiveManifest) ProtoReflect

func (x *DeltaArchiveManifest) ProtoReflect() protoreflect.Message

func (*DeltaArchiveManifest) Reset

func (x *DeltaArchiveManifest) Reset()

func (*DeltaArchiveManifest) String

func (x *DeltaArchiveManifest) String() string

type DynamicPartitionGroup

type DynamicPartitionGroup struct {

	// Name of the group.
	Name *string `protobuf:"bytes,1,req,name=name" json:"name,omitempty"`
	// Maximum size of the group. The sum of sizes of all partitions in the group
	// must not exceed the maximum size of the group.
	Size *uint64 `protobuf:"varint,2,opt,name=size" json:"size,omitempty"`
	// A list of partitions that belong to the group.
	PartitionNames []string `protobuf:"bytes,3,rep,name=partition_names,json=partitionNames" json:"partition_names,omitempty"`
	// contains filtered or unexported fields
}

func (*DynamicPartitionGroup) Descriptor deprecated

func (*DynamicPartitionGroup) Descriptor() ([]byte, []int)

Deprecated: Use DynamicPartitionGroup.ProtoReflect.Descriptor instead.

func (*DynamicPartitionGroup) GetName

func (x *DynamicPartitionGroup) GetName() string

func (*DynamicPartitionGroup) GetPartitionNames

func (x *DynamicPartitionGroup) GetPartitionNames() []string

func (*DynamicPartitionGroup) GetSize

func (x *DynamicPartitionGroup) GetSize() uint64

func (*DynamicPartitionGroup) ProtoMessage

func (*DynamicPartitionGroup) ProtoMessage()

func (*DynamicPartitionGroup) ProtoReflect

func (x *DynamicPartitionGroup) ProtoReflect() protoreflect.Message

func (*DynamicPartitionGroup) Reset

func (x *DynamicPartitionGroup) Reset()

func (*DynamicPartitionGroup) String

func (x *DynamicPartitionGroup) String() string

type DynamicPartitionMetadata

type DynamicPartitionMetadata struct {

	// All updatable groups present in |partitions| of this DeltaArchiveManifest.
	// - If an updatable group is on the device but not in the manifest, it is
	//   not updated. Hence, the group will not be resized, and partitions cannot
	//   be added to or removed from the group.
	// - If an updatable group is in the manifest but not on the device, the group
	//   is added to the device.
	Groups []*DynamicPartitionGroup `protobuf:"bytes,1,rep,name=groups" json:"groups,omitempty"`
	// Whether dynamic partitions have snapshots during the update. If this is
	// set to true, the update_engine daemon creates snapshots for all dynamic
	// partitions if possible. If this is unset, the update_engine daemon MUST
	// NOT create snapshots for dynamic partitions.
	SnapshotEnabled *bool `protobuf:"varint,2,opt,name=snapshot_enabled,json=snapshotEnabled" json:"snapshot_enabled,omitempty"`
	// contains filtered or unexported fields
}

Metadata related to all dynamic partitions.

func (*DynamicPartitionMetadata) Descriptor deprecated

func (*DynamicPartitionMetadata) Descriptor() ([]byte, []int)

Deprecated: Use DynamicPartitionMetadata.ProtoReflect.Descriptor instead.

func (*DynamicPartitionMetadata) GetGroups

func (*DynamicPartitionMetadata) GetSnapshotEnabled

func (x *DynamicPartitionMetadata) GetSnapshotEnabled() bool

func (*DynamicPartitionMetadata) ProtoMessage

func (*DynamicPartitionMetadata) ProtoMessage()

func (*DynamicPartitionMetadata) ProtoReflect

func (x *DynamicPartitionMetadata) ProtoReflect() protoreflect.Message

func (*DynamicPartitionMetadata) Reset

func (x *DynamicPartitionMetadata) Reset()

func (*DynamicPartitionMetadata) String

func (x *DynamicPartitionMetadata) String() string

type Extent

type Extent struct {
	StartBlock *uint64 `protobuf:"varint,1,opt,name=start_block,json=startBlock" json:"start_block,omitempty"`
	NumBlocks  *uint64 `protobuf:"varint,2,opt,name=num_blocks,json=numBlocks" json:"num_blocks,omitempty"`
	// contains filtered or unexported fields
}

Data is packed into blocks on disk, always starting from the beginning of the block. If a file's data is too large for one block, it overflows into another block, which may or may not be the following block on the physical partition. An ordered list of extents is another representation of an ordered list of blocks. For example, a file stored in blocks 9, 10, 11, 2, 18, 12 (in that order) would be stored in extents { {9, 3}, {2, 1}, {18, 1}, {12, 1} } (in that order). In general, files are stored sequentially on disk, so it's more efficient to use extents to encode the block lists (this is effectively run-length encoding). A sentinel value (kuint64max) as the start block denotes a sparse-hole in a file whose block-length is specified by num_blocks.

func (*Extent) Descriptor deprecated

func (*Extent) Descriptor() ([]byte, []int)

Deprecated: Use Extent.ProtoReflect.Descriptor instead.

func (*Extent) GetNumBlocks

func (x *Extent) GetNumBlocks() uint64

func (*Extent) GetStartBlock

func (x *Extent) GetStartBlock() uint64

func (*Extent) ProtoMessage

func (*Extent) ProtoMessage()

func (*Extent) ProtoReflect

func (x *Extent) ProtoReflect() protoreflect.Message

func (*Extent) Reset

func (x *Extent) Reset()

func (*Extent) String

func (x *Extent) String() string

type ImageInfo

type ImageInfo struct {
	Board   *string `protobuf:"bytes,1,opt,name=board" json:"board,omitempty"`
	Key     *string `protobuf:"bytes,2,opt,name=key" json:"key,omitempty"`
	Channel *string `protobuf:"bytes,3,opt,name=channel" json:"channel,omitempty"`
	Version *string `protobuf:"bytes,4,opt,name=version" json:"version,omitempty"`
	// If these values aren't present, they should be assumed to match
	// the equivalent value above. They are normally only different for
	// special image types such as nplusone images.
	BuildChannel *string `protobuf:"bytes,5,opt,name=build_channel,json=buildChannel" json:"build_channel,omitempty"`
	BuildVersion *string `protobuf:"bytes,6,opt,name=build_version,json=buildVersion" json:"build_version,omitempty"`
	// contains filtered or unexported fields
}

Describe an image we are based on in a human friendly way. Examples:

dev-channel, x86-alex, 1.2.3, mp-v3
nplusone-channel, x86-alex, 1.2.4, mp-v3, dev-channel, 1.2.3

All fields will be set, if this message is present.

func (*ImageInfo) Descriptor deprecated

func (*ImageInfo) Descriptor() ([]byte, []int)

Deprecated: Use ImageInfo.ProtoReflect.Descriptor instead.

func (*ImageInfo) GetBoard

func (x *ImageInfo) GetBoard() string

func (*ImageInfo) GetBuildChannel

func (x *ImageInfo) GetBuildChannel() string

func (*ImageInfo) GetBuildVersion

func (x *ImageInfo) GetBuildVersion() string

func (*ImageInfo) GetChannel

func (x *ImageInfo) GetChannel() string

func (*ImageInfo) GetKey

func (x *ImageInfo) GetKey() string

func (*ImageInfo) GetVersion

func (x *ImageInfo) GetVersion() string

func (*ImageInfo) ProtoMessage

func (*ImageInfo) ProtoMessage()

func (*ImageInfo) ProtoReflect

func (x *ImageInfo) ProtoReflect() protoreflect.Message

func (*ImageInfo) Reset

func (x *ImageInfo) Reset()

func (*ImageInfo) String

func (x *ImageInfo) String() string

type InstallOperation

type InstallOperation struct {
	Type *InstallOperation_Type `protobuf:"varint,1,req,name=type,enum=chromeos_update_engine.InstallOperation_Type" json:"type,omitempty"`
	// Only minor version 6 or newer support 64 bits |data_offset| and
	// |data_length|, older client will read them as uint32.
	// The offset into the delta file (after the protobuf)
	// where the data (if any) is stored
	DataOffset *uint64 `protobuf:"varint,2,opt,name=data_offset,json=dataOffset" json:"data_offset,omitempty"`
	// The length of the data in the delta file
	DataLength *uint64 `protobuf:"varint,3,opt,name=data_length,json=dataLength" json:"data_length,omitempty"`
	// Ordered list of extents that are read from (if any) and written to.
	SrcExtents []*Extent `protobuf:"bytes,4,rep,name=src_extents,json=srcExtents" json:"src_extents,omitempty"`
	// Byte length of src, equal to the number of blocks in src_extents *
	// block_size. It is used for BSDIFF and SOURCE_BSDIFF, because we need to
	// pass that external program the number of bytes to read from the blocks we
	// pass it.  This is not used in any other operation.
	SrcLength  *uint64   `protobuf:"varint,5,opt,name=src_length,json=srcLength" json:"src_length,omitempty"`
	DstExtents []*Extent `protobuf:"bytes,6,rep,name=dst_extents,json=dstExtents" json:"dst_extents,omitempty"`
	// Byte length of dst, equal to the number of blocks in dst_extents *
	// block_size. Used for BSDIFF and SOURCE_BSDIFF, but not in any other
	// operation.
	DstLength *uint64 `protobuf:"varint,7,opt,name=dst_length,json=dstLength" json:"dst_length,omitempty"`
	// Optional SHA 256 hash of the blob associated with this operation.
	// This is used as a primary validation for http-based downloads and
	// as a defense-in-depth validation for https-based downloads. If
	// the operation doesn't refer to any blob, this field will have
	// zero bytes.
	DataSha256Hash []byte `protobuf:"bytes,8,opt,name=data_sha256_hash,json=dataSha256Hash" json:"data_sha256_hash,omitempty"`
	// Indicates the SHA 256 hash of the source data referenced in src_extents at
	// the time of applying the operation. If present, the update_engine daemon
	// MUST read and verify the source data before applying the operation.
	SrcSha256Hash []byte `protobuf:"bytes,9,opt,name=src_sha256_hash,json=srcSha256Hash" json:"src_sha256_hash,omitempty"`
	// contains filtered or unexported fields
}

func (*InstallOperation) Descriptor deprecated

func (*InstallOperation) Descriptor() ([]byte, []int)

Deprecated: Use InstallOperation.ProtoReflect.Descriptor instead.

func (*InstallOperation) GetDataLength

func (x *InstallOperation) GetDataLength() uint64

func (*InstallOperation) GetDataOffset

func (x *InstallOperation) GetDataOffset() uint64

func (*InstallOperation) GetDataSha256Hash

func (x *InstallOperation) GetDataSha256Hash() []byte

func (*InstallOperation) GetDstExtents

func (x *InstallOperation) GetDstExtents() []*Extent

func (*InstallOperation) GetDstLength

func (x *InstallOperation) GetDstLength() uint64

func (*InstallOperation) GetSrcExtents

func (x *InstallOperation) GetSrcExtents() []*Extent

func (*InstallOperation) GetSrcLength

func (x *InstallOperation) GetSrcLength() uint64

func (*InstallOperation) GetSrcSha256Hash

func (x *InstallOperation) GetSrcSha256Hash() []byte

func (*InstallOperation) GetType

func (*InstallOperation) ProtoMessage

func (*InstallOperation) ProtoMessage()

func (*InstallOperation) ProtoReflect

func (x *InstallOperation) ProtoReflect() protoreflect.Message

func (*InstallOperation) Reset

func (x *InstallOperation) Reset()

func (*InstallOperation) String

func (x *InstallOperation) String() string

type InstallOperation_Type

type InstallOperation_Type int32
const (
	InstallOperation_REPLACE    InstallOperation_Type = 0 // Replace destination extents w/ attached data.
	InstallOperation_REPLACE_BZ InstallOperation_Type = 1 // Replace destination extents w/ attached bzipped data.
	// Deprecated: Do not use.
	InstallOperation_MOVE InstallOperation_Type = 2 // Move source extents to target extents.
	// Deprecated: Do not use.
	InstallOperation_BSDIFF InstallOperation_Type = 3 // The data is a bsdiff binary diff.
	// On minor version 2 or newer, these operations are supported:
	InstallOperation_SOURCE_COPY   InstallOperation_Type = 4 // Copy from source to target partition
	InstallOperation_SOURCE_BSDIFF InstallOperation_Type = 5 // Like BSDIFF, but read from source partition
	// On minor version 3 or newer and on major version 2 or newer, these
	// operations are supported:
	InstallOperation_REPLACE_XZ InstallOperation_Type = 8 // Replace destination extents w/ attached xz data.
	// On minor version 4 or newer, these operations are supported:
	InstallOperation_ZERO          InstallOperation_Type = 6  // Write zeros in the destination.
	InstallOperation_DISCARD       InstallOperation_Type = 7  // Discard the destination blocks, reading as undefined.
	InstallOperation_BROTLI_BSDIFF InstallOperation_Type = 10 // Like SOURCE_BSDIFF, but compressed with brotli.
	// On minor version 5 or newer, these operations are supported:
	InstallOperation_PUFFDIFF InstallOperation_Type = 9 // The data is in puffdiff format.
)

func (InstallOperation_Type) Descriptor

func (InstallOperation_Type) Enum

func (InstallOperation_Type) EnumDescriptor deprecated

func (InstallOperation_Type) EnumDescriptor() ([]byte, []int)

Deprecated: Use InstallOperation_Type.Descriptor instead.

func (InstallOperation_Type) Number

func (InstallOperation_Type) String

func (x InstallOperation_Type) String() string

func (InstallOperation_Type) Type

func (*InstallOperation_Type) UnmarshalJSON deprecated

func (x *InstallOperation_Type) UnmarshalJSON(b []byte) error

Deprecated: Do not use.

type PartitionInfo

type PartitionInfo struct {
	Size *uint64 `protobuf:"varint,1,opt,name=size" json:"size,omitempty"`
	Hash []byte  `protobuf:"bytes,2,opt,name=hash" json:"hash,omitempty"`
	// contains filtered or unexported fields
}

func (*PartitionInfo) Descriptor deprecated

func (*PartitionInfo) Descriptor() ([]byte, []int)

Deprecated: Use PartitionInfo.ProtoReflect.Descriptor instead.

func (*PartitionInfo) GetHash

func (x *PartitionInfo) GetHash() []byte

func (*PartitionInfo) GetSize

func (x *PartitionInfo) GetSize() uint64

func (*PartitionInfo) ProtoMessage

func (*PartitionInfo) ProtoMessage()

func (*PartitionInfo) ProtoReflect

func (x *PartitionInfo) ProtoReflect() protoreflect.Message

func (*PartitionInfo) Reset

func (x *PartitionInfo) Reset()

func (*PartitionInfo) String

func (x *PartitionInfo) String() string

type PartitionUpdate

type PartitionUpdate struct {

	// A platform-specific name to identify the partition set being updated. For
	// example, in Chrome OS this could be "ROOT" or "KERNEL".
	PartitionName *string `protobuf:"bytes,1,req,name=partition_name,json=partitionName" json:"partition_name,omitempty"`
	// Whether this partition carries a filesystem with post-install program that
	// must be run to finalize the update process. See also |postinstall_path| and
	// |filesystem_type|.
	RunPostinstall *bool `protobuf:"varint,2,opt,name=run_postinstall,json=runPostinstall" json:"run_postinstall,omitempty"`
	// The path of the executable program to run during the post-install step,
	// relative to the root of this filesystem. If not set, the default "postinst"
	// will be used. This setting is only used when |run_postinstall| is set and
	// true.
	PostinstallPath *string `protobuf:"bytes,3,opt,name=postinstall_path,json=postinstallPath" json:"postinstall_path,omitempty"`
	// The filesystem type as passed to the mount(2) syscall when mounting the new
	// filesystem to run the post-install program. If not set, a fixed list of
	// filesystems will be attempted. This setting is only used if
	// |run_postinstall| is set and true.
	FilesystemType *string `protobuf:"bytes,4,opt,name=filesystem_type,json=filesystemType" json:"filesystem_type,omitempty"`
	// If present, a list of signatures of the new_partition_info.hash signed with
	// different keys. If the update_engine daemon requires vendor-signed images
	// and has its public key installed, one of the signatures should be valid
	// for /postinstall to run.
	NewPartitionSignature []*Signatures_Signature `protobuf:"bytes,5,rep,name=new_partition_signature,json=newPartitionSignature" json:"new_partition_signature,omitempty"`
	OldPartitionInfo      *PartitionInfo          `protobuf:"bytes,6,opt,name=old_partition_info,json=oldPartitionInfo" json:"old_partition_info,omitempty"`
	NewPartitionInfo      *PartitionInfo          `protobuf:"bytes,7,opt,name=new_partition_info,json=newPartitionInfo" json:"new_partition_info,omitempty"`
	// The list of operations to be performed to apply this PartitionUpdate. The
	// associated operation blobs (in operations[i].data_offset, data_length)
	// should be stored contiguously and in the same order.
	Operations []*InstallOperation `protobuf:"bytes,8,rep,name=operations" json:"operations,omitempty"`
	// Whether a failure in the postinstall step for this partition should be
	// ignored.
	PostinstallOptional *bool `protobuf:"varint,9,opt,name=postinstall_optional,json=postinstallOptional" json:"postinstall_optional,omitempty"`
	// On minor version 6 or newer, these fields are supported:
	// The extent for data covered by verity hash tree.
	HashTreeDataExtent *Extent `protobuf:"bytes,10,opt,name=hash_tree_data_extent,json=hashTreeDataExtent" json:"hash_tree_data_extent,omitempty"`
	// The extent to store verity hash tree.
	HashTreeExtent *Extent `protobuf:"bytes,11,opt,name=hash_tree_extent,json=hashTreeExtent" json:"hash_tree_extent,omitempty"`
	// The hash algorithm used in verity hash tree.
	HashTreeAlgorithm *string `protobuf:"bytes,12,opt,name=hash_tree_algorithm,json=hashTreeAlgorithm" json:"hash_tree_algorithm,omitempty"`
	// The salt used for verity hash tree.
	HashTreeSalt []byte `protobuf:"bytes,13,opt,name=hash_tree_salt,json=hashTreeSalt" json:"hash_tree_salt,omitempty"`
	// The extent for data covered by FEC.
	FecDataExtent *Extent `protobuf:"bytes,14,opt,name=fec_data_extent,json=fecDataExtent" json:"fec_data_extent,omitempty"`
	// The extent to store FEC.
	FecExtent *Extent `protobuf:"bytes,15,opt,name=fec_extent,json=fecExtent" json:"fec_extent,omitempty"`
	// The number of FEC roots.
	FecRoots *uint32 `protobuf:"varint,16,opt,name=fec_roots,json=fecRoots,def=2" json:"fec_roots,omitempty"`
	// Per-partition version used for downgrade detection, added
	// as an effort to support partial updates. For most partitions,
	// this is the build timestamp.
	Version *string `protobuf:"bytes,17,opt,name=version" json:"version,omitempty"`
	// A sorted list of CowMergeOperation. When writing cow, we can choose to
	// skip writing the raw bytes for these extents. During snapshot merge, the
	// bytes will read from the source partitions instead.
	MergeOperations []*CowMergeOperation `protobuf:"bytes,18,rep,name=merge_operations,json=mergeOperations" json:"merge_operations,omitempty"`
	// contains filtered or unexported fields
}

Describes the update to apply to a single partition.

func (*PartitionUpdate) Descriptor deprecated

func (*PartitionUpdate) Descriptor() ([]byte, []int)

Deprecated: Use PartitionUpdate.ProtoReflect.Descriptor instead.

func (*PartitionUpdate) GetFecDataExtent

func (x *PartitionUpdate) GetFecDataExtent() *Extent

func (*PartitionUpdate) GetFecExtent

func (x *PartitionUpdate) GetFecExtent() *Extent

func (*PartitionUpdate) GetFecRoots

func (x *PartitionUpdate) GetFecRoots() uint32

func (*PartitionUpdate) GetFilesystemType

func (x *PartitionUpdate) GetFilesystemType() string

func (*PartitionUpdate) GetHashTreeAlgorithm

func (x *PartitionUpdate) GetHashTreeAlgorithm() string

func (*PartitionUpdate) GetHashTreeDataExtent

func (x *PartitionUpdate) GetHashTreeDataExtent() *Extent

func (*PartitionUpdate) GetHashTreeExtent

func (x *PartitionUpdate) GetHashTreeExtent() *Extent

func (*PartitionUpdate) GetHashTreeSalt

func (x *PartitionUpdate) GetHashTreeSalt() []byte

func (*PartitionUpdate) GetMergeOperations

func (x *PartitionUpdate) GetMergeOperations() []*CowMergeOperation

func (*PartitionUpdate) GetNewPartitionInfo

func (x *PartitionUpdate) GetNewPartitionInfo() *PartitionInfo

func (*PartitionUpdate) GetNewPartitionSignature

func (x *PartitionUpdate) GetNewPartitionSignature() []*Signatures_Signature

func (*PartitionUpdate) GetOldPartitionInfo

func (x *PartitionUpdate) GetOldPartitionInfo() *PartitionInfo

func (*PartitionUpdate) GetOperations

func (x *PartitionUpdate) GetOperations() []*InstallOperation

func (*PartitionUpdate) GetPartitionName

func (x *PartitionUpdate) GetPartitionName() string

func (*PartitionUpdate) GetPostinstallOptional

func (x *PartitionUpdate) GetPostinstallOptional() bool

func (*PartitionUpdate) GetPostinstallPath

func (x *PartitionUpdate) GetPostinstallPath() string

func (*PartitionUpdate) GetRunPostinstall

func (x *PartitionUpdate) GetRunPostinstall() bool

func (*PartitionUpdate) GetVersion

func (x *PartitionUpdate) GetVersion() string

func (*PartitionUpdate) ProtoMessage

func (*PartitionUpdate) ProtoMessage()

func (*PartitionUpdate) ProtoReflect

func (x *PartitionUpdate) ProtoReflect() protoreflect.Message

func (*PartitionUpdate) Reset

func (x *PartitionUpdate) Reset()

func (*PartitionUpdate) String

func (x *PartitionUpdate) String() string

type Signatures

type Signatures struct {
	Signatures []*Signatures_Signature `protobuf:"bytes,1,rep,name=signatures" json:"signatures,omitempty"`
	// contains filtered or unexported fields
}

Signatures: Updates may be signed by the OS vendor. The client verifies an update's signature by hashing the entire download. The section of the download that contains the signature is at the end of the file, so when signing a file, only the part up to the signature part is signed. Then, the client looks inside the download's Signatures message for a Signature message that it knows how to handle. Generally, a client will only know how to handle one type of signature, but an update may contain many signatures to support many different types of client. Then client selects a Signature message and uses that, along with a known public key, to verify the download. The public key is expected to be part of the client.

func (*Signatures) Descriptor deprecated

func (*Signatures) Descriptor() ([]byte, []int)

Deprecated: Use Signatures.ProtoReflect.Descriptor instead.

func (*Signatures) GetSignatures

func (x *Signatures) GetSignatures() []*Signatures_Signature

func (*Signatures) ProtoMessage

func (*Signatures) ProtoMessage()

func (*Signatures) ProtoReflect

func (x *Signatures) ProtoReflect() protoreflect.Message

func (*Signatures) Reset

func (x *Signatures) Reset()

func (*Signatures) String

func (x *Signatures) String() string

type Signatures_Signature

type Signatures_Signature struct {

	// Deprecated: Do not use.
	Version *uint32 `protobuf:"varint,1,opt,name=version" json:"version,omitempty"`
	Data    []byte  `protobuf:"bytes,2,opt,name=data" json:"data,omitempty"`
	// The DER encoded signature size of EC keys is nondeterministic for
	// different input of sha256 hash. However, we need the size of the
	// serialized signatures protobuf string to be fixed before signing;
	// because this size is part of the content to be signed. Therefore, we
	// always pad the signature data to the maximum possible signature size of
	// a given key. And the payload verifier will truncate the signature to
	// its correct size based on the value of |unpadded_signature_size|.
	UnpaddedSignatureSize *uint32 `protobuf:"fixed32,3,opt,name=unpadded_signature_size,json=unpaddedSignatureSize" json:"unpadded_signature_size,omitempty"`
	// contains filtered or unexported fields
}

func (*Signatures_Signature) Descriptor deprecated

func (*Signatures_Signature) Descriptor() ([]byte, []int)

Deprecated: Use Signatures_Signature.ProtoReflect.Descriptor instead.

func (*Signatures_Signature) GetData

func (x *Signatures_Signature) GetData() []byte

func (*Signatures_Signature) GetUnpaddedSignatureSize

func (x *Signatures_Signature) GetUnpaddedSignatureSize() uint32

func (*Signatures_Signature) GetVersion deprecated

func (x *Signatures_Signature) GetVersion() uint32

Deprecated: Do not use.

func (*Signatures_Signature) ProtoMessage

func (*Signatures_Signature) ProtoMessage()

func (*Signatures_Signature) ProtoReflect

func (x *Signatures_Signature) ProtoReflect() protoreflect.Message

func (*Signatures_Signature) Reset

func (x *Signatures_Signature) Reset()

func (*Signatures_Signature) String

func (x *Signatures_Signature) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL