pristine-lfs: a robust replacement for pristine-tar
Channel: Andrej Shadura
Date: 2021-01-24

pristine-tar is a magical tool that can regenerate a pristine upstream tarball using only a small binary delta file and a revision control checkout of the upstream branch. Since its creation, it’s become part of the Mercurial- and Git-based workflows of many individual maintainers and teams, as it provides a way to essentially produce Debian source packages using Git-based tooling only, without the need to be able to talk to the archive or a package mirror.

Despite its usefulness, pristine-tar suffers from some inherent drawbacks. It attempts to reconstruct output of unknown versions of compressors such as gzip, including all of their quirks and weirdness, generating byte-by-byte identical compressed files. This task is very difficult as compressors evolve and their output changes.

pristine-lfs attempts to be a replacement for pristine-tar, while attacking the problem in a different way. It utilises the Git LFS mechanism to store the tarballs next to the Git repository in the dedicated file storage. Git LFS is supported by GitLab (and hence by Salsa), GitHub and other online Git hosting providers.



This talk was presented at MiniDebConf India 2021.