Overview
In a landmark move for Linux security, the Debian project has made reproducible builds a hard requirement for all packages entering the testing suite for the upcoming Debian 14 'Forky' release. As of May 9, the migration software automatically blocks any package that fails a reproducibility check from moving into testing. If an already-accepted package later becomes non-reproducible, it too gets blocked. This policy, announced by release team member Paul Gevers on the debian-devel-announce mailing list, represents years of collaboration with the Reproducible Builds project and significantly strengthens the supply chain security of the world's most prominent community Linux distribution.

Currently, 98.29% of architecture-independent packages in Forky are reproducible (23,731 passing, 414 still flagged as 'bad'). The mandatory policy will drive that number even higher, giving users a stronger guarantee that the binaries they install match the published source code exactly.
Prerequisites
To fully understand and apply this guide, you should have:
- Basic familiarity with Debian packaging (source packages,
debian/directory,dpkg-buildpackage) - Access to a Debian testing/unstable environment (or a system where you can install
reprotestanddiffoscope) - Command-line proficiency (shell, editing files, using
apt) - For maintainers: an uploaded package in Debian unstable or experimental that you intend to migrate to testing
Step-by-Step Instructions
1. Understand the Requirement
Reproducible builds ensure that compiling the same source code with the same build environment always produces identical binary outputs. Without this, a malicious actor could inject subtle changes during the build process that would be invisible to code review. Debian's new policy applies to the 'Forky' cycle (Debian 14) and uses the britney migration software to enforce checks automatically. Packages that fail reproducibility tests are blocked from testing until fixed.
Check the current reproducibility dashboard at reproduce.debian.net for the 'all' view on Forky. The 414 failing packages must either be fixed or removed before the release.
2. Check Your Package's Reproducibility Status
Use the Debian Reproducible Builds web interface or the command line:
- Visit https://reproduce.debian.net and search for your source package name.
- Alternatively, install
reprotestand run locally:apt install reprotest diffoscope - Build your package twice in the same environment and compare with
diffoscopeorsha256sum. Example:cd /path/to/source
dpkg-buildpackage -us -uc -b
mv ../*.deb ../build1/
dpkg-buildpackage -us -uc -b
diffoscope ../build1/*.deb ../*.deb
3. Fix Common Reproducibility Issues
Most problems stem from non-deterministic data embedded in binaries:
- Timestamps: Use
SOURCE_DATE_EPOCHenvironment variable (set to a fixed date) and ensure build tools respect it. - Build paths: Avoid absolute paths in output; set
BUILD_PATH_PREFIX_MAPor use relative paths. - File ordering: When reading files from a directory (e.g.,
*globs), sort them explicitly to avoid filesystem-dependent order. - Randomness: Seed random number generators with a fixed value (e.g., from
SOURCE_DATE_EPOCH). - Hostname/username: Ensure generated files do not include build host information.
For detailed guidance, consult the Reproducible Builds documentation.
4. Implement Fixes in Your Package
Edit debian/rules, debian/patches/, or upstream build files. Example: adding export SOURCE_DATE_EPOCH = $(shell date -d '@1' +%s) in debian/rules (though usually set automatically by dpkg-buildpackage). For packages using cmake, pass -DCMAKE_BUILD_TIMESTAMP=1. After each fix, rebuild and compare until the two builds match.

5. Test with reprotest
The reprotest tool automates building in a controlled environment and comparing outputs. Run in your source tree:
sudo reprotest --source-pkg=../*.dsc 'dpkg-buildpackage -us -uc -b'If it succeeds, your package is reproducible. If it fails, examine the diffoscope output (usually saved to a file) to identify the differences.
6. Handle Migration Blocks
When your fixed version migrates, the uploader is responsible for filing release-critical bugs (RC bugs) if reverse dependencies have autopkgtest regressions caused by your changes. See the Common Mistakes section for pitfalls.
Common Mistakes
- Ignoring build path variations: Even with
SOURCE_DATE_EPOCH, if you use absolute paths in-Iflags or debug info, builds from different directories will differ. Always useBUILD_PATH_PREFIX_MAP. - Forgetting to set
SOURCE_DATE_EPOCHfor helper scripts: Some build systems (e.g., Python'ssetuptools) respect the environment variable; others need explicit patches. - Not sorting directory listings:
tararchives,ar(used in .debs), and file manifest generation often see non-deterministic ordering. Usefind ... -print0 | sort -zor similar. - Overlooking embedded database seeds: SQLite databases or
gdbmfiles may embed random seeds – consider usingreproducible-builds.org/diffoscopeto see hidden differences. - Assuming autopkgtest failures are not your problem: Even if your package is reproducible, migration requires passing tests for all reverse dependencies. Plan to fix those regressions or coordinate with maintainers.
Summary
Debian's mandatory reproducible builds for Forky represent a major step forward in supply chain security. By ensuring every binary can be independently verified against its source, the project closes a long-standing avenue for undetected tampering. For maintainers, the path is clear: check your package's status, fix common issues like timestamps and build paths, test with reprotest, and be proactive about migration blocks. With 98.29% of architecture-independent packages already reproducible, the remaining 414 failures are the final hurdle before Forky delivers a truly verifiable operating system. For users, this means every apt install brings a binary that matches the source – no guesswork, no trust required.