From 36b6c20ef3022f4b39739ac4d21e5ecf0f482615 Mon Sep 17 00:00:00 2001
From: Greg DiCristofaro <gregd@basistech.com>
Date: Mon, 17 Jul 2023 10:47:44 -0400
Subject: [PATCH] some updates for solr

---
 snap/snapcraft.yaml | 22 +++++++++++++---------
 1 file changed, 13 insertions(+), 9 deletions(-)

diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml
index f86770d7b1..bd81cd8227 100644
--- a/snap/snapcraft.yaml
+++ b/snap/snapcraft.yaml
@@ -18,15 +18,14 @@ plugs:
     read: [/dev]
 
 
-layout:
-  # java appears to find the real home and write some stuff there
-  $SNAP_REAL_HOME/.icesoft:
-    bind: $SNAP_DATA/.icesoft
-  $SNAP_REAL_HOME/.java:
-    bind: $SNAP_DATA/.java
-  $SNAP_REAL_HOME/.openjfx:
-    bind: $SNAP_DATA/.openjfx
 # does not appear necessary as writing to home directory gets written to $SNAP_USER_DATA: https://snapcraft.io/docs/environment-variables
+#layout:
+  # $SNAP_REAL_HOME/.icesoft:
+  #   bind: $SNAP_DATA/.icesoft
+  # $SNAP_REAL_HOME/.java:
+  #   bind: $SNAP_DATA/.java
+  # $SNAP_REAL_HOME/.openjfx:
+  #   bind: $SNAP_DATA/.openjfx
 #   /$SNAP_USER_DATA/tmp:
 #     bind: $SNAP_DATA/tmp
 #   /$SNAP_USER_DATA/.autopsy:
@@ -39,6 +38,7 @@ apps:
   autopsy:
     environment:
       jdkhome: $SNAP/usr/lib/jvm/java-17-openjdk-amd64
+      SOLR_JAVA_HOME: $SNAP/usr/lib/jvm/java-17-openjdk-amd64
       # provide means for java gstreamer to find gstreamer libs with jna.library.path
       # set user home to new home value to avoid issues writing cache files to hom
       jreflags: $jreflags '-Duser.home=$HOME' '-Djava.io.tmpdir=$HOME/tmp' '-Djna.library.path=$SNAP/usr/lib/x86_64-linux-gnu:$SNAP/usr/local/lib'
@@ -51,6 +51,7 @@ apps:
       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_PID_DIR: $HOME/.autopsy/dev/solr/logs
+      SOLR_DATA_HOME: $HOME/solr
     command: autopsy/bin/autopsywrapper.sh
     # More info here: https://snapcraft.io/docs/gnome-extension
     extensions: [ gnome ]
@@ -74,14 +75,15 @@ apps:
     - kernel-crypto-api
     - log-observe
     # may be necessary for solr
+    - microstack-support
     - modem-manager
     - mount-control
     - mount-observe
     - network
-    # may be necessary for solr
     - network-bind
     - network-control
     - network-manager
+    - network-manager-observe
     - network-observe
     - network-setup-observe
     - network-status
@@ -177,6 +179,8 @@ parts:
     - openjdk-17-jre
     - openjdk-17-jdk
     - perl
+    # possibly needed by solr
+    - lsof
     plugin: nil
     # source: https://github.com/sleuthkit/autopsy.git
     source: https://github.com/gdicristofaro/autopsy.git
-- 
GitLab