From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:403:4789::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id UDR0AgJJsGS3bQAASxT56A (envelope-from ) for ; Thu, 13 Jul 2023 20:57:06 +0200 Received: from aspmx1.migadu.com ([2001:41d0:403:4789::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id sKaIAgJJsGQaNwAAauVa8A (envelope-from ) for ; Thu, 13 Jul 2023 20:57:06 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id C18935CE9D for ; Thu, 13 Jul 2023 20:57:05 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=lepiller.eu header.s=dkim header.b=iOCvCaDo; dmarc=pass (policy=none) header.from=lepiller.eu; spf=pass (aspmx1.migadu.com: domain of "help-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="help-guix-bounces+larch=yhetil.org@gnu.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1689274625; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=hFDt3EH3NBc+zU/6vELzVks7w+eCXQJIKPGqvveSfks=; b=LVYxKqRnPzPhb1iWRAFo21rwWbVb2L2z4oigs3tl7FWwXFh0jnT8XRtqpZWS/I9K9P81N3 i94q6C8bBa4nXQU+N0SCn47QhuHiQwMuDOJ0BlbmTGbv7JOP0RPPO+ZHXdpt31GDzLd5aP S8OS8BPtvF6MaCu3bE5DVamsag7YFQONJwLeXYQbARl0nXeG1cjfnr9I/VWQ7YZ/Y/v1ZK 00EA+JVJIhg45M6wi7Lv3fmbyuO23ZIuX89PLUqDpc623VhWxRJt/RFl/s4++1Hk8gUxss NLeClhFdlQMTxOSttYI15kUj2Wy6DU9K+cyK9eCPP69yyrMYRbr0PRJzgMG4Xw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=lepiller.eu header.s=dkim header.b=iOCvCaDo; dmarc=pass (policy=none) header.from=lepiller.eu; spf=pass (aspmx1.migadu.com: domain of "help-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="help-guix-bounces+larch=yhetil.org@gnu.org" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1689274625; a=rsa-sha256; cv=none; b=T2rLzp52+l5Dixkrp1S5ODfAcZosPm4gzkRuLs2yDL+FoW41/19s6PX493tjV/Jy2frJeh 41lko8I9ulGodr3ot93LbYpeD8jZIaX90YnDjxyAb/GECgyL6V25bWSuy135lC5w5Yw/+H YL5STNnVklpVS98788ninNGtdWGQixafDbP8Oz4wDauRR6KGMU8nu6KaY1tLMbeyihRPe9 Z+k8QkET3z67EGNiAsGaAxCqOIXB/3cwr1e8l+TT7cSyXlidK5GPjgjO0Gik8yXq31nOTl BtwkWMsZTMTK//0TR7NfRy1l9eUkfd+olgCWCBFViia07mT/bKuqvHH872eVGg== Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qK1UN-0001tq-4I; Thu, 13 Jul 2023 14:56:31 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qK1UI-0001sR-Ia for help-guix@gnu.org; Thu, 13 Jul 2023 14:56:27 -0400 Received: from lepiller.eu ([2a00:5884:8208::1]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qK1UF-0007P3-QL for help-guix@gnu.org; Thu, 13 Jul 2023 14:56:26 -0400 Received: from lepiller.eu (localhost [127.0.0.1]) by lepiller.eu (OpenSMTPD) with ESMTP id 3570deb2; Thu, 13 Jul 2023 18:55:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=lepiller.eu; h=date:from :to:cc:subject:in-reply-to:references:message-id:mime-version :content-type:content-transfer-encoding; s=dkim; bh=hFDt3EH3NBc+ zU/6vELzVks7w+eCXQJIKPGqvveSfks=; b=iOCvCaDo3rnqCee4eYouu0jBAehk gyEK0dQX7idGrM3J1GXzDfKGcKSamOhPtNHjnZatE81OTB3Fczkwv/mOBgqjY8+p 8Vf7aWUiW6plmWgxyypmOnccK/8uT9jH3eLLq2uKRnB+pdBHwkR/C2MChaQP1wsN f/meq+QToN5X9LcO4Lcgus/tnhLzRgyHFDYaDMDJw6T7QSQvraPCPojMvyp+3fwd kcvCQYvcvSGGpLkY+ES19xPXHAQvrkzXMGShVdQ/Dy1PsDuAcPjmRk4K1qbmjmUZ 2TignGAXatfI9FsL4DNuD5eduduUWUbGJStjfPqQUTw1A2b6j6yze3iD3Q== Received: by lepiller.eu (OpenSMTPD) with ESMTPSA id e872afd6 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Thu, 13 Jul 2023 18:55:13 +0000 (UTC) Date: Thu, 13 Jul 2023 19:48:59 +0200 From: Julien Lepiller To: Bruno Victal , help-guix CC: mirai@makinata.eu, bjoern.hoefling@bjoernhoefling.de Subject: Re: Guidance for packaging Java programs User-Agent: K-9 Mail for Android In-Reply-To: <2c37e0d5-b110-ab8a-8810-7f73ab0ec180@makinata.eu> References: <2c37e0d5-b110-ab8a-8810-7f73ab0ec180@makinata.eu> Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=2a00:5884:8208::1; envelope-from=julien@lepiller.eu; helo=lepiller.eu X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-guix@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-guix-bounces+larch=yhetil.org@gnu.org Sender: help-guix-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN X-Spam-Score: -5.83 X-Migadu-Queue-Id: C18935CE9D X-Migadu-Scanner: mx1.migadu.com X-Migadu-Spam-Score: -5.83 X-TUID: Vf7FUX8ehuzi Hi Bruno, I'm glad to see some interest in Java :) First, Java has its own build systems, somewhat like autotools/cmake/meson= etc=2E In the past, ant was the most popular=2E It's somewhat similar to M= ake, as you specify build targets in a build=2Exml file=2E This case is wel= l supported and we have a ant-build-system for that=2E The first difficulty is that ant is-just like make, so it won't manage dep= endencies, and even not specify any=2E In the Java world, they either use t= he same solution as C, in that they don't care and it's your job to bring i= n dependencies until the build stops breaking (although it might sound bad,= this is the good way of doing things for us), or they ship the binary of t= heir dependencies and force you to use that=2E This is bad for us, since we= want to build everything fsom source=2E It's just a bit more work, but not= hing we can patch or snippet away usually=2E Nowadays, ant is loosing "market share" in favor of Maven and Gradle=2E We= have a working though probably too primitive maven-build-system which can = build a maven project as long as you provide dependencies and plugins=2E They are both also package managers, so they usually specify dependencies,= which could be useful for an importer, but they often lack source informat= ion and there's a lot of bloat in these files (many unneeded dependencies s= tay there forever=E2=80=A6)=2E Gradle is similar to Maven but it requires quite a lot of work still=2E Th= e main issue is that it requires Kotlin, the programming language=2E Since = Guix tries to bootstrap its compilers, we need a bootstrap of Kotlin=2E I t= ried to do that and after a lot of pain, managed to cleanly bootstrap a kot= lin-1=2E0=2E I still need to work on adding more to the chain and get more = recent versions, but that's pure crazyness at this point=2E BiglyBT doesn't seem to have too mazy dependencies at first glance, maybe = a better target, though it still requires some cleanup=2E Not sure what swt= is, but we would need to build it ourselves=2E Jing looks like it can use ant, but it also looks like it has a ton of lep= endencies=2E You could get lost in a rabbithole packaging that one :) I've never seen anything like saxon-he sources=2E It looks like a bunch of= zip files that contain java files with no build system=2E The ant-build-sy= stem might be able to build that, though no idea how much dependencies ther= e could be=2E I'd also like to get Mindustry at some point, but I don't see that happeni= ng any time soon : it uses gradle, and with custom plugins too, which means= we can't even cheat and use something other than gradle :/ If you feel like helping, maybe an importer would be a good first step :)= =2E You should be able to get info from Maven Central (get the pom files, t= hey are XML files and we have a module somewhere to handle them (guix build= maven pom) I think)=2E It should work for maven and gradle packages at lea= st=2E Mapping maven name to guix names might also be challenging, but we ca= n solve with an upstream-name property=2E Here are some more resources if you want to learn more about Guix and Java= : I gave a talk about bootstrapping Maven in 2020: https://xana=2Elepiller=2Eeu/guix-days-2020/guix-days-2020-julien-lepiller= -bootstrapping-maven-480=2Emp4 There's also my Kotlin bootstrap chain: https://framagit=2Eorg/tyreunom/guix-android/-/blob/master/android/package= s/kotlin=2Escm There's also a bootstrap of sbt (Scala Build Tool) from Scala, but Scala i= s not bootstrapped/able in that repo=2E To summarize, the main pain points are: lots of dependencies that can quic= kly go out of hand, source buildability is not great, as many ship their ow= n versions of their dependencies (we need to snippet pre-built jars away, a= nd find a workaround when the build fails to find them), and bootstrappabil= ity, as there can be quite a lot of dependency circles=2E HTH, and don't hesitate if you want to learn more! Le 13 juillet 2023 19:00:07 GMT+02:00, Bruno Victal = a =C3=A9crit=C2=A0: >Hi all, > >I'm interested in seeing BiglyBT (an awesome BitTorrent client) [1], >jing (a RELAX NG validator) [2], Saxon-HE (a free implementation of >XSLT 2=2E0 + 3=2E0) [3] and Mindustry (an addicting tower-defense >game) [4] packaged for Guix and I'd like to ask for some guidance >with this subject=2E > >Though I'm not familiar with the language, this seldomly reveals to >be a problem if the project uses GNU Autotools, Meson, CMake, etc=2E >but I'm completely lost when it comes to Java=2E It's hard to understand >what's happening, what are the dependencies, how the whole thing is >assembled together or if I'm even staring at something supposed to be >built at all=2E The lack of importers doesn't help either :( > >The impression I get is that overall the Guix Java subsystem/support >seems to be quite barren which I suspect is in part due to the >rather arcane build process involved=2E (the manual doesn't have much >information on the topic as well) > >Does anyone have any insight in what would it take to get the >aforementioned applications properly packaged in Guix? (i=2Ee=2E without >repackaging the binary from upstream) >I'd also be grateful if someone could point me to a primer on >=E2=80=9Chow to go from a (java) source checkout into a built app that ca= n >be used=E2=80=9D=2E > > >[1]: >[2]: >[3]: >[4]: >