diff --git a/KeywordSearch/solr/bin/autopsy-solr b/KeywordSearch/solr/bin/autopsy-solr index 3b99bbb6b8..dab19776fc 100755 --- a/KeywordSearch/solr/bin/autopsy-solr +++ b/KeywordSearch/solr/bin/autopsy-solr @@ -2240,6 +2240,7 @@ function start_solr() { exec "$JAVA" "${SOLR_START_OPTS[@]}" $SOLR_ADDL_ARGS -jar start.jar "${SOLR_JETTY_CONFIG[@]}" $SOLR_JETTY_ADDL_CONFIG else # run Solr in the background + echo "Starting server with \"$JAVA\" \"${SOLR_START_OPTS[@]}\" $SOLR_ADDL_ARGS -jar start.jar \"${SOLR_JETTY_CONFIG[@]}\" $SOLR_JETTY_ADDL_CONFIG in pwd: $(pwd)" nohup "$JAVA" "${SOLR_START_OPTS[@]}" $SOLR_ADDL_ARGS -Dsolr.log.muteconsole \ "-XX:OnOutOfMemoryError=$SOLR_TIP/bin/oom_solr.sh $SOLR_PORT $SOLR_LOGS_DIR" \ -jar start.jar "${SOLR_JETTY_CONFIG[@]}" $SOLR_JETTY_ADDL_CONFIG \ diff --git a/KeywordSearch/solr/bin/autopsy-solr.in.sh b/KeywordSearch/solr/bin/autopsy-solr.in.sh index a50411ab07..87ee5902ae 100755 --- a/KeywordSearch/solr/bin/autopsy-solr.in.sh +++ b/KeywordSearch/solr/bin/autopsy-solr.in.sh @@ -93,7 +93,7 @@ #SOLR_OPTS="$SOLR_OPTS -Dsolr.autoSoftCommit.maxTime=3000" #SOLR_OPTS="$SOLR_OPTS -Dsolr.autoCommit.maxTime=60000" #SOLR_OPTS="$SOLR_OPTS -Dsolr.clustering.enabled=true" -SOLR_OPTS=$SOLR_OPTS -Dbootstrap_confdir=../solr/configsets/AutopsyConfig/conf -Dcollection.configName=AutopsyConfig -Dsolr.default.confdir=../solr/configsets/AutopsyConfig/conf +SOLR_OPTS="$SOLR_OPTS -Dbootstrap_confdir=../solr/configsets/AutopsyConfig/conf -Dcollection.configName=AutopsyConfig -Dsolr.default.confdir=../solr/configsets/AutopsyConfig/conf " # Location where the bin/solr script will save PID files for running instances diff --git a/snap/gui/autopsy.desktop b/snap/gui/autopsy.desktop new file mode 100644 index 0000000000..24de9544a6 --- /dev/null +++ b/snap/gui/autopsy.desktop @@ -0,0 +1,2 @@ +Exec=autopsy +Icon=${SNAP}/meta/gui/autopsy.png \ No newline at end of file diff --git a/snap/gui/autopsy.png b/snap/gui/autopsy.png new file mode 100644 index 0000000000..3173fb97b5 Binary files /dev/null and b/snap/gui/autopsy.png differ diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml new file mode 100644 index 0000000000..ce316fa23b --- /dev/null +++ b/snap/snapcraft.yaml @@ -0,0 +1,198 @@ +name: autopsy # you probably want to 'snapcraft register ' +base: core20 # the base snap is the execution environment for this snap +version: '0.1' # just for humans, typically '1.2+git' or '1.3.2' +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. +grade: stable # must be 'stable' to release into candidate/stable channels +# TODO look into turning back to strict for store inclusion +confinement: classic # use 'strict' once you have the right plugs and slots +architectures: [amd64, arm64] + +# Java package repo to use with snapcraft +package-repositories: + - type: apt + formats: [deb] + components: [main] + suites: [stable] + key-id: 99A5C88E3C5B1FA8B05A19D332E9750179FCEA62 + url: https://apt.bell-sw.com/ + +layout: + /usr/lib/jvm/bellsoft-java8-full-amd64: + bind: $SNAP/usr/lib/jvm/bellsoft-java8-full-amd64 + /usr/bin/photorec: + symlink: $SNAP/usr/bin/photorec + /usr/local/bin: + bind: $SNAP/usr/local/bin + # /usr/local/lib: + # bind: $SNAP/usr/local/lib + # $HOME/.autopsy: + # bind: $HOME/$SNAP/.autopsy + +plugs: + home-autopsy: + interface: home + read: all + # personal-files-autopsy: + # interface: personal-files + # read: [$HOME/.autopsy] + system-files-autopsy: + interface: system-files + read: [/dev] + +apps: + autopsy: + environment: + jdkhome: /usr/lib/jvm/bellsoft-java8-full-amd64 + LD_LIBRARY_PATH: $SNAP/usr/local/lib:$LD_LIBRARY_PATH + PATH: $SNAP/usr/local/bin:$PATH + command: autopsy/bin/autopsy + common-id: org.sleuthkit.autopsy + plugs: + # TODO verify these: + # taken from https://snapcraft.io/docs/supported-interfaces + - audio-playback + - avahi-observe + - block-devices + - cifs-mount + # - custom-device + - daemon-notify + # - dbus + - desktop + - desktop-launch + - desktop-legacy + - dm-crypt + - firewall-control + - fuse-support + - hardware-observe + - home + - kernel-crypto-api + #- locale-control + - log-observe + #- mount-control + - mount-observe + - network + # - network-bind + # - network-manager + - network-observe + - network-setup-observe + - network-status + # - online-accounts-service + - opengl + - optical-drive + # - personal-files-autopsy + # - posix-mq + - pulseaudio + - raw-input + - raw-usb + # - raw-volume + - removable-media + - sd-control + - system-files-autopsy + - system-observe + - system-trace + - udisks2 + - unity7 + - unity8 + - wayland + - x11 + +parts: + sleuthkit: + plugin: autotools + 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-packages: + - build-essential + - autoconf + - libtool + - automake + - zip + - ant + - ant-contrib + - ant-optional + - bellsoft-java8-full + - libpq-dev + - testdisk + - libafflib-dev + - libewf-dev + - libvhdi-dev + - libvmdk-dev + stage-packages: + - libpq-dev + - testdisk + - libafflib-dev + - libewf-dev + - libvhdi-dev + - libvmdk-dev + autopsy: + after: [sleuthkit] + build-packages: + - zip + - unzip + - ant + - bellsoft-java8-full + - doxygen + stage-packages: + - libde265-dev + - libheif-dev + - libpq-dev + - testdisk + - libgstreamer1.0-0 + - gstreamer1.0-plugins-base + - gstreamer1.0-plugins-good + - gstreamer1.0-plugins-bad + - gstreamer1.0-plugins-ugly + - gstreamer1.0-libav + - gstreamer1.0-tools + - gstreamer1.0-x + - gstreamer1.0-alsa + - gstreamer1.0-gl + - gstreamer1.0-gtk3 + - gstreamer1.0-qt5 + - gstreamer1.0-pulseaudio + - bellsoft-java8-full + - perl + plugin: nil + source: https://github.com/gdicristofaro/autopsy.git + source-branch: 8425_linuxMacBuild + # source: https://github.com/sleuthkit/autopsy.git + # source-branch: develop + # source-tag: autopsy-4.19.3 + 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 ----- + AUTOPSY_SRC_PATH=$(pwd) + NETBEANS_PLAT_VER=$(grep "netbeans-plat-version=" "$AUTOPSY_SRC_PATH/nbproject/platform.properties" | cut -d'=' -f2) + AUTOPSY_PLATFORM_PATH="$AUTOPSY_SRC_PATH/netbeans-plat/$NETBEANS_PLAT_VER" + AUTOPSY_HARNESS_PATH="$AUTOPSY_PLATFORM_PATH/harness" + export TSK_HOME="$HOME/parts/sleuthkit/build" + ant -Dnbplatform.active.dir="$AUTOPSY_PLATFORM_PATH" -Dnbplatform.default.harness.dir="$AUTOPSY_HARNESS_PATH" build build-zip + + # ----- SETUP EXTRACT DIRECTORY ----- + AUTOPSY_LOCATION="$SNAPCRAFT_PART_INSTALL/autopsy" + mkdir -p $AUTOPSY_LOCATION + AUTOPSY_ZIP=$(find ./dist -maxdepth 1 -name "autopsy-*.*.*.zip") + AUTOPSY_ZIP_TMP_LOC=./dist/autopsy_tmp_zip_loc + mkdir -p $AUTOPSY_ZIP_TMP_LOC + unzip $AUTOPSY_ZIP -d $AUTOPSY_ZIP_TMP_LOC + AUTOPSY_EXTRACTED_TMP_LOC=$(find $AUTOPSY_ZIP_TMP_LOC -maxdepth 1 -name "autopsy-*.*.*") + cp -r $AUTOPSY_EXTRACTED_TMP_LOC/* $AUTOPSY_LOCATION + + # ----- RUN UNIX SETUP SCRIPT ----- + UNIX_SETUP_SCRIPT="$AUTOPSY_LOCATION/unix_setup.sh" + chmod +x $UNIX_SETUP_SCRIPT + $UNIX_SETUP_SCRIPT + chmod 755 "$AUTOPSY_LOCATION/bin/autopsy" + # TODO is this necessary? + find "$AUTOPSY_LOCATION/autopsy/markmckinnon" -name "Export*" -o -name "parse*" | xargs -I{} chmod a+x {} + # TODO is this necessary? + chmod -R a+x "$AUTOPSY_LOCATION/autopsy/solr/bin" + + # include this line to print all set variables + # TODO remove after debugging + sed -i '129 i set -o posix ; echo $(set) >&2' "$AUTOPSY_LOCATION/platform/lib/nbexec" \ No newline at end of file diff --git a/unix_setup.sh b/unix_setup.sh index bfb4e8ad01..6b7a8c01ed 100644 --- a/unix_setup.sh +++ b/unix_setup.sh @@ -84,8 +84,11 @@ if [ -f "/usr/share/java/sleuthkit-$TSK_VERSION.jar" ]; then elif [ -f "/usr/local/share/java/sleuthkit-$TSK_VERSION.jar" ]; then sleuthkit_jar_filepath=/usr/local/share/java/sleuthkit-$TSK_VERSION.jar echo "found in $(dirname $sleuthkit_jar_filepath)" +elif [ -n $TSK_JAVA_LIB_PATH ] && [ -f "$TSK_JAVA_LIB_PATH/sleuthkit-$TSK_VERSION.jar" ]; then + sleuthkit_jar_filepath=$TSK_JAVA_LIB_PATH/sleuthkit-$TSK_VERSION.jar + echo "found in $(dirname $sleuthkit_jar_filepath)" else - echo "ERROR: sleuthkit-$TSK_VERSION.jar not found in /usr/share/java/ or /usr/local/share/java/." + echo "ERROR: sleuthkit-$TSK_VERSION.jar not found in /usr/share/java/, /usr/local/share/java/, or the environment variable: 'TSK_JAVA_LIB_PATH'." echo "Please install the Sleuth Kit Java bindings file." echo "See https://github.com/sleuthkit/sleuthkit/releases." exit 1