From nobody@FreeBSD.org  Wed Nov  3 19:57:45 2010
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 79C68106566B
	for <freebsd-gnats-submit@FreeBSD.org>; Wed,  3 Nov 2010 19:57:45 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21])
	by mx1.freebsd.org (Postfix) with ESMTP id 6765F8FC19
	for <freebsd-gnats-submit@FreeBSD.org>; Wed,  3 Nov 2010 19:57:45 +0000 (UTC)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.14.3/8.14.3) with ESMTP id oA3JvjwN037179
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 3 Nov 2010 19:57:45 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.14.3/8.14.3/Submit) id oA3JvjwS037174;
	Wed, 3 Nov 2010 19:57:45 GMT
	(envelope-from nobody)
Message-Id: <201011031957.oA3JvjwS037174@www.freebsd.org>
Date: Wed, 3 Nov 2010 19:57:45 GMT
From: David Demelier <demelier.david@gmail.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: [patch] java/openjdk6: free and native openjdk bootstrap
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         151923
>Category:       ports
>Synopsis:       [patch] java/openjdk6: free and native openjdk bootstrap
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-java
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Wed Nov 03 20:00:19 UTC 2010
>Closed-Date:    Fri Oct 12 03:20:31 UTC 2012
>Last-Modified:  Fri Oct 12 03:20:31 UTC 2012
>Originator:     David Demelier
>Release:        8.1-RELEASE-p1
>Organization:
>Environment:
FreeBSD Melon.malikania.fr 8.1-RELEASE-p1 FreeBSD 8.1-RELEASE-p1 #8: Mon Nov  1 08:34:43 CET 2010     root@Melon.malikania.fr:/usr/obj/usr/src/sys/Melon  amd64

>Description:
The java/openjdk6 port needs a bootstrap to compile itself. For the moment the port check if a jdk is already installed and use it as jdk bootstrap.

Because I personally (and a lot of people) don't like installing the diablo-jdk port, I made little packages of openjdk for FreeBSD 7 and 8 and arch i386 and amd64.

With this patch you can install java/openjdk6 without any non-free jdk, but if you have a non-free jdk, the port won't use the bootstrap.

TO FIX: for the moment, I host the bootstrap packages in http://files.malikania.fr/openjdk6 but I would like you to take them and put them in a public freebsd server, thanks. So please when you can, change the second line from MASTER_SITES

TO TEST: I don't have any FreeBSD 7 machines nor amd64 nor i386, but I take the official FreeBSD packages and reduced them so it should works too.
>How-To-Repeat:

>Fix:
--- openjdk6-bootstrap.diff begins here ---
--- Makefile.orig	2010-11-03 20:41:00.000000000 +0100
+++ Makefile	2010-11-03 20:34:09.000000000 +0100
@@ -10,6 +10,7 @@
 PORTREVISION=	4
 CATEGORIES=	java devel
 MASTER_SITES=	http://download.java.net/openjdk/jdk6/promoted/${PORTVERSION}/ \
+		http://files.malikania.fr/openjdk6/ \
 		https://jaxp.dev.java.net/files/documents/913/150648/:jaxp \
 		https://jax-ws.dev.java.net/files/documents/4202/150724/:jaxws \
 		https://jax-ws.dev.java.net/files/documents/4202/150725/:jaf \
@@ -99,10 +100,13 @@
 .  endif
 .endfor
 
-# if no valid jdk found, set dependency
+# if no valid jdk found, use bootstrap package
 .if !defined(BOOTSTRAPJDKDIR)
-BOOTSTRAPJDKDIR?=	${LOCALBASE}/diablo-jdk1.6.0
-BUILD_DEPENDS+=		${BOOTSTRAPJDKDIR}/bin/javac:${PORTSDIR}/java/diablo-jdk16
+OSMAJOR=		${OSREL:C|^([0-9]+)\..*|\1|}
+BOOTSTRAPFILE=		freebsd-${OSMAJOR}-openjdk6-${MACHINE_ARCH}-bootstrap.tgz
+DISTFILES+=		${BOOTSTRAPFILE}
+EXTRACT_ONLY+=		${BOOTSTRAPFILE}
+BOOTSTRAPJDKDIR=	${WRKSRC}/freebsd-openjdk6-${MACHINE_ARCH}-bootstrap
 .endif
 
 MAKE_ENV=	LANG=C LC_ALL=C \
