I moved too fast and forgot to re-test amd64, which was ironically broken by my i386 fix, so now we do the full "distro arch to 'busybox arch'" conversion for the set of arches we support (which isn't *that* big).
Without this fix, if we try to build i386 on an amd64 machine without the linux32 "personality" applied, it uses `uname -m` and gets a slightly different result due to the lack of https://git.busybox.net/busybox/tree/arch/i386/Makefile?h=1_37_stable#n7 (adding `-march` and `-mtune` values to builds).
If we set `ARCH` appropriately during build, that file gets sourced and our builds include the appropriate values.
This does *not* affect uclibc builds because they set `CROSS_COMPILE`, which overrides the value of `(SUB)ARCH` (although it would be valid to set both in all cases, to be explicit, I just don't think that's necessary).
This adds a directory for us to store patches we need to apply during build -- I've copied the "no CBQ" patch we've already been applying, and a new "sha1_process_block64_shaNI.patch" which applies a patch for our new non-x86 build failures.
I've also added a README to the new patches directory to make it clear what types of patches are appropriate/acceptable (perhaps more accurately, why almost all patches are *not* acceptable).
This changes the build context for our rootfs builds to be the root of the repository so we don't have to muddy our template applying code with which patches to copy and can instead maintain that in the template itself (and skip the entire "patch applying" block of code when there are no patches to apply).
This also applies the "remove CBQ" patch across all variants consistently -- it's not technically needed on Alpine yet, but it will be, so it's simpler if we're just consistent.
```console
$ docker run -it --rm --pull=always alpine:edge
edge: Pulling from library/alpine
Digest: sha256:67b8a3c4c19bbdd43de723881bc536758f5e780f8d32ef8f5ef2b72f769a3e78
Status: Image is up to date for alpine:edge
/ # apk add --no-cache --quiet curl
/ # curl --version
Error relocating /usr/lib/libcurl.so.4: SSL_get0_group_name: symbol not found
```
This is pulled in automatically via `gnupg`, and moved from `Recommends` to `Depends` in 99474ad900, which has been part of `src:gnupg2` since 2.1.21-4 (and every supported version of both Debian _and_ Ubuntu have 2.2.x 😇).
This refactor will more closely match how BusyBox does releases -- they always call x.y.0 "unstable" but if it doesn't require any further fixes it never gets a .1 "stable" release (like 1.35 suffered from). Additionally, they don't seem to really ever have more than two simultaneous release branches (but if they did, we could trivially add a new `latest-2` and be covered):
```console
$ wget -qO- 'https://busybox.net' | grep -ioE '[0-9a-zA-Z ]+ -- BusyBox [0-9.]+ [(](un)?stable[)]' | sed -re 's/(.*) -- (.*)/\2\t\1/' | column -ts$'\t' -R2
BusyBox 1.36.0 (unstable) 3 January 2023
BusyBox 1.35.0 (unstable) 26 December 2021
BusyBox 1.33.2 (stable) 30 November 2021
BusyBox 1.34.1 (stable) 30 September 2021
BusyBox 1.34.0 (unstable) 19 August 2021
BusyBox 1.33.1 (stable) 3 May 2021
BusyBox 1.32.1 (stable) 1 January 2021
BusyBox 1.33.0 (unstable) 29 December 2020
BusyBox 1.32.0 (unstable) 26 June 2020
BusyBox 1.31.1 (stable) 25 October 2019
BusyBox 1.31.0 (unstable) 10 June 2019
BusyBox 1.30.1 (stable) 14 February 2019
BusyBox 1.30.0 (unstable) 31 December 2018
BusyBox 1.29.3 (stable) 9 September 2018
BusyBox 1.29.2 (stable) 31 July 2018
BusyBox 1.29.1 (stable) 15 July 2018
BusyBox 1.29.0 (unstable) 1 July 2018
BusyBox 1.28.4 (stable) 22 May 2018
BusyBox 1.28.3 (stable) 3 April 2018
BusyBox 1.28.2 (stable) 26 March 2018
BusyBox 1.28.1 (stable) 15 February 2018
BusyBox 1.28.0 (unstable) 2 January 2018
BusyBox 1.27.2 (stable) 17 August 2017
BusyBox 1.27.1 (stable) 18 July 2017
BusyBox 1.27.0 (unstable) 3 July 2017
BusyBox 1.26.2 (stable) 10 January 2017
BusyBox 1.26.1 (stable) 2 January 2017
BusyBox 1.26.0 (unstable) 20 December 2016
BusyBox 1.25.1 (stable) 7 October 2016
BusyBox 1.25.0 (unstable) 22 June 2016
BusyBox 1.24.2 (stable) 24 March 2016
BusyBox 1.24.1 (stable) 24 October 2015
BusyBox 1.24.0 (unstable) 12 October 2015
BusyBox 1.23.2 (stable) 23 March 2015
BusyBox 1.23.1 (stable) 27 January 2015
BusyBox 1.23.0 (unstable) 23 December 2014
BusyBox 1.22.1 (stable) 20 January 2014
BusyBox 1.22.0 (unstable) 1 January 2014
BusyBox 1.21.1 (stable) 29 June 2013
BusyBox 1.21.0 (unstable) 21 January 2013
BusyBox 1.20.2 (stable) 2 July 2012
```