buninu-linux 0.7.55 → 0.8.56

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 (47) hide show
  1. package/Dockerfile +5 -2
  2. package/NOTICE.md +110 -49
  3. package/README.md +440 -144
  4. package/fetch-npm.sh +44 -0
  5. package/fetch-plus-build.sh +1 -0
  6. package/index.js +15 -13
  7. package/initramfs/bin/buninu-browser +24 -0
  8. package/initramfs/bin/jspinyin +12 -0
  9. package/initramfs/bin/jspulse +2 -0
  10. package/initramfs/bin/tar +40 -6
  11. package/initramfs/bin/top +1 -7
  12. package/initramfs/buninu/CHANGELOG.md +4 -0
  13. package/initramfs/buninu/apps/bunmsh/CHANGELOG.md +28 -0
  14. package/initramfs/buninu/apps/bunmsh/package.json +1 -1
  15. package/initramfs/buninu/apps/bunmsh/src/main.js +7 -5
  16. package/initramfs/buninu/apps/bunmsh/src/shell.js +584 -75
  17. package/initramfs/buninu/apps/bunmsh/test/shell1.test.js +64 -0
  18. package/initramfs/buninu/package.json +1 -1
  19. package/initramfs/init.js +5 -0
  20. package/initramfs/lib/browser-resources.js +25 -0
  21. package/initramfs/lib/tar-exclude.js +20 -0
  22. package/initramfs/lib/tar-strip.js +94 -0
  23. package/initramfs/lib/top-memory.js +12 -0
  24. package/initramfs/usr/share/doc/buninu-linux/tar.md +24 -1
  25. package/initramfs/usr/share/doc/buninu-linux/top.md +18 -0
  26. package/package.json +1 -1
  27. package/scripts/arch.js +5 -5
  28. package/scripts/arch.sh +5 -5
  29. package/scripts/fetch-npm.js +51 -0
  30. package/scripts/fetch.js +1 -0
  31. package/scripts/js-tools.js +3 -0
  32. package/scripts/npm-packages.md +19 -0
  33. package/scripts/pack-initramfs.sh +1 -0
  34. package/scripts/pack.js +2 -0
  35. package/scripts/stage-npm.js +57 -0
  36. package/scripts/stage-npm.sh +62 -0
  37. package/test/fetch-npm.test.js +92 -0
  38. package/test/host/Dockerfile +6 -4
  39. package/test/host/boot-test.exp +2 -2
  40. package/test/host/host-test.sh +2 -2
  41. package/test/host/in-container.sh +4 -4
  42. package/test/js-tools-selection.test.js +19 -0
  43. package/test/npm-launchers.test.js +59 -0
  44. package/test/stage-npm.test.js +130 -0
  45. package/test/tar-strip.test.js +218 -0
  46. package/test/top-memory.test.js +23 -0
  47. package/initramfs/buninu/apps/bunmsh/test/shell.test.js +0 -2092
package/Dockerfile CHANGED
@@ -2,14 +2,17 @@
2
2
  # that do not have it natively (macOS) or would rather not install it.
3
3
  # index.js --docker builds this image on first use and runs the fetch/build
4
4
  # scripts inside it with the checkout bind-mounted at /src; macOS does that
5
- # by default. The image only unpacks archives and assembles files, it never
5
+ # by default when JS tools are disabled. The image only unpacks archives and assembles files, it never
6
6
  # executes guest binaries, so its own architecture does not matter: Apple
7
7
  # Silicon runs it as linux/arm64 and still builds both guests.
8
8
  #
9
9
  # binutils-mingw-w64-x86-64 PE-aware objcopy/objdump for the x86_64 UKI
10
10
  # binutils-aarch64-linux-gnu PE-aware objcopy/objdump for the aarch64 UKI
11
11
  # (native binutils on an arm64 host, cross on amd64)
12
- FROM debian:13-slim
12
+ FROM oven/bun:1.4.2
13
+ USER root
14
+ # These images run build scripts, not the base image's default Bun command.
15
+ ENTRYPOINT []
13
16
 
14
17
  RUN apt-get update \
