Package: openjdk-21
Version: 21.0.6+7-1
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 <[email protected]>
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