You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@solr.apache.org by kr...@apache.org on 2022/11/08 00:52:43 UTC

[solr] branch branch_9_1 updated: Revert "SOLR-16457: solr.data.home should not be set to empty string in bin/solr (#1066)" (#1165)

This is an automated email from the ASF dual-hosted git repository.

krisden pushed a commit to branch branch_9_1
in repository https://gitbox.apache.org/repos/asf/solr.git


The following commit(s) were added to refs/heads/branch_9_1 by this push:
     new a46d75ac8dd Revert "SOLR-16457: solr.data.home should not be set to empty string in bin/solr (#1066)" (#1165)
a46d75ac8dd is described below

commit a46d75ac8dd4a3550220c2ef46279873514749ce
Author: Kevin Risden <ri...@users.noreply.github.com>
AuthorDate: Mon Nov 7 19:52:38 2022 -0500

    Revert "SOLR-16457: solr.data.home should not be set to empty string in bin/solr (#1066)" (#1165)
    
    This reverts commit e9100b9383a1f7e85285b381f5ee3eefda7814b4.
---
 solr/CHANGES.txt                               | 2 --
 solr/bin/solr                                  | 3 +--
 solr/docker/templates/Dockerfile.body.template | 1 -
 solr/server/etc/security.policy                | 4 ----
 4 files changed, 1 insertion(+), 9 deletions(-)

diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt
index d5a9c38ef96..9538c62db0d 100644
--- a/solr/CHANGES.txt
+++ b/solr/CHANGES.txt
@@ -153,8 +153,6 @@ Bug Fixes
 
 * SOLR-16229: Http2SolrClient aborts requests on exception (Daniel Rabus, Tomás Fernández Löbbe)
 
-* SOLR-16457: solr.data.home should not be set to empty string in bin/solr (Kevin Risden)
-
 * SOLR-16433: Security Manager prevents Solr SQL from working (Kevin Risden)
 
 * SOLR-16460: ClusterState.copyWith is inconsistent (noble)
diff --git a/solr/bin/solr b/solr/bin/solr
index 936941f7347..eed0272eb32 100755
--- a/solr/bin/solr
+++ b/solr/bin/solr
@@ -2230,7 +2230,6 @@ function start_solr() {
     fi
 
     if [ -n "${SOLR_DATA_HOME:-}" ]; then
-      SOLR_OPTS+=("-Dsolr.data.home=$SOLR_DATA_HOME")
       echo -e "    SOLR_DATA_HOME  = $SOLR_DATA_HOME"
     fi
     echo
@@ -2257,7 +2256,7 @@ function start_solr() {
     # users who don't care about useful error msgs can override in SOLR_OPTS with +OmitStackTraceInFastThrow
     "${SOLR_HOST_ARG[@]}" "-Duser.timezone=$SOLR_TIMEZONE" "-XX:-OmitStackTraceInFastThrow" \
     "-XX:OnOutOfMemoryError=$SOLR_TIP/bin/oom_solr.sh $SOLR_PORT $SOLR_LOGS_DIR" \
-    "-Djetty.home=$SOLR_SERVER_DIR" "-Dsolr.solr.home=$SOLR_HOME" "-Dsolr.install.dir=$SOLR_TIP" \
+    "-Djetty.home=$SOLR_SERVER_DIR" "-Dsolr.solr.home=$SOLR_HOME" "-Dsolr.data.home=${SOLR_DATA_HOME:-}" "-Dsolr.install.dir=$SOLR_TIP" \
     "-Dsolr.default.confdir=$DEFAULT_CONFDIR" "${LOG4J_CONFIG[@]}" "${SOLR_OPTS[@]}" "${SECURITY_MANAGER_OPTS[@]}" "${SOLR_ADMIN_UI}")
 
   mk_writable_dir "$SOLR_LOGS_DIR" "Logs"
diff --git a/solr/docker/templates/Dockerfile.body.template b/solr/docker/templates/Dockerfile.body.template
index 4177aa4b014..27ea08dc4a5 100644
--- a/solr/docker/templates/Dockerfile.body.template
+++ b/solr/docker/templates/Dockerfile.body.template
@@ -45,7 +45,6 @@ ENV SOLR_USER="solr" \
     SOLR_PID_DIR=/var/solr \
     SOLR_LOGS_DIR=/var/solr/logs \
     LOG4J_PROPS=/var/solr/log4j2.xml \
-    SOLR_SERVER_DIR="/opt/solr-${SOLR_VERSION}/server" \
     SOLR_JETTY_HOST="0.0.0.0"
 
 RUN set -ex; \
diff --git a/solr/server/etc/security.policy b/solr/server/etc/security.policy
index 8681d1e3663..b0a07d802a3 100644
--- a/solr/server/etc/security.policy
+++ b/solr/server/etc/security.policy
@@ -27,10 +27,6 @@ grant {
   // system jar resources
   permission java.io.FilePermission "${java.home}${/}-", "read";
 
-  // tmpdir
-  permission java.io.FilePermission "${java.io.tmpdir}", "read,write";
-  permission java.io.FilePermission "${java.io.tmpdir}${/}-", "read,write,delete";
-
   // Test launchers (randomizedtesting, etc.)
   permission java.io.FilePermission "${junit4.childvm.cwd}", "read";
   permission java.io.FilePermission "${junit4.childvm.cwd}${/}temp", "read,write,delete";