You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@harmony.apache.org by Salikh Zakirov <sa...@gmail.com> on 2007/08/22 17:35:35 UTC

[packaging] binary Gentoo/x86 ebuild for M2 snapshot

Hi,

I've tried to create a binary package descriptor of M2 stable snapshot for Gentoo/x86
(as it is simpler than building from source, and the source snapshot is not available anyway).
It seems to install and work nicely, at least I am now trying to run the build process using
harmony jre, and it hasn't failed yet. I will see how long I can use it :)

Instruction on how to try out:

0) configure portage overlay

	$ echo 'PORTDIR_OVERLAY="/usr/local/portage"' >> /etc/make.conf

1) put the ebuild files in place

	$ mkdir -p /usr/local/portage/dev-java/harmony-jre-bin/files
	$ mv harmony-jre-bin-0.02.ebuild /usr/local/portage/dev-java/harmony-jre-bin
	$ mv harmony-jre-bin.env /usr/local/portage/dev-java/harmony-jre-bin/files

2) regenerate the ebuild manifest and digest files

	$ ebuild /usr/local/portage/dev-java/harmony-jre-bin/harmony-jre-bin-0.02.ebuild digest

3) configure keywords to accept unstable package

	$ echo 'dev-java/harmony-jre-bin ~x86' >> /etc/portage/package.keywords

4) install the package
	
	$ emerge harmony-jre-bin

5) make sure that the harmony-jre is in the list of installed VMs, and choose it as default

	$ java-config -L
	$ java-config --set-system-vm=harmony-jre-bin
	$ java -version



Some questions

Where would be the best to check in the Gentoo ebuild files?


Minor nits, that can confuse potential end users

1) ant complains that it cannot find tools.jar
This is probably because it is JRE snapshot rather than JDK

2) each run java prints
'The GC did not provide gc_add_weak_root_set_entry()'
This is trivial issue, and AFAIK weak root support is scheduled for GC_v5,
but anyway, we'd better make sure such trivial issues are fixed in packaged builds.

3) 'java -version' output is somewhat noisy, and has some not-to-the-point information,
e.g. end user is unlikely to want to know that launcher is separate component in Harmony

4) Gentoo is not keen to have a version identifier 'M2', so I changed it to '0.02'. It would be nice
if our release numbering would be compatible with packaging systems without such changes,
to reduce confusion.


Re: [packaging] binary Gentoo/x86 ebuild for M2 snapshot

Posted by Salikh Zakirov <sa...@gmail.com>.
Gregory Shimansky wrote:
> Yes, I think so. Is it possible to create a ebuild for JDK as well?

The same simplistic approach seems to work with JDK as well.

I have created ebuild file for binary M2 snapshot and attached 
it as harmony-jdk-bin.0.02.551077.ebuild to
http://wiki.apache.org/harmony/GentooEbuilds.

Ant doesn't complain about missing tools.jar anymore :)


Re: [packaging] binary Gentoo/x86 ebuild for M2 snapshot

Posted by Salikh Zakirov <sa...@gmail.com>.
Gregory Shimansky wrote:
>> the wiki page with instructions
>> and ebuild files.
>>
>>     http://wiki.apache.org/harmony/GentooEbuilds
>>
>> I agree that it would be a good idea to add a 'packaged distributions'
>> link to the site,
>> and don't forget to link the .deb files produced by Mark
> 
> I might have missed it. Are they already available somewhere?

http://people.apache.org/~hindessm/debian/

Look the mailing list archives for subject '[packaging] Debian packaging' [3]

> There are two different binaries on the site, JDK and HDK.

Indeed.
Somehow I managed not to see it on the first glance.
Thanks for getting me straight.

> I thought of a different versioning scheme. A date could be used as a
> postfix of the version, e.g. 0.0.20070832, or the date of the M2 milestone.
> For example some gcc ebuilds use date when a CVS snapshot is used instead of
> an official release.

That's possible, indeed. But I tend to think that officially releasing 
properly versioned packages would be better. The more officially-looking
ebuild naming would be, the more potential users will be inclined to try it out.

By the way, I think it would be good to notify Gentoo-Java team [2]
when we'll have working source builds.

> BTW I didn't find an official document for the ebuild file name format. Do
> you know if one exist?

I based my reasoning on Ebuild HOWTO [1]. According to the rules,
'-M2' suffix will be parsed as part of the name, rather than version.
Using M2 as suffix to some number (e.g. 0.1M2) is also not allowed 
(only single-letter suffixes are allowed).

[1] http://www.gentoo.org/proj/en/devrel/handbook/handbook.xml?part=2&chap=1#doc_chap2
[2] http://www.gentoo.org/proj/en/java/index.xml
[3] http://www.mail-archive.com/dev@harmony.apache.org/msg09232.html


Re: [packaging] binary Gentoo/x86 ebuild for M2 snapshot

