Compare commits

...

5 commits

Author SHA1 Message Date
Alex Pyrgiotis
02151b5b9f
HACK: Deploy only Fedora 37 packages
When deploying packages, build the RPM package for Fedora 37 and deploy
only that.

Problem
=======

The v0.4.0 release introduced Fedora 37 support. We had tested building
an RPM package for Fedora 37 and installing it successfully, so we
assumed that we had the green light for the release.

Turns out however that our CI runners were not building packages for
each of our supported Fedora release, but solely for Fedora 35. It so
happened that Fedora 35 and Fedora 36 had similar Python versions, but
the same did not apply to Fedora 37.

The end result is that users could not install Dangerzone on Fedora 37
through our official repo.

Remediation
===========

In order to help out Fedora 37 users, we plan to do the following:

1. Bump the Fedora patch level of our package to -2. This will help
   users install the new package, once we release it.
2. Change our CI pipeline to build an RPM package for Fedora 37 instead,
   and deploy that to PackageCloud.
3. Comment out all the other deployments to PackageCloud, since the rest
   of the distros are not affected.

IMPORTANT: This is a hotfix that should never be merged back in the main
branch.

Fixes #156
2023-01-25 15:16:59 +02:00
Alex Pyrgiotis
05d08e084d
HACK: Temporarily skip Debian Bookworm builds
Temporarily skip building Debian Bookworm packages, due to an upstream
deprecation of `python-all` package [1]. The proper fix is in the `main`
branch, but we don't need to cherry-pick this in this hotfix branch.

[1]: https://github.com/freedomofpress/dangerzone/issues/292#issuecomment-1349967888
2023-01-25 15:04:55 +02:00
Alex Pyrgiotis
b416a566be
ci: Deploy to PackageCloud in Fedora 37 2023-01-25 15:04:54 +02:00
Alex Pyrgiotis
58b23a6338
ci: Handle upstream Poetry bug
Poetry 1.3 has an upstream bug [1] that makes it fail in TTYs that
report size 0. A temporary fix for this is to disable escape sequences
support with `--no-ansi`.

[1]: https://github.com/python-poetry/poetry/issues/7184
2023-01-25 10:52:36 +02:00
Alex Pyrgiotis
b25db1042b
install: Build the Fedora patch level to -2 2023-01-25 10:04:50 +02:00
2 changed files with 116 additions and 113 deletions

View file

