Alpine's package manager is a little bit different than many other distros. It
keeps a list of all your manually requested packages in /etc/apk/world (which
you can manually edit) and simply adds/removes the correct dependencies whenever
you do an apk add or apk upgrade. There is an "update" subcommand, but
it's not really needed since upgrade will call it automatically.
alias xi='doas apk add'
alias xu='doas apk upgrade'
alias xs='apk search'
alias xr='doas apk del'
alias xinfo='apk info'
alias xlist='cat /etc/apk/world'
alpine packaging
Creating and modifying packages.
default /etc/apk/world packages
acct
alpine-base
doas
e2fsprogs
linux-firmware-other
linux-lts
openssh
openssl
syslinux
meta packages
Alpine makes it really easy to create meta packages on the fly.
apk add a b c -t meta-package-name-here
package errors
I don't know why, but sometimes apk will get itself into an error state.
Fortunately, you can fix it (or at least see what the problem is) with
apk fix:
1 error; 3813 MiB in 962 packages
rose:~% doas apk fix
(1/1) Reinstalling linux-firmware-qcom (20220913-r0)
OK: 3813 MiB in 962 packages
man
apk add mandoc man-pages docs
Most packages have a corresponding package-doc package with manuals,
installing the docs meta-package will automatically install documentation when
you grab new packages.
creating / updating packages
https://wiki.alpinelinux.org/wiki/Creating_an_Alpine_package
- Create an account on https://gitlab.alpinelinux.org
- Setup the build environment for aports.
- Fork the aports repository.
- Clone your new fork.
- Set git pull.rebase=true, set your username and email.
- Create and switch to a new branch (don't use master).
- Add a new directory under testing that is your new package name.
- Add your APKBUILD file.
- Run abuild checksum
- Make sure you run the apkbuild-lint and aport -r and there are no warnings.
- Commit your APKBUILD with the commit message: 'testing/packagename: new aport'
- Push your changes to your fork on https://gitlab.alpinelinux.org/alpine.
- Create a merge request.