Vendor PyMuPDF

This commit is contained in:
Alex Pyrgiotis 2024-09-11 19:55:03 +03:00
parent f68721637c
commit e0878e489a
No known key found for this signature in database
GPG key ID: B6C15EBA0357C9AA
4 changed files with 9 additions and 3 deletions

4
debian/control vendored
View file

@ -2,14 +2,14 @@ Source: dangerzone
Maintainer: Freedom of the Press Foundation <info@freedom.press> Maintainer: Freedom of the Press Foundation <info@freedom.press>
Section: python Section: python
Priority: optional Priority: optional
Build-Depends: dh-python, python3-setuptools, python3, dpkg-dev, debhelper (>= 9) Build-Depends: dh-python, python3-setuptools, python3 (>= 3.9) | python3.9, dpkg-dev, debhelper (>= 9)
Standards-Version: 4.5.1 Standards-Version: 4.5.1
Homepage: https://github.com/freedomofpress/dangerzone Homepage: https://github.com/freedomofpress/dangerzone
Rules-Requires-Root: no Rules-Requires-Root: no
Package: dangerzone Package: dangerzone
Architecture: any Architecture: any
Depends: ${misc:Depends}, ${python3:Depends}, podman, python3, python3-pyside2.qtcore, python3-pyside2.qtgui, python3-pyside2.qtwidgets, python3-pyside2.qtsvg, python3-appdirs, python3-click, python3-xdg, python3-colorama, python3-requests, python3-markdown, python3-packaging Depends: ${misc:Depends}, ${python3:Depends}, podman, python3 (>= 3.9) | python3.9, python3-pyside2.qtcore, python3-pyside2.qtgui, python3-pyside2.qtwidgets, python3-pyside2.qtsvg, python3-appdirs, python3-click, python3-xdg, python3-colorama, python3-requests, python3-markdown, python3-packaging
Description: Take potentially dangerous PDFs, office documents, or images Description: Take potentially dangerous PDFs, office documents, or images
Dangerzone is an open source desktop application that takes potentially dangerous PDFs, office documents, or images and converts them to safe PDFs. It uses disposable VMs on Qubes OS, or container technology in other OSes, to convert the documents within a secure sandbox. Dangerzone is an open source desktop application that takes potentially dangerous PDFs, office documents, or images and converts them to safe PDFs. It uses disposable VMs on Qubes OS, or container technology in other OSes, to convert the documents within a secure sandbox.
. .

View file

@ -1,4 +1,4 @@
compression = "gzip" compression = "gzip"
tar-ignore = "dev_scripts" tar-ignore = "dev_scripts"
tar-ignore = ".*" tar-ignore = ".*"
tar-ignore = "__pycache__" tar-ignore = "__pycache__"

View file

@ -64,8 +64,12 @@ def build(build_dir, qubes=False):
os.symlink(dist_path, srpm_dir) os.symlink(dist_path, srpm_dir)
print("* Creating a Python sdist") print("* Creating a Python sdist")
tessdata = root / "share" / "tessdata"
tessdata_bak = root / "tessdata.bak"
container_tar_gz = root / "share" / "container.tar.gz" container_tar_gz = root / "share" / "container.tar.gz"
container_tar_gz_bak = root / "container.tar.gz.bak" container_tar_gz_bak = root / "container.tar.gz.bak"
tessdata.rename(tessdata_bak)
stash_container = qubes and container_tar_gz.exists() stash_container = qubes and container_tar_gz.exists()
if stash_container: if stash_container:
container_tar_gz.rename(container_tar_gz_bak) container_tar_gz.rename(container_tar_gz_bak)
@ -77,6 +81,7 @@ def build(build_dir, qubes=False):
shutil.copy2(sdist_path, build_dir / "SOURCES" / sdist_name) shutil.copy2(sdist_path, build_dir / "SOURCES" / sdist_name)
sdist_path.unlink() sdist_path.unlink()
finally: finally:
tessdata_bak.rename(tessdata)
if stash_container: if stash_container:
container_tar_gz_bak.rename(container_tar_gz) container_tar_gz_bak.rename(container_tar_gz)

View file

@ -5,6 +5,7 @@ import subprocess
import sys import sys
from pathlib import Path from pathlib import Path
DZ_VENDOR_DIR = Path("./dangerzone/vendor") DZ_VENDOR_DIR = Path("./dangerzone/vendor")