@ecmaos-apps/rsync-src 0.0.0-stage → 3.5.1-ecmaos.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (31) hide show
  1. package/README.md +8 -2
  2. package/build/build.sh +30 -0
  3. package/package.json +35 -4
  4. package/share/licenses/rsync/COPYING +683 -0
  5. package/share/licenses/rsync/SOURCE +24 -0
  6. package/sources/rsync-3.5.1.tar.gz +0 -0
  7. package/toolchain/emscripten-version +1 -0
  8. package/toolchain/rust-wali-version +3 -0
  9. package/toolchain/wali/asyncify-reach.mjs +107 -0
  10. package/toolchain/wali/asyncify.sh +57 -0
  11. package/toolchain/wali/build-sysroot.sh +158 -0
  12. package/toolchain/wali/patches/compiler-rt/0001-wasm-compare-result.patch +18 -0
  13. package/toolchain/wali/patches/musl/0001-environment-through-imports.patch +143 -0
  14. package/toolchain/wali/patches/musl/0002-setjmp-with-wasm-exceptions.patch +133 -0
  15. package/toolchain/wali/patches/musl/0003-unknown-syscall-is-enosys.patch +31 -0
  16. package/toolchain/wali/patches/musl/0004-return-from-main-is-exit.patch +53 -0
  17. package/toolchain/wali/patches/musl/0005-posix-spawn-through-the-host.patch +278 -0
  18. package/toolchain/wali/patches/musl/0006-detached-thread-frees-its-stack.patch +34 -0
  19. package/toolchain/wali/patches/musl/0007-wordexp-without-fork.patch +62 -0
  20. package/toolchain/wali/patches/musl/0008-progname-from-argv.patch +34 -0
  21. package/toolchain/wali/patches/musl/0009-no-basename-in-string-h.patch +15 -0
  22. package/toolchain/wali/patches/musl/0010-ssize-max-is-pointer-sized.patch +15 -0
  23. package/toolchain/wali/patches/musl/0011-startup-without-malloc.patch +85 -0
  24. package/toolchain/wali/patches/musl/0012-floatscan-fixes-from-musl.patch +39 -0
  25. package/toolchain/wali/patches/musl/0013-strptime-from-musl-with-glibc-s-and-z.patch +169 -0
  26. package/toolchain/wali/patches/musl/0014-wordexp-fixes-from-musl.patch +43 -0
  27. package/toolchain/wali/patches/musl/0015-long-double-is-ieee-quad.patch +202 -0
  28. package/toolchain/wali/patches/musl/0016-wordexp-nocmd-and-undef.patch +285 -0
  29. package/toolchain/wali/rust.sh +116 -0
  30. package/toolchain/wali/signal-checks.mjs +373 -0
  31. package/toolchain/wali-version +13 -0
package/README.md CHANGED
@@ -1,3 +1,9 @@
1
- # Temporary Holding Version
1
+ # @ecmaos-apps/rsync-src
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ The Corresponding Source of `@ecmaos-apps/rsync` 3.5.1-ecmaos.1 (GPL-3.0-or-later): everything needed to build the `rsync.wasm` it ships.
4
+
5
+ - `sources/` - the upstream archives, each checked against the sha256 in `package.json` (`ecmaos.archives`)
6
+ - `build/` - the scripts that turn them into the program (our changes to the source are in them)
7
+ - `toolchain/` - the pins of the compiler and libc the program is built with, and the patches to WALI's musl and compiler-rt (`wali/`)
8
+
9
+ Installed with `apt source rsync` or `install @ecmaos-apps/rsync-src`.
package/build/build.sh ADDED
@@ -0,0 +1,30 @@
1
+ #!/usr/bin/env bash
2
+ # SPDX-License-Identifier: GPL-3.0-or-later
3
+ # Rebuilds programs/rsync.wasm: rsync 3.5.1 for ecmaOS, on WALI's musl (`utils/check-wali.sh`), run by /bin/wali.
4
+ # It copies trees locally and talks to any other rsync over ssh (`rsync -a dir host:dir` runs `ssh host rsync --server`),
5
+ # as the rsync of a Linux machine does. rsync forks (the receiver splits into a generator and a receiver, and a remote
6
+ # shell is a fork and an exec), so wali-cc links it with Asyncify. The result is committed, so only run this to change it.
7
+ #
8
+ # Built with the bundled zlib and popt, and without what has no library here or no use: OpenSSL, xxhash, zstd and LZ4
9
+ # (MD5 and MD4 checksums and zlib compression remain, which every rsync speaks), IDN, iconv, ACLs and xattrs.
10
+ set -euo pipefail
11
+ source "$(dirname "$0")/../../../../utils/check-wali.sh"
12
+
13
+ HERE=$(cd "$(dirname "$0")" && pwd)
14
+ SOURCES="$HERE/../../scripts/sources.mjs"
15
+ VERSION=$(node "$SOURCES" version rsync)
16
+ ARCHIVE=$(node "$SOURCES" fetch rsync)
17
+ OUT=$HERE/../../programs/rsync.wasm
18
+ WORK=$(mktemp -d)
19
+ trap 'rm -rf "$WORK"' EXIT
20
+
21
+ cd "$WORK"
22
+ tar xzf "$ARCHIVE"
23
+ cd "rsync-$VERSION"
24
+ CC="$WALI_CC" CFLAGS=-O2 ./configure --host=wasm32-unknown-linux-musl --disable-md2man --disable-openssl --disable-xxhash \
25
+ --disable-zstd --disable-lz4 --disable-idn --disable-iconv --disable-acl-support --disable-xattr-support \
26
+ --with-included-popt --with-included-zlib > configure.log 2>&1 || { tail -30 configure.log >&2; exit 1; }
27
+ make -j"$(nproc)" rsync > make.log 2>&1 || { tail -30 make.log >&2; exit 1; }
28
+ cp rsync "$OUT"
29
+ ls -l "$OUT"
30
+ echo "built with $WALI_TOOLCHAIN"
package/package.json CHANGED
@@ -1,6 +1,37 @@
1
1
  {
2
2
  "name": "@ecmaos-apps/rsync-src",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "3.5.1-ecmaos.1",
4
+ "description": "The source of @ecmaos-apps/rsync: rsync, the fast incremental file copier, locally and over ssh; it forks, so it is built with Asyncify",
5
+ "license": "GPL-3.0-or-later",
6
+ "homepage": "https://rsync.samba.org/",
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "https://github.com/ecmaos/ecmaos",
10
+ "directory": "core/utils-copyleft"
11
+ },
12
+ "keywords": [
13
+ "ecmaos",
14
+ "source",
15
+ "rsync"
16
+ ],
17
+ "files": [
18
+ "sources",
19
+ "build",
20
+ "toolchain",
21
+ "share",
22
+ "README.md"
23
+ ],
24
+ "publishConfig": {
25
+ "access": "public"
26
+ },
27
+ "ecmaos": {
28
+ "sourceOf": "@ecmaos-apps/rsync@3.5.1-ecmaos.1",
29
+ "archives": {
30
+ "rsync-3.5.1.tar.gz": {
31
+ "sha256": "c55f9c9dc10fb8bec397b399a0fdded53cc9a2d8e30891bb0d63724d25c37bef",
32
+ "url": "https://download.samba.org/pub/rsync/src/rsync-3.5.1.tar.gz",
33
+ "license": "GPL-3.0-or-later"
34
+ }
35
+ }
36
+ }
37
+ }