[packaging] binary Gentoo/x86 ebuild for M2 snapshot

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.
# in public domain

inherit java-vm-2

DESCRIPTION="Java SE 5 JDK under the Apache License v2"

HOMEPAGE="http://harmony.apache.org";
SRC_URI="http://people.apache.org/builds/harmony/milestones/M2/apache-harmony-jre-r551077-linux-x86-32-snapshot.tar.gz";

LICENSE="Apache-2"
SLOT="0"
KEYWORDS="-* ~x86"
IUSE=""

DEPEND=""
RDEPEND=""

src_unpack() {
	tar xfz "${DISTDIR}/${A}"
}

src_install() {
	dodir "/opt/${P}"
	cp -a "${WORKDIR}"/harmony-jre-*/* "${D}/opt/${P}"

	# create the VM handle file in /usr/share/java-config-2/vm
	set_java_env
}

pkg_postinst() {
	java-vm-2_pkg_postinst
}
# in public domain

VERSION="Apache Harmony JRE @PV@"
JAVA_HOME=/opt/@P@
PATH="${JAVA_HOME}/bin"
PROVIDES_TYPE="JRE"
PROVIDES_VERSION="1.5"
GENERATION="2"
ENV_VARS="JAVA_HOME PATH"

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux