Merge pull request #35 from firstlookmedia/34_dockerhub

Docker Hub
This commit is contained in:
Micah Lee 2020-02-27 15:22:13 -08:00 committed by GitHub
commit 68da5dda52
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 8 additions and 65 deletions

3
.gitmodules vendored
View file

@ -1,3 +0,0 @@
[submodule "share/container"]
path = share/container
url = git@github.com:firstlookmedia/dangerzone-converter.git

View file

@ -1,12 +1,5 @@
# Development environment # Development environment
After cloning this git repo, make sure to checkout the git submodules.
```
git submodule init
git submodule update
```
## Debian/Ubuntu ## Debian/Ubuntu
Install dependencies: Install dependencies:

View file

@ -18,12 +18,10 @@ git fetch
git tag -v v$VERSION git tag -v v$VERSION
``` ```
If the tag verifies successfully, check it out, and also its submodules: If the tag verifies successfully and check it out:
``` ```
git checkout v$VERSION git checkout v$VERSION
git submodule init
git submodule update
``` ```
## macOS release ## macOS release

View file

@ -61,7 +61,7 @@ class PullImageTask(TaskBase):
def run(self): def run(self):
self.update_label.emit("Pulling container image") self.update_label.emit("Pulling container image")
self.update_details.emit("") self.update_details.emit("")
args = ["pull", "debian:buster"] args = ["pull", "flmcode/dangerzone"]
returncode, _ = self.exec_container(args, watch="stderr") returncode, _ = self.exec_container(args, watch="stderr")
if returncode != 0: if returncode != 0:
@ -71,26 +71,6 @@ class PullImageTask(TaskBase):
self.task_finished.emit() self.task_finished.emit()
class BuildContainerTask(TaskBase):
def __init__(self, global_common, common):
super(BuildContainerTask, self).__init__()
self.global_common = global_common
self.common = common
def run(self):
container_path = self.global_common.get_resource_path("container")
self.update_label.emit("Building container (this might take a long time)")
self.update_details.emit("")
args = ["build", "-t", "dangerzone", container_path]
returncode, _ = self.exec_container(args)
if returncode != 0:
self.task_failed.emit(f"Return code: {returncode}")
return
self.task_finished.emit()
class ConvertToPixels(TaskBase): class ConvertToPixels(TaskBase):
def __init__(self, global_common, common): def __init__(self, global_common, common):
super(ConvertToPixels, self).__init__() super(ConvertToPixels, self).__init__()
@ -111,7 +91,7 @@ class ConvertToPixels(TaskBase):
f"{self.common.document_filename}:/tmp/input_file", f"{self.common.document_filename}:/tmp/input_file",
"-v", "-v",
f"{self.common.pixel_dir.name}:/dangerzone", f"{self.common.pixel_dir.name}:/dangerzone",
"dangerzone", "flmcode/dangerzone",
"document-to-pixels", "document-to-pixels",
] ]
returncode, output = self.exec_container(args) returncode, output = self.exec_container(args)
@ -220,7 +200,7 @@ class ConvertToPDF(TaskBase):
f"{self.common.safe_dir.name}:/safezone", f"{self.common.safe_dir.name}:/safezone",
] ]
+ envs + envs
+ ["dangerzone", "pixels-to-pdf",] + ["flmcode/dangerzone", "pixels-to-pdf",]
) )
returncode, output = self.exec_container(args) returncode, output = self.exec_container(args)
@ -229,4 +209,3 @@ class ConvertToPDF(TaskBase):
return return
self.task_finished.emit() self.task_finished.emit()

View file

@ -5,7 +5,7 @@ import platform
import subprocess import subprocess
from PyQt5 import QtCore, QtGui, QtWidgets from PyQt5 import QtCore, QtGui, QtWidgets
from .tasks import PullImageTask, BuildContainerTask, ConvertToPixels, ConvertToPDF from .tasks import PullImageTask, ConvertToPixels, ConvertToPDF
class TasksWidget(QtWidgets.QWidget): class TasksWidget(QtWidgets.QWidget):
@ -59,7 +59,7 @@ class TasksWidget(QtWidgets.QWidget):
def start(self): def start(self):
if self.global_common.settings.get("update_container"): if self.global_common.settings.get("update_container"):
self.tasks += [PullImageTask, BuildContainerTask] self.tasks += [PullImageTask]
self.tasks += [ConvertToPixels, ConvertToPDF] self.tasks += [ConvertToPixels, ConvertToPDF]
self.next_task() self.next_task()

