mirror of
https://github.com/freedomofpress/dangerzone.git
synced 2025-04-29 10:12:38 +02:00
Add ubuntu 23.04 (lunar) support
The Ubuntu 23.04 docker image includes a user by default (ubuntu) which overtakes the 1000 uid and so our user becomes 1001 which makes the user directory unwritable. The solution as suggested in [1] was to remove that user. [1]: https://bugs.launchpad.net/cloud-images/+bug/2005129 Fixes #452
This commit is contained in:
parent
e773add68e
commit
e989069712
6 changed files with 70 additions and 0 deletions
|
@ -154,6 +154,33 @@ jobs:
|
||||||
command: |
|
command: |
|
||||||
poetry run make test
|
poetry run make test
|
||||||
|
|
||||||
|
ci-ubuntu-lunar:
|
||||||
|
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 ubuntu --version 23.04 build-dev
|
||||||
|
|
||||||
|
- run:
|
||||||
|
name: Run CI tests
|
||||||
|
command: |
|
||||||
|
./dev_scripts/env.py --distro ubuntu --version 23.04 run --dev \
|
||||||
|
bash -c 'cd dangerzone; poetry run make test'
|
||||||
|
|
||||||
ci-ubuntu-kinetic:
|
ci-ubuntu-kinetic:
|
||||||
machine:
|
machine:
|
||||||
image: ubuntu-2004:202111-01
|
image: ubuntu-2004:202111-01
|
||||||
|
@ -403,6 +430,18 @@ jobs:
|
||||||
./dev_scripts/env.py --distro debian --version bullseye run --dev \
|
./dev_scripts/env.py --distro debian --version bullseye run --dev \
|
||||||
bash -c 'cd dangerzone; poetry run make test'
|
bash -c 'cd dangerzone; poetry run make test'
|
||||||
|
|
||||||
|
build-ubuntu-lunar:
|
||||||
|
docker:
|
||||||
|
- image: ubuntu:22.04
|
||||||
|
resource_class: medium+
|
||||||
|
steps:
|
||||||
|
- run: *install-dependencies-deb
|
||||||
|
- checkout
|
||||||
|
- run: *calculate-cache-key
|
||||||
|
- restore_cache: *restore-cache
|
||||||
|
- run: *copy-image
|
||||||
|
- run: *build-deb
|
||||||
|
|
||||||
build-ubuntu-kinetic:
|
build-ubuntu-kinetic:
|
||||||
docker:
|
docker:
|
||||||
- image: ubuntu:22.10
|
- image: ubuntu:22.10
|
||||||
|
@ -510,6 +549,9 @@ workflows:
|
||||||
- convert-test-docs:
|
- convert-test-docs:
|
||||||
requires:
|
requires:
|
||||||
- build-container-image
|
- build-container-image
|
||||||
|
- ci-ubuntu-lunar:
|
||||||
|
requires:
|
||||||
|
- build-container-image
|
||||||
- ci-ubuntu-kinetic:
|
- ci-ubuntu-kinetic:
|
||||||
requires:
|
requires:
|
||||||
- build-container-image
|
- build-container-image
|
||||||
|
@ -534,6 +576,9 @@ workflows:
|
||||||
- ci-fedora-37:
|
- ci-fedora-37:
|
||||||
requires:
|
requires:
|
||||||
- build-container-image
|
- build-container-image
|
||||||
|
- build-ubuntu-lunar:
|
||||||
|
requires:
|
||||||
|
- build-container-image
|
||||||
- build-ubuntu-kinetic:
|
- build-ubuntu-kinetic:
|
||||||
requires:
|
requires:
|
||||||
- build-container-image
|
- build-container-image
|
||||||
|
|
3
.github/workflows/ci.yml
vendored
3
.github/workflows/ci.yml
vendored
|
@ -92,6 +92,9 @@ jobs:
|
||||||
- target: ubuntu-22.10
|
- target: ubuntu-22.10
|
||||||
distro: ubuntu
|
distro: ubuntu
|
||||||
version: "22.10"
|
version: "22.10"
|
||||||
|
- target: ubuntu-23.04
|
||||||
|
distro: ubuntu
|
||||||
|
version: "23.04"
|
||||||
- target: debian-bullseye
|
- target: debian-bullseye
|
||||||
distro: debian
|
distro: debian
|
||||||
version: bullseye
|
version: bullseye
|
||||||
|
|
|
@ -11,6 +11,7 @@ since 0.4.1, and this project adheres to [Semantic Versioning](https://semver.or
|
||||||
|
|
||||||
- Platform support: Alpha integration with Qubes OS ([issue #411](https://github.com/freedomofpress/dangerzone/issues/411))
|
- Platform support: Alpha integration with Qubes OS ([issue #411](https://github.com/freedomofpress/dangerzone/issues/411))
|
||||||
- Platform support: Debian Trixie (13)
|
- Platform support: Debian Trixie (13)
|
||||||
|
- Platform support: Ubuntu 23.04 (Lunar Lobster)
|
||||||
|
|
||||||
### Removed
|
### Removed
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
Dangerzone is available for:
|
Dangerzone is available for:
|
||||||
|
|
||||||
|
- Ubuntu 23.04 (lunar)
|
||||||
- Ubuntu 22.10 (kinetic)
|
- Ubuntu 22.10 (kinetic)
|
||||||
- Ubuntu 22.04 (jammy)
|
- Ubuntu 22.04 (jammy)
|
||||||
- Ubuntu 20.04 (focal)
|
- Ubuntu 20.04 (focal)
|
||||||
|
|
|
@ -70,6 +70,13 @@ RUN . /etc/os-release \
|
||||||
| apt-key add -
|
| apt-key add -
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
# XXX: overcome the fact that ubuntu images (starting on 23.04) ship with the 'ubuntu'
|
||||||
|
# user by default https://bugs.launchpad.net/cloud-images/+bug/2005129
|
||||||
|
# Related issue https://github.com/freedomofpress/dangerzone/pull/461
|
||||||
|
DOCKERFILE_UBUNTU_2304_REM_USER = r"""
|
||||||
|
RUN touch /var/mail/ubuntu && chown ubuntu /var/mail/ubuntu && userdel -r ubuntu
|
||||||
|
"""
|
||||||
|
|
||||||
# FIXME: Do we really need the python3-venv packages?
|
# FIXME: Do we really need the python3-venv packages?
|
||||||
DOCKERFILE_BUILD_DEV_DEBIAN_DEPS = r"""
|
DOCKERFILE_BUILD_DEV_DEBIAN_DEPS = r"""
|
||||||
ARG DEBIAN_FRONTEND=noninteractive
|
ARG DEBIAN_FRONTEND=noninteractive
|
||||||
|
@ -404,6 +411,10 @@ class Env:
|
||||||
install_deps = (
|
install_deps = (
|
||||||
DOCKERFILE_UBUNTU_2004_DEPS + DOCKERFILE_BUILD_DEV_DEBIAN_DEPS
|
DOCKERFILE_UBUNTU_2004_DEPS + DOCKERFILE_BUILD_DEV_DEBIAN_DEPS
|
||||||
)
|
)
|
||||||
|
elif self.distro == "ubuntu" and self.version in ("23.04", "lunar"):
|
||||||
|
install_deps = (
|
||||||
|
DOCKERFILE_UBUNTU_2304_REM_USER + DOCKERFILE_BUILD_DEV_DEBIAN_DEPS
|
||||||
|
)
|
||||||
else:
|
else:
|
||||||
install_deps = DOCKERFILE_BUILD_DEV_DEBIAN_DEPS
|
install_deps = DOCKERFILE_BUILD_DEV_DEBIAN_DEPS
|
||||||
|
|
||||||
|
@ -442,6 +453,10 @@ class Env:
|
||||||
install_deps = (
|
install_deps = (
|
||||||
DOCKERFILE_UBUNTU_2004_DEPS + DOCKERFILE_BUILD_DEBIAN_DEPS
|
DOCKERFILE_UBUNTU_2004_DEPS + DOCKERFILE_BUILD_DEBIAN_DEPS
|
||||||
)
|
)
|
||||||
|
elif self.distro == "ubuntu" and self.version in ("23.04", "lunar"):
|
||||||
|
install_deps = (
|
||||||
|
DOCKERFILE_UBUNTU_2304_REM_USER + DOCKERFILE_BUILD_DEV_DEBIAN_DEPS
|
||||||
|
)
|
||||||
package = f"dangerzone_{version}-1_all.deb"
|
package = f"dangerzone_{version}-1_all.deb"
|
||||||
package_src = git_root() / "deb_dist" / package
|
package_src = git_root() / "deb_dist" / package
|
||||||
package_dst = build_dir / package
|
package_dst = build_dir / package
|
||||||
|
|
|
@ -798,6 +798,11 @@ class QAUbuntu2210(QADebianBased):
|
||||||
VERSION = "22.10"
|
VERSION = "22.10"
|
||||||
|
|
||||||
|
|
||||||
|
class QAUbuntu2304(QADebianBased):
|
||||||
|
DISTRO = "ubuntu"
|
||||||
|
VERSION = "23.04"
|
||||||
|
|
||||||
|
|
||||||
class QAFedora(QALinux):
|
class QAFedora(QALinux):
|
||||||
"""Base class for Fedora distros.
|
"""Base class for Fedora distros.
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue