Skip to content

Commit

Permalink
Run chmod jspawnhelper also for already present jdk
Browse files Browse the repository at this point in the history
  • Loading branch information
jacodg committed Jan 5, 2024
1 parent 81aabe2 commit 00f7144
Show file tree
Hide file tree
Showing 9 changed files with 18 additions and 77 deletions.
11 changes: 2 additions & 9 deletions ant.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,6 @@ if [[ ! -d "${FR_DIR}${DIR}/" ]]; then
exit $retVal
fi
mv "${FR_DIR}build/tmp/${DIR}//${SUB}" "${FR_DIR}${DIR}"
if [[ -f "${FR_DIR}${DIR}/lib/jspawnhelper" ]]; then
chmod +x "${FR_DIR}${DIR}/lib/jspawnhelper"
fi
fi
ZIP=apache-ant-1.10.10-bin.tar.gz
URL=https://archive.apache.org/dist/ant/binaries/apache-ant-1.10.10-bin.tar.gz
Expand All @@ -66,9 +63,6 @@ if [[ ! -d "${FR_DIR}${DIR}/" ]]; then
exit $retVal
fi
mv "${FR_DIR}build/tmp/${DIR}//${SUB}" "${FR_DIR}${DIR}"
if [[ -f "${FR_DIR}${DIR}/lib/jspawnhelper" ]]; then
chmod +x "${FR_DIR}${DIR}/lib/jspawnhelper"
fi
fi
ZIP=rhino-1.7.14.zip
URL=https://github.com/mozilla/rhino/releases/download/Rhino1_7_14_Release/rhino-1.7.14.zip
Expand All @@ -93,9 +87,6 @@ if [[ ! -d "${FR_DIR}${DIR}/" ]]; then
exit $retVal
fi
mv "${FR_DIR}build/tmp/${DIR}//${SUB}" "${FR_DIR}${DIR}"
if [[ -f "${FR_DIR}${DIR}/lib/jspawnhelper" ]]; then
chmod +x "${FR_DIR}${DIR}/lib/jspawnhelper"
fi
fi
if [[ ! -f "${FR_DIR}build/apache-ant-1.10.10/lib/rhino-1.7.14.jar" ]]; then
rm "${FR_DIR}build/apache-ant-1.10.10/lib/rhino-"*.jar
Expand All @@ -115,6 +106,8 @@ if [[ ! -d "${JDK_17_DIR}" ]]; then
RUN_INSTALL="true"
fi
export JAVA_HOME="${JDK_21_DIR}"
chmod +x "${JDK_21_DIR}/lib/jspawnhelper"

export ANT_HOME="${FR_DIR}build/apache-ant-1.10.10"
if [[ "$RUN_INSTALL" == "true" ]]; then
"${FR_DIR}build/apache-ant-1.10.10/bin/ant" -emacs -buildfile "${FR_DIR}build.xml" install
Expand Down
9 changes: 4 additions & 5 deletions build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1077,7 +1077,9 @@ export JAVA_HOME="$${JDK_11_DIR}"</echo>
<echo file="${filename}.sh" append="true" if:set="fr.use.jdk.17" unless:set="mvn">
export JAVA_HOME="$${JDK_17_DIR}"</echo>
<echo file="${filename}.sh" append="true" if:set="fr.use.jdk.21" unless:set="mvn">
export JAVA_HOME="$${JDK_21_DIR}"</echo>
export JAVA_HOME="$${JDK_21_DIR}"
chmod +x "$${JDK_21_DIR}/lib/jspawnhelper"<!-- prevent "error=13, Permission denied" since Java 17 for tasks like java and chmod, see also https://askubuntu.com/questions/1480995/permission-denied-trying-to-start-a-new-process-from-a-java-application-as-root -->
</echo>
<echo file="${filename}.sh" append="true" if:set="mvn">
# ${maven.remark.line1}
# ${maven.remark.line2}
Expand Down Expand Up @@ -1159,10 +1161,7 @@ if [[ ! -d "$${FR_DIR}$${DIR}/" ]]; then</echo><echo file="${filename}.sh" appen
echo "Please $${DOWNLOAD_HELP}"<!-- when a proxy replaces the content of the zip with an html page saying access is denied curl doesn't notice it and an error occurs when unzipping, hence the user also needs instruction to download manually when unzip fails -->
exit $$retVal
fi
mv "$${FR_DIR}build/tmp/$${DIR}//$${SUB}" "$${FR_DIR}$${DIR}"
if [[ -f "$${FR_DIR}$${DIR}/lib/jspawnhelper" ]]; then
chmod +x "$${FR_DIR}$${DIR}/lib/jspawnhelper"<!-- prevent "error=13, Permission denied" since Java 17 for tasks like java and chmod, see also https://askubuntu.com/questions/1480995/permission-denied-trying-to-start-a-new-process-from-a-java-application-as-root -->
fi</echo><echo file="${filename}.sh" append="true" if:true="${run.install}">
mv "$${FR_DIR}build/tmp/$${DIR}//$${SUB}" "$${FR_DIR}$${DIR}"</echo><echo file="${filename}.sh" append="true" if:true="${run.install}">
RUN_INSTALL="true"<!-- install cacerts when present --></echo><echo file="${filename}.sh" append="true">
fi</echo>
</target>
Expand Down
11 changes: 2 additions & 9 deletions env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,6 @@ if [[ ! -d "${FR_DIR}${DIR}/" ]]; then
exit $retVal
fi
mv "${FR_DIR}build/tmp/${DIR}//${SUB}" "${FR_DIR}${DIR}"
if [[ -f "${FR_DIR}${DIR}/lib/jspawnhelper" ]]; then
chmod +x "${FR_DIR}${DIR}/lib/jspawnhelper"
fi
RUN_INSTALL="true"
fi
ZIP=apache-ant-1.10.10-bin.tar.gz
Expand All @@ -67,9 +64,6 @@ if [[ ! -d "${FR_DIR}${DIR}/" ]]; then
exit $retVal
fi
mv "${FR_DIR}build/tmp/${DIR}//${SUB}" "${FR_DIR}${DIR}"
if [[ -f "${FR_DIR}${DIR}/lib/jspawnhelper" ]]; then
chmod +x "${FR_DIR}${DIR}/lib/jspawnhelper"
fi
fi
ZIP=rhino-1.7.14.zip
URL=https://github.com/mozilla/rhino/releases/download/Rhino1_7_14_Release/rhino-1.7.14.zip
Expand All @@ -94,9 +88,6 @@ if [[ ! -d "${FR_DIR}${DIR}/" ]]; then
exit $retVal
fi
mv "${FR_DIR}build/tmp/${DIR}//${SUB}" "${FR_DIR}${DIR}"
if [[ -f "${FR_DIR}${DIR}/lib/jspawnhelper" ]]; then
chmod +x "${FR_DIR}${DIR}/lib/jspawnhelper"
fi
fi
if [[ ! -f "${FR_DIR}build/apache-ant-1.10.10/lib/rhino-1.7.14.jar" ]]; then
rm "${FR_DIR}build/apache-ant-1.10.10/lib/rhino-"*.jar
Expand All @@ -119,6 +110,8 @@ if [[ ! -d "${FR_DIR}build/apache-maven-3.9.5" ]]; then
RUN_INSTALL="true"
fi
export JAVA_HOME="${JDK_21_DIR}"
chmod +x "${JDK_21_DIR}/lib/jspawnhelper"

export ANT_HOME="${FR_DIR}build/apache-ant-1.10.10"
if [[ "$RUN_INSTALL" == "true" ]]; then
"${FR_DIR}build/apache-ant-1.10.10/bin/ant" -emacs -buildfile "${FR_DIR}build.xml" install
Expand Down
9 changes: 0 additions & 9 deletions mvn.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,6 @@ if [[ ! -d "${FR_DIR}${DIR}/" ]]; then
exit $retVal
fi
mv "${FR_DIR}build/tmp/${DIR}//${SUB}" "${FR_DIR}${DIR}"
if [[ -f "${FR_DIR}${DIR}/lib/jspawnhelper" ]]; then
chmod +x "${FR_DIR}${DIR}/lib/jspawnhelper"
fi
RUN_INSTALL="true"
fi
ZIP=apache-ant-1.10.10-bin.tar.gz
Expand All @@ -67,9 +64,6 @@ if [[ ! -d "${FR_DIR}${DIR}/" ]]; then
exit $retVal
fi
mv "${FR_DIR}build/tmp/${DIR}//${SUB}" "${FR_DIR}${DIR}"
if [[ -f "${FR_DIR}${DIR}/lib/jspawnhelper" ]]; then
chmod +x "${FR_DIR}${DIR}/lib/jspawnhelper"
fi
fi
ZIP=rhino-1.7.14.zip
URL=https://github.com/mozilla/rhino/releases/download/Rhino1_7_14_Release/rhino-1.7.14.zip
Expand All @@ -94,9 +88,6 @@ if [[ ! -d "${FR_DIR}${DIR}/" ]]; then
exit $retVal
fi
mv "${FR_DIR}build/tmp/${DIR}//${SUB}" "${FR_DIR}${DIR}"
if [[ -f "${FR_DIR}${DIR}/lib/jspawnhelper" ]]; then
chmod +x "${FR_DIR}${DIR}/lib/jspawnhelper"
fi
fi
if [[ ! -f "${FR_DIR}build/apache-ant-1.10.10/lib/rhino-1.7.14.jar" ]]; then
rm "${FR_DIR}build/apache-ant-1.10.10/lib/rhino-"*.jar
Expand Down
11 changes: 2 additions & 9 deletions rerun.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,6 @@ if [[ ! -d "${FR_DIR}${DIR}/" ]]; then
exit $retVal
fi
mv "${FR_DIR}build/tmp/${DIR}//${SUB}" "${FR_DIR}${DIR}"
if [[ -f "${FR_DIR}${DIR}/lib/jspawnhelper" ]]; then
chmod +x "${FR_DIR}${DIR}/lib/jspawnhelper"
fi
fi
ZIP=apache-ant-1.10.10-bin.tar.gz
URL=https://archive.apache.org/dist/ant/binaries/apache-ant-1.10.10-bin.tar.gz
Expand All @@ -66,9 +63,6 @@ if [[ ! -d "${FR_DIR}${DIR}/" ]]; then
exit $retVal
fi
mv "${FR_DIR}build/tmp/${DIR}//${SUB}" "${FR_DIR}${DIR}"
if [[ -f "${FR_DIR}${DIR}/lib/jspawnhelper" ]]; then
chmod +x "${FR_DIR}${DIR}/lib/jspawnhelper"
fi
fi
ZIP=rhino-1.7.14.zip
URL=https://github.com/mozilla/rhino/releases/download/Rhino1_7_14_Release/rhino-1.7.14.zip
Expand All @@ -93,9 +87,6 @@ if [[ ! -d "${FR_DIR}${DIR}/" ]]; then
exit $retVal
fi
mv "${FR_DIR}build/tmp/${DIR}//${SUB}" "${FR_DIR}${DIR}"
if [[ -f "${FR_DIR}${DIR}/lib/jspawnhelper" ]]; then
chmod +x "${FR_DIR}${DIR}/lib/jspawnhelper"
fi
fi
if [[ ! -f "${FR_DIR}build/apache-ant-1.10.10/lib/rhino-1.7.14.jar" ]]; then
rm "${FR_DIR}build/apache-ant-1.10.10/lib/rhino-"*.jar
Expand All @@ -106,5 +97,7 @@ JDK_11_DIR="${FR_DIR}build/jdk-11.0.21+9"
JDK_17_DIR="${FR_DIR}build/jdk-17.0.8+7"
JDK_21_DIR="${FR_DIR}build/jdk-21.0.1+12"
export JAVA_HOME="${JDK_21_DIR}"
chmod +x "${JDK_21_DIR}/lib/jspawnhelper"

