From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?UTF-8?Q?G=C3=A1bor_Boskovits?= Subject: Re: java: How to patch a jar-sources Date: Mon, 15 Apr 2019 14:26:41 +0200 Message-ID: References: <20190415080248.679c6749@alma-ubu> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000910abf058690c49d" Return-path: Received: from eggs.gnu.org ([209.51.188.92]:59618) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hG0hO-0003v9-LJ for guix-devel@gnu.org; Mon, 15 Apr 2019 08:27:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hG0hN-0005WD-6u for guix-devel@gnu.org; Mon, 15 Apr 2019 08:26:58 -0400 Received: from mail-ed1-x52f.google.com ([2a00:1450:4864:20::52f]:45561) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hG0hM-0005Vm-OB for guix-devel@gnu.org; Mon, 15 Apr 2019 08:26:57 -0400 Received: by mail-ed1-x52f.google.com with SMTP id o26so14469305edv.12 for ; Mon, 15 Apr 2019 05:26:56 -0700 (PDT) In-Reply-To: <20190415080248.679c6749@alma-ubu> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: =?UTF-8?B?QmrDtnJuIEjDtmZsaW5n?= Cc: Guix-devel --000000000000910abf058690c49d Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hello Bj=C3=B6rn, Bj=C3=B6rn H=C3=B6fling ezt =C3=ADrta (= id=C5=91pont: 2019. =C3=A1pr. 15., H 8:03): > Hi Guix, > > I have a problem combining ".jar" sources with patches. > > Here is my sources definition: > > (define-public java-ecj > (package (inherit java-ecj-3) > (version "4.6.3") > (source (origin > (method url-fetch) > (uri (string-append " > http://archive.eclipse.org/eclipse/downloads/drops4/R-" > version > "-201703010400/ecjsrc-" > version > ".jar")) > (patches > (search-patches > "java-ecj-buildxml-fix-manifest.patch" > "java-ecj-include-props.patch")) > (sha256 > (base32 > > "11cfgsdgznja1pvlxkjbqykxd7pcd5655vkm7s44xmahmap15gpl")))) > [...] > > This worked pretty well until I added the patches: > > ./pre-inst-env guix build java-ecj -K > ;;; note: source file /home/bjoern/guix/wt/qt/gnu/packages/java.scm > ;;; newer than compiled /home/bjoern/guix/wt/qt/gnu/packages/java.g= o > building > /gnu/store/wppz7bix1r4mhddjz6k4alfnxkm919gq-ecjsrc-4.6.3.tar.xz.drv... > /gnu/store/bl3pxxj6frg0dww8pj5dvh2d1akwvj47-tar-1.30/bin/tar: This does > not look like a tar archive > /gnu/store/bl3pxxj6frg0dww8pj5dvh2d1akwvj47-tar-1.30/bin/tar: Skipping to > next header > /gnu/store/bl3pxxj6frg0dww8pj5dvh2d1akwvj47-tar-1.30/bin/tar: Exiting wit= h > failure status due to previous errors > Backtrace: > 2 (primitive-load "/gnu/store/lg0dlhwf4mfz82697bvfdwi7d86?") > In ice-9/eval.scm: > 619:8 1 (_ #f) > In guix/build/utils.scm: > 616:6 0 (invoke _ . _) > > guix/build/utils.scm:616:6: In procedure invoke: > Throw to key `srfi-34' with args `(# "/gnu/store/bl3pxxj6frg0dww8pj5dvh2d1akwvj47-tar-1.30/bin/tar" arguments: > ("xvf" "/gnu/store/1vf8lxrnkgxw0zl8i2m8rf7jxcjg9f5b-ecjsrc-4.6.3.jar") > exit-status: 2 term-signal: #f stop-signal: #f] 56dd40>)'. > note: keeping build directory `/tmp/guix-build-ecjsrc-4.6.3.tar.xz.drv-1' > builder for > `/gnu/store/wppz7bix1r4mhddjz6k4alfnxkm919gq-ecjsrc-4.6.3.tar.xz.drv' > failed with exit code 1 > build of > /gnu/store/wppz7bix1r4mhddjz6k4alfnxkm919gq-ecjsrc-4.6.3.tar.xz.drv faile= d > > > It looks like guix now wants to extract the jar-sources with "tar", no > longer with "jar". How can I tell Guix this is a jar-file to extract > from? Do I need to do that manually in a snippet? Any examples? > I have not actually done this, as jar files are usually not sources. Do we have the source this file was generated from? Also what we do in the build system is use zip and unzip for extracting jar files. > > Thanks, > > Bj=C3=B6rn > Best regards, g_bor > --000000000000910abf058690c49d Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hello Bj=C3=B6rn,