15
18
  && apt-get install -y --no-install-recommends \
package/NOTICE.md CHANGED
@@ -3,13 +3,15 @@
3
3
  Buninu Linux is licensed under the MIT License; see `LICENSE`.
4
4
 
5
5
  It redistributes the third-party components below under their own licenses.
6
- The full license texts are in `LICENSES/`. Every SHA-256 here was checked
6
+ Platform license texts are in `LICENSES/`; npm application licenses and
7
+ notices also remain inside their installed package directories, as listed
8
+ below. Platform SHA-256 values here were checked
7
9
  byte-for-byte against the official Alpine Linux v3.24 x86_64 or aarch64
8
10
  package (or the official Bun release) it came from. The x86_64 guest is the
9
11
  default build; `--arch aarch64` builds the other one from the same versions.
10
12
 
11
- The sections below cover the platform: the kernel, the C library, the GCC
12
- runtime, the UEFI stub and Bun. The Buninu userspace under `initramfs/buninu/`
13
+ The sections below cover the platform, fetched npm applications and graphics
14
+ resources. The Buninu userspace under `initramfs/buninu/`
13
15
  carries its own third-party notices; see the last section.
14
16
 
15
17
  Alpine's CDN serves only the current pkgrel of each branch, so the package
@@ -103,83 +105,83 @@ the built image redistributes them.
103
105
  - License: GPL-2.0-only WITH Linux-syscall-note
104
106
  - See: `LICENSES/GPL-2.0.txt` and `LICENSES/Linux-syscall-note.txt`
105
107
 
106
- Linux 6.18.55 as packaged by Alpine Linux 3.24 from the `linux-lts` aport.
107
- The default build uses package `linux-virt`, version 6.18.55-r0.
108
- `--linux-lts` and `--real` use package `linux-lts`, version 6.18.55-r0.
108
+ Linux 6.18.56 as packaged by Alpine Linux 3.24 from the `linux-lts` aport.
109
+ The default build uses package `linux-virt`, version 6.18.56-r0.
110
+ `--linux-lts` and `--real` use package `linux-lts`, version 6.18.56-r0.
109
111
  Each comes from the x86_64 or aarch64 repository to match `--arch`. All
110
112
  listed modules are the selected package's `.ko.gz` files decompressed without
111
113
  modification.
112
114
 
113
- - Upstream source: https://cdn.kernel.org/pub/linux/kernel/v6.x/linux-6.18.55.tar.xz
115
+ - Upstream source: https://cdn.kernel.org/pub/linux/kernel/v6.x/linux-6.18.56.tar.xz
114
116
  - Alpine build recipe, configuration and patches (Corresponding Source),
115
- pinned to the commit shipping 6.18.55-r0 (the same for both architectures):
116
- https://gitlab.alpinelinux.org/alpine/aports/-/blob/52fae6d7d56f3958f32e5bf9121a7536524b9ef4/main/linux-lts/APKBUILD
117
+ pinned to the commit shipping 6.18.56-r0 (the same for both architectures):
118
+ https://gitlab.alpinelinux.org/alpine/aports/-/blob/efc8ddbb20c827d2bd8223c19a2625e754e5cb3c/main/linux-lts/APKBUILD
117
119
  - Packages:
118
- https://dl-cdn.alpinelinux.org/alpine/v3.24/main/x86_64/linux-virt-6.18.55-r0.apk
119
- SHA-256 `a941c15fc5db26b6692fd0140fa0970da76cb12aadf3dc8306c419f21bd39c93`
120
- https://dl-cdn.alpinelinux.org/alpine/v3.24/main/x86_64/linux-lts-6.18.55-r0.apk
121
- SHA-256 `02ba9491d4cc110707de64ed03dd7e2fa5c93fdd851979c244ceb018785a9eea`
122
- https://dl-cdn.alpinelinux.org/alpine/v3.24/main/aarch64/linux-virt-6.18.55-r0.apk
123
- SHA-256 `c7fb892408d7fe163a18671e5c7816752976d1c67fd17794dfba794aa0d6c1ac`
124
- https://dl-cdn.alpinelinux.org/alpine/v3.24/main/aarch64/linux-lts-6.18.55-r0.apk
125
- SHA-256 `31aeae56fa527b2fb4fdd4aefbd693cbec210a8cbfd4ea7597a1773b832e9f83`
120
+ https://dl-cdn.alpinelinux.org/alpine/v3.24/main/x86_64/linux-virt-6.18.56-r0.apk
121
+ SHA-256 `755deb045cfeb8c2bcaa2b2febe01ab2101d747921e64d4cd54d0312321e8d5d`
122
+ https://dl-cdn.alpinelinux.org/alpine/v3.24/main/x86_64/linux-lts-6.18.56-r0.apk
123
+ SHA-256 `b0d8cc4d7e031b5619221e7978920d051bf1dd1e335f6d05d03964b2285fc3b4`
124
+ https://dl-cdn.alpinelinux.org/alpine/v3.24/main/aarch64/linux-virt-6.18.56-r0.apk
125
+ SHA-256 `e3839bfd751ff0a4421484f712b9b29efb514024523736a0ef62521521571b12`
126
+ https://dl-cdn.alpinelinux.org/alpine/v3.24/main/aarch64/linux-lts-6.18.56-r0.apk
127
+ SHA-256 `795bcd49840be7f4ff9566f5f669201bd41202376a455b720a98eb814f0e72f8`
126
128
 
127
129
  SHA-256 of files in the default x86_64 `linux-virt` image:
128
130
 
129
131
  ```text
130
- kernel/x86_64/vmlinuz-virt fcee60bd42bdcc5f165278e092de0bb00d969843be326f7bd9a9602c2f52de9e
131
- failover.ko 75d408861dd0ee89bf94753c9f2fff0f3831a6f76eaab8870d186910e6e2924b
132
- net_failover.ko 4db140c0f8e32a31e95f56f35af62e5279864104f57d30af0684c75e3505bdd5
133
- virtio_net.ko f2867d641f808b7f5d7d4eb972c72398902589a83b48f6f7a174b844717da117
132
+ kernel/x86_64/vmlinuz-virt dc99c86bb8e58cb4eda5f01eac44c4d972105945a46dfe76a9e86e8529915c72
133
+ failover.ko ddf94fe8a89b24e839f21866f828adc3eb91e62fa46dd977c74d7c2b6f92fe21
134
+ net_failover.ko fb710ef0450417dea2f6dede919d14f5a4a94b1be73f338cfe2ed05e32f0cc30
135
+ virtio_net.ko 2fb98ab7d06cfb7a1e1a07dcc5098da44316360097d75e288a30ad4855c449f7
134
136
  ```
135
137
 
136
138
  SHA-256 of files in an x86_64 `--linux-lts` image:
137
139
 