Posted by Gregory Shimansky <gs...@gmail.com>.
Tim Ellison wrote:
> Gregory Shimansky wrote:
>> On 8/23/07, Salikh Zakirov <sa...@gmail.com> wrote:
>>> Gregory Shimansky wrote:
>>>> I can put ebuild file somewhere on the site. We just need to decide
>>>> which section should have the link to it. Probably besides the snapshots
>>>> for M2?
>>> I remembered a better place, wiki. So I created the wiki page with
>>> instructions
>>> and attached the ebuild files to it.
>>>
>>>     http://wiki.apache.org/harmony/GentooEbuilds
>>>
>>> I agree that it would be a good idea to add a 'packaged distributions'
>>> link to the site,
>>> and don't forget to link the .deb files produced by Mark
>>
>> I might have missed it. Are they already available somewhere?
>>
>>> Yes, I think so. Is it possible to create a ebuild for JDK as well?
>>>
>>> I guess so, using the HDK download for it.
>>
>> There are two different binaries on the site, JDK and HDK.
>>
>>>> 4) Gentoo is not keen to have a version identifier 'M2', so I changed
>>>>> it to '0.02'. It would be nice
>>>>> if our release numbering would be compatible with packaging systems
>>>>> without such changes,
>>>>> to reduce confusion.
>>>> It could be harmony-jre-bin-0.0-r2.ebuild probably? We didn't agree on
>>>> any version number yet :)
>>> I think that will be misleading, as M2 is a version related to the Harmony
>>> project,
>>> rather than the ebuild version.
>>>
>> I thought of a different versioning scheme. A date could be used as a
>> postfix of the version, e.g. 0.0.20070832, or the date of the M2 milestone.
>> For example some gcc ebuilds use date when a CVS snapshot is used instead of
>> an official release.
> 
> How about the SVN revision number, which for M2 is 551077 ?

These are usually used in *-svn and *-cvs builds for packages like 
emacs-cvs that are meant to be using a svn/cvs revision from the 
repository. Other packages in gentoo that use snapshots (be in a built 
binary or packed source tree) from the web, not from svn/cvs repository 
are usually using the date as the marker.

-- 
Gregory


Re: [packaging] binary Gentoo/x86 ebuild for M2 snapshot

Posted by Tim Ellison <t....@gmail.com>.
Gregory Shimansky wrote:
> On 8/23/07, Salikh Zakirov <sa...@gmail.com> wrote:
>> Gregory Shimansky wrote:
>>> I can put ebuild file somewhere on the site. We just need to decide
>>> which section should have the link to it. Probably besides the snapshots
>>> for M2?
>> I remembered a better place, wiki. So I created the wiki page with
>> instructions
>> and attached the ebuild files to it.
>>
>>     http://wiki.apache.org/harmony/GentooEbuilds
>>
>> I agree that it would be a good idea to add a 'packaged distributions'
>> link to the site,
>> and don't forget to link the .deb files produced by Mark
> 
> 
> I might have missed it. Are they already available somewhere?
> 
>> Yes, I think so. Is it possible to create a ebuild for JDK as well?
>>
>> I guess so, using the HDK download for it.
> 
> 
> There are two different binaries on the site, JDK and HDK.
> 
>>> 4) Gentoo is not keen to have a version identifier 'M2', so I changed
>>>> it to '0.02'. It would be nice
>>>> if our release numbering would be compatible with packaging systems
>>>> without such changes,
>>>> to reduce confusion.
>>> It could be harmony-jre-bin-0.0-r2.ebuild probably? We didn't agree on
>>> any version number yet :)
>> I think that will be misleading, as M2 is a version related to the Harmony
>> project,
>> rather than the ebuild version.
>>
> 
> I thought of a different versioning scheme. A date could be used as a
> postfix of the version, e.g. 0.0.20070832, or the date of the M2 milestone.
> For example some gcc ebuilds use date when a CVS snapshot is used instead of
> an official release.

How about the SVN revision number, which for M2 is 551077 ?

Regards,
Tim

> BTW I didn't find an official document for the ebuild file name format. Do
> you know if one exist?
> 

Re: [packaging] binary Gentoo/x86 ebuild for M2 snapshot

Posted by Gregory Shimansky <gs...@apache.org>.
On 8/23/07, Salikh Zakirov <sa...@gmail.com> wrote:
>
> Gregory Shimansky wrote:
> > I can put ebuild file somewhere on the site. We just need to decide
> > which section should have the link to it. Probably besides the snapshots
> > for M2?
>
> I remembered a better place, wiki. So I created the wiki page with
> instructions
> and attached the ebuild files to it.
>
>     http://wiki.apache.org/harmony/GentooEbuilds
>
> I agree that it would be a good idea to add a 'packaged distributions'
> link to the site,
> and don't forget to link the .deb files produced by Mark


I might have missed it. Are they already available somewhere?

> Yes, I think so. Is it possible to create a ebuild for JDK as well?
>
> I guess so, using the HDK download for it.


There are two different binaries on the site, JDK and HDK.

>> 4) Gentoo is not keen to have a version identifier 'M2', so I changed
> >> it to '0.02'. It would be nice
> >> if our release numbering would be compatible with packaging systems
> >> without such changes,
> >> to reduce confusion.
> >
> > It could be harmony-jre-bin-0.0-r2.ebuild probably? We didn't agree on
> > any version number yet :)
>
> I think that will be misleading, as M2 is a version related to the Harmony
> project,
> rather than the ebuild version.
>

