From: "Björn Höfling" <bjoern.hoefling@bjoernhoefling.de>
To: "Gábor Boskovits" <boskovits@gmail.com>
Cc: Guix-devel <guix-devel@gnu.org>
Subject: Re: java: How to patch a jar-sources
Date: Mon, 15 Apr 2019 17:11:52 +0200 [thread overview]
Message-ID: <20190415171152.4087d25c@alma-ubu> (raw)
In-Reply-To: <CAE4v=pi4uyAep+Akn-BaWD7DJB22XewcVy7ttyvJpvynCx5Pqw@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 2462 bytes --]
On Mon, 15 Apr 2019 14:26:41 +0200
Gábor Boskovits <boskovits@gmail.com> wrote:
> Hello Björn,
>
>
>
> Björn Höfling <bjoern.hoefling@bjoernhoefling.de> ezt írta (időpont:
> 2019. ápr. 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"))
[..]
> > 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.
jar-files can contain sources. The main intended use for this is to show
the sources to the developer in the IDE (Eclipse), but we can also use
it to build from.
As an example, look at the java-jgit package. It downloads from Maven
central a ...-sources.jar.
In my example the ecjsrc-...jar also contains .java source files, the
compiled version with .class files is named without the "src" in the
name.
Going with zip is an option, this might be a work-around. But actually,
I don't want to do everything by hand:
I thought in general you can put "whatever" (supported) file-extension
you like into the "source" field and by extension of the URI it will
select the proper unpacker (i.e. using "tar xvf" for .tar files, "tar
xzvf" for .tar.gz", "unzip" for .zip, etc).
This seams to work when just using the ".jar" URI, without patches (cmp
the java-jgit example). Only after I added the patches, it was trying
to use "tar x..", which of cause will fail on the .jar file. If noone
has a direct solution, maybe it's time for me to get my fingers dirty
and look into the source-extracting code.
Thanks,
Björn
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 195 bytes --]
next prev parent reply other threads:[~2019-04-15 15:11 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-15 6:02 java: How to patch a jar-sources Björn Höfling
2019-04-15 12:26 ` Gábor Boskovits
2019-04-15 15:11 ` Björn Höfling [this message]
2019-04-15 15:18 ` Danny Milosavljevic
2019-04-15 15:19 ` Danny Milosavljevic
2019-04-15 23:49 ` Björn Höfling
2019-04-16 9:50 ` Gábor Boskovits
2019-04-16 18:00 ` Björn Höfling
2019-04-18 5:09 ` Björn Höfling
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190415171152.4087d25c@alma-ubu \
--to=bjoern.hoefling@bjoernhoefling.de \
--cc=boskovits@gmail.com \
--cc=guix-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).