8 Commits
Author SHA1 Message Date
ZacharyZhang-NYandClaude Opus 5.5 5accf492ba Linux: RUNPATH guard, packaging in the container on CI, source archives per commit (L1.7)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 14:32:36 -04:00
ZacharyZhang-NYandClaude Opus 5.5 a9f8136e46 Linux: packages tested on Omarchy, Ubuntu and Fedora; ElyMark stays idle (L1.6)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 13:29:59 -04:00
ZacharyZhang-NYandClaude Opus 5.5 15106b641f Linux: AppImage, deb, rpm and Arch packages from one AppDir, installed to /opt/ely-office (L1.5)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 11:55:14 -04:00
ZacharyZhang-NYandClaude Opus 5.5 e3bfe8ade4 Linux: engines and apps build in an Ubuntu 26.04 container, glibc 2.43 at most (L1.4)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 11:00:48 -04:00
ZacharyZhang-NYandClaude Opus 5.5 c2f16bc899 ely-ui: the settings test sets menus first, as apps do; passes on Linux (L1.3)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 02:33:07 -04:00
ZacharyZhang-NYandClaude Opus 5.5 b2e13230b5 Linux: file watchers skip reads, so idle apps stop rereading theme, settings and repos (L1.2)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 02:28:29 -04:00
ZacharyZhang-NYandClaude Opus 5.5 c62d548688 Linux: gpui opens real Wayland and X11 windows, not headless (L1.1)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 02:07:48 -04:00
ZacharyZhang-NYandClaude Opus 5.5 178625b6f3 Site: v0.1.3 is out for macOS, Windows and Linux; a download link in the hero
Downloads go to the v0.1.3 release page.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-11 01:18:38 -04:00
66 changed files with 1610 additions and 159 deletions

No files matched your search

