[PR #6552] [MERGED] profiles: tesseract: disable private-tmp to fix ocrmypdf #6057

Closed
opened 2026-05-05 10:49:56 -06:00 by gitea-mirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/netblue30/firejail/pull/6552
Author: @kmk3
Created: 11/24/2024
Status: Merged
Merged: 11/25/2024
Merged by: @kmk3

Base: masterHead: tesseract-disable-private-tmp


📝 Commits (1)

  • 3e72a03 profiles: tesseract: disable private-tmp to fix ocrmypdf

📊 Changes

1 file changed (+1 additions, -1 deletions)

View changed files

📝 etc/profile-m-z/tesseract.profile (+1 -1)

📄 Description

As reported by @kmille[1]:

The current tesseract profile breaks ocrmypdf:

kmille@linbox:scans ocrmypdf C.pdf del.pdf
Scanning contents     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 100% 1/1 0:00:00
    1  Error, could not create hOCR output file: No such file or directory                             tesseract.py:253
    1  Error, could not create TXT output file: No such file or directory                              tesseract.py:253
OCR                   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━   0% 0/1 -:--:--
An exception occurred while executing the pipeline                                                       _common.py:294
Traceback (most recent call last):
  File "/usr/lib/python3.12/site-packages/ocrmypdf/_pipelines/_common.py", line 259, in
cli_exception_handler
    return fn(options, plugin_manager)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
[...]
  File "/usr/lib/python3.12/pathlib.py", line 840, in stat
    return os.stat(self, follow_symlinks=follow_symlinks)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: '/tmp/ocrmypdf.io.0od81kk5/000001_ocr_hocr.hocr'

These are some of the commands that run in background:

[...]
2024/11/23 22:13:53 PID=403915 UID=0     CMD=/usr/bin/firejail /usr/bin/tesseract --list-langs
2024/11/23 22:13:53 PID=403917 UID=0     CMD=/run/firejail/lib/fcopy /usr/bin/text2image /run/firejail/mnt/bin
2024/11/23 22:13:53 PID=403939 UID=1000  CMD=gs -dQUIET [...] -f /tmp/ocrmypdf.io.0od81kk5/origin.pdf
[...]
2024/11/23 22:14:03 PID=403953 UID=0     CMD=tesseract -l eng /tmp/ocrmypdf.io.0od81kk5/000001_ocr.png [...]

Fixes #6550.

[1] https://github.com/netblue30/firejail/issues/6550#issue-2686607038

Reported-by: @kmille
Suggested-by: @kmille


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/netblue30/firejail/pull/6552 **Author:** [@kmk3](https://github.com/kmk3) **Created:** 11/24/2024 **Status:** ✅ Merged **Merged:** 11/25/2024 **Merged by:** [@kmk3](https://github.com/kmk3) **Base:** `master` ← **Head:** `tesseract-disable-private-tmp` --- ### 📝 Commits (1) - [`3e72a03`](https://github.com/netblue30/firejail/commit/3e72a036d13310f59556970c87c76ebdf4f8ed8b) profiles: tesseract: disable private-tmp to fix ocrmypdf ### 📊 Changes **1 file changed** (+1 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `etc/profile-m-z/tesseract.profile` (+1 -1) </details> ### 📄 Description As reported by @kmille[1]: The current `tesseract` profile breaks `ocrmypdf`: kmille@linbox:scans ocrmypdf C.pdf del.pdf Scanning contents ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 100% 1/1 0:00:00 1 Error, could not create hOCR output file: No such file or directory tesseract.py:253 1 Error, could not create TXT output file: No such file or directory tesseract.py:253 OCR ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 0% 0/1 -:--:-- An exception occurred while executing the pipeline _common.py:294 Traceback (most recent call last): File "/usr/lib/python3.12/site-packages/ocrmypdf/_pipelines/_common.py", line 259, in cli_exception_handler return fn(options, plugin_manager) ^^^^^^^^^^^^^^^^^^^^^^^^^^^ [...] File "/usr/lib/python3.12/pathlib.py", line 840, in stat return os.stat(self, follow_symlinks=follow_symlinks) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ FileNotFoundError: [Errno 2] No such file or directory: '/tmp/ocrmypdf.io.0od81kk5/000001_ocr_hocr.hocr' These are some of the commands that run in background: [...] 2024/11/23 22:13:53 PID=403915 UID=0 CMD=/usr/bin/firejail /usr/bin/tesseract --list-langs 2024/11/23 22:13:53 PID=403917 UID=0 CMD=/run/firejail/lib/fcopy /usr/bin/text2image /run/firejail/mnt/bin 2024/11/23 22:13:53 PID=403939 UID=1000 CMD=gs -dQUIET [...] -f /tmp/ocrmypdf.io.0od81kk5/origin.pdf [...] 2024/11/23 22:14:03 PID=403953 UID=0 CMD=tesseract -l eng /tmp/ocrmypdf.io.0od81kk5/000001_ocr.png [...] Fixes #6550. [1] https://github.com/netblue30/firejail/issues/6550#issue-2686607038 Reported-by: @kmille Suggested-by: @kmille --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
gitea-mirror 2026-05-05 10:49:56 -06:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
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: github-starred/firejail#6057
No description provided.