diff --git a/flatpak/org.sleuthkit.Autopsy.yml b/flatpak/org.sleuthkit.Autopsy.yml index 619a44e4c3..5be2711559 100644 --- a/flatpak/org.sleuthkit.Autopsy.yml +++ b/flatpak/org.sleuthkit.Autopsy.yml @@ -4,50 +4,20 @@ runtime-version: '47' sdk: org.gnome.Sdk sdk-extensions: - org.freedesktop.Sdk.Extension.openjdk17 -command: autopsy -build-options: - append-path: /usr/lib/sdk/openjdk17/bin +command: autopsy-wrapper finish-args: - # Filesystem access - Autopsy needs broad access for forensic analysis - --filesystem=host - - --filesystem=/dev:ro - - # Device access for forensic imaging - --device=all - - # Network access for multi-user cases and updates - --share=network - - # GUI access - - --share=ipc - --socket=x11 - - --socket=wayland - - --socket=fallback-x11 - - # Desktop integration - - --filesystem=xdg-desktop:rw - - --filesystem=xdg-documents:rw - - --filesystem=xdg-download:rw modules: - # OpenJDK 17 Runtime - name: openjdk buildsystem: simple build-commands: - /usr/lib/sdk/openjdk17/install.sh - # Pre-download Ivy to avoid network issues during build - - name: ivy - buildsystem: simple - sources: - - type: file - url: https://repo1.maven.org/maven2/org/apache/ivy/ivy/2.5.0/ivy-2.5.0.jar - sha256: 2f4c835b52311df922f8a8eb057843de5485088b234ccd03e478b9066b5e6bfc - build-commands: - - mkdir -p /app/share/ant/lib - - cp ivy-2.5.0.jar /app/share/ant/lib/ - - # The Sleuth Kit - Core forensics library (simplified) + # Build TSK without Java to avoid Ivy issues - name: sleuthkit sources: - type: git @@ -55,100 +25,26 @@ modules: tag: sleuthkit-4.14.0 buildsystem: autotools config-opts: - - --enable-java - --prefix=/app - - --disable-dependency-tracking - build-options: - env: - JAVA_HOME: /usr/lib/sdk/openjdk17/jvm/openjdk-17 - ANT_HOME: /usr/share/ant - post-install: - # Build Java bindings with pre-downloaded Ivy - - | - cd bindings/java - mkdir -p ~/.ant/lib - cp /app/share/ant/lib/ivy-2.5.0.jar ~/.ant/lib/ - ant dist -Doffline=true - cp dist/*.jar /app/share/java/ + - --disable-java # This avoids the Ivy download issue! - # Minimal set of forensic libraries - - name: libewf - sources: - - type: archive - url: https://github.com/libyal/libewf/releases/download/20240506/libewf-experimental-20240506.tar.gz - sha256: 247d8ee9572392a2404be514d1137f099970f41f240c1134ddc3f04322281c67 - buildsystem: autotools - config-opts: - - --prefix=/app - - --disable-python - - # Autopsy application (simplified) + # Download pre-built Autopsy (includes TSK Java bindings) - name: autopsy sources: - - type: git - url: https://github.com/sleuthkit/autopsy.git - tag: autopsy-4.22.1 - # Pre-download NetBeans platform - type: archive - url: https://archive.apache.org/dist/netbeans/netbeans/15/netbeans-15-bin.zip - sha256: b5f8bdf2372e91c29f7d09200d9c3d19a1fea88c483286003a4e15d0b1e68d12 - dest: netbeans-download + url: https://github.com/sleuthkit/autopsy/releases/download/autopsy-4.22.1/autopsy-4.22.1.zip + # Get SHA256: wget -O - https://github.com/sleuthkit/autopsy/releases/download/autopsy-4.22.1/autopsy-4.22.1.zip | sha256sum + sha256: YOUR_SHA256_HERE buildsystem: simple - build-options: - env: - JAVA_HOME: /usr/lib/sdk/openjdk17/jvm/openjdk-17 - TSK_HOME: /app - ANT_HOME: /usr/share/ant build-commands: - # Extract NetBeans platform - | - mkdir -p netbeans-plat/15 - cd netbeans-download/netbeans - cp -r platform/* ../netbeans-plat/15/ - cp -r harness ../netbeans-plat/15/ - cd ../.. - - # Build Autopsy - - | - ant -Dnbplatform.active.dir=$(pwd)/netbeans-plat/15 \ - -Dnbplatform.default.harness.dir=$(pwd)/netbeans-plat/15/harness \ - -Doffline=true \ - build-zip - - # Install Autopsy - - | - mkdir -p /app/autopsy - unzip -q dist/autopsy-*.zip -d /tmp/ - cp -r /tmp/autopsy-*/* /app/autopsy/ - - # Run setup and create wrapper - - | - cd /app/autopsy + # Install Autopsy + cp -r autopsy-*/* /app/ + cd /app chmod +x unix_setup.sh ./unix_setup.sh -j /usr/lib/sdk/openjdk17/jvm/openjdk-17 -n autopsy - - # Create simplified wrapper script - - | - mkdir -p /app/bin - cat > /app/bin/autopsy << 'EOF' + + # Create wrapper to ensure environment is set + cat > /app/bin/autopsy-wrapper << 'EOF' #!/bin/bash - export JAVA_HOME=/usr/lib/sdk/openjdk17/jvm/openjdk-17 - export PATH=$JAVA_HOME/bin:$PATH - mkdir -p ~/.autopsy/tmp - exec /app/autopsy/bin/autopsy "$@" - EOF - chmod +x /app/bin/autopsy - - # Install desktop file - - | - mkdir -p /app/share/applications - cat > /app/share/applications/org.sleuthkit.Autopsy.desktop << 'EOF' - [Desktop Entry] - Name=Autopsy - Comment=Digital forensics platform - Exec=autopsy - Icon=org.sleuthkit.Autopsy - Type=Application - Categories=Development;Forensics; - StartupNotify=true - EOF + export JAVA_HOME=/usr/lib/sdk/openjdk17/