Skip to content

Commit

Permalink
Upgrade to Karaf 4.3.6 (#1363)
Browse files Browse the repository at this point in the history
* Syncs distro customizations with Karaf 4.3.6
* Resolves app runbundles for the new dependencies
* Undos the featuresProcessing for using Pax Logging 2.0.13 (#1354)

For release notes, see:

https://issues.apache.org/jira/secure/ReleaseNote.jspa?projectId=12311140&version=12351123

Karaf 4.3.6 uses Pax Logging 2.0.14 (with Log4j 2.17.1) which fixes CVE-2021-44832.

Signed-off-by: Wouter Born <[email protected]>
  • Loading branch information
wborn authored Jan 16, 2022
1 parent 995fe61 commit 4464ec7
Show file tree
Hide file tree
Showing 8 changed files with 9 additions and 28 deletions.
1 change: 0 additions & 1 deletion distributions/openhab/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,6 @@
<startupFeatures>
<feature>eventadmin</feature>
</startupFeatures>
<featuresProcessing>${basedir}/processing.xml</featuresProcessing>
<bootFeatures>
<feature>jaas</feature>
<feature>shell</feature>
Expand Down
10 changes: 0 additions & 10 deletions distributions/openhab/processing.xml

This file was deleted.

3 changes: 0 additions & 3 deletions distributions/openhab/src/main/descriptors/archive.xml
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,6 @@
<include>system/**</include>
<include>bin/*.lst</include>
</includes>
<excludes>
<exclude>system/org/ops4j/pax/logging/*/2.0.12/**</exclude>
</excludes>
<!-- specifically fixes https://github.com/openhab/openhab-distro/issues/503 -->
<fileMode>0644</fileMode>
</fileSet>
Expand Down
4 changes: 2 additions & 2 deletions distributions/openhab/src/main/resources/bin/karaf
Original file line number Diff line number Diff line change
Expand Up @@ -301,8 +301,8 @@ run() {
${KARAF_EXEC} "${JAVA}" ${JAVA_OPTS} \
--add-reads=java.xml=java.logging \
--add-exports=java.base/org.apache.karaf.specs.locator=java.xml,ALL-UNNAMED \
--patch-module "java.base=${KARAF_HOME}/lib/endorsed/org.apache.karaf.specs.locator-4.3.4.jar" \
--patch-module "java.xml=${KARAF_HOME}/lib/endorsed/org.apache.karaf.specs.java.xml-4.3.4.jar" \
--patch-module "java.base=${KARAF_HOME}/lib/endorsed/org.apache.karaf.specs.locator-4.3.6.jar" \
--patch-module "java.xml=${KARAF_HOME}/lib/endorsed/org.apache.karaf.specs.java.xml-4.3.6.jar" \
--add-opens java.base/java.security=ALL-UNNAMED \
--add-opens java.base/java.net=ALL-UNNAMED \
--add-opens java.base/java.lang=ALL-UNNAMED \
Expand Down
4 changes: 2 additions & 2 deletions distributions/openhab/src/main/resources/bin/karaf.bat
Original file line number Diff line number Diff line change
Expand Up @@ -407,8 +407,8 @@ if "%KARAF_PROFILER%" == "" goto :RUN
"%JAVA%" %JAVA_OPTS% %OPTS% ^
--add-reads=java.xml=java.logging ^
--add-exports=java.base/org.apache.karaf.specs.locator=java.xml,ALL-UNNAMED ^
--patch-module "java.base=%KARAF_HOME%/lib/endorsed/org.apache.karaf.specs.locator-4.3.4.jar" ^
--patch-module "java.xml=%KARAF_HOME%/lib/endorsed/org.apache.karaf.specs.java.xml-4.3.4.jar" ^
--patch-module "java.base=%KARAF_HOME%/lib/endorsed/org.apache.karaf.specs.locator-4.3.6.jar" ^
--patch-module "java.xml=%KARAF_HOME%/lib/endorsed/org.apache.karaf.specs.java.xml-4.3.6.jar" ^
--add-opens java.base/java.security=ALL-UNNAMED ^
--add-opens java.base/java.net=ALL-UNNAMED ^
--add-opens java.base/java.lang=ALL-UNNAMED ^
Expand Down
5 changes: 0 additions & 5 deletions launch/app/.classpath
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,6 @@
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="src" output="target/test-classes" path="src/test/java">
<attributes>
<attribute name="optional" value="true"/>
Expand Down
8 changes: 4 additions & 4 deletions launch/app/app.bndrun
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,8 @@ feature.openhab-model-runtime-all: \
# done
#
-runbundles: \
org.ops4j.pax.logging.pax-logging-api;version='[2.0.12,2.0.13)',\
org.ops4j.pax.logging.pax-logging-log4j2;version='[2.0.12,2.0.13)',\
org.ops4j.pax.logging.pax-logging-api;version='[2.0.14,2.0.15)',\
org.ops4j.pax.logging.pax-logging-log4j2;version='[2.0.14,2.0.15)',\
com.fasterxml.jackson.core.jackson-annotations;version='[2.12.5,2.12.6)',\
com.fasterxml.jackson.core.jackson-core;version='[2.12.5,2.12.6)',\
com.fasterxml.jackson.core.jackson-databind;version='[2.12.5,2.12.6)',\
Expand Down Expand Up @@ -170,8 +170,8 @@ feature.openhab-model-runtime-all: \
org.apache.servicemix.specs.jaxb-api-2.3;version='[2.3.0,2.3.1)',\
org.apache.servicemix.specs.stax-api-1.0;version='[2.9.0,2.9.1)',\
org.apache.ws.xmlschema.core;version='[2.2.5,2.2.6)',\
org.apache.xbean.bundleutils;version='[4.19.0,4.19.1)',\
org.apache.xbean.finder;version='[4.19.0,4.19.1)',\
org.apache.xbean.bundleutils;version='[4.20.0,4.20.1)',\
org.apache.xbean.finder;version='[4.20.0,4.20.1)',\
org.bitbucket.b_c.jose4j;version='[0.7.7,0.7.8)',\
org.eclipse.emf.common;version='[2.17.0,2.17.1)',\
org.eclipse.emf.ecore;version='[2.20.0,2.20.1)',\
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
<ohc.version>3.3.0-SNAPSHOT</ohc.version>
<oha.version>3.3.0-SNAPSHOT</oha.version>

<karaf.version>4.3.4</karaf.version>
<karaf.version>4.3.6</karaf.version>

<oh.java.version>11</oh.java.version>
<maven.compiler.source>${oh.java.version}</maven.compiler.source>
Expand Down

0 comments on commit 4464ec7

Please sign in to comment.