~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
4 3

[alpine-aports] [PATCH 1/2] testing/openjdk8: install profile to /etc/profile.d

Sören Tempel
Details
Message ID
<1443804743-4910-1-git-send-email-soeren+git@soeren-tempel.net>
Sender timestamp
1443804742
DKIM signature
missing
Download raw message
Patch: +9 -1
---
 testing/openjdk8/APKBUILD | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/testing/openjdk8/APKBUILD b/testing/openjdk8/APKBUILD
index d7400db..35ca206 100644
--- a/testing/openjdk8/APKBUILD
+++ b/testing/openjdk8/APKBUILD
@@ -1,3 +1,4 @@
+# Contributor: Sören Tempel <soeren+alpine@soeren-tempel.net>
 # Contributor: Timo Teras <timo.teras@iki.fi>
 # Maintainer: Timo Teras <timo.teras@iki.fi>
 pkgname=openjdk8
@@ -5,7 +6,7 @@ _java_ver=8
 _jdk_update=66
 _jdk_build=02
 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 +146,13 @@ package() {
 		| xargs chmod go+r
 
 	pax_mark_vm "$pkgdir"/$INSTALL_BASE
+
+	# install profile file in /etc/profile.d
+	mkdir -p "$pkgdir"/etc/profile.d
+	cat > "$pkgdir/etc/profile.d/$pkgname.sh" <<EOF
+export JAVA_HOME="\${JAVA_HOME:-$INSTALL_BASE/jre}"
+export PATH="\$PATH:\$JAVA_HOME/bin:$INSTALL_BASE/bin"
+EOF
 }
 
 jrelib() {
-- 
2.6.0



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

[alpine-aports] [PATCH 2/2] main/openjdk7: install profile to /etc/profile.d

Sören Tempel
Details
Message ID
<1443804743-4910-2-git-send-email-soeren+git@soeren-tempel.net>
In-Reply-To
<1443804743-4910-1-git-send-email-soeren+git@soeren-tempel.net> (view parent)
Sender timestamp
1443804743
DKIM signature
missing
Download raw message
Patch: +9 -1
---
 main/openjdk7/APKBUILD | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/main/openjdk7/APKBUILD b/main/openjdk7/APKBUILD
index 0325f10..d5fb04f 100644
--- a/main/openjdk7/APKBUILD
+++ b/main/openjdk7/APKBUILD
@@ -1,3 +1,4 @@
+# Contributor: Sören Tempel <soeren+alpine@soeren-tempel.net>
 # Contributor: Timo Teras <timo.teras@iki.fi>
 # Maintainer: Timo Teras <timo.teras@iki.fi>
 pkgname=openjdk7
@@ -5,7 +6,7 @@ _icedteaver=2.6.1
 # pkgver is <JDK version>.<JDK update>
 # check icedtea JDK when updating
 pkgver=7.85.$_icedteaver
-pkgrel=0
+pkgrel=1
 pkgdesc="Sun OpenJDK 7 via IcedTea"
 url="http://icedtea.classpath.org/"
 arch="all"
@@ -168,6 +169,13 @@ package() {
 
 	# pax mark again (due to fakeroot xattr handling bug)
 	$_builddir/pax-mark-vm "$pkgdir"/$INSTALL_BASE
+
+	# install profile file in /etc/profile.d
+	mkdir -p "$pkgdir"/etc/profile.d
+	cat > "$pkgdir/etc/profile.d/$pkgname.sh" <<EOF
+export JAVA_HOME="\${JAVA_HOME:-$INSTALL_BASE/jre}"
+export PATH="\$PATH:\$JAVA_HOME/bin:$INSTALL_BASE/bin"
+EOF
 }
 
 jrelib() {
-- 
2.6.0



---
Unsubscribe:  alpine-aports+unsubscribe@lists.alpinelinux.org
Help:         alpine-aports+help@lists.alpinelinux.org
---
Timo Teras
Details
Message ID
<20151002203957.374db2c1@vostro>
In-Reply-To
<1443804743-4910-1-git-send-email-soeren+git@soeren-tempel.net> (view parent)
Sender timestamp
1443807597
DKIM signature
missing
Download raw message
On Fri,  2 Oct 2015 18:52:22 +0200
Sören Tempel <soeren+git@soeren-tempel.net> wrote:

> @@ -145,6 +146,13 @@ package() {
>  		| xargs chmod go+r
>  
>  	pax_mark_vm "$pkgdir"/$INSTALL_BASE
> +
> +	# install profile file in /etc/profile.d
> +	mkdir -p "$pkgdir"/etc/profile.d
> +	cat > "$pkgdir/etc/profile.d/$pkgname.sh" <<EOF
> +export JAVA_HOME="\${JAVA_HOME:-$INSTALL_BASE/jre}"
> +export PATH="\$PATH:\$JAVA_HOME/bin:$INSTALL_BASE/bin"
> +EOF
>  }
>  
>  jrelib() {

Is this needed for some specific reason?

The idea has been that java-common provides symlinks
from /usr/bin/{$java_utils} to ../lib/default-jvm/... and default-jvm
is updated by java-common's trigger script when ever a java sdk is
installed or removed.


---
Unsubscribe:  alpine-aports+unsubscribe@lists.alpinelinux.org
Help:         alpine-aports+help@lists.alpinelinux.org
---
Sören Tempel
Details
Message ID
<20151003004249.GA25648@francium.lan>
In-Reply-To
<20151002203957.374db2c1@vostro> (view parent)
Sender timestamp
1443832969
DKIM signature
missing
Download raw message
On 02.10.15, Timo Teras wrote:
> Is this needed for some specific reason?
> 
> The idea has been that java-common provides symlinks
> from /usr/bin/{$java_utils} to ../lib/default-jvm/... and default-jvm
> is updated by java-common's trigger script when ever a java sdk is
> installed or removed.

Ah, didn't know about java-common, just looked at it and it is missing
many binaries (e.g. javac). Wouldn't it be the better solution to do it
this way instead of relying on java-common? It's obviously harder to
keep java-common up to date instead of simply installing a profile file.
If you disagree changing $PATH isn't needed for some specific reason but
some applications rely on JAVA_HOME being set one example is the android
studio IDE.

Sören.


---
Unsubscribe:  alpine-aports+unsubscribe@lists.alpinelinux.org
Help:         alpine-aports+help@lists.alpinelinux.org
---
Timo Teras
Details
Message ID
<20151003142044.6ca9fbd6@vostro>
In-Reply-To
<20151003004249.GA25648@francium.lan> (view parent)
Sender timestamp
1443871244
DKIM signature
missing
Download raw message
On Sat, 3 Oct 2015 02:42:49 +0200
Sören Tempel <soeren@soeren-tempel.net> wrote:

> On 02.10.15, Timo Teras wrote:
> > Is this needed for some specific reason?
> > 
> > The idea has been that java-common provides symlinks
> > from /usr/bin/{$java_utils} to ../lib/default-jvm/... and
> > default-jvm is updated by java-common's trigger script when ever a
> > java sdk is installed or removed.
> 
> Ah, didn't know about java-common, just looked at it and it is missing
> many binaries (e.g. javac). Wouldn't it be the better solution to do
> it this way instead of relying on java-common? It's obviously harder
> to keep java-common up to date instead of simply installing a profile
> file. If you disagree changing $PATH isn't needed for some specific
> reason but some applications rely on JAVA_HOME being set one example
> is the android studio IDE.

Yes, it was supposed to export only the JRE. Javac is part of the SDK.
Perhaps java-common should export the 'default-jvm' to environment
then. Or potentially have the SDK packages provide the environment. But
at least for JRE only I'd rather not export anything to environment
unless absolute necessary for some specific reason.


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