This commit is contained in:
Greg DiCristofaro 2023-07-16 12:08:03 -04:00
parent 264a247558
commit 192e23e754

View File

@ -32,8 +32,8 @@ apps:
jdkhome: $SNAP/usr/lib/jvm/java-17-openjdk-amd64 jdkhome: $SNAP/usr/lib/jvm/java-17-openjdk-amd64
# provide means for java gstreamer to find gstreamer libs # provide means for java gstreamer to find gstreamer libs
jreflags: $jreflags '-Djava.io.tmpdir=$HOME/tmp' '-Djna.library.path=$SNAP/usr/lib/x86_64-linux-gnu:$SNAP/usr/local/lib' jreflags: $jreflags '-Djava.io.tmpdir=$HOME/tmp' '-Djna.library.path=$SNAP/usr/lib/x86_64-linux-gnu:$SNAP/usr/local/lib'
# to load libtsk.so
LD_LIBRARY_PATH: $SNAP/usr/local/lib:$LD_LIBRARY_PATH LD_LIBRARY_PATH: $SNAP/usr/local/lib:$LD_LIBRARY_PATH
#LD_LIBRARY_PATH: ${SNAP}/usr/local/lib:${SNAP}/usr/lib/x86_64-linux-gnu/gstreamer-1.0:${SNAP}/usr/lib/x86_64-linux-gnu:${SNAP}/lib/x86_64-linux-gnu:${SNAP}/usr/lib/x86_64-linux-gnu/glib-2.0:${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
# gstreamer scans for plugins (i.e. app integration plugins). this tells gstreamer where to look for the scanner and libraries # gstreamer scans for plugins (i.e. app integration plugins). this tells gstreamer where to look for the scanner and libraries
@ -41,8 +41,6 @@ apps:
GST_PLUGIN_SCANNER: $SNAP/usr/lib/x86_64-linux-gnu/gstreamer1.0/gstreamer-1.0/gst-plugin-scanner GST_PLUGIN_SCANNER: $SNAP/usr/lib/x86_64-linux-gnu/gstreamer1.0/gstreamer-1.0/gst-plugin-scanner
SOLR_LOGS_DIR: $HOME/.autopsy/dev/solr/logs SOLR_LOGS_DIR: $HOME/.autopsy/dev/solr/logs
SOLR_PID_DIR: $HOME/.autopsy/dev/solr/logs SOLR_PID_DIR: $HOME/.autopsy/dev/solr/logs
# command-chain:
# - autopsy/bin/tmpsetup.sh
command: autopsy/bin/autopsywrapper.sh command: autopsy/bin/autopsywrapper.sh
# More info here: https://snapcraft.io/docs/gnome-extension # More info here: https://snapcraft.io/docs/gnome-extension
extensions: [ gnome ] extensions: [ gnome ]
@ -93,6 +91,7 @@ parts:
source-branch: develop source-branch: develop
#source-tag: sleuthkit-4.12.0 #source-tag: sleuthkit-4.12.0
build-environment: [JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64] build-environment: [JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64]
# may be necessary for classic snaps: https://snapcraft.io/docs/linters-classic#heading--issues-auto
# build-attributes: # build-attributes:
# - enable-patchelf # - enable-patchelf
build-packages: build-packages:
@ -121,6 +120,7 @@ parts:
- libvmdk-dev - libvmdk-dev
autopsy: autopsy:
after: [sleuthkit] after: [sleuthkit]
# may be necessary for classic snaps: https://snapcraft.io/docs/linters-classic#heading--issues-auto
# build-attributes: # build-attributes:
# - enable-patchelf # - enable-patchelf
build-packages: build-packages:
@ -193,11 +193,12 @@ parts:
# snaps run applications with different permissions. This ensures applications can run. # snaps run applications with different permissions. This ensures applications can run.
chmod 755 "$AUTOPSY_LOCATION/bin/autopsy" chmod 755 "$AUTOPSY_LOCATION/bin/autopsy"
# wrapper to setup temp dir if not exists; also could be easily modified for debugging purposes with snap try: https://snapcraft.io/docs/snap-try
cat <<EOF > $AUTOPSY_LOCATION/bin/autopsywrapper.sh cat <<EOF > $AUTOPSY_LOCATION/bin/autopsywrapper.sh
#!/bin/bash #!/bin/bash
mkdir -p \$HOME/tmp mkdir -p \$HOME/tmp
echo Starting Autopsy... echo Starting Autopsy...
\$SNAP/autopsy/bin/autopsy 2>&1 | tee \$HOME/logging.txt \$SNAP/autopsy/bin/autopsy
EOF EOF
chmod 755 $AUTOPSY_LOCATION/bin/autopsywrapper.sh chmod 755 $AUTOPSY_LOCATION/bin/autopsywrapper.sh