diff --git a/.circleci/config.yml b/.circleci/config.yml index e50226a..bb1af8b 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,16 +1,16 @@ version: 2.1 jobs: - build-ubuntu-focal: + build-ubuntu-21.10: docker: - - image: ubuntu:20.04 + - image: ubuntu:21.10 steps: - run: name: Install dependencies command: | export DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true apt-get update - apt-get install -y git ssh ruby-dev rubygems python-all dh-python python3 python3-stdeb python3-pyside2.qtcore python3-pyside2.qtgui python3-pyside2.qtwidgets python3-appdirs python3-click python3-xdg python3-requests python3-termcolor + apt-get install -y git ssh ruby-dev rubygems python-all dh-python python3 python3-stdeb python3-pyside2.qtcore python3-pyside2.qtgui python3-pyside2.qtwidgets python3-appdirs python3-click python3-xdg python3-requests python3-colorama gem install -N rake gem install -N package_cloud - checkout @@ -23,10 +23,35 @@ jobs: name: Deploy to packagecloud.io command: | VERSION=$(cat dangerzone/__init__.py |grep "dangerzone_version = " |cut -d '"' -f2) - package_cloud push firstlookmedia/code/ubuntu/focal deb_dist/dangerzone_${VERSION}-1_all.deb - package_cloud push firstlookmedia/code/ubuntu/focal deb_dist/dangerzone_${VERSION}-1.dsc + package_cloud push firstlookmedia/code/ubuntu/impish deb_dist/dangerzone_${VERSION}-1_all.deb + package_cloud push firstlookmedia/code/ubuntu/impish deb_dist/dangerzone_${VERSION}-1.dsc - build-ubuntu-groovy: + build-ubuntu-21.04: + docker: + - image: ubuntu:21.04 + steps: + - run: + name: Install dependencies + command: | + export DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true + apt-get update + apt-get install -y git ssh ruby-dev rubygems python-all dh-python python3 python3-stdeb python3-pyside2.qtcore python3-pyside2.qtgui python3-pyside2.qtwidgets python3-appdirs python3-click python3-xdg python3-requests python3-colorama + gem install -N rake + gem install -N package_cloud + - checkout + - run: + name: Create the .deb package + command: | + ./install/linux/build_deb.py + dpkg -i deb_dist/dangerzone_*-1_all.deb + - run: + name: Deploy to packagecloud.io + command: | + VERSION=$(cat dangerzone/__init__.py |grep "dangerzone_version = " |cut -d '"' -f2) + package_cloud push firstlookmedia/code/ubuntu/hirsute deb_dist/dangerzone_${VERSION}-1_all.deb + package_cloud push firstlookmedia/code/ubuntu/hirsute deb_dist/dangerzone_${VERSION}-1.dsc + + build-ubuntu-20.10: docker: - image: ubuntu:20.10 steps: @@ -35,7 +60,7 @@ jobs: command: | export DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true apt-get update - apt-get install -y git ssh ruby-dev rubygems python-all dh-python python3 python3-stdeb python3-pyside2.qtcore python3-pyside2.qtgui python3-pyside2.qtwidgets python3-appdirs python3-click python3-xdg python3-requests python3-termcolor + apt-get install -y git ssh ruby-dev rubygems python-all dh-python python3 python3-stdeb python3-pyside2.qtcore python3-pyside2.qtgui python3-pyside2.qtwidgets python3-appdirs python3-click python3-xdg python3-requests python3-colorama gem install -N rake gem install -N package_cloud - checkout @@ -51,17 +76,18 @@ jobs: package_cloud push firstlookmedia/code/ubuntu/groovy deb_dist/dangerzone_${VERSION}-1_all.deb package_cloud push firstlookmedia/code/ubuntu/groovy deb_dist/dangerzone_${VERSION}-1.dsc - build-debian-buster: + build-ubuntu-20.04: docker: - - image: debian:buster + - image: ubuntu:20.04 steps: - run: name: Install dependencies command: | + export DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true apt-get update - apt-get install -y git ssh ruby-dev rubygems python-all dh-python python3 python3-stdeb python3-pyside2.qtcore python3-pyside2.qtgui python3-pyside2.qtwidgets python3-appdirs python3-click python3-xdg python3-requests python3-termcolor - gem install --no-ri --no-rdoc rake - gem install --no-ri --no-rdoc package_cloud + apt-get install -y git ssh ruby-dev rubygems python-all dh-python python3 python3-stdeb python3-pyside2.qtcore python3-pyside2.qtgui python3-pyside2.qtwidgets python3-appdirs python3-click python3-xdg python3-requests python3-colorama + gem install -N rake + gem install -N package_cloud - checkout - run: name: Create the .deb package @@ -72,8 +98,8 @@ jobs: name: Deploy to packagecloud.io command: | VERSION=$(cat dangerzone/__init__.py |grep "dangerzone_version = " |cut -d '"' -f2) - package_cloud push firstlookmedia/code/debian/buster deb_dist/dangerzone_${VERSION}-1_all.deb - package_cloud push firstlookmedia/code/debian/buster deb_dist/dangerzone_${VERSION}-1.dsc + package_cloud push firstlookmedia/code/ubuntu/focal deb_dist/dangerzone_${VERSION}-1_all.deb + package_cloud push firstlookmedia/code/ubuntu/focal deb_dist/dangerzone_${VERSION}-1.dsc build-debian-bullseye: docker: @@ -83,7 +109,7 @@ jobs: name: Install dependencies command: | apt-get update - apt-get install -y git ssh ruby-dev rubygems python-all dh-python python3 python3-stdeb python3-pyside2.qtcore python3-pyside2.qtgui python3-pyside2.qtwidgets python3-appdirs python3-click python3-xdg python3-requests python3-termcolor + apt-get install -y git ssh ruby-dev rubygems python-all dh-python python3 python3-stdeb python3-pyside2.qtcore python3-pyside2.qtgui python3-pyside2.qtwidgets python3-appdirs python3-click python3-xdg python3-requests python3-colorama gem install -N rake gem install -N package_cloud - checkout @@ -99,36 +125,38 @@ jobs: package_cloud push firstlookmedia/code/debian/bullseye deb_dist/dangerzone_${VERSION}-1_all.deb package_cloud push firstlookmedia/code/debian/bullseye deb_dist/dangerzone_${VERSION}-1.dsc - build-fedora-31: + build-debian-buster: docker: - - image: fedora:31 + - image: debian:buster steps: - run: name: Install dependencies command: | - dnf install -y git openssh ruby-devel make automake gcc gcc-c++ rpm-build python3-pyside2 python3-appdirs python3-click python3-pyxdg python3-requests python3-termcolor - gem install package_cloud + apt-get update + apt-get install -y git ssh ruby-dev rubygems python-all dh-python python3 python3-stdeb python3-pyside2.qtcore python3-pyside2.qtgui python3-pyside2.qtwidgets python3-appdirs python3-click python3-xdg python3-requests python3-colorama + gem install --no-ri --no-rdoc rake + gem install --no-ri --no-rdoc package_cloud - checkout - run: - name: Create the .rpm package + name: Create the .deb package command: | - ./install/linux/build_rpm.py - dnf install -y dist/dangerzone-*-1.noarch.rpm + ./install/linux/build_deb.py + dpkg -i deb_dist/dangerzone_*-1_all.deb - run: name: Deploy to packagecloud.io command: | VERSION=$(cat dangerzone/__init__.py |grep "dangerzone_version = " |cut -d '"' -f2) - package_cloud push firstlookmedia/code/fedora/31 dist/dangerzone-${VERSION}-1.noarch.rpm - package_cloud push firstlookmedia/code/fedora/31 dist/dangerzone-${VERSION}-1.src.rpm + package_cloud push firstlookmedia/code/debian/buster deb_dist/dangerzone_${VERSION}-1_all.deb + package_cloud push firstlookmedia/code/debian/buster deb_dist/dangerzone_${VERSION}-1.dsc - build-fedora-32: + build-fedora-34: docker: - - image: fedora:32 + - image: fedora:34 steps: - run: name: Install dependencies command: | - dnf install -y git openssh ruby-devel make automake gcc gcc-c++ rpm-build python3-pyside2 python3-appdirs python3-click python3-pyxdg python3-requests python3-termcolor + dnf install -y git openssh ruby-devel make automake gcc gcc-c++ rpm-build python3-setuptools python3-pyside2 python3-appdirs python3-click python3-pyxdg python3-requests python3-colorama gem install package_cloud - checkout - run: @@ -140,8 +168,8 @@ jobs: name: Deploy to packagecloud.io command: | VERSION=$(cat dangerzone/__init__.py |grep "dangerzone_version = " |cut -d '"' -f2) - package_cloud push firstlookmedia/code/fedora/32 dist/dangerzone-${VERSION}-1.noarch.rpm - package_cloud push firstlookmedia/code/fedora/32 dist/dangerzone-${VERSION}-1.src.rpm + package_cloud push firstlookmedia/code/fedora/34 dist/dangerzone-${VERSION}-1.noarch.rpm + package_cloud push firstlookmedia/code/fedora/34 dist/dangerzone-${VERSION}-1.src.rpm build-fedora-33: docker: @@ -150,7 +178,7 @@ jobs: - run: name: Install dependencies command: | - dnf install -y git openssh ruby-devel make automake gcc gcc-c++ rpm-build python3-pyside2 python3-appdirs python3-click python3-pyxdg python3-requests python3-termcolor + dnf install -y git openssh ruby-devel make automake gcc gcc-c++ rpm-build python3-setuptools python3-pyside2 python3-appdirs python3-click python3-pyxdg python3-requests python3-colorama gem install package_cloud - checkout - run: @@ -165,23 +193,52 @@ jobs: package_cloud push firstlookmedia/code/fedora/33 dist/dangerzone-${VERSION}-1.noarch.rpm package_cloud push firstlookmedia/code/fedora/33 dist/dangerzone-${VERSION}-1.src.rpm + build-fedora-32: + docker: + - image: fedora:32 + steps: + - run: + name: Install dependencies + command: | + dnf install -y git openssh ruby-devel make automake gcc gcc-c++ rpm-build python3-setuptools python3-pyside2 python3-appdirs python3-click python3-pyxdg python3-requests python3-colorama + gem install package_cloud + - checkout + - run: + name: Create the .rpm package + command: | + ./install/linux/build_rpm.py + dnf install -y dist/dangerzone-*-1.noarch.rpm + - run: + name: Deploy to packagecloud.io + command: | + VERSION=$(cat dangerzone/__init__.py |grep "dangerzone_version = " |cut -d '"' -f2) + package_cloud push firstlookmedia/code/fedora/32 dist/dangerzone-${VERSION}-1.noarch.rpm + package_cloud push firstlookmedia/code/fedora/32 dist/dangerzone-${VERSION}-1.src.rpm + workflows: version: 2 build-tags: jobs: - - build-ubuntu-focal: - filters: - tags: - only: /^v.*/ - branches: - ignore: /.*/ - # - build-ubuntu-groovy: + # Ubuntu 21.10 (impish) not yet supported by packagecloud.io + # - build-ubuntu-21.10:  # filters: # tags: # only: /^v.*/ # branches: # ignore: /.*/ - - build-debian-buster: + - build-ubuntu-21.04: + filters: + tags: + only: /^v.*/ + branches: + ignore: /.*/ + - build-ubuntu-20.10: + filters: + tags: + only: /^v.*/ + branches: + ignore: /.*/ + - build-ubuntu-20.04: filters: tags: only: /^v.*/ @@ -193,7 +250,19 @@ workflows: only: /^v.*/ branches: ignore: /.*/ - - build-fedora-31: + - build-debian-buster: + filters: + tags: + only: /^v.*/ + branches: + ignore: /.*/ + - build-fedora-34: + filters: + tags: + only: /^v.*/ + branches: + ignore: /.*/ + - build-fedora-33: filters: tags: only: /^v.*/ @@ -205,9 +274,3 @@ workflows: only: /^v.*/ branches: ignore: /.*/ - # - build-fedora-33: - # filters: - # tags: - # only: /^v.*/ - # branches: - # ignore: /.*/ diff --git a/BUILD.md b/BUILD.md index c68b2da..813cceb 100644 --- a/BUILD.md +++ b/BUILD.md @@ -27,7 +27,7 @@ Create a .deb: Install dependencies: ```sh -sudo dnf install -y rpm-build python3 python3-pyside2 python3-appdirs python3-click python3-pyxdg python3-requests python3-colorama +sudo dnf install -y rpm-build python3 python3-setuptools python3-pyside2 python3-appdirs python3-click python3-pyxdg python3-requests python3-colorama ``` You also need docker, either by installing the `docker` package, or by installing `docker-ce` by following [these instructions](https://docs.docker.com/install/linux/docker-ce/fedora/). diff --git a/CHANGELOG.md b/CHANGELOG.md index 8183dd1..1c8e76a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Change Log +## Dangerzone 0.2 + +- Command line support and improved terminal output +- Additional container hardening +- Fix macOS crash on quit +- Fix --custom-container CLI argument + ## Dangerzone 0.1.5 - Add support for macOS Big Sur diff --git a/README.md b/README.md index 9f77ed2..38a2625 100644 --- a/README.md +++ b/README.md @@ -10,8 +10,8 @@ _Read more about Dangerzone in the blog post [Dangerzone: Working With Suspiciou ## Getting started -- Download [Dangerzone 0.1.5 for Mac](https://github.com/firstlookmedia/dangerzone/releases/download/v0.1.5/Dangerzone.0.1.5.dmg) -- Download [Dangerzone 0.1.5 for Windows](https://github.com/firstlookmedia/dangerzone/releases/download/v0.1.5/Dangerzone.0.1.5.msi) +- Download [Dangerzone 0.2 for Mac](https://github.com/firstlookmedia/dangerzone/releases/download/v0.2/Dangerzone.0.2.dmg) +- Download [Dangerzone 0.2 for Windows](https://github.com/firstlookmedia/dangerzone/releases/download/v0.2/Dangerzone.0.2.msi) - See [installing Dangerzone](https://github.com/firstlookmedia/dangerzone/wiki/Installing-Dangerzone) on the wiki for Linux repositories You can also install Dangerzone for Mac using [Homebrew](https://brew.sh/): `brew install --cask dangerzone` diff --git a/RELEASE.md b/RELEASE.md index b745021..20126cd 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -10,6 +10,7 @@ Before making a release, all of these should be complete: * Update in `share/version.txt` * Update version and download links in `README.md` * CHANGELOG.md should be updated to include a list of all major changes since the last release +* Test CircleCI builds: Look in `.circleci/config.yml`, manually try each build in docker, and add new platforms and remove obsolete platforms * There must be a PGP-signed git tag for the version, e.g. for dangerzone 0.1.0, the tag must be `v0.1.0` Before making a release, verify the release git tag: diff --git a/install/linux/build_deb.py b/install/linux/build_deb.py index 31b8de0..6dba332 100755 --- a/install/linux/build_deb.py +++ b/install/linux/build_deb.py @@ -6,18 +6,15 @@ import inspect import subprocess import shutil -sys.path.insert( - 0, os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) -) -import dangerzone - -version = dangerzone.dangerzone_version root = os.path.dirname( os.path.dirname( os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe()))) ) ) +with open(os.path.join(root, "share", "version.txt")) as f: + version = f.read().strip() + def run(cmd): subprocess.run(cmd, cwd=root, check=True) diff --git a/install/linux/build_rpm.py b/install/linux/build_rpm.py index 0d6c2b8..7c6300d 100755 --- a/install/linux/build_rpm.py +++ b/install/linux/build_rpm.py @@ -6,18 +6,16 @@ import inspect import subprocess import shutil -sys.path.insert( - 0, os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) -) -import dangerzone -version = dangerzone.dangerzone_version root = os.path.dirname( os.path.dirname( os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe()))) ) ) +with open(os.path.join(root, "share", "version.txt")) as f: + version = f.read().strip() + def main(): build_path = os.path.join(root, "build") diff --git a/pyproject.toml b/pyproject.toml index 860a048..2a1df2d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "dangerzone" -version = "0.1.5" +version = "0.2" description = "Take potentially dangerous PDFs, office documents, or images and convert them to a safe PDF" authors = ["Micah Lee "] license = "MIT" diff --git a/setup.py b/setup.py index 2edcca2..a715098 100644 --- a/setup.py +++ b/setup.py @@ -23,7 +23,7 @@ setuptools.setup( license="MIT", description="Take potentially dangerous PDFs, office documents, or images and convert them to a safe PDF", url="https://github.com/firstlookmedia/dangerzone", - packages=["dangerzone"], + packages=["dangerzone", "dangerzone.gui"], data_files=[ ( "share/applications", diff --git a/share/version.txt b/share/version.txt index 2f45361..3b04cfb 100644 --- a/share/version.txt +++ b/share/version.txt @@ -1 +1 @@ -0.2 \ No newline at end of file +0.2