--- distinfo.orig	2010-11-03 20:41:06.000000000 +0100
+++ distinfo	2010-11-03 20:45:12.000000000 +0100
@@ -1,21 +1,18 @@
-MD5 (openjdk-6-src-b20-21_jun_2010.tar.gz) = 0b36adbf67e4f261e1b827ed4be4f447
 SHA256 (openjdk-6-src-b20-21_jun_2010.tar.gz) = fcf8f1d614e5965e90ef1b1a6d5eecc2bcc3078eaffbb62b83dfba52da62e54b
 SIZE (openjdk-6-src-b20-21_jun_2010.tar.gz) = 45078703
-MD5 (jdk6-jaxp-b20.zip) = 22e95fbdb9fb7d8b6b6fc0a1d76d1fbd
 SHA256 (jdk6-jaxp-b20.zip) = d097627d4059d488c5a09d4e33cec275a193d4d8bc0fea8ef4f1337170904156
 SIZE (jdk6-jaxp-b20.zip) = 5944804
-MD5 (jdk6-jaxws-b20.zip) = 91adfd41e6f001add4f92ae31216b1e3
 SHA256 (jdk6-jaxws-b20.zip) = 0c460583898b968a58bf88eb53f90a0e34369e2562d65fb3a143512dfcaeb3eb
 SIZE (jdk6-jaxws-b20.zip) = 5513069
-MD5 (jdk6-jaf-b20.zip) = bc95c133620bd68c161cac9891592901
 SHA256 (jdk6-jaf-b20.zip) = 78c7b5c9d6271e88ee46abadd018a61f1e9645f8936cc8df1617e5f4f5074012
 SIZE (jdk6-jaf-b20.zip) = 71243
-MD5 (apache-ant-1.7.1-bin.tar.bz2) = 9330447f3763b87570dd1118c49a8efd
 SHA256 (apache-ant-1.7.1-bin.tar.bz2) = 24e54c9d90b81d1b7342695a8285a969393fd883e99ffbbc04203c106d9c2f97
 SIZE (apache-ant-1.7.1-bin.tar.bz2) = 7641928
-MD5 (icedtea6-1.9.1.tar.gz) = 8cb71d69a74152b369d3929c5b5badfd
-SHA256 (icedtea6-1.9.1.tar.gz) = d773a6eb60f560d291206bfdeb83b1da03b79c7c09b7ae53da1877e57ddb3cea
-SIZE (icedtea6-1.9.1.tar.gz) = 6395453
-MD5 (jtreg-4_0-bin-b03-31_mar_2009.zip) = 99c4c119c2dd8e7a39c184896a56a00e
-SHA256 (jtreg-4_0-bin-b03-31_mar_2009.zip) = 919b3da574a8bfb96a53d9550a0cb2482dc08df6ce3e7042235e0e9067c832e6
-SIZE (jtreg-4_0-bin-b03-31_mar_2009.zip) = 4824967
+SHA256 (freebsd-8-openjdk6-amd64-bootstrap.tgz) = 9be155d6da127da0660d53618b48188a6ba58f1b8a4d203c5bbded52eabf41e9
+SIZE (freebsd-8-openjdk6-amd64-bootstrap.tgz) = 39032268
+SHA256 (freebsd-8-openjdk6-i386-bootstrap.tgz) = 2419f8a47b03a04c94fb213386af03a1956f0cf34546402d85834
+SIZE (freebsd-8-openjdk6-i386-bootstrap.tgz) = 40907020
+SHA256 (freebsd-7-openjdk6-amd64-bootstrap.tgz) = fd26604488e7af9fbcfcb01942ab756d0bbfc5232925cc026c0c24f313fa995d
+SIZE (freebsd-7-openjdk6-amd64-bootstrap.tgz) = 38381626
+SHA256 (freebsd-7-openjdk6-i386-bootstrap.tgz) = 7791bb498d461c83fae0912c270fd8422c4be52c8b52ea9090c9526556c85c0d
+SIZE (freebsd-7-openjdk6-i386-bootstrap.tgz) = 40390567
--- openjdk6-bootstrap.diff ends here ---

>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->java 
Responsible-Changed-By: edwin 
Responsible-Changed-When: Wed Nov 3 20:00:29 UTC 2010 
Responsible-Changed-Why:  
Over to maintainer (via the GNATS Auto Assign Tool) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=151923 

