Skip to content

meta-manifest - check a stored set of files against current versions

[Home | GitLab | Download | ReadTheDocs]

Overview

The meta-manifest utility helps developers and system administrators to determine whether a stored set of files in e.g. an installed package is still up to date, or whether anything needs to be rebuilt, repackaged, or reinstalled. In record mode, it copies the specified files from e.g. a source tree to what is usually an installation or packaging root directory. In check mode, it compares first the list of files themselves and then the contents of each of the stored files against the same file in the current source tree.

The manifest directory

The record command stores the specified files into a new subdirectory called manifest and creates a manifest-X.Y.txt file in that subdirectory. The meta-manifest utility only supports version 0.1 of the manifest right now, so the manifest file will be named manifest-0.1.txt.

When specifying the path to the directory to list files, check, or record, the meta-manifestutility will automatically append the manifest component; do not specify it on the command line.

The manifest file

In version 0.1, the manifest file is a tab-separated text file with two fields: a filename with the manifest directory and the relative path to the corresponding file in the source directory.

01-info.txt info.txt
02-more-info.toml sub/more-info.toml

This manifest describes two files that correspond to info.txt and sub/more-info.toml in the source directory.

Examples

Assume the src/requirements/list-test-all.txt file contains the following lines:

requirements/install.txt
requirements/test-all.txt

Record the current versions of some files to verify in the future:

meta-manifest record -f src/requirements/list-test-all.txt -m $DESTDIR/usr/share/prog/meta -s src

After running that command, the $DESTDIR/usr/share/prog/meta directory will contain a manifest subdirectory with three files:

  • 01-install.txt
  • 02-test-all.txt
  • manifest-0.1.txt

The manifest-0.1.txt file will contain the following lines:

01-install.txt requirements/install.txt
02-test-all.txt requirements/test-all.txt

The following commands assume that the contents of the $DESTDIR directory has been installed, e.g. as a package, at the filesystem root.

List the recorded files and the absolute paths to the corresponding files in the current source directory:

meta-manifest list -m /usr/share/prog/meta -s src

Check whether the files in the current source have changed:

meta-manifest check -f src/requirements/list-test-all.txt -m /usr/share/prog/meta -s src

Contact

The meta-manifest utility was written by Peter Pentchev. It is developed in a GitLab repository. This documentation is hosted at Ringlet with a copy at ReadTheDocs.