* [meta-java][RFC][PATCH 2/7] layer.conf: allow multiple Java SDKs & runtimes to co-exist
2018-07-27 13:29 [meta-java][RFC][PATCH 1/7] openjdk-8-native: add meaningful (R)PROVIDES André Draszik
@ 2018-07-27 13:29 ` André Draszik
2018-08-02 10:40 ` Richard Leitner
2018-07-27 13:29 ` [meta-java][RFC][PATCH 3/7] openjdk-8: add meaningful (R)PROVIDES André Draszik
` (5 subsequent siblings)
6 siblings, 1 reply; 16+ messages in thread
From: André Draszik @ 2018-07-27 13:29 UTC (permalink / raw)
To: openembedded-devel
From: André Draszik <andre.draszik@jci.com>
Using MULTI_PROVIDER_WHITELIST, we can instruct Bitbake to not complain
if multiple recipes provide or runtime provide the same Java environment.
This is a common use-case, and Java packages don't conflict with each
other as they are typically installed under a different prefix, while still
providing (more or less) the same features.
Signed-off-by: André Draszik <andre.draszik@jci.com>
---
conf/layer.conf | 3 +++
1 file changed, 3 insertions(+)
diff --git a/conf/layer.conf b/conf/layer.conf
index 3b00f61..8b2978a 100644
--- a/conf/layer.conf
+++ b/conf/layer.conf
@@ -14,3 +14,6 @@ LICENSE_PATH += "${LAYERDIR}/licenses"
SIGGEN_EXCLUDERECIPES_ABISAFE += "\
ca-certificates-java \
"
+
+MULTI_PROVIDER_WHITELIST_append = " ${@' '.join('virtual/java'+str(x)+'-sdk-native virtual/java'+str(x)+'-runtime-native' for x in range(5,9))}"
+MULTI_PROVIDER_WHITELIST_append = " ${@' '.join('virtual/java'+str(x)+'-runtime' for x in range(5,9))}"
--
2.18.0
^ permalink raw reply related [flat|nested] 16+ messages in thread
* Re: [meta-java][RFC][PATCH 2/7] layer.conf: allow multiple Java SDKs & runtimes to co-exist
2018-07-27 13:29 ` [meta-java][RFC][PATCH 2/7] layer.conf: allow multiple Java SDKs & runtimes to co-exist André Draszik
@ 2018-08-02 10:40 ` Richard Leitner
0 siblings, 0 replies; 16+ messages in thread
From: Richard Leitner @ 2018-08-02 10:40 UTC (permalink / raw)
To: André Draszik, openembedded-devel
Hi André,
again: thank you and feel free to add
Acked-by: Richard Leitner <richard.leitner@skidata.com>
regards;Richard.L
On 07/27/2018 03:29 PM, André Draszik wrote:
> From: André Draszik <andre.draszik@jci.com>
>
> Using MULTI_PROVIDER_WHITELIST, we can instruct Bitbake to not complain
> if multiple recipes provide or runtime provide the same Java environment.
>
> This is a common use-case, and Java packages don't conflict with each
> other as they are typically installed under a different prefix, while still
> providing (more or less) the same features.
>
> Signed-off-by: André Draszik <andre.draszik@jci.com>
> ---
> conf/layer.conf | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/conf/layer.conf b/conf/layer.conf
> index 3b00f61..8b2978a 100644
> --- a/conf/layer.conf
> +++ b/conf/layer.conf
> @@ -14,3 +14,6 @@ LICENSE_PATH += "${LAYERDIR}/licenses"
> SIGGEN_EXCLUDERECIPES_ABISAFE += "\
> ca-certificates-java \
> "
> +
> +MULTI_PROVIDER_WHITELIST_append = " ${@' '.join('virtual/java'+str(x)+'-sdk-native virtual/java'+str(x)+'-runtime-native' for x in range(5,9))}"
> +MULTI_PROVIDER_WHITELIST_append = " ${@' '.join('virtual/java'+str(x)+'-runtime' for x in range(5,9))}"
>
^ permalink raw reply [flat|nested] 16+ messages in thread
* [meta-java][RFC][PATCH 3/7] openjdk-8: add meaningful (R)PROVIDES
2018-07-27 13:29 [meta-java][RFC][PATCH 1/7] openjdk-8-native: add meaningful (R)PROVIDES André Draszik
2018-07-27 13:29 ` [meta-java][RFC][PATCH 2/7] layer.conf: allow multiple Java SDKs & runtimes to co-exist André Draszik
@ 2018-07-27 13:29 ` André Draszik
2018-08-02 10:42 ` Richard Leitner
2018-07-27 13:29 ` [meta-java][RFC][PATCH 4/7] openjre-8: " André Draszik
` (4 subsequent siblings)
6 siblings, 1 reply; 16+ messages in thread
From: André Draszik @ 2018-07-27 13:29 UTC (permalink / raw)
To: openembedded-devel
From: André Draszik <andre.draszik@jci.com>
Then OpenJDK8 recipe provides a Java SDK, and a Java Runtime. It
is compatible with Java versions 5 through 8 (including), so add
appropriate (R)PROVIDES, so that recipes depending on it can can specify
that virtual dependency, rather than hard-coding to openjdk-8. This makes
it possible to:
a) add OpenJDK9 and OpenJDK10 recipes in the future without much disruption
b) use a different provider than OpenJDK, e.g. Oracle Java, or Zulu Java
This is the approach taken by e.g. Debian.
Signed-off-by: André Draszik <andre.draszik@jci.com>
---
recipes-core/openjdk/openjdk-8_172b11.bb | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/recipes-core/openjdk/openjdk-8_172b11.bb b/recipes-core/openjdk/openjdk-8_172b11.bb
index 9c2a7a1..77c2a57 100644
--- a/recipes-core/openjdk/openjdk-8_172b11.bb
+++ b/recipes-core/openjdk/openjdk-8_172b11.bb
@@ -45,10 +45,10 @@ FILES_${PN}-doc_append = "\
FILES_${PN}-source = " ${JDK_HOME}/src.zip "
-RPROVIDES_${PN} = "java2-vm"
-PROVIDES_${PN} = "java2-vm"
-RPROVIDES_${PN} = "java2-runtime"
-PROVIDES_${PN} = "java2-runtime"
+PROVIDES = "java2-vm java2-runtime"
+PROVIDES += "${@' '.join('virtual/java'+str(x)+'-sdk virtual/java'+str(x)+'-runtime' for x in range(5,9))}"
+RPROVIDES_${PN} = "java2-vm java2-runtime"
+RPROVIDES_${PN} += "${@' '.join('virtual-java'+str(x)+'-sdk virtual-java'+str(x)+'-runtime' for x in range(5,9))}"
inherit update-alternatives
--
2.18.0
^ permalink raw reply related [flat|nested] 16+ messages in thread
* Re: [meta-java][RFC][PATCH 3/7] openjdk-8: add meaningful (R)PROVIDES
2018-07-27 13:29 ` [meta-java][RFC][PATCH 3/7] openjdk-8: add meaningful (R)PROVIDES André Draszik
@ 2018-08-02 10:42 ` Richard Leitner
0 siblings, 0 replies; 16+ messages in thread
From: Richard Leitner @ 2018-08-02 10:42 UTC (permalink / raw)
To: André Draszik, openembedded-devel
Hi André,
again: thank you and feel free to add
Acked-by: Richard Leitner <richard.leitner@skidata.com>
regards;Richard.L
On 07/27/2018 03:29 PM, André Draszik wrote:
> From: André Draszik <andre.draszik@jci.com>
>
> Then OpenJDK8 recipe provides a Java SDK, and a Java Runtime. It
> is compatible with Java versions 5 through 8 (including), so add
> appropriate (R)PROVIDES, so that recipes depending on it can can specify
> that virtual dependency, rather than hard-coding to openjdk-8. This makes
> it possible to:
> a) add OpenJDK9 and OpenJDK10 recipes in the future without much disruption
> b) use a different provider than OpenJDK, e.g. Oracle Java, or Zulu Java
>
> This is the approach taken by e.g. Debian.
>
> Signed-off-by: André Draszik <andre.draszik@jci.com>
> ---
> recipes-core/openjdk/openjdk-8_172b11.bb | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/recipes-core/openjdk/openjdk-8_172b11.bb b/recipes-core/openjdk/openjdk-8_172b11.bb
> index 9c2a7a1..77c2a57 100644
> --- a/recipes-core/openjdk/openjdk-8_172b11.bb
> +++ b/recipes-core/openjdk/openjdk-8_172b11.bb
> @@ -45,10 +45,10 @@ FILES_${PN}-doc_append = "\
>
> FILES_${PN}-source = " ${JDK_HOME}/src.zip "
>
> -RPROVIDES_${PN} = "java2-vm"
> -PROVIDES_${PN} = "java2-vm"
> -RPROVIDES_${PN} = "java2-runtime"
> -PROVIDES_${PN} = "java2-runtime"
> +PROVIDES = "java2-vm java2-runtime"
> +PROVIDES += "${@' '.join('virtual/java'+str(x)+'-sdk virtual/java'+str(x)+'-runtime' for x in range(5,9))}"
> +RPROVIDES_${PN} = "java2-vm java2-runtime"
> +RPROVIDES_${PN} += "${@' '.join('virtual-java'+str(x)+'-sdk virtual-java'+str(x)+'-runtime' for x in range(5,9))}"
>
> inherit update-alternatives
>
>
^ permalink raw reply [flat|nested] 16+ messages in thread
* [meta-java][RFC][PATCH 4/7] openjre-8: add meaningful (R)PROVIDES
2018-07-27 13:29 [meta-java][RFC][PATCH 1/7] openjdk-8-native: add meaningful (R)PROVIDES André Draszik
2018-07-27 13:29 ` [meta-java][RFC][PATCH 2/7] layer.conf: allow multiple Java SDKs & runtimes to co-exist André Draszik
2018-07-27 13:29 ` [meta-java][RFC][PATCH 3/7] openjdk-8: add meaningful (R)PROVIDES André Draszik
@ 2018-07-27 13:29 ` André Draszik
2018-08-02 10:42 ` Richard Leitner
2018-07-27 13:29 ` [meta-java][RFC][PATCH 5/7] layer.conf: set defaults for Java JRE (R)PROVIDERS André Draszik
` (3 subsequent siblings)
6 siblings, 1 reply; 16+ messages in thread
From: André Draszik @ 2018-07-27 13:29 UTC (permalink / raw)
To: openembedded-devel
From: André Draszik <andre.draszik@jci.com>
Then OpenJRE8 recipe provides a Java Runtime. It
is compatible with Java versions 5 through 8 (including), so add
appropriate (R)PROVIDES, so that recipes depending on it can can specify
that virtual dependency, rather than hard-coding to openjre-8. This makes
it possible to:
a) add OpenJRE9 and OpenJRE10 recipes in the future without much disruption
b) use a different provider than OpenJDK, e.g. Oracle Java, or Zulu Java
This is the approach taken by e.g. Debian.
Signed-off-by: André Draszik <andre.draszik@jci.com>
---
recipes-core/openjdk/openjre-8_172b11.bb | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/recipes-core/openjdk/openjre-8_172b11.bb b/recipes-core/openjdk/openjre-8_172b11.bb
index 220dc01..eac5e5e 100644
--- a/recipes-core/openjdk/openjre-8_172b11.bb
+++ b/recipes-core/openjdk/openjre-8_172b11.bb
@@ -33,10 +33,10 @@ FILES_${PN}-doc_append = "\
${JRE_HOME}/THIRD_PARTY_README \
"
-RPROVIDES_${PN} = "java2-vm"
-PROVIDES_${PN} = "java2-vm"
-RPROVIDES_${PN} = "java2-runtime"
-PROVIDES_${PN} = "java2-runtime"
+PROVIDES = "java2-vm java2-runtime"
+PROVIDES += "${@' '.join('virtual/java'+str(x)+'-runtime' for x in range(5,9))}"
+RPROVIDES_${PN} = "java2-vm java2-runtime"
+RPROVIDES_${PN} += "${@' '.join('virtual-java'+str(x)+'-runtime' for x in range(5,9))}"
inherit update-alternatives
--
2.18.0
^ permalink raw reply related [flat|nested] 16+ messages in thread
* Re: [meta-java][RFC][PATCH 4/7] openjre-8: add meaningful (R)PROVIDES
2018-07-27 13:29 ` [meta-java][RFC][PATCH 4/7] openjre-8: " André Draszik
@ 2018-08-02 10:42 ` Richard Leitner
0 siblings, 0 replies; 16+ messages in thread
From: Richard Leitner @ 2018-08-02 10:42 UTC (permalink / raw)
To: André Draszik, openembedded-devel
Hi André,
again: thank you and feel free to add
Acked-by: Richard Leitner <richard.leitner@skidata.com>
regards;Richard.L
On 07/27/2018 03:29 PM, André Draszik wrote:
> From: André Draszik <andre.draszik@jci.com>
>
> Then OpenJRE8 recipe provides a Java Runtime. It
> is compatible with Java versions 5 through 8 (including), so add
> appropriate (R)PROVIDES, so that recipes depending on it can can specify
> that virtual dependency, rather than hard-coding to openjre-8. This makes
> it possible to:
> a) add OpenJRE9 and OpenJRE10 recipes in the future without much disruption
> b) use a different provider than OpenJDK, e.g. Oracle Java, or Zulu Java
>
> This is the approach taken by e.g. Debian.
>
> Signed-off-by: André Draszik <andre.draszik@jci.com>
> ---
> recipes-core/openjdk/openjre-8_172b11.bb | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/recipes-core/openjdk/openjre-8_172b11.bb b/recipes-core/openjdk/openjre-8_172b11.bb
> index 220dc01..eac5e5e 100644
> --- a/recipes-core/openjdk/openjre-8_172b11.bb
> +++ b/recipes-core/openjdk/openjre-8_172b11.bb
> @@ -33,10 +33,10 @@ FILES_${PN}-doc_append = "\
> ${JRE_HOME}/THIRD_PARTY_README \
> "
>
> -RPROVIDES_${PN} = "java2-vm"
> -PROVIDES_${PN} = "java2-vm"
> -RPROVIDES_${PN} = "java2-runtime"
> -PROVIDES_${PN} = "java2-runtime"
> +PROVIDES = "java2-vm java2-runtime"
> +PROVIDES += "${@' '.join('virtual/java'+str(x)+'-runtime' for x in range(5,9))}"
> +RPROVIDES_${PN} = "java2-vm java2-runtime"
> +RPROVIDES_${PN} += "${@' '.join('virtual-java'+str(x)+'-runtime' for x in range(5,9))}"
>
> inherit update-alternatives
>
>
^ permalink raw reply [flat|nested] 16+ messages in thread
* [meta-java][RFC][PATCH 5/7] layer.conf: set defaults for Java JRE (R)PROVIDERS
2018-07-27 13:29 [meta-java][RFC][PATCH 1/7] openjdk-8-native: add meaningful (R)PROVIDES André Draszik
` (2 preceding siblings ...)
2018-07-27 13:29 ` [meta-java][RFC][PATCH 4/7] openjre-8: " André Draszik
@ 2018-07-27 13:29 ` André Draszik
2018-08-02 10:49 ` Richard Leitner
2018-07-27 13:29 ` [meta-java][RFC][PATCH 6/7] openjdk-7: (R)PROVIDE virtual Java [567] packages André Draszik
` (2 subsequent siblings)
6 siblings, 1 reply; 16+ messages in thread
From: André Draszik @ 2018-07-27 13:29 UTC (permalink / raw)
To: openembedded-devel
From: André Draszik <andre.draszik@jci.com>
OpenJRE-8 seems like a good choice.
Signed-off-by: André Draszik <andre.draszik@jci.com>
---
conf/layer.conf | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/conf/layer.conf b/conf/layer.conf
index 8b2978a..e965170 100644
--- a/conf/layer.conf
+++ b/conf/layer.conf
@@ -17,3 +17,12 @@ SIGGEN_EXCLUDERECIPES_ABISAFE += "\
MULTI_PROVIDER_WHITELIST_append = " ${@' '.join('virtual/java'+str(x)+'-sdk-native virtual/java'+str(x)+'-runtime-native' for x in range(5,9))}"
MULTI_PROVIDER_WHITELIST_append = " ${@' '.join('virtual/java'+str(x)+'-runtime' for x in range(5,9))}"
+
+PREFERRED_PROVIDER_virtual/java5-runtime ?= "openjre-8"
+PREFERRED_PROVIDER_virtual/java6-runtime ?= "openjre-8"
+PREFERRED_PROVIDER_virtual/java7-runtime ?= "openjre-8"
+PREFERRED_PROVIDER_virtual/java8-runtime ?= "openjre-8"
+PREFERRED_RPROVIDER_virtual-java5-runtime ?= "openjre-8"
+PREFERRED_RPROVIDER_virtual-java6-runtime ?= "openjre-8"
+PREFERRED_RPROVIDER_virtual-java7-runtime ?= "openjre-8"
+PREFERRED_RPROVIDER_virtual-java8-runtime ?= "openjre-8"
--
2.18.0
^ permalink raw reply related [flat|nested] 16+ messages in thread
* Re: [meta-java][RFC][PATCH 5/7] layer.conf: set defaults for Java JRE (R)PROVIDERS
2018-07-27 13:29 ` [meta-java][RFC][PATCH 5/7] layer.conf: set defaults for Java JRE (R)PROVIDERS André Draszik
@ 2018-08-02 10:49 ` Richard Leitner
2018-08-09 7:53 ` André Draszik
0 siblings, 1 reply; 16+ messages in thread
From: Richard Leitner @ 2018-08-02 10:49 UTC (permalink / raw)
To: André Draszik, openembedded-devel
Hi André,
On 07/27/2018 03:29 PM, André Draszik wrote:
> From: André Draszik <andre.draszik@jci.com>
>
> OpenJRE-8 seems like a good choice.
I'm not sure if OpenJRE-8 is the best choice as it currently doesn't support JIT for
arm architectures...
Maybe openjdk-7-jre would be better here?
Furthermore as already mentioned in PATCH 1 IMHO it would be great to describe/document those PROVIDERs in the README.
This would help newcomers a lot.
>
> Signed-off-by: André Draszik <andre.draszik@jci.com>
> ---
> conf/layer.conf | 9 +++++++++
> 1 file changed, 9 insertions(+)
>
> diff --git a/conf/layer.conf b/conf/layer.conf
> index 8b2978a..e965170 100644
> --- a/conf/layer.conf
> +++ b/conf/layer.conf
> @@ -17,3 +17,12 @@ SIGGEN_EXCLUDERECIPES_ABISAFE += "\
>
> MULTI_PROVIDER_WHITELIST_append = " ${@' '.join('virtual/java'+str(x)+'-sdk-native virtual/java'+str(x)+'-runtime-native' for x in range(5,9))}"
> MULTI_PROVIDER_WHITELIST_append = " ${@' '.join('virtual/java'+str(x)+'-runtime' for x in range(5,9))}"
> +
> +PREFERRED_PROVIDER_virtual/java5-runtime ?= "openjre-8"
> +PREFERRED_PROVIDER_virtual/java6-runtime ?= "openjre-8"
> +PREFERRED_PROVIDER_virtual/java7-runtime ?= "openjre-8"
> +PREFERRED_PROVIDER_virtual/java8-runtime ?= "openjre-8"
> +PREFERRED_RPROVIDER_virtual-java5-runtime ?= "openjre-8"
> +PREFERRED_RPROVIDER_virtual-java6-runtime ?= "openjre-8"
> +PREFERRED_RPROVIDER_virtual-java7-runtime ?= "openjre-8"
> +PREFERRED_RPROVIDER_virtual-java8-runtime ?= "openjre-8"
>
regards;Richard.L
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [meta-java][RFC][PATCH 5/7] layer.conf: set defaults for Java JRE (R)PROVIDERS
2018-08-02 10:49 ` Richard Leitner
@ 2018-08-09 7:53 ` André Draszik
0 siblings, 0 replies; 16+ messages in thread
From: André Draszik @ 2018-08-09 7:53 UTC (permalink / raw)
To: Richard Leitner, openembedded-devel
On Thu, 2018-08-02 at 12:49 +0200, Richard Leitner wrote:
> Hi André,
>
> On 07/27/2018 03:29 PM, André Draszik wrote:
> > From: André Draszik <andre.draszik@jci.com>
> >
> > OpenJRE-8 seems like a good choice.
>
> I'm not sure if OpenJRE-8 is the best choice as it currently doesn't
> support JIT for
> arm architectures...
Oh, thanks. I didn't realise that...
Anybody know why? Just nobody interested enough so far to integrate the
aarch32 hotspot port into meta-java?
Cheers,
Andre'
^ permalink raw reply [flat|nested] 16+ messages in thread
* [meta-java][RFC][PATCH 6/7] openjdk-7: (R)PROVIDE virtual Java [567] packages
2018-07-27 13:29 [meta-java][RFC][PATCH 1/7] openjdk-8-native: add meaningful (R)PROVIDES André Draszik
` (3 preceding siblings ...)
2018-07-27 13:29 ` [meta-java][RFC][PATCH 5/7] layer.conf: set defaults for Java JRE (R)PROVIDERS André Draszik
@ 2018-07-27 13:29 ` André Draszik
2018-08-02 10:43 ` Richard Leitner
2018-07-27 13:29 ` [meta-java][RFC][PATCH 7/7] ca-certificates-java: switch to more generic / more correct JAVA (R)DEPENDS André Draszik
2018-08-02 10:38 ` [meta-java][RFC][PATCH 1/7] openjdk-8-native: add meaningful (R)PROVIDES Richard Leitner
6 siblings, 1 reply; 16+ messages in thread
From: André Draszik @ 2018-07-27 13:29 UTC (permalink / raw)
To: openembedded-devel
From: André Draszik <andre.draszik@jci.com>
Similar to OpenJDK-8, OpenJDK-7 is a provider of Java 5 through 7
(including).
Signed-off-by: André Draszik <andre.draszik@jci.com>
---
recipes-core/openjdk/openjdk-7-common.inc | 2 ++
1 file changed, 2 insertions(+)
diff --git a/recipes-core/openjdk/openjdk-7-common.inc b/recipes-core/openjdk/openjdk-7-common.inc
index 1ac3154..85a34da 100644
--- a/recipes-core/openjdk/openjdk-7-common.inc
+++ b/recipes-core/openjdk/openjdk-7-common.inc
@@ -22,6 +22,7 @@ JDK_DIR = "java-7-openjdk"
PN = "${JDKPN}-jre"
PROVIDES += "${JDKPN}"
+PROVIDES += "${@' '.join('virtual/java'+str(x)+'-sdk virtual/java'+str(x)+'-runtime' for x in range(5,8))}"
DEPENDS = " \
icedtea7-native zip-native ant-native \
@@ -283,6 +284,7 @@ FILES_${JDKPN}-jdk = " \
RDEPENDS_${JDKPN}-jre = "${JDKPN}-java ${JDKPN}-common"
RDEPENDS_${JDKPN}-java = "${JDKPN}-common"
RPROVIDES_${JDKPN}-jre = "java2-runtime"
+RPROVIDES_${JDKPN}-jre += "${@' '.join('virtual-java'+str(x)+'-runtime' for x in range(5,8))}"
RDEPENDS_${JDKPN}-jdk = "${JDKPN}-jre"
--
2.18.0
^ permalink raw reply related [flat|nested] 16+ messages in thread
* Re: [meta-java][RFC][PATCH 6/7] openjdk-7: (R)PROVIDE virtual Java [567] packages
2018-07-27 13:29 ` [meta-java][RFC][PATCH 6/7] openjdk-7: (R)PROVIDE virtual Java [567] packages André Draszik
@ 2018-08-02 10:43 ` Richard Leitner
0 siblings, 0 replies; 16+ messages in thread
From: Richard Leitner @ 2018-08-02 10:43 UTC (permalink / raw)
To: André Draszik, openembedded-devel
Hi André,
again: thank you and feel free to add
Acked-by: Richard Leitner <richard.leitner@skidata.com>
regards;Richard.L
On 07/27/2018 03:29 PM, André Draszik wrote:
> From: André Draszik <andre.draszik@jci.com>
>
> Similar to OpenJDK-8, OpenJDK-7 is a provider of Java 5 through 7
> (including).
>
> Signed-off-by: André Draszik <andre.draszik@jci.com>
> ---
> recipes-core/openjdk/openjdk-7-common.inc | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/recipes-core/openjdk/openjdk-7-common.inc b/recipes-core/openjdk/openjdk-7-common.inc
> index 1ac3154..85a34da 100644
> --- a/recipes-core/openjdk/openjdk-7-common.inc
> +++ b/recipes-core/openjdk/openjdk-7-common.inc
> @@ -22,6 +22,7 @@ JDK_DIR = "java-7-openjdk"
>
> PN = "${JDKPN}-jre"
> PROVIDES += "${JDKPN}"
> +PROVIDES += "${@' '.join('virtual/java'+str(x)+'-sdk virtual/java'+str(x)+'-runtime' for x in range(5,8))}"
>
> DEPENDS = " \
> icedtea7-native zip-native ant-native \
> @@ -283,6 +284,7 @@ FILES_${JDKPN}-jdk = " \
> RDEPENDS_${JDKPN}-jre = "${JDKPN}-java ${JDKPN}-common"
> RDEPENDS_${JDKPN}-java = "${JDKPN}-common"
> RPROVIDES_${JDKPN}-jre = "java2-runtime"
> +RPROVIDES_${JDKPN}-jre += "${@' '.join('virtual-java'+str(x)+'-runtime' for x in range(5,8))}"
>
> RDEPENDS_${JDKPN}-jdk = "${JDKPN}-jre"
>
>
^ permalink raw reply [flat|nested] 16+ messages in thread
* [meta-java][RFC][PATCH 7/7] ca-certificates-java: switch to more generic / more correct JAVA (R)DEPENDS
2018-07-27 13:29 [meta-java][RFC][PATCH 1/7] openjdk-8-native: add meaningful (R)PROVIDES André Draszik
` (4 preceding siblings ...)
2018-07-27 13:29 ` [meta-java][RFC][PATCH 6/7] openjdk-7: (R)PROVIDE virtual Java [567] packages André Draszik
@ 2018-07-27 13:29 ` André Draszik
2018-08-02 10:44 ` Richard Leitner
2019-02-07 3:01 ` Kyle Russell
2018-08-02 10:38 ` [meta-java][RFC][PATCH 1/7] openjdk-8-native: add meaningful (R)PROVIDES Richard Leitner
6 siblings, 2 replies; 16+ messages in thread
From: André Draszik @ 2018-07-27 13:29 UTC (permalink / raw)
To: openembedded-devel
From: André Draszik <andre.draszik@jci.com>
This recipe here actually depends on Java7 upwards, not Java2 upwards,
so state that dependency correctly using the newly introduced (virtual)
RPROVIDES of the OpenJDK8/OpenJRE8 recipes.
At the same time, we can remove hard-coded references to openjdk-8 and
openjre-8, and thusly make the build more flexible.
Signed-off-by: André Draszik <andre.draszik@jci.com>
---
.../ca-certificates-java_20180516.bb | 10 ++--------
1 file changed, 2 insertions(+), 8 deletions(-)
diff --git a/recipes-core/ca-certificates-java/ca-certificates-java_20180516.bb b/recipes-core/ca-certificates-java/ca-certificates-java_20180516.bb
index a2d7abd..2ae7352 100644
--- a/recipes-core/ca-certificates-java/ca-certificates-java_20180516.bb
+++ b/recipes-core/ca-certificates-java/ca-certificates-java_20180516.bb
@@ -14,7 +14,7 @@ DEPENDS = "virtual/javac-native fastjar-native"
# We can't use virtual/javac-native, because that would create a
# keystore that can't be read on the target (as virtual/javac-native
# usually is either too old, or plain incompatible with this)
-PACKAGE_WRITE_DEPS += "openjdk-8-native"
+PACKAGE_WRITE_DEPS += "virtual/java7-runtime-native"
SRC_URI = "\
git://salsa.debian.org/java-team/ca-certificates-java.git \
@@ -31,12 +31,6 @@ B = "${WORKDIR}/build"
JARFILENAME = "${BPN}.jar"
-python () {
- runtime = d.getVar("PREFERRED_RPROVIDER_java2-runtime") or ""
- if not runtime in ("openjdk-8", "openjre-8"):
- raise bb.parse.SkipRecipe("PREFERRED_RPROVIDER_java2-runtime '%s' unsupported" % runtime)
-}
-
do_patch_append () {
bb.build.exec_func('do_fix_sysconfdir', d)
}
@@ -99,7 +93,7 @@ pkg_postinst_${PN} () {
}
RDEPENDS_${PN} = "ca-certificates"
-RDEPENDS_${PN}_append_class-target = " java2-runtime"
+RDEPENDS_${PN}_append_class-target = " virtual-java7-runtime"
FILES_${PN} += "${datadir_java}"
--
2.18.0
^ permalink raw reply related [flat|nested] 16+ messages in thread
* Re: [meta-java][RFC][PATCH 7/7] ca-certificates-java: switch to more generic / more correct JAVA (R)DEPENDS
2018-07-27 13:29 ` [meta-java][RFC][PATCH 7/7] ca-certificates-java: switch to more generic / more correct JAVA (R)DEPENDS André Draszik
@ 2018-08-02 10:44 ` Richard Leitner
2019-02-07 3:01 ` Kyle Russell
1 sibling, 0 replies; 16+ messages in thread
From: Richard Leitner @ 2018-08-02 10:44 UTC (permalink / raw)
To: André Draszik, openembedded-devel
Hi André,
again: thank you and feel free to add
Acked-by: Richard Leitner <richard.leitner@skidata.com>
regards;Richard.L
On 07/27/2018 03:29 PM, André Draszik wrote:
> From: André Draszik <andre.draszik@jci.com>
>
> This recipe here actually depends on Java7 upwards, not Java2 upwards,
> so state that dependency correctly using the newly introduced (virtual)
> RPROVIDES of the OpenJDK8/OpenJRE8 recipes.
>
> At the same time, we can remove hard-coded references to openjdk-8 and
> openjre-8, and thusly make the build more flexible.
>
> Signed-off-by: André Draszik <andre.draszik@jci.com>
> ---
> .../ca-certificates-java_20180516.bb | 10 ++--------
> 1 file changed, 2 insertions(+), 8 deletions(-)
>
> diff --git a/recipes-core/ca-certificates-java/ca-certificates-java_20180516.bb b/recipes-core/ca-certificates-java/ca-certificates-java_20180516.bb
> index a2d7abd..2ae7352 100644
> --- a/recipes-core/ca-certificates-java/ca-certificates-java_20180516.bb
> +++ b/recipes-core/ca-certificates-java/ca-certificates-java_20180516.bb
> @@ -14,7 +14,7 @@ DEPENDS = "virtual/javac-native fastjar-native"
> # We can't use virtual/javac-native, because that would create a
> # keystore that can't be read on the target (as virtual/javac-native
> # usually is either too old, or plain incompatible with this)
> -PACKAGE_WRITE_DEPS += "openjdk-8-native"
> +PACKAGE_WRITE_DEPS += "virtual/java7-runtime-native"
>
> SRC_URI = "\
> git://salsa.debian.org/java-team/ca-certificates-java.git \
> @@ -31,12 +31,6 @@ B = "${WORKDIR}/build"
>
> JARFILENAME = "${BPN}.jar"
>
> -python () {
> - runtime = d.getVar("PREFERRED_RPROVIDER_java2-runtime") or ""
> - if not runtime in ("openjdk-8", "openjre-8"):
> - raise bb.parse.SkipRecipe("PREFERRED_RPROVIDER_java2-runtime '%s' unsupported" % runtime)
> -}
> -
> do_patch_append () {
> bb.build.exec_func('do_fix_sysconfdir', d)
> }
> @@ -99,7 +93,7 @@ pkg_postinst_${PN} () {
> }
>
> RDEPENDS_${PN} = "ca-certificates"
> -RDEPENDS_${PN}_append_class-target = " java2-runtime"
> +RDEPENDS_${PN}_append_class-target = " virtual-java7-runtime"
>
> FILES_${PN} += "${datadir_java}"
>
>
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [meta-java][RFC][PATCH 7/7] ca-certificates-java: switch to more generic / more correct JAVA (R)DEPENDS
2018-07-27 13:29 ` [meta-java][RFC][PATCH 7/7] ca-certificates-java: switch to more generic / more correct JAVA (R)DEPENDS André Draszik
2018-08-02 10:44 ` Richard Leitner
@ 2019-02-07 3:01 ` Kyle Russell
1 sibling, 0 replies; 16+ messages in thread
From: Kyle Russell @ 2019-02-07 3:01 UTC (permalink / raw)
To: André Draszik; +Cc: openembedded-devel
On Fri, Jul 27, 2018 at 9:29 AM André Draszik <git@andred.net> wrote:
> From: André Draszik <andre.draszik@jci.com>
>
> This recipe here actually depends on Java7 upwards, not Java2 upwards,
> so state that dependency correctly using the newly introduced (virtual)
> RPROVIDES of the OpenJDK8/OpenJRE8 recipes.
>
> At the same time, we can remove hard-coded references to openjdk-8 and
> openjre-8, and thusly make the build more flexible.
>
> Signed-off-by: André Draszik <andre.draszik@jci.com>
> ---
> .../ca-certificates-java_20180516.bb | 10 ++--------
> 1 file changed, 2 insertions(+), 8 deletions(-)
>
> diff --git a/recipes-core/ca-certificates-java/
> ca-certificates-java_20180516.bb b/recipes-core/ca-certificates-java/
> ca-certificates-java_20180516.bb
> index a2d7abd..2ae7352 100644
> --- a/recipes-core/ca-certificates-java/ca-certificates-java_20180516.bb
> +++ b/recipes-core/ca-certificates-java/ca-certificates-java_20180516.bb
> @@ -14,7 +14,7 @@ DEPENDS = "virtual/javac-native fastjar-native"
>
Should this DEPEND on virtual/java7-sdk-native instead?
# We can't use virtual/javac-native, because that would create a
> # keystore that can't be read on the target (as virtual/javac-native
> # usually is either too old, or plain incompatible with this)
> -PACKAGE_WRITE_DEPS += "openjdk-8-native"
> +PACKAGE_WRITE_DEPS += "virtual/java7-runtime-native"
>
Would you still need the PACKAGE_WRITE_DEPS if the DEPENDS above was
changed? I thought virtual/javac-native was "too old" because it was
reserved for the bootstrap process, so I've been considering it as a
special case.
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [meta-java][RFC][PATCH 1/7] openjdk-8-native: add meaningful (R)PROVIDES
2018-07-27 13:29 [meta-java][RFC][PATCH 1/7] openjdk-8-native: add meaningful (R)PROVIDES André Draszik
` (5 preceding siblings ...)
2018-07-27 13:29 ` [meta-java][RFC][PATCH 7/7] ca-certificates-java: switch to more generic / more correct JAVA (R)DEPENDS André Draszik
@ 2018-08-02 10:38 ` Richard Leitner
6 siblings, 0 replies; 16+ messages in thread
From: Richard Leitner @ 2018-08-02 10:38 UTC (permalink / raw)
To: openembedded-devel; +Cc: André Draszik
Hi André,
thanks for the patches!
Some comments from my side:
A cover letter describing the purpose of the whole patchset would be great ;-)
Furthermore IMHO the -runtime-native and -sdk-native providers should be documented/described in the README file.
Otherwise feel free to add
Acked-by: Richard Leitner <richard.leitner@skidata.com>
for this patch.
regards;Richard.L
On 07/27/2018 03:29 PM, André Draszik wrote:
> From: André Draszik <andre.draszik@jci.com>
>
> The OpenJDK8-native recipe provides a Java SDK, and a Java Runtime. It
> is compatible with Java versions 5 through 8 (including), so add
> appropriate (R)PROVIDES, so that recipes depending on it can can specify
> that virtual dependency, rather than hard-coding to openjdk-8. This makes
> it possible to:
> a) add OpenJDK9 and OpenJDK10 recipes in the future without much disruption
> b) use a different provider than OpenJDK, e.g. Oracle Java, or Zulu Java
>
> This is the approach taken by e.g. Debian.
>
> Signed-off-by: André Draszik <andre.draszik@jci.com>
> ---
> recipes-core/openjdk/openjdk-8-native.inc | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/recipes-core/openjdk/openjdk-8-native.inc b/recipes-core/openjdk/openjdk-8-native.inc
> index 761ddc7..2dd31e7 100644
> --- a/recipes-core/openjdk/openjdk-8-native.inc
> +++ b/recipes-core/openjdk/openjdk-8-native.inc
> @@ -87,3 +87,6 @@ do_install() {
> ln -sf "../lib/jvm/${JDK_DIR}/bin/$tool" ${D}${bindir}/$tool
> done
> }
> +
> +PROVIDES = "${@' '.join('virtual/java'+str(x)+'-sdk-native virtual/java'+str(x)+'-runtime-native' for x in range(5,9))}"
> +RPROVIDES_${PN} = "${@' '.join('virtual-java'+str(x)+'-sdk-native virtual-java'+str(x)+'-runtime-native' for x in range(5,9))}"
>
^ permalink raw reply [flat|nested] 16+ messages in thread