From: David DEMELIER <demelier.david@gmail.com>
To: FreeBSD-gnats-submit@freebsd.org, freebsd-ports-bugs@freebsd.org
Cc:  
Subject: Re: ports/151923: [patch] java/openjdk6: free and native openjdk bootstrap
Date: Wed, 3 Nov 2010 21:43:18 +0100

 Sorry, there is something missing in the distinfo. I don't know why it
 had disappear but replace the line
 
 from :
 
 SHA256 (freebsd-8-openjdk6-i386-bootstrap.tgz) =
 2419f8a47b03a04c94fb213386af03a1956f0cf34546402d85834
 
 to :
 
 SHA256 (freebsd-8-openjdk6-i386-bootstrap.tgz) =
 2419f8a47b03a04c94fb213386af03a1956f0cf34546402d85834f0ecfafc214
 
 Sorry for this.
 
 -- 
 Demelier David

From: Jung-uk Kim <jkim@FreeBSD.org>
To: bug-followup@FreeBSD.org,
 freebsd-java@freebsd.org,
 David DEMELIER <demelier.david@gmail.com>
Cc:  
Subject: Re: ports/151923: [patch] java/openjdk6: free and native openjdk bootstrap
Date: Wed, 3 Nov 2010 17:51:44 -0400

 It doesn't make any sense to me because we have prebuilt OpenJDK 
 packages to bootstrap on FTP servers.  I mean all you have to do is 
 "pkg_add -r openjdk6" to bootstrap itself.  Why do you want to do 
 that for?
 
 Jung-uk Kim

From: David DEMELIER <demelier.david@gmail.com>
To: Jung-uk Kim <jkim@freebsd.org>
Cc: bug-followup@freebsd.org, freebsd-java@freebsd.org
Subject: Re: ports/151923: [patch] java/openjdk6: free and native openjdk bootstrap
Date: Wed, 3 Nov 2010 23:43:21 +0100

 I made this like pkgsrc does, pkg_add -r openjdk6 pulls some
 dependencies, I agree with you pkg_add'ing the prebuilt package is
 possible but some people don't like this.
 
 If you run -current or -stable packages could be outdated too, here
 using a bootstrap will build depends from ports and openjdk from ports
 without any binaries and without any non-free binaries.
 
 -- 
 Demelier David

From: Jung-uk Kim <jkim@FreeBSD.org>
To: David DEMELIER <demelier.david@gmail.com>
Cc: bug-followup@freebsd.org,
 freebsd-java@freebsd.org
Subject: Re: ports/151923: [patch] java/openjdk6: free and native openjdk bootstrap
Date: Wed, 3 Nov 2010 19:34:16 -0400

 On Wednesday 03 November 2010 06:43 pm, David DEMELIER wrote:
 > I made this like pkgsrc does, pkg_add -r openjdk6 pulls some
 > dependencies, I agree with you pkg_add'ing the prebuilt package is
 > possible but some people don't like this.
 
 If you are building it, you will need the dependencies sooner or later 
 anyway.  I don't see your point. :-/
 
 > If you run -current or -stable packages could be outdated too, here
 > using a bootstrap will build depends from ports and openjdk from
 > ports without any binaries and without any non-free binaries.
 
 What made you think that your bootstrap binaries won't be outdated?  
 In fact, I cannot shake the feeling that it may rot even faster than 
 prebuilt packages.
 
 Jung-uk Kim

From: David DEMELIER <demelier.david@gmail.com>
To: Jung-uk Kim <jkim@freebsd.org>
Cc: bug-followup@freebsd.org, freebsd-java@freebsd.org
Subject: Re: ports/151923: [patch] java/openjdk6: free and native openjdk bootstrap
Date: Thu, 4 Nov 2010 08:04:20 +0100

 2010/11/4 Jung-uk Kim <jkim@freebsd.org>:
 > On Wednesday 03 November 2010 06:43 pm, David DEMELIER wrote:
 >> I made this like pkgsrc does, pkg_add -r openjdk6 pulls some
 >> dependencies, I agree with you pkg_add'ing the prebuilt package is
 >> possible but some people don't like this.
 >
 > If you are building it, you will need the dependencies sooner or later
 > anyway. =C2=A0I don't see your point. :-/
 >
 >> If you run -current or -stable packages could be outdated too, here
 >> using a bootstrap will build depends from ports and openjdk from
 >> ports without any binaries and without any non-free binaries.
 >
 > What made you think that your bootstrap binaries won't be outdated?
 > In fact, I cannot shake the feeling that it may rot even faster than
 > prebuilt packages.
 >
 
 markand@Melon ~ $ pkg_info -r openjdk6-b20_4
 Information for openjdk6-b20_4:
 
 Depends on:
 Dependency: xextproto-7.1.1
 Dependency: xbitmaps-1.1.0
 Dependency: recordproto-1.14
 Dependency: printproto-1.0.4
 Dependency: kbproto-1.0.4
 Dependency: inputproto-2.0
 Dependency: expat-2.0.1_1
 Dependency: javavmwrapper-2.3.5
 Dependency: pkg-config-0.25_1
 Dependency: freetype2-2.4.2
 Dependency: fontconfig-2.8.0,1
 Dependency: dejavu-2.32
 Dependency: xproto-7.0.16
 Dependency: libICE-1.0.6,1
 Dependency: libSM-1.1.1_3,1
 Dependency: libXdmcp-1.0.3
 Dependency: libXau-1.0.5
 Dependency: libpthread-stubs-0.3_3
 Dependency: libxcb-1.7
 Dependency: libX11-1.3.3_1,1
 Dependency: libXt-1.0.7
 Dependency: libXext-1.1.1,1
 Dependency: libXi-1.3,1
 Dependency: libXtst-1.1.0
 Dependency: libXpm-3.5.7
 Dependency: libXp-1.0.0,1
 Dependency: libXmu-1.0.5,1
 Dependency: libXaw-1.0.7,1
 Dependency: open-motif-2.2.3_6
 
 If you add openjdk6 from pkg_add -r you will add these depends from
 packages too, and these could be outdated. And as I said some people
 don't like to install binaries and I agree with this. If you install
 openjdk6 from ports you will build all this depends from ports and
 every ports will be up-to-date.
 
 I don't understand what you don't like in my patch, it prevents
 installing diablo-jdk and it's easier to build from ports without
 installing binaries before. Okay, I agree people still can add
 openjdk6 from binaries to bootstrap but if you want only ports this
 patch could be better in any case.
 
 Cheers,
 
 --=20
 Demelier David

