Add alpine variants (templated) - #24
Conversation
2a416b5 to
5eaef5a
Compare
tianon
left a comment
There was a problem hiding this comment.
Figured I'd leave a few notes on this, both to try to help out and as a subtle bump. 😏 ❤️
|
I would also like an Alpine variant, but probably the way to go would be to change everything from the ground up, including Releases.yaml and generate.pl |
Replacing |
Thanks, could you elaborate further? I did a cursory check on Another thing to consider is that |
|
The @docker-library-bot can trigger an |
|
Yeah, that's what I gathered on reading the Thanks for bringing this up anyway; I might get around to this soon as I'll be getting more involved with Perl RC builds and perhaps this might provide some additional way for managing/bring these up. |
5eaef5a to
26d57bb
Compare
tianon
left a comment
There was a problem hiding this comment.
Saw some activity so I figured I'd re-review 😅 ❤️
|
This would still be great! |
|
Is there something this is stalled on? I would love to help if possible |
ace194f to
0cd172f
Compare
0cd172f to
9936de6
Compare
|
Size comparison: Reminder that |
420f335 to
ca0c2eb
Compare
|
I've revisited this now that all tests pass on the stock Perl testsuite - @tianon would appreciate a review! 🙇 @rabbiveesh @mohawk2 feel free to check as well! |
073f8dc to
d9947a3
Compare
1f96779 to
949dfbd
Compare
…alpine - Add comment block explaining dirname */Dockerfile matrix auto-discovery and slim-gating logic that correctly includes alpine variants. - fail-fast: false so one variant failure no longer cancels all other jobs. - cpanm no-lwp test: use sh -c instead of bash -c (Alpine ships busybox sh, not bash).
Perl/Test::More port, driven by prove, of what was originally a bash script. Static checks assert against generated Dockerfile and patch content; runtime checks (RUN_RUNTIME=1) run docker-run assertions against already-built perl:<tag> images.
Perl/Test::More port, driven by prove, of what was originally a bash script. Verifies every alpine Dockerfile's *.patch files are present on disk and tracked by git.
949dfbd to
15c67f8
Compare
Resolves #23. Adds Alpine Linux variants of the official
perlimages, templated throughgenerate.plrather than hand-edited per Perl version.What changed
Dockerfile.alpine.template(and a siblingDockerfile.debian.templateextracted from the old__DATA__block).generate.pldispatches by family.config.ymldebian_releasebecomesos_release: [{family, tag}]. Newbuild_constraintskey expresses "no slim on alpine".alpine3.23andalpine3.24(mirroringpython:3-alpine/ruby:3-alpinecadence: current stable plus previous stable).setlocale()workaround. Per current state of musl 1.2 + Perl 5.28+, the workaround is unnecessary.Dockerfile(same convention as the existing non-alpine dirs):DevelPatchPerl.patch: the sameDevel::PatchPerloutput already used for Debian variants; only written when the diff is non-empty for that Perl version.musl-stack-size.patch(static; bumps threaded stack floor to 256k, works around upstream perl 5.32.0 t/re/path_thr.t fails on Alpine Linux (musl libc) on s390x due to small stack_size perl5#18160 which remains open).skip-test-due-to-busybox-ps.patch(generated per Perl version since the relevant line int/op/magic.tdrifts between minors; guard added so an empty patch fails loudly rather than silently).t/check-patch-consistency.tstatically verifies every alpine Dockerfile's required patches are present on disk and git-tracked, so a fresh clone can never be missing a patch its Dockerfile depends on.python:3-alpine/ruby:3-alpinewhich scanelf-prune the compiler). Requiresopensslandpkgconfin addition toopenssl-dev, confirmed via live build test.ext/POSIX/t/time.tDST transition tests require/usr/share/zoneinfo/).--notestsince their test suites make live TLS connections that are unreliable in isolated build environments; SSL correctness is verified by the CI "Run HTTPS access test" step..github/workflows/build-image.ymlauto-discovery (dirname */Dockerfile). Addedfail-fast: falseso one variant failure no longer cancels all other jobs. No-lwp test usesshinstead ofbash(Alpine only ships busyboxsh).generate-dockerfiles-patches.ymlnow runs thet/regression suite viaprove -v t/*.tafter regenerating, and its trigger paths cover every generation input (generate.pl,library.pl, both Dockerfile templates,musl-stack-size.patch, andt/**), so a change to any of them exercises the generate-and-diff check.<version>-alpine3.24) and rolling (<version>-alpine, aliasing current stable) tags per the Ruby/Python convention.wgetremoved from the permanentapk addblock; all downloads usecurl, saving about 3.4 MiB per image.try_wget=>1by default; after patchingtry_lwp=>0, cpanm would fall through to wget before curl. Busyboxwgetlacks--retry-connrefused(a GNU wget flag cpanm passes unconditionally), causing build failures. Patched withperl -pi -E 's{try_wget=>1}{try_wget=>0}g'so cpanm uses curl directly.sha256sum -c -(busybox sha256sum lacks--strict); Debian usessha256sum --strict --check -. Each Dockerfile carries an inline comment explaining the intentional divergence.Documentation
generate.plPOD rewritten:run_testsdefault corrected toparallel,os_releaseschema documented (replaces legacydebian_release),build_constraintskey explained with example, Alpine Variant Generation section added.library.plPOD added:=head1 FUNCTIONSdocumentsentry()andrelease()with tag aliasing strategy and EOL compat shim.tzdata, and busyboxshas the default shell.Checklist
setlocale()workaround (musl 1.2 + Perl 5.28+ obsoletes it)makeplus full build toolchain so cpanm XS installs workperl 5.42.2,Net::SSLeay 1.96,IO::Socket::SSL 2.099, gcc toolchain retained,.build-depspurgedt/check-patch-consistency.t)generate.plandlibrary.plTesting
The regression suite lives in
t/as Perl/Test::More, run withprove:prove -r t/.t/alpine-checks.truns static checks unconditionally, withruntime checks gated on
RUN_RUNTIME=1.t/check-patch-consistency.tisstatic, always. Both read the generated files, so run
./generate.plfirston a fresh checkout.
Static (always):
config.yml(family: alpineentries times 2 threading variants)slim+alpinecombinations (enforcesbuild_constraints)config.ymlmust have the right count individuallyCOPY *.patch,cat *.patch | patch -p1,make test_harness_notty,FROM alpine:N.NNFROM alpine:tag matches directory name-Dusethreadsin./Configurematches,threadedin directory nametzdatain permanentapk addblockCMDperl version matches directory name (zero-pad stripped)s{http://), no-LWP (try_lwp=>0), and no-wget (try_wget=>0)256*1024hunk, busybox-ps skip message)*.patcha Dockerfile depends on is present on disk and git-tracked (check-patch-consistency.t)Runtime (
RUN_RUNTIME=1):build-base,make,openssl-dev,linux-headers,libc-dev,zlib-dev,bzip2-dev,ca-certificates,curl).build-depspurged, checked per-package so partial retention is caughtwhich gcc,which make,pkg-config --exists openssl)POSIX::setlocaledoes not die; actual locale value printed for CI logsuse Net::SSLeay; use IO::Socket::SSL: verifies--notestinstalls are loadablethreads->create(sub {})->joinsmokelinux-headers:Linux::Inotify2(sys/inotify.h)Closes #23.