mirror of
https://github.com/freedomofpress/dangerzone.git
synced 2025-05-04 20:51:49 +02:00
Compare commits
4 commits
b6bdf43983
...
7cbcba336d
Author | SHA1 | Date | |
---|---|---|---|
7cbcba336d | |||
![]() |
32deea10c4 | ||
![]() |
f540a67d06 | ||
![]() |
2ba247e09c |
12 changed files with 73 additions and 19 deletions
2
.github/workflows/build.yml
vendored
2
.github/workflows/build.yml
vendored
|
@ -1,6 +1,6 @@
|
||||||
name: Build dev environments
|
name: Build dev environments
|
||||||
on:
|
on:
|
||||||
push:
|
pull_request:
|
||||||
schedule:
|
schedule:
|
||||||
- cron: "0 0 * * *" # Run every day at 00:00 UTC.
|
- cron: "0 0 * * *" # Run every day at 00:00 UTC.
|
||||||
|
|
||||||
|
|
2
.github/workflows/check_push.yml
vendored
2
.github/workflows/check_push.yml
vendored
|
@ -1,6 +1,6 @@
|
||||||
name: Check branch conformity
|
name: Check branch conformity
|
||||||
on:
|
on:
|
||||||
push:
|
pull_request:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
prevent-fixup-commits:
|
prevent-fixup-commits:
|
||||||
|
|
51
.github/workflows/ci.yml
vendored
51
.github/workflows/ci.yml
vendored
|
@ -1,8 +1,9 @@
|
||||||
name: Tests
|
name: Tests
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
pull_request:
|
pull_request:
|
||||||
branches: [main]
|
|
||||||
schedule:
|
schedule:
|
||||||
- cron: "2 0 * * *" # Run every day at 02:00 UTC.
|
- cron: "2 0 * * *" # Run every day at 02:00 UTC.
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
@ -24,7 +25,24 @@ concurrency:
|
||||||
cancel-in-progress: true
|
cancel-in-progress: true
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
should-run:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
outputs:
|
||||||
|
run-workflow: ${{ steps.check.outputs.run-workflow }}
|
||||||
|
steps:
|
||||||
|
- id: check
|
||||||
|
run: |
|
||||||
|
if [[ "${{ github.event_name }}" == "pull_request" ]]; then
|
||||||
|
echo "run-workflow=true" >> $GITHUB_OUTPUT
|
||||||
|
elif [[ "${{ github.event_name }}" == "push" && "${{ github.ref }}" != "refs/heads/main" ]]; then
|
||||||
|
echo "run-workflow=true" >> $GITHUB_OUTPUT
|
||||||
|
else
|
||||||
|
echo "run-workflow=false" >> $GITHUB_OUTPUT
|
||||||
|
fi
|
||||||
|
|
||||||
run-lint:
|
run-lint:
|
||||||
|
needs: should-run
|
||||||
|
if: needs.should-run.outputs.run-workflow == 'true'
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
container:
|
container:
|
||||||
image: debian:bookworm
|
image: debian:bookworm
|
||||||
|
@ -43,6 +61,8 @@ jobs:
|
||||||
# This is already built daily by the "build.yml" file
|
# This is already built daily by the "build.yml" file
|
||||||
# But we also want to include this in the checks that run on each push.
|
# But we also want to include this in the checks that run on each push.
|
||||||
build-container-image:
|
build-container-image:
|
||||||
|
needs: should-run
|
||||||
|
if: needs.should-run.outputs.run-workflow == 'true'
|
||||||
runs-on: ubuntu-24.04
|
runs-on: ubuntu-24.04
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
@ -67,6 +87,8 @@ jobs:
|
||||||
python3 ./install/common/build-image.py
|
python3 ./install/common/build-image.py
|
||||||
|
|
||||||
download-tessdata:
|
download-tessdata:
|
||||||
|
needs: should-run
|
||||||
|
if: needs.should-run.outputs.run-workflow == 'true'
|
||||||
name: Download and cache Tesseract data
|
name: Download and cache Tesseract data
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
|
@ -91,7 +113,10 @@ jobs:
|
||||||
|
|
||||||
windows:
|
windows:
|
||||||
runs-on: windows-latest
|
runs-on: windows-latest
|
||||||
needs: download-tessdata
|
needs:
|
||||||
|
- download-tessdata
|
||||||
|
- should-run
|
||||||
|
if: needs.should-run.outputs.run-workflow == 'true'
|
||||||
env:
|
env:
|
||||||
DUMMY_CONVERSION: 1
|
DUMMY_CONVERSION: 1
|
||||||
steps:
|
steps:
|
||||||
|
@ -121,7 +146,10 @@ jobs:
|
||||||
macOS:
|
macOS:
|
||||||
name: "macOS (${{ matrix.arch }})"
|
name: "macOS (${{ matrix.arch }})"
|
||||||
runs-on: ${{ matrix.runner }}
|
runs-on: ${{ matrix.runner }}
|
||||||
needs: download-tessdata
|
needs:
|
||||||
|
- download-tessdata
|
||||||
|
- should-run
|
||||||
|
if: needs.should-run.outputs.run-workflow == 'true'
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
|
@ -149,9 +177,12 @@ jobs:
|
||||||
run: poetry run make test
|
run: poetry run make test
|
||||||
|
|
||||||
build-deb:
|
build-deb:
|
||||||
|
needs:
|
||||||
|
- should-run
|
||||||
|
- build-container-image
|
||||||
|
if: needs.should-run.outputs.run-workflow == 'true'
|
||||||
name: "build-deb (${{ matrix.distro }} ${{ matrix.version }})"
|
name: "build-deb (${{ matrix.distro }} ${{ matrix.version }})"
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: build-container-image
|
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
|
@ -219,7 +250,10 @@ jobs:
|
||||||
install-deb:
|
install-deb:
|
||||||
name: "install-deb (${{ matrix.distro }} ${{ matrix.version }})"
|
name: "install-deb (${{ matrix.distro }} ${{ matrix.version }})"
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: build-deb
|
needs:
|
||||||
|
- build-deb
|
||||||
|
- should-run
|
||||||
|
if: needs.should-run.outputs.run-workflow == 'true'
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
|
@ -273,7 +307,10 @@ jobs:
|
||||||
build-install-rpm:
|
build-install-rpm:
|
||||||
name: "build-install-rpm (${{ matrix.distro }} ${{matrix.version}})"
|
name: "build-install-rpm (${{ matrix.distro }} ${{matrix.version}})"
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: build-container-image
|
needs:
|
||||||
|
- build-container-image
|
||||||
|
- should-run
|
||||||
|
if: needs.should-run.outputs.run-workflow == 'true'
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
distro: ["fedora"]
|
distro: ["fedora"]
|
||||||
|
@ -339,6 +376,8 @@ jobs:
|
||||||
needs:
|
needs:
|
||||||
- build-container-image
|
- build-container-image
|
||||||
- download-tessdata
|
- download-tessdata
|
||||||
|
- should-run
|
||||||
|
if: needs.should-run.outputs.run-workflow == 'true'
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
|
|
3
.github/workflows/scan.yml
vendored
3
.github/workflows/scan.yml
vendored
|
@ -1,8 +1,9 @@
|
||||||
name: Scan latest app and container
|
name: Scan latest app and container
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
pull_request:
|
pull_request:
|
||||||
branches: [ main ]
|
|
||||||
schedule:
|
schedule:
|
||||||
- cron: '0 0 * * *' # Run every day at 00:00 UTC.
|
- cron: '0 0 * * *' # Run every day at 00:00 UTC.
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
2
.github/workflows/scan_released.yml
vendored
2
.github/workflows/scan_released.yml
vendored
|
@ -13,7 +13,7 @@ jobs:
|
||||||
- name: Download container image for the latest release
|
- name: Download container image for the latest release
|
||||||
run: |
|
run: |
|
||||||
VERSION=$(curl https://api.github.com/repos/freedomofpress/dangerzone/releases/latest | jq -r '.tag_name')
|
VERSION=$(curl https://api.github.com/repos/freedomofpress/dangerzone/releases/latest | jq -r '.tag_name')
|
||||||
wget https://github.com/freedomofpress/dangerzone/releases/download/${VERSION}/container.tar.gz
|
wget https://github.com/freedomofpress/dangerzone/releases/download/${VERSION}/container-${VERSION}-i686.tar.gz -O container.tar.gz
|
||||||
- name: Load container image
|
- name: Load container image
|
||||||
run: docker load -i container.tar.gz
|
run: docker load -i container.tar.gz
|
||||||
# NOTE: Scan first without failing, else we won't be able to read the scan
|
# NOTE: Scan first without failing, else we won't be able to read the scan
|
||||||
|
|
|
@ -289,7 +289,7 @@ Our [GitHub Releases page](https://github.com/freedomofpress/dangerzone/releases
|
||||||
hosts the following files:
|
hosts the following files:
|
||||||
* Windows installer (`Dangerzone-<version>.msi`)
|
* Windows installer (`Dangerzone-<version>.msi`)
|
||||||
* macOS archives (`Dangerzone-<version>-<arch>.dmg`)
|
* macOS archives (`Dangerzone-<version>-<arch>.dmg`)
|
||||||
* Container image (`container.tar.gz`)
|
* Container images (`container-<version>-<arch>.tar.gz`)
|
||||||
* Source package (`dangerzone-<version>.tar.gz`)
|
* Source package (`dangerzone-<version>.tar.gz`)
|
||||||
|
|
||||||
All these files are accompanied by signatures (as `.asc` files). We'll explain
|
All these files are accompanied by signatures (as `.asc` files). We'll explain
|
||||||
|
@ -314,10 +314,10 @@ gpg --verify Dangerzone-0.6.1-arm64.dmg.asc Dangerzone-0.6.1-arm64.dmg
|
||||||
gpg --verify Dangerzone-0.6.1-i686.dmg.asc Dangerzone-0.6.1-i686.dmg
|
gpg --verify Dangerzone-0.6.1-i686.dmg.asc Dangerzone-0.6.1-i686.dmg
|
||||||
```
|
```
|
||||||
|
|
||||||
For the container image:
|
For the container images:
|
||||||
|
|
||||||
```
|
```
|
||||||
gpg --verify container.tar.gz.asc container.tar.gz
|
gpg --verify container-0.6.1-i686.tar.gz.asc container-0.6.1-i686.tar.gz
|
||||||
```
|
```
|
||||||
|
|
||||||
For the source package:
|
For the source package:
|
||||||
|
|
11
RELEASE.md
11
RELEASE.md
|
@ -285,6 +285,11 @@ Once we are confident that the release will be out shortly, and doesn't need any
|
||||||
* You can verify the correct Python version is used with `poetry debug info`
|
* You can verify the correct Python version is used with `poetry debug info`
|
||||||
- [ ] Verify and checkout the git tag for this release
|
- [ ] Verify and checkout the git tag for this release
|
||||||
- [ ] Run `poetry install --sync`
|
- [ ] Run `poetry install --sync`
|
||||||
|
- [ ] On the silicon mac, build the container image:
|
||||||
|
```
|
||||||
|
python3 ./install/common/build-image.py
|
||||||
|
```
|
||||||
|
Then copy the `share/container.tar.gz` to the assets folder on `dangerzone-$VERSION-arm64.tar.gz`, along with the `share/image-id.txt` file.
|
||||||
- [ ] Run `poetry run ./install/macos/build-app.py`; this will make `dist/Dangerzone.app`
|
- [ ] Run `poetry run ./install/macos/build-app.py`; this will make `dist/Dangerzone.app`
|
||||||
- [ ] Make sure that the build application works with the containerd graph
|
- [ ] Make sure that the build application works with the containerd graph
|
||||||
driver (see [#933](https://github.com/freedomofpress/dangerzone/issues/933))
|
driver (see [#933](https://github.com/freedomofpress/dangerzone/issues/933))
|
||||||
|
@ -403,6 +408,8 @@ Build the latest container:
|
||||||
python3 ./install/common/build-image.py
|
python3 ./install/common/build-image.py
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Copy the container image to the assets folder on `dangerzone-$VERSION-i686.tar.gz`.
|
||||||
|
|
||||||
Create a .rpm:
|
Create a .rpm:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
|
@ -449,9 +456,9 @@ To publish the release:
|
||||||
* Copy the release notes text from the template at [`docs/templates/release-notes`](https://github.com/freedomofpress/dangerzone/tree/main/docs/templates/)
|
* Copy the release notes text from the template at [`docs/templates/release-notes`](https://github.com/freedomofpress/dangerzone/tree/main/docs/templates/)
|
||||||
* You can use `./dev_scripts/upload-asset.py`, if you want to upload an asset
|
* You can use `./dev_scripts/upload-asset.py`, if you want to upload an asset
|
||||||
using an access token.
|
using an access token.
|
||||||
- [ ] Upload the `container.tar.gz` i686 image that was created in the previous step
|
- [ ] Upload the `container-$VERSION-i686.tar.gz` and `container-$VERSION-arm64.tar.gz` images that were created in the previous step
|
||||||
|
|
||||||
**Important:** Make sure that it's the same container image as the ones that
|
**Important:** Make sure that it's the same container images as the ones that
|
||||||
are shipped in other platforms (see our [Pre-release](#Pre-release) section)
|
are shipped in other platforms (see our [Pre-release](#Pre-release) section)
|
||||||
|
|
||||||
- [ ] Upload the detached signatures (.asc) and checksum file.
|
- [ ] Upload the detached signatures (.asc) and checksum file.
|
||||||
|
|
6
debian/changelog
vendored
6
debian/changelog
vendored
|
@ -1,3 +1,9 @@
|
||||||
|
dangerzone (0.8.0) unstable; urgency=low
|
||||||
|
|
||||||
|
* Released Dangerzone 0.8.0
|
||||||
|
|
||||||
|
-- Freedom of the Press Foundation <info@freedom.press> Tue, 30 Oct 2024 01:56:28 +0300
|
||||||
|
|
||||||
dangerzone (0.7.1) unstable; urgency=low
|
dangerzone (0.7.1) unstable; urgency=low
|
||||||
|
|
||||||
* Released Dangerzone 0.7.1
|
* Released Dangerzone 0.7.1
|
||||||
|
|
|
@ -11,7 +11,8 @@ log = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
||||||
DZ_ASSETS = [
|
DZ_ASSETS = [
|
||||||
"container.tar.gz",
|
"container-{version}-i686.tar.gz",
|
||||||
|
"container-{version}-arm64.tar.gz",
|
||||||
"Dangerzone-{version}.msi",
|
"Dangerzone-{version}.msi",
|
||||||
"Dangerzone-{version}-arm64.dmg",
|
"Dangerzone-{version}-arm64.dmg",
|
||||||
"Dangerzone-{version}-i686.dmg",
|
"Dangerzone-{version}-i686.dmg",
|
||||||
|
|
|
@ -32,7 +32,7 @@ Name: dangerzone-qubes
|
||||||
Name: dangerzone
|
Name: dangerzone
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
Version: 0.7.1
|
Version: 0.8.0
|
||||||
Release: 1%{?dist}
|
Release: 1%{?dist}
|
||||||
Summary: Take potentially dangerous PDFs, office documents, or images and convert them to safe PDFs
|
Summary: Take potentially dangerous PDFs, office documents, or images and convert them to safe PDFs
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
[tool.poetry]
|
[tool.poetry]
|
||||||
name = "dangerzone"
|
name = "dangerzone"
|
||||||
version = "0.7.1"
|
version = "0.8.0"
|
||||||
description = "Take potentially dangerous PDFs, office documents, or images and convert them to safe PDFs"
|
description = "Take potentially dangerous PDFs, office documents, or images and convert them to safe PDFs"
|
||||||
authors = ["Freedom of the Press Foundation <info@freedom.press>", "Micah Lee <micah.lee@theintercept.com>"]
|
authors = ["Freedom of the Press Foundation <info@freedom.press>", "Micah Lee <micah.lee@theintercept.com>"]
|
||||||
license = "AGPL-3.0"
|
license = "AGPL-3.0"
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
0.7.1
|
0.8.0
|
||||||
|
|
Loading…
Reference in a new issue