View file

@ -16,7 +16,7 @@ sys.path.insert(0, root)
import dangerzone import dangerzone
version = dangerzone.dangerzone_version version = dangerzone.dangerzone_version
print("Flock Agent version: {}".format(version)) print("Dangerzone version: {}".format(version))
if p == "Darwin": if p == "Darwin":
datas = [("../../share", "share"), ("../macos/../macos/document.icns", ".")] datas = [("../../share", "share"), ("../macos/../macos/document.icns", ".")]

View file

@ -40,11 +40,7 @@
<Directory Id="FolderPyQt5QtTranslations" Name="translations" /> <Directory Id="FolderPyQt5QtTranslations" Name="translations" />
</Directory> </Directory>
</Directory> </Directory>
<Directory Id="FolderShare" Name="share"> <Directory Id="FolderShare" Name="share" />
<Directory Id="FolderShareContainer" Name="container">
<Directory Id="FolderShareContainerScripts" Name="scripts" />
</Directory>
</Directory>
<Directory Id="FolderWin32com" Name="win32com"> <Directory Id="FolderWin32com" Name="win32com">
<Directory Id="FolderWin32comShell" Name="shell" /> <Directory Id="FolderWin32comShell" Name="shell" />
</Directory> </Directory>
@ -202,23 +198,6 @@
</Component> </Component>
</DirectoryRef> </DirectoryRef>
<DirectoryRef Id="FolderShareContainer">
<Component Id="FolderComponentShareContainer" Guid="4a3e5a58-8804-40eb-8216-5f0d75e8afa2">
<File Source="..\..\dist\dangerzone\share\container\Dockerfile" />
<File Source="..\..\dist\dangerzone\share\container\LICENSE" />
<File Source="..\..\dist\dangerzone\share\container\README.md" />
</Component>
</DirectoryRef>
<DirectoryRef Id="FolderShareContainerScripts">
<Component Id="FolderComponentShareContainerScripts" Guid="863a148f-b0cd-404f-ab59-fc29d5961786">
<File Source="..\..\dist\dangerzone\share\container\scripts\document-to-pixels" />
<File Source="..\..\dist\dangerzone\share\container\scripts\document-to-pixels-unpriv" />
<File Source="..\..\dist\dangerzone\share\container\scripts\pixels-to-pdf" />
<File Source="..\..\dist\dangerzone\share\container\scripts\pixels-to-pdf-unpriv" />
</Component>
</DirectoryRef>
<DirectoryRef Id="FolderWin32comShell"> <DirectoryRef Id="FolderWin32comShell">
<Component Id="FolderComponentWin32comShell" Guid="b51f7768-64f2-4666-a919-736a6ae6c332"> <Component Id="FolderComponentWin32comShell" Guid="b51f7768-64f2-4666-a919-736a6ae6c332">
<File Source="..\..\dist\dangerzone\win32com\shell\shell.pyd" /> <File Source="..\..\dist\dangerzone\win32com\shell\shell.pyd" />

View file

@ -29,8 +29,6 @@ setuptools.setup(
["install/linux/media.firstlook.dangerzone.png"], ["install/linux/media.firstlook.dangerzone.png"],
), ),
("share/dangerzone", file_list("share")), ("share/dangerzone", file_list("share")),
("share/dangerzone/container", file_list("share/container")),
("share/dangerzone/container/scripts", file_list("share/container/scripts")),
], ],
classifiers=[ classifiers=[
"Programming Language :: Python", "Programming Language :: Python",

@ -1 +0,0 @@
Subproject commit 9de7f4cd81e71df0dcea4c4f9a76bee6a27cb234