See #17858: Add Java 17 as an option for the Java version in deb packages
By depending upon default-jre
with a version specification, we can avoid
hardcoding many specific Java JREs versions via |
. Instead, we just indicate
that the default-jre must be >= 17 or the currently installed version must be
Java 8 compatible. This will change on 2023-12-31 when Java 8 support is dropped.
See #17858 for details.
This was verified via the following in an Ubuntu 23.04 container:
curl -O https://josm.openstreetmap.de/apt/pool/universe/j/josm-latest/josm-latest_1.5.svn18887_all.deb
ar x josm-latest_1.5.svn18887_all.deb control.tar.xz
tar xf control.tar.xz control
- Edit control to match new control
xz --decompress control.tar.xz && tar uvf control.tar control && xz control.tar
ar r josm-latest_1.5.svn18887_all.deb control.tar.xz
The resulting deb package was then tested against Debian Buster, Bullseye,
Bookworm, Trixie, and Sid, along with Ubuntu 18.04, 20.04, 22.04, 23.04, and
23.10 with
podman run -it --rm --volume $(pwd):/mnt ${IMAGE} /usr/bin/bash -c "apt update && apt install -y /mnt/josm-latest_1.5.svn18887_all.deb && josm-latest --version && josm-latest --status-report"