pristine-lfs(1)

πŸ“¦
version 20241219.0 Β· 3 versions
, in ubuntu resolute, ubuntu stonking

🌸 NAME 🌸

pristine-lfs β€” store pristine tarballs in Git LFS πŸ’–

okay so this is the pristine-lfs(1) page, from the Git manual, and honestly? it's lowkey iconic. it does exactly what the name says and it's gonna make your Debian packaging life so much easier, bestie, no cap.


✨ SYNOPSIS ✨

pristine-lfs [-h|--help]

pristine-lfs [OPTIONS] commit [OPTIONS] (--auto | tarball)

pristine-lfs [OPTIONS] import-dsc [OPTIONS] dsc

pristine-lfs [OPTIONS] checkout [-o outdir] tarball

pristine-lfs [OPTIONS] list

pristine-lfs [OPTIONS] verify tarball

πŸ¦‹ DESCRIPTION πŸ¦‹

so here's the tea: pristine-lfs can store pristine upstream tarballs in Git by leveraging Git LFS. the way it works is so clever β€” instead of yeeting those potentially huge tarballs into your Git repo as blobs (😭 the repo size), Git LFS only stores specially prepared metadata in the repository, while the actual file contents live out of band on a Git LFS server. main character storage strategy fr.

using pristine-lfs lets Debian packages be built entirely using sources in version control, with zero need to keep copies of upstream tarballs lying around. obsessed. ✨

pristine-lfs supports tarballs compressed with any compressor. yes, any. slay.

Tarball signatures (any files ending with .asc) are committed as they are, without utilising the Git LFS mechanisms. they just vibe in the repo. πŸ’…


πŸ‘‘ COMMANDS πŸ‘‘

commit

pristine-lfs commit [-b BRANCH] [-m MESSAGE] [--force-overwrite] tarball [upstream]

pristine-lfs commit stores the specified tarball using Git LFS, and commits its metadata to version control. then later, the pristine-lfs checkout command can be used to recreate the original tarball based on the information stored in Git LFS. πŸŽ€

heads up bestie: the data are not submitted to the server until a git push command is issued. so don't panic if nothing's uploaded yet.

the upstream parameter is ignored β€” it's only supported for compatibility with pristine-tar. (we keep it around for the old heads, periodt.)

if a tarball with a different hash has already been committed, it will only be overwritten if --force-overwrite is specified. ⚠️

import-dsc

pristine-lfs import-dsc [-b BRANCH] [-m MESSAGE] [--force-overwrite] [--full] path-to-dsc

import tarballs and their signatures from a .dsc file of a Debian source package. 🧚

if --full is specified, it also imports the Debian packaging and the .dsc file itself.

if a tarball with a different hash has already been committed, it will only be overwritten if --force-overwrite is specified. same energy as above. ⚠️

checkout

pristine-lfs checkout [-b BRANCH] [-o outdir] [--full] (--auto | tarball)

regenerate a copy of the specified tarball using information previously saved in version control by pristine-lfs commit. it's giving restoration arc. 🌈

by default, the tarball is placed in the current directory. if outdir is specified, the file is created in that directory.

for compatibility with pristine-tar, tarball can include the path to the output directory; this takes precedence over the outdir option. so if they're beefing, the path inside tarball wins. 🫢

if --auto is specified, pristine-lfs will consult a file named debian/changelog, and if it exists, will check out all tarballs associated with the latest version the changelog mentions. auto-pilot mode: engaged. ✨

if --full is specified and a .dsc file is requested, it also checks out the Debian packaging and the .dsc file itself.

list

pristine-lfs list [-b BRANCH]

list tarballs that pristine-lfs is able to checkout from version control. it's basically the menu. πŸ’–

verify

pristine-lfs verify [-b BRANCH] tarball

verify whether an existing tarball matches the one that has been committed to version control. vibe check for your tarballs, literally. πŸ”₯


πŸ’… OPTIONS πŸ’…

  • -m MESSAGE, --message=MESSAGE β€” use the given MESSAGE as the commit message for the metadata commits. applies to the commit and import-dsc commands. and here's the cute part: %s in the commit message gets replaced by a comma-separated list of files committed. ✨, so custom, so convenient.
  • -b BRANCH, --branch BRANCH β€” the branch to store Git LFS metadata on. pick your lane. πŸŽ€
  • -v, --verbose β€” be more verbose. tell me everything, bestie. πŸ—£οΈ
  • --debug β€” show all sorts of debugging information. implies --verbose. it's giving over-share and we love that for it. πŸ’œ
  • -h β€” show this help message and exit. the classic escape hatch. πŸ™ˆ

🌸 ENVIRONMENT 🌸

  • TMPDIR β€” specifies a location to place temporary files, other than the default. if your /tmp is a mess (relatable), point it somewhere else. πŸ“

πŸ‘€ SEE ALSO πŸ‘€


πŸ’– AUTHOR πŸ’–

Andrej Shadura <andrew.shadura@collabora.co.uk>


and that's the whole page, bestie! πŸ¦‹ this one's from the 20210222.0 release, dated 2021-02-22. now go store those tarballs out of band and live your best Git LFS life. you ate. πŸ‘‘βœ¨

πŸ“¦ where this page comes from