export ANT_HOME="${FR_DIR}build/apache-ant-1.10.10"
"${FR_DIR}build/apache-ant-1.10.10/bin/ant" -Dfr.jdk.8.dir="${JDK_8_DIR}" -Dfr.jdk.11.dir="${JDK_11_DIR}" -Dfr.jdk.17.dir="${JDK_17_DIR}" -Dfr.jdk.21.dir="${JDK_21_DIR}" -emacs -buildfile "${FR_DIR}build.xml" "$@" rerun
11 changes: 2 additions & 9 deletions restart.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,6 @@ if [[ ! -d "${FR_DIR}${DIR}/" ]]; then
exit $retVal
fi
mv "${FR_DIR}build/tmp/${DIR}//${SUB}" "${FR_DIR}${DIR}"
if [[ -f "${FR_DIR}${DIR}/lib/jspawnhelper" ]]; then
chmod +x "${FR_DIR}${DIR}/lib/jspawnhelper"
fi
fi
ZIP=apache-ant-1.10.10-bin.tar.gz
URL=https://archive.apache.org/dist/ant/binaries/apache-ant-1.10.10-bin.tar.gz
Expand All @@ -66,9 +63,6 @@ if [[ ! -d "${FR_DIR}${DIR}/" ]]; then
exit $retVal
fi
mv "${FR_DIR}build/tmp/${DIR}//${SUB}" "${FR_DIR}${DIR}"
if [[ -f "${FR_DIR}${DIR}/lib/jspawnhelper" ]]; then
chmod +x "${FR_DIR}${DIR}/lib/jspawnhelper"
fi
fi
ZIP=rhino-1.7.14.zip
URL=https://github.com/mozilla/rhino/releases/download/Rhino1_7_14_Release/rhino-1.7.14.zip
Expand All @@ -93,9 +87,6 @@ if [[ ! -d "${FR_DIR}${DIR}/" ]]; then
exit $retVal
fi
mv "${FR_DIR}build/tmp/${DIR}//${SUB}" "${FR_DIR}${DIR}"
if [[ -f "${FR_DIR}${DIR}/lib/jspawnhelper" ]]; then
chmod +x "${FR_DIR}${DIR}/lib/jspawnhelper"
fi
fi
if [[ ! -f "${FR_DIR}build/apache-ant-1.10.10/lib/rhino-1.7.14.jar" ]]; then
rm "${FR_DIR}build/apache-ant-1.10.10/lib/rhino-"*.jar
Expand All @@ -106,5 +97,7 @@ JDK_11_DIR="${FR_DIR}build/jdk-11.0.21+9"
JDK_17_DIR="${FR_DIR}build/jdk-17.0.8+7"
JDK_21_DIR="${FR_DIR}build/jdk-21.0.1+12"
export JAVA_HOME="${JDK_21_DIR}"
chmod +x "${JDK_21_DIR}/lib/jspawnhelper"

