check-dfsg-status
Check Debian Free Software Guidelines (DFSG) compliance
TLDR
List non-free and contrib packages (and their description)
Only output the package names
SYNOPSIS
check-dfsg-status [options] [directory]
PARAMETERS
-h, --help
Display usage summary and exit
-V, --version
Print version info and exit
-c, --check-only
Suppress output; exit 0 if DFSG-clean, 1 if unclean, 2 if error/unknown
DESCRIPTION
The check-dfsg-status command, part of the devscripts package, is a utility for Debian maintainers to determine if a source package is likely DFSG-free (compliant with Debian Free Software Guidelines). It performs a heuristic analysis by examining two key indicators:
1. The version string in debian/changelog: Looks for suffixes like ~dfsg1, ~dfsg, or similar patterns indicating removal of non-free components.
2. The upstream original tarball name: Checks for _DFSG1, _dfsg1, or equivalent suffixes, which signify repackaged sources with proprietary blobs excised.
If either indicator is present, it reports DFSG-clean; otherwise DFSG-unclean or Unknown. This helps ensure packages in main are free software. Run it in the source directory (defaults to current). Primarily used in build scripts or CI to flag potential issues before upload to Debian. Not foolproof—manual review recommended for accuracy. Supports automation via exit codes.
CAVEATS
Heuristic only; false positives/negatives possible (e.g., coincidental version strings). Does not inspect content—verify manually. Requires debian/changelog and source tarball.
TYPICAL OUTPUT
DFSG-clean: orig tarball name contains '_DFSG'
DFSG-unclean: No dfsg indicators found
USAGE EXAMPLE
cd mypackage-1.0
check-dfsg-status
./check-dfsg-status ../other-pkg/
HISTORY
Added in devscripts 2.10.28 (October 2006) to aid DFSG compliance checks amid growing repackaged source usage.
SEE ALSO
devscripts(1), lintian(1), mkorigtar.gz(1)


