kota's memex

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

  1. Create an account on https://gitlab.alpinelinux.org
  2. Setup the build environment for aports.
  3. Fork the aports repository.
  4. Clone your new fork.
  5. Set git pull.rebase=true, set your username and email.
  6. Create and switch to a new branch (don't use master).
  7. Add a new directory under testing that is your new package name.
  8. Add your APKBUILD file.
  9. Run abuild checksum
  10. Make sure you run the apkbuild-lint and aport -r and there are no warnings.
  11. Commit your APKBUILD with the commit message: 'testing/packagename: new aport'
  12. Push your changes to your fork on https://gitlab.alpinelinux.org/alpine.
  13. Create a merge request.