Warning: THIS WIKI IS DEPRECATED. It is no longer being maintained, and contains outdated and incorrect information. Please refer to the Void Handbook, https://docs.voidlinux.org/, for the official documentation. If you can't find the information you're seeking, please raise an issue at https://github.com/void-linux/void-docs/issues

Create Git Versions of Packages

From Void Linux Wiki
Jump to navigation Jump to search

Clone down the void-packages repo,

Create a branch to store your custom packages on: git checkout -b custom

  1. Remove distfiles & checksum from template
  2. Update the version
  3. Add git to makedepends in template
  4. Use this do_fetch in the template after attributes:
      git clone … ${wrksrc}
  5. ./xbps-src pkg foo
  6. sudo xbps-install -Su --repository=hostdir/binpkgs/custom foo
  7. Use sudo xbps-pkgdb -m repolock foo to lock the package to your custom repo, so that when upstream overtakes you, you don't upgrade onto latest

If you wish to return to upstream, you can do sudo xbps-pkgdb -m repounlock foo to unlock the repo. Followed by sudo xbps-install -Su --force foo

Updating the package

When updating the package, use ./xbps-src pkg -f foo to force installation into the local repo. Install using sudo xbps-install --force -Su --repository=hostdir/binpkgs/custom foo, or more conveniently from the xtools package: xi --force foo