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! |
…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).
073f8dc to
d9947a3
Compare
Resolves #23. This iteration completely re-bases this PR's old work-in-progress on top of current
masterand shifts approach: alpine variants are now templated throughgenerate.plinstead of 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_release→os_release: [{family, tag}]. Newbuild_constraintskey expresses "no slim on alpine".alpine3.22+alpine3.23(mirroringpython:3-alpine/ruby:3-alpinecadence).setlocale()workaround. Per current state of musl 1.2 + Perl 5.28+, the workaround is unnecessary.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).python:3-alpine/ruby:3-alpinewhich scanelf-prune the compiler). Requiresopenssl+pkgconfin 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). The original PR's separatebuild-alpine.ymlis gone. Addedfail-fast: falseso one variant failure no longer cancels all other jobs. No-lwp test usesshinstead ofbash(Alpine only ships busyboxsh).5.42.2-alpine3.23) and rolling (5.42.2-alpine) tags per the Ruby/Python convention.wgetremoved from the permanentapk addblock — all downloads usecurl, saving ~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.tzdataand busyboxshcaveats added under### Caveats.Checklist
setlocale()workaround (musl 1.2 + Perl 5.28+ obsoletes it)makeplus full build toolchain so cpanm XS installs workperl 5.042002,Net::SSLeay 1.96,IO::Socket::SSL 2.098, gcc toolchain retained,.build-depspurgedgenerate.plandlibrary.plTesting
./test/alpine-checks.sh— static checks run unconditionally; runtime checks gated onRUN_RUNTIME=1:Static (always):
config.yml(family: alpineentries × 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 ↔ directory name cross-check-Dusethreadsin./Configure↔,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)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.