I thought of a different versioning scheme. A date could be used as a
postfix of the version, e.g. 0.0.20070832, or the date of the M2 milestone.
For example some gcc ebuilds use date when a CVS snapshot is used instead of
an official release.

BTW I didn't find an official document for the ebuild file name format. Do
you know if one exist?

-- 
Gregory

Re: [packaging] binary Gentoo/x86 ebuild for M2 snapshot

Posted by Salikh Zakirov <sa...@gmail.com>.
Gregory Shimansky wrote:
> I can put ebuild file somewhere on the site. We just need to decide
> which section should have the link to it. Probably besides the snapshots
> for M2?

I remembered a better place, wiki. So I created the wiki page with instructions
and attached the ebuild files to it.

    http://wiki.apache.org/harmony/GentooEbuilds

I agree that it would be a good idea to add a 'packaged distributions' link to the site,
and don't forget to link the .deb files produced by Mark.


> Yes, I think so. Is it possible to create a ebuild for JDK as well?

I guess so, using the HDK download for it.

>> 4) Gentoo is not keen to have a version identifier 'M2', so I changed
>> it to '0.02'. It would be nice
>> if our release numbering would be compatible with packaging systems
>> without such changes,
>> to reduce confusion.
> 
> It could be harmony-jre-bin-0.0-r2.ebuild probably? We didn't agree on
> any version number yet :)

I think that will be misleading, as M2 is a version related to the Harmony project,
rather than the ebuild version.

> BTW we can also create harmony-jre-bin-9999.ebuild for the current
> latest snapshots [1]. In Gentoo 9999 version is usually used for the
> bleeding edge latest unreleased version.

Thanks for the advice, this looks like a feasible approach for creating ebuilds
for latest snapshots.


Re: [packaging] binary Gentoo/x86 ebuild for M2 snapshot

Posted by Gregory Shimansky <gs...@gmail.com>.
Salikh Zakirov wrote:
> Hi,
> 
> I've tried to create a binary package descriptor of M2 stable snapshot for Gentoo/x86
> (as it is simpler than building from source, and the source snapshot is not available anyway).
> It seems to install and work nicely, at least I am now trying to run the build process using
> harmony jre, and it hasn't failed yet. I will see how long I can use it :)

It is cool!

> Some questions
> 
> Where would be the best to check in the Gentoo ebuild files?

I can put ebuild file somewhere on the site. We just need to decide 
which section should have the link to it. Probably besides the snapshots 
for M2?

> Minor nits, that can confuse potential end users
> 
> 1) ant complains that it cannot find tools.jar
> This is probably because it is JRE snapshot rather than JDK

Yes, I think so. Is it possible to create a ebuild for JDK as well?

> 2) each run java prints
> 'The GC did not provide gc_add_weak_root_set_entry()'
> This is trivial issue, and AFAIK weak root support is scheduled for GC_v5,
> but anyway, we'd better make sure such trivial issues are fixed in packaged builds.

AFAIK this is fixed already in SVN as GC_GEN has week roots support now. 
So the binary for M3 will not print this message.

> 3) 'java -version' output is somewhat noisy, and has some not-to-the-point information,
> e.g. end user is unlikely to want to know that launcher is separate component in Harmony
> 
> 4) Gentoo is not keen to have a version identifier 'M2', so I changed it to '0.02'. It would be nice
> if our release numbering would be compatible with packaging systems without such changes,
> to reduce confusion.

It could be harmony-jre-bin-0.0-r2.ebuild probably? We didn't agree on 
any version number yet :)

BTW we can also create harmony-jre-bin-9999.ebuild for the current 
latest snapshots [1]. In Gentoo 9999 version is usually used for the 
bleeding edge latest unreleased version.

[1] http://harmony.apache.org/downloads.html#Harmony5_Snapshot

-- 
Gregory


[testing] Running Azureus 9was: Re: [packaging] binary Gentoo/x86 ebuild for M2 snapshot)

Posted by Tim Ellison <t....@gmail.com>.
Salikh Zakirov wrote:
> Salikh Zakirov wrote:
>> It seems to install and work nicely, at least I am now trying to run the build process using
>> harmony jre, and it hasn't failed yet. I will see how long I can use it :)
> 
> It didn't fly past Azureus, which now reports "Error: Disk write error - Cache inconsistent: 0 flushed"
> for all torrents, and does not work. At this point I'm reverting back to Sun's JDK

Did you figure out the underlying cause?  Our testing in the past with
Azureus uncovered some implementation assumptions built into the app,
see http://wiki.apache.org/harmony/Azureus

Regards,
Tim

Re: [packaging] binary Gentoo/x86 ebuild for M2 snapshot

Posted by Salikh Zakirov <sa...@gmail.com>.
Salikh Zakirov wrote:
> It seems to install and work nicely, at least I am now trying to run the build process using
> harmony jre, and it hasn't failed yet. I will see how long I can use it :)

It didn't fly past Azureus, which now reports "Error: Disk write error - Cache inconsistent: 0 flushed"
for all torrents, and does not work. At this point I'm reverting back to Sun's JDK