You can find the the information here: https://wiki.alpinelinux.org/wiki/Creating_an_Alpine_package
For your convenience, I can setup an Alpine VM and give you SSH access with the build environment and the aports tree already setup. Then summary steps in case you want to try on your own container/VM would be: 1- Setup the build environment as described in the wiki. 2- Clone aports tree: git clone https://github.com/alpinelinux/aports 3- Go into the qemu package directory directory in aports tree: cd aports/main/qemu 4- Run: abuild clean checksum unpack prepare deps build This would get you the binary built. If you need to add a patch. Create the patch file add it to the APKBUILD file and then run "abuild checksum" to compute it's checksum and add it to the APKBUILD file. abuild quick ref: abuild clean: Remove temp build and install dirs abuild unpack: Unpack sources to \$srcdir abuild checksum: Generate checksum to be included in APKBUILD abuild prepare: Apply patches abuild deps: Install packages listed in makedepends and depends abuild build: Compile and install package into $pkgdir Once finished to clean up everything run: abuild undeps clean Thanks. Fernando On vie, feb 22, 2019 at 3:55 PM, Paolo Bonzini <pbonz...@redhat.com> wrote: On 22/02/19 15:43, Fernando Casas Schössow wrote: Hi all, Indeed I can confirm this issue occurs with the stock, unmodified QEMU binary provided with Alpine since at least Alpine 3.6 up to 3.9. Is there any compiler flag I can tweak, add or remove to rebuild qemu and try to repro to confirm a possible workaround? Nope, not yet. However, I can try some experiments if you can provide some information on how to rebuild an apk. Paolo