Subject: [alpine-devel] Suggestion to accept only whitelisted archs on APKBUILD arch= field

From: "Tmp File" <[email-masked]>
Date: Thu, 22 Jun 2017 03:03:45 +0200

Alpiners,

I suggest abuild stops to accept anything as an architecture.
Instead it should only accept a few whitelisted strings (x86 x86_64 armhf aarch64 ppc64le s390x noarch).

This will prevent errors like setting unsupported archs.
https://github.com/alpinelinux/aports/blob/master/main/yaboot/APKBUILD#L8

And also help with typos.
https://github.com/alpinelinux/aports/commit/58a2da0b213c969c00c1014552992c415f7a6610

When support for a new arch is added it can be whitelisted.

tmpfile

---
Unsubscribe:  [email-masked]
Help:         [email-masked]
---

---

From: William Pitcock <[email-masked]>
Date: Wed, 21 Jun 2017 20:30:01 -0500

Hello,

> Instead it should only accept a few whitelisted strings (x86 x86_64 armhf aarch64 ppc64le s390x noarch).

NAK.  We want to allow third parties to use abuild for architectures
we may not necessarily support upstream.

> https://github.com/alpinelinux/aports/blob/master/main/yaboot/APKBUILD#L8

powerpc arch is supported by abuild, we are just not presently
building it, as the hardware I had for it failed.
Although we may use ppc32 instead to be more in line with the ppc64le
nomenclature.

> https://github.com/alpinelinux/aports/commit/58a2da0b213c969c00c1014552992c415f7a6610

William

---

---

From: Timo Teras <[email-masked]>
Date: Thu, 22 Jun 2017 09:35:17 +0300

On Wed, 21 Jun 2017 20:30:01 -0500

> > https://github.com/alpinelinux/aports/commit/58a2da0b213c969c00c1014552992c415f7a6610  

I think abuild should complain with warning about architectures that it
does not know about to catch these typoes. But it should not be hard
failure. Some of those are intentional :)

Feel free to send abuild patch that makes it a warning. But make sure
it's not custom whitelist, it should instead be using
arch_to_hostspec() from functions.sh. And additionally whitelist
noarch and all.

Thanks,
Timo

---