Skip to content

Commit 0041f1f

Browse files
committed
Add permissions check in CI; expand scope of permissions fix in snapcraft.yml and flathub.yml
1 parent 247638a commit 0041f1f

4 files changed

Lines changed: 17 additions & 2 deletions

File tree

‎.github/workflows/build.yml‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,14 @@ jobs:
7777
- name: Package Processing with Gradle
7878
run: ./gradlew packageDistributionForCurrentOS
7979

80+
- name: Verify binary permissions in .deb
81+
if: matrix.os_prefix == 'linux'
82+
run: |
83+
DEB=$(ls app/build/compose/binaries/main/deb/processing*.deb)
84+
dpkg-deb -x "$DEB" /tmp/debcheck
85+
test -x /tmp/debcheck/opt/processing/lib/app/resources/jdk/bin/java
86+
test -x /tmp/debcheck/opt/processing/lib/app/resources/modes/java/application/launch4j/bin/windres
87+
8088
- name: Add artifact
8189
uses: actions/upload-artifact@v4
8290
if: ${{ github.event_name != 'pull_request' }}

‎app/build.gradle.kts‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -675,4 +675,11 @@ afterEvaluate {
675675
dependsOn("includeJdk")
676676
finalizedBy("setExecutablePermissions")
677677
}
678+
// finalizedBy above only guarantees setExecutablePermissions runs after
679+
// createDistributable, not before packageDeb, which merely depends on
680+
// createDistributable transitively - without this, jpackage can read the
681+
// app image before permissions are restored on it.
682+
tasks.named("packageDeb").configure {
683+
dependsOn("setExecutablePermissions")
684+
}
678685
}

‎app/linux/flathub.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ modules:
1919
- ar x processing.deb
2020
- tar --zstd -xf data.tar.zst
2121
- mv opt/processing/* /app/
22-
- find /app/lib/app/resources/jdk/bin -type f -exec chmod +x {} +
22+
- find /app/lib/app/resources -path "*/bin/*" -type f -exec chmod +x {} +
2323

2424
# Install the desktop file and icon
2525
- install -D /app/lib/processing-Processing.desktop /app/share/applications/$identifier.desktop

‎app/linux/snapcraft.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,4 +39,4 @@ parts:
3939
override-prime: |
4040
snapcraftctl prime
4141
rm -vf usr/lib/jvm/java-17-openjdk-*/lib/security/cacerts
42-
chmod -R +x opt/processing/lib/app/resources/jdk
42+
find opt/processing/lib/app/resources -path "*/bin/*" -type f -exec chmod +x {} +

0 commit comments

Comments
 (0)