I have opened a PR against salsa debian openjdk 6 monthes ago, and
pinged them 2 months ago. Is this the wrong way to submit fixes to
debian openjdk packaging?


https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=946759
https://lists.debian.org/debian-user/2014/02/msg00041.html
https://www.mail-archive.com/[email protected]/msg1810286.html

Seems jar binfmt upgrade is broken since at least 2014. Thankfully
nearly none of the jar installed on Debian have exec bit set so binfmt
jar is nearly never used. But ditaa CLI requires it. And is used by zim
ditaa plugin. Both are broken after openjdk upgrades as of now. Please
comment on my PR if it is invalid so it can be made ready for merging.

Cheers,
Alban

On Thu, 22 May 2025 23:58:56 +0200 Alban Browaeys
<[email protected]> wrote:
> I had the same issue with openjdk-11-jre-headless and openjdk-21-jre-
> headless.
> 
> There is a wrong word in the openjdk-*-jre-headless prerm:
> they check for 
> /var/lib/binfmts/openjdk-11
> (which never exists) instead of
> /var/lib/binfmts/jar
> before removing the old /var/lib/binfmts/jar binding.
> 
> THe new one called by 
> sudo update-binfmts --import
> is /usr/share/binfmts/jar
> and as the version mismatch between it and the currently registered
> /var/lib/binfmts/jar, update-binfmts complains and bails out.
> 
> I will reassign the bug to one of the openjdk jre-headless packages.
> 
> Cheers,
> Alban
> 
> current broken prerm scripts.
> 
> cat /var/lib/dpkg/info/openjdk-17-jre-headless\:amd64.prerm 
> #!/bin/sh
> 
> set -e
> 
> basedir=/usr/lib/jvm/java-17-openjdk-amd64
> jre_tools='java jpackage keytool rmiregistry'
> 
> if [ "$1" = "remove" ] || [ "$1" = "deconfigure" ]; then
>     for i in $jre_tools; do
>       update-alternatives --remove $i $basedir/bin/$i
>     done
> 
>     if which update-binfmts >/dev/null; then
>       # try to remove and ignore the error
> <<<<<<<<<<<<<<<<<<<<<<<<<<<< bug here
>       if [ -e /var/lib/binfmts/openjdk-17 ]; then
> >>>>>>>>>>>>>>>>>>>>>>>>>>>>
> 
>           update-binfmts --package openjdk-17 \
>               --remove jar /usr/bin/jexec || true
>       fi
>     fi
> 
>     update-alternatives --remove jexec $basedir/lib/jexec
> fi
> 
> 
> 
> cat /var/lib/dpkg/info/openjdk-11-jre-headless\:amd64.prerm
> #!/bin/sh
> 
> set -e
> 
> basedir=/usr/lib/jvm/java-11-openjdk-amd64
> jre_tools='java jjs keytool rmid rmiregistry pack200 unpack200'
> 

Reply via email to