mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-06 21:00:22 +00:00
snapcraft script update
This commit is contained in:
parent
17996195b1
commit
b0e30343aa
@ -1,9 +1,10 @@
|
|||||||
name: autopsy
|
name: autopsy
|
||||||
# core22 brings along linting for share object library paths as well as improvements to get java gstreamer working
|
# core22 brings along linting for share object library paths as well as improvements to get java gstreamer working
|
||||||
base: core22
|
base: core22
|
||||||
version: '4.19.3'
|
version: 4.19.3
|
||||||
summary: A graphical interface to The Sleuth Kit and other digital forensics tools. # 79 char long summary
|
summary: A graphical interface to The Sleuth Kit and other digital forensics tools. # 79 char long summary
|
||||||
description: Autopsy is a graphical interface to The Sleuth Kit and other open source digital forensics tools.
|
description: Autopsy is a graphical interface to The Sleuth Kit and other open source
|
||||||
|
digital forensics tools.
|
||||||
grade: stable # must be 'stable' to release into candidate/stable channels
|
grade: stable # must be 'stable' to release into candidate/stable channels
|
||||||
# TODO look into turning back to strict for easier store inclusion but more limited usage
|
# TODO look into turning back to strict for easier store inclusion but more limited usage
|
||||||
confinement: classic # use 'strict' once you have the right plugs and slots
|
confinement: classic # use 'strict' once you have the right plugs and slots
|
||||||
@ -13,12 +14,12 @@ icon: snap/gui/autopsy.png
|
|||||||
|
|
||||||
# Java package repo to use with snapcraft
|
# Java package repo to use with snapcraft
|
||||||
package-repositories:
|
package-repositories:
|
||||||
- type: apt
|
- type: apt
|
||||||
formats: [deb]
|
formats: [deb]
|
||||||
components: [main]
|
components: [main]
|
||||||
suites: [stable]
|
suites: [stable]
|
||||||
key-id: 99A5C88E3C5B1FA8B05A19D332E9750179FCEA62
|
key-id: 99A5C88E3C5B1FA8B05A19D332E9750179FCEA62
|
||||||
url: https://apt.bell-sw.com/
|
url: https://apt.bell-sw.com/
|
||||||
|
|
||||||
plugs:
|
plugs:
|
||||||
system-files-autopsy:
|
system-files-autopsy:
|
||||||
@ -27,10 +28,10 @@ plugs:
|
|||||||
|
|
||||||
apps:
|
apps:
|
||||||
autopsy:
|
autopsy:
|
||||||
environment:
|
environment:
|
||||||
jdkhome: $SNAP/usr/lib/jvm/bellsoft-java8-full-amd64
|
jdkhome: $SNAP/usr/lib/jvm/bellsoft-java8-full-amd64
|
||||||
# provide means for java gstreamer to find gstreamer libs
|
# provide means for java gstreamer to find gstreamer libs
|
||||||
jreflags: "$jreflags \"-Djna.library.path=$SNAP/usr/lib/x86_64-linux-gnu\""
|
jreflags: $jreflags "-Djna.library.path=$SNAP/usr/lib/x86_64-linux-gnu"
|
||||||
LD_LIBRARY_PATH: $SNAP/usr/local/lib:$LD_LIBRARY_PATH
|
LD_LIBRARY_PATH: $SNAP/usr/local/lib:$LD_LIBRARY_PATH
|
||||||
# make sure path is set up to ensure things like photorec are found
|
# make sure path is set up to ensure things like photorec are found
|
||||||
PATH: $SNAP/usr/bin:$SNAP/usr/local/bin:$PATH
|
PATH: $SNAP/usr/bin:$SNAP/usr/local/bin:$PATH
|
||||||
@ -43,112 +44,107 @@ apps:
|
|||||||
common-id: org.sleuthkit.autopsy
|
common-id: org.sleuthkit.autopsy
|
||||||
plugs:
|
plugs:
|
||||||
# taken from https://snapcraft.io/docs/supported-interfaces
|
# taken from https://snapcraft.io/docs/supported-interfaces
|
||||||
- audio-playback
|
- audio-playback
|
||||||
- avahi-observe
|
- avahi-observe
|
||||||
- block-devices
|
- block-devices
|
||||||
- cifs-mount
|
- cifs-mount
|
||||||
- daemon-notify
|
- daemon-notify
|
||||||
- desktop
|
- desktop
|
||||||
- desktop-launch
|
- desktop-launch
|
||||||
- desktop-legacy
|
- desktop-legacy
|
||||||
- dm-crypt
|
- dm-crypt
|
||||||
- firewall-control
|
- firewall-control
|
||||||
- fuse-support
|
- fuse-support
|
||||||
- hardware-observe
|
- hardware-observe
|
||||||
- home
|
- home
|
||||||
- kernel-crypto-api
|
- kernel-crypto-api
|
||||||
- log-observe
|
- log-observe
|
||||||
- mount-observe
|
- mount-observe
|
||||||
- network
|
- network
|
||||||
- network-manager
|
- network-manager
|
||||||
- network-observe
|
- network-observe
|
||||||
- network-setup-observe
|
- network-setup-observe
|
||||||
- network-status
|
- network-status
|
||||||
- opengl
|
- opengl
|
||||||
- optical-drive
|
- optical-drive
|
||||||
- pulseaudio
|
- pulseaudio
|
||||||
- raw-input
|
- raw-input
|
||||||
- raw-usb
|
- raw-usb
|
||||||
- removable-media
|
- removable-media
|
||||||
- sd-control
|
- sd-control
|
||||||
- system-files-autopsy
|
- system-files-autopsy
|
||||||
- system-observe
|
- system-observe
|
||||||
- system-trace
|
- system-trace
|
||||||
- udisks2
|
- udisks2
|
||||||
- unity7
|
- unity7
|
||||||
- unity8
|
- unity8
|
||||||
- wayland
|
- wayland
|
||||||
- x11
|
- x11
|
||||||
|
|
||||||
parts:
|
parts:
|
||||||
sleuthkit:
|
sleuthkit:
|
||||||
plugin: autotools
|
plugin: autotools
|
||||||
source: https://github.com/sleuthkit/sleuthkit.git
|
source: https://github.com/sleuthkit/sleuthkit.git
|
||||||
source-branch: develop
|
|
||||||
# source-tag: sleuthkit-4.11.1
|
|
||||||
build-environment: [JAVA_HOME: /usr/lib/jvm/bellsoft-java8-full-amd64]
|
build-environment: [JAVA_HOME: /usr/lib/jvm/bellsoft-java8-full-amd64]
|
||||||
build-packages:
|
build-packages:
|
||||||
- build-essential
|
- build-essential
|
||||||
- autoconf
|
- autoconf
|
||||||
- libtool
|
- libtool
|
||||||
- automake
|
- automake
|
||||||
- zip
|
- zip
|
||||||
- ant
|
- ant
|
||||||
- ant-contrib
|
- ant-contrib
|
||||||
- ant-optional
|
- ant-optional
|
||||||
- bellsoft-java8-full
|
- bellsoft-java8-full
|
||||||
- libpq-dev
|
- libpq-dev
|
||||||
- testdisk
|
- testdisk
|
||||||
- libafflib-dev
|
- libafflib-dev
|
||||||
- libewf-dev
|
- libewf-dev
|
||||||
- libvhdi-dev
|
- libvhdi-dev
|
||||||
- libvmdk-dev
|
- libvmdk-dev
|
||||||
stage-packages:
|
stage-packages:
|
||||||
- build-essential
|
- build-essential
|
||||||
- libpq-dev
|
- libpq-dev
|
||||||
- testdisk
|
- testdisk
|
||||||
- libafflib-dev
|
- libafflib-dev
|
||||||
- libewf-dev
|
- libewf-dev
|
||||||
- libvhdi-dev
|
- libvhdi-dev
|
||||||
- libvmdk-dev
|
- libvmdk-dev
|
||||||
|
source-tag: sleuthkit-4.11.1
|
||||||
autopsy:
|
autopsy:
|
||||||
after: [sleuthkit]
|
after: [sleuthkit]
|
||||||
build-packages:
|
build-packages:
|
||||||
- zip
|
- zip
|
||||||
- unzip
|
- unzip
|
||||||
- ant
|
- ant
|
||||||
- bellsoft-java8-full
|
- bellsoft-java8-full
|
||||||
- doxygen
|
- doxygen
|
||||||
stage-packages:
|
stage-packages:
|
||||||
- libde265-dev
|
- libde265-dev
|
||||||
- libheif-dev
|
- libheif-dev
|
||||||
- libpq-dev
|
- libpq-dev
|
||||||
- testdisk
|
- testdisk
|
||||||
- libgstreamer1.0-0
|
- libgstreamer1.0-0
|
||||||
- gstreamer1.0-plugins-base
|
- gstreamer1.0-plugins-base
|
||||||
- gstreamer1.0-plugins-good
|
- gstreamer1.0-plugins-good
|
||||||
- gstreamer1.0-plugins-bad
|
- gstreamer1.0-plugins-bad
|
||||||
- gstreamer1.0-plugins-ugly
|
- gstreamer1.0-plugins-ugly
|
||||||
- gstreamer1.0-libav
|
- gstreamer1.0-libav
|
||||||
- gstreamer1.0-tools
|
- gstreamer1.0-tools
|
||||||
- gstreamer1.0-x
|
- gstreamer1.0-x
|
||||||
- gstreamer1.0-alsa
|
- gstreamer1.0-alsa
|
||||||
- gstreamer1.0-gl
|
- gstreamer1.0-gl
|
||||||
- gstreamer1.0-gtk3
|
- gstreamer1.0-gtk3
|
||||||
- gstreamer1.0-qt5
|
- gstreamer1.0-qt5
|
||||||
- gstreamer1.0-pulseaudio
|
- gstreamer1.0-pulseaudio
|
||||||
- bellsoft-java8-full
|
- bellsoft-java8-full
|
||||||
- perl
|
- perl
|
||||||
plugin: nil
|
plugin: nil
|
||||||
source: https://github.com/gdicristofaro/autopsy.git
|
source: https://github.com/sleuthkit/autopsy.git
|
||||||
source-branch: 8425_linuxMacBuild
|
build-environment:
|
||||||
# source: https://github.com/sleuthkit/autopsy.git
|
- JAVA_HOME: /usr/lib/jvm/bellsoft-java8-full-amd64
|
||||||
# source-branch: develop
|
- TSK_JAVA_LIB_PATH: $SNAPCRAFT_STAGE/usr/local/share/java
|
||||||
# source-tag: autopsy-4.19.3
|
override-build: |-
|
||||||
build-environment:
|
|
||||||
- JAVA_HOME: /usr/lib/jvm/bellsoft-java8-full-amd64
|
|
||||||
- TSK_JAVA_LIB_PATH: $SNAPCRAFT_STAGE/usr/local/share/java
|
|
||||||
override-build: |
|
|
||||||
# ----- BUILD ZIP -----
|
# ----- BUILD ZIP -----
|
||||||
AUTOPSY_SRC_PATH=$(pwd)
|
AUTOPSY_SRC_PATH=$(pwd)
|
||||||
NETBEANS_PLAT_VER=$(grep "netbeans-plat-version=" "$AUTOPSY_SRC_PATH/nbproject/platform.properties" | cut -d'=' -f2)
|
NETBEANS_PLAT_VER=$(grep "netbeans-plat-version=" "$AUTOPSY_SRC_PATH/nbproject/platform.properties" | cut -d'=' -f2)
|
||||||
@ -176,4 +172,5 @@ parts:
|
|||||||
chmod 755 "$AUTOPSY_LOCATION/bin/autopsy"
|
chmod 755 "$AUTOPSY_LOCATION/bin/autopsy"
|
||||||
|
|
||||||
# include this line to print all set variables
|
# include this line to print all set variables
|
||||||
# sed -i '129 i set -o posix ; echo $(set) >&2 ; ls -l "${jdkhome}/bin/java"' "$AUTOPSY_LOCATION/platform/lib/nbexec"
|
# sed -i '129 i set -o posix ; echo $(set) >&2 ; ls -l "${jdkhome}/bin/java"' "$AUTOPSY_LOCATION/platform/lib/nbexec"
|
||||||
|
source-tag: autopsy-4.19.3
|
||||||
|
2
snap/version_update/.gitignore
vendored
Normal file
2
snap/version_update/.gitignore
vendored
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
/.idea
|
||||||
|
/venv
|
3
snap/version_update/requirements.txt
Normal file
3
snap/version_update/requirements.txt
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
argparse==1.4.0
|
||||||
|
#PyYAML==6.0
|
||||||
|
ruamel.yaml==0.17.21
|
75
snap/version_update/snap_version_update.py
Normal file
75
snap/version_update/snap_version_update.py
Normal file
@ -0,0 +1,75 @@
|
|||||||
|
import sys
|
||||||
|
import argparse
|
||||||
|
import ruamel.yaml
|
||||||
|
from typing import Union
|
||||||
|
from os.path import join, dirname, abspath, realpath
|
||||||
|
|
||||||
|
SNAPCRAFT_YAML_PATH = join(dirname(dirname(abspath(realpath(__file__)))), 'snapcraft.yaml')
|
||||||
|
SLEUTHKIT_REPO = 'https://github.com/sleuthkit/sleuthkit.git'
|
||||||
|
AUTOPSY_REPO = 'https://github.com/sleuthkit/autopsy.git'
|
||||||
|
|
||||||
|
|
||||||
|
def update_versions(sleuthkit_version_tag: str,
|
||||||
|
autopsy_version_tag: str,
|
||||||
|
snapcraft_version: str,
|
||||||
|
snapcraft_yaml_path: Union[str, None],
|
||||||
|
sleuthkit_repo: Union[str, None],
|
||||||
|
autopsy_repo: Union[str, None]):
|
||||||
|
|
||||||
|
snapcraft_yaml_path = snapcraft_yaml_path if snapcraft_yaml_path is not None and len(
|
||||||
|
snapcraft_yaml_path.strip()) > 0 else SNAPCRAFT_YAML_PATH
|
||||||
|
sleuthkit_repo = sleuthkit_repo if sleuthkit_repo is not None and len(
|
||||||
|
sleuthkit_repo.strip()) > 0 else SLEUTHKIT_REPO
|
||||||
|
autopsy_repo = autopsy_repo if autopsy_repo is not None and len(
|
||||||
|
autopsy_repo.strip()) > 0 else AUTOPSY_REPO
|
||||||
|
|
||||||
|
yaml = ruamel.yaml.YAML()
|
||||||
|
with open(snapcraft_yaml_path) as snapcraft_file:
|
||||||
|
yaml_dict = yaml.load(snapcraft_file)
|
||||||
|
|
||||||
|
yaml_dict['version'] = snapcraft_version
|
||||||
|
|
||||||
|
yaml_dict['parts']['sleuthkit']['source'] = sleuthkit_repo
|
||||||
|
yaml_dict['parts']['sleuthkit']['source-tag'] = sleuthkit_version_tag
|
||||||
|
yaml_dict['parts']['sleuthkit'].pop('source-branch', None)
|
||||||
|
|
||||||
|
yaml_dict['parts']['autopsy']['source'] = autopsy_repo
|
||||||
|
yaml_dict['parts']['autopsy']['source-tag'] = autopsy_version_tag
|
||||||
|
yaml_dict['parts']['autopsy'].pop('source-branch', None)
|
||||||
|
|
||||||
|
with open(snapcraft_yaml_path, "w") as snapcraft_file:
|
||||||
|
yaml.dump(yaml_dict, snapcraft_file)
|
||||||
|
|
||||||
|
|
||||||
|
def main() -> int:
|
||||||
|
parser = argparse.ArgumentParser(
|
||||||
|
description="Updates snapcraft.yml file with current versions of autopsy and sleuthkit",
|
||||||
|
formatter_class=argparse.ArgumentDefaultsHelpFormatter)
|
||||||
|
|
||||||
|
parser.add_argument('-s', '--sleuthkit_tag', required=True, dest='sleuthkit_version_tag', type=str,
|
||||||
|
help='The git tag to use for sleuthkit.')
|
||||||
|
parser.add_argument('-a', '--autopsy_tag', required=True, dest='autopsy_version_tag', type=str,
|
||||||
|
help='The git tag to use for autopsy.')
|
||||||
|
parser.add_argument('-v', '--version', required=True, dest='snapcraft_version', type=str,
|
||||||
|
help='Version for snapcraft metadata.')
|
||||||
|
|
||||||
|
parser.add_argument('-p', '--snapcraft_path', dest='snapcraft_yaml_path', type=str, default=SNAPCRAFT_YAML_PATH,
|
||||||
|
help='Path to snapcraft.yaml.')
|
||||||
|
parser.add_argument('--sleuthkit_repo', dest='sleuthkit_repo', type=str, default=SLEUTHKIT_REPO,
|
||||||
|
help='Location of sleuthkit repo.')
|
||||||
|
parser.add_argument('--autopsy_repo', dest='autopsy_repo', type=str, default=AUTOPSY_REPO,
|
||||||
|
help='Location of sleuthkit repo.')
|
||||||
|
|
||||||
|
args = parser.parse_args()
|
||||||
|
update_versions(
|
||||||
|
sleuthkit_version_tag=args.sleuthkit_version_tag,
|
||||||
|
autopsy_version_tag=args.autopsy_version_tag,
|
||||||
|
snapcraft_version=args.snapcraft_version,
|
||||||
|
snapcraft_yaml_path=args.snapcraft_yaml_path,
|
||||||
|
sleuthkit_repo=args.sleuthkit_repo,
|
||||||
|
autopsy_repo=args.autopsy_repo
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
sys.exit(main())
|
Loading…
x
Reference in New Issue
Block a user