~alpine/aports

This thread contains a patchset. You're looking at the original emails, but you may wish to use the patch review UI. Review patch
3 3

[alpine-aports] [PATCH 1/2] community/openjdk7: install profile file

Details
Message ID
<1449778927-15011-1-git-send-email-soeren+git@soeren-tempel.net>
Sender timestamp
1449778926
DKIM signature
missing
Download raw message
Patch: +6 -1
Use it to set JAVA_HOME which is used by some java applications like
android studio or apache maven.
---
 community/openjdk7/APKBUILD | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/community/openjdk7/APKBUILD b/community/openjdk7/APKBUILD
index cb913ba..05f078b 100644
--- a/community/openjdk7/APKBUILD
+++ b/community/openjdk7/APKBUILD
@@ -5,7 +5,7 @@ _icedteaver=2.6.3
# pkgver is <JDK version>.<JDK update>
# check icedtea JDK when updating
pkgver=7.91.$_icedteaver
pkgrel=1
pkgrel=2
pkgdesc="Sun OpenJDK 7 via IcedTea"
url="http://icedtea.classpath.org/"
arch="all"
@@ -204,6 +204,11 @@ jrebase() {

	# pax mark again (due to fakeroot xattr handling bug)
	$_builddir/pax-mark-vm "$subpkgdir"/$INSTALL_BASE

	# install profile file in /etc/profile.d
	mkdir -p "$pkgdir"/etc/profile.d
	echo "export JAVA_HOME=\"\${JAVA_HOME:-$INSTALL_BASE/jre}\"" \
		> "$pkgdir/etc/profile.d/$pkgname.sh" || return 1
}

jre() {
-- 
2.6.4



---
Unsubscribe:  alpine-aports+unsubscribe@lists.alpinelinux.org
Help:         alpine-aports+help@lists.alpinelinux.org
---

[alpine-aports] [PATCH 2/2] community/openjdk8: install profile file

Details
Message ID
<1449778927-15011-2-git-send-email-soeren+git@soeren-tempel.net>
In-Reply-To
<1449778927-15011-1-git-send-email-soeren+git@soeren-tempel.net> (view parent)
Sender timestamp
1449778927
DKIM signature
missing
Download raw message
Patch: +6 -1
Use it to set JAVA_HOME which is used by some java applications like
android studio or apache maven.
---
 community/openjdk8/APKBUILD | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/community/openjdk8/APKBUILD b/community/openjdk8/APKBUILD
index 643af10..976b3cb 100644
--- a/community/openjdk8/APKBUILD
+++ b/community/openjdk8/APKBUILD
@@ -5,7 +5,7 @@ _java_ver=8
_jdk_update=66
_jdk_build=17
pkgver=$_java_ver.$_jdk_update.$_jdk_build
pkgrel=1
pkgrel=2
pkgdesc="Sun OpenJDK 8"
url="http://openjdk.java.net"
arch="x86_64 x86"
@@ -145,6 +145,11 @@ package() {
		| xargs chmod go+r

	pax_mark_vm "$pkgdir"/$INSTALL_BASE

	# install profile file in /etc/profile.d
	mkdir -p "$pkgdir"/etc/profile.d
	echo "export JAVA_HOME=\"\${JAVA_HOME:-$INSTALL_BASE/jre}\"" \
		> "$pkgdir/etc/profile.d/$pkgname.sh" || return 1
}

jrelib() {
-- 
2.6.4



---
Unsubscribe:  alpine-aports+unsubscribe@lists.alpinelinux.org
Help:         alpine-aports+help@lists.alpinelinux.org
---

Re: [alpine-aports] [PATCH 2/2] community/openjdk8: install profile file

Timo Teras <timo.teras@iki.fi>
Details
Message ID
<20151211080839.22961b72@vostro>
In-Reply-To
<1449778927-15011-2-git-send-email-soeren+git@soeren-tempel.net> (view parent)
Sender timestamp
1449814119
DKIM signature
missing
Download raw message
On Thu, 10 Dec 2015 21:22:07 +0100
Sören Tempel <soeren+git@soeren-tempel.net> wrote:

> Use it to set JAVA_HOME which is used by some java applications like
> android studio or apache maven.

What if all java's are installed. openjdk7, openjdk8 and gcc-java.
Which one's JAVA_HOME should take preference? Should it be left up to
the execution order of profile.d? Or should we let java-common ship one
profile script that setups the JAVA_HOME to proper place? Would it be
enough to make it point to "/usr/lib/jvm/default-jvm/jre/" always?

> ---
>  community/openjdk8/APKBUILD | 7 ++++++-
>  1 file changed, 6 insertions(+), 1 deletion(-)
> 
> diff --git a/community/openjdk8/APKBUILD b/community/openjdk8/APKBUILD
> index 643af10..976b3cb 100644
> --- a/community/openjdk8/APKBUILD
> +++ b/community/openjdk8/APKBUILD
> @@ -5,7 +5,7 @@ _java_ver=8
>  _jdk_update=66
>  _jdk_build=17
>  pkgver=$_java_ver.$_jdk_update.$_jdk_build
> -pkgrel=1
> +pkgrel=2
>  pkgdesc="Sun OpenJDK 8"
>  url="http://openjdk.java.net"
>  arch="x86_64 x86"
> @@ -145,6 +145,11 @@ package() {
>  		| xargs chmod go+r
>  
>  	pax_mark_vm "$pkgdir"/$INSTALL_BASE
> +
> +	# install profile file in /etc/profile.d
> +	mkdir -p "$pkgdir"/etc/profile.d
> +	echo "export JAVA_HOME=\"\${JAVA_HOME:-$INSTALL_BASE/jre}\""
> \
> +		> "$pkgdir/etc/profile.d/$pkgname.sh" || return 1
>  }
>  
>  jrelib() {



---
Unsubscribe:  alpine-aports+unsubscribe@lists.alpinelinux.org
Help:         alpine-aports+help@lists.alpinelinux.org
---

Re: [alpine-aports] [PATCH 2/2] community/openjdk8: install profile file

Details
Message ID
<20151211220105.GA20195@francium.fritz.box>
In-Reply-To
<20151211080839.22961b72@vostro> (view parent)
Sender timestamp
1449871265
DKIM signature
missing
Download raw message
On 11.12.15, Timo Teras wrote:
> What if all java's are installed. openjdk7, openjdk8 and gcc-java.
> Which one's JAVA_HOME should take preference? Should it be left up to
> the execution order of profile.d? Or should we let java-common ship one
> profile script that setups the JAVA_HOME to proper place? 

My idea was to leave this up to the execution order, but you are right
shipping the /etc/profile.d file with java-common is a better approach.

On 11.12.15, Timo Teras wrote:
> Would it be enough to make it point to "/usr/lib/jvm/default-jvm/jre/"
> always?

Yeah, that should probably work. I will test this and submit a patch for
java-common instead.

Sören.


---
Unsubscribe:  alpine-aports+unsubscribe@lists.alpinelinux.org
Help:         alpine-aports+help@lists.alpinelinux.org
---
Reply to thread Export thread (mbox)