From: Baptiste Daroussin <bapt@freebsd.org>
To: Jung-uk Kim <jkim@freebsd.org>
Cc: David DEMELIER <demelier.david@gmail.com>, bug-followup@freebsd.org, 
	freebsd-java@freebsd.org
Subject: Re: ports/151923: [patch] java/openjdk6: free and native openjdk bootstrap
Date: Thu, 4 Nov 2010 07:35:21 +0000

 2010/11/3 Jung-uk Kim <jkim@freebsd.org>:
 > On Wednesday 03 November 2010 06:43 pm, David DEMELIER wrote:
 >> I made this like pkgsrc does, pkg_add -r openjdk6 pulls some
 >> dependencies, I agree with you pkg_add'ing the prebuilt package is
 >> possible but some people don't like this.
 >
 > If you are building it, you will need the dependencies sooner or later
 > anyway. =A0I don't see your point. :-/
 >
 >> If you run -current or -stable packages could be outdated too, here
 >> using a bootstrap will build depends from ports and openjdk from
 >> ports without any binaries and without any non-free binaries.
 >
 > What made you think that your bootstrap binaries won't be outdated?
 > In fact, I cannot shake the feeling that it may rot even faster than
 > prebuilt packages.
 >
 
 Bootstrapping jdk has always been an issue because it depends on
 non-free binary packages. Try to setup a package build cluster from
 scratch it won't work  because of openjdk.
 
 This solution is the easiest way to get openjdk6 without too much pain
 for the user. he will just have to portmaster java/openjdk6 or the way
 they usually install ports on there systems without being forced to
 install prebuilt dependencies or install non free software.
 
 with the old way it would have been pkg_add -r openjdk6 && make &&
 make deinstall reinstall.
 
 Sorry but I prefer a simple make install :)
 
 In my case I would love to see it in the ports.
 
 regards,
 Bapt

From: Rob Farmer <rfarmer@predatorlabs.net>
To: Baptiste Daroussin <bapt@freebsd.org>
Cc: Jung-uk Kim <jkim@freebsd.org>, David DEMELIER <demelier.david@gmail.com>, bug-followup@freebsd.org, 
	freebsd-java@freebsd.org
Subject: Re: ports/151923: [patch] java/openjdk6: free and native openjdk bootstrap
Date: Thu, 4 Nov 2010 01:06:29 -0700

 On Thu, Nov 4, 2010 at 00:35, Baptiste Daroussin <bapt@freebsd.org> wrote:
 > Bootstrapping jdk has always been an issue because it depends on
 > non-free binary packages. Try to setup a package build cluster from
 > scratch it won't work =A0because of openjdk.
 >
 > This solution is the easiest way to get openjdk6 without too much pain
 > for the user. he will just have to portmaster java/openjdk6 or the way
 > they usually install ports on there systems without being forced to
 > install prebuilt dependencies or install non free software.
 
 Indeed - that's what I like about this - you can do everything within
 the normal ports work-flow - no using packages or dealing with the
 diablo distfiles. It would be much more seamless for users. In the
 suggested alternative, I would need to:
 1) pkg_add openjdk
 2) build openjdk from ports
 3) uninstall openjdk from the package
 4) install openjdk from the port
 
 portmaster/upgrade can help with 2-4 but it still need manual
 intervention beyond normal "make install clean."
 
 And of course it assumes I know this situation exists - if I don't,
 then I end up with an error related to fetching diablo distfiles that
 doesn't present a way forward, other than install diablo as a build
 dependency.
 
 Also, what about using the official packages from the cluster as the
 bootstrap instead? That would solve the problem of manually built
 packages getting behind.
 
 --=20
 Rob Farmer