@ -60,11 +60,11 @@ aliases:
echo "pushing: deb_dist/dangerzone_${VERSION}-1.dsc"
package_cloud push "firstlookmedia/code/${PACKAGECLOUD_DISTRO}" "deb_dist/dangerzone_${VERSION}-1.dsc"
elif [[ "${PACKAGE_TYPE}" == "rpm" ]]; then
echo "pushing: dist/dangerzone-${VERSION}-1.noarch.rpm"
package_cloud push "firstlookmedia/code/${PACKAGECLOUD_DISTRO}" "dist/dangerzone-${VERSION}-1.noarch.rpm"
echo "pushing: dist/dangerzone-${VERSION}-2.noarch.rpm"
package_cloud push "firstlookmedia/code/${PACKAGECLOUD_DISTRO}" "dist/dangerzone-${VERSION}-2.noarch.rpm"
echo ""
echo "pushing: dist/dangerzone-${VERSION}-1.src.rpm"
package_cloud push "firstlookmedia/code/${PACKAGECLOUD_DISTRO}" "dist/dangerzone-${VERSION}-1.src.rpm"
echo "pushing: dist/dangerzone-${VERSION}-2.src.rpm"
package_cloud push "firstlookmedia/code/${PACKAGECLOUD_DISTRO}" "dist/dangerzone-${VERSION}-2.src.rpm"
fi
jobs:
@ -83,7 +83,7 @@ jobs:
python3 -m venv .venv
source .venv/bin/activate
pip install poetry
poetry install # FIXME --dev-only once poetry 1.2.0 is out https://github.com/python-poetry/poetry/issues/2572
poetry --no-ansi install # FIXME --dev-only once poetry 1.2.0 is out https://github.com/python-poetry/poetry/issues/2572
- run:
name: Run linters to enforce code style
command: |
@ -135,7 +135,7 @@ jobs:
name: Install poetry dependencies
command: |
sudo pip3 install poetry
poetry install
poetry install --no-ansi
- run:
name: Prepare cache directory
command: |
@ -182,16 +182,16 @@ jobs:
- run: *copy-image
- run: *build-deb
build-debian-bookworm:
docker:
- image: debian:bookworm
resource_class: medium+
steps:
- run: *install-dependencies-deb
- checkout
- restore_cache: *restore-cache
- run: *copy-image
- run: *build-deb
#build-debian-bookworm:
# docker:
# - image: debian:bookworm
# resource_class: medium+
# steps:
# - run: *install-dependencies-deb
# - checkout
# - restore_cache: *restore-cache
# - run: *copy-image
# - run: *build-deb
build-debian-bullseye:
docker:
@ -239,7 +239,7 @@ jobs:
deploy-fedora:
docker:
- image: fedora:35
- image: fedora:37
resource_class: medium+
steps:
- run: *install-dependencies-rpm
@ -250,9 +250,12 @@ jobs:
- run:
name: Install packagecloud.io
command: |
dnf module install -y ruby:2.7 # requires ruby 2.7
# Fedora 37 has ruby 3.1 instead of 2.7.
dnf module install -y ruby:3.1
dnf --allowerasing -y distro-sync
dnf install -y ruby-devel
# In order to build some native libraries (e.g., unf_ext), we also
# need to install C++ build tools.
dnf install -y ruby-devel make automake gcc gcc-c++
gem install package_cloud
- run:
name: Deploy fedora/37
@ -260,82 +263,82 @@ jobs:
PACKAGE_TYPE: "rpm"
PACKAGECLOUD_DISTRO: "fedora/37"
<<: *deploy-packagecloud
- run:
name: Deploy fedora/36
environment:
PACKAGE_TYPE: "rpm"
PACKAGECLOUD_DISTRO: "fedora/36"
<<: *deploy-packagecloud
- run:
name: Deploy fedora/35
environment:
PACKAGE_TYPE: "rpm"
PACKAGECLOUD_DISTRO: "fedora/35"
<<: *deploy-packagecloud
#- run:
# name: Deploy fedora/36
# environment:
# PACKAGE_TYPE: "rpm"
# PACKAGECLOUD_DISTRO: "fedora/36"
# <<: *deploy-packagecloud
#- run:
# name: Deploy fedora/35
# environment:
# PACKAGE_TYPE: "rpm"
# PACKAGECLOUD_DISTRO: "fedora/35"
# <<: *deploy-packagecloud
deploy-debian:
docker:
- image: debian:bullseye
resource_class: medium+
steps:
- run: *install-dependencies-deb
- checkout
- restore_cache: *restore-cache
- run: *copy-image
- run: *build-deb
- run:
name: Install packagecloud.io
command: |
apt-get install -y ruby-dev rubygems
gem install -N rake
gem install -N package_cloud
- run:
name: Deploy debian/bullseye
environment:
PACKAGE_TYPE: "deb"
PACKAGECLOUD_DISTRO: "debian/bullseye"
<<: *deploy-packagecloud
- run:
name: Deploy debian/bookworm
environment:
PACKAGE_TYPE: "deb"
PACKAGECLOUD_DISTRO: "debian/bookworm"
<<: *deploy-packagecloud
#deploy-debian:
# docker:
# - image: debian:bullseye
# resource_class: medium+
# steps:
# - run: *install-dependencies-deb
# - checkout
# - restore_cache: *restore-cache
# - run: *copy-image
# - run: *build-deb
# - run:
# name: Install packagecloud.io
# command: |
# apt-get install -y ruby-dev rubygems
# gem install -N rake
# gem install -N package_cloud
# - run:
# name: Deploy debian/bullseye
# environment:
# PACKAGE_TYPE: "deb"
# PACKAGECLOUD_DISTRO: "debian/bullseye"
# <<: *deploy-packagecloud
# - run:
# name: Deploy debian/bookworm
# environment:
# PACKAGE_TYPE: "deb"
# PACKAGECLOUD_DISTRO: "debian/bookworm"
# <<: *deploy-packagecloud
deploy-ubuntu:
docker:
- image: ubuntu:22.04
resource_class: medium+
steps:
- run: *install-dependencies-deb
- checkout
- restore_cache: *restore-cache
- run: *copy-image
- run: *build-deb
- run:
name: Install packagecloud.io
command: |
apt-get install -y ruby-dev rubygems
gem install -N rake
gem install -N package_cloud
- run:
name: Deploy ubuntu/kinetic
environment:
PACKAGE_TYPE: "deb"
PACKAGECLOUD_DISTRO: "ubuntu/kinetic"
<<: *deploy-packagecloud
- run:
name: Deploy ubuntu/jammy
environment:
PACKAGE_TYPE: "deb"
PACKAGECLOUD_DISTRO: "ubuntu/jammy"
<<: *deploy-packagecloud
- run:
name: Deploy ubuntu/focal
environment:
PACKAGE_TYPE: "deb"
PACKAGECLOUD_DISTRO: "ubuntu/focal"
<<: *deploy-packagecloud
#deploy-ubuntu:
# docker:
# - image: ubuntu:22.04
# resource_class: medium+
# steps:
# - run: *install-dependencies-deb
# - checkout
# - restore_cache: *restore-cache
# - run: *copy-image
# - run: *build-deb
# - run:
# name: Install packagecloud.io
# command: |
# apt-get install -y ruby-dev rubygems
# gem install -N rake
# gem install -N package_cloud
# - run:
# name: Deploy ubuntu/kinetic
# environment:
# PACKAGE_TYPE: "deb"
# PACKAGECLOUD_DISTRO: "ubuntu/kinetic"
# <<: *deploy-packagecloud
# - run:
# name: Deploy ubuntu/jammy
# environment:
# PACKAGE_TYPE: "deb"
# PACKAGECLOUD_DISTRO: "ubuntu/jammy"
# <<: *deploy-packagecloud
# - run:
# name: Deploy ubuntu/focal
# environment:
# PACKAGE_TYPE: "deb"
# PACKAGECLOUD_DISTRO: "ubuntu/focal"
# <<: *deploy-packagecloud
workflows:
version: 2
@ -359,9 +362,9 @@ workflows:
- build-debian-bullseye:
requires:
- build-container-image
- build-debian-bookworm:
requires:
- build-container-image
#- build-debian-bookworm:
# requires:
# - build-container-image
- build-fedora-37:
requires:
- build-container-image
@ -380,22 +383,22 @@ workflows:
only: /^v.*/
branches:
ignore: /.*/
- deploy-ubuntu:
requires:
- build-container-image
filters:
tags:
only: /^v.*/
branches:
ignore: /.*/
- deploy-debian:
requires:
- build-container-image
filters:
tags:
only: /^v.*/
branches:
ignore: /.*/
#- deploy-ubuntu:
# requires:
# - build-container-image
# filters:
# tags:
# only: /^v.*/
# branches:
# ignore: /.*/
#- deploy-debian:
# requires:
# - build-container-image
# filters:
# tags:
# only: /^v.*/
# branches:
# ignore: /.*/
- deploy-fedora:
requires:
- build-container-image

View file

@ -28,7 +28,7 @@ def main():
print("* Building RPM package")
subprocess.run(
"python3 setup.py bdist_rpm --requires='podman,python3-pyside2,python3-appdirs,python3-click,python3-pyxdg,python3-colorama'",
"python3 setup.py bdist_rpm --release=2 --requires='podman,python3-pyside2,python3-appdirs,python3-click,python3-pyxdg,python3-colorama'",
shell=True,
cwd=root,
check=True,