LinuxCommandLibrary

mkmanifest

Create Google Repo manifest files

SYNOPSIS

mkmanifest [-P ] [-x ] [-v] [-o ]

PARAMETERS

-P prefix, --prefix prefix
    Specifies a prefix to strip from the paths listed in the manifest. This is useful for creating manifests with relative paths.

-x regex, --exclude regex
    Excludes files or directories whose paths match the provided regular expression from the manifest.

-v, --verbose
    Enables verbose output, providing more information during the manifest generation process.

-o output-file, --output-file output-file
    Redirects the generated manifest to the specified file instead of printing it to standard output (stdout).

directory
    The root directory from which to start scanning and generating the manifest. This is a mandatory argument.

DESCRIPTION

mkmanifest is a command-line utility designed to create a manifest file that lists all files within a specified directory, along with their corresponding SHA256 checksums. This tool is particularly useful in build systems, software distribution, and integrity verification processes, such as those found in Clear Linux OS development.

It helps ensure that all expected files are present and have not been tampered with by providing a verifiable list of content. The generated manifest typically contains one file path and its SHA256 sum per line, making it easy to parse and integrate into automated workflows. It allows for path prefixing and exclusion of specific files or directories using regular expressions.

CAVEATS

mkmanifest is primarily associated with the go-mkmanifest project and is a core utility within the Clear Linux OS ecosystem. It is not a standard utility found universally across all Linux distributions out-of-the-box. Its availability and specific functionality might differ if a different mkmanifest implementation is encountered. Users on non-Clear Linux systems might need to compile it from source or install it via specific package managers.

OUTPUT FORMAT

The manifest output typically consists of lines formatted as <path> <SHA256 checksum>.
For example:
/usr/bin/mkmanifest b3b4a5c6d7e8f9a0b1c2d3e4f5a6b7c8d9e0f1a2b3c4d5e6f7a8b9c0d1e2f3a4
This simple format makes it easy to parse with standard text processing tools.

USE CASES

mkmanifest is commonly used in Continuous Integration/Continuous Deployment (CI/CD) pipelines to verify deployed artifacts, in software distribution to check package integrity after download, and during compilation processes to ensure all required source files are present and unchanged.

HISTORY

The mkmanifest tool, specifically the go-mkmanifest implementation, was developed as part of the Clear Linux OS project by Intel. Its development focuses on creating a reliable and efficient way to generate file checksum manifests for package integrity and build reproducibility within the Clear Linux stateless operating system architecture. It is an integral component for managing and verifying the vast number of files that constitute the Clear Linux OS bundles and updates.

SEE ALSO

sha256sum(1), find(1), rpm(8), dpkg(1)

Copied to clipboard