diff2patches(1)

πŸ’– diff2patches πŸ’–

okay bestie, so diff2patches is this lil Unix tool β€” it lives in section 1 of the manual, iykyk β€” and it does exactly one thing but it does it beautifully: it goes into a .diff.gz file and pulls out all the patches that touch stuff outside the debian/ folder. no cap.


✨ SYNTAX ✨

diff2patches filename
diff2patches --help|--version

🌸 DESCRIPTION 🌸

okay so here's the vibe. diff2patches extracts patches from a .diff.gz which apply to files outside the debian/ directory scope. like, it's not here for debian-stuff, it's here for everything else. main character energy only.

and it's so organized about it πŸŽ€ β€” a patch is created for each modified file. not one big blob, no. one per file. iconic.

each patch gets named according to the path of the modified file, with / replaced by ___, and an extension of .patch. so like the slashes get swapped out for triple underscores, cute little name glow-up, and then it gets .patch slapped on the end. periodt.


πŸ’… OPTIONS πŸ’…

  • filename β€” extract patches from filename which apply outside the debian/ directory. that's the whole job fr fr.
  • --help β€” output help information and exit. it's giving "let me explain myself."
  • --version β€” output version information and exit. it's giving "who am I, what am I."

πŸ¦‹ FILES πŸ¦‹

  • debian/control β€” the existence of this file is tested before any patch is extracted. like a little vibe check at the door πŸ™ˆ. no debian/control, no patches.
  • debian/
  • debian/patches/ β€” patches are extracted to one of these directories. debian/patches/ is preferred, if it exists. and if DEB_PATCHES is present in the environment, it will override this behavior (see the β€œENVIRONMENT VARIABLES” section below, bestie, I got you πŸ’–).

🌈 ENVIRONMENT VARIABLES 🌈

  • DEB_PATCHES β€” when defined and points to an existing directory, patches are extracted in that directory and not under debian/ nor debian/patches/. it literally overrides everything. it's the final boss πŸ‘‘.

⭐ SEE ALSO ⭐


πŸ’œ AUTHOR πŸ’œ

Raphael Geissert <atomo64@gmail.com>


ok so that's the whole page, no crumbs left πŸ’€ β€” and before you go, the official vibes check: this was diff2patches(1) from the diff2patches(1) manual, authored by the one and only Raphael Geissert <atomo64@gmail.com>. slay, bye 🫢✨
πŸ“¦ where this page comes from