GRI-2102: install soffice, gs and ffmpeg on every server path, warn when one is missing #243

Merged
vivy merged 6 commits from fix/GRI-2102-install-converters into dev 2026-11-15 21:44:34 +00:00
Member

Closes #229.

What was wrong

install.sh installed poppler-utils only, so on a native server every PowerPoint upload failed with "soffice is not installed". gs and ffmpeg, which pptx_video.rs also calls, were missing too. Installing the package alone would not have been enough: the systemd unit runs the server as a DynamicUser with ProtectHome=yes, so soffice has no home to create its profile in and exits 77 ("User installation could not be completed").

What changed

  • install.sh — one list, SERVER_CONVERTER_PACKAGES="poppler-utils libreoffice-impress ghostscript ffmpeg", installed by server_native. upgrade server reruns the same function, so the upgrade path gets them too.
  • packaging/server/Dockerfile — the image installs the same four, --no-install-recommends (headless, no Java).
  • pptx_video.rs — soffice gets its own profile per conversion inside work_dir through -env:UserInstallation=file://… (percent-encoded). One per conversion because LibreOffice locks its profile, so two uploads at once would collide.
  • main.rs — at start-up the server logs one warning: line per converter it cannot find (ffmpeg only while MP4 is enabled), naming the path it looked for and what stops working.
  • scripts/tests/install-server-converters-test.sh — checks that the native and image paths both install every converter the server calls. Wired into local-gates.sh and CI.
  • plan/operations/deployment.md — the manual native command lists all four.

Evidence

  • On this host's real LibreOffice 24.2.7, with HOME not writable: without the argument soffice exits 77. With it, and also with a path containing a space (render%20dir), it exits 0 and writes the PDF.
  • The new test passes 12/12 on this branch and fails on dev.
  • ./scripts/local-gates.sh --rust-only on 05c0e69: exit 0, every gate passed. The front end is untouched.
Closes #229. ## What was wrong `install.sh` installed `poppler-utils` only, so on a native server every PowerPoint upload failed with *"soffice is not installed"*. `gs` and `ffmpeg`, which `pptx_video.rs` also calls, were missing too. Installing the package alone would not have been enough: the systemd unit runs the server as a `DynamicUser` with `ProtectHome=yes`, so `soffice` has no home to create its profile in and exits 77 (*"User installation could not be completed"*). ## What changed - **install.sh** — one list, `SERVER_CONVERTER_PACKAGES="poppler-utils libreoffice-impress ghostscript ffmpeg"`, installed by `server_native`. `upgrade server` reruns the same function, so the upgrade path gets them too. - **packaging/server/Dockerfile** — the image installs the same four, `--no-install-recommends` (headless, no Java). - **pptx_video.rs** — `soffice` gets its own profile per conversion inside `work_dir` through `-env:UserInstallation=file://…` (percent-encoded). One per conversion because LibreOffice locks its profile, so two uploads at once would collide. - **main.rs** — at start-up the server logs one `warning:` line per converter it cannot find (`ffmpeg` only while MP4 is enabled), naming the path it looked for and what stops working. - **scripts/tests/install-server-converters-test.sh** — checks that the native and image paths both install every converter the server calls. Wired into `local-gates.sh` and CI. - **plan/operations/deployment.md** — the manual native command lists all four. ## Evidence - On this host's real LibreOffice 24.2.7, with `HOME` not writable: without the argument `soffice` exits **77**. With it, and also with a path containing a space (`render%20dir`), it exits **0** and writes the PDF. - The new test passes 12/12 on this branch and fails on `dev`. - `./scripts/local-gates.sh --rust-only` on `05c0e69`: exit 0, every gate passed. The front end is untouched.
GRI-2102: install soffice, gs and ffmpeg on every server path, warn when one is missing
Some checks failed
CI / the pre-push hook (pull_request) Successful in 4s
CI / install.sh client upgrade (pull_request) Successful in 8s
CI / cargo fmt (pull_request) Successful in 3s
CI / cargo deny (pull_request) Successful in 14s
CI / cargo deny advisories (pull_request) Successful in 17s
CI / repository boundary (pull_request) Successful in 6s
CI / cargo clippy (pull_request) Successful in 1m38s
CI / frontend-web (pull_request) Successful in 1m20s
CI / cargo test (pull_request) Failing after 2m25s
CI / CI (pull_request) Failing after 2s
CI / Notify gate failed (pull_request) Successful in 1s
05c0e69630
install.sh installed only poppler-utils, so every PowerPoint upload on a
native install failed with "soffice is not installed" (forge #229).

- install.sh: SERVER_CONVERTER_PACKAGES (poppler-utils, libreoffice-impress,
  ghostscript, ffmpeg), installed by server_native, which upgrade runs too.
- Dockerfile: the runtime image installs the same list.
- soffice gets its own profile in the work dir via -env:UserInstallation;
  under the shipped unit (DynamicUser, ProtectHome) it cannot create one in
  HOME and exits 77.
- The server logs one warning per missing converter at start-up.
- scripts/tests/install-server-converters-test.sh holds both install paths
  to the list; wired into local-gates.sh and CI.
vivy requested changes 2026-11-15 18:29:04 +00:00
Dismissed
vivy left a comment

The design is right (one package list, a profile per conversion, the start-up warning). CI cargo test is red because of the branch itself:

crates/server/tests/pptx_video_acceptance_integration.rs:222 still has the old fake soffice, echo fake-pdf > "$5/input.pdf". The new -env:UserInstallation argument is now $1, so $5 is the literal '--outdir' and three tests fail with 'cannot create --outdir/input.pdf'. Same fix as in the unit test: shift to --outdir and use $2.

Those tests are Postgres integration tests, so a local --rust-only run with no database (or --skip-db) skips them. Please run local-gates.sh with the database before you push again.

The design is right (one package list, a profile per conversion, the start-up warning). CI cargo test is red because of the branch itself: crates/server/tests/pptx_video_acceptance_integration.rs:222 still has the old fake soffice, `echo fake-pdf > "$5/input.pdf"`. The new -env:UserInstallation argument is now $1, so $5 is the literal '--outdir' and three tests fail with 'cannot create --outdir/input.pdf'. Same fix as in the unit test: shift to --outdir and use $2. Those tests are Postgres integration tests, so a local --rust-only run with no database (or --skip-db) skips them. Please run local-gates.sh with the database before you push again.
GRI-2102: cargo fmt
All checks were successful
CI / the pre-push hook (pull_request) Successful in 5s
CI / cargo fmt (pull_request) Successful in 6s
CI / install.sh client upgrade (pull_request) Successful in 10s
CI / cargo deny (pull_request) Successful in 31s
CI / cargo deny advisories (pull_request) Successful in 38s
CI / repository boundary (pull_request) Successful in 5s
CI / cargo clippy (pull_request) Successful in 2m26s
CI / frontend-web (pull_request) Successful in 1m25s
CI / cargo test (pull_request) Successful in 4m0s
CI / Notify gate failed (pull_request) Has been skipped
CI / CI (pull_request) Successful in 2s
69462aa845
vivy approved these changes 2026-11-15 18:49:51 +00:00
Dismissed
vivy left a comment

4633fd8 fixes it: the integration fake soffice now finds --outdir by flag, not by position, so the -env:UserInstallation argument can move freely. The rest since my review is the dev merge. CI green on 69462aa8, including cargo test with Postgres. Approved.

4633fd8 fixes it: the integration fake soffice now finds --outdir by flag, not by position, so the -env:UserInstallation argument can move freely. The rest since my review is the dev merge. CI green on 69462aa8, including cargo test with Postgres. Approved.
Owner

Approval stands, but this branch now conflicts with dev (after #234 and #246 landed) in two files:

  • .github/workflows/ci.yml
  • scripts/local-gates.sh

Both are gate files, so I will not resolve them on the forge. Please agit merge origin/dev in your working tree, keep both sides (your converter install steps and what dev added), run ./scripts/local-gates.sh, and push. I merge on a green fj ci 243.

Approval stands, but this branch now conflicts with `dev` (after #234 and #246 landed) in two files: - `.github/workflows/ci.yml` - `scripts/local-gates.sh` Both are gate files, so I will not resolve them on the forge. Please `agit merge origin/dev` in your working tree, keep both sides (your converter install steps and what `dev` added), run `./scripts/local-gates.sh`, and push. I merge on a green `fj ci 243`.
Owner

My approval on 69462aa stands for the content. The branch now conflicts with dev in .github/workflows/ci.yml and scripts/local-gates.sh (both got new gate steps on dev, from the client kiosk test). Merge origin/dev, keep both the converter test and the kiosk test steps, run the gates, push. I will re-approve the new head.

My approval on 69462aa stands for the content. The branch now conflicts with dev in .github/workflows/ci.yml and scripts/local-gates.sh (both got new gate steps on dev, from the client kiosk test). Merge origin/dev, keep both the converter test and the kiosk test steps, run the gates, push. I will re-approve the new head.
Merge remote-tracking branch 'origin/dev' into fix/GRI-2102-install-converters
Some checks failed
CI / the pre-push hook (pull_request) Successful in 7s
CI / cargo fmt (pull_request) Successful in 5s
CI / install.sh client upgrade (pull_request) Successful in 12s
CI / cargo deny (pull_request) Successful in 23s
CI / cargo deny advisories (pull_request) Successful in 24s
CI / repository boundary (pull_request) Successful in 7s
CI / CI (pull_request) Has been cancelled
CI / Notify gate failed (pull_request) Has been cancelled
CI / cargo test (pull_request) Has been cancelled
CI / cargo clippy (pull_request) Has been cancelled
CI / frontend-web (pull_request) Has been cancelled
a77be4e2b4
# Conflicts:
#	.github/workflows/ci.yml
#	scripts/local-gates.sh
soulwarden dismissed vivy's review 2026-11-15 21:32:46 +00:00
Reason:

New commits pushed, approval review dismissed automatically according to repository settings

Merge remote-tracking branch 'origin/dev' into fix/GRI-2102-install-converters
All checks were successful
CI / the pre-push hook (pull_request) Successful in 5s
CI / cargo fmt (pull_request) Successful in 5s
CI / install.sh client upgrade (pull_request) Successful in 10s
CI / cargo deny (pull_request) Successful in 18s
CI / cargo deny advisories (pull_request) Successful in 18s
CI / repository boundary (pull_request) Successful in 6s
CI / cargo clippy (pull_request) Successful in 1m34s
CI / frontend-web (pull_request) Successful in 1m16s
CI / cargo test (pull_request) Successful in 3m26s
CI / Notify gate failed (pull_request) Has been skipped
CI / CI (pull_request) Successful in 1s
9f5f1ca7c7
vivy merged commit 0178b0c537 into dev 2026-11-15 21:44:34 +00:00
vivy deleted branch fix/GRI-2102-install-converters 2026-11-15 21:44:35 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
Grimoirix/grimoire-of-digital-signage!243
No description provided.