When running generate I get a lot of differences in DevelPatchPerl.patch
because git's `diff.mnemonicprefix` is set to `true`. To mitigate this,
use `git -c 'diff.mnemonicprefix=false' diff` so everything is the same
as upstream.
Do a long-needed overhaul of this script allow building of `slim`
variants:
- Make the base image configurable through a new `builds` setting.
- Rename the `64bit` image to `main`, as bit-ness no longer applies as
we already build on multiple architectures.
- Rename `Releases.yaml` to the more general `config.yml`, allowing it
to contain the supported image variants and Configure options.
- Run through perltidy 💄
The `slim` variants installs the minimum build-deps needed to build
Perl, and removes them after (save for make and netbase, to retain being
able to install CPAN modules through cpanm.)
Perl 5.28.0 seems to be distributed only in gzip and xz tarballs now, so
adjust accordingly. This now requires a GNU tar with
`-a/--auto-compress` option support (tar version >= 1.20) which
buildpack-deps Docker image already includes; those wanting to use this
script to regenerate, however, should match their tar version as well.
This adds an appropriate "-Darchname" value for cross-building (arm32v7 builds on an arm64v8 kernel, i386 builds on an amd64 kernel, etc), and conditionally converts "-Duse64bitall" into "-Duse64bitint" (which is what Debian uses when compiling Perl).
See also https://sources.debian.net/src/perl/stretch/debian/config.debian/#L115 and https://sources.debian.net/src/perl/stretch/debian/config.debian/#L130.
> *** You have chosen a maximally 64-bit build,
> *** but your pointers are only 4 bytes wide.
> *** Please rerun Configure without -Duse64bitall.
> *** Since you have quads, you could possibly try with -Duse64bitint.
We seem to be using www.cpan.org for getting the Perl tarballs for
patching with Devel::PatchPerl, yet in our generated Dockerfiles we are
using cpan.metacpan.org instead. Since the former location is listed in
www.perl.org as the canonical Perl source location, let's base from that
as our single source of truth.
This also means we can depend less on finding which PAUSE account has
which Perl release, so let's remove that from the Releases.yaml as well.
`MAINTAINER` Dockerfile directive is now deprecated (see
https://github.com/moby/moby/pull/25466) so update generate.pl to use
`LABEL` instead. This is also a good time to add myself :)
Regenerate the Dockerfiles as well for sync.
Let `vendorprefix=/usr/local` so `vendorlib` and `vendorarch` can point
to paths in `/usr/local/lib/perl5/vendor_perl`. Extend the generator.pl
also so we can add more `Configure` settings if we needed it later.
Fixes#32.