From: Hilco Wijbenga <hilco.wijbenga@gmail.com>
To: Hartmut Goebel <h.goebel@crazy-compilers.com>
Cc: guix-devel <guix-devel@gnu.org>
Subject: Re: Help needed from Java developer to finish maven
Date: Sun, 23 Apr 2017 18:20:58 -0700 [thread overview]
Message-ID: <CAE1pOi3XTGc5ZAuZtmK0dXead0-U-jTsgvJZQkscmH1wJfLUxA@mail.gmail.com> (raw)
In-Reply-To: <22f7c69e-da5c-6652-ecc4-13b97e83506b@crazy-compilers.com>
Hi Hartmut,
On 23 April 2017 at 13:34, Hartmut Goebel <h.goebel@crazy-compilers.com> wrote:
> for what I want to achieve, you need to understand Guix's philosophy:
> One of the major points is to have as few components as possible
> pre-build be external entities. Because only then Guix can ensure that
> the component is build from exactly the known source and not manipulated.
Sure, that makes sense ... up to a point.
First, if it's about trust ("am I really running a stock,
unmanipulated Maven") then there are the checksums and signatures on
the download page which exist for exactly that purpose. If you feel
you cannot rely on those then why trust the SCM that holds the Maven
code? You'd have to become intimately familiar with the entire Maven
code base to be able to state that it wasn't manipulated. In short, if
you can't trust the Maven devs then you should not use Maven.
Second, as an end user this makes it even harder to trust the end
result. I now have to trust both the Maven devs *and* the Guix devs
who worked on the packages. Not only that, but I actually *know* that
Maven has been changed/patched so I can't even check it against the
published checksum/signature. And that's assuming the Guix devs (who
are usually neither Java nor Maven experts) did not make any honest
mistakes. And, again, if my Guix Maven somehow misbehaves I cannot ask
for support from the Maven community because I'm not running a stock
Maven.
It would make much more sense to download the same tarball from, say,
3 different mirrors and confirm that they all have the same
checksum/signature as published on the Maven download page. Then get
Maven's source code (for the same version) and build it with the
binary Maven you just downloaded. Check that the
Maven-built-from-source's checksum and signature match the published
checksum/signature, and voila! An ordinary user would not go through
all that trouble so now you are actually adding value. Moreover, this
*objectively* proves that Maven was not manipulated. I don't have to
trust you not to do anything nefarious nor do I have to take it on
faith that you didn't make any mistakes.
(By the way, I run Gentoo GNU/Linux so I am very familiar with
building from source. For me (and Gentoo) it's more about control and
performance than anything else, though.)
> And this means, that neither adding JARs from Maven Central to the store
> nor putting the maven tar-ball into the store are admissible options for
> Guix. I know other distributions do, like NixOS, but Guix will not.
I can appreciate not wanting to add "random" JARs from Maven Central,
although getting published on Maven Central actually requires going
through a manual process that involves proof of ownership (of the
project). But, still, building such a JAR from source (once Maven is
available) takes little effort and so is worth it. Especially, because
most projects do not publish a checksum and signature. So here
building from source adds value.
> Sadly maven does not support building from source. Even the maven
> "source" includes a jar-file (maven-ant-task), which's job is to
> download JAR files from maven central. So I have a take a lot of effort
> building all (minimum) requirements, manually recreating e.g. meta-data
> files which maven creates, and that like. Most of these packages rely on
> maven for buiilding - which is not yet available.
:-) Well, no, of course not. Maven isn't at the pre alpha state
anymore. So in the spirit of "eat your own dogfood", Maven builds with
Maven.
> My actual gaol is to have some Java applications I need in Guix – but
> the Guix way :-) And this requires to be able to build JARs which are
> build using maven, and for this I need to be able to bootstrap maven
> from source.
Right, that makes perfect sense except for the part where you jump
through hoops and make unexpected changes to Maven just to be able to
build it in a highly unorthodox way. ;-) :-)
> Am 23.04.2017 um 20:43 schrieb Hilco Wijbenga: I had a look at
>> maven-with-guix-versions.patch and I notice that you are changing
>> various version numbers and replacing some JARs with other JARs. Why
>> would you do that? Why do you expect the end result to work well? Or
>> at all? How would anyone be able to trust this patched Maven?
> I assume you are referring so the patch I posted month ago, which is is
> outdated now. For the current status, please have a look at the branch
> "WIP-maven" at https://gitlab.com/htgoebel/guix.git. My question refer
> to this status.
>
> This branch also uses some different versions, but the tar-ball maven
> builds and runs fine when using these versions. See
> https://lists.gnu.org/archive/html/guix-devel/2017-04/msg00536.html for
> details on how I came to this conclusion.
Yes, that's where I looked. That's why I checked the patch file.
>> I hope this is of use to you. If you have more questions, ask away.
>
> If you have an idea what could cause the error I posted, please give fixing it a try. You can find the Guix description at the branch "WIP-maven" at https://gitlab.com/htgoebel/guix.git.
According to msg00536 you patched Maven to use different JARs and
versions. Obviously, that creates a problem so don't do that. Stick
with the JARs/versions that Maven was built with and all will be well.
Going by bin/mvn, you should probably invoke Maven using
org.codehaus.plexus.classworlds.launcher.Launcher instead of
org.apache.maven.cli.MavenCli. But you would be much better off if you
dropped this whole approach as I mentioned above. Even if you somehow
made it work, it would be unreliable.
Cheers,
Hilco
next prev parent reply other threads:[~2017-04-24 1:21 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-21 10:46 Help needed from Java developer to finish maven Hartmut Goebel
2017-04-21 20:25 ` Björn Höfling
2017-04-23 12:36 ` Hartmut Goebel
2017-04-24 12:41 ` Catonano
2017-04-24 12:58 ` Guile bindings of GnuTLS are missing (was: Help needed from Java developer to finish maven) Hartmut Goebel
2017-04-24 13:23 ` Catonano
2017-04-23 18:43 ` Help needed from Java developer to finish maven Hilco Wijbenga
2017-04-23 20:34 ` Hartmut Goebel
2017-04-24 1:20 ` Hilco Wijbenga [this message]
2017-04-24 13:36 ` Trust and reproducible build (was: Help needed from Java developer to finish maven) Hartmut Goebel
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=CAE1pOi3XTGc5ZAuZtmK0dXead0-U-jTsgvJZQkscmH1wJfLUxA@mail.gmail.com \
--to=hilco.wijbenga@gmail.com \
--cc=guix-devel@gnu.org \
--cc=h.goebel@crazy-compilers.com \
/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).