Skip to content

Commit

Permalink
Merge branch 'main' into twitter-x-notice
Browse files Browse the repository at this point in the history
  • Loading branch information
lsiepel committed Nov 24, 2023
2 parents 4d58715 + 0811429 commit 5907503
Show file tree
Hide file tree
Showing 33 changed files with 351 additions and 238 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
fail-fast: false
matrix:
java: [ '17' ]
maven: [ '3.8.6' ]
maven: [ '3.9.4' ]
os: [ 'ubuntu-22.04' ]
name: Build (Java ${{ matrix.java }}, ${{ matrix.os }})
runs-on: ${{ matrix.os }}
Expand Down
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
[![GitHub Actions Build Status](https://github.com/openhab/openhab-distro/actions/workflows/ci-build.yml/badge.svg?branch=main)](https://github.com/openhab/openhab-distro/actions/workflows/ci-build.yml)
[![Jenkins Build Status](https://ci.openhab.org/job/openHAB-Distribution/badge/icon)](https://ci.openhab.org/job/openHAB-Distribution/)
[![EPL-2.0](https://img.shields.io/badge/license-EPL%202-green.svg)](https://opensource.org/licenses/EPL-2.0)
[![Bountysource](https://www.bountysource.com/badge/tracker?tracker_id=28452711)](https://www.bountysource.com/teams/openhab/issues?tracker_ids=28452711)

## Introduction

Expand Down
2 changes: 1 addition & 1 deletion distributions/openhab-addons/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>org.openhab.distro</groupId>
<artifactId>pom-distributions</artifactId>
<version>4.0.0-SNAPSHOT</version>
<version>4.1.0-SNAPSHOT</version>
</parent>

<artifactId>openhab-addons</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion distributions/openhab-demo/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>org.openhab.distro</groupId>
<artifactId>pom-distributions</artifactId>
<version>4.0.0-SNAPSHOT</version>
<version>4.1.0-SNAPSHOT</version>
</parent>

<artifactId>openhab-demo</artifactId>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,19 +1,31 @@
# The installation package of this openHAB instance
# Note: This is only regarded at the VERY FIRST START of openHAB
# Note: If you want to specify your add-ons yourself through entries below, set the package to "minimal"
# as otherwise your definition might be in conflict with what the installation package defines.
#
# Valid options:
# - standard : Standard setup for normal use of openHAB with persistence (rrd4j) and additional UI add-ons (basic,habpanel).
# - minimal : Installation of core components without additional add-ons.
#
# Note: The add-ons in the installation package are only installed at the VERY FIRST START of openHAB
# Note: If you want to specify your add-ons yourself through entries below, set the package to "minimal"
# as otherwise your definition might be in conflict with what the installation package defines.
#
package = standard

# Access Remote Add-on Repository
# Defines whether the remote openHAB add-on repository should be used for browsing and installing add-ons. (default is true)
#
#remote = true

# Some add-on services may provide add-ons where compatibility with the currently running system is not expected.
# Enabling this option will include these entries in the list of available add-ons.
#
#includeIncompatible = false

# The add-on configuration in the lists below is applied EVERY TIME openHAB is started.
# Add-ons installed using the UI that do not occur in the lists will be uninstalled each startup.
# When lists are commented again any add-ons in the list remain installed and are not removed.
# So if you want to uninstall all add-ons part of a list, first remove all add-ons from it, restart
# openHAB and then comment the list.

# A comma-separated list of automation services to install (e.g. "automation = groovyscripting")
#automation =

Expand Down
3 changes: 2 additions & 1 deletion distributions/openhab-verify/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>org.openhab.distro</groupId>
<artifactId>pom-distributions</artifactId>
<version>4.0.0-SNAPSHOT</version>
<version>4.1.0-SNAPSHOT</version>
</parent>

<artifactId>openhab-verify</artifactId>
Expand Down Expand Up @@ -53,6 +53,7 @@
<descriptors>
<descriptor>mvn:org.apache.karaf.features/framework/${karaf.version}/xml/features</descriptor>
<descriptor>mvn:org.apache.karaf.features/standard/${karaf.version}/xml/features</descriptor>
<descriptor>mvn:org.apache.karaf.features/specs/${karaf.version}/xml/features</descriptor>
<descriptor>mvn:${project.groupId}/addons/${project.version}/xml/features</descriptor>
<descriptor>mvn:${project.groupId}/distro/${project.version}/xml/features</descriptor>
</descriptors>
Expand Down
43 changes: 40 additions & 3 deletions distributions/openhab/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>org.openhab.distro</groupId>
<artifactId>pom-distributions</artifactId>
<version>4.0.0-SNAPSHOT</version>
<version>4.1.0-SNAPSHOT</version>
</parent>

<artifactId>openhab</artifactId>
Expand All @@ -28,6 +28,14 @@
<type>xml</type>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.apache.karaf.features</groupId>
<artifactId>specs</artifactId>
<version>${karaf.version}</version>
<classifier>features</classifier>
<type>xml</type>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.openhab.distro</groupId>
<artifactId>distro-kar</artifactId>
Expand Down Expand Up @@ -59,7 +67,7 @@
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.5.0</version>
<version>3.1.0</version>
<dependencies>
<dependency>
<groupId>org.openhab.util</groupId>
Expand Down Expand Up @@ -88,11 +96,40 @@
</includes>
</resource>
</resources>

<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>3.6.0</version>
<executions>
<execution>
<id>copy</id>
<phase>process-resources</phase>
<goals>
<goal>copy</goal>
</goals>
</execution>
</executions>
<configuration>
<artifactItems>
<artifactItem>
<groupId>org.openhab.core.tools</groupId>
<artifactId>upgradetool</artifactId>
<version>${project.version}</version>
<type>jar</type>
<classifier>jar-with-dependencies</classifier>
<overWrite>true</overWrite>
<outputDirectory>${project.build.directory}/assembly/bin</outputDirectory>
<destFileName>upgradetool.jar</destFileName>
</artifactItem>
</artifactItems>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>2.6</version>
<version>3.3.1</version>
<configuration>
<escapeString>\</escapeString>
</configuration>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ featuresRepositories = \
mvn:org.openhab.distro/distro/${project.version}/xml/features, \
mvn:org.openhab.distro/openhab-addons/${project.version}/xml/features, \
mvn:org.apache.karaf.features/framework/${karaf.version}/xml/features, \
mvn:org.apache.karaf.features/standard/${karaf.version}/xml/features
mvn:org.apache.karaf.features/standard/${karaf.version}/xml/features, \
mvn:org.apache.karaf.features/specs/${karaf.version}/xml/features

#
# Comma separated list of features to install at startup
Expand Down
9 changes: 6 additions & 3 deletions distributions/openhab/src/main/resources/bin/karaf
Original file line number Diff line number Diff line change
Expand Up @@ -157,8 +157,11 @@ init() {
# Determine the JVM vendor
detectJVM

# Determine the JVM version >= 1.6
# Determine the JVM version and check that it is version 17
checkJvmVersion
if [ "${VERSION}" -ne "17" ]; then
die "JVM must be version 17. JVM version ${VERSION} is unsupported (JAVA_HOME=$JAVA_HOME)"
fi

# Check if a root instance is already running
checkRootInstance
Expand Down Expand Up @@ -301,8 +304,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.4.3.jar" \
--patch-module java.xml="${KARAF_HOME}/lib/endorsed/org.apache.karaf.specs.java.xml-4.4.3.jar" \
--patch-module java.base="${KARAF_HOME}/lib/endorsed/org.apache.karaf.specs.locator-4.4.4.jar" \
--patch-module java.xml="${KARAF_HOME}/lib/endorsed/org.apache.karaf.specs.java.xml-4.4.4.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
9 changes: 7 additions & 2 deletions distributions/openhab/src/main/resources/bin/karaf.bat
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,11 @@ for /f tokens^=2-5^ delims^=.-_+^" %%j in ('"%JAVA%" -fullversion 2^>^&1') do (
if %%j==1 (set JAVA_VERSION=%%k) else (set JAVA_VERSION=%%j)
)

if %JAVA_VERSION% NEQ 17 (
call :warn "JVM must be version 17. JVM version %JAVA_VERSION% is unsupported (JAVA_HOME=%JAVA_HOME%)"
goto END
)

if %JAVA_VERSION% GTR 8 (
pushd "%KARAF_HOME%\lib\jdk9plus"
for %%G in (*.jar) do call:APPEND_TO_JDK9PLUS_CLASSPATH %%G
Expand Down Expand Up @@ -407,8 +412,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.4.3.jar" ^
--patch-module java.xml="%KARAF_HOME%\lib\endorsed\org.apache.karaf.specs.java.xml-4.4.3.jar" ^
--patch-module java.base="%KARAF_HOME%\lib\endorsed\org.apache.karaf.specs.locator-4.4.4.jar" ^
--patch-module java.xml="%KARAF_HOME%\lib\endorsed\org.apache.karaf.specs.java.xml-4.4.4.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
10 changes: 2 additions & 8 deletions distributions/openhab/src/main/resources/bin/setenv
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ export JAVA_OPTS="${JAVA_OPTS}
-Dopenhab.logdir=${OPENHAB_LOGDIR}
-Dfelix.cm.dir=${OPENHAB_USERDATA}/config
-Djava.library.path=${OPENHAB_USERDATA}/tmp/lib
-Djdk.util.zip.disableZip64ExtraFieldValidation=true
-Djetty.host=${HTTP_ADDRESS}
-Djetty.http.compliance=RFC2616
-Dorg.apache.cxf.osgi.http.transport.disable=true
Expand All @@ -113,17 +114,10 @@ export JAVA_OPTS="${JAVA_OPTS}
#
# set JVM options
#
ARCH=`uname -m`
EXTRA_JAVA_OPTS_COMMON="
-Djava.awt.headless=true
-Dfile.encoding=UTF-8"
EXTRA_JAVA_OPTS_ARCH=""
case "$ARCH" in
*arm*) ;;
*aarch*) ;;
*) EXTRA_JAVA_OPTS_ARCH="-XX:+UseG1GC" ;;
esac
export EXTRA_JAVA_OPTS="${EXTRA_JAVA_OPTS_COMMON} ${EXTRA_JAVA_OPTS_ARCH} ${EXTRA_JAVA_OPTS}"
export EXTRA_JAVA_OPTS="${EXTRA_JAVA_OPTS_COMMON} ${EXTRA_JAVA_OPTS}"
export JAVA_NON_DEBUG_OPTS="-XX:-UsePerfData"


Expand Down
4 changes: 2 additions & 2 deletions distributions/openhab/src/main/resources/bin/setenv.bat
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ set JAVA_OPTS=%JAVA_OPTS% ^
-Dopenhab.logdir=%OPENHAB_LOGDIR% ^
-Dfelix.cm.dir=%OPENHAB_USERDATA%\config ^
-Djava.library.path=%OPENHAB_USERDATA%\tmp\lib ^
-Djdk.util.zip.disableZip64ExtraFieldValidation=true ^
-Djetty.host=%HTTP_ADDRESS% ^
-Djetty.http.compliance=RFC2616 ^
-Dorg.apache.cxf.osgi.http.transport.disable=true ^
Expand All @@ -128,8 +129,7 @@ set JAVA_OPTS=%JAVA_OPTS% ^
-Dorg.osgi.service.http.port.secure=%HTTPS_PORT%

:: set jvm options
set EXTRA_JAVA_OPTS=-XX:+UseG1GC ^
-Djava.awt.headless=true ^
set EXTRA_JAVA_OPTS=-Djava.awt.headless=true ^
-Dfile.encoding=UTF-8 ^
%EXTRA_JAVA_OPTS%

Expand Down
12 changes: 11 additions & 1 deletion distributions/openhab/src/main/resources/bin/update
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ scanVersioningList() {

echo " "
echo "#########################################"
echo " openHAB 3.x.x update script "
echo " openHAB 4.x update script "
echo "#########################################"
echo " "

Expand All @@ -253,6 +253,7 @@ SkipModifier="$3"

##Run the initialisation functions defined above
setup "$SpecifiedVersion" "$SpecifiedDir"

download "$SkipModifier"

transferFile="update.lst"
Expand Down Expand Up @@ -353,6 +354,15 @@ rm -rf "${TempDir:?}"
echo "Restoring previous file ownership ($FileOwner:$FileGroup)"
chown -R "$FileOwner:$FileGroup" "$WorkingDir"

## Start the upgrade tool
echo "Starting JSON database update..."
export OPENHAB_USERDATA="$OPENHAB_USERDATA"
java -jar "$WorkingDir/runtime/bin/upgradetool.jar" || {
echo "Update tool failed, please check the openHAB website (www.openhab.org) for manual update instructions." >&2
exit 1
}
echo "JSON database updated successfully."

echo ""
echo "SUCCESS: openHAB updated from $CurrentVersion to $OHVersion"
echo ""
Loading

0 comments on commit 5907503

Please sign in to comment.