+3 -2
View File
@@ -1,8 +1,8 @@
# Build output and downloads
/target/
/dist/
/engines/
/reference/
/engines
/reference
node_modules/
.DS_Store
.ruff_cache/
@@ -17,3 +17,4 @@ node_modules/
/docs/test-map.md
/assets/papirus_icons-master.zip
/Gitea.md
/.work/
Generated
+286
View File
@@ -144,6 +144,19 @@ dependencies = [
"ghash",
]
[[package]]
name = "ahash"
version = "0.8.12"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5a15f179cd60c4584b8a8c596927aadc462e27f2ca70c04e0071964a73ba7a75"
dependencies = [
"cfg-if",
"const-random",
"once_cell",
"version_check",
"zerocopy",
]
[[package]]
name = "aho-corasick"
version = "1.1.5"
@@ -324,6 +337,12 @@ version = "0.7.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d3fb67a6e08acf24fdeccbac2cb6ac4305825bd1f117462e0e6f2f193345ad56"
[[package]]
name = "as-raw-xcb-connection"
version = "1.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "175571dd1d178ced59193a6fc02dde1b972eb0bc56c892cde9beeceac5bf0f6b"
[[package]]
name = "as-slice"
version = "0.2.1"
@@ -349,9 +368,14 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fb8421aaa9644a5faf26735f258b669b15f063313ef8f8e2bdb28912a1a6f111"
dependencies = [
"enumflags2",
"futures-channel",
"futures-util",
"getrandom 0.4.3",
"serde",
"serde_repr",
"wayland-backend",
"wayland-client",
"wayland-protocols",
"zbus",
]
@@ -875,6 +899,18 @@ dependencies = [
"tracing",
]
[[package]]
name = "calloop-wayland-source"
version = "0.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "138efcf0940a02ebf0cc8d1eff41a1682a46b431630f4c52450d6265876021fa"
dependencies = [
"calloop",
"rustix",
"wayland-backend",
"wayland-client",
]
[[package]]
name = "cbc"
version = "0.1.2"
@@ -1232,6 +1268,26 @@ version = "0.10.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a6ef517f0926dd24a1582492c791b6a4818a4d94e789a334894aa15b0d12f55c"
[[package]]
name = "const-random"
version = "0.1.18"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "87e00182fe74b066627d63b85fd550ac2998d4b0bd86bfed477a0ae4c7c71359"
dependencies = [
"const-random-macro",
]
[[package]]
name = "const-random-macro"
version = "0.1.16"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f9d839f2a20b0aee515dc581a6172f2321f96cab76c1a38a4c584a194955390e"
dependencies = [
"getrandom 0.2.17",
"once_cell",
"tiny-keccak",
]
[[package]]
name = "convert_case"
version = "0.10.0"
@@ -1847,6 +1903,12 @@ dependencies = [
"tendril",
]
[[package]]
name = "downcast-rs"
version = "1.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "75b325c5dbd37f80359721ad39aca5a29fb04c89279657cffdda8736d0c0b9d2"
[[package]]
name = "download-cef"
version = "3.0.0"
@@ -2479,6 +2541,17 @@ dependencies = [
"simd-adler32",
]
[[package]]
name = "filedescriptor"
version = "0.8.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e40758ed24c9b2eeb76c35fb0aebc66c626084edd827e07e1552279814c6682d"
dependencies = [
"libc",
"thiserror 1.0.69",
"winapi",
]
[[package]]
name = "filetime"
version = "0.2.29"
@@ -3117,17 +3190,23 @@ dependencies = [
"accesskit",
"accesskit_unix",
"anyhow",
"as-raw-xcb-connection",
"ashpd",
"bytemuck",
"calloop",
"calloop-wayland-source",
"filedescriptor",
"futures",
"gpui-pre",
"gpui-pre-collections",
"gpui-pre-http-client",
"gpui-pre-util",
"gpui-pre-wgpu",
"libc",
"log",
"notify-rust",
"oo7",
"open",
"parking_lot",
"raw-window-handle",
"smallvec",
@@ -3135,6 +3214,16 @@ dependencies = [
"strum 0.28.0",
"url",
"uuid",
"wayland-backend",
"wayland-client",
"wayland-cursor",
"wayland-protocols",
"wayland-protocols-plasma",
"wayland-protocols-wlr",
"x11rb",
"xkbcommon",
"zed-scap",
"zed-xim",
]
[[package]]
@@ -3349,6 +3438,7 @@ dependencies = [
"unicode-segmentation",
"web-sys",
"wgpu",
"zed-font-kit",
]
[[package]]
@@ -3443,6 +3533,12 @@ dependencies = [
"byteorder",
]
[[package]]
name = "hashbrown"
version = "0.14.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1"
[[package]]
name = "hashbrown"
version = "0.15.5"
@@ -3853,6 +3949,25 @@ dependencies = [
"leaky-cow",
]
[[package]]
name = "is-docker"
version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "928bae27f42bc99b60d9ac7334e3a21d10ad8f1835a4e12ec3ec0464765ed1b3"
dependencies = [
"once_cell",
]
[[package]]
name = "is-wsl"
version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "173609498df190136aa7dea1a91db051746d339e18476eed5ca40521f02d7aa5"
dependencies = [
"is-docker",
"once_cell",
]
[[package]]
name = "is_terminal_polyfill"
version = "1.70.2"
@@ -5255,6 +5370,16 @@ dependencies = [
"zvariant",
]
[[package]]
name = "open"
version = "5.4.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "aa576c76302b7b808eecc68061e67336c47833ef9d22caa74dda10fa9675eebc"
dependencies = [
"is-wsl",
"libc",
]
[[package]]
name = "option-ext"
version = "0.2.0"
@@ -6385,6 +6510,12 @@ dependencies = [
"syn 3.0.6",
]
[[package]]
name = "scoped-tls"
version = "1.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e1cf6437eb19a8f4a6cc0f7dca544973b0b78843adbfeb3683d1a94a0024a294"
[[package]]
name = "scopeguard"
version = "1.2.0"
@@ -7312,6 +7443,15 @@ dependencies = [
"time-core",
]
[[package]]
name = "tiny-keccak"
version = "2.0.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2c9d3793400a45f954c52e73d068316d76b6f4e36977e3fcebb13a2721e80237"
dependencies = [
"crunchy",
]
[[package]]
name = "tiny-skia"
version = "0.11.4"
@@ -7938,6 +8078,93 @@ dependencies = [
"web-sys",
]
[[package]]
name = "wayland-backend"
version = "0.3.17"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "38a91b4eaddff87b1cd1074985e3713da4af2c49742d1b356b2c01670a67a078"
dependencies = [
"cc",
"downcast-rs",
"log",
"rustix",
"scoped-tls",
"smallvec",
"wayland-sys",
]
[[package]]
name = "wayland-client"
version = "0.31.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e3c36a0f861ad76d0901f2800b46321410d9f73f2ea88aac0650d86c32688073"
dependencies = [
"bitflags 2.13.2",
"rustix",
"wayland-backend",
"wayland-scanner",
]
[[package]]
name = "wayland-cursor"
version = "0.31.14"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4a52d18780be9b1314328a3de5f930b73d2200112e3849ca6cb11822793fb34d"
dependencies = [
"rustix",
"wayland-client",
"xcursor",
]
[[package]]
name = "wayland-protocols"
version = "0.32.13"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "23d0c813de3daa2ed6520af85a3bd49b0e722a3078506899aa9686fea58dc4b6"
dependencies = [
"bitflags 2.13.2",
"wayland-backend",
"wayland-client",
"wayland-scanner",
]
[[package]]
name = "wayland-protocols-plasma"
version = "0.3.12"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2b6d8cf1eb2c1c31ed1f5643c88a6e53538129d4af80030c8cabd1f9fa884d91"
dependencies = [
"bitflags 2.13.2",
"wayland-backend",
"wayland-client",
"wayland-protocols",
"wayland-scanner",
]
[[package]]
name = "wayland-protocols-wlr"
version = "0.3.12"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "eb04e52f7836d7c7976c78ca0250d61e33873c34156a2a1fc9474828ec268234"
dependencies = [
"bitflags 2.13.2",
"wayland-backend",
"wayland-client",
"wayland-protocols",
"wayland-scanner",
]
[[package]]
name = "wayland-scanner"
version = "0.31.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "338e30461b3a2b67d70eb30a6d89f8e0c93a833e07d2ae89085cd070c4a00ac0"
dependencies = [
"proc-macro2",
"quick-xml",
"quote",
]
[[package]]
name = "wayland-sys"
version = "0.31.11"
@@ -8933,9 +9160,12 @@ version = "0.13.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9993aa5be5a26815fe2c3eacfc1fde061fc1a1f094bf1ad2a18bf9c495dd7414"
dependencies = [
"as-raw-xcb-connection",
"gethostname",
"libc",
"rustix",
"x11rb-protocol",
"xcursor",
]
[[package]]
@@ -8966,6 +9196,48 @@ dependencies = [
"x11",
]
[[package]]
name = "xcursor"
version = "0.3.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "163b33ed8786455e2fa5d72f554057ce3f3182425434f756cd39c99839d88e23"
[[package]]
name = "xim-ctext"
version = "0.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2ac61a7062c40f3c37b6e82eeeef835d5cc7824b632a72784a89b3963c33284c"
dependencies = [
"encoding_rs",
]
[[package]]
name = "xim-parser"
version = "0.2.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5dcee45f89572d5a65180af3a84e7ddb24f5ea690a6d3aa9de231281544dd7b7"
dependencies = [
"bitflags 2.13.2",
]
[[package]]
name = "xkbcommon"
version = "0.8.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8d66ca9352cbd4eecbbc40871d8a11b4ac8107cfc528a6e14d7c19c69d0e1ac9"
dependencies = [
"as-raw-xcb-connection",
"libc",
"memmap2",
"xkeysym",
]
[[package]]
name = "xkeysym"
version = "0.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b9cc00251562a284751c9973bace760d86c0276c471b4be569fe6b068ee97a56"
[[package]]
name = "xml-rs"
version = "0.8.29"
@@ -9177,6 +9449,20 @@ dependencies = [
"xcb",
]
[[package]]
name = "zed-xim"
version = "0.4.0-zed"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0c0b46ed118eba34d9ba53d94ddc0b665e0e06a2cf874cfa2dd5dec278148642"
dependencies = [
"ahash",
"hashbrown 0.14.5",
"log",
"x11rb",
"xim-ctext",
"xim-parser",
]
[[package]]
name = "zeno"
version = "0.3.3"
+1 -1
View File
@@ -22,7 +22,7 @@ dunce = "1"
ely-gpui-component = { git = "https://git.zacharyzhang.com/ZacharyZhang-NY/Ely-GPUI-Components", rev = "bd014707fd47cd9d0651a9af8c1db6033718a6ea" }
env_logger = "0.11"
gpui = { package = "gpui-pre", version = "=0.3.8", default-features = false, features = ["stacker"] }
gpui_platform = { package = "gpui-pre-platform", version = "=0.3.8", features = ["font-kit"] }
gpui_platform = { package = "gpui-pre-platform", version = "=0.3.8", features = ["font-kit", "wayland", "x11"] }
futures = "0.3"
libc = "0.2"
log = "0.4"
+19 -2
View File
@@ -131,6 +131,17 @@ scripts/review.sh ID 轮次 路径 审查一条任务
scripts/apply-lo-patches.sh engines/lo-src 找出源码已到补丁序列第几个,补上其余(构建脚本调用)
tests/scripts/lo-patches.sh 补丁序列从中途接着打、再打一次为空操作
tests/scripts/media-targets.sh 媒体播放接口在 Linux、Windows 目标可编译(缺目标时 SKIP)
tests/scripts/linux-idle.sh 真窗口 ElyTree:打开仓库后、Omarchy 换主题与改设置后,空闲时不读主题、设置,不跑 git status;照样跟随换主题、改设置与改文件,经内存映射的写入也跟随
tests/scripts/linux-backends.sh Linux 构建带 Wayland 与 X11;Hyprland 上 ElyTree 在两者上都映射出窗口、画出页面与起始页文字(截窗口量色,tesseract 读字)
packaging/linux/container.sh 命令 在 Ubuntu 26.04 镜像里运行(引擎、应用、打包;目标在 target/ubuntu)
tests/scripts/linux-glibc.sh Linux 的应用、worker 与引擎要求的 glibc 不高于 2.43
packaging/linux/package.sh 应用 出该应用的 AppImage、deb、rpm 与 Arch 包到 dist/(在容器里运行)
packaging/source.sh dist 本提交的源码包与随包的 copyleft 上游源码(打过补丁的 MuPDF、Git),文件名带提交号;工作区有未提交改动即拒绝(macOS 的 release.sh 与 CI 的 Windows、Linux 调用)
tests/scripts/linux-packages.sh deb、rpm、Arch 包在干净的 Ubuntu 26.04、Fedora 44、Arch 容器里装上,每个 ELF 都找得到库
tests/scripts/linux-pins.sh Linux 打包工具(appimagetool、linuxdeploy、运行时、nfpm)的下载与钉的散列相符
tests/scripts/linux-installed.sh installed|appimage Hyprland 上装好的六个应用或 AppImage:一个窗口、随 Omarchy(Catppuccin)、读出页面文字(PDF、Markdown 经各自引擎),ElyTree 随换主题到 Latte(grim 按窗口截取)
tests/scripts/linux-mark-idle.sh 真窗口 ElyMark:启动后、换主题、改设置、外部改文件(窗口显示新文字)后,空闲时不读主题、设置与文件
tests/scripts/linux-distros.sh deb 在 Ubuntu 26.04、rpm 在 Fedora 44 容器里装上,各应用在 Xvfb(Mesa 软件 Vulkan)下画出窗口、随 Omarchy、读出页面文字(与 linux-installed.sh 共用 linux-common.sh)
cargo test -p ely-show --test compose 切换半程帧经 Metal 取像素(主线程,仅 macOS)
tests/scripts/*.sh *.py 脚本测试(缺工具时报 SKIP)
packaging/macos/bundle.sh ely-doc debug 出 dist/ElyDoc.app(带图标、文档类型与该应用的引擎)
@@ -283,12 +294,18 @@ cargo run -p ely-doc 启动一个应用(ElyDoc 先 cargo build -p ely
- 2026-10-09:每个应用只跑一份(缺陷清单 X-03)。`ely_ui::run` 在写日志之前取应用数据目录的 `instance.lock`(`ely_platform::instance::hold`;Unix 为 fcntl 记录锁,进程结束即放,被拒时以 `F_GETLK` 向系统问出持锁的进程号,不另存进程号文件,同时启动的几份也报得准;Windows 为 LockFileEx,不报进程号);已有一份在跑时第二份不启动,报“已在运行(进程号)”。原先第二份启动即清空第一份的工作目录、把它的恢复点当作干净结束删掉、改写崩溃锁。macOS 经访达打开文件本就交给运行中的那份;`open -n` 与 Linux 每文件一个进程时第二份被拒,文件须在已开的窗口里打开(未做转交)。`tests/scripts/one-instance.sh` 核对。
- 2026-10-10:ElyMark 的链接(M-05,我定,同常见编辑器):可视模式单击链接是编辑,Cmd 单击(Windows、Linux 为 Ctrl)交应用;预览单击即交应用;应用照 ElyPDF:http、https、mailto 交系统打开,其余提示拒绝。
- 2026-10-10:Windows 与 Linux 的构建环境(E-01)。Windows:MSVC(VS 2022,v143);MuPDF 由 `build-mupdf.sh` 以 MSBuild 编上游 `platform/win32` 的 `libmupdf`(静态运行库 /MT,同 Rust 的 `crt-static`;`HAVE_LIBCRYPTO`,`libmupdf.lib` 内含第三方、Tesseract 与 PKCS#7);静态 OpenSSL 取自钉在 2026.07.29 的 vcpkg(`engines/vcpkg`,`openssl:x64-windows-static`);Git 为 Git for Windows 的 MinGit 2.56.0(钉散列,`engines/git/cmd/git.exe`,LFS 在 `ucrt64/libexec/git-core`);CEF 照 cef-dll-sys 放在可执行文件旁(Windows、Linux 都是),不另载入;`%TEMP%` 下的程序被系统的应用控制拦下,构建与探针都不放那里;cmake 与 ninja 须在 PATH;LibreOffice 的 configure 只认 VS 自带的 CMake(组件 `VC.CMake.Project`)。仓库与 `reference/` 一律 LF(`core.autocrlf false`、`core.eol lf`;`fetch-references.sh` 对每个上游照设)。Linux:WSL 的 Ubuntu 26.04;静态 libcrypto 另需其 pkg-config 列出的库(jitterentropy、zstd、z)。LibreOffice 在 Linux 照 Collabora 的 LOKit 配置构建(无图形后端、cairo RGBA、自带各库)。
- 2026-10-10:Windows 与 Linux 的内核与 worker(W-01、K-01,用户定:0.1.3 先三端发布)。内核只认合并库(`ffi::KERNEL`:`libmergedlo.dylib`、`libmergedlo.so`、`mergedlo.dll`;`sofficeapp` 在合并构建里是文本占位);Windows 载入时一并搜索该 DLL 所在的 `program/`。查找次序照旧,Windows 与 Linux 的包内位置是应用旁的 `libreoffice/program`,开发构建为 `engines/lo-src/instdir/program`。worker 的主循环:macOS 照旧以 GCD;Linux 以 unipoll,`runLoop` 的轮询回调里每次答一个请求,内核的唤醒回调往同一队列放信号(`worker/unipoll.rs`;回调的数据指针须非空,VCL 见空即不调用);Windows 也以 unipoll:LOK 不另起主线程,worker 的主线程跑 `runLoop`(Windows 的消息循环),请求经只收消息的窗口投到这条线程上执行(`worker/messages.rs`),同 macOS 的 GCD;原先 LOK 自起主线程、worker 在另一线程作答,载入表格即死锁。Windows 的循环不调轮询回调,但须传非空的回调,`isUnipoll` 只看它。补丁 `0043-lok-callbacks-flush-inline-everywhere.patch`:回调队列在各平台都即时冲出(原只 macOS),否则请求里等的命令结果与状态要等下一轮主循环才到。`0042-svx-boost-json-needs-no-library.patch`:svxcore 与 sd 定义 `BOOST_ALL_NO_LIB`,MSVC 不再按 Boost 的自动链接索要 `libboost_json`、`libboost_container`。Linux 的内核以 cairo 画图块(worker 设 `SAL_DISABLESKIA`;构建去掉 `--enable-cairo-rgba`,自带的 cairo 要清掉重建),字节为 BGRA,同 macOS 与 Windows;`getTileMode` 只看 cairo 开关,不可信。worker 启动核对在三端都画一段红字,按 BGRA 找不到红色即拒绝。`scripts/apply-lo-patches.sh` 的临时库设 `core.autocrlf false`(Windows 默认转换使任何前缀都对不上)。Windows 的 LibreOffice 在 Cygwin 下构建(`build-libreoffice.sh` 的 CYGWIN 分支:去掉 Unix 专用开关,加 VS 2022,用 `/opt/lo/bin` 的 make,清掉 Git Bash 带进来的 `MSYSTEM`);构建目录与 Cygwin 排除在 Defender 扫描之外(否则并行 configure 删不掉 `conftest.dir`)。英文词典扩展里的 Lightproof(Python 写的语法检查)在构建后删去:macOS 与 Linux 的内核不带 Python,它本不生效;Windows 必带内置 Python(Cygwin 下 configure 不许去掉),第二次用同一配置启动时初始化它,worker 挂起。worker 以 `SAL_NOLOCK_PROFILE` 运行,`ely.xcd` 关掉 LibreOffice 的文档锁(`Common/Misc/UseLocking`):被强杀的 worker 留下的锁会让下次启动或载入弹出交互而挂起;每个应用只有一个 worker 用自己的配置,冲突由 Ely 自己核对。三端发布(CI-01):`.gitea/workflows/release.yml` 在打标签时于三台运行器上执行 `scripts/ci.sh`:macOS 在 Mac mini 的常驻克隆里按需从零构建引擎,Windows 在本机运行器上把 `engines` 与 `reference` 接到开发克隆,Linux 由同一台 Windows 运行器经 WSL 构建(服务器上的 Linux 运行器是一次性容器,建不了内核);各自打包后上传到该标签的发布。Windows 为 NSIS 安装程序,Linux 为 AppImage,都由 `packaging/stage.sh` 分装引擎;更新清单只含 macOS(Windows 与 Linux 的自动安装未做)。
- 2026-10-10:Windows 与 Linux 的内核与 worker(W-01、K-01,用户定:0.1.3 先三端发布)。内核只认合并库(`ffi::KERNEL`:`libmergedlo.dylib`、`libmergedlo.so`、`mergedlo.dll`;`sofficeapp` 在合并构建里是文本占位);Windows 载入时一并搜索该 DLL 所在的 `program/`。查找次序照旧,Windows 与 Linux 的包内位置是应用旁的 `libreoffice/program`,开发构建为 `engines/lo-src/instdir/program`。worker 的主循环:macOS 照旧以 GCD;Linux 以 unipoll,`runLoop` 的轮询回调里每次答一个请求,内核的唤醒回调往同一队列放信号(`worker/unipoll.rs`;回调的数据指针须非空,VCL 见空即不调用);Windows 也以 unipoll:LOK 不另起主线程,worker 的主线程跑 `runLoop`(Windows 的消息循环),请求经只收消息的窗口投到这条线程上执行(`worker/messages.rs`),同 macOS 的 GCD;原先 LOK 自起主线程、worker 在另一线程作答,载入表格即死锁。Windows 的循环不调轮询回调,但须传非空的回调,`isUnipoll` 只看它。补丁 `0043-lok-callbacks-flush-inline-everywhere.patch`:回调队列在各平台都即时冲出(原只 macOS),否则请求里等的命令结果与状态要等下一轮主循环才到。`0042-svx-boost-json-needs-no-library.patch`:svxcore 与 sd 定义 `BOOST_ALL_NO_LIB`,MSVC 不再按 Boost 的自动链接索要 `libboost_json`、`libboost_container`。Linux 的内核以 cairo 画图块(worker 设 `SAL_DISABLESKIA`;构建去掉 `--enable-cairo-rgba`,自带的 cairo 要清掉重建),字节为 BGRA,同 macOS 与 Windows;`getTileMode` 只看 cairo 开关,不可信。worker 启动核对在三端都画一段红字,按 BGRA 找不到红色即拒绝。`scripts/apply-lo-patches.sh` 的临时库设 `core.autocrlf false`(Windows 默认转换使任何前缀都对不上)。Windows 的 LibreOffice 在 Cygwin 下构建(`build-libreoffice.sh` 的 CYGWIN 分支:去掉 Unix 专用开关,加 VS 2022,用 `/opt/lo/bin` 的 make,清掉 Git Bash 带进来的 `MSYSTEM`);构建目录与 Cygwin 排除在 Defender 扫描之外(否则并行 configure 删不掉 `conftest.dir`)。英文词典扩展里的 Lightproof(Python 写的语法检查)在构建后删去:macOS 与 Linux 的内核不带 Python,它本不生效;Windows 必带内置 Python(Cygwin 下 configure 不许去掉),第二次用同一配置启动时初始化它,worker 挂起。worker 以 `SAL_NOLOCK_PROFILE` 运行,`ely.xcd` 关掉 LibreOffice 的文档锁(`Common/Misc/UseLocking`):被强杀的 worker 留下的锁会让下次启动或载入弹出交互而挂起;每个应用只有一个 worker 用自己的配置,冲突由 Ely 自己核对。三端发布(CI-01):`.gitea/workflows/release.yml` 在打标签时于三台运行器上执行 `scripts/ci.sh`:macOS 在 Mac mini 的常驻克隆里按需从零构建引擎,Windows 在本机运行器上把 `engines` 与 `reference` 接到开发克隆,Linux 由同一台 Windows 运行器经 WSL 构建(服务器上的 Linux 运行器是一次性容器,建不了内核);各自打包后上传到该标签的发布。Windows 为 NSIS 安装程序,Linux 为 AppImage、deb、rpm 与 Arch 包(引擎构建与打包都经 `packaging/linux/container.sh` 进 Ubuntu 26.04 容器,WSL 里须有 docker;`ELY_SHARE` 的目录一并挂进容器),都由 `packaging/stage.sh` 分装引擎;每个平台都上传本提交的源码包(`packaging/source.sh`);更新清单只含 macOS(Windows 与 Linux 的自动安装未做)。
- 2026-10-11:gpui 的 Windows 窗口关闭(W-03 冒烟查出)。`gpui-pre-windows` 0.3.8 在窗口关闭时报三条错:系统已销毁窗口(ElyTree 的关窗交给系统)后 Drop 仍对旧句柄 `RevokeDragDrop` 与 `DestroyWindow`(拖放处理器因此不释放,连带窗口状态);销毁时的失活回报排在异步任务里,执行时窗口已移除(“window not found”);退出后后台任务向已销毁的平台窗口投递(`Invalid window handle`)。修复在 `vendor/gpui-pre-windows`:`WM_DESTROY` 时记下已销毁、在句柄仍有效时撤销拖放、去掉失活回调,Drop 见已销毁即不再动句柄;平台窗口已不在时投递失败只记 debug(应用已退出),其余投递失败照报。三个应用关窗与退出的日志无错。
- 2026-10-11(用户报:Windows 启动带黑色命令行窗口、“打开方式”里无图标、点 X 不退出、表格全黑无网格线):四处根因。命令行窗口:应用是控制台子系统;发行构建改为 `windows_subsystem = "windows"`(开发构建照旧有控制台看日志),子进程(两个 worker、Git、`cmd start`)一律经 `ely_ipc::windowless` 以 `CREATE_NO_WINDOW` 启动。图标:exe 里只有 gpui 的清单资源;各应用共用构建脚本 `packaging/windows/icon.rs`,把 `assets/icons/<应用>.ico` 编成资源 1(gpui 的窗口图标也取资源 1)。点 X 不退出:窗口其实弹了“保存更改”询问。`ely.xcd` 深色方案的 `CalcNotesBackground` 与浅色不同,Calc 在配色变化时改写批注样式并记一步撤销(`ScDetectiveFunc::UpdateAllComments`),未动的表格切到深色即算已修改;两套方案的批注底色改为同一值(LibreOffice 默认的浅黄),切换主题不再改文档,三端同此(`sheet.rs` 的 `a_theme_switch_is_no_edit`)。全黑:Win32 的虚拟设备没有 `SetSizeUsingBuffer`(基类默认返回假,断言在发行构建里不在),给客户缓冲区的设备停在 1×1 像素,Calc 图块只画了一个像素,放映图层同空;补丁 `0044-lok-win32-paints-then-copies.patch` 让 Windows 走 macOS 的路:按全尺寸画进设备,再拷进客户缓冲区(`doc_paintTile` 与 `SlideshowLayerRenderer`)。Writer 自设设备尺寸,原本不受影响。`tests/scripts/lo-patches.sh` 的临时库也设 `core.autocrlf false`(原先在 Windows 上恒失败)。
- 2026-10-11(用户报:Windows 上标题栏的最小化、最大化、关闭三个按钮都按不动):gpui 回答系统的命中测试(`WM_NCHITTEST`)时按绘制次序取第一个含指针的窗口控制区,标题栏的拖动区先于其中的按钮画出,按钮上一律答“标题栏”,系统把按下当作拖动窗口的开始,点击到不了按钮。修复在 `vendor/gpui-pre`(原样一个提交,其后是修复):按命中测试的次序取最上层的控制区,且只看未被遮挡的部分(同 `is_hovered`,盖在标题栏上的对话框挡住其下的按钮)。实测(发行构建,DPI 感知的探针移动真实指针):自右向左依次答关闭、最大化、最小化、拖动;按下最小化即最小化,最大化即最大化,关闭即退出、worker 随之结束;v0.1.3 的安装版同一探针处处答拖动。该回调只有 Windows 平台调用。
- 2026-10-11:Linux 标题栏按钮(核查 Windows 按钮问题时查出)。macOS 的红绿灯由系统画,不受影响;Linux 为客户端装饰,按钮由组件库画在标题栏的拖动区里,拖动区对任何按下都准备移动窗口,按住按钮时指针动一像素即开始移动窗口,合成器接管指针,松开到不了按钮,点击落空。组件库 3eb4d34:`drag_region` 只在按下未被里面的按钮认领(按钮以 `prevent_default` 认领)时才准备移动;`shell/title_tests.rs` 核对晃动的按下点得动 Linux 的关闭、标题栏空处照样移动窗口(去掉修复时前者失败)。未在真 Linux 桌面上点过。
- 2026-10-11(用户报:ElyTree 改动列表里文件名长时盖住行尾的打开按钮):组件库 bd01470:`ChangesList` 行里的文件名原为不缩的盒子,长名越过行宽压在按钮下;现可缩、以省略号结尾,先于按钮让位;`git/tests/narrow.rs` 核对 260 宽时文件名止于按钮之前(原布局时失败)。
- 2026-10-11(用户定:ElyTree 状态栏去掉 Git 的版本与路径那一项):所用 Git 的版本与路径只记日志。同时查出 Windows 上 `std::fs::canonicalize` 给出 `\\?\C:\…` 形式,仓库根、Git 目录、工作树与文件的真实路径一律改用 `dunce::canonicalize`(能写成普通路径即普通路径,同一文件仍是同一真实路径),状态栏的仓库路径随之为普通形式;ElyTree 的单测在 Windows 上由 44 个失败降到 8 个,余下 8 个改前同样失败(如写入 Windows 不许的文件名),未处理。
- 2026-10-11:ElyMark 的 AppImage(0.1.3 的 Linux 发布查出)。`linuxdeploy` 把可执行文件的 RUNPATH 改成 `$ORIGIN/../lib`,并把它找得到的 `libcef.so` 拷进 `usr/lib`:原先 `libcef.so` 与 CEF 的资料在 `usr/bin`,结果是两份 1.45 GB 的内核、程序载入 `usr/lib` 那份、CEF 在它旁边找不到 ICU 数据而退出(从未在 AppImage 里启动过)。现在 `appimage.sh` 把从 `engines/cef` 分装来的全部条目移进 `usr/lib`(按名字对照 CEF 文件夹,清单仍只在 `stage.sh`),以 `LD_LIBRARY_PATH=AppDir/usr/lib` 运行 `linuxdeploy`,`libcef.so` 只此一份、依赖照样带上,CEF 按所载 `libcef.so` 的文件夹取资料(`ely-web-content` 的 `open`)。ElyMark 的 AppImage 由 715 MB 降到 423 MB;WSL 里启动后 CEF 载入、窗口打开(WSL 里各应用都不出首帧,未在真桌面上验证)。
- 2026-10-11:ElyMark 的 AppImage(0.1.3 的 Linux 发布查出)。`linuxdeploy` 把可执行文件的 RUNPATH 改成 `$ORIGIN/../lib`,并把它找得到的 `libcef.so` 拷进 `usr/lib`:原先 `libcef.so` 与 CEF 的资料在 `usr/bin`,结果是两份 1.45 GB 的内核、程序载入 `usr/lib` 那份、CEF 在它旁边找不到 ICU 数据而退出(从未在 AppImage 里启动过)。现在 `package.sh` 把从 `engines/cef` 分装来的全部条目移进 `usr/lib`(按名字对照 CEF 文件夹,清单仍只在 `stage.sh`),以 `LD_LIBRARY_PATH=AppDir/usr/lib` 运行 `linuxdeploy`,`libcef.so` 只此一份、依赖照样带上,CEF 按所载 `libcef.so` 的文件夹取资料(`ely-web-content` 的 `open`)。ElyMark 的 AppImage 由 715 MB 降到 423 MB;WSL 里启动后 CEF 载入、窗口打开(WSL 里各应用都不出首帧,未在真桌面上验证)。
- 2026-10-09(用户定):代码与发布从 GitHub 搬到自建的 Gitea(git.zacharyzhang.com;GitHub 账号被封,推送与发布都被拒)。公开仓库 `ZacharyZhang-NY/ElyOffice`(原样推上 main、缺陷清单分支与 v0.1.0、v0.1.1 标签),组件库为同站的 `ZacharyZhang-NY/Ely-GPUI-Components`(Cargo 的 git 依赖与 `fetch-references.sh` 随之改址,钉的提交不变)。v0.1.1 的六个 dmg 与两个源码包重新发在 Gitea 的 v0.1.1 发布里。官网的下载与源码链接指向 Gitea(`releases/latest` 会跳到最新发布页)。`.github/workflows` 删去(它们靠 GitHub 的 macOS 机器与 `gh`,发布改在本机以 `packaging/macos/release.sh` 构建、经 Gitea API 上传)。发布视频里写的地址已在源文件改为 Gitea,已发布的成片仍是旧地址,重渲染后才更新。上游项目(LibreOffice、MuPDF、git-lfs、tessdata 等)照旧从它们自己的 GitHub 地址取。
- 2026-10-11(用户报:Omarchy 上六个 AppImage 都打不开):`gpui-pre-platform` 对 `gpui-pre-linux` 关了默认特性,Wayland 与 X11 只经它自己的 `wayland`、`x11` 特性打开;工作区原只开 `font-kit`,Linux 上 gpui 退成无头平台,日志照写“window open”,合成器里从无窗口。工作区的 `gpui_platform` 加开两者;`tests/scripts/linux-backends.sh` 核对特性,在 Hyprland 上核对 Wayland 与 X11 两路都映射出窗口、截图里有均匀的深色页面,tesseract 读出起始页的 “Open a repository”(不交缓冲的窗口 Hyprland 不映射;不画字形时读不出)。
- 2026-10-11:Linux 的 inotify 把打开文件报成事件(notify 的 `Access`),macOS 的 FSEvents 不报;四处文件监视原把任何事件当作改动,重读本身又触发下一次:Omarchy 主题与通用设置在第一次改动后、ElyTree 打开仓库起(`git status` 读仓库),空闲时每 250 毫秒重读。四处都经 `ely_ui::watching::only_read` 略去读取(打开、读、只读关闭),写后关闭照算改动(经内存映射的写入只报 CLOSE_WRITE,不报 MODIFY);`tests/scripts/linux-idle.sh` 以 inotifywait 从外面数空闲时的读取与 git status 次数。
- 2026-10-11(用户定):Linux 的引擎、应用与包都在 `ubuntu:26.04` 容器里构建(`packaging/linux/Dockerfile`,钉摘要;glibc 2.43),不在本机(Arch 的 glibc 更新,建出的程序在 Ubuntu 上起不来)。`packaging/linux/container.sh` 以本人身份运行,Cargo 的目标与家目录另放 `target/ubuntu*`;`stage.sh` 取 `CARGO_TARGET_DIR`;Git 2.56 用自己的 `target/` 链接其 Rust 部分,`build-git.sh` 为它去掉该变量。`tests/scripts/linux-glibc.sh` 核对每个动态链接的 ELF(静态的 git-lfs 不算)。
- 2026-10-11(用户要求:Linux 不只 AppImage):`packaging/linux/package.sh` 由同一个 AppDir 出四种包:AppImage,以及经 nfpm v2.47.0(钉散列)的 deb、rpm、Arch 包。包把 AppDir 的 `usr` 装到 `/opt/ely-office/<应用>`,`/usr/bin/<应用>` 为链接,桌面项与 512 像素图标在 `/usr/share`。依赖由 AppDir 里每个 ELF 所需而未随包的库,加 gpui 按名载入的 Vulkan 与 Wayland 客户端库得出:deb 与 Arch 按 `packaging/linux/depends.tsv` 换成包名(表里没有即打包失败),rpm 直接依赖库名(`libxcb.so.1()(64bit)`)。同级应用多找一处 `/opt/ely-office/<应用>/bin`(ElyMark 打开 ElyTree)。LibreOffice 的 cairo 由 meson 构建,内核直接拷其构建目录的产物,RUNPATH 仍指向构建树里的 pixman 与 fontconfig(别的机器上找不到);`build-libreoffice.sh` 在 Linux 上把指向源码树的 RUNPATH 改为 `$ORIGIN`(patchelf)。
- 2026-10-11:Linux 包的实测(L1.6)。本机(Omarchy,Hyprland 0.56)装上六个 Arch 包与六个 AppImage,`linux-installed.sh` 两种都过;deb、rpm、Arch 包在 Ubuntu 26.04、Fedora 44、Arch 容器里装上、全部 ELF 找得到库;deb 与 rpm 的六个应用在各自容器的 Xvfb 下画出窗口(`linux-distros.sh`)。截图按窗口(`grim -T` 加 Hyprland 的 `stableId`):按区域截时用户切换工作区或别的窗口盖住即截错。ElyMark 的文件监视略去读取后不会自激:重读前先比指纹(长度与修改时间),不打开文件。
- 2026-10-11(用户定:替换 v0.1.3 的 Linux 包):v0.1.3 发布里原有的六个 AppImage(无头,打不开窗口)已删去,换成本机容器里建出的六个应用各四种包(共 24 个),出自 L1.7 的提交(晚于该标签);上传后逐个核对大小,ElyTree 的 AppImage 下载回来散列相同。`package.sh` 把每个 RUNPATH 按所在 ELF 解析(`$ORIGIN` 或 `${ORIGIN}` 开头,规范化后须在 AppDir 内),否则拒绝(如未修正的 cairo):CI 用的是别处建好的引擎,旧构建会在这里报错而不是带进包里。替换的 Linux 包对应的源码随之上传到同一发布(`source.sh`,文件名带构建提交号),发布说明写明 Linux 包出自哪个提交。
+4
View File
@@ -376,6 +376,10 @@ impl Desk {
fn watch(dirs: &[PathBuf], cx: &mut Context<Desk>) -> notify::Result<RecommendedWatcher> {
let (sender, mut changes) = mpsc::unbounded();
let mut watcher = notify::recommended_watcher(move |event: notify::Result<notify::Event>| {
// Reads, ours included, are no change.
if event.as_ref().is_ok_and(|event| ely_ui::watching::only_read(&event.kind)) {
return;
}
let _ = sender.unbounded_send(event.map(|_| ()).map_err(|error| error.to_string()));
})?;
for dir in dirs {
+2
View File
@@ -17,6 +17,8 @@ pub fn start(id: u64, repo: &Repo, cx: &mut Context<Tree>) -> notify::Result<Rec
let root = repo.root.display().to_string();
let mut watcher =
notify::recommended_watcher(move |event: notify::Result<notify::Event>| match event {
// Git's reads, ours included, are no change.
Ok(event) if ely_ui::watching::only_read(&event.kind) => {}
Ok(_) => {
let _ = sender.unbounded_send(());
}
+8
View File
@@ -25,6 +25,10 @@ fn beside(exe: &Path, app: AppId) -> Vec<PathBuf> {
if let Some(suite) = dir.parent() {
places.push(suite.join(app.name()).join(&file));
}
// Linux packages: /opt/ely-office/<slug>/bin.
if let Some(opt) = dir.parent().and_then(Path::parent) {
places.push(opt.join(app.slug()).join("bin").join(&file));
}
places
}
@@ -160,6 +164,10 @@ mod tests {
assert!(places.contains(&PathBuf::from(format!(
"/Ely Office/ElyMark/ely-mark{suffix}"
))));
let places = super::beside(Path::new("/opt/ely-office/ely-tree/bin/ely-tree"), AppId::Mark);
assert!(places.contains(&PathBuf::from(format!(
"/opt/ely-office/ely-mark/bin/ely-mark{suffix}"
))));
}
}
+1
View File
@@ -7,6 +7,7 @@ mod shell;
pub mod tasks;
mod theme;
pub mod updates;
pub mod watching;
pub use opening::{launch_files, on_open};
pub use run::run;
+2
View File
@@ -82,6 +82,8 @@ fn follow(cx: &mut App) -> std::io::Result<()> {
std::fs::create_dir_all(&dir)?;
let (sender, mut changes) = mpsc::unbounded();
let mut watcher = notify::recommended_watcher(move |event: notify::Result<notify::Event>| match event {
// Reads, ours included, are no change.
Ok(event) if crate::watching::only_read(&event.kind) => {}
Ok(event) if event.paths.iter().any(|changed| changed.file_name() == path.file_name()) => {
let _ = sender.unbounded_send(());
}
+5
View File
@@ -41,6 +41,11 @@ fn each_app_shows_its_own_sections(cx: &mut TestAppContext) {
(AppId::Tree, &["general", "git", "storage", "diagnostics"]),
(AppId::Mark, &["general", "storage", "diagnostics"]),
] {
// As each app does before its first window.
cx.update(|cx| {
let menus = crate::commands::menus(app, &crate::commands::OPENING, false, Vec::new(), cx);
cx.set_menus(menus);
});
let window = cx.add_window(|window, cx| SettingsView::new(app, window, cx));
let shown = window
.update(cx, |view, _, cx| view.sections(cx).into_iter().map(|(key, ..)| key).collect::<Vec<_>>())
+8 -3
View File
@@ -29,9 +29,12 @@ pub fn load(current: &Path) -> Result<Option<OmarchyTheme>> {
Err(error) if error.kind() == io::ErrorKind::NotFound => return Ok(None),
Err(error) => return Err(error).with_context(|| format!("cannot read {}", file.display())),
};
let name = fs::read_to_string(current.join("theme.name"))
.ok()
.map(|name| name.trim().to_string());
let name_file = current.join("theme.name");
let name = match fs::read_to_string(&name_file) {
Ok(name) => Some(name.trim().to_string()),
Err(error) if error.kind() == io::ErrorKind::NotFound => None,
Err(error) => return Err(error).with_context(|| format!("cannot read {}", name_file.display())),
};
parse(&text, name, theme.join("light.mode").exists())
.with_context(|| format!("{} is not a usable theme", file.display()))
.map(Some)
@@ -53,6 +56,8 @@ pub fn changes(current: &Path) -> Result<(RecommendedWatcher, UnboundedReceiver<
let (sender, receiver) = mpsc::unbounded();
let mut watcher =
notify::recommended_watcher(move |event: notify::Result<notify::Event>| match event {
// Reads, ours included, are no change.
Ok(event) if crate::watching::only_read(&event.kind) => {}
Ok(_) => {
let _ = sender.unbounded_send(());
}
+26
View File
@@ -314,3 +314,29 @@ fn changes_sees_a_theme_swap_in_the_order_omarchy_does_it() {
"no event for a swapped theme"
);
}
#[test]
fn reading_the_theme_is_no_change() {
let current = tempfile::tempdir().unwrap();
let theme_dir = current.path().join("theme");
fs::create_dir(&theme_dir).unwrap();
fs::write(theme_dir.join("colors.toml"), LATTE).unwrap();
fs::write(current.path().join("theme.name"), "catppuccin-latte\n").unwrap();
let (_watcher, mut events) = changes(current.path()).unwrap();
load(current.path()).unwrap().expect("a theme");
assert!(!event_within(&mut events, 10), "a read counted as a change");
}
#[test]
fn an_unreadable_theme_name_is_an_error_and_a_missing_one_is_none() {
let current = tempfile::tempdir().unwrap();
let theme_dir = current.path().join("theme");
fs::create_dir(&theme_dir).unwrap();
fs::write(theme_dir.join("colors.toml"), LATTE).unwrap();
assert_eq!(load(current.path()).unwrap().unwrap().name, None);
fs::create_dir(current.path().join("theme.name")).unwrap();
let error = format!("{:#}", load(current.path()).unwrap_err());
assert!(error.contains("theme.name"), "{error}");
}
+29
View File
@@ -0,0 +1,29 @@
use notify::EventKind;
use notify::event::{AccessKind, AccessMode};
/// A read; Linux reports those, macOS does not.
pub fn only_read(kind: &EventKind) -> bool {
matches!(kind, EventKind::Access(access) if *access != AccessKind::Close(AccessMode::Write))
}
#[cfg(test)]
mod tests {
use notify::EventKind;
use notify::event::{AccessKind, AccessMode, DataChange, ModifyKind};
use super::only_read;
#[test]
fn opens_and_reads_are_reads_and_a_written_close_is_a_change() {
for read in [
AccessKind::Open(AccessMode::Any),
AccessKind::Read,
AccessKind::Close(AccessMode::Read),
AccessKind::Any,
] {
assert!(only_read(&EventKind::Access(read)), "{read:?}");
}
assert!(!only_read(&EventKind::Access(AccessKind::Close(AccessMode::Write))));
assert!(!only_read(&EventKind::Modify(ModifyKind::Data(DataChange::Any))));
}
}
+20
View File
@@ -0,0 +1,20 @@
# Linux builds on glibc 2.43 run on Ubuntu 26.04 onward.
FROM ubuntu:26.04@sha256:f144425ff09be612d6d9ad965196e9cdc23dae1f42110a8a11a3e9a8198759f7
ENV DEBIAN_FRONTEND=noninteractive
RUN sed -i 's/^Types: deb$/Types: deb deb-src/' /etc/apt/sources.list.d/ubuntu.sources \
&& apt-get update \
&& apt-get build-dep -y libreoffice \
&& rm -rf /var/lib/apt/lists/*
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
curl ca-certificates git rsync patch patchelf file jq python3 nodejs npm rustup \
cmake ninja-build pkg-config nasm \
libssl-dev libjitterentropy3-dev libzstd-dev zlib1g-dev \
libxkbcommon-dev libxkbcommon-x11-dev libwayland-dev libx11-xcb-dev libxcb1-dev libfontconfig-dev \
&& rm -rf /var/lib/apt/lists/*
ENV RUSTUP_HOME=/opt/rustup
# As rust-toolchain.toml pins it.
RUN rustup toolchain install 1.96.0 --profile minimal --component rustfmt,clippy \
&& rustup default 1.96.0 \
&& chmod -R a+rX /opt/rustup
-110
View File
@@ -1,110 +0,0 @@
#!/usr/bin/env bash
# Builds dist/<Name>-<version>-linux-<arch>.AppImage. Usage: appimage.sh [--desktop] <slug>
set -euo pipefail
root=$(cd "$(dirname "$0")/../.." && pwd)
desktop_only=
[ "${1:-}" = --desktop ] && {
desktop_only=1
shift
}
slug=${1:?app slug, such as ely-doc}
dist=${ELY_DIST:-$root/dist}
row=$(awk -F'\t' -v slug="$slug" '$1 == slug { print $2 "\t" $3 }' "$root/packaging/apps.tsv")
[ -n "$row" ] || {
echo "appimage.sh: unknown app $slug" >&2
exit 1
}
name=${row%%$'\t'*}
categories=${row##*$'\t'}
# The types it opens, from packaging/types.tsv; none drops the line.
mimes=$(awk -F'\t' -v slug="$slug" '$1 == slug { printf "%s;", $3 }' "$root/packaging/types.tsv")
desktop_entry() {
sed -e "s/@NAME@/$name/" -e "s/@SLUG@/$slug/g" -e "s/@CATEGORIES@/$categories/" -e "s|@MIME@|$mimes|" \
-e '/^MimeType=$/d' "$root/packaging/linux/app.desktop.in"
}
if [ -n "$desktop_only" ]; then
desktop_entry
exit 0
fi
[ "$(uname)" = Linux ] || {
echo "appimage.sh: Linux only" >&2
exit 1
}
arch=$(uname -m)
case $arch in
x86_64)
pack_sha=ed4ce84f0d9caff66f50bcca6ff6f35aae54ce8135408b3fa33abfc3cb384eb0
deploy_sha=c20cd71e3a4e3b80c3483cef793cda3f4e990aca14014d23c544ca3ce1270b4d
runtime_sha=2fca8b443c92510f1483a883f60061ad09b46b978b2631c807cd873a47ec260d
;;
aarch64)
pack_sha=f0837e7448a0c1e4e650a93bb3e85802546e60654ef287576f46c71c126a9158
deploy_sha=620095110d693282b8ebeb244a95b5e911cf8f65f76c88b4b47d16ae6346fcff
runtime_sha=00cbdfcf917cc6c0ff6d3347d59e0ca1f7f45a6df1a428a0d6d8a78664d87444
;;
*)
echo "appimage.sh: no AppImage tools for $arch" >&2
exit 1
;;
esac
icon=$root/assets/icons/$slug.png
[ -f "$icon" ] || {
echo "appimage.sh: $icon is missing; the icons are not designed yet" >&2
exit 1
}
fetch_tool() { # file url sha256
if [ ! -f "$1" ]; then
mkdir -p "$root/engines"
curl -fsSL -o "$1" "$2"
fi
echo "$3 $1" | sha256sum -c - >/dev/null
chmod +x "$1"
}
pack=$root/engines/appimagetool-1.9.1-$arch.AppImage
deploy=$root/engines/linuxdeploy-1-alpha-20251107-1-$arch.AppImage
runtime=$root/engines/type2-runtime-20251108-$arch
fetch_tool "$pack" "https://github.com/AppImage/appimagetool/releases/download/1.9.1/appimagetool-$arch.AppImage" "$pack_sha"
fetch_tool "$deploy" "https://github.com/linuxdeploy/linuxdeploy/releases/download/1-alpha-20251107-1/linuxdeploy-$arch.AppImage" "$deploy_sha"
fetch_tool "$runtime" "https://github.com/AppImage/type2-runtime/releases/download/20251108/runtime-$arch" "$runtime_sha"
stage=$root/target/stage/$slug
"$root/packaging/stage.sh" "$slug" "$stage"
work=$(mktemp -d)
trap 'rm -rf "$work"' EXIT
desktop_entry >"$work/$slug.desktop"
appdir=$work/$name.AppDir
bin=$appdir/usr/bin
mkdir -p "$bin"
cp -R "$stage"/. "$bin/"
deployed=(--executable "$bin/$slug")
for helper in ely-lok-worker ely-pdf-worker; do
if [ -f "$bin/$helper" ]; then
deployed+=(--executable "$bin/$helper")
fi
done
if [ -f "$bin/libcef.so" ]; then
# Binaries here load from usr/lib; CEF's data sits with libcef.
cef=${ELY_CEF:-$root/engines/cef}
mkdir -p "$appdir/usr/lib"
for item in "$bin"/*; do
if [ -e "$cef/${item##*/}" ]; then
mv "$item" "$appdir/usr/lib/"
fi
done
deployed+=(--library "$appdir/usr/lib/libcef.so")
fi
# linuxdeploy bundles libraries and fails on a missing one.
LD_LIBRARY_PATH=$appdir/usr/lib "$deploy" --appimage-extract-and-run --appdir "$appdir" "${deployed[@]}" \
--desktop-file "$work/$slug.desktop" --icon-file "$icon"
mkdir -p "$dist"
version=$(awk -F'"' '/^version = / { print $2; exit }' "$root/Cargo.toml")
out=$dist/$name-$version-linux-$arch.AppImage
ARCH=$arch "$pack" --appimage-extract-and-run --runtime-file "$runtime" "$appdir" "$out"
echo "$out"
+20
View File
@@ -0,0 +1,20 @@
#!/usr/bin/env bash
# Usage: container.sh <command...>; runs it in Ubuntu 26.04.
set -euo pipefail
root=$(cd "$(dirname "$0")/../.." && pwd)
[ $# -gt 0 ] || {
echo "container.sh: give a command, such as scripts/build-libreoffice.sh" >&2
exit 1
}
image=ely-office-linux-build
docker build -q -t "$image" "$root/packaging/linux" >/dev/null
# Own target and Cargo home: host builds need newer glibc.
mkdir -p "$root/target/ubuntu" "$root/target/ubuntu-cargo" "$root/target/ubuntu-home"
# Engines shared from another clone resolve inside too.
share=()
[ -z "${ELY_SHARE:-}" ] || share=(-v "$ELY_SHARE:$ELY_SHARE")
docker run --rm --user "$(id -u):$(id -g)" -v "$root:$root" ${share[@]+"${share[@]}"} -w "$root" \
-e HOME="$root/target/ubuntu-home" -e CARGO_HOME="$root/target/ubuntu-cargo" \
-e CARGO_TARGET_DIR="$root/target/ubuntu" -e ELY_RELEASE_TOKEN \
"$image" "$@"
+27
View File
@@ -0,0 +1,27 @@
ld-linux-x86-64.so.2 libc6 glibc
ld-linux-aarch64.so.1 libc6 glibc
libc.so.6 libc6 glibc
libm.so.6 libc6 glibc
libdl.so.2 libc6 glibc
libpthread.so.0 libc6 glibc
libresolv.so.2 libc6 glibc
libgcc_s.so.1 libgcc-s1 libgcc
libstdc++.so.6 libstdc++6 libstdc++
libgssapi_krb5.so.2 libgssapi-krb5-2 krb5
libcom_err.so.2 libcom-err2 e2fsprogs
libxcb.so.1 libxcb1 libxcb
libX11.so.6 libx11-6 libx11
libvulkan.so.1 libvulkan1 vulkan-icd-loader
libwayland-client.so.0 libwayland-client0 wayland
libcrypto.so.3 libssl3t64 openssl
libssl.so.3 libssl3t64 openssl
libcurl.so.4 libcurl4t64 curl
libexpat.so.1 libexpat1 expat
libz.so.1 zlib1g zlib
libasound.so.2 libasound2t64 alsa-lib
libfontconfig.so.1 libfontconfig1 fontconfig
libfreetype.so.6 libfreetype6 freetype2
libfribidi.so.0 libfribidi0 fribidi
libgbm.so.1 libgbm1 mesa
libgmp.so.10 libgmp10 gmp
libharfbuzz.so.0 libharfbuzz0b harfbuzz
1 ld-linux-x86-64.so.2 libc6 glibc
2 ld-linux-aarch64.so.1 libc6 glibc
3 libc.so.6 libc6 glibc
4 libm.so.6 libc6 glibc
5 libdl.so.2 libc6 glibc
6 libpthread.so.0 libc6 glibc
7 libresolv.so.2 libc6 glibc
8 libgcc_s.so.1 libgcc-s1 libgcc
9 libstdc++.so.6 libstdc++6 libstdc++
10 libgssapi_krb5.so.2 libgssapi-krb5-2 krb5
11 libcom_err.so.2 libcom-err2 e2fsprogs
12 libxcb.so.1 libxcb1 libxcb
13 libX11.so.6 libx11-6 libx11
14 libvulkan.so.1 libvulkan1 vulkan-icd-loader
15 libwayland-client.so.0 libwayland-client0 wayland
16 libcrypto.so.3 libssl3t64 openssl
17 libssl.so.3 libssl3t64 openssl
18 libcurl.so.4 libcurl4t64 curl
19 libexpat.so.1 libexpat1 expat
20 libz.so.1 zlib1g zlib
21 libasound.so.2 libasound2t64 alsa-lib
22 libfontconfig.so.1 libfontconfig1 fontconfig
23 libfreetype.so.6 libfreetype6 freetype2
24 libfribidi.so.0 libfribidi0 fribidi
25 libgbm.so.1 libgbm1 mesa
26 libgmp.so.10 libgmp10 gmp
27 libharfbuzz.so.0 libharfbuzz0b harfbuzz
+232
View File
@@ -0,0 +1,232 @@
#!/usr/bin/env bash
# Usage: package.sh [--desktop] <slug>; AppImage, deb, rpm, Arch.
set -euo pipefail
root=$(cd "$(dirname "$0")/../.." && pwd)
desktop_only=
[ "${1:-}" = --desktop ] && {
desktop_only=1
shift
}
slug=${1:?app slug, such as ely-doc}
dist=${ELY_DIST:-$root/dist}
row=$(awk -F'\t' -v slug="$slug" '$1 == slug { print $2 "\t" $3 }' "$root/packaging/apps.tsv")
[ -n "$row" ] || {
echo "package.sh: unknown app $slug" >&2
exit 1
}
name=${row%%$'\t'*}
categories=${row##*$'\t'}
# The types it opens, from packaging/types.tsv; none drops the line.
mimes=$(awk -F'\t' -v slug="$slug" '$1 == slug && !seen[$3]++ { printf "%s;", $3 }' "$root/packaging/types.tsv")
desktop_entry() {
sed -e "s/@NAME@/$name/" -e "s/@SLUG@/$slug/g" -e "s/@CATEGORIES@/$categories/" -e "s|@MIME@|$mimes|" \
-e '/^MimeType=$/d' "$root/packaging/linux/app.desktop.in"
}
if [ -n "$desktop_only" ]; then
desktop_entry
exit 0
fi
[ "$(uname)" = Linux ] || {
echo "package.sh: Linux only" >&2
exit 1
}
command -v patchelf >/dev/null || {
echo "package.sh: no patchelf; run in packaging/linux/container.sh" >&2
exit 1
}
arch=$(uname -m)
case $arch in
x86_64)
goarch=amd64
nfpm_arch=x86_64
pack_sha=ed4ce84f0d9caff66f50bcca6ff6f35aae54ce8135408b3fa33abfc3cb384eb0
deploy_sha=c20cd71e3a4e3b80c3483cef793cda3f4e990aca14014d23c544ca3ce1270b4d
runtime_sha=2fca8b443c92510f1483a883f60061ad09b46b978b2631c807cd873a47ec260d
nfpm_sha=0660ca602b2d2d2ae4781a06c692b3eeb9d437ffea05b831d76e41f4a3188783
;;
aarch64)
goarch=arm64
nfpm_arch=arm64
pack_sha=f0837e7448a0c1e4e650a93bb3e85802546e60654ef287576f46c71c126a9158
deploy_sha=620095110d693282b8ebeb244a95b5e911cf8f65f76c88b4b47d16ae6346fcff
runtime_sha=00cbdfcf917cc6c0ff6d3347d59e0ca1f7f45a6df1a428a0d6d8a78664d87444
nfpm_sha=1c0f5f2999b9a974bfb04fdb0cc3306096de530ac5dbb25d739cc5f5219c919c
;;
*)
echo "package.sh: no packaging tools for $arch" >&2
exit 1
;;
esac
icon=$root/assets/icons/$slug.png
[ -f "$icon" ] || {
echo "package.sh: $icon is missing" >&2
exit 1
}
fetch_tool() { # file url sha256
if [ ! -f "$1" ]; then
mkdir -p "$root/engines"
curl -fsSL -o "$1" "$2"
fi
echo "$3 $1" | sha256sum -c - >/dev/null
chmod +x "$1"
}
pack=$root/engines/appimagetool-1.9.1-$arch.AppImage
deploy=$root/engines/linuxdeploy-1-alpha-20251107-1-$arch.AppImage
runtime=$root/engines/type2-runtime-20251108-$arch
nfpm_tar=$root/engines/nfpm_2.47.0_Linux_$nfpm_arch.tar.gz
fetch_tool "$pack" "https://github.com/AppImage/appimagetool/releases/download/1.9.1/appimagetool-$arch.AppImage" "$pack_sha"
fetch_tool "$deploy" "https://github.com/linuxdeploy/linuxdeploy/releases/download/1-alpha-20251107-1/linuxdeploy-$arch.AppImage" "$deploy_sha"
fetch_tool "$runtime" "https://github.com/AppImage/type2-runtime/releases/download/20251108/runtime-$arch" "$runtime_sha"
fetch_tool "$nfpm_tar" "https://github.com/goreleaser/nfpm/releases/download/v2.47.0/nfpm_2.47.0_Linux_$nfpm_arch.tar.gz" "$nfpm_sha"
nfpm=$root/engines/nfpm-2.47.0-$arch
if [ ! -x "$nfpm" ]; then
tar -xzf "$nfpm_tar" -O nfpm >"$nfpm.part"
chmod +x "$nfpm.part"
mv "$nfpm.part" "$nfpm"
fi
stage=$root/target/stage/$slug
"$root/packaging/stage.sh" "$slug" "$stage"
work=$root/target/package/$slug
rm -rf "$work"
mkdir -p "$work"
desktop_entry >"$work/$slug.desktop"
appdir=$work/$name.AppDir
bin=$appdir/usr/bin
mkdir -p "$bin"
cp -R "$stage"/. "$bin/"
deployed=(--executable "$bin/$slug")
for helper in ely-lok-worker ely-pdf-worker; do
if [ -f "$bin/$helper" ]; then
deployed+=(--executable "$bin/$helper")
fi
done
if [ -f "$bin/libcef.so" ]; then
# Binaries here load from usr/lib; CEF's data sits with libcef.
cef=${ELY_CEF:-$root/engines/cef}
mkdir -p "$appdir/usr/lib"
for item in "$bin"/*; do
if [ -e "$cef/${item##*/}" ]; then
mv "$item" "$appdir/usr/lib/"
fi
done
deployed+=(--library "$appdir/usr/lib/libcef.so")
fi
# linuxdeploy bundles libraries and fails on a missing one.
LD_LIBRARY_PATH=$appdir/usr/lib "$deploy" --appimage-extract-and-run --appdir "$appdir" "${deployed[@]}" \
--desktop-file "$work/$slug.desktop" --icon-file "$icon"
mkdir -p "$dist"
version=$(awk -F'"' '/^version = / { print $2; exit }' "$root/Cargo.toml")
out=$dist/$name-$version-linux-$arch.AppImage
ARCH=$arch "$pack" --appimage-extract-and-run --runtime-file "$runtime" "$appdir" "$out"
echo "$out"
# Libraries the AppDir needs and does not bundle.
broken() {
echo "package.sh: $*" >&2
exit 1
}
find "$appdir" \( -type f -o -type l \) -name '*.so*' -print0 >"$work/libs.list" || broken "cannot list $appdir"
find "$appdir" -type f -print0 >"$work/files.list" || broken "cannot list $appdir"
real=$(realpath "$appdir")
declare -A bundled=()
while IFS= read -r -d '' file; do
bundled[${file##*/}]=1
done <"$work/libs.list"
# gpui loads these by name.
needed=(libvulkan.so.1 libwayland-client.so.0)
while IFS= read -r -d '' file; do
magic=$(head -c 4 "$file" | od -An -c | tr -d ' ') || broken "cannot read $file"
[ "$magic" = '177ELF' ] || continue
dynamic=$(readelf -dW "$file") || broken "readelf cannot read $file"
# Library paths resolve inside the package.
records=$(awk '/\((RUNPATH|RPATH)\)/ { n++ } END { print n + 0 }' <<<"$dynamic") || broken "cannot count paths of $file"
[ "$records" -le 1 ] || broken "${file#"$appdir"/} has $records library path records"
lines=()
if [ "$records" -eq 1 ]; then
# The raw string; readelf's text can hide a newline.
path=$(patchelf --print-rpath "$file" && printf x) || broken "patchelf cannot read $file"
path=${path%x}
path=${path%$'\n'}
[[ $path != *$'\n'* ]] || broken "${file#"$appdir"/} has a newline in its library path"
lines=("$path")
fi
entries=()
for line in "${lines[@]}"; do
# An empty entry searches the working directory.
[[ $line != :* && $line != *: && $line != *::* && -n $line ]] ||
broken "${file#"$appdir"/} searches the working directory: $line"
IFS=: read -r -a parts <<<"$line"
entries+=("${parts[@]}")
done
for path in "${entries[@]}"; do
case $path in
'$ORIGIN' | '$ORIGIN/'*) rest=${path#'$ORIGIN'} ;;
'${ORIGIN}' | '${ORIGIN}/'*) rest=${path#'${ORIGIN}'} ;;
*) broken "${file#"$appdir"/} loads from $path, not from \$ORIGIN" ;;
esac
target=$(realpath -m "$(dirname "$file")$rest") || broken "cannot resolve $path for $file"
[[ $target == "$real" || $target == "$real"/* ]] ||
broken "${file#"$appdir"/} loads from $path, outside the package"
done
while IFS= read -r lib; do
[ -n "${bundled[$lib]:-}" ] || needed+=("$lib")
done < <(sed -n 's/.*Shared library: \[\(.*\)\]/\1/p' <<<"$dynamic")
done <"$work/files.list"
deb=() pacman=() rpm=()
while IFS= read -r lib; do
row=$(awk -F'\t' -v lib="$lib" '$1 == lib' "$root/packaging/linux/depends.tsv")
[ -n "$row" ] || {
broken "$lib is in no row of packaging/linux/depends.tsv"
}
IFS=$'\t' read -r _ deb_name pacman_name <<<"$row"
deb+=("$deb_name")
pacman+=("$pacman_name")
rpm+=("$lib()(64bit)")
done < <(printf '%s\n' "${needed[@]}" | sort -u)
yaml_list() { printf ' - "%s"\n' "$@" | sort -u; }
# deb, rpm and Arch: the AppDir's usr under /opt/ely-office.
cat >"$work/nfpm.yaml" <<EOF
name: $slug
arch: $goarch
platform: linux
version: $version
release: 1
maintainer: ZacharyZhang
vendor: ZacharyZhang
description: $name, part of Ely Office
homepage: https://git.zacharyzhang.com/ZacharyZhang-NY/ElyOffice
license: AGPL-3.0-or-later
contents:
- src: $appdir/usr
dst: /opt/ely-office/$slug
type: tree
- src: /opt/ely-office/$slug/bin/$slug
dst: /usr/bin/$slug
type: symlink
- src: $work/$slug.desktop
dst: /usr/share/applications/$slug.desktop
- src: $icon
dst: /usr/share/icons/hicolor/512x512/apps/$slug.png
overrides:
deb:
depends:
$(yaml_list "${deb[@]}")
rpm:
depends:
$(yaml_list "${rpm[@]}")
archlinux:
depends:
$(yaml_list "${pacman[@]}")
EOF
for packager in deb rpm archlinux; do
"$nfpm" package --config "$work/nfpm.yaml" --packager "$packager" --target "$dist/"
done
+1 -11
View File
@@ -12,17 +12,7 @@ releases=https://git.zacharyzhang.com/ZacharyZhang-NY/ElyOffice/releases
echo "release.sh: notarizing needs ELY_SIGN_IDENTITY, a Developer ID" >&2
exit 1
}
# Our source as published: the committed tree.
source=$dist/ElyOffice-$version-source.tar.gz
mkdir -p "$dist"
git -C "$root" archive --format=tar.gz --prefix="ElyOffice-$version/" -o "$source" HEAD
echo "$source"
# Copyleft upstream as shipped: patched MuPDF (AGPL), Git (GPLv2).
upstream=$dist/ElyOffice-$version-upstream-source.tar.gz
[ -f "$root/engines/mupdf-src/COPYING" ] || { echo "release.sh: no engines/mupdf-src; run the MuPDF build" >&2; exit 1; }
tar -czf "$upstream" --exclude .git --exclude .DS_Store \
-C "$root/engines" mupdf-src -C "$root/reference" git
echo "$upstream"
"$root/packaging/source.sh" "$dist"
awk -F'\t' -v batch="$batch" '$4 == batch { print $1 "\t" $2 }' "$root/packaging/apps.tsv" |
while IFS=$'\t' read -r slug name; do
"$root/packaging/macos/bundle.sh" "$slug" release
+32
View File
@@ -0,0 +1,32 @@
#!/usr/bin/env bash
# Usage: source.sh <dist>; the source of what this commit builds.
set -euo pipefail
root=$(cd "$(dirname "$0")/.." && pwd)
dist=${1:?the folder to write into}
version=$(awk -F'"' '/^version = / { print $2; exit }' "$root/Cargo.toml")
# Binaries match a commit only when the tree is clean.
changed=$(git -C "$root" status --porcelain --untracked-files=all)
[ -z "$changed" ] || {
echo "source.sh: uncommitted changes; commit before a release:" >&2
echo "$changed" >&2
exit 1
}
commit=$(git -C "$root" rev-parse --short=12 HEAD)
mkdir -p "$dist"
# Our source as published: the committed tree.
ours=$dist/ElyOffice-$version-$commit-source.tar.gz
git -C "$root" archive --format=tar.gz --prefix="ElyOffice-$version/" -o "$ours" HEAD
echo "$ours"
# Copyleft upstream as shipped: patched MuPDF (AGPL), Git (GPLv2).
upstream=$dist/ElyOffice-$version-$commit-upstream-source.tar.gz
[ -f "$root/engines/mupdf-src/COPYING" ] || {
echo "source.sh: no engines/mupdf-src; run scripts/build-mupdf.sh" >&2
exit 1
}
[ -f "$root/reference/git/COPYING" ] || {
echo "source.sh: no reference/git; run scripts/fetch-references.sh" >&2
exit 1
}
tar -czf "$upstream" --exclude .git --exclude .DS_Store -C "$root/engines" mupdf-src -C "$root/reference" git
echo "$upstream"
+4 -3
View File
@@ -25,16 +25,17 @@ need() { # path, what to run
}
}
build() { cargo build --manifest-path "$root/Cargo.toml" --release "$@"; }
release=${CARGO_TARGET_DIR:-$root/target}/release
rm -rf "$out"
mkdir -p "$out"
build -p "$slug"
cp "$root/target/release/$slug$exe" "$out/"
cp "$release/$slug$exe" "$out/"
if uses ely-lok; then
lo=${ELY_LO_DIR:-$root/engines/lo-src/instdir}
need "$lo/program" scripts/build-libreoffice.sh
build -p ely-lok --bin ely-lok-worker
cp "$root/target/release/ely-lok-worker$exe" "$out/"
cp "$release/ely-lok-worker$exe" "$out/"
# The kernel in LibreOffice's layout, beside the app.
mkdir "$out/libreoffice"
cp -R "$lo/program" "$lo/share" "$lo/presets" "$out/libreoffice/"
@@ -56,7 +57,7 @@ if uses ely-pdf-engine; then
tessdata=${ELY_TESSDATA:-$root/engines/tessdata}
need "$tessdata/eng.traineddata" scripts/fetch-tessdata.sh
build -p ely-pdf-engine --bin ely-pdf-worker
cp "$root/target/release/ely-pdf-worker$exe" "$out/"
cp "$release/ely-pdf-worker$exe" "$out/"
mkdir "$out/tessdata"
cp "$tessdata"/{eng,chi_sim,chi_tra}.traineddata "$out/tessdata/"
fi
+1 -1
View File
@@ -38,6 +38,6 @@ if [ "$(cat "$out/.flags" 2>/dev/null)" != "$flags" ]; then
rm -rf "$out"
fi
# shellcheck disable=SC2086
make -C "$src" $flags -j"$jobs" install
env -u CARGO_TARGET_DIR make -C "$src" $flags -j"$jobs" install # Git's Rust uses its target/
echo "$flags" >"$out/.flags"
"$out/bin/git" --version
+20
View File
@@ -149,6 +149,26 @@ PY
# Ely's kernel defaults: Excel A1 formulas.
cp "$root/packaging/libreoffice/ely.xcd" "$app/registry/"
if [ "$(uname)" = Linux ]; then
# Meson leaves build-tree RUNPATHs in copied libraries, as cairo's.
files=$(mktemp)
find "$src/instdir" -type f -print0 >"$files" || {
echo "build-libreoffice.sh: cannot list $src/instdir" >&2
exit 1
}
while IFS= read -r -d '' lib; do
magic=$(head -c 4 "$lib" | od -An -c | tr -d ' ') || exit 1
[ "$magic" = '177ELF' ] || continue
dynamic=$(readelf -dW "$lib") || exit 1
paths=$(sed -n 's/.*(R\(UN\)\{0,1\}PATH).*\[\(.*\)\]/\2/p' <<<"$dynamic")
if [[ $paths == *"$src"* ]]; then
# shellcheck disable=SC2016
patchelf --set-rpath '$ORIGIN' "$lib"
echo "build-libreoffice.sh: $lib now loads from \$ORIGIN"
fi
done <"$files"
rm "$files"
fi
if [ "$(uname)" = Darwin ]; then
"$root/scripts/inert-lo.sh" "$src/instdir/LibreOffice.app"
fi
+14 -8
View File
@@ -13,6 +13,9 @@ version=$(awk -F'"' '/^version = / { print $2; exit }' "$root/Cargo.toml")
: "${ELY_RELEASE_TOKEN:?the Gitea token that uploads}"
[ -z "${ELY_PATH:-}" ] || PATH=$ELY_PATH:$PATH
cd "$root"
# Linux builds and packages in the Ubuntu 26.04 container.
inside=()
[ "$os" != linux ] || inside=(packaging/linux/container.sh)
# Engines another clone on this host built; else built here.
if [ -n "${ELY_SHARE:-}" ]; then
@@ -26,13 +29,13 @@ if [ -n "${ELY_SHARE:-}" ]; then
done
else
scripts/fetch-references.sh
scripts/build-mupdf.sh
scripts/fetch-cef.sh
scripts/build-git.sh
scripts/fetch-git-lfs.sh
scripts/fetch-tessdata.sh
scripts/build-mark-content.sh
scripts/build-libreoffice.sh
${inside[@]+"${inside[@]}"} scripts/build-mupdf.sh
${inside[@]+"${inside[@]}"} scripts/fetch-cef.sh
${inside[@]+"${inside[@]}"} scripts/build-git.sh
${inside[@]+"${inside[@]}"} scripts/fetch-git-lfs.sh
${inside[@]+"${inside[@]}"} scripts/fetch-tessdata.sh
${inside[@]+"${inside[@]}"} scripts/build-mark-content.sh
${inside[@]+"${inside[@]}"} scripts/build-libreoffice.sh
fi
dist=$root/dist
@@ -41,13 +44,16 @@ batch=$(awk -F'\t' '$4 == 1 { print $1 }' packaging/apps.tsv)
case $os in
macos) packaging/macos/release.sh 1 ;;
windows) for slug in $batch; do packaging/windows/installer.sh "$slug"; done ;;
linux) for slug in $batch; do packaging/linux/appimage.sh "$slug"; done ;;
linux) for slug in $batch; do ${inside[@]+"${inside[@]}"} packaging/linux/package.sh "$slug"; done ;;
*)
echo "ci.sh: no release for $os" >&2
exit 1
;;
esac
# macOS's release.sh writes its own source archives.
[ "$os" = macos ] || packaging/source.sh "$dist"
# The tag's release, made by whichever platform comes first.
api=https://git.zacharyzhang.com/api/v1/repos/ZacharyZhang-NY/ElyOffice
auth="Authorization: token $ELY_RELEASE_TOKEN"
+4 -3
View File
@@ -3,7 +3,7 @@ import { TEXT, type Key, type Lang } from "../src/text.ts";
const REPO = "https://git.zacharyzhang.com/ZacharyZhang-NY/ElyOffice";
const APPS = ["ElyDoc", "ElyTable", "ElyShow", "ElyPDF", "ElyTree", "ElyMark"];
const RELEASES = `${REPO}/releases/latest`;
const RELEASES = `${REPO}/releases/tag/v0.1.3`;
test.use({ reducedMotion: "reduce" });
@@ -84,8 +84,9 @@ test.describe("English locale", () => {
for (const i of APPS.keys()) await expect(page.locator(".tour .get").nth(i)).toHaveAttribute("href", RELEASES);
await expect(page.locator("#download a")).toHaveCount(1);
await expect(page.locator("#download [data-t=get]")).toHaveAttribute("href", RELEASES);
await expect(page.locator(".hero > a")).toHaveText("Source");
await expect(page.locator(".hero > a")).toHaveAttribute("href", REPO);
await expect(page.locator(".hero .links a").last()).toHaveText("Source");
await expect(page.locator(".hero .links a").last()).toHaveAttribute("href", REPO);
await expect(page.locator(".hero [data-t=get]")).toHaveAttribute("href", RELEASES);
const files = await page.locator("a[href]").evaluateAll((as) =>
as.map((a) => (a as HTMLAnchorElement).href).filter((h) => /\.(dmg|tar\.gz|zip|exe|AppImage)$/.test(h)),
);
+6 -1
View File
@@ -21,7 +21,12 @@ title.textContent = "Ely Office";
const source = document.createElement("a");
source.href = REPO;
source.textContent = "Source";
hero.append(title, said("p", "tagline"), said("p", "platforms"), source);
const download = said("a", "get");
download.href = RELEASES;
const links = document.createElement("div");
links.className = "links";
links.append(download, source);
hero.append(title, said("p", "tagline"), said("p", "platforms"), links);
const { section, host, svg } = tour(hero);
rhythm(host, svg);
+2 -2
View File
@@ -1,3 +1,3 @@
// The published release; downloads live on its release page.
// This version's release page holds every download.
export const VERSION = "0.1.3";
export const RELEASES = "https://git.zacharyzhang.com/ZacharyZhang-NY/ElyOffice/releases/latest";
export const RELEASES = "https://git.zacharyzhang.com/ZacharyZhang-NY/ElyOffice/releases/tag/v0.1.3";
+5
View File
@@ -60,6 +60,11 @@ button:focus-visible {
font-size: 1.0625rem;
}
.hero .links {
display: flex;
gap: 1.5rem;
}
.stage {
display: block;
max-width: 100%;
+2 -2
View File
@@ -13,7 +13,7 @@ const en = {
open: "Open source, under the AGPL.",
local: "Your files stay in your folders.",
download: "Download",
platforms: "Out now for macOS. Windows and Linux are coming soon.",
platforms: "Out now for macOS, Windows and Linux.",
needs: "macOS 14 or later, Apple silicon.",
unsigned: "Not notarized. If macOS blocks the app, open System Settings › Privacy & Security and click Open Anyway.",
get: "Download",
@@ -49,7 +49,7 @@ const zh: typeof en = {
open: "开源,AGPL 许可。",
local: "文件留在你自己的文件夹里。",
download: "下载",
platforms: "macOS 版已发布。Windows 与 Linux 版即将推出。",
platforms: "macOS、Windows 与 Linux 版已发布。",
needs: "macOS 14 或更新,Apple 芯片。",
unsigned: "未经公证。macOS 拦下应用时,打开“系统设置 › 隐私与安全性”,点“仍要打开”。",
get: "前往下载",
+11
View File
@@ -198,3 +198,14 @@
- [x] R2.18 官网(用户定):下载一律指向 GitHub 的 v0.1.x 发布页,不直接链 DMG — R1 截图文案死代码(连同 screen() 与截图一并删去);R2 PASS;已上线
- [x] R2.19 发布 0.1.1:版本号、打包、GitHub Release、官网指向新发布页 — v0.1.1 已发布(六个 arm64 dmg 与两个源码包,releases/latest),官网显示 0.1.1;release-macos.sh 通过
- [x] R2.20 ElyShow:放映图层一次回复超过 64 MB 帧上限(大屏上 4 张以上图层的幻灯片报 “layers pass 67107840 bytes”,放映起不来) — R1 单层仍超帧上限、暂存不随文档释放;R2 测试只核长度;R3 PASS
## L1 Linux 发布(用户 2026-10-11 报:Omarchy 上六个 AppImage 都打不开;要 deb、rpm、Arch、AppImage;在 ubuntu:26.04 容器里本机构建,替换 v0.1.3 的 Linux 包)
- [x] L1.1 Linux 显示后端:`gpui_platform` 开 `wayland` 与 `x11`(原样无头,“window open”而合成器里没有窗口);Omarchy(Hyprland)上 ElyTree 在 Wayland 与 X11 上画出窗口(其余五个要引擎,随 L1.6 实测);`tests/scripts/linux-backends.sh` — R1 锁文件、目标目录、未证明交帧;R2 产物路径、字形未核;R3 语言、OCR 错误被吞;R4 PASS
- [x] L1.2 Linux 上的文件监视把读取当作改动(inotify 报打开,FSEvents 不报):Omarchy 主题、通用设置在第一次改动后、ElyTree 打开仓库起,每次重读自己又触发下一次,空闲时每 250 毫秒读一遍;四处监视(主题、设置、ElyTree、ElyMark)经 `ely_ui::watching::only_read` 略去读取,写后关闭照算改动;`theme.name` 读不出不再吞掉;`tests/scripts/linux-idle.sh`(ElyMark 要 CEF,随 L1.6 实测) — R1 写后关闭也被略去、注释超长;R2 PASS
- [x] L1.3 设置的单测在 Linux 上失败(“a menu bar needs menus”):Linux 未设菜单时给空表而非 None,测试未像应用那样先设菜单;真窗口里 Ctrl+, 打开设置不崩(已实测) — R1 PASS
- [x] L1.4 Linux 构建环境:`ubuntu:26.04` 容器里构建全部引擎与六个应用(glibc 不高于 2.43);`packaging/linux/container.sh`、`tests/scripts/linux-glibc.sh` — R1 读不出当作静态、缺件照过、注释超长;R2 链接文件、读错;R3 链接目录;R4 PASS
- [x] L1.5 Linux 包:deb、rpm、Arch(pkg.tar.zst)、AppImage 出自同一份分装,装到 `/opt/ely-office/<应用>`,带桌面项、图标与文件类型;依赖按 `packaging/linux/depends.tsv`;LibreOffice 的 cairo RUNPATH 改为 `$ORIGIN`;`tests/scripts/linux-packages.sh` — R1 列举与读错被吞、坏入口照过、无执行位;R2 坏 git-lfs 照过;R3 PASS
- [x] L1.6 本机出六个应用的四种包;Omarchy 上装 Arch 包与 AppImage 出窗口;deb、rpm 在各自发行版的容器里装上并冒烟;`linux-installed.sh`、`linux-distros.sh`、`linux-mark-idle.sh` — R1 deb/rpm 未运行、外部改动未核对显示;R2 内核未出图也过、OCR 大小写、清理竞态;R3 公式栏冒充网格、OCR 与 pgrep 错误被吞;R4 取色、存活、截图错误被吞;R5 hyprctl 查询失败被当作未出窗口(第五轮后修正并以注入失败核对)
- [x] L1.7 v0.1.3:删去旧 AppImage,上传新包;`ci.sh` 的 Linux 产出四种包;agents.md 与官网随之(官网只链到发布页,无需改);`package.sh` 拒绝指向包外的 RUNPATH;Linux CI 进容器;`packaging/source.sh` 随发布上传本提交的源码 — R1 前缀检查可越出、读错被吞、CI 未进容器、无对应源码;R2 空项、拆分错误、未跟踪文件;R3 换行、git 配置;R4 `]` 加换行;R5 末尾换行(第五轮后修正并以编译的 ELF 核对)
- [ ] L1.8 macOS 发布:CI 从零编 LibreOffice 超过 act_runner 的 3 小时被杀(v0.1.3 无 dmg);Mac 任务以 `ELY_SHARE` 借用 Mac mini 开发克隆 `ElyOfficeSuite` 的引擎,CI 克隆里自建的残留引擎即报错而非混用
+7
View File
@@ -0,0 +1,7 @@
FAIL
Cargo.toml:25 — The new backend features require dependencies absent from the tracked Cargo.lock. In a clean copy, `cargo build --locked -p ely-tree` and locked metadata both exit 101 because the lockfile needs updating; the smoke script hides this by adding 26 packages during `cargo tree`. Commit the matching lockfile and verify a clean locked build. Evidence: `.work/l1.1-r1-locked.log`, `.work/l1.1-r1-backends.log`.
tests/scripts/linux-backends.sh:30 — The executable path ignores Cargo's target directory. With a separate `CARGO_TARGET_DIR`, the probe successfully built ElyTree there, then failed because `$root/target/debug/ely-tree` did not exist. If that path contains an older binary, the script tests that binary instead of the build it just produced. Resolve and launch the actual Cargo build artifact. Evidence: `.work/l1.1-r1-custom-target.log`.
tests/scripts/linux-backends.sh:32 — `ready ElyTree` does not establish that a frame was presented: its next-frame callback runs before presentation. In an isolated, rebuilt probe, replacing `platform_window.draw(...)` with a no-op still made this script exit 0 and claim both backends drew. Wayland tracing confirmed zero surface-buffer attachments, versus one with the original binary. Require successful presentation and compositor-visible rendered content before reporting success; a disabled presentation path must fail this test. Evidence: `.work/l1.1-r1-no-presentation.log`, `.work/l1.1-r1-presentation-evidence.log`.
+5
View File
@@ -0,0 +1,5 @@
FAIL
tests/scripts/linux-backends.sh:36 — Executable selection still assumes Cargo's native output layout. With CARGO_BUILD_TARGET=x86_64-unknown-linux-gnu and a separate CARGO_TARGET_DIR, the locked build succeeds under <target>/x86_64-unknown-linux-gnu/debug, then the script fails launching nonexistent <target>/debug/ely-tree. An older native binary there would be tested instead. Launch the executable reported by Cargo's build-artifact JSON. Evidence: .work/l1.1-r2-explicit-target-build.log, .work/l1.1-r2-explicit-target.log.
tests/scripts/linux-backends.sh:55 — The text assertion counts contrasting control fills and icons, so it passes without any text. In an isolated rebuilt probe, returning immediately from Window::paint_glyph still makes the script exit 0 on both Wayland and X11. The inspected window has no text, yet its ink count is 10578 against the 500 threshold. Check known rendered text in a region excluding control fills and icons, and verify that disabling glyph painting fails the assertion. Evidence: .work/l1.1-r2-no-glyphs.log, .work/l1.1-r2-glyph-evidence.log, .work/l1.1-r2-mutation.log.
+5
View File
@@ -0,0 +1,5 @@
FAIL
tests/scripts/linux-backends.sh:60 — The OCR assertion always expects English while the application inherits its locale. Running with `ELY_LOCALE=zh-CN` maps and renders the window successfully, then fails because the supported Chinese interface contains no “Open a repository”. Pin `ELY_LOCALE=en` in the application's launch environment when asserting English text. Evidence: `.work/l1.1-r3-chinese.log`; forcing English passes both backends in `.work/l1.1-r3-fixed-locale.log`.
tests/scripts/linux-backends.sh:59 — OCR failure diagnostics are discarded. With Tesseract installed but `TESSDATA_PREFIX` pointing to an existing empty directory, the script exits 1 with no output; the missing `eng.traineddata` and initialization errors disappear into `/dev/null`. Preserve Tesseract's stderr or include it in an explicit failure message. Evidence: `.work/l1.1-r3-missing-tessdata.log`, `.work/l1.1-r3-ocr-error-evidence.log`, `.work/l1.1-r3-verification.log`.
+1
View File
@@ -0,0 +1 @@
PASS
+5
View File
@@ -0,0 +1,5 @@
FAIL
- apps/ely-tree/src/watch.rs:21; apps/ely-mark/src/outside.rs:380; crates/ely-ui/src/settings/mod.rs:86; crates/ely-ui/src/theme/omarchy/mod.rs:60 — `is_access()` also discards `Access(Close(Write))`, so actual external writes can disappear. Reproduced on Linux by modifying `a.txt`, `theme.name`, and `settings.json` through writable shared memory mappings, flushing, then closing: inotify emitted OPEN and CLOSE_WRITE without MODIFY. The running ElyTree performed no new status read and observed neither the theme-name nor settings change; ordinary writes immediately triggered all three. ElyMark has the same filter, which also drops this content-change signal (MARK-08). Evidence: `.work/L1.2-r1/mmap-results.log` and `mmap-events.log`; the existing idle script passes despite this defect. Preserve writable-close notifications while filtering read events, and add regression coverage for mapped writes.
- tests/scripts/linux-idle.sh:59 — The comment has 12 words, exceeding the ten-word limit in agents.md. Running `python tests/scripts/comments.py` fails on this line (`.work/L1.2-r1/comments.log`). Shorten the comment to ten words or fewer.
+1
View File
@@ -0,0 +1 @@
PASS
+1
View File
@@ -0,0 +1 @@
PASS
+9
View File
@@ -0,0 +1,9 @@
FAIL
- tests/scripts/linux-glibc.sh:26 — A failed `readelf` command is treated as evidence that the ELF is static. With `readelf` forced to return 1, the existing outputs still exit 0 and report all 187 ELF files compliant (`.work/L1.4-r1-readelf-failure.log`). A missing tool or failed inspection therefore bypasses every glibc check. Check tool availability explicitly and propagate inspection errors; skip version analysis only after a successful inspection establishes that the binary is static.
- tests/scripts/linux-glibc.sh:19 — Required outputs only need to exist; non-ELF files are skipped at line 23, and line 32 requires just one ELF across all inputs. A compiled probe with eight text files in place of the applications/workers, empty LibreOffice and CEF directories, and one unrelated ELF under Git exits 0 (`.work/L1.4-r1-non-elf.log`). Validate each required application/worker as an ELF and require the actual engine binaries before scanning their versions.
- tests/scripts/linux-glibc.sh:31 — The `find` process substitution loses enumeration failures, allowing a partial scan to pass. With valid ELF inputs and an unreadable LibreOffice subdirectory containing another ELF, `find` reports permission denied, but the test exits 0 and declares the 11 accessible ELF files compliant (`.work/L1.4-r1-find-failure.log`). Check and propagate the enumeration status before reporting success.
- packaging/linux/container.sh:2 — Scoped comments violate the mandatory one-line, ten-word limit: this line has 12 words, line 12 has 11, packaging/linux/Dockerfile:1 has 12, and tests/scripts/linux-glibc.sh:2 has 11. scripts/build-git.sh:40 and :41 also form consecutive comment lines. The repository comment checker rejects the shell comments (`.work/L1.4-r1-comments.log`). Shorten the long comments and remove or separate the consecutive explanation and directive.
+7
View File
@@ -0,0 +1,7 @@
FAIL
- packaging/linux/container.sh:2 — The round 1 comment defect remains: this comment has eleven words, and scripts/build-git.sh:40–41 still has consecutive comment lines. Running tests/scripts/comments.py exits 1 and rejects both (`.work/L1.4-r2-comments.log`). Shorten the remaining long comment and remove or separate the consecutive comments.
- tests/scripts/linux-glibc.sh:28 — Required outputs may be symlinks, but `find -type f` excludes them from version inspection. A compiled application probe declaring GLIBC_2.99 fails as a regular file; replacing it with a symlink to the identical ELF makes the test exit 0 and report only ten compliant files (`.work/L1.4-r2-probes.log`). Inspect every required ELF regardless of symlinks and include referenced engine libraries in the scan.
- tests/scripts/linux-glibc.sh:32 — `is_elf` conflates failed reads with non-ELF content, so engine inspection errors still produce success. An additional LibreOffice library declaring GLIBC_2.99 correctly fails while readable; making that file unreadable prints `head: Permission denied` but exits 0 and declares the eleven other ELF files compliant (`.work/L1.4-r2-probes.log`). Propagate header-read failures and skip files only after successfully reading and identifying non-ELF content.
+3
View File
@@ -0,0 +1,3 @@
FAIL
- tests/scripts/linux-glibc.sh:28 — The scan checks symlinked files but never traverses symlinked directories, so required engines can still escape version inspection. In the probe, a regular LibreOffice `program` directory containing `libmergedlo.so` declaring GLIBC_2.99 correctly fails; replacing that directory with a symlink to the same contents exits 0 and reports ten compliant ELF files. A linked library subdirectory also hides an incompatible library (`.work/L1.4-r3-probes.log`). Follow engine directory links while propagating traversal errors, and ensure every required ELF receives version inspection regardless of its directory layout.
+1
View File
@@ -0,0 +1 @@
PASS
+11
View File
@@ -0,0 +1,11 @@
FAIL
1. packaging/linux/package.sh:131 — Both `find` process substitutions discard traversal failures, and line 135 treats a failed header read as a non-ELF file. Dependency discovery can therefore succeed without inspecting the payload. With `find` returning 74, the packaging tail generated all three native ElyTree packages with only Wayland and Vulkan dependencies, omitting the normal curl, OpenSSL, libxcb and other requirements (`.work/L1.5-r1-dependency-errors.log`). Such packages can install without their required libraries. Check enumeration and header-read status before consuming their output; abort packaging on failure and test these failure paths.
2. scripts/build-libreoffice.sh:155 — The new RUNPATH repair ignores failed header reads, and its `find` failure at line 162 never reaches the parent shell. A traversal/read error leaves build-tree RUNPATHs intact while the script succeeds. Probing the post-build block with a copy of the existing cairo library confirmed that normal execution changes its RUNPATH to `$ORIGIN`, whereas either injected error returns zero and retains the source-tree path (`.work/L1.5-r1-lo-errors.log`). On another machine its private dependencies cannot resolve through that path. Make enumeration and file-read failures fatal and cover them without rebuilding LibreOffice.
3. tests/scripts/linux-packages.sh:29 — The installed-package check ignores header-read and traversal failures and permits zero checked ELF files. Its inner shell also lacks `pipefail`. Against the freshly built, installed ElyTree deb, making either `find` or `head` fail with status 74 still printed `ely-tree: 0 ELF files link` and exited zero (`.work/L1.5-r1-test-errors.log`). This falsely certifies packages whose contents were never checked. Propagate listing/read failures, enable pipeline failure detection, and require the expected application binary to be inspected.
4. tests/scripts/linux-packages.sh:31 — Any `ldd` error containing “not a dynamic executable” is accepted as a static binary without validating the ELF. Replacing the installed ElyTree executable with just the four ELF magic bytes still passed with “17 ELF files link”; replacing it with executable text also passed with 16 (`.work/L1.5-r1-broken-entry.log`). Neither application can start. Validate required entry points as complete ELF executables, and distinguish valid static executables from malformed files using checked ELF headers before allowing this exception. Add these negative cases.
5. tests/scripts/linux-packages.sh:1 — The new script is committed as mode 100644, unlike the other shell tests. Running the command documented in agents.md, `tests/scripts/linux-packages.sh`, fails with permission denied and status 126 before checking any package (`.work/L1.5-r1-test-permission.log`). Commit its executable bit.
+3
View File
@@ -0,0 +1,3 @@
FAIL
1. tests/scripts/linux-packages.sh:37 — The static-binary exception still accepts malformed ELF files solely because their basename is `git-lfs`; round 1 defect 4 is only partly fixed. In a clean Ubuntu container with the rebuilt ElyTree deb installed, replacing its bundled `git/libexec/git-core/git-lfs` with the four bytes `\177ELF` still makes the package check print `ely-tree: 17 ELF files link` and exit zero. Executing that helper fails with “Exec format error” and status 126 (`.work/L1.5-r2-test-errors.log`). Validate complete ELF headers before accepting a static executable, and add a regression case for a malformed bundled helper.
+1
View File
@@ -0,0 +1 @@
PASS
+5
View File
@@ -0,0 +1,5 @@
FAIL
tests/scripts/linux-installed.sh:61 — L1.6 lacks the required Ubuntu/Fedora runtime smoke tests. `installed` runs the live Arch host’s binaries; `linux-packages.sh` only checks installation and linkage. In a copied ElyTree deb, replacing the main ELF with Ubuntu’s `/bin/false` makes startup exit 1 without a window, yet the package test still exits 0. Run the deb/rpm applications in their respective distro environments and verify successful startup and rendered content. Evidence: `.work/L1.6-r1/package-mutation-build.log` and `package-mutation.log`.
tests/scripts/linux-mark-idle.sh:84 — The external-edit assertion checks a log emitted before the new content is applied. A built ElyMark mutant that returns immediately after `changed outside` passes the entire script with exit 0 while its window still displays “Nothing moves.” instead of “Something moved.” Assert that the edited content actually reaches the document before checking the second idle period. Evidence: `.work/L1.6-r1/mark-mutation-evidence.log` and `mark-mutation-ocr.log`.
+7
View File
@@ -0,0 +1,7 @@
FAIL
tests/scripts/linux-common.sh:4 — Doc/Table assertions cannot detect a broken document renderer: `words` comes from Doc’s status bar and `Formula` from Table’s menu, while the log checks only require an opened document and no reported tile error. Built mutants that skip every document tile still pass both smoke cases with exit 0; Table shows no grid. Use document/cell fixtures with distinct content and assert that engine-rendered content reaches the window. Evidence: `.work/L1.6-r2/no-canvas-evidence.log` and `no-canvas.log`.
tests/scripts/linux-common.sh:56 — Case-sensitive OCR matching rejects correctly rendered ElyMark content. Both unmodified `installed` and `appimage` runs exit 1 because Tesseract returns `PaCKaged On Linux`, although the inspected screenshot clearly displays “Packaged on Linux”; an isolated repeat fails identically. Normalize OCR case or use an equally reliable content assertion while preserving OCR error reporting. Evidence: `.work/L1.6-r2/installed.log`, `appimage.log`, and `ocr-evidence.log`.
tests/scripts/linux-mark-idle.sh:33 — Cleanup deletes the temporary home immediately after signaling ElyMark, racing CEF’s profile writes; the failure trap in linux-installed.sh:25 has the same race. The unmodified idle test passes both zero-read checks and the external-edit screenshot assertion, then exits 1 with `web/Default: Directory not empty`, leaving profile files behind. Wait for the application and its CEF processes to finish before deleting their home. Evidence: `.work/L1.6-r2/mark-idle.log`; the AppImage run also records this cleanup error.
+7
View File
@@ -0,0 +1,7 @@
FAIL
tests/scripts/linux-common.sh:4 — Round 2's Table-rendering defect remains: the expected text is in selected cell A1, so the formula bar supplies the OCR match. A built probe that omits every document tile still passes the Table smoke case with exit 0, while the cell is visibly empty; Doc correctly rejects the same probe. Assert content inside the rendered grid, or use content absent from the formula bar. Evidence: `.work/L1.6-r3/no-canvas-table.log`, `no-canvas-evidence.log`, and `no-canvas-patch.log`.
tests/scripts/linux-mark-idle.sh:93 — Tesseract failures are discarded as ordinary OCR mismatches, with stderr suppressed. Injecting exit 42 on the first external-edit OCR attempt, then allowing normal OCR, makes the entire idle test exit 0 without reporting the tool error. Capture and check Tesseract's status and diagnostic output separately; retry only successful OCR that lacks the expected text. Evidence: `.work/L1.6-r3/ocr-first-failure.log` and `mark-idle-ocr-failure.log`.
tests/scripts/linux-common.sh:66 — Cleanup treats every nonzero `pgrep` status as proof that the application session has exited. With a live session that ignores TERM and an injected `pgrep` internal error (exit 3), `stop_app` returns success while the session remains alive; callers can then delete a home still used by the app or CEF, restoring the cleanup race under process-query failure. Treat only exit 1 as no matching processes and propagate other query failures. Evidence: `.work/L1.6-r3/stop-app-failure.log`.
+7
View File
@@ -0,0 +1,7 @@
FAIL
tests/scripts/linux-common.sh:88 — Color-extraction failures do not fail the smoke assertion. Injecting ImageMagick exit 42 for the red-channel extraction prints an arithmetic syntax error, but `judge` continues and returns 0, allowing both package smoke suites to pass without verifying the theme colors. Capture and check each `band` result before performing arithmetic. Evidence: `.work/L1.6-r4/band-error.log`.
tests/scripts/linux-mark-idle.sh:66 — The idle observation never checks whether ElyMark remains alive. Terminating its application session at the start of the second observation produces zero reads, prints both success messages and exits 0; the session is already gone. Check application liveness through each observation so an exited application cannot satisfy the idle assertion. Evidence: `.work/L1.6-r4/idle-exit-evidence.log` and `mark-idle-app-exit.log`.
tests/scripts/linux-mark-idle.sh:91 — A failed `grim` capture is treated as a readiness miss and retried without propagating its failure. Injecting exit 42 on the first capture, then allowing normal captures, makes the complete test exit 0. Separate waiting for a mapped window from capture execution, and fail with the capture diagnostic when `grim` returns nonzero. Evidence: `.work/L1.6-r4/mark-idle-grim-repeat.log` and `grim-probe-status.log`.
+3
View File
@@ -0,0 +1,3 @@
FAIL
tests/scripts/linux-installed.sh:46 — Window discovery ignores failed `hyprctl`/`jq` queries because `window` runs inside `id=$(window) || fail`, which disables Bash's automatic error exits throughout the function. Injecting exit 42 on the first `hyprctl clients` query still lets all six installed cases pass and the suite exit 0. Explicitly propagate a failed query pipeline; retry only successful queries that show no mapped window. Evidence: `.work/L1.6-r5/installed-hyprctl-error-repeat.log` and `window-query-error.log`.
+9
View File
@@ -0,0 +1,9 @@
FAIL
1. packaging/linux/package.sh:146 — The RUNPATH guard checks only a string prefix, so paths beginning with `$ORIGIN` can still escape the AppDir. In a copied tree, an ELF with `$ORIGIN/../../../../../../../../outside` passed packaging and produced all four formats. Its library loaded successfully while the external build-tree dependency existed, then failed with `libleaf.so: cannot open shared object file` when that dependency was removed. `$ORIGINsuffix` also passed. Resolve recognized origin tokens relative to each ELF, normalize the resulting paths, and reject destinations outside the packaged runtime tree. Add regression cases for traversal and malformed tokens. Evidence: `.work/L1.7-r1/guard-probes.log`.
2. packaging/linux/package.sh:147 — RUNPATH extraction errors do not propagate out of the process substitution. Making the guard's `sed` exit 73 caused a library with RUNPATH `/old/lo/workdir/fontconfig` to bypass validation; the copied packager exited 0 and produced all four formats. Check the extraction pipeline's status before consuming its output, and add a regression that requires packaging to fail when extraction fails. Evidence: `.work/L1.7-r1/guard-errors.log`.
3. scripts/ci.sh:44 — Linux CI bypasses the required Ubuntu 26.04 container. The branch calls the packager directly, whose staging step invokes Cargo in the caller's environment; the engine-build branch likewise runs directly. An isolated CI invocation with shared engines ran all six packagers with `container=no` and reported success. This contradicts the container requirement in `tasks/TASKS.md:202` and `agents.md:307`; the new same-glibc statement does not enforce that requirement. Route Linux builds and packaging through `packaging/linux/container.sh`, preserve access to shared engines, and test that CI actually enters it. Evidence: `.work/L1.7-r1/ci-probe.log`.
4. agents.md:310 — The replacement Linux binaries have no matching published source entry, violating PRD §§21.3 and 24.2. The [v0.1.3 release](https://git.zacharyzhang.com/api/v1/repos/ZacharyZhang-NY/ElyOffice/releases/tags/v0.1.3) has an empty description and only binary assets; its source archives still reference commit `62f9839170efe66f80be74975c65de53b9876438`. That version's [Cargo.toml](https://git.zacharyzhang.com/api/v1/repos/ZacharyZhang-NY/ElyOffice/raw/Cargo.toml?ref=v0.1.3) enables only `font-kit`, without the Wayland/X11 fix, and its new packaging script returns 404. The local L1.6 commit also returns 404 from the public commit API. A recipient following the release's source link therefore receives the old headless implementation and cannot reproduce the replacement packages. Publish an immutable corresponding-source snapshot, including the fixes and build materials, and link it from the release. Evidence: `.work/L1.7-r1/release.log` and `.work/L1.7-r1/source-release.log`.
+7
View File
@@ -0,0 +1,7 @@
FAIL
1. packaging/linux/package.sh:156 — Dropping empty RUNPATH components hides searches outside the AppDir: leading or trailing `:` means the current working directory to the loader. In the compiled ELF probe, both `:$ORIGIN/missing` and `$ORIGIN/missing:` passed packaging and produced deb, rpm, and Arch packages. Loading returned 42 with `libleaf.so` in the working directory, then failed when that external library was removed. Preserve empty components and reject current-directory searches; add leading/trailing-colon regression cases. Evidence: `.work/L1.7-r2/guard.log`.
2. packaging/linux/package.sh:156 — The original extraction error now propagates, but failures in the splitting process substitution still bypass validation. Making its `sed` exit 74 or its `tr` exit 75 let an ELF with an absolute external RUNPATH pass; the copied packager exited 0 and produced all three native packages. Capture and check the complete splitting pipeline before consuming its output, and add failure-injection regressions for both commands. Evidence: `.work/L1.7-r2/guard.log`.
3. packaging/source.sh:9 — `--untracked-files=no` lets uncommitted build inputs pass the clean-tree check, so the commit-labelled archive can differ from the binary, contrary to PRD §§21.3 and 24.2. In a Rust probe checkout using this script, an untracked, automatically discovered `build.rs` changed the built program's output to `untracked-build-input`; `source.sh` succeeded but omitted that file, and rebuilding its archive printed `committed`. Reject untracked build inputs or build from the same committed snapshot that is archived; add a regression covering this mismatch. Evidence: `.work/L1.7-r2/source.log`.
+5
View File
@@ -0,0 +1,5 @@
FAIL
1. packaging/linux/package.sh:146 — A RUNPATH containing a literal newline is silently treated as absent: readelf prints its value across lines, so the line-based sed extracts nothing and validation skips it. In Ubuntu 26.04, a compiled ELF with `$ORIGIN/missing\n:/outside` passed the unmodified guard and produced deb, rpm and Arch packages; the ELF extracted from its deb returned 42 with the external library present, then failed to load when that library was removed. Reject present but unparsed RUNPATH records, and parse or reject multiline values before validating every component; add a compiled-ELF regression. Evidence: `.work/L1.7-r3/guard.log`, `.work/L1.7-r3/ubuntu-newline.log`, `.work/L1.7-r3/native-newline.log`.
2. packaging/source.sh:9 — The clean-tree check inherits `status.showUntrackedFiles`, so round 2's untracked-build-input defect persists when that Git setting is `no`. In the Rust probe, an untracked, automatically discovered build.rs changed the binary output to `untracked-build-input`; source.sh exited 0 and omitted it, and rebuilding the commit-labelled archive printed `committed`, violating PRD §§21.3 and 24.2. Explicitly enumerate untracked files regardless of Git settings, and add a regression with `status.showUntrackedFiles=no`. Evidence: `.work/L1.7-r3/source.log`.
+3
View File
@@ -0,0 +1,3 @@
FAIL
1. packaging/linux/package.sh:146 — The newline fix still truncates RUNPATH when a literal `]` precedes the newline. With `$ORIGIN]\n:/outside`, sed extracts only `$ORIGIN`, and the record-count check accepts it, skipping the external directory. In Ubuntu 26.04, the staged packager with real linuxdeploy, appimagetool and nfpm produced all four formats; the library extracted from its deb returned 42 with the external dependency present and failed to load after it was removed. Parse complete ELF dynamic strings or reliably reject multiline values before validating components; add a compiled-ELF regression covering this case. Evidence: `.work/L1.7-r4/guard.log`, `.work/L1.7-r4/ubuntu-bracket-newline.log`, `.work/L1.7-r4/native-newline.log`.
+3
View File
@@ -0,0 +1,3 @@
FAIL
1. packaging/linux/package.sh:155 — Command substitution strips trailing newlines from `patchelf` output before line 156 checks it. A compiled ELF with RUNPATH `$ORIGIN\n` (literal terminal LF) passes as `$ORIGIN`; the unmodified staged packager in Ubuntu 26.04 exits 0 and produces all four formats. Its library extracted from the deb cannot load the adjacent bundled `libleaf.so`: it returns 42 only after supplying an unpackaged `program\n` directory, and fails again when that directory is removed. Preserve trailing newlines before validation and add a compiled-ELF regression. Evidence: `.work/L1.7-r5/guard.log`, `.work/L1.7-r5/guard-followup.log`.
+1 -1
View File
@@ -17,7 +17,7 @@ command -v desktop-file-validate >/dev/null || {
count=0
while IFS=$'\t' read -r slug name _; do
file=$work/$slug.desktop
"$root/packaging/linux/appimage.sh" --desktop "$slug" >"$file"
"$root/packaging/linux/package.sh" --desktop "$slug" >"$file"
report=$(desktop-file-validate "$file" 2>&1) || fail "$slug.desktop is not valid: $report"
[ -z "$report" ] || fail "$slug.desktop has hints: $report"
grep -qx "Name=$name" "$file" || fail "$slug.desktop has the wrong name"
+72
View File
@@ -0,0 +1,72 @@
#!/usr/bin/env bash
# Linux builds carry Wayland and X11; ElyTree shows on each.
set -euo pipefail
root=$(cd "$(dirname "$0")/../.." && pwd)
fail() {
echo "FAIL: $*" >&2
exit 1
}
features=$(cargo tree --locked --manifest-path "$root/Cargo.toml" -p ely-tree -e features \
-i gpui-pre-linux --target x86_64-unknown-linux-gnu)
for backend in wayland x11; do
grep -q "gpui-pre-linux feature \"$backend\"" <<<"$features" || fail "gpui is built without $backend"
done
[ "$(uname)" = Linux ] || {
echo "SKIP: windows show on Linux only"
exit 0
}
for tool in hyprctl grim magick tesseract jq git; do
command -v "$tool" >/dev/null || {
echo "SKIP: no $tool; the window check reads Hyprland"
exit 0
}
done
# The binary Cargo reports, wherever it builds.
app=$(cargo build -q --locked --message-format=json --manifest-path "$root/Cargo.toml" -p ely-tree --bin ely-tree |
jq -r 'select(.reason == "compiler-artifact" and .target.name == "ely-tree") | .executable // empty')
[ -x "$app" ] || fail "Cargo reported no ElyTree binary"
work=$(mktemp -d)
pid=
trap '[ -z "$pid" ] || kill "$pid" 2>/dev/null; rm -rf "$work"' EXIT
show() { # backend, env args
local backend=$1 geometry= shot=$work/$1.png
shift
env "$@" ELY_GIT="$(command -v git)" ELY_SMOKE=hold ELY_APPEARANCE=dark ELY_OMARCHY_SYNC=0 ELY_LOCALE=en-US \
HOME="$work" XDG_DATA_HOME="$work/data" "$app" 2>"$work/$backend.err" &
pid=$!
for _ in $(seq 120); do
geometry=$(hyprctl clients -j | jq -r --argjson pid "$pid" \
'.[] | select(.pid == $pid and .mapped) | "\(.at[0]),\(.at[1]) \(.size[0])x\(.size[1])"')
[ -n "$geometry" ] && break
kill -0 "$pid" 2>/dev/null || fail "ElyTree quit on $backend: $(tail -n 5 "$work/$backend.err")"
sleep 0.5
done
[ -n "$geometry" ] || fail "Hyprland never mapped ElyTree on $backend"
sleep 2
grim -g "$geometry" "$shot"
kill "$pid"
wait "$pid" 2>/dev/null || true
pid=
# An even #252525 page and the start page's words.
local page words
page=$(magick "$shot" -gravity center -crop 60%x30%+0+25% +repage -format \
'%[fx:max(abs(mean.r-0x25/255),max(abs(mean.g-0x25/255),abs(mean.b-0x25/255)))*255] %[fx:standard_deviation*255]' info:)
awk -v off="${page% *}" -v spread="${page#* }" 'BEGIN { exit !(off < 16 && spread < 6) }' ||
fail "ElyTree on $backend shows no even page (off by, spread: $page)"
words=$(tesseract "$shot" - 2>"$work/ocr.err") || fail "tesseract failed: $(cat "$work/ocr.err")"
grep -q 'Open a repository' <<<"$words" || fail "ElyTree on $backend shows no 'Open a repository': $words"
echo "linux: ElyTree shows on $backend"
}
ran=
if [ -n "${WAYLAND_DISPLAY:-}" ]; then
show wayland
ran=1
fi
if [ -n "${DISPLAY:-}" ]; then
show x11 -u WAYLAND_DISPLAY
ran=1
fi
[ -n "$ran" ] || echo "SKIP: no WAYLAND_DISPLAY or DISPLAY"
+96
View File
@@ -0,0 +1,96 @@
# Sourced by Linux window tests: inputs, cases and the judge.
# Case: slug, the words it shows, its input.
cases=("ely-doc|Kernel prose|prose.docx" "ely-table|Kernel cell|cells.xlsx" "ely-show|Click to add Title|" "ely-pdf|Packaged PDF|page.pdf"
"ely-tree|hello.txt|repo" "ely-mark|Packaged|note.md")
# Omarchy on Catppuccin; a repo, a note, a PDF.
linux_inputs() { # root, work
local fixtures=$1/crates/ely-ui/tests/fixtures/omarchy current=$2/omarchy/current
mkdir -p "$current/theme"
cp "$fixtures/catppuccin.toml" "$current/theme/colors.toml"
echo catppuccin >"$current/theme.name"
git init -q "$2/repo"
echo hi >"$2/repo/hello.txt"
printf '# Packaged on Linux\n\nEly reads this.\n' >"$2/note.md"
python3 - "$2/page.pdf" <<'PY'
import sys
text = b"BT /F1 36 Tf 72 700 Td (Packaged PDF) Tj ET"
objects = [
b"<< /Type /Catalog /Pages 2 0 R >>",
b"<< /Type /Pages /Kids [3 0 R] /Count 1 >>",
b"<< /Type /Page /Parent 2 0 R /MediaBox [0 0 612 792] /Contents 4 0 R"
b" /Resources << /Font << /F1 5 0 R >> >> >>",
b"<< /Length %d >>\nstream\n%s\nendstream" % (len(text), text),
b"<< /Type /Font /Subtype /Type1 /BaseFont /Helvetica >>",
]
out = bytearray(b"%PDF-1.4\n")
offsets = []
for number, body in enumerate(objects, 1):
offsets.append(len(out))
out += b"%d 0 obj\n%s\nendobj\n" % (number, body)
xref = len(out)
out += b"xref\n0 %d\n0000000000 65535 f \n" % (len(objects) + 1)
out += b"".join(b"%010d 00000 n \n" % offset for offset in offsets)
out += b"trailer\n<< /Size %d /Root 1 0 R >>\nstartxref\n%d\n%%%%EOF\n" % (len(objects) + 1, xref)
open(sys.argv[1], "wb").write(out)
PY
python3 - "$2" <<'PY'
import sys, zipfile
work = sys.argv[1]
types = '<?xml version="1.0" encoding="UTF-8"?><Types xmlns="http://schemas.openxmlformats.org/package/2006/content-types"><Default Extension="rels" ContentType="application/vnd.openxmlformats-package.relationships+xml"/><Default Extension="xml" ContentType="application/xml"/>%s</Types>'
rels = '<?xml version="1.0" encoding="UTF-8"?><Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships">%s</Relationships>'
rel = '<Relationship Id="%s" Type="http://schemas.openxmlformats.org/%s" Target="%s"/>'
main = "http://schemas.openxmlformats.org/%s"
with zipfile.ZipFile(work + "/prose.docx", "w") as doc:
doc.writestr("[Content_Types].xml", types % '<Override PartName="/word/document.xml" ContentType="application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml"/>')
doc.writestr("_rels/.rels", rels % rel % ("r1", "officeDocument/2006/relationships/officeDocument", "word/document.xml"))
doc.writestr("word/document.xml", '<?xml version="1.0" encoding="UTF-8"?><w:document xmlns:w="%s"><w:body><w:p><w:r><w:rPr><w:sz w:val="96"/></w:rPr><w:t>Kernel prose</w:t></w:r></w:p></w:body></w:document>' % (main % "wordprocessingml/2006/main"))
sheet = main % "spreadsheetml/2006/main"
with zipfile.ZipFile(work + "/cells.xlsx", "w") as book:
book.writestr("[Content_Types].xml", types % ('<Override PartName="/xl/workbook.xml" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml"/>'
'<Override PartName="/xl/worksheets/sheet1.xml" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml"/>'
'<Override PartName="/xl/styles.xml" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml"/>'))
book.writestr("_rels/.rels", rels % rel % ("r1", "officeDocument/2006/relationships/officeDocument", "xl/workbook.xml"))
book.writestr("xl/_rels/workbook.xml.rels", rels % (rel % ("r1", "officeDocument/2006/relationships/worksheet", "worksheets/sheet1.xml") + rel % ("r2", "officeDocument/2006/relationships/styles", "styles.xml")))
book.writestr("xl/workbook.xml", '<?xml version="1.0" encoding="UTF-8"?><workbook xmlns="%s" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships"><sheets><sheet name="Sheet1" sheetId="1" r:id="r1"/></sheets></workbook>' % sheet)
book.writestr("xl/styles.xml", '<?xml version="1.0" encoding="UTF-8"?><styleSheet xmlns="%s"><fonts count="2"><font><sz val="11"/><name val="Liberation Sans"/></font><font><sz val="36"/><name val="Liberation Sans"/></font></fonts><fills count="1"><fill><patternFill patternType="none"/></fill></fills><borders count="1"><border/></borders><cellStyleXfs count="1"><xf/></cellStyleXfs><cellXfs count="2"><xf fontId="0"/><xf fontId="1" applyFont="1"/></cellXfs></styleSheet>' % sheet)
book.writestr("xl/worksheets/sheet1.xml", '<?xml version="1.0" encoding="UTF-8"?><worksheet xmlns="%s"><cols><col min="2" max="2" width="40" customWidth="1"/></cols><sheetData><row r="3" ht="48" customHeight="1"><c r="B3" s="1" t="inlineStr"><is><t>Kernel cell</t></is></c></row></sheetData></worksheet>' % sheet)
PY
}
# Stops an app started with setsid, and all it started.
stop_app() { # pid
kill -- -"$1" 2>/dev/null || true
local found
for _ in $(seq 60); do
found=0
pgrep -s "$1" >/dev/null || found=$?
[ "$found" -eq 1 ] && return 0
[ "$found" -eq 0 ] || fail "pgrep failed with $found"
sleep 0.25
done
fail "processes of session $1 did not exit"
}
# Title bar: Catppuccin is blue-grey, Latte is light.
band() { magick "$1" -crop 100%x3%+0+0 +repage -format "%[fx:int(mean.$2*255)]" info:; }
judge() { # slug, screenshot, words, app log
local text
grep -q 'omarchy catppuccin applied' "$4" || fail "$1 did not apply the Omarchy theme"
case $1 in
ely-doc | ely-table | ely-show)
grep -q 'lok-worker: 1 documents open' "$4" || fail "$1's kernel opened no document"
! grep -q -E 'lok: tile.*failed' "$4" || fail "$1's kernel failed a tile"
;;
esac
local blue red
blue=$(band "$2" b) || fail "magick cannot read $2"
red=$(band "$2" r) || fail "magick cannot read $2"
[ $((blue - red)) -gt 10 ] || fail "$1's title bar is not Catppuccin"
# Dark text, twice the size: Xvfb draws at scale 1.
magick "$2" -colorspace Gray -negate -resize 200% "$2.ocr.png"
text=$(tesseract "$2.ocr.png" - 2>"$2.ocr") || fail "tesseract failed: $(cat "$2.ocr")"
grep -qi "$3" <<<"$text" || fail "$1 shows no '$3': $text"
}
+73
View File
@@ -0,0 +1,73 @@
#!/usr/bin/env bash
# deb on Ubuntu, rpm on Fedora: apps draw under Xvfb.
set -euo pipefail
root=$(cd "$(dirname "$0")/../.." && pwd)
dist=${ELY_DIST:-$root/dist}
fail() {
echo "FAIL: $*" >&2
exit 1
}
for tool in docker magick tesseract git python3; do
command -v "$tool" >/dev/null || {
echo "SKIP: no $tool"
exit 0
}
done
version=$(awk -F'"' '/^version = / { print $2; exit }' "$root/Cargo.toml")
work=$(mktemp -d)
trap 'rm -rf "$work"' EXIT
# shellcheck source=tests/scripts/linux-common.sh
. "$root/tests/scripts/linux-common.sh"
linux_inputs "$root" "$work"
# Xvfb, Mesa's software Vulkan and the X11 capture tools.
docker build -q -t ely-smoke-ubuntu - >/dev/null <<'EOF'
FROM ubuntu:26.04@sha256:f144425ff09be612d6d9ad965196e9cdc23dae1f42110a8a11a3e9a8198759f7
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
xvfb mesa-vulkan-drivers x11-apps x11-utils && rm -rf /var/lib/apt/lists/*
EOF
docker build -q -t ely-smoke-fedora - >/dev/null <<'EOF'
FROM fedora:44@sha256:43b29f65a41eb9c35e1cd5323e3bdf3b655c2357a9f4f1ff2f9c2798e5045d80
RUN dnf install -y -q xorg-x11-server-Xvfb mesa-vulkan-drivers xwd xwininfo && dnf clean all
EOF
# As the work dir's owner: Git and CEF refuse root.
inside='set -euo pipefail
slug=$1 work=$2 file=$3
shift 3
eval "$INSTALL /dist/$file" >/tmp/install.log 2>&1 || { tail -20 /tmp/install.log; exit 1; }
user=$(getent passwd "$OWNER" | cut -d: -f1) || { useradd -u "$OWNER" -m ely; user=ely; }
home=$(getent passwd "$user" | cut -d: -f6)
Xvfb :9 -screen 0 1280x800x24 >/tmp/xvfb.log 2>&1 &
for _ in $(seq 40); do [ -e /tmp/.X11-unix/X9 ] && break; sleep 0.25; done
runuser -u "$user" -- env DISPLAY=:9 ELY_OMARCHY_DIR="$work/omarchy/current" ELY_SMOKE=hold ELY_LOCALE=en-US \
HOME="$home" "/usr/bin/$slug" "$@" 2>"$work/$slug.err" &
pid=$!
id=
for _ in $(seq 120); do
id=$(xwininfo -display :9 -root -children | awk -v class="\"$slug\"" "index(\$0, class) { print \$1; exit }")
[ -n "$id" ] && break
kill -0 "$pid" 2>/dev/null || { echo "$slug quit"; exit 1; }
sleep 0.5
done
[ -n "$id" ] || { echo "$slug showed no window"; exit 1; }
sleep 8
kill -0 "$pid" 2>/dev/null || { echo "$slug quit after showing"; exit 1; }
xwd -display :9 -id "$id" -out "$work/$slug.xwd"
kill "$pid"'
run() { # image, install command, package file, slug, input
local slug=$4 shot=$work/$4.png args=()
[ -f "$dist/$3" ] || fail "no $dist/$3; run packaging/linux/package.sh $slug"
[ -z "$5" ] || args=("$work/$5")
docker run --rm -e INSTALL="$2" -e OWNER="$(id -u)" -v "$dist:/dist:ro" -v "$work:$work" "$1" \
bash -c "$inside" _ "$slug" "$work" "$3" "${args[@]}" ||
fail "$3 does not run in $1: $(tail -n 5 "$work/$slug.err" 2>/dev/null)"
magick "$work/$slug.xwd" "$shot"
judge "$slug" "$shot" "$6" "$work/$slug.err"
echo "linux: $3 shows '$6' in Catppuccin on ${1#ely-smoke-}"
}
for case in "${cases[@]}"; do
IFS='|' read -r slug words input <<<"$case"
run ely-smoke-ubuntu "apt-get update -q && apt-get install -y -q" "${slug}_$version-1_amd64.deb" "$slug" "$input" "$words"
run ely-smoke-fedora "dnf install -y -q" "$slug-$version-1.x86_64.rpm" "$slug" "$input" "$words"
done
+44
View File
@@ -0,0 +1,44 @@
#!/usr/bin/env bash
# Linux builds need glibc 2.43 at most, as Ubuntu 26.04.
set -euo pipefail
root=$(cd "$(dirname "$0")/../.." && pwd)
limit=2.43
fail() {
echo "FAIL: $*" >&2
exit 1
}
for tool in objdump readelf; do
command -v "$tool" >/dev/null || {
echo "SKIP: no $tool"
exit 0
}
done
release=$root/target/ubuntu/release
lo=$root/engines/lo-src/instdir/program
required=("$release"/ely-{doc,table,show,pdf,tree,mark,lok-worker,pdf-worker} "$lo/libmergedlo.so"
"$root/engines/git/bin/git" "$root/engines/cef/libcef.so")
for file in "${required[@]}"; do
[ -f "$file" ] || fail "no $file; build in packaging/linux/container.sh"
magic=$(head -c 4 "$file" | od -An -c | tr -d ' ') || fail "cannot read $file"
[ "$magic" = '177ELF' ] || fail "$file is not an ELF file"
done
list=$(mktemp)
trap 'rm -f "$list"' EXIT
find -L "$release"/ely-{doc,table,show,pdf,tree,mark,lok-worker,pdf-worker} "$lo" "$root/engines/git" \
"$root/engines/cef" -type f -print0 >"$list" || fail "cannot list every file"
checked=0
while IFS= read -r -d '' file; do
magic=$(head -c 4 "$file" | od -An -c | tr -d ' ') || fail "cannot read $file"
[ "$magic" = '177ELF' ] || continue
checked=$((checked + 1))
headers=$(readelf -lW "$file") || fail "readelf cannot read $file"
# Static binaries, like git-lfs, need no glibc.
grep -q ' DYNAMIC ' <<<"$headers" || continue
symbols=$(objdump -T "$file") || fail "objdump cannot read $file"
need=$(sed -n 's/.*GLIBC_\([0-9.]*\).*/\1/p' <<<"$symbols" | sort -V | tail -n 1)
[ -z "$need" ] && continue
[ "$(printf '%s\n%s\n' "$need" "$limit" | sort -V | tail -n 1)" = "$limit" ] ||
fail "${file#"$root"/} needs glibc $need, above $limit"
done <"$list"
echo "linux: $checked ELF files need glibc $limit at most"
+124
View File
@@ -0,0 +1,124 @@
#!/usr/bin/env bash
# Idle on Linux: ElyTree rereads neither theme, settings nor repo.
set -euo pipefail
root=$(cd "$(dirname "$0")/../.." && pwd)
fail() {
echo "FAIL: $*" >&2
exit 1
}
[ "$(uname)" = Linux ] || {
echo "SKIP: inotify is Linux"
exit 0
}
[ -n "${WAYLAND_DISPLAY:-}${DISPLAY:-}" ] || {
echo "SKIP: no display"
exit 0
}
for tool in inotifywait jq git; do
command -v "$tool" >/dev/null || {
echo "SKIP: no $tool"
exit 0
}
done
app=$(cargo build -q --locked --message-format=json --manifest-path "$root/Cargo.toml" -p ely-tree --bin ely-tree |
jq -r 'select(.reason == "compiler-artifact" and .target.name == "ely-tree") | .executable // empty')
[ -x "$app" ] || fail "Cargo reported no ElyTree binary"
work=$(mktemp -d)
pid=
spy=
trap '[ -z "$pid" ] || kill "$pid" 2>/dev/null; [ -z "$spy" ] || kill "$spy" 2>/dev/null; rm -rf "$work"' EXIT
current=$work/omarchy/current
mkdir -p "$current/theme" "$work/data/ElyOffice" "$work/bin"
cp "$root/crates/ely-ui/tests/fixtures/omarchy/catppuccin.toml" "$current/theme/colors.toml"
echo catppuccin >"$current/theme.name"
echo '{"version": 1}' >"$work/data/ElyOffice/settings.json"
repo=$work/repo
git init -q "$repo"
echo one >"$repo/a.txt"
git -C "$repo" add a.txt
git -C "$repo" -c user.name=t -c user.email=t@t commit -q -m one
real=$(command -v git)
printf '#!/bin/sh\necho "$*" >>"%s"\nexec "%s" "$@"\n' "$work/git.log" "$real" >"$work/bin/git"
chmod +x "$work/bin/git"
ELY_GIT="$work/bin/git" ELY_OMARCHY_DIR="$current" ELY_SMOKE=hold ELY_LOG=info HOME="$work" \
XDG_DATA_HOME="$work/data" "$app" "$repo" 2>"$work/app.err" &
pid=$!
statuses() { if [ -f "$work/git.log" ]; then grep -c '^status' "$work/git.log" || true; else echo 0; fi; }
for _ in $(seq 120); do
[ "$(statuses)" -gt 0 ] && break
kill -0 "$pid" 2>/dev/null || fail "ElyTree quit: $(tail -n 5 "$work/app.err")"
sleep 0.5
done
[ "$(statuses)" -gt 0 ] || fail "ElyTree never read the repo"
grep -q 'omarchy catppuccin applied' "$work/app.err" || fail "the Omarchy theme was not applied"
sleep 3
# Four quiet seconds: no reads, no git status.
idle() { # when
inotifywait -q -m -e open --format '%w%f' "$current" "$current/theme" "$work/data/ElyOffice" >"$work/opens" 2>/dev/null &
spy=$!
sleep 1
local before opens
before=$(statuses)
sleep 4
kill "$spy"
spy=
opens=$(grep -c -E '(colors\.toml|theme\.name|settings\.json)$' "$work/opens" || true)
[ "$opens" -eq 0 ] || fail "ElyTree $1 read the theme or settings $opens times: $(sort "$work/opens" | uniq -c)"
[ "$(statuses)" -eq "$before" ] || fail "ElyTree $1 ran git status $(($(statuses) - before)) more times"
echo "linux: ElyTree $1 reads nothing"
}
seen() { grep -c "$1" "$work/app.err" || true; }
logged() { # pattern, what; once more than before
local before=${3:-0}
for _ in $(seq 40); do
[ "$(seen "$1")" -gt "$before" ] && return
sleep 0.25
done
fail "ElyTree missed $2"
}
grown() { # what
for _ in $(seq 40); do
[ "$(statuses)" -gt "$before" ] && return
sleep 0.25
done
fail "ElyTree missed $1"
}
# Writes through a mapping: CLOSE_WRITE, no MODIFY.
mapped() { # file, old, new
python3 -I -c 'import mmap, sys
with open(sys.argv[1], "r+b") as f, mmap.mmap(f.fileno(), 0) as m:
at = m.find(sys.argv[2].encode())
assert at >= 0, sys.argv[2]
m[at:at + len(sys.argv[3])] = sys.argv[3].encode()
m.flush()' "$@"
}
idle "idle after opening"
# Omarchy's swap, a settings write, an edit; then quiet again.
mkdir "$current/next-theme"
cp "$root/crates/ely-ui/tests/fixtures/omarchy/gruvbox.toml" "$current/next-theme/colors.toml"
rm -rf "$current/theme"
mv "$current/next-theme" "$current/theme"
echo gruvbox >"$current/theme.name"
logged 'omarchy gruvbox applied' "Omarchy's theme swap"
echo '{"version": 1, "author": "Tester"}' >"$work/data/ElyOffice/settings.json"
logged 'settings: changed on disk' "a settings write"
before=$(statuses)
echo two >>"$repo/a.txt"
grown "an edit in the repo"
sleep 2
idle "idle after changes"
mapped "$current/theme.name" gruvbox Gruvbox
logged 'omarchy Gruvbox applied' "a mapped theme name"
changed=$(seen 'settings: changed on disk')
mapped "$work/data/ElyOffice/settings.json" Tester Testor
logged 'settings: changed on disk' "a mapped settings write" "$changed"
before=$(statuses)
mapped "$repo/a.txt" two Two
grown "a mapped edit in the repo"
echo "linux: ElyTree follows mapped writes"
+105
View File
@@ -0,0 +1,105 @@
#!/usr/bin/env bash
# Installed apps or AppImages show themed windows. Usage: linux-installed.sh <installed|appimage>
set -euo pipefail
root=$(cd "$(dirname "$0")/../.." && pwd)
mode=${1:?installed or appimage}
fail() {
echo "FAIL: $*" >&2
exit 1
}
[ "$(uname)" = Linux ] && [ -n "${WAYLAND_DISPLAY:-}" ] || {
echo "SKIP: needs a Wayland session"
exit 0
}
for tool in hyprctl grim magick tesseract jq git python3; do
command -v "$tool" >/dev/null || {
echo "SKIP: no $tool"
exit 0
}
done
version=$(awk -F'"' '/^version = / { print $2; exit }' "$root/Cargo.toml")
fixtures=$root/crates/ely-ui/tests/fixtures/omarchy
work=$(mktemp -d)
pid=
trap '[ -z "$pid" ] || stop_app "$pid"; rm -rf "$work"' EXIT
# shellcheck source=tests/scripts/linux-common.sh
. "$root/tests/scripts/linux-common.sh"
linux_inputs "$root" "$work"
current=$work/omarchy/current
program() { # slug
case $mode in
installed) echo "/usr/bin/$1" ;;
appimage)
local name
name=$(awk -F'\t' -v slug="$1" '$1 == slug { print $2 }' "$root/packaging/apps.tsv")
echo "$root/dist/$name-$version-linux-$(uname -m).AppImage"
;;
*) fail "mode is installed or appimage, not $mode" ;;
esac
}
# The one window's capture handle, once mapped.
window() {
local id
for _ in $(seq 120); do
id=$(hyprctl clients -j | jq -r --argjson pid "$pid" \
'[.[] | select(.pid == $pid and .mapped)] | if length == 1 then .[0].stableId else "" end') || {
echo "hyprctl or jq failed"
return 1
}
[ -n "$id" ] && {
echo "$id"
return
}
kill -0 "$pid" 2>/dev/null || {
echo "it quit"
return 1
}
sleep 0.5
done
echo "no single window"
return 1
}
shoot() { # slug, file; the window itself, wherever it is
local id
id=$(window) || fail "$1 showed no window ($id): $(tail -n 5 "$work/$1.err")"
sleep 4
grim -T "$id" "$2" || fail "grim cannot capture $1"
}
check() { # slug, words, args
local slug=$1 words=$2 exe shot=$work/$1.png
shift 2
exe=$(program "$slug")
[ -x "$exe" ] || fail "no $exe"
ELY_OMARCHY_DIR="$current" ELY_SMOKE=hold ELY_LOCALE=en-US HOME="$work" XDG_DATA_HOME="$work/data" \
setsid "$exe" "$@" 2>"$work/$slug.err" &
pid=$!
shoot "$slug" "$shot"
judge "$slug" "$shot" "$words" "$work/$slug.err"
if [ "$slug" = ely-tree ]; then
# Omarchy's swap: the open window follows.
mkdir "$current/next-theme"
cp "$fixtures/catppuccin-latte.toml" "$current/next-theme/colors.toml"
rm -rf "$current/theme"
mv "$current/next-theme" "$current/theme"
echo catppuccin-latte >"$current/theme.name"
sleep 2
shoot "$slug" "$shot"
red=$(band "$shot" r) || fail "magick cannot read $shot"
[ "$red" -gt 180 ] || fail "$slug did not follow Omarchy to Latte"
cp "$fixtures/catppuccin.toml" "$current/theme/colors.toml"
echo catppuccin >"$current/theme.name"
fi
stop_app "$pid"
pid=
echo "linux: $mode $slug shows '$words' in Catppuccin"
}
for case in "${cases[@]}"; do
IFS='|' read -r slug words input <<<"$case"
if [ -n "$input" ]; then
check "$slug" "$words" "$work/$input"
else
check "$slug" "$words"
fi
done
+105
View File
@@ -0,0 +1,105 @@
#!/usr/bin/env bash
# Idle on Linux: ElyMark rereads no theme, settings or file.
set -euo pipefail
root=$(cd "$(dirname "$0")/../.." && pwd)
fail() {
echo "FAIL: $*" >&2
exit 1
}
[ "$(uname)" = Linux ] || {
echo "SKIP: inotify is Linux"
exit 0
}
[ -n "${WAYLAND_DISPLAY:-}${DISPLAY:-}" ] || {
echo "SKIP: no display"
exit 0
}
for tool in inotifywait jq hyprctl grim magick tesseract; do
command -v "$tool" >/dev/null || {
echo "SKIP: no $tool"
exit 0
}
done
[ -f "$root/engines/cef/libcef.so" ] || fail "no engines/cef; run scripts/fetch-cef.sh"
[ -f "$root/engines/content/ely-mark/index.html" ] || fail "no ElyMark page; run scripts/build-mark-content.sh"
app=$(cargo build -q --locked --message-format=json --manifest-path "$root/Cargo.toml" -p ely-mark --bin ely-mark |
jq -r 'select(.reason == "compiler-artifact" and .target.name == "ely-mark") | .executable // empty')
[ -x "$app" ] || fail "Cargo reported no ElyMark binary"
work=$(mktemp -d)
pid=
spy=
trap '[ -z "$spy" ] || kill "$spy" 2>/dev/null; [ -z "$pid" ] || stop_app "$pid"; rm -rf "$work"' EXIT
# shellcheck source=tests/scripts/linux-common.sh
. "$root/tests/scripts/linux-common.sh"
current=$work/omarchy/current
mkdir -p "$current/theme" "$work/data/ElyOffice" "$work/notes"
cp "$root/crates/ely-ui/tests/fixtures/omarchy/catppuccin.toml" "$current/theme/colors.toml"
echo catppuccin >"$current/theme.name"
echo '{"version": 1}' >"$work/data/ElyOffice/settings.json"
note=$work/notes/note.md
printf '# Idle\n\nNothing moves.\n' >"$note"
LD_LIBRARY_PATH="$root/engines/cef" ELY_OMARCHY_DIR="$current" ELY_SMOKE=hold ELY_LOG=info HOME="$work" \
XDG_DATA_HOME="$work/data" setsid "$app" "$note" 2>"$work/app.err" &
pid=$!
seen() { grep -c "$1" "$work/app.err" || true; }
logged() { # pattern, what, count before
local before=${3:-0}
for _ in $(seq 120); do
[ "$(seen "$1")" -gt "$before" ] && return
kill -0 "$pid" 2>/dev/null || fail "ElyMark quit: $(tail -n 5 "$work/app.err")"
sleep 0.25
done
fail "ElyMark missed $2"
}
logged 'mark: watching 1 folders' "its file's folder"
logged 'omarchy catppuccin applied' "the Omarchy theme"
sleep 3
# Four quiet seconds: nothing opens the theme, settings or note.
idle() { # when
inotifywait -q -m -e open --format '%w%f' "$current" "$current/theme" "$work/data/ElyOffice" "$work/notes" \
>"$work/opens" 2>/dev/null &
spy=$!
for _ in 1 2 3 4 5; do
sleep 1
kill -0 "$pid" 2>/dev/null || fail "ElyMark quit while $1: $(tail -n 5 "$work/app.err")"
done
kill "$spy"
spy=
local opens
opens=$(grep -c -E '(colors\.toml|theme\.name|settings\.json|note\.md)$' "$work/opens" || true)
[ "$opens" -eq 0 ] || fail "ElyMark $1 opened files $opens times: $(sort "$work/opens" | uniq -c)"
echo "linux: ElyMark $1 reads nothing"
}
idle "idle after start"
mkdir "$current/next-theme"
cp "$root/crates/ely-ui/tests/fixtures/omarchy/gruvbox.toml" "$current/next-theme/colors.toml"
rm -rf "$current/theme"
mv "$current/next-theme" "$current/theme"
echo gruvbox >"$current/theme.name"
logged 'omarchy gruvbox applied' "Omarchy's theme swap"
echo '{"version": 1, "author": "Tester"}' >"$work/data/ElyOffice/settings.json"
logged 'settings: changed on disk' "a settings write"
changed=$(seen 'changed outside')
printf '# Idle\n\nSomething moved.\n' >"$note"
logged 'changed outside' "an outside edit" "$changed"
# The window shows the new words.
shown=
for _ in $(seq 20); do
kill -0 "$pid" 2>/dev/null || fail "ElyMark quit: $(tail -n 5 "$work/app.err")"
id=$(hyprctl clients -j | jq -r --argjson pid "$pid" '[.[] | select(.pid == $pid and .mapped)][0].stableId // empty')
if [ -n "$id" ]; then
grim -T "$id" "$work/shot.png" 2>"$work/grim.err" || fail "grim failed: $(cat "$work/grim.err")"
magick "$work/shot.png" -colorspace Gray -negate "$work/ocr.png"
text=$(tesseract "$work/ocr.png" - 2>"$work/ocr.err") || fail "tesseract failed: $(cat "$work/ocr.err")"
grep -q 'moved' <<<"$text" && shown=1 && break
fi
sleep 0.5
done
[ -n "$shown" ] || fail "ElyMark does not show the outside edit"
sleep 2
idle "idle after changes"
+65
View File
@@ -0,0 +1,65 @@
#!/usr/bin/env bash
# deb, rpm and Arch packages install cleanly and link.
set -euo pipefail
root=$(cd "$(dirname "$0")/../.." && pwd)
dist=${ELY_DIST:-$root/dist}
fail() {
echo "FAIL: $*" >&2
exit 1
}
command -v docker >/dev/null || {
echo "SKIP: no docker"
exit 0
}
version=$(awk -F'"' '/^version = / { print $2; exit }' "$root/Cargo.toml")
batch=$(awk -F'\t' '$4 == 1 { print $1 }' "$root/packaging/apps.tsv")
# Entry points exist; every ELF file finds its libraries.
check='set -euo pipefail
slug=$1
entry=/opt/ely-office/$slug/bin/$slug
[ -x "/usr/bin/$slug" ] || { echo "no /usr/bin/$slug"; exit 1; }
[ "$(readlink -f "/usr/bin/$slug")" = "$entry" ] || { echo "bad /usr/bin/$slug"; exit 1; }
[ -f "/usr/share/applications/$slug.desktop" ] || { echo "no desktop entry"; exit 1; }
[ -f "/usr/share/icons/hicolor/512x512/apps/$slug.png" ] || { echo "no icon"; exit 1; }
for lib in libvulkan.so.1 libwayland-client.so.0; do
ldconfig -p | grep "$lib" >/dev/null || { echo "no $lib"; exit 1; }
done
ldd "$entry" >/dev/null || { echo "$entry is not a dynamic executable"; exit 1; }
find "/opt/ely-office/$slug" -type f -print0 >/tmp/files || { echo "cannot list files"; exit 1; }
checked=0
while IFS= read -r -d "" file; do
magic=$(head -c 4 "$file" | od -An -c | tr -d " ") || { echo "cannot read $file"; exit 1; }
[ "$magic" = 177ELF ] || continue
checked=$((checked + 1))
if ! out=$(ldd "$file" 2>&1); then
# git-lfs is static Go: it must run.
[ "${file##*/}" = git-lfs ] && "$file" version >/dev/null && continue
echo "$file: $out"; exit 1
fi
if [[ $out == *"not found"* ]]; then
echo "$file:"; printf "%s\n" "$out" | grep "not found"; exit 1
fi
done </tmp/files
[ "$checked" -gt 0 ] || { echo "no ELF files"; exit 1; }
echo "$slug: $checked ELF files link"'
run() { # image, install command, package file, slug
docker run --rm -v "$dist:/dist:ro" "$1" bash -c "{ $2 /dist/${3##*/}; } >/tmp/install.log 2>&1 ||
{ tail -20 /tmp/install.log; exit 1; }; bash -c '$check' _ $4" ||
fail "$3 does not install or link in $1"
}
ubuntu=ubuntu:26.04@sha256:f144425ff09be612d6d9ad965196e9cdc23dae1f42110a8a11a3e9a8198759f7
fedora=fedora:44@sha256:43b29f65a41eb9c35e1cd5323e3bdf3b655c2357a9f4f1ff2f9c2798e5045d80
arch=archlinux@sha256:4e77cf2ea5f410e6f8be5abf93ccf17ce2436e87a138c167208356711a405dbd
for slug in $batch; do
deb=$dist/${slug}_$version-1_amd64.deb
rpm=$dist/$slug-$version-1.x86_64.rpm
pkg=$dist/$slug-$version-1-x86_64.pkg.tar.zst
for file in "$deb" "$rpm" "$pkg"; do
[ -f "$file" ] || fail "no $file; run packaging/linux/package.sh $slug"
done
run "$ubuntu" "apt-get update -q && apt-get install -y -q" "$deb" "$slug"
run "$fedora" "dnf install -y -q" "$rpm" "$slug"
run "$arch" "pacman -Sy --noconfirm && pacman -U --noconfirm" "$pkg" "$slug"
done
echo "linux-packages: deb, rpm and Arch packages install and link"
@@ -1,9 +1,9 @@
#!/usr/bin/env bash
# Every AppImage tool the recipe downloads matches its pinned hash.
# Every Linux packaging tool downloaded matches its pinned hash.
set -euo pipefail
root=$(cd "$(dirname "$0")/../.." && pwd)
script=$root/packaging/linux/appimage.sh
script=$root/packaging/linux/package.sh
fail() {
echo "FAIL: $*" >&2
exit 1
@@ -12,18 +12,22 @@ fail() {
pack=https://github.com/AppImage/appimagetool/releases/download/1.9.1
deploy=https://github.com/linuxdeploy/linuxdeploy/releases/download/1-alpha-20251107-1
runtime=https://github.com/AppImage/type2-runtime/releases/download/20251108
nfpm=https://github.com/goreleaser/nfpm/releases/download/v2.47.0
curl -fsSI --max-time 20 "$pack/appimagetool-x86_64.AppImage" >/dev/null 2>&1 || {
echo "SKIP appimage-pins: GitHub is not reachable"
echo "SKIP linux-pins: GitHub is not reachable"
exit 0
}
grep -q "$pack/appimagetool-\$arch.AppImage" "$script" || fail "the script downloads another appimagetool"
grep -q "$deploy/linuxdeploy-\$arch.AppImage" "$script" || fail "the script downloads another linuxdeploy"
grep -q "$runtime/runtime-\$arch" "$script" || fail "the script downloads another runtime"
grep -q "$nfpm/nfpm_2.47.0_Linux_\$nfpm_arch.tar.gz" "$script" || fail "the script downloads another nfpm"
grep -q -- '--runtime-file "\$runtime"' "$script" || fail "appimagetool fetches its own runtime"
for arch in x86_64 aarch64; do
for url in "$pack/appimagetool-$arch.AppImage" "$deploy/linuxdeploy-$arch.AppImage" "$runtime/runtime-$arch"; do
for pair in x86_64:x86_64 aarch64:arm64; do
arch=${pair%:*}
for url in "$pack/appimagetool-$arch.AppImage" "$deploy/linuxdeploy-$arch.AppImage" "$runtime/runtime-$arch" \
"$nfpm/nfpm_2.47.0_Linux_${pair#*:}.tar.gz"; do
sha=$(curl -fsSL "$url" | shasum -a 256 | cut -d' ' -f1)
grep -q "$sha" "$script" || fail "$url has sha256 $sha, which the script does not pin"
done
done
echo "appimage-pins: 6 downloads match their pins"
echo "linux-pins: 8 downloads match their pins"
+3 -2
View File
@@ -22,7 +22,8 @@ while IFS=$'\t' read -r slug name; do
[ -d "$dist/$name.app" ] || fail "no $dist/$name.app; run packaging/macos/release.sh"
done <<<"$apps"
version=$(awk -F'"' '/^version = / { print $2; exit }' "$root/Cargo.toml")
source=$dist/ElyOffice-$version-source.tar.gz
commit=$(git -C "$root" rev-parse --short=12 HEAD)
source=$dist/ElyOffice-$version-$commit-source.tar.gz
[ -s "$source" ] || fail "no $source; run packaging/macos/release.sh"
listed=$(tar -tzf "$source")
for part in LICENSE Cargo.lock patches/libreoffice/ patches/mupdf/ scripts/fetch-references.sh scripts/build-git.sh; do
@@ -32,7 +33,7 @@ for part in agents.md PRD.md tasks/; do
! grep -qx "ElyOffice-$version/$part" <<<"$listed" || fail "the source archive has the internal $part"
done
# Copyleft upstream as built: MuPDF with our patches, and Git.
upstream=$dist/ElyOffice-$version-upstream-source.tar.gz
upstream=$dist/ElyOffice-$version-$commit-upstream-source.tar.gz
[ -s "$upstream" ] || fail "no $upstream; run packaging/macos/release.sh"
for part in mupdf-src/COPYING git/COPYING git/GIT-VERSION-GEN; do
tar -tzf "$upstream" "$part" >/dev/null 2>&1 || fail "the upstream archive lacks $part"
+1 -1
View File
@@ -10,7 +10,7 @@ fail() {
}
count=0
for slug in $(cut -f1 "$types" | sort -u); do
desktop=$("$root/packaging/linux/appimage.sh" --desktop "$slug")
desktop=$("$root/packaging/linux/package.sh" --desktop "$slug")
windows=$("$root/packaging/windows/types.sh" "$slug")
rows=$(awk -F'\t' -v slug="$slug" '$1 == slug' "$types")
while IFS=$'\t' read -r _ ext mime; do