- BA: BlackArch
- AL: ArchLinux
- SO: StackOverflow
- AL PKGBUILD guide: https://wiki.archlinux.org/index.php/PKGBUILD
- BA PKGBUILD templates: https://github.com/BlackArch/blackarch-pkgbuilds
See PKGBUILD(5) § USING VCS SOURCES and VCS package guidelines#VCS sources for details on VCS specific options, such as targeting a specific Git branch or commit.
To update pkgver automatically when there is a pkgver()
:
makepkg -o
curl -s "https://api.github.com/repos/<noraj>/<haiti>/releases/latest" | jq -r '.tag_name'
gem list '^haiti-hash$' -r | grep -Po '\((.+)\)' | tr -d '()'
# or better
curl -s https://rubygems.org/api/v1/gems/<haiti-hash>.json | jq -r '.version'
Remove ALL local branches that are not on remote (see on SO)
git fetch -p && git branch -vv | grep ': gone]' | awk '{print $1}' | xargs git branch -D
Remove untracked files and git ignored files (dry run)
git clean -xn
Remove untracked files and git ignored files (force)
git clean -xf
Checking out pull requests locally
$ git fetch origin pull/ID/head:BRANCH_NAME
$ git checkout BRANCH_NAME
Remove all branches named pr-*
git branch | awk '{print $1}' | grep -P '^pr-\d+' | xargs git branch -D
git rebase --onto
https://womanonrails.com/git-rebase-onto
List categories
$ pacman -Sg | grep blackarch
$ curl https://raw.githubusercontent.com/BlackArch/blackarch/master/lists/groups
Install pacman-contrib
to get updpkgsums
.
- blackarch-devtools: https://github.com/Edu4rdSHL/blackarch-devtools
- Update env:
ba-dev -u
- Build
ba dev -b
- Install and test:
ba-dev -e 'cmd' -p package.tar.zst
- Build package requiring files that aren't available in repos:
ba-dev -I ../dep/package.pkg.tar.zst
- Update env:
Python packaging
- Packaging Python Projects - setup.py
- Packaging and distributing projects
- Command Line Scripts
- How to Publish an Open-Source Python Package to PyPI
cf. https://github.com/BlackArch/blackarch/pulls?q=is%3Apr+%22remove+useless+dependencies%22