Void-Packages Sources Management wrapper for XBPS-SRC.
vpsm was made specifically for Void Linux. Is a simple wrapper for xbps-src commands that allows handling binary packages sources, query, smooth the workflow of the creation of new packages - and a little more. Also used to substitute some commands from xtools collection utilities.
Motivation
Strongly inspired by vpm (originally created by Armin Jenewein) and vsv wrappers to management xbps-* and sv commands respectively. I felt encouraged to write some similar idea after learning about the creation of new packages to Void Linux. I noticed the workflow is very repetitive and it's also necessary to be inside the void-packages local repository to make things work. This bothered me a little... because I'm lazy. So, with the purpose to make things work easily and from anywhere in the terminal, I started it.
Dependencies
- Void Linux
- git
- void-packages repository [cloned]
- ripgrep
- xtools
Instalation
0. Fork Void Linux's void-packages repository
1. Clone the void-packages repository forked
On my enviroment I like keep it inside my $HOME path
2. export XBPS_DISTDIR
Export in your .bashrc or .zshrc, or any other rc file what you want, the XBPS_DISTDIR=/path/to/void-packages/.
3. Clone this repository
4. Add the vspm executable to PATH
For example, exporting inside .zshrc file
I like to create a hidden .bin directory on my $HOME path and add it to $PATH var, move/copy/link the vpsm executable. But you can do it any way you like.
$ git clone https://github.com/sinetoami/vpsm.git ~/vpsm
$ cd vpsm
$ ln -s ~/vpsm/vpsm ~/.bin/
$ echo "export PATH=$PATH:$HOME/.bin" >> ~/.zshrc
Installation using Makefile
Before installing using this method, you need to know two things:
- The default
PREFIXpath is set to/usr/local- you can change it. - If you changes the
PREFIX, make sure it's in thePATH.
or
$ sudo make install PREFIX=/new/path
Usage
USAGE:
vpsm [OPTIONS] [SUBCOMMANDS] []
OPTIONS:
--color= - Enable/Disable colorized output (default: auto)
--help - (same as: help)
--help-pager - (same as: helppager)
GIT SUBCOMMANDS:
add-changes (ac) - Add work changes in your clone repository.
add-remote-repo (arr) - Add new remote repo in your clone repository.
checkout-branch (co) - Switch branch.
commit-changes (cc) - Commits changes added.
create-branch (cb) - Create a new branch.
delete-branch (delb) - Delete a existing branch.
pull (pp) - Pull commit from .
pull-request (pr) [message] - Create a pull-request [optional message].
push-commit (pc) - Push commits to .
update-repo (upr) - Pull commits from void-linux official repo.
XBPS-SRC SUBCOMMANDS:
binbootstrap (bb) - Install bootstrap packages from host repositories into .
bootstrap-up (bu) - Updates bootstrap packages.
build-environment - Configure environment to create binary packages.
edit-template (et) - Edit template.
install (i) - Build binary package for and all required dependencies and install.
lint (li) - Scan XBPS template for common mistakes.
list (l) - Lists installed packages in .
pkg - Only build binary package for and all required dependencies.
purge-distfiles (pdistf) - Removes all obsolete distfiles in /sources.
searchbin (sb) - Search in /binpkgs for package by (use xbps-query).
searchsrc (ss) - Search in for package by .
show (sw) - Show information for the specified package.
show-build-deps (bdeps) - Show required build dependencies for .
show-deps (rdeps) - Show required run-time dependencies for .
uninstall (un) - Uninstall and purge distfiles for .
update-bulk (upb) - Rebuilds all packages in the system repositories that are outdated.
update-check (upc) - Check upstream site of for new releases.
update-sys (ups) - Rebuilds packages in system and updates them.
xgsum - Generate SHA256 for template.
xinstall (xi) - Like xbps-install -S , but take cwd repo and sudo/su into account.
Examples
Query some package from srcpkgs directory
[vpsm] Searching (srcpkgs) -> chrome (search_result chrome):
[-] chrome-gnome-shell - GNOME Shell integration for Chrome
[*] google-chrome - An attempt at creating a safer, faster, and more stable browser
[-] mkchromecast - Cast Linux Audio/Video to Google cast and Sonos devices
[-] python3-chromecast - Python3 library to communicate with Google Chromecast
[-] xf86-video-openchrome - Xorg driver for VIA IGPs
[vpsm] [search_result chrome], return code was: 0
Update upstream repository
[vpsm] Pull commits from void-linux official repo->void-linux
Switched to branch 'master'
Your branch is up to date with 'origin/master'.
...
From https://github.com/void-linux/void-packages
* branch master -> FETCH_HEAD
485822d38b..d3df1d1680 master -> void-linux/master
Updating 485822d38b..d3df1d1680
Fast-forward
README.md | 2 +-
srcpkgs/GCP-Guest-Environment/template | 10 +++-------
srcpkgs/NetworkManager/template | 4 ++--
srcpkgs/aisleriot/template | 4 ++--
srcpkgs/ampache/template | 4 ++--
...
srcpkgs/xsoldier/template | 16 ----------------
27 files changed, 113 insertions(+), 94 deletions(-)
...
Current branch master is up to date.
...
=> xbps-src: updating /home/sineto/.void-packages/masterdir ...
[*] Updating `https://alpha.de.repo.voidlinux.org/current/x86_64-repodata' ...
...
`https://alpha.de.repo.voidlinux.org/current/aarch64/x86_64-repodata': Not Found
Show required build dependencies
[vpsm] Show required build dependencies -> vivaldi (./xbps-src show-build-deps vivaldi):
desktop-file-utils
hicolor-icon-theme
[vpsm] [./xbps-src show-build-deps vivaldi], return code was: 0
References
- Xbps-src - Void Linux Wiki - https://wiki.voidlinux.eu/Xbps-src
- Void Packages Manual - https://github.com/sinetoami/void-packages/blob/master/Manual.md
- VoidLinux's quick PR guide - https://forum.voidlinux.org/t/voidlinuxs-quick-pr-guide/6333
Special thanks
- Dave Eddy - From whom I copied a piece of code from his vpm fork and the Makefile file.
- shizonic - For encouraging me to continue with this small project.
Thank you guys! Cheers!
Self-Promotion
Do you like this plugin? Come on: