Mail archive
alpine-devel

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

From: 7heo <7heo_at_mail.com>
Date: Thu, 22 Jun 2017 09:24:29 +0200

On Jun 22, 2017 8:35 AM, Timo Teras <timo.teras_at_iki.fi> wrote:
>
> On Wed, 21 Jun 2017 20:30:01 -0500
> William Pitcock <nenolod_at_dereferenced.org> wrote:
>
> > Hello,
> >
> > On Wed, Jun 21, 2017 at 8:03 PM, Tmp File <tmpfile_at_mail.com> wrote:
> > > 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). 
> >
> > NAK.  We want to allow third parties to use abuild for architectures
> > we may not necessarily support upstream.
> >
> > > This will prevent errors like setting unsupported archs.
> > > 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.
> >
> > > And also help with typos.
> > > 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

Hey there,

How about having abuild failing (or warning, with an additional flag to fail on warnings) by default, and having it configured differently on the builders (via flag or configuration option)?

That would have the benefit of explicitly asking the user to ignore unknown archs, therefore preventing actual mistakes and typos.

Cheers,
Theo.
R{.n+yׯz_˛mbzX+ijZb^~i+-iw{
Received on Thu Jun 22 2017 - 09:24:29 GMT