Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for Fedora 39 #680

Merged
merged 9 commits into from
Jan 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 46 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,33 @@ jobs:
./dev_scripts/env.py --distro ubuntu --version 20.04 run --dev \
bash -c 'cd dangerzone; poetry run make test'

ci-fedora-39:
machine:
image: ubuntu-2004:202111-01
steps:
- checkout
- run: *install-podman

- run:
name: Prepare cache directory
command: |
sudo mkdir -p /caches
sudo chown -R $USER:$USER /caches
- run: *calculate-cache-key
- restore_cache: *restore-cache
- run: *copy-image

- run:
name: Prepare Dangerzone environment
command: |
./dev_scripts/env.py --distro fedora --version 39 build-dev

- run:
name: Run CI tests
command: |
./dev_scripts/env.py --distro fedora --version 39 run --dev \
bash -c 'cd dangerzone; poetry run make test'

ci-fedora-38:
machine:
image: ubuntu-2004:202111-01
Expand Down Expand Up @@ -499,6 +526,19 @@ jobs:
- run: *copy-image
- run: *build-deb

build-fedora-39:
docker:
- image: fedora:39
resource_class: medium+
steps:
- run: *install-dependencies-rpm
- checkout
- run: *calculate-cache-key
- restore_cache: *restore-cache
- run: *copy-image
- run: *build-rpm
- run: *build-rpm-qubes

build-fedora-38:
docker:
- image: fedora:38
Expand Down Expand Up @@ -544,6 +584,9 @@ workflows:
- ci-debian-bullseye:
requires:
- build-container-image
- ci-fedora-39:
requires:
- build-container-image
- ci-fedora-38:
requires:
- build-container-image
Expand All @@ -568,6 +611,9 @@ workflows:
- build-debian-bookworm:
requires:
- build-container-image
- build-fedora-39:
requires:
- build-container-image
- build-fedora-38:
requires:
- build-container-image
43 changes: 43 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -163,3 +163,46 @@ jobs:
./dev_scripts/env.py --distro ${{ matrix.distro }} \
--version ${{ matrix.version }} \
run dangerzone --help

build-install-rpm:
name: "Build and install a Dangerzone RPM on Fedora ${{matrix.version}}"
runs-on: ubuntu-latest
strategy:
matrix:
include:
- version: "38"
- version: "39"
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Build dev environment
run: |
./dev_scripts/env.py --distro fedora --version ${{ matrix.version }} \
build-dev

- name: Build Dangerzone image
run: |
./dev_scripts/env.py --distro fedora --version ${{ matrix.version }} \
run --dev --no-gui \
bash -c 'cd /home/user/dangerzone && python3 ./install/common/build-image.py'

- name: Build Dangerzone .rpm
run: |
./dev_scripts/env.py --distro fedora --version ${{ matrix.version }} \
run --dev --no-gui ./dangerzone/install/linux/build-rpm.py

- name: Build end-user environment
run: |
./dev_scripts/env.py --distro fedora --version ${{ matrix.version }} \
build --download-pyside6

- name: Run a test command
run: |
./dev_scripts/env.py --distro fedora --version ${{ matrix.version }} \
run dangerzone-cli dangerzone/tests/test_docs/sample-pdf.pdf

