dh_installlogcheck - Linux
Overview
dh_installlogcheck verifies that an installed package provides a changelog.txt file and ensures compliance with Debian Policy Section 5.6. This is crucial for maintaining proper documentation and transparency in Debian packages.
Syntax
dh_installlogcheck [options] <package> <version>
Options/Flags
- -v, –version: Display version information and exit.
- -h, –help: Display usage help and exit.
- -a, –add-changelog: Automatically add a changelog.txt file if one is not present.
- -x, –show-diff: Display the diff between the expected changelog.txt and the installed version.
Examples
Basic usage:
dh_installlogcheck mypackage-1.2.3
Automatic changelog adding:
dh_installlogcheck -a mypackage-1.2.3
Comparing changelog differences:
dh_installlogcheck -x mypackage-1.2.3
Common Issues
- Missing changelog.txt file: Use the
-a
option to automatically generate one. - Changelog.txt file not formatted correctly: Ensure it follows Debian Policy Section 5.6 guidelines.
Integration
Pre-installation scripts:
preinst() {
dh_installlogcheck ${DEBIAN_PACKAGE_NAME} ${DEBIAN_PACKAGE_VERSION}
}
Post-installation scripts:
postinst() {
if ! dh_installlogcheck ${DEBIAN_PACKAGE_NAME} ${DEBIAN_PACKAGE_VERSION} -x | grep -q -xF "No changes made"; then
echo "Changelog.txt does not match expected format." >&2
exit 1
fi
}
Related Commands
- debmake: Builds Debian packages.
- dch: Manages Debian changelogs.
- Debian Policy Section 5.6