So you want to do fedora packaging in a Distrobox?
It takes a couple of extra steps, particularly if you want to be able to do mockbuilds:
$ distrobox create -i quay.io/fedora/fedora:latest -n fpkg --root --init --additional-packages 'systemd vim zsh fedora-packager copr-cli'
If you happen to be on an openSUSE based system, such as MicroOS, Aeon, or Kalpa (and probably Leap, Tumbleweed, or anything else), you’ll need to do the following:
$ sudo podman exec -it fpkg /bin/bash
📦 [root@mustang /]$ usermod -aG wheel sfalken
📦 [root@mustang /]$ usermod -aG mock sfalken
📦 [root@mustang /]$ exit
I don’t actually know precisely why this happens, other than it’s openSUSE’s sudo setup not jiving with Fedora’s.
This next part is sort of dependent on whether your local username matches your FAS username, mine doesn’t (sfalken locally, sfaulken in FAS) if your local username and your FAS username are the same, you can just run fkinit and go on your merry way. If not, there are two ways of doing it:
Option 1:
📦[sfalken@fpkg2 ~]$ fkinit -u "FAS Username" (sfaulken in my case)
Option 2:
📦[sfalken@fpkg2 ~]$ echo "FAS Username" >> ~/.fedora.upn
📦[sfalken@fpkg2 ~]$ fkinit
If you run into mockbuilds failing, while running the dnf transaction, setting up your buildroot, complaining about not being able to access /dev/null, you can do the following, and it should fix it.
mount -o bind,dev /var/lib/mock /var/lib/mock
At this point, everything should be good to go, mockbuilds will work, you’ll be able to fire off koji builds, upload sources to the lookaside storage