Bj=C3=B6r= n H=C3=B6fling <bjo= ern.hoefling@bjoernhoefling.de> ezt =C3=ADrta (id=C5=91pont: 2019. = =C3=A1pr. 15., H 8:03):
Hi Guix,
I have a problem combining ".jar" sources with patches.

Here is my sources definition:

(define-public java-ecj
=C2=A0 (package (inherit java-ecj-3)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(version "4.6.3")
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(source (origin
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0(method url-fetch)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0(uri (string-append "http:/= /archive.eclipse.org/eclipse/downloads/drops4/R-"
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0ve= rsion
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0&q= uot;-201703010400/ecjsrc-"
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0ve= rsion
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0&q= uot;.jar"))
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0(patches
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 (search-patches "java-ecj-buildxml-fix-manifest.patch"
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 "java-ecj-= include-props.patch"))
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0(sha256
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 (base32
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0"11cfgsdgznja1pvlxkjbqykxd7pcd5655vkm7s44xmahmap15gpl")= )))
[...]

This worked pretty well until I added the patches:

./pre-inst-env=C2=A0 guix build java-ecj -K
;;; note: source file /home/bjoern/guix/wt/qt/gnu/packages/java.scm
;;;=C2=A0 =C2=A0 =C2=A0 =C2=A0newer than compiled /home/bjoern/guix/wt/qt/g= nu/packages/java.go
building /gnu/store/wppz7bix1r4mhddjz6k4alfnxkm919gq-ecjsrc-4.6.3.tar.xz.dr= v...
/gnu/store/bl3pxxj6frg0dww8pj5dvh2d1akwvj47-tar-1.30/bin/tar: This does not= look like a tar archive
/gnu/store/bl3pxxj6frg0dww8pj5dvh2d1akwvj47-tar-1.30/bin/tar: Skipping to n= ext header
/gnu/store/bl3pxxj6frg0dww8pj5dvh2d1akwvj47-tar-1.30/bin/tar: Exiting with = failure status due to previous errors
Backtrace:
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A02 (primitive-load "/gnu/store= /lg0dlhwf4mfz82697bvfdwi7d86?")
In ice-9/eval.scm:
=C2=A0 =C2=A0 619:8=C2=A0 1 (_ #f)
In guix/build/utils.scm:
=C2=A0 =C2=A0 616:6=C2=A0 0 (invoke _ . _)

guix/build/utils.scm:616:6: In procedure invoke:
Throw to key `srfi-34' with args `(#<condition &invoke-error [pr= ogram: "/gnu/store/bl3pxxj6frg0dww8pj5dvh2d1akwvj47-tar-1.30/bin/tar&q= uot; arguments: ("xvf" "/gnu/store/1vf8lxrnkgxw0zl8i2m8rf7jx= cjg9f5b-ecjsrc-4.6.3.jar") exit-status: 2 term-signal: #f stop-signal:= #f] 56dd40>)'.
note: keeping build directory `/tmp/guix-build-ecjsrc-4.6.3.tar.xz.drv-1= 9;
builder for `/gnu/store/wppz7bix1r4mhddjz6k4alfnxkm919gq-ecjsrc-4.6.3.tar.x= z.drv' failed with exit code 1
build of /gnu/store/wppz7bix1r4mhddjz6k4alfnxkm919gq-ecjsrc-4.6.3.tar.xz.dr= v failed


It looks like guix now wants to extract the jar-sources with "tar"= ;, no
longer with "jar". How can I tell Guix this is a jar-file to extr= act
from? Do I need to do that manually in a snippet? Any examples?
I have not actually done this, as jar fi= les are usually not sources. Do we have the source this file was generated = from?
Also what we do in the build system is use zip= and unzip for extracting jar files.

Thanks,

Bj=C3=B6rn
Best regards,
g_bor
=
--000000000000910abf058690c49d--