Path: csiph.com!1.us.feeder.erje.net!3.us.feeder.erje.net!2.eu.feeder.erje.net!feeder.erje.net!fu-berlin.de!bofh.it!news.nic.it!robomod From: =?utf-8?Q?Lo=C3=AFc_Rouchon?= Newsgroups: linux.debian.maint.java Subject: Re: Packaging applications with JVM version restrictions Date: Sat, 06 May 2023 15:40:02 +0200 Message-ID: References: X-Mailbox-Line: From debian-java-request@lists.debian.org Sat May 6 13:36:12 2023 Old-Return-Path: X-Amavis-Spam-Status: No, score=-2.111 tagged_above=-10000 required=5.3 tests=[BAYES_00=-2, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FOURLA=0.1, RCVD_IN_MSPIKE_H2=-0.001, T_SCC_BODY_TEXT_LINE=-0.01] autolearn=no autolearn_force=no X-Policyd-Weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 CL_IP_EQ_HELO_IP=-2 (check from: .loicrouchon. - helo: .mail-40136.proton. - helo-domain: .proton.) FROM/MX_MATCHES_NOT_HELO(DOMAIN)=0; rate: -3.5 Feedback-ID: 55091204:user:proton MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Mailing-List: archive/latest/23309 List-ID: List-URL: List-Archive: https://lists.debian.org/msgid-search/5DN4r2e8RHjRzUYICY-opVhUutcBp1pYcXYGCCLfAsaKkVdR18bnrrlMJrlZ_vyHo_0IrlhYsHQZ2t3_foJtL89G1qI5OxDSVDEzpJkD4L0=@loicrouchon.com Approved: robomod@news.nic.it Lines: 83 Organization: linux.* mail to news gateway Sender: robomod@news.nic.it X-Original-Cc: Thorsten Glaser , Rob Browning , debian-java@lists.debian.org X-Original-Date: Sat, 06 May 2023 13:20:18 +0000 X-Original-Message-ID: <5DN4r2e8RHjRzUYICY-opVhUutcBp1pYcXYGCCLfAsaKkVdR18bnrrlMJrlZ_vyHo_0IrlhYsHQZ2t3_foJtL89G1qI5OxDSVDEzpJkD4L0=@loicrouchon.com> X-Original-References: <87a5z6cncx.fsf@trouble.defaultvalue.org> <40kgFV1MA9c7_foqMvXNHZczvu785kZf8rAuqb_d4N2grN1JYQ2tGc0M82wJN9DamnUGCKMp1aYdqOfKnbOFtgxRYuncFt0FM-kaiAuKXdk=@loicrouchon.com> Xref: csiph.com linux.debian.maint.java:12637 Hi Gregor, >From what I've seen of the java-wrappers package, it seems to solve the pro= blem in a single direction: specifying the minimum JVM's version, but not the ma= ximum. That was one of the remark of Thorsten to me. The more I think about it, the more I think it is not a problem which shoul= d be solved by Debian. Nor by Fedora, Nor by Homebrew, ... I'd like to have a solution that is common for all systems/platform to ease= the packaging of java applications. So I started a prototype of a program that would choose a JVM based on crit= eria like the minimum/maximum java specification version, the vendor of the JVM,= the capabilities of the JVM (java, javac, javap, native-image, ...) It would consist of two steps: - JVMs discovery - JVM selection I would typically expect the paths/environment variables to use for the dis= covery to be OS/package managers specific. For Debian, it could be /usr/bin/java, /usr/lib/jvm, $JAVA_HOME. Rules could be specified at system level to say for example: use a JVM in t= he [11, 17] range. Those rules could be overridden on a per program basis. Here is the prototype: https://github.com/loicrouchon/jvm-finder/tree/main#= readme It's written in Go so that the JVM selection is quite fast. I'm more of a Java developer, so probably not great Go, but I'll improve it over time. I do not expect any of you to help me with the implementation, but feel fre= e ;) However, I would love you to contribute to the requirements of such a progr= am. Because I have the point of view of someone wanting to distribute a Java pr= ogram. But I lack the point of view of distributions/packages maintainers PS: I'll be at Devoxx UK next week and will try to discuss of this topic with other Java developers. Regards, ------- Original Message ------- On Thursday, April 20th, 2023 at 19:29, gregor herrmann = wrote: >=20 >=20 > On Wed, 19 Apr 2023 09:48:54 +0000, Lo=C3=AFc Rouchon wrote: >=20 > > Debian would need to provide a way to perform the "JRE with exact java = $version exists" > > check. This could be done by providing stable symlinks, or alternatives= like > > /etc/alternatives/jre_ >=20 >=20 > (I haven't read the complete thread in detail, so this might be not > completely appropriate): >=20 > There's also the java-wrappers package which helps to find java > runtimes from shell wrapper scripts. >=20 >=20 > Cheers, > gregor >=20 > -- > .''`. https://info.comodo.priv.at -- Debian Developer https://www.debian.= org : :' : OpenPGP fingerprint D1E1 316E 93A7 60A8 104D 85FA BB3A 6801 8649= AA06` . `' Member VIBE!AT & SPI Inc. -- Supporter Free Software Foundation= Europe` -