Subject: Alpine Repository

From: Jeron Lau <[email-masked]>
Date: Wed, 29 Sep 2021 12:51:09 -0500

Hello,

I am trying to build an Alpine repository but I keep getting this
error message after running apk add package_name:

ERROR: package_name-0.4.0-r0: package mentioned in index not found
(try 'apk update')

What does this error mean (what's the internal cause of the failure)?
apk update does not fix the issue.

I tried searching for the apk tool source code to investigate further
but couldn't find it.

To make the repository I do,

apk index -vU -o /repo/APKINDEX.tar.gz /repo/package_name.apk
abuild-sign -k /path/to/key.rsa /repo/APKINDEX.tar.gz

Then copy up the repository (/repo/) to the server.  Am I missing
anything that might be causing this error?

Thanks,

---

From: Jeron Lau <[email-masked]>
Date: Wed, 29 Sep 2021 15:05:57 -0500

OK, I believe that the issue is due to platform mismatch (I'm building
the package on x86_64 for armhf), so I think I have to use

aports scripts/bootstrap.sh armhf

but I'm not sure what I need to do after that in order to build for
the other architecture.  Any tips appreciated.

---

From: Ariadne Conill <[email-masked]>
Date: Wed, 29 Sep 2021 15:18:54 -0500 (CDT)

Hi,

Please don't top-post your replies on Alpine lists.

> the other architecture.  Any tips appreciated.

No!  Do not use bootstrap.sh.  It does not do what you want.

You actually want to do the following:

1. Install qemu-arm and qemu-openrc packages.
2. Start the qemu-binfmt service.
3. Invoke abuild as `CBUILD=armhf abuild rootbld` in the directory with 
your APKBUILD to build the package.

Ariadne