From: Jung-uk Kim <jkim@FreeBSD.org>
To: bug-followup@FreeBSD.org,
 freebsd-java@freebsd.org,
 Rob Farmer <rfarmer@predatorlabs.net>
Cc:  
Subject: Re: ports/151923: [patch] java/openjdk6: free and native openjdk bootstrap
Date: Thu, 4 Nov 2010 13:51:38 -0400

 [I am not picking on anyone here.  It's just a rant about this issue.]
 
 You see this Java bootstrap is a classic chicken-and-egg issue.  It's 
 like "you need C compiler to bootstrap GCC".  We have C compiler in 
 the base, so it isn't a big deal.  Now Java bootstrap is more 
 complicated because we don't have GCJ or something like that in the 
 base.  You say we build them from build clusters but how?  How do we 
 bootstrap itself without help of another Java compiler such as GCJ?  
 If we are going ahead in this direction, clearly somebody has to 
 maintain the sources, patches, and generated binaries, and we *must* 
 have a way to automate the process *outside* of normal ports build 
 because distributing GPL'd software without knowing how to reproduce 
 it is worse than third-party binary plugs IMHO.  Certainly, I won't 
 take it for granted your binaries are "free" to redistribute unless 
 you show me the way to reproduce it.
 
 On the other hand, we have ports/java/jbootstrap to work around this 
 issue but it is pretty much dead and non-free.  If you really want 
 something like that, you may use ports/java/openjdk6 as master port, 
 make it bootstrap with GCJ or something totally "free" just enough to 
 bootstrap OpenJDK6 and OpenJDK7, and package it with minimal runtime 
 dependency (if there is any).  Then, ports/java/openjdk6, 
 ports/java/openjdk7, etc. can use it as a *build* dependency.  I 
 believe that is the way to go.
 
 Jung-uk Kim

From: Greg Lewis <glewis@eyesbeyond.com>
To: Jung-uk Kim <jkim@freebsd.org>
Cc: bug-followup@freebsd.org, freebsd-java@freebsd.org,
        Rob Farmer <rfarmer@predatorlabs.net>
Subject: Re: ports/151923: [patch] java/openjdk6: free and native openjdk
 bootstrap
Date: Sat, 6 Nov 2010 23:38:46 -0700

 On Thu, Nov 04, 2010 at 01:51:38PM -0400, Jung-uk Kim wrote:
 [...]
 > On the other hand, we have ports/java/jbootstrap to work around this 
 > issue but it is pretty much dead and non-free.  If you really want 
 > something like that, you may use ports/java/openjdk6 as master port, 
 > make it bootstrap with GCJ or something totally "free" just enough to 
 > bootstrap OpenJDK6 and OpenJDK7, and package it with minimal runtime 
 > dependency (if there is any).  Then, ports/java/openjdk6, 
 > ports/java/openjdk7, etc. can use it as a *build* dependency.  I 
 > believe that is the way to go.
 
 I'm with Jung-uk here.
 
 FWIW, if you want an example of using "free" bootstrapping you need look
 no further than IcedTea.  IIRC it uses gcj and ecj to do it's bootstrapping.
 Or just go the whole way and port IcedTea in it's entirety.
 
 -- 
 Greg Lewis                          Email   : glewis@eyesbeyond.com
 Eyes Beyond                         Web     : http://www.eyesbeyond.com
 Information Technology              FreeBSD : glewis@FreeBSD.org
Responsible-Changed-From-To: java->freebsd-java 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Sat Nov 13 19:29:25 UTC 2010 
Responsible-Changed-Why:  
Canonicalize assignment. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=151923 
State-Changed-From-To: open->closed 
State-Changed-By: jkim 
State-Changed-When: Fri Oct 12 03:15:40 UTC 2012 
State-Changed-Why:  
This PR is obsolete since r305745 (ports/java/bootstrap-openjdk). 

http://www.freebsd.org/cgi/query-pr.cgi?pr=151923 
>Unformatted:
