From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53730) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ecnve-0002et-5K for guix-patches@gnu.org; Sat, 20 Jan 2018 02:51:07 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ecnva-0008RJ-8h for guix-patches@gnu.org; Sat, 20 Jan 2018 02:51:06 -0500 Received: from debbugs.gnu.org ([208.118.235.43]:55848) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ecnva-0008Qj-3X for guix-patches@gnu.org; Sat, 20 Jan 2018 02:51:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ecnvZ-0001QJ-Ke for guix-patches@gnu.org; Sat, 20 Jan 2018 02:51:01 -0500 Subject: [bug#29896] [PATCH] gnu: java-asm: Update to 6.0. Resent-Message-ID: From: Chris Marusich References: <20171229190022.22705-1-boskovits@gmail.com> <20180107212356.18556-1-boskovits@gmail.com> <87efmmtky1.fsf@gmail.com> <20180120001202.GC18016@jasmine.lan> Date: Fri, 19 Jan 2018 23:50:43 -0800 In-Reply-To: <20180120001202.GC18016@jasmine.lan> (Leo Famulari's message of "Fri, 19 Jan 2018 16:12:02 -0800") Message-ID: <87fu71ufxo.fsf@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="==-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: Leo Famulari , Ricardo Wurmus , =?UTF-8?Q?G=C3=A1bor?= Boskovits Cc: 29896@debbugs.gnu.org --==-=-= Content-Type: multipart/mixed; boundary="=-=-=" --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Leo Famulari writes: > On Thu, Jan 18, 2018 at 10:35:34PM -0800, Chris Marusich wrote: >> Even though we added some inputs, there appear to be no retained >> references in the output, as shown by this command: >>=20 >> guix gc --referrers $(./pre-inst-env guix build java-asm) > > To check the retained references in the output [0], it's actually `guix > gc --references $(./pre-inst-env guix build ...)`. > > [0] To clarify "retained references", they are literally occurences of > strings that begin with '/gnu/store/', then a Guix hash, then a hyphen, > and then a package name. You're right; this was a "thinko" on my part. I meant to write "--references" instead of "--referrers". The output of the correct command is still empty, so there are still no references. Ricardo Wurmus writes: > Chris Marusich writes: > >> If the new input is also required at runtime, then I'm not sure this >> package definition is correct. I would normally expect a "runtime >> dependency" to be either retained as a reference in the output, or >> declared as a propagated-input (so that it gets installed alongside this >> package when this package is installed into a profile). Perhaps I am >> missing some information here. >> >> I'm hoping Ricardo can comment on how this is intended to work for Java >> packages, since he originally added the ant-build-system. > > The jars that the ant-build-system generates are uncompressed and thus > allow the scanner to find embedded store references. The problem seems > to be that references to other *jars* are not kept, because they are > never recorded anywhere. That=E2=80=99s normal for Java, which looks for= named > classes on the classpath, i.e. a list of jars. It behaves very much > like Python and its PYTHONPATH in this regard. > > The best we can do here is to propagate inputs. The alternative is to > try to be smart and record the effective runtime classpath, but that=E2= =80=99s > hard/impossible to get right. OK - thank you for the explanation! In light of that information, I think that in the case of a package that uses the ant-build-system (like java-asm), if we know for sure that an input is required at runtime, we should make it a propagated input. The installed software still won't work without additional work on the part of the user (e.g., the user needs to set the CLASSPATH when invoking java, or use java's -cp option), but for now at least making the input a propagated input will ensure that it gets installed alongside the package which at runtime requires it, which is better than nothing. Here's an updated patch that makes this change. In addition, I discovered that (1) the build succeeds and produces the same JAR file even when I removed java-aqute-libg as an input, so I've removed that, and (2) the build succeeds and produces the same JAR file even when I use a dummy value for the biz.aQute.bnd.path Ant property, so I did that to make it clear that it wasn't important to the build. What do you think? =2D-=20 Chris --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-gnu-java-asm-Update-to-6.0.patch Content-Transfer-Encoding: quoted-printable From=20b7ab0f263338f54d3982b6d1cc91306f4691116a Mon Sep 17 00:00:00 2001 From: =3D?UTF-8?q?G=3DC3=3DA1bor=3D20Boskovits?=3D Date: Sun, 7 Jan 2018 22:23:56 +0100 Subject: [PATCH] gnu: java-asm: Update to 6.0. * gnu/packages/java.scm (java-asm): Update to 6.0. [propagated-inputs]: Add java-aqute-bndlib (new dependency). [arguments]: Adjust make-flags, so that the build does not complain about unset properties. =2D-- gnu/packages/java.scm | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm index c04b45c53..38bfffaf5 100644 =2D-- a/gnu/packages/java.scm +++ b/gnu/packages/java.scm @@ -2660,23 +2660,31 @@ archives (jar).") (define-public java-asm (package (name "java-asm") =2D (version "5.2") + (version "6.0") (source (origin (method url-fetch) (uri (string-append "http://download.forge.ow2.org/asm/" "asm-" version ".tar.gz")) (sha256 (base32 =2D "0kxvmv5275rnjl7jv0442k3wjnq03ngkb7sghs78avf45pzm4qgr"))= )) + "115l5pqblirdkmzi32dxx7gbcm4jy0s14y5wircr6h8jdr9aix00")))) (build-system ant-build-system) + (propagated-inputs + `(("java-aqute-bndlib" ,java-aqute-bndlib))) (arguments `(#:build-target "compile" ;; The tests require an old version of Janino, which no longer comp= iles ;; with the JDK7. #:tests? #f =2D ;; We don't need these extra ant tasks, but the build system asks= us to =2D ;; provide a path anyway. =2D #:make-flags (list (string-append "-Dobjectweb.ant.tasks.path=3Df= oo")) + #:make-flags + (list + ;; We don't need these extra ant tasks, but the build system asks = us to + ;; provide a path anyway. + "-Dobjectweb.ant.tasks.path=3Ddummy-path" + ;; The java-aqute.bndlib JAR file will be put onto the classpath a= nd + ;; used during the build automatically by ant-build-system, but + ;; java-asm's build.xml fails unless we provide something here. + "-Dbiz.aQute.bnd.path=3Ddummy-path") #:phases (modify-phases %standard-phases (add-before 'install 'build-jars =2D-=20 2.15.1 --=-=-=-- --==-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEy/WXVcvn5+/vGD+x3UCaFdgiRp0FAlpi9NQACgkQ3UCaFdgi Rp3ZgA/9Gf7fuPvGvyDt1zTPEz0tf1kl/1KQr3ZKURLkUeyEoM5hxMMITQ69tye0 ZPcTyVnh6r7FuJLnR9FxdF0YVyUg52C1cLaHX0szpicfPsdp/8QFRbcukRc9gYcv oy/7qhMipM8tVji73Dkfq8rXnRNQGiXpai0htuZ14C9Cybt3cLiTH5l4mj7dx7hd 9Cm1Br2G2ebLAsroRu5aRV2RCpjH7XycguV8ChM6XQy7NeU7YdUa94aWcAr67q3P kueSDBVxEeaxJB/FalT1trEZdbEcHqYZcUiJdHAr8IbU1qMWx/yjqnfMxSY0H5hy LgzOH0upgFDz54uP+dTm5AEzvwSHLg5re9/QmRwdqRGeI0Bp4ZmSYtjvpBM55ljy iR7bchDiTH1gCHqkm6N1I3H7osFh571+ymI804uo7q824ObY7yasy6YMelvpqrKl S+yq3cQlj8C9xWvGqAX2y6ovJeqyyMbU+N79UUCrrHgR7fJdEM8k6ow72MLpx5Ts pyA1aidB3x0a9nzx+sELqjqYsTB1mQ+2IZe5A/AUqtrx+thV3zzabRgmgUY0KOSx MA7JUJNbxBupVwLEETRzCBsjCMztyvWQK1YZ7SBl/vvPmr3RW2fmojGXNWqALVj9 U1Zx/5wn6I+CkGPwJl51ttHlgR4N0Wos5hCLchnJheW+OL24lb4= =d8vf -----END PGP SIGNATURE----- --==-=-=--