- name: Check that the Dangerzone GUI imports work
run: |
./dev_scripts/env.py --distro fedora --version ${{ matrix.version }} \
run dangerzone --help
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,12 @@ since 0.4.1, and this project adheres to [Semantic Versioning](https://semver.or

## Unreleased

### Added

- Platform support: Fedora 39 ([issue #606](https://github.com/freedomofpress/dangerzone/issues/606))

## Fixed

- Fix mismatched between between original document and converted one ([issue #626](https://github.com/freedomofpress/dangerzone/issues/)). This does not affect the quality of the final document.
- Capitalize "dangerzone" on the application as well as on the Linux desktop shortcut, thanks to [@sudwhiwdh](https://github.com/sudwhiwdh)

Expand Down
1 change: 1 addition & 0 deletions INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ Dangerzone is available for:
- Debian 13 (trixie)
- Debian 12 (bookworm)
- Debian 11 (bullseye)
- Fedora 39
- Fedora 38
- Qubes OS (beta support)

Expand Down
63 changes: 57 additions & 6 deletions RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ This section documents the release process. Unless you're a dangerzone developer

Before making a release, all of these should be complete:

- [ ] [Add new Linux platforms and remove obsolete ones](#add-new-platforms-and-remove-obsolete-ones)
- [ ] Bump the Python dependencies using `poetry lock`
- [ ] [Check for new PySide6 versions](#check-for-new-pyside6-versions)
- [ ] Update `version` in `pyproject.toml`
- [ ] Update `share/version.txt`
- [ ] Update the "Version" field in `install/linux/dangerzone.spec`
Expand All @@ -20,6 +23,56 @@ Before making a release, all of these should be complete:
```
**Note**: release candidates are suffixed by `-rcX`.

## Add new platforms and remove obsolete ones

Our currently supported Linux OSes are Debian, Ubuntu, Fedora (we treat Qubes OS
as a special case of Fedora, release-wise). For each of these platforms, we need
to check if a new version has been added, or if an existing one is now EOL
(https://endoflife.date/ is handy for this purpose).

In case of a new version:

1. Add it in our CI workflows, to test if that version works.
* See `.circleci/config.yml` and `.github/workflows/ci.yml`, as well as
`dev_scripts/env.py` and `dev_scripts/qa.py`.
2. Do a test of this version locally with `dev_scripta/qa.py`. Focus on the
GUI part, since the basic functionality is already tested by our CI
workflows.
3. Add the new version in our `INSTALL.md` document, and drop a line in our
`CHANGELOG.md`.
4. If that version is a new stable release, update the `RELEASE.md` and
`BUILD.md` files where necesary.
4. Send a PR with the above changes.

In case of an EOL version:

1. Remove any mention to this version from our repo.
* Consult the previous paragraph, but also `grep` your way around.
2. Add a notice in our `CHANGELOG.md` about the version removal.

## Check for new PySide6 versions

When a new PySide6 version has been released, we will get notified because the
nightly CI tests on `freedomofpres/python3-pyside6-rpm` will start failing.

Even if we miss these notifications, we will see failing builds in the
Dangerzone repo once we update our `poetry.lock` file. More specifically,
`./dev_scripts/env.py --distro fedora [...] build` will start failing, because
it won't be able to find a PySide6 RPM for the new version.

The Dangerzone maintainer should do the following:

1. Check the changelog for the new PySide6 version, and ensure it doesn't
introduce a breaking change.
2. Clone locally the https://github.com/freedomofpress/python3-pyside6-rpm repo.
3. Bump the PySide6 version and create a new PySide6 RPM for the supported
Fedora versions.
4. Copy it under the `dist/` directory of the Dangerzone repo.
5. Create an end-user build environment with `./dev_scripts/env.py --distro fedora [...] build`
6. Test that the Dangerzone UI works properly.
7. Ship the new PySide6 RPMs in our Fedora repo
(https://github.com/freedomofpress/yum-tools-prod)
8. Send a PR to the Dangerzone repo, with the new `poetry.lock` file.

## Large Document Testing

Expand All @@ -34,8 +87,6 @@ These tests will identify any regressions or progression in terms of document co
To ensure that new releases do not introduce regressions, and support existing
and newer platforms, we have to do the following:

- [ ] In `.circleci/config.yml`, add new platforms and remove obsolete platforms
- [ ] Bump the Python dependencies using `poetry lock`
- [ ] Make sure that the tip of the `main` branch passes the CI tests.
- [ ] Make sure that the Apple account has a valid application password and has
agreed to the latest Apple terms (see [macOS release](#macos-release)
Expand Down Expand Up @@ -72,7 +123,7 @@ and newer platforms, we have to do the following:
- [ ] Run the Dangerzone tests.
- [ ] Create a .deb package and install it system-wide.
- [ ] Test some QA scenarios (see [Scenarios](#Scenarios) below).
- [ ] Create a test build in the most recent Fedora platform (Fedora 38 as of
- [ ] Create a test build in the most recent Fedora platform (Fedora 39 as of
writing this) and make sure it works:
- [ ] Create a new development environment with Poetry.
- [ ] Build the container image and ensure the development environment uses
Expand Down Expand Up @@ -326,15 +377,15 @@ repo, by sending a PR. Follow the instructions in that repo on how to do so.

> **NOTE**: This procedure will have to be done for every supported Fedora version.
>
> In this section, we'll use Fedora 38 as an example.
> In this section, we'll use Fedora 39 as an example.

Create a Fedora development environment. You can [follow the
instructions in our build section](https://github.com/freedomofpress/dangerzone/blob/main/BUILD.md#fedora),
or create your own locally with:

```sh
./dev_scripts/env.py --distro fedora --version 38 build-dev
./dev_scripts/env.py --distro fedora --version 38 run --dev bash
./dev_scripts/env.py --distro fedora --version 39 build-dev
./dev_scripts/env.py --distro fedora --version 39 run --dev bash
cd dangerzone
```

Expand Down
Loading
Loading