The usm manifest autoprovides command automatically generates the provides section of MANIFEST.usm by scanning build output. This tool helps package maintainers ensure all installed files are properly declared.
usm manifest autoprovides [--replace] [build-path]
build-path: Directory containing build output (optional, auto-generated if not provided)--replace: Update MANIFEST.usm file with generated provides sectionThe command first builds the package using the specified build script:
usm manifest build with silent outputBuild output is installed to temporary directory:
The temporary install directory is scanned recursively:
Files are classified using these rules:
/usr/bin/* → bin:filename/usr/sbin/* → sbin:filename/usr/lib*/* → lib:filename or libres:filename/usr/include/* → inc:filename/usr/share/applications/* → app:filename/usr/share/man/* → man:filename/usr/share/info/* → info:filename/usr/share/locale/* → locale:filename/usr/share/vala*/vapi/* → vapi:filename/usr/share/gir*/* → gir:filename/usr/lib*/girepository-1.0/* → typelib:filename/usr/lib*/pkgconfig/* → pc:filename/etc/* → cfg:filename/opt/* → opt:filename/usr/share/usm-tags/* → tag:filename/usr/share/* → res:filenamerootpath:filename (fallback when no specific type matches)Results are formatted as JSON provides section:
"provides": {
"bin:myapp": "as-expected",
"lib:libmyapp.so": "as-expected",
"inc:myapp.h": "as-expected",
"app:myapp.desktop": "as-expected",
"res:myapp/icons/hicolor/256x256/apps/myapp.png": "as-expected",
"rootpath:boot/config": "as-expected"
}
Generate provides section and display to stdout:
usm manifest autoprovides
Use specific build directory:
usm manifest autoprovides /tmp/myapp-build
Update MANIFEST.usm file directly:
usm manifest autoprovides --replace
Combine options:
usm manifest autoprovides --replace /tmp/myapp-build
Without --replace, command outputs JSON provides section:
"provides": {
"bin:myapp": "as-expected",
"lib:libmyapp.so": "as-expected",
"rootpath:custom-file": "as-expected"
}
With --replace, command:
usm scaffold myapp meson vala
usm manifest build /tmp/build
usm manifest autoprovides --replace /tmp/build
Edit MANIFEST.usm to:
usm manifest install /tmp/build
Always review generated provides for:
Some files require manual specification:
{
"provides": {
"bin:myapp": "as-expected",
"lib:libmyapp.so": "as-expected",
"cfg:myapp.conf": {"pathBase": "install", "path": "etc/myapp.conf", "type": "reg"},
"res:myapp/default-config": {"pathBase": "source", "path": "config/default.json", "type": "reg"},
"rootpath:boot/loader.conf": {"pathBase": "install", "path": "boot/loader.conf", "type": "reg"}
}
}
If no resources are detected:
If files are misclassified:
When autoprovides fails during build:
If file update fails:
For non-standard layouts, manually edit generated provides:
{
"provides": {
"bin:myapp": "as-expected",
"lib:libmyapp.so": {"pathBase": "build", "path": "custom/lib/libmyapp.so", "type": "reg"},
"res:myapp/data": {"pathBase": "source", "path": "data/*", "type": "reg"},
"rootpath:etc/custom-config": {"pathBase": "source", "path": "config/custom.conf", "type": "reg"}
}
}
Remove unwanted resources from generated output:
This command provides package maintainers with automated tools for generating accurate manifest provides sections.