138
140
  ```text
139
- kernel/x86_64/vmlinuz-lts 6c85e6375814c51257a3d1b21c3c4c02803231d42e42c1a3d50236bf543cbeba
140
- failover.ko b563c6734384c5c41ed1b227a221a3e7b511bca743e583dd33d6f85405a8df07
141
- net_failover.ko 4ee36e32ed5db502125b57d237b5db31509c7b9c9a49ca9221b704fcfcd80b1c
142
- virtio_net.ko 4aa2b98c0fed35be473ff22f4d3f89cb184ca13e6605dd9e8a68b5854eba7b6a
143
- virtio_ring.ko ed1c704eddca74e4f68164efc62b65f8e8a8276b7ebb2eeb0185326dbd093603
144
- virtio.ko 986cab65ecfce9c6291cc54598301ede8e8e2eca521a82dfbaf6dcf76ec6f8c6
145
- virtio_pci_legacy_dev.ko dedd092324e5d23ac218dfa2aad3fa8bc2f0b49e54c1763423627c75a8c4e907
146
- virtio_pci_modern_dev.ko 855221097ff07f0981d4e9fbb4200a0628a154826f37299d1434811f21902388
147
- virtio_pci.ko aee0a18cce24968d1e06c026a056e570b3039884b900385f019410a751ea8a44
141
+ kernel/x86_64/vmlinuz-lts e893ce0f7aecbdf2dcf012659ec5a0b35740780ae5c3af5ad188029f5cd4aa8f
142
+ failover.ko 59e4e4808dca2d18d849c2da850e4ea659485007b09a690c7e57fb0e623cd1df
143
+ net_failover.ko 20dd06a6f6f1528079a438630d741f125d11cc9bae58d618e0e6381f8bff6f5c
144
+ virtio_net.ko 39bcd12bfc3149351fa226dabdbb1f82137c53f3b1ccbacbf30661bf8ff99ad4
145
+ virtio_ring.ko e8fdebd89345ef39a54d3b23e6f2a57c6c4b201708b35113705b56d0fa373596
146
+ virtio.ko d4ab148e31f5d4d5a1dd3c3f30bb52ba9a13e670929c9f7f1668396edf8049b7
147
+ virtio_pci_legacy_dev.ko 15c35c8875b68dcaed3ac58d463d1b3f2c3e52dcf9a3840366d3fa6da7cd4dd7
148
+ virtio_pci_modern_dev.ko 59bd6e34e6cf3c0ce54bab1eca1d7ac0325112280a6718613460002d2cde70d0
149
+ virtio_pci.ko cc3ad8eaffa321bd58dbd663afba074dee81a5ad6f283d50cd5b1b340672430e
148
150
  ```
149
151
 
150
152
  `--real` additionally includes the following modules from that same
151
153
  x86_64 `linux-lts` package for physical xHCI controllers and USB HID keyboards:
152
154
 
153
155
  ```text
154
- usb-common.ko 38a461cdee1e8dd82985fedbd050d3a496825c5b59c66dc3305c5508c93fb0e4
155
- usbcore.ko 18949ea4cab0f98846f4fea192c9ebe9892c5504f6750529a4db8c1a718fdd3b
156
- xhci-hcd.ko aed7f3e8d2f1e2d722fb625fcd68adce5212a30ce1a25a934832177594670543
157
- xhci-pci.ko 8959b6c1790ac1b656308278313f78cf4fde8b811456a42579b467a8196515b8
158
- xhci-pci-renesas.ko 3aa013b9ca71ee5bd16b30efb1f68aa2c29ac84cf15dd92caf413f7577fc36cf
159
- hid.ko e3fecc9b96b44d1c572337a937927291c3219d43a00a357049a1285ab57f5bbe
160
- hid-generic.ko a3d76a35904f26d8bb8d5bff115de12a1cb966c3e428e529767dde28c24e4421
161
- usbhid.ko 6b50c4a6037fa740b3f576d5bf362bdad7aa86ebc8da5e1777e69c03ed70f703
156
+ usb-common.ko 37feaa14670d4bbd3dca77d701344d2fb02e2cb139d21c5af8b2c140aab5c6fe
157
+ usbcore.ko 75efddfd7d1bf996ad99f0d9be790be767ca72ebdb53a00194b449c3588faa16
158
+ xhci-hcd.ko bd5772b2ba908dff16c74ae10211a1e5cfd72910d861dbdf30b8f71c5995066a
159
+ xhci-pci.ko 6c688038c9b45297fce752c8f0443cd0f398f31e0b4efffd7f869325ce9884fa
160
+ xhci-pci-renesas.ko aa08808c9e609fe570a1c5b90d0f0ba33f2ca2e7d84e8ccbb3a2856fe65a7b3f
161
+ hid.ko 161160bf12d18a24c25aef6355e265142fc4fb2122b09923a6e184fabedf6246
162
+ hid-generic.ko 6d5ae3cfd8f8b034cbe444869485ac9012376c4ca604a3cd039f0cae442005f9
163
+ usbhid.ko 6ed1e4891b242f64520621d689a24828dfc24a96236c71b86d9af9361248aa5a
162
164
  ```
163
165
 
164
166
  SHA-256 of files in the default aarch64 `linux-virt` image:
165
167
 
