mirror of
https://github.com/freedomofpress/dangerzone.git
synced 2025-04-28 18:02:38 +02:00
Drop checks for the FPF-maintained PySide6 package
Some checks failed
Build dev environments / Build dev-env (debian-bookworm) (push) Has been cancelled
Build dev environments / Build dev-env (debian-bullseye) (push) Has been cancelled
Build dev environments / Build dev-env (debian-trixie) (push) Has been cancelled
Build dev environments / Build dev-env (fedora-40) (push) Has been cancelled
Build dev environments / Build dev-env (fedora-41) (push) Has been cancelled
Build dev environments / Build dev-env (ubuntu-20.04) (push) Has been cancelled
Build dev environments / Build dev-env (ubuntu-22.04) (push) Has been cancelled
Build dev environments / Build dev-env (ubuntu-24.04) (push) Has been cancelled
Build dev environments / Build dev-env (ubuntu-24.10) (push) Has been cancelled
Build dev environments / build-container-image (push) Has been cancelled
Tests / run-lint (push) Has been cancelled
Tests / build-container-image (push) Has been cancelled
Tests / Download and cache Tesseract data (push) Has been cancelled
Scan latest app and container / security-scan-container (push) Has been cancelled
Scan latest app and container / security-scan-app (push) Has been cancelled
Tests / windows (push) Has been cancelled
Tests / macOS (arch64) (push) Has been cancelled
Tests / macOS (x86_64) (push) Has been cancelled
Tests / build-deb (debian bookworm) (push) Has been cancelled
Tests / build-deb (debian bullseye) (push) Has been cancelled
Tests / build-deb (debian trixie) (push) Has been cancelled
Tests / build-deb (ubuntu 20.04) (push) Has been cancelled
Tests / build-deb (ubuntu 22.04) (push) Has been cancelled
Tests / build-deb (ubuntu 24.04) (push) Has been cancelled
Tests / build-deb (ubuntu 24.10) (push) Has been cancelled
Tests / install-deb (debian bookworm) (push) Has been cancelled
Tests / install-deb (debian bullseye) (push) Has been cancelled
Tests / install-deb (debian trixie) (push) Has been cancelled
Tests / install-deb (ubuntu 20.04) (push) Has been cancelled
Tests / install-deb (ubuntu 22.04) (push) Has been cancelled
Tests / install-deb (ubuntu 24.04) (push) Has been cancelled
Tests / install-deb (ubuntu 24.10) (push) Has been cancelled
Tests / build-install-rpm (fedora 40) (push) Has been cancelled
Tests / build-install-rpm (fedora 41) (push) Has been cancelled
Tests / run tests (debian bookworm) (push) Has been cancelled
Tests / run tests (debian bullseye) (push) Has been cancelled
Tests / run tests (debian trixie) (push) Has been cancelled
Tests / run tests (fedora 40) (push) Has been cancelled
Tests / run tests (fedora 41) (push) Has been cancelled
Tests / run tests (ubuntu 20.04) (push) Has been cancelled
Tests / run tests (ubuntu 22.04) (push) Has been cancelled
Tests / run tests (ubuntu 24.04) (push) Has been cancelled
Tests / run tests (ubuntu 24.10) (push) Has been cancelled
Some checks failed
Build dev environments / Build dev-env (debian-bookworm) (push) Has been cancelled
Build dev environments / Build dev-env (debian-bullseye) (push) Has been cancelled
Build dev environments / Build dev-env (debian-trixie) (push) Has been cancelled
Build dev environments / Build dev-env (fedora-40) (push) Has been cancelled
Build dev environments / Build dev-env (fedora-41) (push) Has been cancelled
Build dev environments / Build dev-env (ubuntu-20.04) (push) Has been cancelled
Build dev environments / Build dev-env (ubuntu-22.04) (push) Has been cancelled
Build dev environments / Build dev-env (ubuntu-24.04) (push) Has been cancelled
Build dev environments / Build dev-env (ubuntu-24.10) (push) Has been cancelled
Build dev environments / build-container-image (push) Has been cancelled
Tests / run-lint (push) Has been cancelled
Tests / build-container-image (push) Has been cancelled
Tests / Download and cache Tesseract data (push) Has been cancelled
Scan latest app and container / security-scan-container (push) Has been cancelled
Scan latest app and container / security-scan-app (push) Has been cancelled
Tests / windows (push) Has been cancelled
Tests / macOS (arch64) (push) Has been cancelled
Tests / macOS (x86_64) (push) Has been cancelled
Tests / build-deb (debian bookworm) (push) Has been cancelled
Tests / build-deb (debian bullseye) (push) Has been cancelled
Tests / build-deb (debian trixie) (push) Has been cancelled
Tests / build-deb (ubuntu 20.04) (push) Has been cancelled
Tests / build-deb (ubuntu 22.04) (push) Has been cancelled
Tests / build-deb (ubuntu 24.04) (push) Has been cancelled
Tests / build-deb (ubuntu 24.10) (push) Has been cancelled
Tests / install-deb (debian bookworm) (push) Has been cancelled
Tests / install-deb (debian bullseye) (push) Has been cancelled
Tests / install-deb (debian trixie) (push) Has been cancelled
Tests / install-deb (ubuntu 20.04) (push) Has been cancelled
Tests / install-deb (ubuntu 22.04) (push) Has been cancelled
Tests / install-deb (ubuntu 24.04) (push) Has been cancelled
Tests / install-deb (ubuntu 24.10) (push) Has been cancelled
Tests / build-install-rpm (fedora 40) (push) Has been cancelled
Tests / build-install-rpm (fedora 41) (push) Has been cancelled
Tests / run tests (debian bookworm) (push) Has been cancelled
Tests / run tests (debian bullseye) (push) Has been cancelled
Tests / run tests (debian trixie) (push) Has been cancelled
Tests / run tests (fedora 40) (push) Has been cancelled
Tests / run tests (fedora 41) (push) Has been cancelled
Tests / run tests (ubuntu 20.04) (push) Has been cancelled
Tests / run tests (ubuntu 22.04) (push) Has been cancelled
Tests / run tests (ubuntu 24.04) (push) Has been cancelled
Tests / run tests (ubuntu 24.10) (push) Has been cancelled
There are various place in our release process (build/installation/release instructions and CI checks) where we make sure that the FPF-maintained PySide6 package works in Fedora 39. Now that Fedora 39 is nearing its EOL date, we can remove those.
This commit is contained in:
parent
7eaa0cfe50
commit
c89988654c
6 changed files with 1 additions and 178 deletions
2
.github/workflows/ci.yml
vendored
2
.github/workflows/ci.yml
vendored
|
@ -328,7 +328,7 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
./dev_scripts/env.py --distro ${{ matrix.distro }} \
|
./dev_scripts/env.py --distro ${{ matrix.distro }} \
|
||||||
--version ${{ matrix.version }} \
|
--version ${{ matrix.version }} \
|
||||||
build --download-pyside6
|
build
|
||||||
|
|
||||||
- name: Run a test command
|
- name: Run a test command
|
||||||
run: |
|
run: |
|
||||||
|
|
9
BUILD.md
9
BUILD.md
|
@ -314,18 +314,9 @@ test it.
|
||||||
1. Install the `.rpm` package you just copied
|
1. Install the `.rpm` package you just copied
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
sudo dnf install 'dnf-command(config-manager)'
|
|
||||||
sudo dnf-3 config-manager --add-repo=https://packages.freedom.press/yum-tools-prod/dangerzone/dangerzone.repo
|
|
||||||
sudo dnf install ~/QubesIncoming/dz/*.rpm
|
sudo dnf install ~/QubesIncoming/dz/*.rpm
|
||||||
```
|
```
|
||||||
|
|
||||||
In the above steps, we add the Dangerzone repo because it includes the
|
|
||||||
necessary PySide6 RPM in order to make Dangerzone work.
|
|
||||||
|
|
||||||
> [!NOTE]
|
|
||||||
> During the installation, you will be asked to
|
|
||||||
> [verify the Dangerzone GPG key](INSTALL.md#verifying-dangerzone-gpg-key).
|
|
||||||
|
|
||||||
2. Shutdown the `fedora-40-dz` template
|
2. Shutdown the `fedora-40-dz` template
|
||||||
|
|
||||||
### Developing Dangerzone
|
### Developing Dangerzone
|
||||||
|
|
17
INSTALL.md
17
INSTALL.md
|
@ -137,23 +137,6 @@ sudo apt install -y dangerzone
|
||||||
|
|
||||||
### Fedora
|
### Fedora
|
||||||
|
|
||||||
<table>
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<details>
|
|
||||||
<summary><i>:information_source: Backport notice for Fedora users regarding the <code>python3-pyside6</code> package</i></summary>
|
|
||||||
</br>
|
|
||||||
|
|
||||||
Fedora 39+ onwards does not provide official Python bindings for Qt. For
|
|
||||||
this reason, we provide our own `python3-pyside6` package (see
|
|
||||||
[build instructions](https://github.com/freedomofpress/maint-dangerzone-pyside6))
|
|
||||||
from our YUM repo. For a deeper dive on this subject, you may read
|
|
||||||
[this issue](https://github.com/freedomofpress/dangerzone/issues/211#issuecomment-1827777122).
|
|
||||||
</details>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
|
|
||||||
Type the following commands in a terminal:
|
Type the following commands in a terminal:
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
11
RELEASE.md
11
RELEASE.md
|
@ -9,7 +9,6 @@ Before making a release, all of these should be complete:
|
||||||
- [ ] Copy the checkboxes from these instructions onto a new issue and call it **QA and Release version \<VERSION\>**
|
- [ ] Copy the checkboxes from these instructions onto a new issue and call it **QA and Release version \<VERSION\>**
|
||||||
- [ ] [Add new Linux platforms and remove obsolete ones](https://github.com/freedomofpress/dangerzone/blob/main/RELEASE.md#add-new-platforms-and-remove-obsolete-ones)
|
- [ ] [Add new Linux platforms and remove obsolete ones](https://github.com/freedomofpress/dangerzone/blob/main/RELEASE.md#add-new-platforms-and-remove-obsolete-ones)
|
||||||
- [ ] Bump the Python dependencies using `poetry lock`
|
- [ ] Bump the Python dependencies using `poetry lock`
|
||||||
- [ ] [Check for official PySide6 versions](https://github.com/freedomofpress/dangerzone/blob/main/RELEASE.md#check-for-official-pyside6-versions)
|
|
||||||
- [ ] Update `version` in `pyproject.toml`
|
- [ ] Update `version` in `pyproject.toml`
|
||||||
- [ ] Update `share/version.txt`
|
- [ ] Update `share/version.txt`
|
||||||
- [ ] Update the "Version" field in `install/linux/dangerzone.spec`
|
- [ ] Update the "Version" field in `install/linux/dangerzone.spec`
|
||||||
|
@ -44,16 +43,6 @@ In case of an EOL version:
|
||||||
* Consult the previous paragraph, but also `grep` your way around.
|
* Consult the previous paragraph, but also `grep` your way around.
|
||||||
2. Add a notice in our `CHANGELOG.md` about the version removal.
|
2. Add a notice in our `CHANGELOG.md` about the version removal.
|
||||||
|
|
||||||
## Check for official PySide6 versions
|
|
||||||
|
|
||||||
PySide6 6.7.0 is available from the Fedora Rawhide repo, and we expect that a
|
|
||||||
similar version will be pushed soon to the rest of the stable releases. Prior to
|
|
||||||
a release, we should check if this has happened already. Once this happens, we
|
|
||||||
should update our CI tests accordingly, and remove this notice.
|
|
||||||
|
|
||||||
For more info, read:
|
|
||||||
https://github.com/freedomofpress/maint-dangerzone-pyside6/issues/5
|
|
||||||
|
|
||||||
## Large Document Testing
|
## Large Document Testing
|
||||||
|
|
||||||
Parallel to the QA process, the release candidate should be put through the large document tests in a dedicated machine to run overnight.
|
Parallel to the QA process, the release candidate should be put through the large document tests in a dedicated machine to run overnight.
|
||||||
|
|
|
@ -16,42 +16,6 @@ DEFAULT_USER = "user"
|
||||||
DEFAULT_DRY = False
|
DEFAULT_DRY = False
|
||||||
DEFAULT_DEV = False
|
DEFAULT_DEV = False
|
||||||
DEFAULT_SHOW_DOCKERFILE = False
|
DEFAULT_SHOW_DOCKERFILE = False
|
||||||
DEFAULT_DOWNLOAD_PYSIDE6 = False
|
|
||||||
|
|
||||||
PYSIDE6_VERSION = "6.7.1"
|
|
||||||
PYSIDE6_RPM = "python3-pyside6-{pyside6_version}-1.fc{fedora_version}.x86_64.rpm"
|
|
||||||
PYSIDE6_URL = (
|
|
||||||
"https://packages.freedom.press/yum-tools-prod/dangerzone/f{fedora_version}/%s"
|
|
||||||
% PYSIDE6_RPM
|
|
||||||
)
|
|
||||||
|
|
||||||
PYSIDE6_DL_MESSAGE = """\
|
|
||||||
Downloading PySide6 RPM from:
|
|
||||||
|
|
||||||
{pyside6_url}
|
|
||||||
|
|
||||||
into the following local path:
|
|
||||||
|
|
||||||
{pyside6_local_path}
|
|
||||||
|
|
||||||
The RPM is over 100 MB, so this operation may take a while...
|
|
||||||
"""
|
|
||||||
|
|
||||||
PYSIDE6_NOT_FOUND_ERROR = """\
|
|
||||||
The following package is not present in your system:
|
|
||||||
|
|
||||||
{pyside6_local_path}
|
|
||||||
|
|
||||||
You can build it locally and copy it in the expected path, following the instructions
|
|
||||||
in:
|
|
||||||
|
|
||||||
https://github.com/freedomofpress/python3-pyside6-rpm
|
|
||||||
|
|
||||||
Alternatively, you can rerun the command adding the '--download-pyside6' flag, which
|
|
||||||
will download it from:
|
|
||||||
|
|
||||||
{pyside6_url}
|
|
||||||
"""
|
|
||||||
|
|
||||||
# The Linux distributions that we currently support.
|
# The Linux distributions that we currently support.
|
||||||
# FIXME: Add a version mapping to avoid mistakes.
|
# FIXME: Add a version mapping to avoid mistakes.
|
||||||
|
@ -232,11 +196,6 @@ RUN apt-get update \
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
"""
|
"""
|
||||||
|
|
||||||
DOCKERFILE_BUILD_FEDORA_39_DEPS = r"""
|
|
||||||
COPY {pyside6_rpm} /tmp/pyside6.rpm
|
|
||||||
RUN dnf install -y /tmp/pyside6.rpm
|
|
||||||
"""
|
|
||||||
|
|
||||||
DOCKERFILE_BUILD_FEDORA_DEPS = r"""
|
DOCKERFILE_BUILD_FEDORA_DEPS = r"""
|
||||||
RUN dnf install -y mupdf thunar && dnf clean all
|
RUN dnf install -y mupdf thunar && dnf clean all
|
||||||
|
|
||||||
|
@ -390,74 +349,6 @@ def get_files_in(*folders: list[str]) -> list[pathlib.Path]:
|
||||||
return files
|
return files
|
||||||
|
|
||||||
|
|
||||||
class PySide6Manager:
|
|
||||||
"""Provision PySide6 RPMs in our Dangerzone environments.
|
|
||||||
|
|
||||||
This class holds all the logic around checking and downloading PySide RPMs. It can
|
|
||||||
check if the required RPM version is present under "/dist", and optionally download
|
|
||||||
it.
|
|
||||||
"""
|
|
||||||
|
|
||||||
def __init__(self, distro_name, distro_version):
|
|
||||||
if distro_name != "fedora":
|
|
||||||
raise RuntimeError("Managing PySide6 RPMs is available only in Fedora")
|
|
||||||
self.distro_name = distro_name
|
|
||||||
self.distro_version = distro_version
|
|
||||||
|
|
||||||
@property
|
|
||||||
def version(self):
|
|
||||||
"""The version of the PySide6 RPM."""
|
|
||||||
return PYSIDE6_VERSION
|
|
||||||
|
|
||||||
@property
|
|
||||||
def rpm_name(self):
|
|
||||||
"""The name of the PySide6 RPM."""
|
|
||||||
return PYSIDE6_RPM.format(
|
|
||||||
pyside6_version=self.version, fedora_version=self.distro_version
|
|
||||||
)
|
|
||||||
|
|
||||||
@property
|
|
||||||
def rpm_url(self):
|
|
||||||
"""The URL of the PySide6 RPM, as hosted in FPF's RPM repo."""
|
|
||||||
return PYSIDE6_URL.format(
|
|
||||||
pyside6_version=self.version,
|
|
||||||
fedora_version=self.distro_version,
|
|
||||||
)
|
|
||||||
|
|
||||||
@property
|
|
||||||
def rpm_local_path(self):
|
|
||||||
"""The local path where this script will look for the PySide6 RPM."""
|
|
||||||
return git_root() / "dist" / self.rpm_name
|
|
||||||
|
|
||||||
@property
|
|
||||||
def is_rpm_present(self):
|
|
||||||
"""Check if PySide6 RPM is present in the user's system."""
|
|
||||||
return self.rpm_local_path.exists()
|
|
||||||
|
|
||||||
def download_rpm(self):
|
|
||||||
"""Download PySide6 from FPF's RPM repo."""
|
|
||||||
print(
|
|
||||||
PYSIDE6_DL_MESSAGE.format(
|
|
||||||
pyside6_url=self.rpm_url,
|
|
||||||
pyside6_local_path=self.rpm_local_path,
|
|
||||||
),
|
|
||||||
file=sys.stderr,
|
|
||||||
)
|
|
||||||
try:
|
|
||||||
with (
|
|
||||||
urllib.request.urlopen(self.rpm_url) as r,
|
|
||||||
open(self.rpm_local_path, "wb") as f,
|
|
||||||
):
|
|
||||||
shutil.copyfileobj(r, f)
|
|
||||||
except:
|
|
||||||
# NOTE: We purposefully catch all exceptions, since we want to catch Ctrl-C
|
|
||||||
# as well.
|
|
||||||
print("Download interrupted, removing file", file=sys.stderr)
|
|
||||||
self.rpm_local_path.unlink()
|
|
||||||
raise
|
|
||||||
print("PySide6 was downloaded successfully", file=sys.stderr)
|
|
||||||
|
|
||||||
|
|
||||||
class Env:
|
class Env:
|
||||||
"""A class that implements actions on Dangerzone environments"""
|
"""A class that implements actions on Dangerzone environments"""
|
||||||
|
|
||||||
|
@ -736,7 +627,6 @@ class Env:
|
||||||
def build(
|
def build(
|
||||||
self,
|
self,
|
||||||
show_dockerfile=DEFAULT_SHOW_DOCKERFILE,
|
show_dockerfile=DEFAULT_SHOW_DOCKERFILE,
|
||||||
download_pyside6=DEFAULT_DOWNLOAD_PYSIDE6,
|
|
||||||
):
|
):
|
||||||
"""Build a Linux environment and install Dangerzone in it."""
|
"""Build a Linux environment and install Dangerzone in it."""
|
||||||
build_dir = distro_build(self.distro, self.version)
|
build_dir = distro_build(self.distro, self.version)
|
||||||
|
@ -749,28 +639,6 @@ class Env:
|
||||||
package = package_src.name
|
package = package_src.name
|
||||||
package_dst = build_dir / package
|
package_dst = build_dir / package
|
||||||
install_cmd = "dnf install -y"
|
install_cmd = "dnf install -y"
|
||||||
|
|
||||||
# NOTE: For Fedora 39, we check if a PySide6 RPM package exists in
|
|
||||||
# the user's system. If not, we either throw an error or download it from
|
|
||||||
# FPF's repo, according to the user's choice.
|
|
||||||
if self.version == "39":
|
|
||||||
pyside6 = PySide6Manager(self.distro, self.version)
|
|
||||||
if not pyside6.is_rpm_present:
|
|
||||||
if download_pyside6:
|
|
||||||
pyside6.download_rpm()
|
|
||||||
else:
|
|
||||||
print(
|
|
||||||
PYSIDE6_NOT_FOUND_ERROR.format(
|
|
||||||
pyside6_local_path=pyside6.rpm_local_path,
|
|
||||||
pyside6_url=pyside6.rpm_url,
|
|
||||||
),
|
|
||||||
file=sys.stderr,
|
|
||||||
)
|
|
||||||
return 1
|
|
||||||
shutil.copy(pyside6.rpm_local_path, build_dir / pyside6.rpm_name)
|
|
||||||
install_deps = (
|
|
||||||
DOCKERFILE_BUILD_FEDORA_DEPS + DOCKERFILE_BUILD_FEDORA_39_DEPS
|
|
||||||
).format(pyside6_rpm=pyside6.rpm_name)
|
|
||||||
else:
|
else:
|
||||||
install_deps = DOCKERFILE_BUILD_DEBIAN_DEPS
|
install_deps = DOCKERFILE_BUILD_DEBIAN_DEPS
|
||||||
if self.distro == "ubuntu" and self.version in ("20.04", "focal"):
|
if self.distro == "ubuntu" and self.version in ("20.04", "focal"):
|
||||||
|
@ -844,7 +712,6 @@ def env_build(args):
|
||||||
env = Env.from_args(args)
|
env = Env.from_args(args)
|
||||||
return env.build(
|
return env.build(
|
||||||
show_dockerfile=args.show_dockerfile,
|
show_dockerfile=args.show_dockerfile,
|
||||||
download_pyside6=args.download_pyside6,
|
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
@ -941,12 +808,6 @@ def parse_args():
|
||||||
action="store_true",
|
action="store_true",
|
||||||
help="Do not build, only show the Dockerfile",
|
help="Do not build, only show the Dockerfile",
|
||||||
)
|
)
|
||||||
parser_build.add_argument(
|
|
||||||
"--download-pyside6",
|
|
||||||
default=DEFAULT_DOWNLOAD_PYSIDE6,
|
|
||||||
action="store_true",
|
|
||||||
help="Download PySide6 from FPF's RPM repo",
|
|
||||||
)
|
|
||||||
|
|
||||||
return parser.parse_args()
|
return parser.parse_args()
|
||||||
|
|
||||||
|
|
|
@ -961,7 +961,6 @@ class QALinux(QABase):
|
||||||
"--version",
|
"--version",
|
||||||
self.VERSION,
|
self.VERSION,
|
||||||
"build",
|
"build",
|
||||||
"--download-pyside6",
|
|
||||||
)
|
)
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
|
|
Loading…
Reference in a new issue