There is a new pull request by tornaria against master on the void-packages repository https://github.com/tornaria/void-packages show-diff https://github.com/void-linux/void-packages/pull/53950 [RFC] xbps-src: add a command `show-diff` Usage: ./xbps-src show-diff PKG Shows differences between the original sources and $wrksrc, in the form of a patch that can be used for the template. Note this ignores new files. #### Testing the changes - I tested the changes in this PR: **briefly** #### Alternatives One alternative suggested in irc is to use unpatch from https://leahneukirchen.org/dotfiles/bin/unpatch Save the original files as .orig, then run - `unpatch -g -p3 masterdir-*/builddir/pkg-ver` With vim, one can use `:set patchmode=.orig` Two more suggestions from irc related to this: - `alias xpatch="nvim -c 'set patchmode=.orig'"` - `autocmd BufNewFile,BufRead masterdir-*/builddir/* setlocal patchmode=.orig` A patch file from https://github.com/void-linux/void-packages/pull/53950.patch is attached