Compare commits
31 commits
Author | SHA1 | Date | |
---|---|---|---|
699ec32255 | |||
d997986122 | |||
48bbcfdd85 | |||
7676cc7d58 | |||
84cac9866f | |||
5b860be3ed | |||
37c14c6ecd | |||
5ac08545ce | |||
6002ae1419 | |||
4fda9c2767 | |||
22f0ec9fa9 | |||
102738a937 | |||
86f511becf | |||
fed2d76c02 | |||
8da9cbd0fc | |||
690355395c | |||
0c589233b9 | |||
624e05b247 | |||
558dd00561 | |||
3a0538a6cc | |||
faccc07bbf | |||
23637a4e37 | |||
a025a1a64f | |||
883cf1214e | |||
9623c952dc | |||
4b4c37df77 | |||
f5f657d3ed | |||
ec1a1a0d26 | |||
78e05832fa | |||
3bc614c9d0 | |||
8356e07b42 |
17 changed files with 75 additions and 76 deletions
11
README.md
11
README.md
|
@ -13,7 +13,7 @@ polyfilling missing features across platforms,
|
||||||
but pre-existing software may take a lot of
|
but pre-existing software may take a lot of
|
||||||
patching before becoming fully functional.
|
patching before becoming fully functional.
|
||||||
|
|
||||||
## containers
|
## procedures
|
||||||
|
|
||||||
in order of dependence, then alphabetical order.
|
in order of dependence, then alphabetical order.
|
||||||
|
|
||||||
|
@ -26,6 +26,11 @@ in order of dependence, then alphabetical order.
|
||||||
|
|
||||||
### Phase 2
|
### Phase 2
|
||||||
|
|
||||||
|
<!--
|
||||||
|
the base cosmopolitan library and binaries,
|
||||||
|
with some minor patches and a custom distrib.
|
||||||
|
-->
|
||||||
|
|
||||||
* **cosmo-bootstrap:** builds the basic libraries (i.e.
|
* **cosmo-bootstrap:** builds the basic libraries (i.e.
|
||||||
cosmopolitan libc) and binaries to bootstrap itself
|
cosmopolitan libc) and binaries to bootstrap itself
|
||||||
and build other software against.
|
and build other software against.
|
||||||
|
@ -56,7 +61,7 @@ in order of dependence, then alphabetical order.
|
||||||
|
|
||||||
* **cosmo-base:** used to build other containers in phase 5.
|
* **cosmo-base:** used to build other containers in phase 5.
|
||||||
|
|
||||||
* **cosmo-chibicc:** chibicc (TODO: version?)
|
* **cosmo-chibicc:** chibicc (not sure which commit this is forked from)
|
||||||
with many extensions.
|
with many extensions.
|
||||||
|
|
||||||
* **cosmo-lua:** Actually Portable Lua
|
* **cosmo-lua:** Actually Portable Lua
|
||||||
|
@ -69,7 +74,7 @@ in order of dependence, then alphabetical order.
|
||||||
|
|
||||||
* **cosmo-sed:** Actually Portable sed (fork of NetBSD sed)
|
* **cosmo-sed:** Actually Portable sed (fork of NetBSD sed)
|
||||||
|
|
||||||
* **cosmo-sqlite:** sqlite3 (3350500)
|
* **cosmo-sqlite:** sqlite3 (3350500) binaries and libraries.
|
||||||
|
|
||||||
* **fold:** (TODO)
|
* **fold:** (TODO)
|
||||||
|
|
||||||
|
|
1
TODO.md
1
TODO.md
|
@ -14,6 +14,7 @@ remove elements from this list as you see fit.
|
||||||
* for source being built
|
* for source being built
|
||||||
* for exposed containers
|
* for exposed containers
|
||||||
* for `install-cosmo` (kinda a subset of the previous point)
|
* for `install-cosmo` (kinda a subset of the previous point)
|
||||||
|
* cosmo: allow non-default builds (`rel`, `dbg`, etc.)
|
||||||
* kuroko: test more vigorously
|
* kuroko: test more vigorously
|
||||||
* do tests pass on a Windows host?
|
* do tests pass on a Windows host?
|
||||||
* kuroko: use cosmopolitan readline functionality instead of built-in?
|
* kuroko: use cosmopolitan readline functionality instead of built-in?
|
||||||
|
|
8
absurdism
Executable file
8
absurdism
Executable file
|
@ -0,0 +1,8 @@
|
||||||
|
#!/usr/bin/env sh
|
||||||
|
: \
|
||||||
|
&& [ -s build-all ] \
|
||||||
|
&& { [ -d out ] || mkdir out || exit ;} \
|
||||||
|
&& podman run -v="$(readlink -f .)":/stargazing -e="TERM=$TERM" -it --rm \
|
||||||
|
--privileged --user root quay.io/podman/stable /stargazing/build-all \
|
||||||
|
|| { e=$?; echo absurdism died; exit $e ;} \
|
||||||
|
;
|
|
@ -13,7 +13,7 @@ latest() { : \
|
||||||
any=0 flags="-L --no-progress-meter" n="$(printf '\n.')" n="${n%.}" \
|
any=0 flags="-L --no-progress-meter" n="$(printf '\n.')" n="${n%.}" \
|
||||||
df=Dockerfile gh='https://github.com/' sr='https://git.sr.ht/~' \
|
df=Dockerfile gh='https://github.com/' sr='https://git.sr.ht/~' \
|
||||||
&& set -- \
|
&& set -- \
|
||||||
cosmo-bootstrap COSMO_COMMIT ${gh}jart/cosmopolitan \
|
cosmo COSMO_COMMIT ${gh}jart/cosmopolitan \
|
||||||
cosmo-kuroko KUROKO_COMMIT ${gh}kuroko-lang/kuroko \
|
cosmo-kuroko KUROKO_COMMIT ${gh}kuroko-lang/kuroko \
|
||||||
cosmo-muon MUON_COMMIT ${sr}lattis/muon \
|
cosmo-muon MUON_COMMIT ${sr}lattis/muon \
|
||||||
cosmo-perl PERL_COMMIT ${gh}G4Vi/perl5/tree/cosmo \
|
cosmo-perl PERL_COMMIT ${gh}G4Vi/perl5/tree/cosmo \
|
||||||
|
|
39
build-all
39
build-all
|
@ -13,7 +13,7 @@ yes_retrieve() { : \
|
||||||
;do announce retrieving "$f" \
|
;do announce retrieving "$f" \
|
||||||
&& g="out/${f##*/}" && { ! [ -e "$g" ] || mv "$g" "$g~" ;} || return \
|
&& g="out/${f##*/}" && { ! [ -e "$g" ] || mv "$g" "$g~" ;} || return \
|
||||||
;done \
|
;done \
|
||||||
&& podman run -v="$out":/out --rm --entrypoint /bin/busybox "localhost/$image" \
|
&& podman run -v="$out":/out --rm --entrypoint /bin/busybox "$image" \
|
||||||
cp -- "$@" "/out/" \
|
cp -- "$@" "/out/" \
|
||||||
&& for f in "$@" \
|
&& for f in "$@" \
|
||||||
;do if g="out/${f##*/}" && [ -e "$g" ] \
|
;do if g="out/${f##*/}" && [ -e "$g" ] \
|
||||||
|
@ -34,7 +34,7 @@ dbg_retrieve() { : \
|
||||||
build() { : \
|
build() { : \
|
||||||
&& local t="${1?missing argument}" && shift \
|
&& local t="${1?missing argument}" && shift \
|
||||||
&& announce building "$t" \
|
&& announce building "$t" \
|
||||||
&& podman build -t "$t" "./$t" "$@" \
|
&& podman build -t "$t" "$t" "$@" \
|
||||||
;}
|
;}
|
||||||
|
|
||||||
build_simple() { : \
|
build_simple() { : \
|
||||||
|
@ -46,40 +46,45 @@ build_simple() { : \
|
||||||
;done \
|
;done \
|
||||||
;}
|
;}
|
||||||
|
|
||||||
build_base() { : \
|
prep() { : \
|
||||||
&& sed 's/\bcosmo-bootstrap\b/cosmo-all/g' \
|
&& [ "$(whoami)" != podman ] \
|
||||||
<cosmo-dist/Dockerfile >cosmo-dist/all.Dockerfile \
|
|| { : \
|
||||||
&& build cosmo-dist -f cosmo-dist/all.Dockerfile \
|
&& [ ! -s ~/.config/containers/storage.conf ] \
|
||||||
&& build cosmo-base \
|
&& { [ -d ~/.config ] || mkdir ~/.config ;} \
|
||||||
|
&& { [ -d ~/.config/containers ] || mkdir ~/.config/containers ;} \
|
||||||
|
&& { [ -d ~/junk ] || mkdir ~/junk ;} \
|
||||||
|
&& printf '%s\n' >~/.config/containers/storage.conf \
|
||||||
|
'[storage]' 'driver = "overlay"' 'runroot = "$HOME/junk"' \
|
||||||
|
'graphroot = "$HOME/junk"' 'rootless_storage_path = "$HOME/junk"' \
|
||||||
|
'[storage.options]' 'additionalimagestores = [' ']' \
|
||||||
|
'[storage.options.overlay]' 'mountopt = "nodev"' \
|
||||||
|
'[storage.options.thinpool]' \
|
||||||
|
;} \
|
||||||
;}
|
;}
|
||||||
|
|
||||||
: \
|
: \
|
||||||
&& me="$(readlink -f "$0")" && cd "${me%/*}" && { [ -d out ] || mkdir out ;} \
|
&& me="$(readlink -f "$0")" && cd "${me%/*}" && { [ -d out ] || mkdir out ;} \
|
||||||
&& : \
|
&& prep \
|
||||||
\
|
\
|
||||||
`# phase 1` \
|
`# phase 1` \
|
||||||
&& build notwa-util \
|
&& build notwa-util \
|
||||||
\
|
|
||||||
`# phase 2` \
|
`# phase 2` \
|
||||||
&& build cosmo-bootstrap --build-arg=COSMO_FLAVOR="${1:-def}" \
|
&& build cosmo-bootstrap \
|
||||||
\
|
|
||||||
`# phase 3` \
|
`# phase 3` \
|
||||||
&& build cosmo-all --build-arg=COSMO_FLAVOR="${2:-def}" \
|
&& build cosmo-all \
|
||||||
&& build cosmo-dist \
|
&& build cosmo-dist \
|
||||||
&& build rescue \
|
&& build rescue \
|
||||||
\
|
|
||||||
`# phase 4` \
|
`# phase 4` \
|
||||||
&& build_base \
|
&& build cosmo-base \
|
||||||
&& build_simple \
|
&& build_simple \
|
||||||
\
|
|
||||||
`# phase 5` \
|
`# phase 5` \
|
||||||
&& build cosmo-kuroko \
|
&& build cosmo-kuroko \
|
||||||
&& build cosmo-muon \
|
&& build cosmo-muon \
|
||||||
&& build cosmo-perl \
|
&& build cosmo-perl \
|
||||||
&& build cosmo-yices \
|
&& build cosmo-yices \
|
||||||
\
|
|
||||||
`# other stuff` \
|
`# other stuff` \
|
||||||
&& { [ ! -s cosmo-mini/Dockerfile ] || build cosmo-mini ;} \
|
&& { [ ! -e cosmo-mini ] || build cosmo-mini ;} \
|
||||||
|
&& { [ ! -e cosmo-python311 ] || build cosmo-python311 ;} \
|
||||||
\
|
\
|
||||||
&& yes_retrieve cosmo-base /cosmopolitan/bin/ape \
|
&& yes_retrieve cosmo-base /cosmopolitan/bin/ape \
|
||||||
&& dbg_retrieve cosmo-kuroko /bin/kuroko.com \
|
&& dbg_retrieve cosmo-kuroko /bin/kuroko.com \
|
||||||
|
|
|
@ -15,13 +15,10 @@ RUN : \
|
||||||
commit "$commit" \
|
commit "$commit" \
|
||||||
flavor "$COSMO_FLAVOR" \
|
flavor "$COSMO_FLAVOR" \
|
||||||
mode "$mode" \
|
mode "$mode" \
|
||||||
COSMO "$PWD" \
|
|
||||||
COSMO_DIST "$PWD/dist/$COSMO_FLAVOR" \
|
|
||||||
\
|
|
||||||
&& shed expand "s_o='o/[^']*'_o='o/$mode' _g" \
|
|
||||||
;
|
;
|
||||||
|
|
||||||
RUN --mount=type=tmpfs,target=/tmp : \
|
RUN --mount=type=cache,id=cosmo-build-all,target=/cosmopolitan/o,sharing=locked \
|
||||||
|
--mount=type=tmpfs,target=/tmp : \
|
||||||
&& . ./env \
|
&& . ./env \
|
||||||
&& if [ -e o.old ] \
|
&& if [ -e o.old ] \
|
||||||
;then : \
|
;then : \
|
||||||
|
@ -29,19 +26,15 @@ RUN --mount=type=tmpfs,target=/tmp : \
|
||||||
&& rm -r o.old \
|
&& rm -r o.old \
|
||||||
;fi \
|
;fi \
|
||||||
\
|
\
|
||||||
|
# skip some checks that are currently failing: \
|
||||||
&& skip() { mkdir -p "${1%/*}" && touch -d @2222222222 "$1" ;} \
|
&& skip() { mkdir -p "${1%/*}" && touch -d @2222222222 "$1" ;} \
|
||||||
# skip some checks that fail under podman: \
|
|
||||||
&& skip "o/$mode/test/libc/calls/getgroups_test.com.runs" \
|
&& skip "o/$mode/test/libc/calls/getgroups_test.com.runs" \
|
||||||
&& skip "o/$mode/test/libc/calls/getpriority_test.com.runs" \
|
&& skip "o/$mode/test/libc/calls/getpriority_test.com.runs" \
|
||||||
# these can fail when nesting podman: \
|
# these can fail in nested podman: \
|
||||||
&& shed test/libc/calls/ftruncate_test.c '/\.st_blocks/d' \
|
|
||||||
&& skip "o/$mode/test/libc/stdio/tmpfile_test.com.runs" \
|
&& skip "o/$mode/test/libc/stdio/tmpfile_test.com.runs" \
|
||||||
&& skip "o/$mode/test/tool/net/lunix_test.lua.runs" \
|
|
||||||
&& skip "o/$mode/third_party/python/Lib/test/test_selectors.py.runs" \
|
|
||||||
# FIXME: SIGSEGV: \
|
# FIXME: SIGSEGV: \
|
||||||
&& skip "o/$mode/third_party/python/Lib/test/test_ioctl.py.runs" \
|
&& skip "o/$mode/third_party/python/Lib/test/test_ioctl.py.runs" \
|
||||||
\
|
\
|
||||||
&& { ./makeit MODE="$mode" depend || find o -name '*.o' -delete ;} \
|
|
||||||
&& ./makeit MODE="$mode" all \
|
&& ./makeit MODE="$mode" all \
|
||||||
\
|
\
|
||||||
# install the binaries somewhere so we can retrieve them without mounting cache: \
|
# install the binaries somewhere so we can retrieve them without mounting cache: \
|
||||||
|
@ -49,6 +42,4 @@ RUN --mount=type=tmpfs,target=/tmp : \
|
||||||
'!' -name '*_test.*' '!' -name 'test_*' -exec \
|
'!' -name '*_test.*' '!' -name 'test_*' -exec \
|
||||||
install -m0755 -t /usr/local/bin {} \
|
install -m0755 -t /usr/local/bin {} \
|
||||||
+ \
|
+ \
|
||||||
# save some space: \
|
|
||||||
&& find o -type f '(' -name '*.com.dbg' -o -name '*_test.*' -o -name 'test_*' ')' -delete \
|
|
||||||
;
|
;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
FROM cosmo-dist
|
FROM cosmo-dist AS runner
|
||||||
COPY --chmod=0755 --from=localhost/cosmo-all /usr/local/bin/assimilate.com /cosmopolitan/bin/
|
COPY --chmod=0755 --from=localhost/cosmo-assimilate /bin/assimilate.com /cosmopolitan/bin/
|
||||||
COPY --chmod=0755 --from=localhost/cosmo-all /usr/local/bin/awk.com /cosmopolitan/bin/
|
COPY --chmod=0755 --from=localhost/cosmo-awk /bin/awk.com /cosmopolitan/bin/
|
||||||
COPY --chmod=0755 --from=localhost/cosmo-all /usr/local/bin/sed.com /cosmopolitan/bin/
|
COPY --chmod=0755 --from=localhost/cosmo-sed /bin/sed.com /cosmopolitan/bin/
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
# MAIN: https://justine.lol/cosmopolitan/
|
# MAIN: https://justine.lol/cosmopolitan/
|
||||||
# REPO: https://github.com/jart/cosmopolitan
|
# REPO: https://github.com/jart/cosmopolitan
|
||||||
ARG COSMO_FLAVOR=def
|
ARG COSMO_FLAVOR=def
|
||||||
ARG COSMO_COMMIT=ef9776755ee3646029624fe30de5d58a3c03f6f6
|
ARG COSMO_COMMIT=f52f65b2e351085250b743a5319dab418f2d48be
|
||||||
ARG COSMO_SHA256=f5efa2daf12f0536a4d57b4da5f7402398bb93ae2d5e602c2401b3a6227af1c4
|
ARG COSMO_SHA256=8a13f4be3d689b8895af6e1178d455db2f82a69e33ce5848e2f2f14f96760d4c
|
||||||
ARG COSMO_REBUILD=0
|
ARG COSMO_REBUILD=0
|
||||||
|
|
||||||
FROM localhost/notwa-util AS downloader
|
FROM localhost/notwa-util AS downloader
|
||||||
|
@ -12,7 +12,7 @@ RUN --mount=type=cache,id=common,target=/media/common,sharing=locked \
|
||||||
&& acquire from=github repo=jart/cosmopolitan dest=/cosmopolitan env=COSMO \
|
&& acquire from=github repo=jart/cosmopolitan dest=/cosmopolitan env=COSMO \
|
||||||
;
|
;
|
||||||
|
|
||||||
FROM docker.io/library/alpine:3.16 AS builder
|
FROM alpine:3.16 AS builder
|
||||||
ARG COSMO_FLAVOR COSMO_COMMIT
|
ARG COSMO_FLAVOR COSMO_COMMIT
|
||||||
COPY --from=downloader /cosmopolitan /cosmopolitan
|
COPY --from=downloader /cosmopolitan /cosmopolitan
|
||||||
WORKDIR /cosmopolitan
|
WORKDIR /cosmopolitan
|
||||||
|
@ -20,6 +20,7 @@ WORKDIR /cosmopolitan
|
||||||
# tell makefiles to be less noisy, also use /tmp:
|
# tell makefiles to be less noisy, also use /tmp:
|
||||||
ENV V=0 COLUMNS=80 TMPDIR=/tmp
|
ENV V=0 COLUMNS=80 TMPDIR=/tmp
|
||||||
|
|
||||||
|
COPY --chmod=0755 make.com build/bootstrap/make.com
|
||||||
COPY --chmod=0755 --from=localhost/notwa-util /nu/shed /usr/bin/
|
COPY --chmod=0755 --from=localhost/notwa-util /nu/shed /usr/bin/
|
||||||
RUN : \
|
RUN : \
|
||||||
# allow optimized builds to be more portable, so the container is too. \
|
# allow optimized builds to be more portable, so the container is too. \
|
||||||
|
|
BIN
cosmo-bootstrap/make.com
Executable file
BIN
cosmo-bootstrap/make.com
Executable file
Binary file not shown.
|
@ -49,7 +49,7 @@ RUN --mount=type=tmpfs,target=/tmp : \
|
||||||
&& cp /cosmopolitan/env /distrib/env \
|
&& cp /cosmopolitan/env /distrib/env \
|
||||||
;
|
;
|
||||||
|
|
||||||
FROM docker.io/library/alpine:3.16 AS runner
|
FROM alpine:3.16 AS runner
|
||||||
COPY --from=distrib /distrib /cosmopolitan
|
COPY --from=distrib /distrib /cosmopolitan
|
||||||
ENV PATH="/cosmopolitan/bin:/cosmopolitan/gcc/bin/:/cosmopolitan/gcc/x86_64-linux-musl/bin/:$PATH"
|
ENV PATH="/cosmopolitan/bin:/cosmopolitan/gcc/bin/:/cosmopolitan/gcc/x86_64-linux-musl/bin/:$PATH"
|
||||||
# FIXME:
|
# FIXME:
|
||||||
|
|
|
@ -3,8 +3,8 @@
|
||||||
# TODO: add /zip/ support by default and include dist modules.
|
# TODO: add /zip/ support by default and include dist modules.
|
||||||
|
|
||||||
FROM localhost/notwa-util AS downloader
|
FROM localhost/notwa-util AS downloader
|
||||||
ARG KUROKO_COMMIT=f4b40b1b7015c0d421edb508144b4a22b2321d46
|
ARG KUROKO_COMMIT=3f35d89fff2343ddb9f0de5c87bbdefa86ee34f5
|
||||||
ARG KUROKO_SHA256=d72e1b3bb7400d7c2e47dd97120b64890998c90ccb13cb3f7cd16429a584f41c
|
ARG KUROKO_SHA256=b1d38c48afdc06633d848dc27cb5d37bebbb7c99c59d3649c155350f06cd93a7
|
||||||
|
|
||||||
RUN --mount=type=cache,id=common,target=/media/common,sharing=locked \
|
RUN --mount=type=cache,id=common,target=/media/common,sharing=locked \
|
||||||
--mount=type=tmpfs,target=/tmp : \
|
--mount=type=tmpfs,target=/tmp : \
|
||||||
|
@ -123,7 +123,9 @@ RUN : \
|
||||||
;
|
;
|
||||||
RUN make.com test
|
RUN make.com test
|
||||||
|
|
||||||
FROM localhost/rescue AS runner
|
FROM scratch AS runner
|
||||||
|
COPY --chmod=0755 --from=localhost/notwa-util /nu/busybox /bin/busybox
|
||||||
|
COPY --chmod=0755 --from=builder /cosmopolitan/bin/ape /bin/ape
|
||||||
COPY --chmod=0755 --from=builder /kuroko/kuroko.com /kuroko/kuroko.com.dbg /bin/
|
COPY --chmod=0755 --from=builder /kuroko/kuroko.com /kuroko/kuroko.com.dbg /bin/
|
||||||
COPY --from=builder /kuroko.patch /var/local/kuroko.patch
|
COPY --from=builder /kuroko.patch /var/local/kuroko.patch
|
||||||
ENTRYPOINT ["/bin/ape", "/bin/kuroko.com"]
|
ENTRYPOINT ["/bin/ape", "/bin/kuroko.com"]
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
# MAIN: https://muon.build/
|
# MAIN: https://muon.build/
|
||||||
# REPO: https://git.sr.ht/~lattis/muon
|
# REPO: https://git.sr.ht/~lattis/muon
|
||||||
FROM localhost/notwa-util AS downloader
|
FROM localhost/notwa-util AS downloader
|
||||||
ARG MUON_COMMIT=cdb84257b50ebdeddd1ea696fe433e4a3316c8a9
|
ARG MUON_COMMIT=ab1e044c93c9c87e496ff7c4028ddf4218b91445
|
||||||
ARG MUON_SHA256=c8104d857ccaea09ddb6e9a83c73b4a061550c1257f7673c904a137d8a716f04
|
ARG MUON_SHA256=006425edf914444b87108ee062c9f56ee57804a2726f757c44c329f213465182
|
||||||
RUN --mount=type=cache,id=common,target=/media/common,sharing=locked \
|
RUN --mount=type=cache,id=common,target=/media/common,sharing=locked \
|
||||||
--mount=type=tmpfs,target=/tmp : \
|
--mount=type=tmpfs,target=/tmp : \
|
||||||
&& acquire from=sourcehut repo=lattis/muon dest=/muon env=MUON \
|
&& acquire from=sourcehut repo=lattis/muon dest=/muon env=MUON \
|
||||||
|
@ -45,6 +45,8 @@ RUN : \
|
||||||
&& objcopy -S -O binary muon.com.dbg muon.com \
|
&& objcopy -S -O binary muon.com.dbg muon.com \
|
||||||
;
|
;
|
||||||
|
|
||||||
FROM localhost/rescue AS runner
|
FROM scratch AS runner
|
||||||
|
COPY --chmod=0755 --from=localhost/notwa-util /nu/busybox /bin/busybox
|
||||||
|
COPY --chmod=0755 --from=builder /cosmopolitan/bin/ape /bin/ape
|
||||||
COPY --chmod=0755 --from=builder /muon/build/muon.com /muon/build/muon.com.dbg /bin/
|
COPY --chmod=0755 --from=builder /muon/build/muon.com /muon/build/muon.com.dbg /bin/
|
||||||
ENTRYPOINT ["/bin/ape", "/bin/muon.com"]
|
ENTRYPOINT ["/bin/ape", "/bin/muon.com"]
|
||||||
|
|
|
@ -3,8 +3,8 @@ FROM localhost/notwa-util AS downloader
|
||||||
# MAIN: https://www.perl.org/
|
# MAIN: https://www.perl.org/
|
||||||
# REPO: https://github.com/Perl/perl5
|
# REPO: https://github.com/Perl/perl5
|
||||||
# FORK: https://github.com/G4Vi/perl5/tree/cosmo
|
# FORK: https://github.com/G4Vi/perl5/tree/cosmo
|
||||||
ARG PERL_COMMIT=2fb034ffb02db2b3ac09706c954704930c620c0b
|
ARG PERL_COMMIT=66baebd8320a90ddf2c90de14b83f7eee4f6b143
|
||||||
ARG PERL_SHA256=03bf2d1eefb8610e1ad5594ddf7cc5eb5aa11c25f499f3233ecaa3088d55579a
|
ARG PERL_SHA256=0e6731efb5f25589116340b4e861abd43fb47520669fe903569b1489339dcddb
|
||||||
# MAIN: https://computoid.com/APPerl/
|
# MAIN: https://computoid.com/APPerl/
|
||||||
# REPO: https://github.com/G4Vi/Perl-Dist-APPerl
|
# REPO: https://github.com/G4Vi/Perl-Dist-APPerl
|
||||||
|
|
||||||
|
@ -91,13 +91,6 @@ RUN make -j2
|
||||||
|
|
||||||
RUN make -j2 minitest devtty=/dev/zero | tee minitest_results.txt
|
RUN make -j2 minitest devtty=/dev/zero | tee minitest_results.txt
|
||||||
|
|
||||||
# temporary workaround for segfault. oddly enough,
|
|
||||||
# it's not a segfault in the zip executable! alas, \
|
|
||||||
RUN : \
|
|
||||||
&& rm /usr/bin/zip \
|
|
||||||
&& apk add --no-cache zip \
|
|
||||||
;
|
|
||||||
|
|
||||||
RUN : \
|
RUN : \
|
||||||
&& mkdir /perl/cosmo \
|
&& mkdir /perl/cosmo \
|
||||||
&& mkdir /perl/cosmo/o \
|
&& mkdir /perl/cosmo/o \
|
||||||
|
@ -136,7 +129,9 @@ RUN : \
|
||||||
&& mv ../perl.com ../../perl.com \
|
&& mv ../perl.com ../../perl.com \
|
||||||
;
|
;
|
||||||
|
|
||||||
FROM localhost/rescue AS runner
|
FROM scratch AS runner
|
||||||
|
COPY --chmod=0755 --from=localhost/notwa-util /nu/busybox /bin/busybox
|
||||||
|
COPY --chmod=0755 --from=builder /cosmopolitan/bin/ape /bin/ape
|
||||||
COPY --chmod=0755 --from=builder /perl/cosmo/o/perl.com /bin/perl.com
|
COPY --chmod=0755 --from=builder /perl/cosmo/o/perl.com /bin/perl.com
|
||||||
COPY --chmod=0755 --from=builder /perl/perl.elf /bin/perl.com.dbg
|
COPY --chmod=0755 --from=builder /perl/perl.elf /bin/perl.com.dbg
|
||||||
COPY --from=builder /perl/minitest_results.txt /minitest_results.txt
|
COPY --from=builder /perl/minitest_results.txt /minitest_results.txt
|
||||||
|
|
|
@ -60,13 +60,6 @@ RUN : \
|
||||||
COPY --from=downloader /gmp /gmp
|
COPY --from=downloader /gmp /gmp
|
||||||
WORKDIR /gmp
|
WORKDIR /gmp
|
||||||
RUN : \
|
RUN : \
|
||||||
# don't build this crap; our printf is fine. \
|
|
||||||
# (i suppose the missing symbols could cause linking errors further \
|
|
||||||
# down the line, but this does not seem to be an issue for yices.) \
|
|
||||||
&& rm -r printf \
|
|
||||||
&& shed configure 's_ printf/Makefile _ _g' '/printf\/Makefile/d' \
|
|
||||||
&& shed Makefile.in 's_ printf _ _g' 's/$(PRINTF_OBJECTS) //g' \
|
|
||||||
\
|
|
||||||
&& CC=cosmocc CFLAGS="-O2 -g" \
|
&& CC=cosmocc CFLAGS="-O2 -g" \
|
||||||
# specify some generic old CPU for best compatibility/reproduciblity. \
|
# specify some generic old CPU for best compatibility/reproduciblity. \
|
||||||
# core2 introduced SSSE3, which cosmopolitan depends on, so use that: \
|
# core2 introduced SSSE3, which cosmopolitan depends on, so use that: \
|
||||||
|
@ -92,10 +85,6 @@ RUN : \
|
||||||
&& shed src/utils/timeout.c '/#include <unistd.h>/i\\#include <time.h>' \
|
&& shed src/utils/timeout.c '/#include <unistd.h>/i\\#include <time.h>' \
|
||||||
# the static-lib target attempts to build a dynamic library. don't do that. \
|
# the static-lib target attempts to build a dynamic library. don't do that. \
|
||||||
&& shed src/Makefile 's/ $(static_libyices_dynamic)//g' \
|
&& shed src/Makefile 's/ $(static_libyices_dynamic)//g' \
|
||||||
# don't strip binaries; we'll do it ourselves later. \
|
|
||||||
&& shed src/Makefile '/^\t$(STRIP)/d' \
|
|
||||||
# silence this irrelevant error. \
|
|
||||||
&& shed src/Makefile '/\*\.dll/d' \
|
|
||||||
\
|
\
|
||||||
&& autoconf \
|
&& autoconf \
|
||||||
&& CC=cosmocc \
|
&& CC=cosmocc \
|
||||||
|
@ -121,7 +110,9 @@ RUN : \
|
||||||
&& objcopy -S -O binary "kissat.com.dbg" "kissat.com" \
|
&& objcopy -S -O binary "kissat.com.dbg" "kissat.com" \
|
||||||
;
|
;
|
||||||
|
|
||||||
FROM localhost/rescue AS runner
|
FROM scratch AS runner
|
||||||
|
COPY --chmod=0755 --from=localhost/notwa-util /nu/busybox /bin/busybox
|
||||||
|
COPY --chmod=0755 --from=builder /cosmopolitan/bin/ape /bin/ape
|
||||||
COPY --from=builder /yices/config.cache /yices/config.log /yices/config.status /var/local/
|
COPY --from=builder /yices/config.cache /yices/config.log /yices/config.status /var/local/
|
||||||
COPY --from=builder /yices/dist/bin /bin
|
COPY --from=builder /yices/dist/bin /bin
|
||||||
COPY --chmod=0755 --from=builder /kissat/build/kissat.com /kissat/build/kissat.com.dbg /bin/
|
COPY --chmod=0755 --from=builder /kissat/build/kissat.com /kissat/build/kissat.com.dbg /bin/
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
&& { [ -w . ] || "$super" chown root:wheel . ;} \
|
&& { [ -w . ] || "$super" chown root:wheel . ;} \
|
||||||
&& { [ -w . ] || "$super" chmod 0775 . ;} \
|
&& { [ -w . ] || "$super" chmod 0775 . ;} \
|
||||||
&& now="$(date -u +%s)" \
|
&& now="$(date -u +%s)" \
|
||||||
&& podman run -v="$out":/out --rm localhost/cosmo-dist \
|
&& podman run -v="$out":/out --rm localhost/cosmo \
|
||||||
tar zcf "/out/cosmopolitan-$now.tar.gz" /cosmopolitan \
|
tar zcf "/out/cosmopolitan-$now.tar.gz" /cosmopolitan \
|
||||||
&& if [ -L cosmopolitan ] \
|
&& if [ -L cosmopolitan ] \
|
||||||
;then : \
|
;then : \
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
# MAIN: https://eaguru.guru/git/notwa/stargazing
|
# MAIN: https://eaguru.guru/git/notwa/stargazing
|
||||||
# REPO: https://eaguru.guru/git/notwa/stargazing
|
# REPO: https://eaguru.guru/git/notwa/stargazing
|
||||||
FROM docker.io/library/alpine:3.16 as partial
|
FROM alpine:3.16 as partial
|
||||||
# need this for acquire (.tar.xz files):
|
# need this for acquire (.tar.xz files):
|
||||||
RUN apk add --no-cache xz
|
RUN apk add --no-cache xz
|
||||||
COPY --chmod=0755 acquire cosmocc dedupe ofc quickconf shed \
|
COPY --chmod=0755 acquire cosmocc dedupe ofc quickconf shed \
|
||||||
|
@ -23,7 +23,7 @@ RUN --mount=type=cache,id=common,target=/media/common,sharing=locked \
|
||||||
&& acquire \
|
&& acquire \
|
||||||
;
|
;
|
||||||
|
|
||||||
FROM docker.io/library/alpine:3.16 as builder
|
FROM alpine:3.16 as builder
|
||||||
RUN apk add --no-cache gcc linux-headers make musl-dev
|
RUN apk add --no-cache gcc linux-headers make musl-dev
|
||||||
# configure and build a rescue shell and some utilities,
|
# configure and build a rescue shell and some utilities,
|
||||||
# i.e. one better suited for images built "FROM scratch".
|
# i.e. one better suited for images built "FROM scratch".
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
#!/usr/bin/env sh
|
#!/usr/bin/env sh
|
||||||
cosmo="${COSMO:-"/cosmopolitan"}"
|
cosmo="${COSMO:-"/cosmopolitan"}"
|
||||||
unset flavor
|
dist="${COSMO_DIST:-"$cosmo/dist/def"}"
|
||||||
[ ! -s "$cosmo/env" ] || . "$cosmo/env"
|
|
||||||
dist="${COSMO_DIST:-"$cosmo/dist/${flavor:-def}"}"
|
|
||||||
|
|
||||||
_CFLAGS="-fno-omit-frame-pointer -fdata-sections -ffunction-sections -fno-pie -pg -mnop-mcount -mno-tls-direct-seg-refs"
|
_CFLAGS="-fno-omit-frame-pointer -fdata-sections -ffunction-sections -fno-pie -pg -mnop-mcount -mno-tls-direct-seg-refs"
|
||||||
_CPPFLAGS="-DNDEBUG -nostdinc -iquote $cosmo -isystem $cosmo/libc/isystem -include $cosmo/libc/integral/normalize.inc"
|
_CPPFLAGS="-DNDEBUG -nostdinc -iquote $cosmo -isystem $cosmo/libc/isystem -include $cosmo/libc/integral/normalize.inc"
|
||||||
|
|
Loading…
Add table
Reference in a new issue