- Package:
- openjdk-21
- Source:
- openjdk-21
- Submitter:
- Sven Mueller
- Date:
- 2026-09-15 21:21:01 UTC
- Severity:
- normal
- Tags:
I'm not raising priority because I'm not 100% certain that the failure is a
mistake in the packaging or a mismatch in our build environment.
If it is a problem on our side, any hint would be appreciated.
During a build of openjdk-21 in Trixie, I encountered the following error:
dh_clean
debian/rules binary
jtreg_version="$(dpkg-query -f '${Version}\n' -W jtreg)"; \
if ! dpkg --compare-versions 7.3.1+1~ le $jtreg_version; then \
echo "Error: testsuite requires jtreg 7.3.1+1~ but $jtreg_version is
installed"; \
echo "Please update the jtreg dependency and regenerate debian/control"; \
false; \
fi
dpkg: error: --compare-versions takes three arguments: <version> <relation>
<version>
Installing jtreg7 (from Build-Depends) on my system and running
dpkg-query -f '${Version}\n' -W jtreg
Indeed results in an empty string.
The query for the jtreg version happens here:
https://salsa.debian.org/openjdk-team/openjdk/-/blob/openjdk-21/debian/rules#L1145
I suspect that
https://salsa.debian.org/openjdk-team/openjdk/-/blob/openjdk-21/debian/rules#L164
needs an update. Though I honestly am not sure why it assigned jtreg_pkg to
be "jtreg" and not "jtreg7"
I'm somewhat confused by this though. In the build-chroot, with lsb-release
installed, I get:
# lsb_release --codename --short
sid
# # lsb_release --id --short
Debian
as I expected, since our rebuilds found emulating sid (though with the
packages from testing) to be the most reliable path to successful builds.
Here is the complete output from the dpkg-buildpackage run:
Command: dpkg-buildpackage --sanitize-env -us -uc -b -rfakeroot
dpkg-buildpackage: info: source package openjdk-21
dpkg-buildpackage: info: source version 21.0.6+7-1
dpkg-buildpackage: info: source distribution unstable
dpkg-buildpackage: info: source changed by Matthias Klose <doko@ubuntu.com>
dpkg-source --before-build .
dpkg-buildpackage: info: host architecture amd64
debian/rules clean
dh_testdir
dh_testroot
dh_prep
for f in debian/*.in; do \
f2=$(echo $f | sed 's/JB/openjdk-21/;s/\.in$//'); \
case "$f2" in debian/control|debian/watch) continue; esac; \
rm -f $f2; \
done
rm -f debian/*.install debian/*.links debian/*.debhelper.log
dh_testdir
dh_testroot
rm -rf stamps build build-* jtreg-test-output
rm -rf autom4te.cache
rm -f bin/{jtreg.tmwrc,my-jtreg-run,my-xvfb-run,auto*,ifnames}
rm -f buildwatch.pid
rm -f config.log configure.log
dh_clean
debian/rules binary
jtreg_version="$(dpkg-query -f '${Version}\n' -W jtreg)"; \
if ! dpkg --compare-versions 7.3.1+1~ le $jtreg_version; then \
echo "Error: testsuite requires jtreg 7.3.1+1~ but $jtreg_version is
installed"; \
echo "Please update the jtreg dependency and regenerate debian/control"; \
false; \
fi
dpkg: error: --compare-versions takes three arguments: <version> <relation>
<version>
Type dpkg --help for help about installing and deinstalling packages [*];
Use 'apt' or 'aptitude' for user-friendly package management;
Type dpkg -Dhelp for a list of dpkg debug flag values;
Type dpkg --force-help for a list of forcing options;
Type dpkg-deb --help for help about manipulating *.deb files;
Options marked [*] produce a lot of output - pipe it through 'less' or
'more' !
Error: testsuite requires jtreg 7.3.1+1~ but is installed
Please update the jtreg dependency and regenerate debian/control
make: *** [debian/rules:1145: pre-build] Error 1
dpkg-buildpackage: error: debian/rules binary subprocess returned exit
status 2
--------------------------------------------------------------------------------
Build finished at 2025-02-14T14:41:29Z
All in all, I wonder why you check the version again in debian/rules when
debian/control already has the proper dependencies?
Kind regards,
Sven
Note; For a reason I don't see, the Debian build happened to have codename `trixie` - despite the build supposedly having been uploaded to unstable. - In other words, it didn't see itself as building on `sid`, it saw itself being built on `trixie`. Anyhow, the solution to this is rather simple: Remove `sid` from line 164 of debian/rules, similar to how it was done in https://salsa.debian.org/openjdk-team/openjdk/-/commit/c257671660f03ef6d9c394adfa762d9fcc59db86 for openjdk-22 (and carried forward to openjdk-23, -24 and onwards, I assume). Consider pulling the same change into openjdk-21? Cheers, Sven
can't reproduce, works fine for me on testing and on unstable.
The difference is in this (from the i386 build in unstable) ========== stamps/configure ========== mkdir -p bin command -v autoconf /usr/bin/autoconf /bin/uname -a Linux sbuild 6.1.0-33-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.133-1 (2025-04-10) i686 GNU/Linux lsb_release -a Distributor ID: Debian Description: Debian GNU/Linux trixie/sid Release: n/a Codename: trixie In our builds, the last line would be: Codename: sid The other openjdk-2* packages have a different comparison in debian/rules line 165 (well, or close to that line) to select the jtreg package to compare to, which doesn't include `sid` but only bookworm and bullseye - which makes them select jtreg7 to query dpkg for later on - and the builds in Debian itself apparently also correctly select jtreg7 because the codename is (somewhat incorrectly?) set to `trixie`. I'd appreciate if you could remove sid from that line in the openjdk-21 package. To Debian builds, it obviously doesn't matter (because the codename in unstable builds is set to trixie), but for anyone attempting a build on a system that has Codename:sid, it would.
We believe that the bug you reported is fixed in the latest version of
openjdk-21, which is due to be installed in the Debian FTP archive.
A summary of the changes between this version and the previous one is
attached.
Thank you for reporting the bug, which will now be closed. If you
have further comments please address them to 1096195@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.
Debian distribution maintenance software
pp.
Vladimir Petko <vladimir.petko@canonical.com> (supplier of updated openjdk-21 package)
(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)
Format: 1.8
Date: Wed, 16 Sep 2026 08:41:53 +1200
Source: openjdk-21
Built-For-Profiles: derivative.ubuntu noudeb
Architecture: source
Version: 21.0.13~6ea-1
Distribution: unstable
Urgency: medium
Maintainer: OpenJDK Team <openjdk-21@packages.debian.org>
Changed-By: Vladimir Petko <vladimir.petko@canonical.com>
Closes: 1096195
Launchpad-Bugs-Fixed: 2095441
Changes:
openjdk-21 (21.0.13~6ea-1) unstable; urgency=medium
.
* OpenJDK 21.0.13 early access, build 6.
* d/JB-{jre-headless,jre-zero,testsuport}.overrides.in: suppress
specific-address-in-shared-library for i386 (JDK-6454213).
* d/rules: disable tree-slp-vectorize for Ubuntu S390x builds (LP:
#2095441). Add workaround for Launchpad C2 crash.
* d/p/{jdk-8334502-proposed.patch,debian/patches/jdk-8359735.patch}:
Drop patches applied upstream.
* d/rules: Require jtreg8 package (Closes: #1096195).
* Regenerate control files.
Checksums-Sha1:
63b9eaea6e4a157d89211f5739cfca1ef9ca3cc9 5120 openjdk-21_21.0.13~6ea-1.dsc
a49bb4429a084922d8ce3e88377c11f7ee9ef4ba 615644 openjdk-21_21.0.13~6ea.orig-googletest.tar.xz
e11e52c79d209ecd20974763f0eb63e0c3837ebc 67950776 openjdk-21_21.0.13~6ea.orig.tar.xz
df39c7a27066c19bb228cbb9ad9ef6e8f919b9c4 231624 openjdk-21_21.0.13~6ea-1.debian.tar.xz
b4361a0a3fc00539a71121829707170cd9f9f8bc 19540 openjdk-21_21.0.13~6ea-1_source.buildinfo
Checksums-Sha256:
74fee54c9c4b9d597f7f0484f01b0b9779e3d0253ea7f03510b1e6de468f2c24 5120 openjdk-21_21.0.13~6ea-1.dsc
94695f01012f939e8eeb51f839dd11323a57a6bb70dee8a34c7a7a1cddf00905 615644 openjdk-21_21.0.13~6ea.orig-googletest.tar.xz
03470df6252fc419ab8456cd322dea4b90c9d0472296eaeecf41f1f21ced51f7 67950776 openjdk-21_21.0.13~6ea.orig.tar.xz
57197987a7649c166d9915fd970c1740cb07693f0c69bf6a977d5e5d8d275952 231624 openjdk-21_21.0.13~6ea-1.debian.tar.xz
aed9da52f1452d158d10fe04b69c9a1fd0099909a611f2598845b3735a9a0bdc 19540 openjdk-21_21.0.13~6ea-1_source.buildinfo
Files:
f48ee2f8c94fc75c0c193d9d31f13ec9 5120 java optional openjdk-21_21.0.13~6ea-1.dsc
b691bf35915e21efb8a5d26be6ac88a2 615644 java optional openjdk-21_21.0.13~6ea.orig-googletest.tar.xz
33177661947f82e9c23ca18c321c26cd 67950776 java optional openjdk-21_21.0.13~6ea.orig.tar.xz
13377aee341b48d6f6a5ff840fa6f0a4 231624 java optional openjdk-21_21.0.13~6ea-1.debian.tar.xz
aae5c2328610e86e61eab76ac015047a 19540 java optional openjdk-21_21.0.13~6ea-1_source.buildinfo
-----BEGIN PGP SIGNATURE-----
iQIzBAEBCgAdFiEEi0Ab7+QbQ0yQSEMs9jtmipabB8AFAmqpr2cACgkQ9jtmipab
B8DZQxAAkcHFMTo27ZuuqQHuuLqgxxeK6r+NM9DeAQ0ZQ70kybMpDTdyF0S9ZIbH
mxcNSxiMPKUaU8ZOIKswCy2rAStsGRSQjqI1/n4wP9bNZEVtdJdUuanKtW18qYL9
15VtqlXIGqtQgl8V2hwQHwPqh4FTpQYNB5fQ9y/PIheTDo9AExSS3f5OnijcRSyj
FK5ekLEf2ndvd1loc4N6RhY72ziZia1iePzW2dL2U3x9SA2BfCgSwdg9MVyVAeS0
QQbIuYsA4yAlRisc03JmN0ftvpLSa+YDLpBMF8KBaNTrRpJA8DEtbquiub/QHoue
Et6AUwCLmuY8znrBwaxwnb3Qk8XHttrE6O9WySbcGloBFO3LFqX2EmBv0ObLXEqP
wNAe2o9SohQCDrVimzG/EeZ2NiQwp/zGBN/OBp6BWCCenC6SjOy8puLrx8OmkR24
1rmGtTfogAQ+IO6lLeI5m70h0BYlKjuD4bkbxW6a2bMdvpVaJtgFBGl5KM+58T/8
HBOwQ+CfXggSgSo1jAiD+Phlso3/lxV+C/oktyz4rSK92gO4C0r7ASrWJwLe8/GO
mojpvLyF+n65V0ueq2yVZMhMn3f9u5xqAUJw+omc+ilzOkjsS+mGwMwVqe3UbWb4
PsfRY5Drwb9EvsJdXvv55S1BJ3SVTM9Ea9jDaSSceZgnabiTjBo=
=4S1l
-----END PGP SIGNATURE-----