166
168
  ```text
167
- kernel/aarch64/vmlinuz-virt af8ad21e222dbff8c89909e1ef7b8b7607dd58188b2f3067128aac4f646d212d
168
- failover.ko aff1648d08436515b509c3c848049e44540ff0d26afc113a496db961f6871df6
169
- net_failover.ko 4461014c041c8cbdfc881c0d820361014a491547b694d36425d084ab9008a33f
170
- virtio_net.ko 7b6e3c89d666419d336990688711c4d6b0cab91e5934a7bd99e6d8dcc5caa40b
169
+ kernel/aarch64/vmlinuz-virt 039c532c2fa8f49896a679065d79a03b8a444c9d54fa80ac9bc4d0ce1ecd0ca6
170
+ failover.ko ce65a98acce98720753c4a9a7e339f6c70d22eae70b65cc1b4211543a7c6c3a3
171
+ net_failover.ko 39c9222d800ae95d8a82ff797e408187411ac2ff47bec2c9d7ddbfe99537dbe3
172
+ virtio_net.ko 762f8e362ae2e2bbf200ab9bc742524999e8bce12c72671bf8560fd9bb7907d5
171
173
  ```
172
174
 
173
175
  SHA-256 of files in an aarch64 `--linux-lts` image:
174
176
 
175
177
  ```text
176
- kernel/aarch64/vmlinuz-lts 6c6625bc5ba59136101414d09efbeaaed000517e654a75157f42565cec15abad
177
- failover.ko 1f10c1ac74c6d35f745227899372b1b6656a3197436d9c72e0bb39a19779c3a6
178
- net_failover.ko 5815342b859f820adfd90ffdddde689c73f0e6fcc34efbc9ada8beabb2fd37b2
179
- virtio_net.ko 2ef9114dea6b40bd9d2e1460c6be94859b5527af5479928cfd90a66eff843bab
180
- virtio_pci_legacy_dev.ko be6654a06cfb30f2598b184f7a2b2372314c5a5325a984b73a7ef9a3c39e7eb3
181
- virtio_pci_modern_dev.ko d88219ed14678c0aba06a882d6cf43b0ad9462eeae09638b6382ba5601b5a8c4
182
- virtio_pci.ko 6bdafb0472d289e2ca6dfc63bf2cb2e54e1258e9c4774317ca1c7df059dfb31e
178
+ kernel/aarch64/vmlinuz-lts de5ff95fd663a30e53765cb0794707656bb80749d77f16bbf94225d17c512447
179
+ failover.ko 7f3d40067603c9916d22e9d85fea1512bd95c087aaae774e5ea70f8bacb7ae04
180
+ net_failover.ko 085e4fd53a40704408b6bf914ee464d16007296fa3615940fa54688afe84466c
181
+ virtio_net.ko 4ea86521819063df91cfd18191e8bc2bd2551392e8f7a33126df0aba675ee409
182
+ virtio_pci_legacy_dev.ko baf8033c183819a8bccacf36677247740a5cff9eec9b403b94840af258b60b6e
183
+ virtio_pci_modern_dev.ko 2905133de7c9baceff9fc6a27dba9b8469744019545c19cf1456e64f7e50f062
184
+ virtio_pci.ko 3b506947c25866e08a311f124cd143bd0f501179f0b556aed7ca4d6632143d8d
183
185
  ```
184
186
 
185
187
  ### linuxx64.efi.stub and linuxaa64.efi.stub
@@ -236,6 +238,65 @@ native/x86_64/bin/bun 16b72935ffd7a503b978c186874539c92aade4e3515b70a5abf5db2
236
238
  native/aarch64/bin/bun 1101cd0aa92ea214c2aaf4bb3761ca3c76a90aae0e6f94c07efb4e8c4f18a8fc
237
239
  ```
238
240
 
241
+ ## npm applications fetched and redistributed in the image
242
+
243
+ The fetch stage downloads the following exact releases directly from the
244
+ npm registry. `scripts/npm-packages.md` is the canonical list of tarball
245
+ URLs and SHA-256 pins. Both fetch and pack verify those hashes. Pack removes
246
+ the leading `package/` component and installs the contents under
247
+ `/usr/lib/node_modules/`; it does not run npm lifecycle scripts or resolve
248
+ additional dependencies. The downloaded archives are build inputs, not
249
+ committed source files, but their contents are redistributed in the image.
250
+
251
+ | Package | Version | Package license | Project / package page | Installed license and notices (relative to `/usr/lib/node_modules/`) |
252
+ |---|---|---|---|---|
253
+ | `buninu-browser` | 0.2.2 | MIT for the browser's own code; bundled components retain their own terms | https://github.com/jjtseng93/buninu-browser | `buninu-browser/LICENSE`, `THIRD_PARTY_NOTICES.md`, `LICENSES/` and vendor notices within that package |
254
+ | `@drxiaozhi/casty` | 1.3.4 | MIT | https://github.com/jjtseng93/casty | `@drxiaozhi/casty/LICENSE` |
255
+ | `@drxiaozhi/jspulse` | 0.2.1 | LGPL-2.1-or-later, with additional component notices | https://github.com/jjtseng93/jspulse | `@drxiaozhi/jspulse/LICENSE`, `NOTICE.md`, `LICENSES/` and source-file notices within that package |
256
+ | `@drxiaozhi/jspinyin` | 0.1.1 | MIT; hanzipinyin material under the Unlicense | https://www.npmjs.com/package/@drxiaozhi/jspinyin | `@drxiaozhi/jspinyin/LICENSE` and `@drxiaozhi/jspinyin/LICENSE-hanzipinyin.md` |
257
+
258
+ The upstream links identify the projects; the pinned registry archives
259
+ identify the exact releases used by this build. Preserve the packages'
260
+ copyright notices, license texts, third-party notices and source material
261
+ when redistributing or repacking the image. Buninu Linux's MIT license does
262
+ not relicense these components.
263
+
264
+ ### Browser resources and LGPL media decoder
265
+
266
+ Only the browser's `usr/lib/canvaskit` and `usr/share/fonts` directories are
267
+ excluded from extraction. Its `usr/README.md`, top-level license collection,
268
+ third-party notices and vendor source material are retained. The distribution
269
+ launcher creates relative links to the system CanvasKit and fonts when those
270
+ resource directories are missing; their licenses are documented under
271
+ Graphics stack below and remain with the system copies.
272
+
273
+ The browser includes `@wasmpeg/cpu` 1.0.1 and its FFmpeg code under
274
+ LGPL-2.1-or-later. Within `/usr/lib/node_modules/buninu-browser/`, retain:
275
+
276
+ - `vendor/wasmpeg/LICENSE`, `vendor/wasmpeg/NOTICE` and `LICENSES/wasmpeg.txt`;
277
+ - `vendor/wasmpeg/source-v1.0.1.tar.gz`, the bundled source archive;
278
+ - `vendor/wasmpeg/VENDORING.md`, with artifact hashes and rebuild instructions;
279
+ - `patches/wasmpeg/`, documenting the package's local changes;
280
+ - the other license texts identified in `THIRD_PARTY_NOTICES.md`, including
281
+ those for Emscripten and zlib.
282
+
283
+ The decoder's `cpu.wasm` remains a separate, replaceable file. Do not remove
284
+ the source archive or rebuild material merely to reduce the image size.
285
+
286
+ ### jspulse source and notices
287
+
288
+ jspulse is shipped as JavaScript source, with its LGPL license, modification
289
+ notices and additional notices intact. Its `NOTICE.md` describes the
290
+ PulseAudio, Termux, ALSA and Sun G.711 material; `LICENSES/` includes LGPL-2.1
291
+ and NCSA texts. Browser audio communicates with this separate server through
292
+ the PulseAudio protocol. The distribution's launcher does not replace or
293
+ remove the package's source or license files.
294
+
295
+ This inventory records the shipped materials; it is not a blanket compliance
296
+ certification. Redistributors remain responsible for applicable source,
297
+ notice and modification/replacement requirements, particularly if changing
298
+ the packages, their build artifacts or the source material supplied with them.
299
+
239
300
  ## Graphics stack
240
301
 
241
302
  These files are committed under `initramfs/lib/` and `initramfs/usr/share/`