From 652e29ad50ea4104a62b2b6b47ee3a176f8ca725 Mon Sep 17 00:00:00 2001 From: Connor Olding Date: Fri, 23 Sep 2022 17:08:10 -0700 Subject: [PATCH] update perl --- build-all | 2 +- cosmo-perl/Dockerfile | 16 +++++++++++----- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/build-all b/build-all index 1ca27b0..0cd74ef 100755 --- a/build-all +++ b/build-all @@ -56,7 +56,7 @@ dbg_retrieve() \ && podman build -t cosmo-yices cosmo-yices \ \ && dbg_retrieve cosmo-kuroko /bin/kuroko.com \ - && yes_retrieve cosmo-perl /bin/perl.com \ + && dbg_retrieve cosmo-perl /bin/perl.com \ && dbg_retrieve cosmo-yices /bin/kissat.com \ && dbg_retrieve cosmo-yices /bin/yices-sat.com \ && dbg_retrieve cosmo-yices /bin/yices-smt.com \ diff --git a/cosmo-perl/Dockerfile b/cosmo-perl/Dockerfile index cd0885d..1b0972e 100644 --- a/cosmo-perl/Dockerfile +++ b/cosmo-perl/Dockerfile @@ -3,8 +3,8 @@ # FORK: https://github.com/G4Vi/perl5/tree/cosmo FROM localhost/notwa-util AS downloader -ARG PERL_COMMIT=75e54093a8376c4b2196510e88201e8d793f5424 -ARG PERL_SHA256=b28ccbb96f9dfb96a4216215dafc2db8ba3b998e5ead6357b2614f5334c3a6f7 +ARG PERL_COMMIT=154c25ba29a115544bdfe0983c0c938993c00959 +ARG PERL_SHA256=9980e388a0b08c0f5830aa9f63cdb3da8d11e460f637bf4622e22c6e8710eff8 RUN --mount=type=cache,id=common,target=/media/common,sharing=locked \ --mount=type=tmpfs,target=/tmp : \ @@ -83,6 +83,7 @@ RUN : \ && COSMO_MODE="" COSMO_REPO="/cosmopolitan" sh Configure -d -e \ -Dprefix="/zip" \ -Dusedevel \ + -Uversiononly \ -Doptimize="-Os" \ -Dmyhostname="cosmo" \ -Dmydomain="invalid" \ @@ -102,10 +103,12 @@ RUN : \ ; RUN : \ && cd "/perl5/cosmo/o/tmp/zip" \ + && rm "bin/perl" "bin/perl5.36.0" \ && find lib -name '*.a' -delete \ && find lib -name '*.h' -delete \ && find -name '*.pod' -delete \ && cp "../perl.com" "../perl.com.bak" \ + && chmod u+w "../perl.com" \ && zip -qr "../perl.com" "lib" \ && mv "../perl.com" "../../perl.com" \ ; @@ -118,14 +121,17 @@ RUN : \ && mv "perltidy-$version.pl" ../perltidy.pl \ && cd .. \ && rm -r Perl-Tidy-$version \ -; -RUN : \ && cd "/perl5/cosmo/o/tmp/zip" \ && find -type f -name '*.pm' -exec \ /cosmopolitan/o/ape/ape.elf ../../perl.com /perl5/perltidy.pl \ --mangle --delete-all-comments --backup-and-modify-in-place --backup-file-extension=/ {} \ + \ +; +RUN : \ + && cd "/perl5/cosmo/o/tmp/zip" \ && cp "../perl.com.bak" "../perl.com" \ + && chmod u+w "../perl.com" \ + && zip -qr "../perl.com" "bin" \ && zip -qr "../perl.com" "lib" \ && mv "../perl.com" "../../perl.com" \ ; @@ -134,6 +140,6 @@ FROM scratch AS runner COPY --chmod=0755 --from=localhost/notwa-util /usr/local/bin/busybox /bin/busybox COPY --chmod=0755 --from=builder /cosmopolitan/bin/ape /bin/ape COPY --chmod=0755 --from=builder /perl5/cosmo/o/perl.com /bin/perl.com -# TODO: include .dbg file too! +COPY --chmod=0755 --from=builder /perl5/perl.elf /bin/perl.com.dbg COPY --from=builder /perl5/minitest_results.txt /minitest_results.txt ENTRYPOINT ["/bin/ape", "/bin/perl.com"]