diff --git a/copyparty/web/deps/README.md b/copyparty/web/deps/README.md new file mode 100644 index 00000000..41a4d853 --- /dev/null +++ b/copyparty/web/deps/README.md @@ -0,0 +1,18 @@ +this folder *mostly* contains third-party dependencies; run `make -C scripts/deps-docker` to build the following files and have them appear here: + +* `easymde.css.gz` and `easymde.js.gz` is the fancy markdown editor, [EasyMDE](https://github.com/Ionaru/easy-markdown-editor) +* `marked.js.gz` is the markdown rendering library [Marked](https://github.com/markedjs/marked) +* `mini-fa.css.gz` and `mini-fa.woff` is a small subset of [fontawesome](https://github.com/FortAwesome/Font-Awesome) +* `prism.css.gz` and `prism.js.gz` is the syntax highlighter [PrismJS](https://prismjs.com/) +* `scp.woff2` is a subset of the monospace font [Source Code Pro](https://github.com/adobe-fonts/source-code-pro) +* `sha512.hw.js.gz` is the Wasm sha512 library [hash-wasm](https://github.com/Daninet/hash-wasm) + +additionally, the following files are vendored into the copyparty git repository, but do NOT originate from the copyparty project (as mentioned in `--license`): + +* `sha512.ac.js.gz` is a compiled and slightly golfed/modified [asmcrypto.js](https://github.com/asmcrypto/asmcrypto.js), © 2013 Artem S Vybornov (MIT-Licensed) + * vendored because it no longer builds with modern versions of NodeJS/npm + * is only loaded by *really old* webbrowsers (ie11, firefox 51, chrome 56) + +finally, there is also the following files which *does* originate from the copyparty project, yet appear here for technical reasons: + +* `busy.mp3.gz` is a short mp3-file to make iphones stop glitching out diff --git a/copyparty/web/deps/sha512.ac.js.gz b/copyparty/web/deps/sha512.ac.js.gz new file mode 100644 index 00000000..ce98a7fe Binary files /dev/null and b/copyparty/web/deps/sha512.ac.js.gz differ diff --git a/docs/lics.txt b/docs/lics.txt index 11b90a69..cf1edd2f 100644 --- a/docs/lics.txt +++ b/docs/lics.txt @@ -46,7 +46,7 @@ https://github.com/Daninet/hash-wasm/ C: 2020 Dani Biró L: MIT -https://github.com/openpgpjs/asmcrypto.js/ +https://github.com/asmcrypto/asmcrypto.js/ C: 2013 Artem S Vybornov L: MIT diff --git a/scripts/deps-docker/Dockerfile b/scripts/deps-docker/Dockerfile index 93931ea4..f204b938 100644 --- a/scripts/deps-docker/Dockerfile +++ b/scripts/deps-docker/Dockerfile @@ -1,7 +1,6 @@ -FROM alpine:3.18 +FROM alpine:3.23 WORKDIR /z -ENV ver_asmcrypto=c72492f4a66e17a0e5dd8ad7874de354f3ccdaa5 \ - ver_hashwasm=4.12.0 \ +ENV ver_hashwasm=4.12.0 \ ver_marked=4.3.0 \ ver_dompf=3.3.1 \ ver_mde=2.18.0 \ @@ -16,7 +15,6 @@ ENV ver_asmcrypto=c72492f4a66e17a0e5dd8ad7874de354f3ccdaa5 \ # https://github.com/codemirror/codemirror5/releases # https://github.com/cure53/DOMPurify/releases # https://github.com/Daninet/hash-wasm/releases -# https://github.com/openpgpjs/asmcrypto.js/commits/main/ # https://github.com/google/zopfli/tags @@ -28,7 +26,6 @@ RUN mkdir -p /z/dist/no-pk \ bash brotli cmake make g++ git gzip lame npm patch pigz \ python3 python3-dev py3-brotli sox tar unzip wget \ && rm -f /usr/lib/python3*/EXTERNALLY-MANAGED \ - && wget https://github.com/openpgpjs/asmcrypto.js/archive/$ver_asmcrypto.tar.gz -O asmcrypto.tgz \ && wget https://github.com/markedjs/marked/archive/v$ver_marked.tar.gz -O marked.tgz \ && wget https://github.com/Ionaru/easy-markdown-editor/archive/$ver_mde.tar.gz -O mde.tgz \ && wget https://github.com/codemirror/codemirror5/archive/$ver_codemirror.tar.gz -O codemirror.tgz \ @@ -41,9 +38,6 @@ RUN mkdir -p /z/dist/no-pk \ && (mkdir hash-wasm \ && cd hash-wasm \ && unzip ../hash-wasm.zip) \ - && (tar --no-same-owner -xf asmcrypto.tgz \ - && cd asmcrypto.js-$ver_asmcrypto \ - && npm install ) \ && (tar --no-same-owner -xf marked.tgz \ && cd marked-$ver_marked \ && npm install \ @@ -71,6 +65,7 @@ RUN /z/busy-mp3.sh \ RUN tar --no-same-owner -xf zopfli.tgz \ && cd zopfli* \ && cmake \ + -DCMAKE_POLICY_VERSION_MINIMUM=3.5 \ -DCMAKE_INSTALL_PREFIX=/usr \ -DZOPFLI_BUILD_SHARED=ON \ -B build \ @@ -81,13 +76,6 @@ RUN tar --no-same-owner -xf zopfli.tgz \ && python3 -m pip install fonttools zopfli -# build asmcrypto -RUN cd asmcrypto.js-$ver_asmcrypto \ - && echo "export { Sha512 } from './hash/sha512/sha512';" > src/entry-export_all.ts \ - && node -r esm build.js \ - && awk '/HMAC state/{o=1} /var HEAP/{o=0} /function hmac_reset/{o=1} /return \{/{o=0} /var __extends =/{o=1} /var Hash =/{o=0} /hmac_|pbkdf2_/{next} o{next} {gsub(/IllegalStateError/,"Exception")} {sub(/^ +/,"");sub(/^\/\/ .*/,"");sub(/;$/," ;")} 1' < asmcrypto.all.es5.js > /z/dist/sha512.ac.js - - # build hash-wasm RUN cd hash-wasm/dist \ && mv sha512.umd.min.js /z/dist/sha512.hw.js diff --git a/scripts/make-pypi-release.sh b/scripts/make-pypi-release.sh index aecfea94..7ed3b8a0 100755 --- a/scripts/make-pypi-release.sh +++ b/scripts/make-pypi-release.sh @@ -151,6 +151,7 @@ done rm -rf contrib [ $fast ] && sed -ri s/573/10/ copyparty/web/Makefile (cd copyparty/web && make -j$(nproc) && rm Makefile) +rm -f copyparty/web/deps/README.md # build python3 -m build diff --git a/scripts/make-sfx.sh b/scripts/make-sfx.sh index 770080d3..afd12c3b 100755 --- a/scripts/make-sfx.sh +++ b/scripts/make-sfx.sh @@ -435,7 +435,7 @@ find -name py.typed -delete find -type f \( -name .DS_Store -or -name ._.DS_Store \) -delete find -type f -name ._\* | while IFS= read -r f; do cmp <(printf '\x00\x05\x16') <(head -c 3 -- "$f") && rm -fv -- "$f"; done -rm -f copyparty/web/deps/*.full.* copyparty/web/dbg-* copyparty/web/Makefile +rm -f copyparty/web/deps/*.full.* copyparty/web/deps/README.md copyparty/web/dbg-* copyparty/web/Makefile find copyparty | LC_ALL=C sort | sed -r 's/\.gz$//;s/$/,/' > have cat have | while IFS= read -r x; do diff --git a/scripts/make-tgz-release.sh b/scripts/make-tgz-release.sh index c68766f9..f7cf25ca 100755 --- a/scripts/make-tgz-release.sh +++ b/scripts/make-tgz-release.sh @@ -91,7 +91,8 @@ grep -qE "^VERSION *= \(${commaver}\)$" copyparty/__version__.py || } rm -rf .vscode -rm \ +rm -f \ + copyparty/web/deps/README.md \ .gitattributes \ .gitignore