Some java applications (like apache derby or elasticsearch) require at least 
Java 8 JRE.
To that end this patch introduces new alias 'java8' to enforce that build image
command includes a jdk app (for example openjdk8-zull-full) like so:

./scripts/build image=openjdk8-zulu-full,elasticsearch

On the java app module.py has to express java8 dependency like so:

api.require('java8')

On jdk app size providing java capability is has to do so like this:

provides = ['java','java8']

This patch marks all openjdk8-* apps as java8 capable and also
modifies module.py of apache derby and elasticsearch to require java8.

Fixes #947.

Signed-off-by: Waldemar Kozaczuk <jwkozac...@gmail.com>
---
 apache-derby/module.py                           | 2 +-
 elasticsearch/module.py                          | 2 +-
 openjdk8-fedora/module.py                        | 2 +-
 openjdk8-zulu-compact1/module.py                 | 2 +-
 openjdk8-zulu-compact2/module.py                 | 2 +-
 openjdk8-zulu-compact3-with-java-beans/module.py | 2 +-
 openjdk8-zulu-compact3/module.py                 | 2 +-
 openjdk8-zulu-full/module.py                     | 2 +-
 openjdk9-java-base/module.py                     | 2 +-
 9 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/apache-derby/module.py b/apache-derby/module.py
index 78e9209..23ae4c3 100644
--- a/apache-derby/module.py
+++ b/apache-derby/module.py
@@ -1,6 +1,6 @@
 from osv.modules import api
 
-api.require('java')
+api.require('java8')
 
 _classpath = ["/db-derby/lib/derby.jar", "/db-derby/lib/derbynet.jar", 
"/db-derby/lib/derbytools.jar", "/db-derby/lib/derbyclient.jar"]
 _args = ["-Djava.security.policy=/db-derby/security.policy", 
"org.apache.derby.drda.NetworkServerControl", "start"]
diff --git a/elasticsearch/module.py b/elasticsearch/module.py
index 2505345..d8a9d17 100644
--- a/elasticsearch/module.py
+++ b/elasticsearch/module.py
@@ -1,6 +1,6 @@
 from osv.modules import api
 
-api.require('java')
+api.require('java8')
 
 default = api.run(
 ' --cwd=/elasticsearch '
diff --git a/openjdk8-fedora/module.py b/openjdk8-fedora/module.py
index 17e54b8..9e1dbd4 100644
--- a/openjdk8-fedora/module.py
+++ b/openjdk8-fedora/module.py
@@ -8,7 +8,7 @@ from osv.modules.filemap import FileMap
 from osv.modules import api
 
 api.require('java-cmd')
-provides = ['java']
+provides = ['java','java8']
 
 usr_files = FileMap()
 
usr_files.add('${OSV_BASE}/apps/openjdk8-fedora/install').to('/').allow_symlink()
diff --git a/openjdk8-zulu-compact1/module.py b/openjdk8-zulu-compact1/module.py
index c831d58..f574c95 100644
--- a/openjdk8-zulu-compact1/module.py
+++ b/openjdk8-zulu-compact1/module.py
@@ -9,7 +9,7 @@ from osv.modules.filemap import FileMap
 from osv.modules import api
 
 api.require('java-non-isolated')
-provides = ['java']
+provides = ['java','java8']
 
 usr_files = FileMap()
 
usr_files.add('${OSV_BASE}/apps/openjdk8-zulu-compact1/install').to('/').allow_symlink()
diff --git a/openjdk8-zulu-compact2/module.py b/openjdk8-zulu-compact2/module.py
index 14f9806..ac00301 100644
--- a/openjdk8-zulu-compact2/module.py
+++ b/openjdk8-zulu-compact2/module.py
@@ -9,7 +9,7 @@ from osv.modules.filemap import FileMap
 from osv.modules import api
 
 api.require('java-non-isolated')
-provides = ['java']
+provides = ['java','java8']
 
 usr_files = FileMap()
 
usr_files.add('${OSV_BASE}/apps/openjdk8-zulu-compact2/install').to('/').allow_symlink()
diff --git a/openjdk8-zulu-compact3-with-java-beans/module.py 
b/openjdk8-zulu-compact3-with-java-beans/module.py
index cc4190a..eabe197 100644
--- a/openjdk8-zulu-compact3-with-java-beans/module.py
+++ b/openjdk8-zulu-compact3-with-java-beans/module.py
@@ -8,7 +8,7 @@ from osv.modules import api
 from osv.modules.filemap import FileMap
 
 api.require('java-cmd')
-provides = ['java']
+provides = ['java','java8']
 
 usr_files = FileMap()
 
usr_files.add('${OSV_BASE}/apps/openjdk8-zulu-compact3-with-java-beans/install').to('/').allow_symlink()
diff --git a/openjdk8-zulu-compact3/module.py b/openjdk8-zulu-compact3/module.py
index dd3399d..01d1e44 100644
--- a/openjdk8-zulu-compact3/module.py
+++ b/openjdk8-zulu-compact3/module.py
@@ -9,7 +9,7 @@ from osv.modules.filemap import FileMap
 from osv.modules import api
 
 api.require('java-non-isolated')
-provides = ['java']
+provides = ['java','java8']
 
 usr_files = FileMap()
 
usr_files.add('${OSV_BASE}/apps/openjdk8-zulu-compact3/install').to('/').allow_symlink()
diff --git a/openjdk8-zulu-full/module.py b/openjdk8-zulu-full/module.py
index 7019b2a..ce1cecc 100644
--- a/openjdk8-zulu-full/module.py
+++ b/openjdk8-zulu-full/module.py
@@ -9,7 +9,7 @@ from osv.modules.filemap import FileMap
 from osv.modules import api
 
 api.require('java-cmd')
-provides = ['java']
+provides = ['java','java8']
 
 usr_files = FileMap()
 
usr_files.add('${OSV_BASE}/apps/openjdk8-zulu-full/install').to('/').allow_symlink()
diff --git a/openjdk9-java-base/module.py b/openjdk9-java-base/module.py
index a8613fa..5a365e4 100644
--- a/openjdk9-java-base/module.py
+++ b/openjdk9-java-base/module.py
@@ -9,7 +9,7 @@ from osv.modules.filemap import FileMap
 from osv.modules import api
 
 api.require('java-non-isolated')
-provides = ['java']
+provides = ['java','java8','java9']
 
 usr_files = FileMap()
 
usr_files.add('${OSV_BASE}/apps/openjdk9-java-base/install').to('/').allow_symlink()
-- 
2.7.4

-- 
You received this message because you are subscribed to the Google Groups "OSv 
Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to osv-dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to