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 41 #953

Merged
merged 4 commits into from
Oct 15, 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
2 changes: 2 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ jobs:
version: "39"
- distro: fedora
version: "40"
- distro: fedora
version: "41"

steps:
- name: Checkout
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/check_repos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,8 @@ jobs:
version: 39
- distro: fedora
version: 40
- distro: fedora
version: 41
steps:
- name: Add packages.freedom.press to our YUM sources
run: |
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ jobs:
strategy:
matrix:
distro: ["fedora"]
version: ["39", "40"]
version: ["39", "40", "41"]
steps:
- name: Checkout
uses: actions/checkout@v4
Expand Down Expand Up @@ -325,6 +325,8 @@ jobs:
version: "39"
- distro: fedora
version: "40"
- distro: fedora
version: "41"

steps:
- name: Checkout
Expand Down
24 changes: 23 additions & 1 deletion BUILD.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ Install dependencies:
</br>

The default Python version that ships with Ubuntu Focal (3.8) is not
compatible with PySide6, which requires Python 3.9 of greater.
compatible with PySide6, which requires Python 3.9 or greater.

You can install Python 3.9 using the `python3.9` package.

Expand Down Expand Up @@ -125,6 +125,28 @@ sudo dnf install -y rpm-build podman python3 python3-devel python3-poetry-core \
pipx qt6-qtbase-gui
```

<table>
<tr>
<td>
<details>
<summary><i>:memo: Expand this section if you are on Fedora 41.</i></summary>
</br>

The default Python version that ships with Fedora 41 (3.13) is not
compatible with PySide6, which requires Python 3.12 or earlier.

You can install Python 3.12 using the `python3.12` package.

```bash
sudo dnf install -y python3.12
```

Poetry will automatically pick up the correct version when running.
</details>
</td>
</tr>
</table>

Install Poetry using `pipx`:

```sh
Expand Down
1 change: 1 addition & 0 deletions INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ Dangerzone is available for:
- Debian 13 (trixie)
- Debian 12 (bookworm)
- Debian 11 (bullseye)
- Fedora 41
- Fedora 40
- Fedora 39
- Tails
Expand Down
12 changes: 6 additions & 6 deletions RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ 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:
In case of a new version (beta, RC, or official release):

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
Expand Down Expand Up @@ -103,15 +103,15 @@ 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 40 as of
- [ ] Create a test build in the most recent Fedora platform (Fedora 41 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
the new image.
- [ ] Run the Dangerzone tests.
- [ ] Create an .rpm package and install it system-wide.
- [ ] Test some QA scenarios (see [Scenarios](#Scenarios) below).
- [ ] Create a test build in the most recent Qubes Fedora template (Fedora 39 as
- [ ] Create a test build in the most recent Qubes Fedora template (Fedora 40 as
of writing this) and make sure it works:
- [ ] Create a new development environment with Poetry.
- [ ] Run the Dangerzone tests.
Expand Down Expand Up @@ -385,15 +385,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 39 as an example.
> In this section, we'll use Fedora 41 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 39 build-dev
./dev_scripts/env.py --distro fedora --version 39 run --dev bash
./dev_scripts/env.py --distro fedora --version 41 build-dev
./dev_scripts/env.py --distro fedora --version 41 run --dev bash
cd dangerzone
```

Expand Down
10 changes: 10 additions & 0 deletions dev_scripts/env.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,14 @@
&& rm -rf /var/lib/apt/lists/*
"""

# NOTE: Fedora 41 comes with Python 3.13 installed. Our Python project is not compatible
# yet with Python 3.13, because PySide6 cannot work with this Python version. To
# sidestep this, install Python 3.12 *only* in dev environments.
DOCKERFILE_BUILD_DEV_FEDORA_41_DEPS = r"""
# Install Python 3.12 since our project is not compatible yet with Python 3.13.
RUN dnf install -y python3.12
"""

# FIXME: Install Poetry on Fedora via package manager.
DOCKERFILE_BUILD_DEV_FEDORA_DEPS = r"""
RUN dnf install -y git rpm-build podman python3 python3-devel python3-poetry-core \
Expand Down Expand Up @@ -664,6 +672,8 @@ def build_dev(self, show_dockerfile=DEFAULT_SHOW_DOCKERFILE, sync=False):

if self.distro == "fedora":
install_deps = DOCKERFILE_BUILD_DEV_FEDORA_DEPS
if self.version == "41":
install_deps += DOCKERFILE_BUILD_DEV_FEDORA_41_DEPS
else:
# Use Qt6 in all of our Linux dev environments, and add a missing
# libxcb-cursor0 dependency
Expand Down
28 changes: 25 additions & 3 deletions dev_scripts/qa.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,15 +52,15 @@
- [ ] 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 40 as of
- [ ] Create a test build in the most recent Fedora platform (Fedora 41 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
the new image.
- [ ] Run the Dangerzone tests.
- [ ] Create an .rpm package and install it system-wide.
- [ ] Test some QA scenarios (see [Scenarios](#Scenarios) below).
- [ ] Create a test build in the most recent Qubes Fedora template (Fedora 39 as
- [ ] Create a test build in the most recent Qubes Fedora template (Fedora 40 as
of writing this) and make sure it works:
- [ ] Create a new development environment with Poetry.
- [ ] Run the Dangerzone tests.
Expand Down Expand Up @@ -234,7 +234,7 @@
</br>

The default Python version that ships with Ubuntu Focal (3.8) is not
compatible with PySide6, which requires Python 3.9 of greater.
compatible with PySide6, which requires Python 3.9 or greater.

You can install Python 3.9 using the `python3.9` package.

Expand Down Expand Up @@ -318,6 +318,28 @@
pipx qt6-qtbase-gui
```

<table>
<tr>
<td>
<details>
<summary><i>:memo: Expand this section if you are on Fedora 41.</i></summary>
</br>

The default Python version that ships with Fedora 41 (3.13) is not
compatible with PySide6, which requires Python 3.12 or earlier.

You can install Python 3.12 using the `python3.12` package.

```bash
sudo dnf install -y python3.12
```

Poetry will automatically pick up the correct version when running.
</details>
</td>
</tr>
</table>

Install Poetry using `pipx`:

```sh
Expand Down
11 changes: 11 additions & 0 deletions install/linux/dangerzone.spec
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,17 @@ convert the documents within a secure sandbox.
%prep
%autosetup -p1 -n dangerzone-%{version}

# XXX: Bump the Python requirement in pyproject.toml from <3.13 to <3.14. Fedora
# 41 comes with Python 3.13 installed, but our pyproject.toml does not support
# it because PySide6 in PyPI works with Python 3.12 or earlier.
#
# This hack sidesteps this issue, and we haven't noticed any paticular problem
# with the package that is built from that.
%if 0%{?fedora} == 41
sed -i 's/<3.13/<3.14/' pyproject.toml
%endif


%generate_buildrequires
%pyproject_buildrequires -R

Expand Down
Loading