@ai-ecoverse/wasix-ruby 3.4.11-15 → 3.4.11-17

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.
package/PRESTAGE.md CHANGED
@@ -1,6 +1,6 @@
1
- # wasix-ruby 3.4.11-14
1
+ # wasix-ruby 3.4.11-17
2
2
 
3
- Built against wasix-sysroot **2025.9.30-30**. **No epoll**: SLICC returns ENOSYS (52)
3
+ Built against wasix-sysroot **2025.9.30-32**. **No epoll**: SLICC returns ENOSYS (52)
4
4
  for `epoll_create`; MRI is compiled with `USE_MN_THREADS=0` and
5
5
  `HAVE_SYS_EPOLL_H=0` (also kqueue/eventfd/timerfd off) so it uses poll()/timer-thread.
6
6
 
@@ -26,7 +26,8 @@ linked against /home/runner/work/homescoop/homescoop/packages/wasix-ruby/work/de
26
26
  ## Gems / flock / uid (-5)
27
27
  - `GEM_HOME=${HOME}/.local/share/gem/ruby/3.4.0` (writable under SLICC HOME).
28
28
  - `GEM_PATH=${HOME}/.local/share/gem/ruby/3.4.0:${package}/lib/ruby/gems/3.4.0`.
29
- - `File#flock` / `missing/flock.c` `__wasi__`: advisory **no-op success** (was EINVAL).
29
+ - `File#flock` / `missing/flock.c` `__wasi__`: whole-file fcntl record locks (since 3.4.11-17,
30
+ homescoop#578; up to -16 a no-op success; upstream EINVAL).
30
31
  - `Process.uid`/`euid`/`gid`/`groups`, `Etc.getpwuid` and `Dir.home` come from
31
32
  slicc-kernel's process credentials (wasix-sysroot -20, slicc-kernel >= 1.44.0):
32
33
  root is uid 0 with home /root; a `kernel.users.add` user gets its own ids.
@@ -55,7 +56,7 @@ t = Thread.new { puts "CHILD"; 42 }; puts t.value
55
56
  require "openssl"; OpenSSL::OPENSSL_VERSION
56
57
  require "socket"
57
58
  Process.uid # => 0 (root, the kernel's default user)
58
- f = File.open("flock-test", "w"); f.flock(File::LOCK_EX); f.close # no Errno::EINVAL
59
+ f = File.open("flock-test", "w"); f.flock(File::LOCK_EX); f.close # no Errno::EINVAL; a second process gets false for LOCK_EX|LOCK_NB
59
60
  ```
60
61
  Plus Queue/CV/Mutex; `bundle exec rake` when #3735 is available.
61
62
 
package/README.md CHANGED
@@ -37,6 +37,43 @@ fails. `io/console` is built, so `irb` and reline work.
37
37
 
38
38
  `TZ` is ignored: wasix-libc's localtime is UTC only (homescoop#193).
39
39
 
40
+ ## 3.4.11-17: File#flock excludes other processes
41
+
42
+ `File#flock` takes whole-file `fcntl` record locks (`LOCK_SH` → read lock,
43
+ `LOCK_EX` → write lock, `LOCK_UN` → unlock; `LOCK_NB` doesn't wait), which
44
+ slicc-kernel (≥ 1.100.0) enforces between processes (homescoop#578). Up to
45
+ -16 every `flock` returned 0 and excluded nobody, so two `bundle install` or
46
+ `gem install` runs on one bundle path or gem directory didn't wait for each
47
+ other. Now a second process's `flock(File::LOCK_EX | File::LOCK_NB)` is
48
+ `false` while another holds the lock, and a blocking one waits.
49
+
50
+ These are `fcntl` semantics, as wasix-perl's `flock` has them since
51
+ 5.42.0-15: a lock belongs to the process, so a second handle on the same
52
+ file in the same process isn't refused, and closing any handle on the file
53
+ drops the process's lock on it. `fcntl` wants a writable handle for a write
54
+ lock, so `LOCK_EX` on a read-only handle takes a read lock: it keeps writers
55
+ out, but two read-only `LOCK_EX` holders are both granted; open a lock file
56
+ for writing to exclude (homescoop#758). `flock` on something that isn't a
57
+ regular file (a pipe, STDOUT, `/dev/null`, a directory) succeeds and excludes
58
+ nobody, since slicc-kernel keeps record locks on regular files only
59
+ (ai-ecoverse/slicc-kernel#757).
60
+
61
+ A real rebuild, on wasix-sysroot 2025.9.30-32.
62
+
63
+ ## 3.4.11-16: the engines floor, and bundle exec
64
+
65
+ The `engines` floor (slicc-kernel ≥ 1.100.0, below) is enforced from
66
+ slicc-kernel 1.106.2 on: its command catalog refuses a package whose
67
+ `engines.slicc-kernel` the running kernel doesn't meet
68
+ (ai-ecoverse/slicc-kernel#797). Older kernels install the package without a
69
+ warning, and there `fcntl` record locks aren't real: use slicc-kernel ≥
70
+ 1.100.0 (homescoop#651).
71
+
72
+ From slicc-kernel 1.106.2 the commands' `/usr/bin` entries are real files
73
+ (slicc-kernel#762), so `bundle exec ruby …` no longer warns
74
+ `/usr/bin/ruby is empty` (homescoop#379). Older kernels print that warning,
75
+ and the command still runs.
76
+
40
77
  ## 3.4.11-15: needs slicc-kernel ≥ 1.100.0
41
78
 
42
79
  A packaging-only release of 3.4.11-14 (the same files): `engines` now asks
@@ -56,9 +93,8 @@ refusing to install there is the honest answer (homescoop#552). Up to -14
56
93
  holds gets `Errno::EAGAIN`, `F_SETLKW` waits for the unlock, and `F_GETLK`
57
94
  names the holder. On an older kernel every lock is granted locally and
58
95
  `F_GETLK` answers `F_UNLCK` (hence -15's `engines` floor). The struct is `[type, whence, start, len,
59
- pid].pack("s s x4 q q l x4")` (32 bytes). `File#flock` is unchanged: an
60
- advisory no-op that succeeds (`bundle install` and `gem install` lock
61
- their files with it).
96
+ pid].pack("s s x4 q q l x4")` (32 bytes). `File#flock` was unchanged: an
97
+ advisory no-op that succeeded (real locks since 3.4.11-17).
62
98
  - `RUBYLIB` names only the package's library directories that exist,
63
99
  `lib/ruby/3.4.0` and its `wasm32-wasi`. Up to 3.4.11-13 it also named
64
100
  `site_ruby` and `vendor_ruby` (and their `wasm32-wasi`), which npm never
@@ -236,7 +236,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
236
236
  SOFTWARE.
237
237
  ```
238
238
 
239
- ## wasix-libc (@ai-ecoverse/wasix-sysroot 2025.9.30-30; files from tag v2025-09-02.1)
239
+ ## wasix-libc (@ai-ecoverse/wasix-sysroot 2025.9.30-32; files from tag v2025-09-02.1)
240
240
 
241
241
  ```text
242
242
  wasi-libc as a whole is multi-licensed under the
package/bin/ruby CHANGED
Binary file
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@ai-ecoverse/wasix-ruby",
3
- "version": "3.4.11-15",
4
- "description": "MRI Ruby for slicc WASIX (no epoll; asyncify spill 65536; date_core; wasix-sysroot 2025.9.30-30: user ids, traps and times from slicc-kernel)",
3
+ "version": "3.4.11-17",
4
+ "description": "MRI Ruby for slicc WASIX (no epoll; asyncify spill 65536; date_core; wasix-sysroot 2025.9.30-32: user ids, traps and times from slicc-kernel)",
5
5
  "engines": {
6
6
  "slicc-kernel": ">=1.100.0"
7
7
  },