Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/modification/2026-10-31-openclaw-tools-image.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,11 @@ Debian 套件在 amd64 與 arm64 上的版本相同。

| 類別 | 套件與版本 |
|------|------------|
| Office | `libreoffice-core`、`libreoffice-writer`、`libreoffice-calc`、`libreoffice-impress` `4:25.2.3-2+deb13u12` |
| Office | `libreoffice-core`、`libreoffice-writer`、`libreoffice-calc`、`libreoffice-impress` `4:26.8.3.1-0+deb13u1` |
| PDF 與轉檔 | `pandoc 3.1.11.1+ds-2`、`poppler-utils 25.03.0-5+deb13u4`、`qpdf 12.2.0-1`、`ghostscript 10.05.1~dfsg-1+deb13u3` |
| OCR | `tesseract-ocr 5.5.0-1+b1`;語言資料 `eng`、`chi-tra`、`chi-sim` `1:4.1.0-2` |
| 圖片與影音 | `imagemagick 8:7.1.1.43+dfsg1-1+deb13u14`(提供 `magick`)、`ffmpeg 7:7.1.5-0+deb13u1`(含 `ffprobe`)、`libimage-exiftool-perl 13.25+dfsg-1` |
| 瀏覽器 | `chromium`、`chromium-common` `156.0.8078.108-1~deb13u1`,固定在 `apt-packages-browser.txt` |
| 瀏覽器 | `chromium`、`chromium-common` `156.0.8078.114-1~deb13u1`,固定在 `apt-packages-browser.txt` |
| 字型 | `fontconfig 2.15.0-2.3`、`fonts-noto-cjk 1:20240730+repack1-1`、`fonts-liberation 1:2.1.5-3`、`fonts-dejavu-core 2.37-8` |
| Workspace | `zip 3.0-15+deb13u1`、`unzip 6.0-29+deb13u1`、`ripgrep 14.1.1-1+b4`、`sqlite3 3.46.1-7+deb13u2` |
| 執行期函式庫 | `libicu76 76.1-4`(officecli 需要) |
Expand Down
43 changes: 43 additions & 0 deletions test/tools-image-apt-pins.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
// SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
// SPDX-License-Identifier: Apache-2.0
//
// Debian removes the previous version from trixie-security when it publishes a
// replacement, so related pins and the fixture version check must change
// together (#85, #92). These checks fail on a partial update.
import fs from "node:fs";
import path from "node:path";
import { describe, expect, it } from "vitest";

const TOOLS = path.resolve(import.meta.dirname, "../tools/openclaw-tools-image");

function pins(file: string): Map<string, string> {
const result = new Map<string, string>();
for (const line of fs.readFileSync(path.join(TOOLS, file), "utf8").split("\n")) {
const entry = line.trim();
if (!entry || entry.startsWith("#")) continue;
const [name, version] = entry.split("=", 2);
result.set(name, version);
}
return result;
}

describe("tools image apt pins (#92)", () => {
it("pins chromium and chromium-common together and checks that release in the fixture", () => {
const browser = pins("apt-packages-browser.txt");
const chromium = browser.get("chromium");
expect(chromium).toMatch(/^\d+\.\d+\.\d+\.\d+-/);
expect(browser.get("chromium-common")).toBe(chromium);
const upstream = chromium!.split("-")[0];
const fixture = fs.readFileSync(path.join(TOOLS, "fixtures/run-phase3.sh"), "utf8");
expect(fixture).toContain(`chromium --version | grep -F ${upstream}`);
});

it("pins every LibreOffice package at one version", () => {
const apt = pins("apt-packages.txt");
const versions = new Set(
[...apt].filter(([name]) => name.startsWith("libreoffice-")).map(([, version]) => version),
);
expect(apt.has("libreoffice-core")).toBe(true);
expect(versions.size).toBe(1);
});
});
6 changes: 4 additions & 2 deletions tools/openclaw-tools-image/apt-packages-browser.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,7 @@
# 156.0.8078.108-1~deb13u1 on amd64 and arm64 (#85). Pin chromium-common
# with chromium: apt 3.0 does not pick an older chromium-common on its own
# while the base image's controlled packages are held.
chromium=156.0.8078.108-1~deb13u1
chromium-common=156.0.8078.108-1~deb13u1
# By 2026-12-03, trixie-security had replaced 156.0.8078.108-1~deb13u1 with
# 156.0.8078.114-1~deb13u1 on amd64 and arm64 (#92).
chromium=156.0.8078.114-1~deb13u1
chromium-common=156.0.8078.114-1~deb13u1
14 changes: 10 additions & 4 deletions tools/openclaw-tools-image/apt-packages.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@
# trixie-security on amd64 and arm64.
# 2026-11-19: Debian removed LibreOffice 4:25.2.3-2+deb13u9 from
# trixie-security; the LibreOffice packages now use deb13u12.
# By 2026-12-03, trixie-security had replaced 4:25.2.3-2+deb13u12 with
# 4:26.8.3.1-0+deb13u1 on amd64 and arm64; trixie still has only
# 4:25.2.3-2+deb13u9 (#92). libreoffice-core 4:26.8.3.1-0+deb13u1 depends on
# libexpat1 (>= 2.9.0). Dockerfile.base installs libexpat1 2.9.0-1~deb13u1;
# agents/hermes-01x/Dockerfile.base installs 2.8.3-1, so the Hermes tools
# image cannot install this release until its base changes.
# Install with --no-install-recommends. jq and libsqlite3-0 come from the base.
ffmpeg=7:7.1.5-0+deb13u1
fontconfig=2.15.0-2.3
Expand All @@ -18,10 +24,10 @@ ghostscript=10.05.1~dfsg-1+deb13u3
imagemagick=8:7.1.1.43+dfsg1-1+deb13u14
libicu76=76.1-4
libimage-exiftool-perl=13.25+dfsg-1
libreoffice-calc=4:25.2.3-2+deb13u12
libreoffice-core=4:25.2.3-2+deb13u12
libreoffice-impress=4:25.2.3-2+deb13u12
libreoffice-writer=4:25.2.3-2+deb13u12
libreoffice-calc=4:26.8.3.1-0+deb13u1
libreoffice-core=4:26.8.3.1-0+deb13u1
libreoffice-impress=4:26.8.3.1-0+deb13u1
libreoffice-writer=4:26.8.3.1-0+deb13u1
pandoc=3.1.11.1+ds-2
poppler-utils=25.03.0-5+deb13u4
qpdf=12.2.0-1
Expand Down
2 changes: 1 addition & 1 deletion tools/openclaw-tools-image/fixtures/run-phase3.sh
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ PY

chromium_cli() {
write_page
chromium --version | grep -F 156.0.8078.108
chromium --version | grep -F 156.0.8078.114
chromium --headless --no-sandbox --disable-gpu --disable-dev-shm-usage \
--user-data-dir="$WORK/chromium-profile" --window-size=800,600 \
--screenshot="$WORK/chromium-cli.png" "file://$WORK/page.html"
Expand Down
Loading