export ANT_HOME="${FR_DIR}build/apache-ant-1.10.10"
"${FR_DIR}build/apache-ant-1.10.10/bin/ant" -Dfr.jdk.8.dir="${JDK_8_DIR}" -Dfr.jdk.11.dir="${JDK_11_DIR}" -Dfr.jdk.17.dir="${JDK_17_DIR}" -Dfr.jdk.21.dir="${JDK_21_DIR}" -emacs -buildfile "${FR_DIR}build.xml" "$@" restart
11 changes: 2 additions & 9 deletions run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,6 @@ if [[ ! -d "${FR_DIR}${DIR}/" ]]; then
exit $retVal
fi
mv "${FR_DIR}build/tmp/${DIR}//${SUB}" "${FR_DIR}${DIR}"
if [[ -f "${FR_DIR}${DIR}/lib/jspawnhelper" ]]; then
chmod +x "${FR_DIR}${DIR}/lib/jspawnhelper"
fi
fi
ZIP=apache-ant-1.10.10-bin.tar.gz
URL=https://archive.apache.org/dist/ant/binaries/apache-ant-1.10.10-bin.tar.gz
Expand All @@ -66,9 +63,6 @@ if [[ ! -d "${FR_DIR}${DIR}/" ]]; then
exit $retVal
fi
mv "${FR_DIR}build/tmp/${DIR}//${SUB}" "${FR_DIR}${DIR}"
if [[ -f "${FR_DIR}${DIR}/lib/jspawnhelper" ]]; then
chmod +x "${FR_DIR}${DIR}/lib/jspawnhelper"
fi
fi
ZIP=rhino-1.7.14.zip
URL=https://github.com/mozilla/rhino/releases/download/Rhino1_7_14_Release/rhino-1.7.14.zip
Expand All @@ -93,9 +87,6 @@ if [[ ! -d "${FR_DIR}${DIR}/" ]]; then
exit $retVal
fi
mv "${FR_DIR}build/tmp/${DIR}//${SUB}" "${FR_DIR}${DIR}"
if [[ -f "${FR_DIR}${DIR}/lib/jspawnhelper" ]]; then
chmod +x "${FR_DIR}${DIR}/lib/jspawnhelper"
fi
fi
if [[ ! -f "${FR_DIR}build/apache-ant-1.10.10/lib/rhino-1.7.14.jar" ]]; then
rm "${FR_DIR}build/apache-ant-1.10.10/lib/rhino-"*.jar
Expand All @@ -106,5 +97,7 @@ JDK_11_DIR="${FR_DIR}build/jdk-11.0.21+9"
JDK_17_DIR="${FR_DIR}build/jdk-17.0.8+7"
JDK_21_DIR="${FR_DIR}build/jdk-21.0.1+12"
export JAVA_HOME="${JDK_21_DIR}"
chmod +x "${JDK_21_DIR}/lib/jspawnhelper"

export ANT_HOME="${FR_DIR}build/apache-ant-1.10.10"
"${FR_DIR}build/apache-ant-1.10.10/bin/ant" -Dfr.jdk.8.dir="${JDK_8_DIR}" -Dfr.jdk.11.dir="${JDK_11_DIR}" -Dfr.jdk.17.dir="${JDK_17_DIR}" -Dfr.jdk.21.dir="${JDK_21_DIR}" -emacs -buildfile "${FR_DIR}build.xml" "$@" run
11 changes: 2 additions & 9 deletions start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,6 @@ if [[ ! -d "${FR_DIR}${DIR}/" ]]; then
exit $retVal
fi
mv "${FR_DIR}build/tmp/${DIR}//${SUB}" "${FR_DIR}${DIR}"
if [[ -f "${FR_DIR}${DIR}/lib/jspawnhelper" ]]; then
chmod +x "${FR_DIR}${DIR}/lib/jspawnhelper"
fi
fi
ZIP=apache-ant-1.10.10-bin.tar.gz
URL=https://archive.apache.org/dist/ant/binaries/apache-ant-1.10.10-bin.tar.gz
Expand All @@ -66,9 +63,6 @@ if [[ ! -d "${FR_DIR}${DIR}/" ]]; then
exit $retVal
fi
mv "${FR_DIR}build/tmp/${DIR}//${SUB}" "${FR_DIR}${DIR}"
if [[ -f "${FR_DIR}${DIR}/lib/jspawnhelper" ]]; then
chmod +x "${FR_DIR}${DIR}/lib/jspawnhelper"
fi
fi
ZIP=rhino-1.7.14.zip
URL=https://github.com/mozilla/rhino/releases/download/Rhino1_7_14_Release/rhino-1.7.14.zip
Expand All @@ -93,9 +87,6 @@ if [[ ! -d "${FR_DIR}${DIR}/" ]]; then
exit $retVal
fi
mv "${FR_DIR}build/tmp/${DIR}//${SUB}" "${FR_DIR}${DIR}"
if [[ -f "${FR_DIR}${DIR}/lib/jspawnhelper" ]]; then
chmod +x "${FR_DIR}${DIR}/lib/jspawnhelper"
fi
fi
if [[ ! -f "${FR_DIR}build/apache-ant-1.10.10/lib/rhino-1.7.14.jar" ]]; then
rm "${FR_DIR}build/apache-ant-1.10.10/lib/rhino-"*.jar
Expand All @@ -106,5 +97,7 @@ JDK_11_DIR="${FR_DIR}build/jdk-11.0.21+9"
JDK_17_DIR="${FR_DIR}build/jdk-17.0.8+7"
JDK_21_DIR="${FR_DIR}build/jdk-21.0.1+12"
export JAVA_HOME="${JDK_21_DIR}"
chmod +x "${JDK_21_DIR}/lib/jspawnhelper"

