<patch patchfile="${project.build.directory}/assembly/patches/karaf-instance.bat.patch"
originalfile="${project.build.directory}/assembly/bin/instance.bat"
failonerror="true" ignorewhitespace="true"/>
- <patch patchfile="${project.build.directory}/assembly/patches/karaf-karaf.patch"
+ <patch patchfile="${project.build.directory}/assembly/patches/karaf-karaf-${karaf4.version}.patch"
originalfile="${project.build.directory}/assembly/bin/karaf"
failonerror="true"/>
<patch patchfile="${project.build.directory}/assembly/patches/karaf-karaf.bat.patch"
originalfile="${project.build.directory}/assembly/bin/karaf.bat"
failonerror="true"/>
- <patch patchfile="${project.build.directory}/assembly/patches/karaf-setenv.patch"
+ <patch patchfile="${project.build.directory}/assembly/patches/karaf-setenv-${karaf4.version}.patch"
originalfile="${project.build.directory}/assembly/bin/setenv"
failonerror="true"/>
<patch patchfile="${project.build.directory}/assembly/patches/karaf-setenv.bat.patch"
originalfile="${project.build.directory}/assembly/bin/setenv.bat"
failonerror="true"/>
- <patch patchfile="${project.build.directory}/assembly/patches/karaf-quiesce-4.0.7.patch"
- originalfile="${project.build.directory}/assembly/system/org/apache/karaf/features/standard/4.0.7/standard-4.0.7-features.xml"
+ <patch patchfile="${project.build.directory}/assembly/patches/karaf-quiesce-${karaf4.version}.patch"
+ originalfile="${project.build.directory}/assembly/system/org/apache/karaf/features/standard/${karaf4.version}/standard-${karaf4.version}-features.xml"
failonerror="true"/>
- <patch patchfile="${project.build.directory}/assembly/patches/karaf-javax-mail.patch"
- originalfile="${project.build.directory}/assembly/system/org/apache/karaf/features/standard/4.0.7/standard-4.0.7-features.xml"
+ <patch patchfile="${project.build.directory}/assembly/patches/karaf-javax-mail-${karaf4.version}.patch"
+ originalfile="${project.build.directory}/assembly/system/org/apache/karaf/features/standard/${karaf4.version}/standard-${karaf4.version}-features.xml"
failonerror="true"/>
<fixcrlf srcdir="${project.build.directory}/assembly/bin"
includes="*.bat" eol="crlf"/>
--- /dev/null
+--- system/org/apache/karaf/features/standard/4.0.9/standard-4.0.9-features.xml 2017-02-13 15:13:43.895825491 +0100
++++ system/org/apache/karaf/features/standard/4.0.9/standard-4.0.9-features.xml 2017-02-13 15:40:10.593825491 +0100
+@@ -316,7 +316,7 @@
+ <feature name="jetty" version="8.1.14.v20131031">
+ <bundle start-level="30" dependency="true">mvn:org.apache.servicemix.specs/org.apache.servicemix.specs.activation-api-1.1/2.7.0</bundle>
+ <bundle start-level="30" dependency="true">mvn:javax.servlet/javax.servlet-api/3.1.0</bundle>
+- <bundle start-level="30" dependency="true">mvn:javax.mail/mail/1.4.5</bundle>
++ <bundle start-level="30" dependency="true">mvn:javax.mail/mail/1.4.4</bundle>
+ <bundle start-level="30" dependency="true">mvn:org.apache.geronimo.specs/geronimo-jta_1.1_spec/1.1.1</bundle>
+ <bundle start-level="30" dependency="true">mvn:org.apache.geronimo.specs/geronimo-annotation_1.1_spec/1.0.1</bundle>
+ <bundle start-level="30" dependency="true">mvn:org.apache.geronimo.specs/geronimo-jaspic_1.0_spec/1.1</bundle>
--- /dev/null
+--- bin/karaf.orig 2017-04-07 10:30:36.660612690 +0200
++++ bin/karaf 2017-04-07 10:52:05.728046790 +0200
+@@ -260,8 +260,8 @@
+ if [ "x${VERSION}" = "x" ]; then
+ VERSION=90
+ fi
+- if [ "${VERSION}" -lt "60" ]; then
+- echo "JVM must be greater than 1.6"
++ if [ "${VERSION}" -lt "80" ]; then
++ echo "JVM must be greater than 1.8"
+ exit 1;
+ fi
+ }
+@@ -300,6 +300,7 @@
+
+ setupDefaults() {
+ DEFAULT_JAVA_OPTS="-Xms${JAVA_MIN_MEM} -Xmx${JAVA_MAX_MEM} -XX:+UnlockDiagnosticVMOptions -XX:+UnsyncloadClass "
++ DEFAULT_JAVA_OPTS="$DEFAULT_JAVA_OPTS -XX:+HeapDumpOnOutOfMemoryError"
+
+ #Set the JVM_VENDOR specific JVM flags
+ if [ "${JVM_VENDOR}" = "SUN" ]; then
+@@ -328,6 +329,13 @@
+ fi
+ fi
+
++ # Add default security file option
++ if [ "x$ODL_JAVA_SECURITY_PROPERTIES" != "x" ]; then
++ DEFAULT_JAVA_OPTS="-Djava.security.properties="${ODL_JAVA_SECURITY_PROPERTIES}" $DEFAULT_JAVA_OPTS"
++ else
++ DEFAULT_JAVA_OPTS="-Djava.security.properties="${KARAF_ETC}/odl.java.security" $DEFAULT_JAVA_OPTS"
++ fi
++
+ # Add the jars in the lib dir
+ for file in "${KARAF_HOME}"/lib/boot/*.jar
+ do
+@@ -483,6 +491,13 @@
+ KARAF_EXEC=""
+ fi
+
++ # Use /dev/urandom to avoid blocking on /dev/random
++ # See http://www.2uo.de/myths-about-urandom/ to understand why this is safe (as long as your VM provisioning seeds
++ # the PRNG)
++ # The /dev/./urandom workaround is necessary because of https://bugs.openjdk.java.net/browse/JDK-6202721
++ NON_BLOCKING_PRNG=
++ [ -c /dev/urandom -a -r /dev/urandom ] && NON_BLOCKING_PRNG=-Djava.security.egd=file:/dev/./urandom
++
+ while true; do
+ # When users want to update the lib version of, they just need to create
+ # a lib.next directory and on the new restart, it will replace the current lib directory.
+@@ -499,8 +514,12 @@
+ fi
+
+ if [ "${ROOT_INSTANCE_RUNNING}" = "false" ] || [ "${CHECK_ROOT_INSTANCE_RUNNING}" = "false" ] ; then
++ # Using command line arguments as java arguments
++ # (as opposed to arguments for $MAIN)
++ # FIXME: document this in the user guide
+ if [ "${VERSION}" -gt "80" ]; then
+ ${KARAF_EXEC} "${JAVA}" ${JAVA_OPTS} \
++ "$NON_BLOCKING_PRNG" \
+ --add-exports=java.base/sun.net.www.protocol.http=ALL-UNNAMED \
+ --add-exports=java.base/sun.net.www.protocol.https=ALL-UNNAMED \
+ --add-exports=java.base/sun.net.www.protocol.jar=ALL-UNNAMED \
+@@ -519,10 +538,12 @@
+ ${KARAF_SYSTEM_OPTS} \
+ ${KARAF_OPTS} \
+ ${OPTS} \
++ "$@" \
+ -classpath "${CLASSPATH}" \
+- ${MAIN} "$@"
++ ${MAIN}
+ else
+ ${KARAF_EXEC} "${JAVA}" ${JAVA_OPTS} \
++ "$NON_BLOCKING_PRNG" \
+ -Djava.endorsed.dirs="${JAVA_ENDORSED_DIRS}" \
+ -Djava.ext.dirs="${JAVA_EXT_DIRS}" \
+ -Dkaraf.instances="${KARAF_HOME}/instances" \
+@@ -536,8 +557,9 @@
+ ${KARAF_SYSTEM_OPTS} \
+ ${KARAF_OPTS} \
+ ${OPTS} \
++ "$@" \
+ -classpath "${CLASSPATH}" \
+- ${MAIN} "$@"
++ ${MAIN}
+ fi
+ else
+ die "There is a Root instance already running with name ${ROOT_INSTANCE_NAME} and pid ${ROOT_INSTANCE_PID}"
--- /dev/null
+--- system/org/apache/karaf/features/standard/4.0.9/standard-4.0.9-features.xml 2017-01-10 16:50:18.000000000 +0100
++++ system/org/apache/karaf/features/standard/4.0.9/standard-4.0.9-features.xml 2017-02-06 07:51:32.804000000 +0100
+@@ -24,6 +24,7 @@
+ <bundle start-level="20">mvn:org.apache.aries.blueprint/org.apache.aries.blueprint.cm/1.0.9</bundle>
+ <bundle start-level="20">mvn:org.apache.aries.blueprint/org.apache.aries.blueprint.core.compatibility/1.0.0</bundle>
+ <bundle start-level="20">mvn:org.apache.aries.blueprint/org.apache.aries.blueprint.core/1.7.1</bundle>
++ <bundle start-level="20">mvn:org.apache.aries.quiesce/org.apache.aries.quiesce.api/1.0.0</bundle>
+ <conditional>
+ <condition>bundle</condition>
+ <bundle start-level="30">mvn:org.apache.karaf.bundle/org.apache.karaf.bundle.blueprintstate/4.0.9</bundle>
+++ /dev/null
---- bin/setenv 2016-10-27 16:23:51.966147872 +0200
-+++ bin/setenv 2016-10-03 13:48:22.841563465 +0200
-@@ -48,4 +48,6 @@
- # export KARAF_OPTS # Additional available Karaf options
- # export KARAF_DEBUG # Enable debug mode
- # export KARAF_REDIRECT # Enable/set the std/err redirection when using bin/start
--
-+if [ "x$JAVA_MAX_MEM" = "x" ]; then
-+ export JAVA_MAX_MEM="2048m"
-+fi
<!-- Used in aaa, controller, coretutorials, integration/distribution, l2switch, lacp, lispflowmapping, netide,
nic, openflowplugin, ovsdb, persistence, sfc, snbi, snmp4sdn?, sxp, topoprocessing, unimgr, vtn -->
<karaf.version>3.0.8</karaf.version>
- <karaf4.version>4.0.7</karaf4.version>
- <karaf4.plugin.version>4.0.8-odl</karaf4.plugin.version>
+ <karaf4.version>4.0.9</karaf4.version>
+ <karaf4.plugin.version>4.0.9</karaf4.plugin.version>
<!-- Used in lispflowmapping, snmp4sdn, vtn -->
<projectinfo>2.8.1</projectinfo>
<!-- Used in of-config; see also snmp4sdn -->