GRI-2131: rasterise PowerPoint slides with pdftoppm, drop ghostscript (forge #229) #288
No reviewers
Labels
No labels
Area/Backend
Area/Database
Area/Docs
Area/Frontend
Area/Infra
Area/Security
Area/Tests
Area/Tooling
Compat/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Lang/Python
Lang/Rust
Lang/Shell
Lang/SQL
Lang/TypeScript
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Routing
Auto
Routing
Hold
Routing
Human
Status
Abandoned
Status
Blocked
Status
Need More Info
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
Grimoirix/grimoire-of-digital-signage!288
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/GRI-2131-pptx-pdftoppm"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Second half of #229, after #243 fixed the packages and gave LibreOffice its own profile. This follows the product owner's decision of 2026-11-15 17:32 UTC.
Cause: PowerPoint slides were rasterised with
gs. Ubuntu 26.04 ships an enforcing AppArmor profile for/usr/bin/gsthat only allows writes under a home directory,/mnt,/mediaand the user's temp folder. It refused the server's data folder, so every PPTX upload failed on a fresh install. The realgserror went to stdout, and stdout was thrown away.What changes:
soffice --convert-to pdf(own-env:UserInstallationprofile per conversion, unchanged from #243), thencrate::pdf::render_pages. That is the samepdftoppmcode path as a PDF upload, at the same 150 dpi. Ubuntu ships no AppArmor profile forpdftoppm.pptx_video.rasterizer_pathnow defaults topdftoppm(wasgs). If both uploads use the same binary, the start-up converter warning names it once ("PDF and PowerPoint uploads fail").gsis no longer called anywhere.ghostscriptis removed frominstall.sh(install andupgrade server), the container image andplan/operations/deployment.md. The installer test now fails if either install path lists it.sofficeorffmpegnow reports its exit status, stderr and stdout. Above 2 KB the end is kept, because both tools print the fatal line last. A failingpdftoppmreports its status and stderr.Measured on the build host (Ubuntu 24.04, no
gsprofile):the_sample_deck_renders_with_the_real_soffice_and_pdftoppm, run withHOME=/nonexistent, real LibreOffice 24.2 and real pdftoppm 24.02: passes in 5.2 s, one PNG per visible slide.cargo test -p serverfiltered topptx_videoandpdf: 40 passed.pptx_video_acceptance_integrationwithSIGNAGE_TEST_DATABASE_URLset: 6/6 passed.clippy --all-targets -D warnings: clean.scripts/tests/install-server-converters-test.sh: all assertions held.Not measured yet: the acceptance condition, a PPTX converting on a fresh Ubuntu 26.04 with AppArmor on and nothing changed by hand. That needs the test server after merge and
install.sh upgrade server, with the hand-made/etc/apparmor.d/local/gsrule and thescryglass-sofficewrapper removed first, so the result proves the fix and not the workaround.Refs #229