-
Notifications
You must be signed in to change notification settings - Fork 665
publish flatpak package #8014
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
overcuriousity
wants to merge
7
commits into
sleuthkit:develop
Choose a base branch
from
overcuriousity:develop
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
publish flatpak package #8014
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
6e2c92a
Add Flatpak packaging alongside existing Snap
overcuriousity eb1b4e6
Fix Flatpak packaging issues found during launch testing
overcuriousity 24ab985
Fix Flatpak build: add /app/bin to PATH so photorec is found
overcuriousity bcf3c5e
Fix Recent Activity: bundle perl and patch ExtractRegistry.java
overcuriousity 732cc79
Fix Flatpak CI: free disk space and embed runtime-repo in bundle
overcuriousity bda2b89
Bump checkout and upload-artifact to v5 (Node.js 24)
overcuriousity 65cb8a9
Fix desktop launch from Discover/GNOME Software
overcuriousity File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,79 @@ | ||
| name: Build Flatpak Bundle | ||
|
|
||
| # Mirrors the Snap distribution model: builds on deliberate tags and on-demand. | ||
| # On a tag push: the .flatpak bundle is attached to the GitHub Release. | ||
| # On workflow_dispatch: the bundle is uploaded as a workflow artifact. | ||
| on: | ||
| push: | ||
| tags: | ||
| - 'autopsy-*' | ||
| workflow_dispatch: | ||
|
|
||
| jobs: | ||
| build: | ||
| name: Build Flatpak bundle | ||
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
| - name: Checkout source | ||
| uses: actions/checkout@v5 | ||
|
|
||
| # ubuntu-latest only ships ~14 GB free; the NetBeans platform download, | ||
| # Autopsy compilation, and flatpak overlay together need ≥20 GB. | ||
| - name: Free disk space | ||
| uses: jlumbroso/free-disk-space@main | ||
| with: | ||
| tool-cache: true | ||
| android: true | ||
| dotnet: true | ||
| haskell: true | ||
| large-packages: true | ||
| docker-images: true | ||
| swap-storage: true | ||
|
|
||
| - name: Install Flatpak and flatpak-builder | ||
| run: | | ||
| sudo apt-get update | ||
| sudo apt-get install -y flatpak flatpak-builder | ||
|
|
||
| - name: Add Flathub remote (provides runtime and SDK) | ||
| run: | | ||
| flatpak remote-add --user --if-not-exists \ | ||
| flathub https://dl.flathub.org/repo/flathub.flatpakrepo | ||
|
|
||
| - name: Install Flatpak runtime and SDK | ||
| run: | | ||
| flatpak install --user --noninteractive \ | ||
| org.freedesktop.Platform//25.08 \ | ||
| org.freedesktop.Sdk//25.08 \ | ||
| org.freedesktop.Sdk.Extension.openjdk17//25.08 | ||
|
|
||
| - name: Build Flatpak | ||
| run: | | ||
| flatpak-builder \ | ||
| --user \ | ||
| --force-clean \ | ||
| --repo=repo \ | ||
| build-dir \ | ||
| org.sleuthkit.Autopsy.yaml | ||
|
|
||
| # --runtime-repo embeds the Flathub repo URL so first-time installs on | ||
| # clean systems can fetch the required org.freedesktop.Platform runtime. | ||
| - name: Create single-file bundle | ||
| run: | | ||
| flatpak build-bundle repo autopsy.flatpak org.sleuthkit.Autopsy \ | ||
| --runtime-repo=https://flathub.org/repo/flathub.flatpakrepo | ||
|
|
||
| - name: Upload bundle as release asset | ||
| if: startsWith(github.ref, 'refs/tags/') | ||
| uses: softprops/action-gh-release@v2 | ||
| with: | ||
| files: autopsy.flatpak | ||
|
|
||
| - name: Upload bundle as workflow artifact | ||
| if: github.event_name == 'workflow_dispatch' | ||
| uses: actions/upload-artifact@v5 | ||
| with: | ||
| name: autopsy-flatpak | ||
| path: autopsy.flatpak | ||
| retention-days: 14 | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,117 @@ | ||
| # Autopsy Flatpak | ||
|
|
||
| Packages Autopsy as a distributable Flatpak bundle (`.flatpak` file) for direct installation on | ||
| Linux systems. The bundle is self-contained and can be installed and run fully offline once built. | ||
|
|
||
| ## Distribution | ||
|
|
||
| This package targets direct distribution (not Flathub). The `.flatpak` bundle is attached as a | ||
| release asset to GitHub Releases, similar to how the Snap is distributed. | ||
|
|
||
| ## Prerequisites (build machine) | ||
|
|
||
| - `flatpak` and `flatpak-builder` installed | ||
| - Flathub remote added (provides the runtime and SDK): | ||
| ```sh | ||
| flatpak remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo | ||
| ``` | ||
| - `org.freedesktop.Platform//25.08`, `org.freedesktop.Sdk//25.08`, and | ||
| `org.freedesktop.Sdk.Extension.openjdk17//25.08` installed: | ||
| ```sh | ||
| flatpak install flathub org.freedesktop.Platform//25.08 org.freedesktop.Sdk//25.08 \ | ||
| org.freedesktop.Sdk.Extension.openjdk17//25.08 | ||
| ``` | ||
| - Internet access during the build (needed for downloading the NetBeans platform and Autopsy | ||
| Maven dependencies; the resulting bundle installs and runs offline) | ||
| - **≥ 20 GB of free disk space** on the build machine — the NetBeans platform download, the | ||
| Autopsy compilation, and the intermediate flatpak overlay together require significant space | ||
|
|
||
| ## Build | ||
|
|
||
| From the repository root: | ||
|
|
||
| ```sh | ||
| flatpak-builder --force-clean build-dir org.sleuthkit.Autopsy.yaml | ||
| ``` | ||
|
|
||
| Build time is typically 15–30 minutes (dominated by the NetBeans platform download and Autopsy | ||
| compilation). All Sleuth Kit Maven dependencies are pre-declared in the manifest with verified | ||
| SHA256 checksums and need no network access. The Autopsy `ant build-zip` step does require | ||
| network to download the NetBeans platform (~100 MB) and Autopsy's own dependency tree. | ||
|
|
||
| ## Bundle and install | ||
|
|
||
| ```sh | ||
| # Create a single-file distributable bundle | ||
| flatpak build-bundle ~/.local/share/flatpak/repo autopsy.flatpak org.sleuthkit.Autopsy | ||
|
|
||
| # Install from the bundle (no network needed) | ||
| flatpak install --user autopsy.flatpak | ||
|
|
||
| # Run | ||
| flatpak run org.sleuthkit.Autopsy | ||
| ``` | ||
|
|
||
| ## Updating versions for a new release | ||
|
|
||
| When cutting a new Autopsy release, update the following locations in `org.sleuthkit.Autopsy.yaml`: | ||
|
|
||
| 1. **Sleuth Kit tag** — under the `sleuthkit` module's `sources`, change the `tag:` field (e.g. | ||
| `sleuthkit-4.15.0`) and update the `sleuthkit-*.jar` filenames referenced in `build-commands`. | ||
| 2. **Sleuth Kit Maven JARs** — if TSK's Java binding dependencies changed, update the `url`/`sha256` | ||
| entries under the `sleuthkit` module's `sources`. Checksums can be verified with | ||
| `sha256sum <downloaded-jar>`. | ||
| 3. **Metainfo release entry** — add a new `<release>` block at the top of the `<releases>` list in | ||
| `flatpak/org.sleuthkit.Autopsy.metainfo.xml` with the correct version and date. | ||
|
|
||
| The CI workflow (`build-flatpak.yml`) builds and attaches `autopsy.flatpak` to the GitHub Release | ||
| automatically when a tag matching `autopsy-*` is pushed. | ||
|
|
||
| ## CI / GitHub Actions | ||
|
|
||
| `.github/workflows/build-flatpak.yml` builds the bundle automatically on tag pushes | ||
| (`autopsy-*`) and on manual dispatch. The resulting `autopsy.flatpak` is attached to the | ||
| GitHub Release when triggered by a tag. | ||
|
|
||
| ## Design decisions | ||
|
|
||
| ### Runtime | ||
| `org.freedesktop.Platform//25.08` with `org.freedesktop.Sdk.Extension.openjdk17` — avoids | ||
| bundling a full JRE by using the SDK extension mechanism. JDK 17 is required by Autopsy. | ||
|
|
||
| ### Network during build | ||
| The manifest sets `build-args: [--share=network]` globally. This is necessary because: | ||
| - Autopsy's `ant build-zip` downloads the Apache NetBeans platform at build time | ||
| - Pre-bundling all NetBeans modules individually would be impractical (hundreds of JARs) | ||
|
|
||
| All Sleuth Kit Maven dependencies (13 JARs) ARE pre-bundled in the manifest with SHA256 | ||
| checksums, so the Sleuth Kit module builds fully offline. | ||
|
|
||
| ### Permissions | ||
| `--device=all` is required for forensics work (raw block device access). Users may additionally | ||
| need to run Autopsy with appropriate OS group membership (e.g., `disk` group) to access local | ||
| disks in the `/dev/` directory. | ||
|
|
||
| ### Hugepages (Solr) | ||
| Flatpak cannot grant access to `/sys/kernel/mm/hugepages`. Solr runs without hugepages, which | ||
| is a performance trade-off only (not a functional blocker). | ||
|
|
||
| ## Known limitations | ||
|
|
||
| Inherited from Autopsy's Linux support: | ||
| - LEAPP processors are non-functional | ||
| - HEIF image processing is unavailable | ||
| - Video thumbnails are unavailable | ||
|
|
||
| ## Module build order | ||
|
|
||
| 1. `openjdk` — installs JDK 17 from the SDK extension into `/app/jre`, then symlinks `/app/jdk → /app/jre` (Autopsy's launcher resolves `jdkhome` via this path) | ||
| 2. `ant` — installs Apache Ant 1.10.15 into `/app/ant` | ||
| 3. `libewf` (legacy) — E01 forensics image support | ||
| 4. `libafflib` — AFF forensics format support | ||
| 5. `libvmdk` — VMware disk image support | ||
| 6. `libvhdi` — VHD disk image support | ||
| 7. `libvslvm` — LVM volume support | ||
| 8. `testdisk` — provides `photorec` (required by `unix_setup.sh`) | ||
| 9. `sleuthkit` — native TSK libraries + Java bindings (offline Maven build) | ||
| 10. `autopsy` — Autopsy itself, built from local source via `ant build-zip` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| #!/bin/bash | ||
| # Ensure Autopsy's tmp dir exists before launch (mirrors Snap wrapper behaviour). | ||
| mkdir -p "${XDG_RUNTIME_DIR:-/tmp}/autopsy-tmp" | ||
| exec /app/autopsy/bin/autopsy "$@" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| [Desktop Entry] | ||
| Name=Autopsy | ||
| Comment=A graphical interface to The Sleuth Kit and other digital forensics tools. | ||
| GenericName=DFIR Tool | ||
| Exec=autopsywrapper.sh | ||
| Icon=org.sleuthkit.Autopsy | ||
| Type=Application | ||
| Categories=System;Security; | ||
| Keywords=autopsy;sleuth;kit;dfir;forensics; | ||
| StartupNotify=true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,52 @@ | ||
| <?xml version="1.0" encoding="UTF-8"?> | ||
| <component type="desktop-application"> | ||
| <id>org.sleuthkit.Autopsy</id> | ||
| <metadata_license>CC0-1.0</metadata_license> | ||
| <project_license>Apache-2.0</project_license> | ||
| <name>Autopsy</name> | ||
| <summary>Extensible digital forensics platform</summary> | ||
| <description> | ||
| <p> | ||
| Autopsy® is the premier open source forensics platform which is fast, | ||
| easy-to-use, and capable of analyzing all types of mobile devices and | ||
| digital media. Its plug-in architecture enables extensibility from | ||
| community-developed or custom-built modules. Autopsy evolves to meet the | ||
| needs of hundreds of thousands of professionals in law enforcement, | ||
| national security, litigation support, and corporate investigation. | ||
| </p> | ||
| <p> | ||
| Note: Due to the system access necessary for Autopsy to perform forensics | ||
| work, this Flatpak uses --device=all to access block devices. Raw disk | ||
| access may additionally require running with appropriate OS permissions | ||
| (e.g., membership in the disk group). | ||
| </p> | ||
| <p>Known limitations on Linux compared to Windows:</p> | ||
| <ul> | ||
| <li>LEAPP processors are non-functional</li> | ||
| <li>HEIF image processing is unavailable</li> | ||
| <li>Video thumbnails are unavailable</li> | ||
| </ul> | ||
| </description> | ||
| <url type="homepage">https://www.autopsy.com/</url> | ||
| <url type="bugtracker">https://github.com/sleuthkit/autopsy/issues</url> | ||
| <url type="vcs-browser">https://github.com/sleuthkit/autopsy</url> | ||
| <categories> | ||
| <category>Science</category> | ||
| <category>Security</category> | ||
| </categories> | ||
| <keywords> | ||
| <keyword>forensics</keyword> | ||
| <keyword>dfir</keyword> | ||
| <keyword>sleuthkit</keyword> | ||
| <keyword>disk</keyword> | ||
| </keywords> | ||
| <releases> | ||
| <release version="4.23.0" date="2025-09-15"> | ||
| <description> | ||
| <p>See the GitHub release page for full release notes.</p> | ||
| </description> | ||
| <url>https://github.com/sleuthkit/autopsy/releases/tag/autopsy-4.23.0</url> | ||
| </release> | ||
| </releases> | ||
| <content_rating type="oars-1.1"/> | ||
| </component> |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.