Agent Zero AI framework
Fix v2.13 desktop dependency installation
Alessandroe3051fb584b1
diff --git a/docker/run/AGENTS.md b/docker/run/AGENTS.mdindex b043ed54e..d1ae9b86b 100644--- a/docker/run/AGENTS.md+++ b/docker/run/AGENTS.md@@ -19,7 +19,7 @@- `BRANCH` is required for branch-based Docker builds.- Preserve exposed ports for SSH, HTTP, and tunneled services unless docs and workflows are updated together.- Keep the two-runtime Python model aligned with the root contract.-- Keep runtime desktop packages on `kali-last-snapshot`; align ATK's version-locked libraries and installed optional components with the pinned snapshot version, and pin the verified LibreOffice and complete Xpra runtime versions in `fs/ins/install_additional.sh` for both published architectures. Let those package dependencies constrain Python compatibility; do not depend on retired rolling package versions remaining downloadable.+- For v2.13 builds, retain the Python 3.13-compatible ATK, LibreOffice/UNO, and Xpra pins in `fs/ins/install_additional.sh`. Resolve them from the signed Debian `forky` archive dated `20260624T000000Z` and Xpra `trixie`, using build-scoped APT options that preserve normal Kali sources.- Do not bake secrets, local `.env` values, or user data into the image.- Runtime startup must ensure `/a0/usr/uploads` exists before supervised services start.- Runtime startup raises the soft open-file limit toward `A0_NOFILE_LIMIT` (default `65535`) before supervisord starts, bounded by the container hard limit.diff --git a/docker/run/fs/ins/install_additional.sh b/docker/run/fs/ins/install_additional.shindex bd48a447d..d88ea7665 100644--- a/docker/run/fs/ins/install_additional.sh+++ b/docker/run/fs/ins/install_additional.sh@@ -12,7 +12,6 @@ if ! command -v apt-get >/dev/null 2>&1; thenexit 0fi-KALI_SUITE="kali-last-snapshot"ATK_VERSION="2.60.3-1"LIBREOFFICE_VERSION="4:26.2.4.2-1"XPRA_VERSION="6.5.2-r0-1"@@ -53,12 +52,15 @@ XPRA_PACKAGES=("xpra-html5=$XPRA_HTML5_VERSION")-for source in /etc/apt/sources.list /etc/apt/sources.list.d/kali.sources; do- [ ! -f "$source" ] || sed -i "s/kali-rolling/$KALI_SUITE/g" "$source"-done+# Keep the Python 3.13 desktop stack on a signed, dated archive. Kali's+# last-snapshot moves between releases and no longer carries these versions.+cat >/etc/apt/a0-desktop.list <<EOF+deb [check-valid-until=no signed-by=/usr/share/keyrings/debian-archive-keyring.gpg] https://snapshot.debian.org/archive/debian/20260624T000000Z/ forky main+EOF+APT_OPTIONS=(-o Dir::Etc::sourcelist=/etc/apt/a0-desktop.list -o Dir::Etc::sourceparts=- -o APT::Update::Error-Mode=any)-apt-get update-DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends ca-certificates wget+apt-get "${APT_OPTIONS[@]}" update+DEBIAN_FRONTEND=noninteractive apt-get "${APT_OPTIONS[@]}" install -y --no-install-recommends ca-certificates wgetwget -O /usr/share/keyrings/xpra.asc https://xpra.org/xpra.asccat >/etc/apt/sources.list.d/xpra.sources <<EOFTypes: deb@@ -68,8 +70,9 @@ Components: mainSigned-By: /usr/share/keyrings/xpra.ascArchitectures: $archEOF-apt-get update-DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends --allow-downgrades \+echo "deb [arch=$arch signed-by=/usr/share/keyrings/xpra.asc] https://xpra.org trixie main" >>/etc/apt/a0-desktop.list+apt-get "${APT_OPTIONS[@]}" update+DEBIAN_FRONTEND=noninteractive apt-get "${APT_OPTIONS[@]}" install -y --no-install-recommends --allow-downgrades \"${ATK_PACKAGES[@]}" \gir1.2-gtk-3.0 \"${LIBREOFFICE_PACKAGES[@]}" \diff --git a/tests/test_browser_agent_regressions.py b/tests/test_browser_agent_regressions.pyindex 9eca5f464..ce5fb208e 100644--- a/tests/test_browser_agent_regressions.py+++ b/tests/test_browser_agent_regressions.py@@ -2730,7 +2730,8 @@ def test_browser_docker_pins_python_313_compatible_desktop_packages():PROJECT_ROOT / "docker" / "run" / "fs" / "ins" / "install_additional.sh").read_text(encoding="utf-8")- assert 'KALI_SUITE="kali-last-snapshot"' in install_additional+ assert 'https://snapshot.debian.org/archive/debian/20260624T000000Z/' in install_additional+ assert 'Dir::Etc::sourceparts=-' in install_additionalassert 'LIBREOFFICE_VERSION="4:26.2.4.2-1"' in install_additionalassert 'XPRA_VERSION="6.5.2-r0-1"' in install_additionalassert 'XPRA_HTML5_VERSION="19-r1-1"' in install_additional@@ -2749,7 +2750,7 @@ def test_browser_docker_pins_python_313_compatible_desktop_packages():assert '"xpra-server=$XPRA_VERSION"' in install_additionalassert '"xpra-html5=$XPRA_HTML5_VERSION"' in install_additionalassert "apt-get download" not in install_additional- assert install_additional.index('s/kali-rolling/$KALI_SUITE') < install_additional.index("apt-get update")+ assert install_additional.index('cat >/etc/apt/a0-desktop.list') < install_additional.index('apt-get "${APT_OPTIONS[@]}" update')assert "https://xpra.org/beta" not in install_additionaldiff --git a/tests/test_system_packages.py b/tests/test_system_packages.pyindex 99ad9eed4..5ab4984d7 100644--- a/tests/test_system_packages.py+++ b/tests/test_system_packages.py@@ -62,7 +62,12 @@ def test_desktop_install_script_uses_compatible_architecture_packages(tmp_path,log = tmp_path / "apt.log"stubs = r'''apt-get() {- [[ "$(<"$SIM_ROOT/etc/apt/sources.list")" != *kali-rolling* ]] || return 1+ [[ "$(<"$SIM_ROOT/etc/apt/sources.list")" == *kali-rolling* ]] || return 1+ [[ "$*" == *"Dir::Etc::sourcelist=$SIM_ROOT/etc/apt/a0-desktop.list"* ]] || return 1+ [[ "$*" == *"Dir::Etc::sourceparts=-"* ]] || return 1+ grep -q "signed-by=$SIM_ROOT/usr/share/keyrings/debian-archive-keyring.gpg" "$SIM_ROOT/etc/apt/a0-desktop.list" || return 1+ grep -q 'snapshot.debian.org/archive/debian/20260624T000000Z/' "$SIM_ROOT/etc/apt/a0-desktop.list" || return 1+ while [[ "$1" == -o ]]; do shift 2; doneprintf '%s\0' "$@" >> "$SIM_ROOT/apt.log"printf '\0' >> "$SIM_ROOT/apt.log"}@@ -93,3 +98,4 @@ wget() { return 0; }assert "gir1.2-atk-1.0=2.60.3-1" in installs[-1]assert ("at-spi2-core=2.60.3-1" in installs[-1]) == (arch == "arm64")assert f"Architectures: {arch}\n" in (tmp_path / "etc/apt/sources.list.d/xpra.sources").read_text()+ assert f"arch={arch}" in (tmp_path / "etc/apt/a0-desktop.list").read_text()