Slackbot
03/21/2022, 10:50 PMVampire
03/21/2022, 11:07 PMRamakrishna
03/22/2022, 12:40 AMstartScripts
task in our build.gradle
file to generate the scripts for cross platforms along with some replace token instructions for $APP_NAME etc, during this task execution it is using those new POSIX shell script changes to generate the final application scripts which does not understood by my BASH based shell and throws an error like below,
ERROR com.oracle.dicom.agent.core.DIAgentInstallation - java.io.FileNotFoundException: /etc/runit/artifacts/sample-service/$APP_HOME/template/config-template.jar (No such file or directory)
in the above error $APP_NAME is the token which gets replaced with proper APP_NAME which is NOT happening due to changes made to scripts mentioned in my earlier msg.Ramakrishna
03/22/2022, 12:41 AMcreateConfigureAgentApp {
classpath += files('../__ETC__')
doLast {
unixScript.text = unixScript.text.replace('MY_APP_HOME', '\$APP_HOME')
windowsScript.text = windowsScript.text.replace('MY_APP_HOME', '%~dp0..')
unixScript.text = unixScript.text.replace('__ETC__', '../etc')
windowsScript.text = windowsScript.text.replace('__ETC__', '..\\etc')
}
}
Vampire
03/22/2022, 12:44 AMMY_APP_HOME
is used where?
Probably somewhere it was expanded earlier, which was exactly using that vulnerability that was fixed now.ephemient
03/22/2022, 2:47 AMstartScripts {
unixStartScriptGenerator.template = resources.text.fromString("customUnixStartScript.txt")
}
better than editing it after the factVampire
03/22/2022, 11:46 AMbetter than editing it after the fact
I don't agree to that statement. You miss improvements to the built-in templates then. I usually prefer some replacement on the result too for these scripts.
ephemient
03/22/2022, 12:30 PMRamakrishna
03/22/2022, 10:23 PM6.9.2
version for our internal builds.
@Vampire I agree with you we should not override and loose the new functionality and fixes. But the new changes looks to be breaking/regressing the users whose default shell is bash
which is not a POSIX complaint in nature out-of-box.
Off the topic, I’m curious to know why the updated version of gradlew
wrapper script file is reverted in the issue where it introduced these POSIX shell script improvements? If 6.9.2 is adding this support, it should also be shipped with updated wrapper script which is POSIX compliance right? Is it something is missing in the 6.9.2 Git Tag or it is a known change?