Check out my first novel, midnight's simulacra!

Arch: Difference between revisions

From dankwiki
Line 41: Line 41:
pacman-key --populate archlinux
pacman-key --populate archlinux
</pre>
</pre>
If you then need a particular key, try e.g.:
<pre>pacman-key -r A5E9288C4FA415FA</pre>

Revision as of 15:52, 1 January 2020

After fifteen years of exclusively running Debian Linux in its Unstable ("sid") rolling configuration on my machines, I converted my day-to-day laptop to Arch in March 2019 (my workstation remains Debian Unstable). The Lenovo T580 started life as "uptowngirl"; she was renamed "uptowngrimes" for the first pass at running Arch, and finally "grimes" once I was ready to give Arch a real go. My primary motivations were the increasingly European and ossified nature of Debian, and the fact that the Arch wiki provided an increasing portion of the best content I was reading each day.

I dig it thus far!

AUR

The Arch User Repository allows random people to upload Arch packaging. I maintain a few packages in the AUR.

Building custom kernel packages

The Arch Build System page on the Arch Wiki purports to explain how to make custom kernel packages, but I've never found it very clear.

One-time setup

  • Install the asp package from the Extra repository
  • Run asp update linux followed by asp checkout linux
  • You ought now have a directory linux with subdirectories repos and trunk
    • in the future, run asp update in this directory
  • Change the pkgbase field in PKGBUILD; I use linux-HOSTNAME where HOSTNAME is the name of that machine
  • We're going to keep our kernel config in the newly-created directory. If you don't have one ready, use the current config:
    • Insert the configs module if it's not loaded
    • Inflate and copy the current config: zcat /proc/config.gz > config
  • Add the following to PKGBUILD:
  msg2 "Setting config from ../../../config..."
  cp ../../../config .config
  make oldconfig
  make menuconfig
  diff -ur ../../../config .config is 

Each time you build a new kernel, the preserved config will be copied into the source directory. make oldconfig will give you the opportunity to configure any new options. make menuconfig will then allow you to modify the kernel config. If this kernel config ends up different from the preserved config (it always will at least once, due to the version changing), the process will abort. Run cp src/archlinux-linux/.config ../config to preserve the new config. Once the config is no longer changing, the process can continue.

New kernel process

  • Edit PKGCONFIG and change _srcver, usually to a string of the form MAJOR.MINOR.PATCH-arch1
  • Clear out any old packages and source: rm -rf *.xz src pkg
  • Make your packages, updating the kernel config along the way (see above):
    • MAKEFLAGS=-jNN makepkg -s, where NN is the number of parallel processes
    • Remember, cp src/archlinux-linux/.config ../config to preserve the new config
  • Install the new packages: pacman -U *.xz

GPG keys

If you're getting errors during verification of GPG signatures, you can use pacman's trusted keys. Add to your gpg.conf: keyring /etc/pacman.d/gnupg/pubring.gpg and then run (as specified at Package Signing):

pacman-key --init
pacman-key --populate archlinux

If you then need a particular key, try e.g.:

pacman-key -r A5E9288C4FA415FA