diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 000000000..357b2e3e4 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,24 @@ +version: 2 +updates: + - package-ecosystem: "maven" + directory: "/" + schedule: + interval: "weekly" + day: "monday" + time: "06:00" + timezone: "UTC" + groups: + all: # one PR for all dependencies + patterns: + - "*" + + - package-ecosystem: "github-actions" + directory: "/" # even for `.github/workflows` + schedule: + interval: "monthly" + groups: + all: # one PR for all actions + patterns: + - "*" + labels: + - "misc:ci" \ No newline at end of file diff --git a/.github/workflows/appimage.yml b/.github/workflows/appimage.yml index 44ca02028..187d5099c 100644 --- a/.github/workflows/appimage.yml +++ b/.github/workflows/appimage.yml @@ -30,6 +30,7 @@ jobs: distribution: 'zulu' java-version: ${{ env.JAVA_VERSION }} java-package: 'jdk+fx' + check-latest: true cache: 'maven' - name: Ensure major jfx version in pom equals in jdk shell: pwsh @@ -54,7 +55,7 @@ jobs: --verbose --output runtime --module-path "${JAVA_HOME}/jmods" - --add-modules java.base,java.desktop,java.instrument,java.logging,java.naming,java.net.http,java.scripting,java.sql,java.xml,javafx.base,javafx.graphics,javafx.controls,javafx.fxml,jdk.unsupported,jdk.crypto.ec,jdk.security.auth,jdk.accessibility,jdk.management.jfr + --add-modules java.base,java.desktop,java.instrument,java.logging,java.naming,java.net.http,java.scripting,java.sql,java.xml,javafx.base,javafx.graphics,javafx.controls,javafx.fxml,jdk.unsupported,jdk.crypto.ec,jdk.security.auth,jdk.accessibility,jdk.management.jfr,jdk.net --strip-native-commands --no-header-files --no-man-pages @@ -80,18 +81,20 @@ jobs: --copyright "(C) 2016 - 2023 Skymatic GmbH" --app-version "${{ needs.get-version.outputs.semVerNum }}.${{ needs.get-version.outputs.revNum }}" --java-options "--enable-preview" - --java-options "--enable-native-access=org.cryptomator.jfuse.linux.amd64,org.cryptomator.jfuse.linux.aarch64" + --java-options "--enable-native-access=org.cryptomator.jfuse.linux.amd64,org.cryptomator.jfuse.linux.aarch64,org.purejava.appindicator" --java-options "-Xss5m" --java-options "-Xmx256m" --java-options "-Dcryptomator.appVersion=\"${{ needs.get-version.outputs.semVerStr }}\"" --java-options "-Dfile.encoding=\"utf-8\"" + --java-options "-Djava.net.useSystemProxies=true" --java-options "-Dcryptomator.logDir=\"@{userhome}/.local/share/Cryptomator/logs\"" --java-options "-Dcryptomator.pluginDir=\"@{userhome}/.local/share/Cryptomator/plugins\"" --java-options "-Dcryptomator.settingsPath=\"@{userhome}/.config/Cryptomator/settings.json:@{userhome}/.Cryptomator/settings.json\"" --java-options "-Dcryptomator.p12Path=\"@{userhome}/.config/Cryptomator/key.p12\"" --java-options "-Dcryptomator.ipcSocketPath=\"@{userhome}/.config/Cryptomator/ipc.socket\"" --java-options "-Dcryptomator.mountPointsDir=\"@{userhome}/.local/share/Cryptomator/mnt\"" - --java-options "-Dcryptomator.showTrayIcon=false" + --java-options "-Dcryptomator.showTrayIcon=true" + --java-options "-Dcryptomator.integrationsLinux.trayIconsDir=\"@{appdir}/usr/share/icons/hicolor/symbolic/apps\"" --java-options "-Dcryptomator.buildNumber=\"appimage-${{ needs.get-version.outputs.revNum }}\"" --add-launcher Cryptomator-gtk2=launcher-gtk2.properties --resource-dir dist/linux/resources @@ -102,6 +105,10 @@ jobs: cp dist/linux/common/org.cryptomator.Cryptomator256.png Cryptomator.AppDir/usr/share/icons/hicolor/256x256/apps/org.cryptomator.Cryptomator.png cp dist/linux/common/org.cryptomator.Cryptomator512.png Cryptomator.AppDir/usr/share/icons/hicolor/512x512/apps/org.cryptomator.Cryptomator.png cp dist/linux/common/org.cryptomator.Cryptomator.svg Cryptomator.AppDir/usr/share/icons/hicolor/scalable/apps/org.cryptomator.Cryptomator.svg + cp dist/linux/common/org.cryptomator.Cryptomator.tray.svg Cryptomator.AppDir/usr/share/icons/hicolor/scalable/apps/org.cryptomator.Cryptomator.tray.svg + cp dist/linux/common/org.cryptomator.Cryptomator.tray-unlocked.svg Cryptomator.AppDir/usr/share/icons/hicolor/scalable/apps/org.cryptomator.Cryptomator.tray-unlocked.svg + cp dist/linux/common/org.cryptomator.Cryptomator.tray.svg Cryptomator.AppDir/usr/share/icons/hicolor/symbolic/apps/org.cryptomator.Cryptomator.tray-symbolic.svg + cp dist/linux/common/org.cryptomator.Cryptomator.tray-unlocked.svg Cryptomator.AppDir/usr/share/icons/hicolor/symbolic/apps/org.cryptomator.Cryptomator.tray-unlocked-symbolic.svg cp dist/linux/common/org.cryptomator.Cryptomator.metainfo.xml Cryptomator.AppDir/usr/share/metainfo/org.cryptomator.Cryptomator.metainfo.xml cp dist/linux/common/org.cryptomator.Cryptomator.desktop Cryptomator.AppDir/usr/share/applications/org.cryptomator.Cryptomator.desktop cp dist/linux/common/application-vnd.cryptomator.vault.xml Cryptomator.AppDir/usr/share/mime/packages/application-vnd.cryptomator.vault.xml diff --git a/.github/workflows/debian.yml b/.github/workflows/debian.yml index adec8b2c5..8447f387d 100644 --- a/.github/workflows/debian.yml +++ b/.github/workflows/debian.yml @@ -17,8 +17,8 @@ on: env: JAVA_VERSION: 20 - OPENJFX_JMODS_AMD64: 'https://download2.gluonhq.com/openjfx/20.0.1/openjfx-20.0.1_linux-x64_bin-jmods.zip' - OPENJFX_JMODS_AARCH64: 'https://download2.gluonhq.com/openjfx/20.0.1/openjfx-20.0.1_linux-aarch64_bin-jmods.zip' + OPENJFX_JMODS_AMD64: 'https://download2.gluonhq.com/openjfx/20.0.2/openjfx-20.0.2_linux-x64_bin-jmods.zip' + OPENJFX_JMODS_AARCH64: 'https://download2.gluonhq.com/openjfx/20.0.2/openjfx-20.0.2_linux-aarch64_bin-jmods.zip' jobs: build: @@ -45,6 +45,7 @@ jobs: with: distribution: 'zulu' java-version: ${{ env.JAVA_VERSION }} + check-latest: true cache: 'maven' - name: Run maven run: mvn -B clean package -Pdependency-check,linux -DskipTests diff --git a/.github/workflows/mac-dmg.yml b/.github/workflows/mac-dmg.yml index bad7f572c..680140047 100644 --- a/.github/workflows/mac-dmg.yml +++ b/.github/workflows/mac-dmg.yml @@ -8,6 +8,11 @@ on: version: description: 'Version' required: false + notarize: + description: 'Notarize' + required: true + default: false + type: boolean env: JAVA_VERSION: 20 @@ -31,31 +36,46 @@ jobs: output-suffix: x64 xcode-path: '/Applications/Xcode_13.2.1.app' fuse-lib: macFUSE + openjfx-url: https://download2.gluonhq.com/openjfx/20.0.2/openjfx-20.0.2_osx-x64_bin-jmods.zip + openjfx-sha: 55b8ff7453d59c89ae129f6c9c5ad7b09a5d359568811b376ac1766c14d6a17c - os: [self-hosted, macOS, ARM64] architecture: aarch64 output-suffix: arm64 xcode-path: '/Applications/Xcode_13.2.1.app' fuse-lib: FUSE-T + openjfx-url: https://download2.gluonhq.com/openjfx/20.0.2/openjfx-20.0.2_osx-aarch64_bin-jmods.zip + openjfx-sha: c60f5f19aa847e0e620e0b011e5de68f2c6755641c2141cec27a0b89f612beaf steps: - uses: actions/checkout@v3 - name: Setup Java uses: actions/setup-java@v3 with: - distribution: 'zulu' + distribution: 'temurin' java-version: ${{ env.JAVA_VERSION }} - java-package: 'jdk+fx' + java-package: 'jdk' architecture: ${{ matrix.architecture }} + check-latest: true cache: 'maven' - - name: Ensure major jfx version in pom equals in jdk - if: ${{ !contains(matrix.os, 'self-hosted') }} - shell: pwsh + - name: Download OpenJFX jmods + id: download-jmods run: | - $jfxPomVersion = (&mvn help:evaluate "-Dexpression=javafx.version" -q -DforceStdout) -split "\." - $jfxJdkVersion = ((Get-Content -path "${env:JAVA_HOME}/lib/javafx.properties" | Where-Object {$_ -like 'javafx.version=*' }) -replace '.*=','') -split "\." - if ($jfxPomVersion[0] -ne $jfxJdkVersion[0]) { - Write-Error "Major part of JavaFX version in pom($($jfxPomVersion[0])) does not match the version in JDK($($jfxJdkVersion[0])) " + curl -L ${{ matrix.openjfx-url }} -o openjfx-jmods.zip + echo "${{ matrix.openjfx-sha }} *openjfx-jmods.zip" | shasum -a256 --check + mkdir -p openjfx-jmods/ + unzip -j openjfx-jmods.zip \*/javafx.base.jmod \*/javafx.controls.jmod \*/javafx.fxml.jmod \*/javafx.graphics.jmod -d openjfx-jmods + - name: Ensure major jfx version in pom and in jmods is the same + run: | + JMOD_VERSION=$(jmod describe openjfx-jmods/javafx.base.jmod | head -1) + JMOD_VERSION=${JMOD_VERSION#*@} + JMOD_VERSION=${JMOD_VERSION%%.*} + POM_JFX_VERSION=$(mvn help:evaluate "-Dexpression=javafx.version" -q -DforceStdout) + POM_JFX_VERSION=${POM_JFX_VERSION#*@} + POM_JFX_VERSION=${POM_JFX_VERSION%%.*} + + if [ $POM_JFX_VERSION -ne $JMOD_VERSION ]; then + >&2 echo "Major JavaFX version in pom.xml (${POM_JFX_VERSION}) != jmod version (${JMOD_VERSION_AMD64})" exit 1 - } + fi - name: Set version run : mvn versions:set -DnewVersion=${{ needs.get-version.outputs.semVerStr }} - name: Run maven @@ -69,7 +89,7 @@ jobs: ${JAVA_HOME}/bin/jlink --verbose --output runtime - --module-path "${JAVA_HOME}/jmods" + --module-path "${JAVA_HOME}/jmods:openjfx-jmods" --add-modules java.base,java.desktop,java.instrument,java.logging,java.naming,java.net.http,java.scripting,java.sql,java.xml,javafx.base,javafx.graphics,javafx.controls,javafx.fxml,jdk.unsupported,jdk.crypto.ec,jdk.accessibility,jdk.management.jfr --strip-native-commands --no-header-files @@ -95,6 +115,7 @@ jobs: --java-options "-Xss5m" --java-options "-Xmx256m" --java-options "-Dfile.encoding=\"utf-8\"" + --java-options "-Djava.net.useSystemProxies=true" --java-options "-Dapple.awt.enableTemplateImages=true" --java-options "-Dsun.java2d.metal=true" --java-options "-Dcryptomator.appVersion=\"${{ needs.get-version.outputs.semVerStr }}\"" @@ -207,7 +228,7 @@ jobs: env: VERSION_NO: ${{ needs.get-version.outputs.semVerNum }} - name: Notarize .dmg - if: startsWith(github.ref, 'refs/tags/') + if: startsWith(github.ref, 'refs/tags/') || inputs.notarize uses: cocoalibs/xcode-notarization-action@v1 with: app-path: 'Cryptomator-*.dmg' diff --git a/.github/workflows/release-check.yml b/.github/workflows/release-check.yml index 481861540..d5a17d121 100644 --- a/.github/workflows/release-check.yml +++ b/.github/workflows/release-check.yml @@ -18,7 +18,7 @@ jobs: name: Validate commits pushed to release/hotfix branch to fulfill release requirements runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - id: validate-pom-version name: Validate POM version run: | diff --git a/.github/workflows/win-exe.yml b/.github/workflows/win-exe.yml index 88858e600..f98c05fdd 100644 --- a/.github/workflows/win-exe.yml +++ b/.github/workflows/win-exe.yml @@ -10,15 +10,15 @@ on: required: false isDebug: description: 'Build debug version with console output' - type: boolean + type: boolean env: JAVA_VERSION: 20 JAVA_DIST: 'temurin' JAVA_CACHE: 'maven' - JFX_JMODS_URL: 'https://download2.gluonhq.com/openjfx/20.0.1/openjfx-20.0.1_windows-x64_bin-jmods.zip' - JFX_JMODS_HASH: 'D00767334C43B8832B5CF10267D34CA8F563D187C4655B73EB6020DD79C054B5' + JFX_JMODS_URL: 'https://download2.gluonhq.com/openjfx/20.0.2/openjfx-20.0.2_windows-x64_bin-jmods.zip' + JFX_JMODS_HASH: '18625bbc13c57dbf802486564247a8d8cab72ec558c240a401bf6440384ebd77' defaults: run: @@ -45,12 +45,13 @@ jobs: distribution: ${{ env.JAVA_DIST }} java-version: ${{ env.JAVA_VERSION }} java-package: 'jdk' + check-latest: true cache: ${{ env.JAVA_CACHE }} - name: Download and extract JavaFX jmods from Gluon #In the last step we move all jmods files a dir level up because jmods are placed inside a directory in the zip run: | curl --output jfxjmods.zip -L "${{ env.JFX_JMODS_URL }}" - if(!(Get-FileHash -Path jfxjmods.zip -Algorithm SHA256).Hash.equals("${{ env.JFX_JMODS_HASH }}")) { + if(!(Get-FileHash -Path jfxjmods.zip -Algorithm SHA256).Hash.ToLower().equals("${{ env.JFX_JMODS_HASH }}")) { throw "Wrong checksum of JMOD archive downloaded from ${{ env.JFX_JMODS_URL }}."; } Expand-Archive -Path jfxjmods.zip -DestinationPath jfxjmods @@ -112,6 +113,7 @@ jobs: --java-options "-Xmx256m" --java-options "-Dcryptomator.appVersion=\"${{ needs.get-version.outputs.semVerStr }}\"" --java-options "-Dfile.encoding=\"utf-8\"" + --java-options "-Djava.net.useSystemProxies=true" --java-options "-Dcryptomator.logDir=\"@{localappdata}/Cryptomator\"" --java-options "-Dcryptomator.pluginDir=\"@{appdata}/Cryptomator/Plugins\"" --java-options "-Dcryptomator.settingsPath=\"@{appdata}/Cryptomator/settings.json;@{userhome}/AppData/Roaming/Cryptomator/settings.json\"" @@ -246,6 +248,7 @@ jobs: with: distribution: ${{ env.JAVA_DIST }} java-version: ${{ env.JAVA_VERSION }} + check-latest: true cache: ${{ env.JAVA_CACHE }} - name: Generate license for exe run: > @@ -363,7 +366,7 @@ jobs: cp msi/*.msi files cp exe/*.exe files - name: Upload to Kaspersky - uses: SamKirkland/FTP-Deploy-Action@4.3.3 + uses: SamKirkland/FTP-Deploy-Action@v4.3.4 with: protocol: ftps server: allowlist.kaspersky-labs.com @@ -372,7 +375,7 @@ jobs: password: ${{ secrets.ALLOWLIST_KASPERSKY_PASSWORD }} local-dir: files/ - name: Upload to Avast - uses: SamKirkland/FTP-Deploy-Action@4.3.0 + uses: SamKirkland/FTP-Deploy-Action@v4.3.4 with: protocol: ftp server: whitelisting.avast.com diff --git a/.idea/runConfigurations/Cryptomator_Linux.xml b/.idea/runConfigurations/Cryptomator_Linux.xml index 3206f553a..1a1b394b5 100644 --- a/.idea/runConfigurations/Cryptomator_Linux.xml +++ b/.idea/runConfigurations/Cryptomator_Linux.xml @@ -2,7 +2,7 @@