export ANT_HOME="${FR_DIR}build/apache-ant-1.10.10"
"${FR_DIR}build/apache-ant-1.10.10/bin/ant" -Dfr.jdk.8.dir="${JDK_8_DIR}" -Dfr.jdk.11.dir="${JDK_11_DIR}" -Dfr.jdk.17.dir="${JDK_17_DIR}" -Dfr.jdk.21.dir="${JDK_21_DIR}" -emacs -buildfile "${FR_DIR}build.xml" "$@" start
11 changes: 2 additions & 9 deletions stop.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,6 @@ if [[ ! -d "${FR_DIR}${DIR}/" ]]; then
exit $retVal
fi
mv "${FR_DIR}build/tmp/${DIR}//${SUB}" "${FR_DIR}${DIR}"
if [[ -f "${FR_DIR}${DIR}/lib/jspawnhelper" ]]; then
chmod +x "${FR_DIR}${DIR}/lib/jspawnhelper"
fi
fi
ZIP=apache-ant-1.10.10-bin.tar.gz
URL=https://archive.apache.org/dist/ant/binaries/apache-ant-1.10.10-bin.tar.gz
Expand All @@ -66,9 +63,6 @@ if [[ ! -d "${FR_DIR}${DIR}/" ]]; then
exit $retVal
fi
mv "${FR_DIR}build/tmp/${DIR}//${SUB}" "${FR_DIR}${DIR}"
if [[ -f "${FR_DIR}${DIR}/lib/jspawnhelper" ]]; then
chmod +x "${FR_DIR}${DIR}/lib/jspawnhelper"
fi
fi
ZIP=rhino-1.7.14.zip
URL=https://github.com/mozilla/rhino/releases/download/Rhino1_7_14_Release/rhino-1.7.14.zip
Expand All @@ -93,9 +87,6 @@ if [[ ! -d "${FR_DIR}${DIR}/" ]]; then
exit $retVal
fi
mv "${FR_DIR}build/tmp/${DIR}//${SUB}" "${FR_DIR}${DIR}"
if [[ -f "${FR_DIR}${DIR}/lib/jspawnhelper" ]]; then
chmod +x "${FR_DIR}${DIR}/lib/jspawnhelper"
fi
fi
if [[ ! -f "${FR_DIR}build/apache-ant-1.10.10/lib/rhino-1.7.14.jar" ]]; then
rm "${FR_DIR}build/apache-ant-1.10.10/lib/rhino-"*.jar
Expand All @@ -106,5 +97,7 @@ JDK_11_DIR="${FR_DIR}build/jdk-11.0.21+9"
JDK_17_DIR="${FR_DIR}build/jdk-17.0.8+7"
JDK_21_DIR="${FR_DIR}build/jdk-21.0.1+12"
export JAVA_HOME="${JDK_21_DIR}"
chmod +x "${JDK_21_DIR}/lib/jspawnhelper"

export ANT_HOME="${FR_DIR}build/apache-ant-1.10.10"
"${FR_DIR}build/apache-ant-1.10.10/bin/ant" -Dfr.jdk.8.dir="${JDK_8_DIR}" -Dfr.jdk.11.dir="${JDK_11_DIR}" -Dfr.jdk.17.dir="${JDK_17_DIR}" -Dfr.jdk.21.dir="${JDK_21_DIR}" -emacs -buildfile "${FR_DIR}build.xml" "$@" stop

0 comments on commit 00f7144

Please sign in to comment.