[SPARK-3234][Build] Fixed environment variables that rely on deprecated command line options in make-distribution.sh
[SPARK-3234][Build] Fixed environment variables that rely on deprecated command line options in make-distribution.sh

Please refer to [SPARK-3234](https://issues.apache.org/jira/browse/SPARK-3234) for details.

Author: Cheng Lian <lian.cs.zju@gmail.com>

Closes #2208 from liancheng/spark-3234 and squashes the following commits:

fb26de8 [Cheng Lian] Fixed SPARK-3234

MLnick/spark,pgandhi999/spark,bravo-zhang/spark,aosagie/spark,highfei2011/spark,loneknightpy/spark,bdrillard/spark,kissmetrics/spark,kimoonkim/spark,shaneknapp/spark,apache/spark,adrian-ionescu/apache-spark,pgandhi999/spark,aray/spark,rekhajoshm/spark,icexelloss/spark,dbtsai/spark,maropu/spark,markhamstra/spark,sahilTakiar/spark,patrick-nicholson/spark,map222/spark,ConeyLiu/spark,kevinyu98/spark,adrian-ionescu/apache-spark,jlopezmalla/spark,setjet/spark,publicRoman/spark,aosagie/spark,saturday-shi/spark,haowu80s/spark,stanzhai/spark,cin/spark,alunarbeach/spark,hhbyyh/spark,big-pegasus/spark,shuangshuangwang/spark,skonto/spark,yanboliang/spark,apache-spark-on-k8s/spark,MLnick/spark,icexelloss/spark,ericvandenbergfb/spark,darionyaphet/spark,xuanyuanking/spark,sahilTakiar/spark,hhbyyh/spark,janewangfb/spark,Panos-Bletsos/spark-cost-model-optimizer,ericvandenbergfb/spark,kimoonkim/spark,gioenn/xSpark,markhamstra/spark,JerryLead/spark,esi-mineset/spark,aray/spark,publicRoman/spark,loneknightpy/spark,zhouyejoe/spark,ptkool/spark,jianran/spark,icexelloss/spark,aokolnychyi/spark,ConeyLiu/spark,kissmetrics/spark,zero323/spark,pgandhi999/spark,aokolnychyi/spark,srowen/spark,vinodkc/spark,metamx/spark,zzcclp/spark,cin/spark,wangyum/spark,loneknightpy/spark,patrick-nicholson/spark,UndeadBaneGitHub/spark,bdrillard/spark,caneGuy/spark,UndeadBaneGitHub/spark,ajaysaini725/spark,haowu80s/spark,goldmedal/spark,WeichenXu123/spark,brad-kaiser/spark,1haodian/spark,ConeyLiu/spark,jiangxb1987/spark,adrian-ionescu/apache-spark,rednaxelafx/apache-spark,jkbradley/spark,chuckchen/spark,andrewor14/iolap,alunarbeach/spark,shubhamchopra/spark,big-pegasus/spark,dongjoon-hyun/spark,sureshthalamati/spark,jianran/spark,tejasapatil/spark,shuangshuangwang/spark,SnappyDataInc/spark,milliman/spark,ueshin/apache-spark,saltstar/spark,akopich/spark,patrick-nicholson/spark,mdespriee/spark,icexelloss/spark,JoshRosen/spark,ibm-research-ireland/sparkoscope,shaneknapp/spark,big-pegasus/spark,caneGuy/spark,publicRoman/spark,1haodian/spark,big-pegasus/spark,someorz/spark,HyukjinKwon/spark,JerryLead/spark,bravo-zhang/spark,liyichao/spark,cin/spark,ericvandenbergfb/spark,saturday-shi/spark,haowu80s/spark,apache/spark,zzcclp/spark,andrewor14/iolap,goldmedal/spark,joseph-torres/spark,Aegeaner/spark,skonto/spark,gengliangwang/spark,actuaryzhang/spark,poffuomo/spark,liyichao/spark,szhem/spark,milliman/spark,metamx/spark,LantaoJin/spark,nlalevee/spark,maropu/spark,debugger87/spark,caneGuy/spark,lxsmnv/spark,markhamstra/spark,chuckchen/spark,wangmiao1981/spark,jkbradley/spark,nilsgrabbert/spark,debugger87/spark,saltstar/spark,mdespriee/spark,cloud-fan/spark,shaneknapp/spark,szhem/spark,kiszk/spark,chuckchen/spark,rikima/spark,MLnick/spark,kevinyu98/spark,Aegeaner/spark,xflin/spark,ptkool/spark,hvanhovell/spark,markhamstra/spark,guoxiaolongzte/spark,jlopezmalla/spark,vinodkc/spark,rikima/spark,sureshthalamati/spark,andrewor14/spark,mahak/spark,joseph-torres/spark,rednaxelafx/apache-spark,kissmetrics/spark,aray/spark,xflin/spark,someorz/spark,esi-mineset/spark,mike0sv/spark,haowu80s/spark,yanboliang/spark,bOOm-X/spark,yanboliang/spark,poffuomo/spark,ioana-delaney/spark,stanzhai/spark,hvanhovell/spark,Panos-Bletsos/spark-cost-model-optimizer,someorz/spark,poffuomo/spark,srowen/spark,wangmiao1981/spark,ajaysaini725/spark,witgo/spark,BryanCutler/spark,bOOm-X/spark,patrick-nicholson/spark,huang1900/spark,eyalfa/spark,zuotingbing/spark,spark-test/spark,xflin/spark,skonto/spark,sureshthalamati/spark,ioana-delaney/spark,ptkool/spark,michalsenkyr/spark,map222/spark,janewangfb/spark,aokolnychyi/spark,someorz/spark,esi-mineset/spark,sahilTakiar/spark,zuotingbing/spark,jiangxb1987/spark,mzl9039/spark,SHASHANKB/spark,lvdongr/spark,apache/spark,kiszk/spark,SHASHANKB/spark,dhruve/spark,apache-spark-on-k8s/spark,ueshin/apache-spark,eyalfa/spark,michalsenkyr/spark,narahari92/spark,aray/spark,bravo-zhang/spark,brad-kaiser/spark,cloud-fan/spark,metamx/spark,BryanCutler/spark,rezasafi/spark,debugger87/spark,milliman/spark,bOOm-X/spark,SnappyDataInc/spark,ibm-research-ireland/sparkoscope,maropu/spark,debugger87/spark,BryanCutler/spark,jianran/spark,liutang123/spark,kevinyu98/spark,kimoonkim/spark,minixalpha/spark,andrewor14/iolap,adrian-ionescu/apache-spark,bdrillard/spark,joseph-torres/spark,byakuinss/spark,dongjoon-hyun/spark,matthewfranglen/spark,gengliangwang/spark,andrewor14/iolap,alunarbeach/spark,ron8hu/spark,sahilTakiar/spark,jrshust/spark,nilsgrabbert/spark,pgandhi999/spark,highfei2011/spark,hhbyyh/spark,cloud-fan/spark,poffuomo/spark,bravo-zhang/spark,wangmiao1981/spark,taroplus/spark,saturday-shi/spark,setjet/spark,zuotingbing/spark,saturday-shi/spark,yanboliang/spark,goldmedal/spark,techaddict/spark,stanzhai/spark,lvdongr/spark,wangyum/spark,jianran/spark,BryanCutler/spark,ConeyLiu/spark,mzl9039/spark,dbtsai/spark,mzl9039/spark,zero323/spark,dongjoon-hyun/spark,dongjoon-hyun/spark,wangmiao1981/spark,zuotingbing/spark,jrshust/spark,jrshust/spark,shuangshuangwang/spark,witgo/spark,ericvandenbergfb/spark,ddna1021/spark,techaddict/spark,andrewor14/spark,akopich/spark,map222/spark,nilsgrabbert/spark,aray/spark,nchammas/spark,kevinyu98/spark,cloud-fan/spark,poffuomo/spark,actuaryzhang/spark,facaiy/spark,shuangshuangwang/spark,Aegeaner/spark,JerryLead/spark,akopich/spark,rikima/spark,map222/spark,rikima/spark,shaneknapp/spark,narahari92/spark,brad-kaiser/spark,lvdongr/spark,gioenn/xSpark,bdrillard/spark,cloud-fan/spark,andrewor14/spark,mahak/spark,zero323/spark,patrick-nicholson/spark,ibm-research-ireland/sparkoscope,someorz/spark,liutang123/spark,stanzhai/spark,actuaryzhang/spark,ron8hu/spark,ptkool/spark,HyukjinKwon/spark,lxsmnv/spark,nlalevee/spark,bOOm-X/spark,spark-test/spark,saturday-shi/spark,HyukjinKwon/spark,jlopezmalla/spark,byakuinss/spark,srowen/spark,adrian-ionescu/apache-spark,darionyaphet/spark,loneknightpy/spark,xflin/spark,szhem/spark,gengliangwang/spark,hhbyyh/spark,rezasafi/spark,bOOm-X/spark,SHASHANKB/spark,liutang123/spark,yanboliang/spark,mahak/spark,ahnqirage/spark,nilsgrabbert/spark,ahnqirage/spark,michalsenkyr/spark,shubhamchopra/spark,Panos-Bletsos/spark-cost-model-optimizer,shubhamchopra/spark,kiszk/spark,akopich/spark,WeichenXu123/spark,zhouyejoe/spark,Panos-Bletsos/spark-cost-model-optimizer,huang1900/spark,hvanhovell/spark,spark-test/spark,szhem/spark,map222/spark,UndeadBaneGitHub/spark,nlalevee/spark,SHASHANKB/spark,caneGuy/spark,esi-mineset/spark,wangmiao1981/spark,liyichao/spark,minixalpha/spark,bOOm-X/spark,michalsenkyr/spark,hvanhovell/spark,facaiy/spark,liutang123/spark,goldmedal/spark,eyalfa/spark,byakuinss/spark,rezasafi/spark,brad-kaiser/spark,andrewor14/spark,apache/spark,dhruve/spark,markhamstra/spark,lvdongr/spark,gioenn/xSpark,aray/spark,apache/spark,sachintyagi22/spark,janewangfb/spark,saltstar/spark,icexelloss/spark,goldmedal/spark,witgo/spark,zhouyejoe/spark,aosagie/spark,wangmiao1981/spark,huang1900/spark,mike0sv/spark,WeichenXu123/spark,JerryLead/spark,sahilTakiar/spark,wangyum/spark,SHASHANKB/spark,JoshRosen/spark,shubhamchopra/spark,loneknightpy/spark,liutang123/spark,panfengfeng/spark,minixalpha/spark,srowen/spark,big-pegasus/spark,skonto/spark,panfengfeng/spark,eyalfa/spark,spark-test/spark,srowen/spark,taroplus/spark,brad-kaiser/spark,kevinyu98/spark,brad-kaiser/spark,xuanyuanking/spark,WeichenXu123/spark,darionyaphet/spark,big-pegasus/spark,techaddict/spark,apache-spark-on-k8s/spark,pronix/spark,JoshRosen/spark,shubhamchopra/spark,dongjoon-hyun/spark,haowu80s/spark,ibm-research-ireland/sparkoscope,Panos-Bletsos/spark-cost-model-optimizer,mike0sv/spark,kevinyu98/spark,byakuinss/spark,gioenn/xSpark,WindCanDie/spark,wangyum/spark,zhouyejoe/spark,hvanhovell/spark,eyalfa/spark,lxsmnv/spark,UndeadBaneGitHub/spark,pgandhi999/spark,jkbradley/spark,shaneknapp/spark,ptkool/spark,hvanhovell/spark,rednaxelafx/apache-spark,chuckchen/spark,kimoonkim/spark,kiszk/spark,rekhajoshm/spark,dbtsai/spark,mike0sv/spark,MLnick/spark,techaddict/spark,liyichao/spark,tengpeng/spark,setjet/spark,mahak/spark,WindCanDie/spark,1haodian/spark,debugger87/spark,mdespriee/spark,jianran/spark,guoxiaolongzte/spark,rednaxelafx/apache-spark,dhruve/spark,ConeyLiu/spark,ddna1021/spark,shuangshuangwang/spark,sahilTakiar/spark,BryanCutler/spark,joseph-torres/spark,SnappyDataInc/spark,ddna1021/spark,jiangxb1987/spark,mike0sv/spark,zero323/spark,facaiy/spark,jianran/spark,ConeyLiu/spark,dbtsai/spark,andrewor14/spark,rednaxelafx/apache-spark,Aegeaner/spark,goldmedal/spark,UndeadBaneGitHub/spark,map222/spark,dhruve/spark,JoshRosen/spark,zhouyejoe/spark,caneGuy/spark,SnappyDataInc/spark,rekhajoshm/spark,janewangfb/spark,byakuinss/spark,nlalevee/spark,ueshin/apache-spark,ioana-delaney/spark,panfengfeng/spark,jrshust/spark,tejasapatil/spark,mike0sv/spark,akopich/spark,tengpeng/spark,big-pegasus/spark,maropu/spark,actuaryzhang/spark,caneGuy/spark,saturday-shi/spark,LantaoJin/spark,ajaysaini725/spark,rekhajoshm/spark,WeichenXu123/spark,chuckchen/spark,someorz/spark,byakuinss/spark,actuaryzhang/spark,janewangfb/spark,huang1900/spark,shuangshuangwang/spark,ron8hu/spark,rezasafi/spark,liyichao/spark,JerryLead/spark,ptkool/spark,dongjoon-hyun/spark,rekhajoshm/spark,zhouyejoe/spark,narahari92/spark,andrewor14/iolap,pronix/spark,ahnqirage/spark,hhbyyh/spark,metamx/spark,saltstar/spark,guoxiaolongzte/spark,aokolnychyi/spark,facaiy/spark,UndeadBaneGitHub/spark,lvdongr/spark,nchammas/spark,debugger87/spark,andrewor14/spark,sureshthalamati/spark,zzcclp/spark,shaneknapp/spark,tejasapatil/spark,markhamstra/spark,rekhajoshm/spark,milliman/spark,icexelloss/spark,nilsgrabbert/spark,darionyaphet/spark,pronix/spark,rekhajoshm/spark,1haodian/spark,hvanhovell/spark,aokolnychyi/spark,ibm-research-ireland/sparkoscope,apache-spark-on-k8s/spark,facaiy/spark,wangyum/spark,ueshin/apache-spark,aokolnychyi/spark,holdenk/spark,zero323/spark,setjet/spark,zhouyejoe/spark,aray/spark,janewangfb/spark,witgo/spark,mzl9039/spark,LantaoJin/spark,setjet/spark,rezasafi/spark,BryanCutler/spark,jiangxb1987/spark,jrshust/spark,LantaoJin/spark,michalsenkyr/spark,setjet/spark,metamx/spark,bdrillard/spark,rezasafi/spark,maropu/spark,nchammas/spark,HyukjinKwon/spark,kissmetrics/spark,ahnqirage/spark,kissmetrics/spark,nchammas/spark,tejasapatil/spark,vinodkc/spark,jianran/spark,apache-spark-on-k8s/spark,huang1900/spark,milliman/spark,sachintyagi22/spark,nlalevee/spark,joseph-torres/spark,narahari92/spark,ddna1021/spark,markhamstra/spark,holdenk/spark,SnappyDataInc/spark,michalsenkyr/spark,jlopezmalla/spark,akopich/spark,aosagie/spark,gioenn/xSpark,publicRoman/spark,srowen/spark,jlopezmalla/spark,chuckchen/spark,rikima/spark,saltstar/spark,rednaxelafx/apache-spark,gioenn/xSpark,pronix/spark,holdenk/spark,WindCanDie/spark,liyichao/spark,wzhfy/spark,WindCanDie/spark,guoxiaolongzte/spark,nchammas/spark,sureshthalamati/spark,ajaysaini725/spark,cin/spark,alunarbeach/spark,mzl9039/spark,ConeyLiu/spark,witgo/spark,jkbradley/spark,chuckchen/spark,kimoonkim/spark,nchammas/spark,gengliangwang/spark,kevinyu98/spark,jkbradley/spark,ddna1021/spark,andrewor14/iolap,sahilTakiar/spark,wangyum/spark,zzcclp/spark,ioana-delaney/spark,esi-mineset/spark,jlopezmalla/spark,wzhfy/spark,sachintyagi22/spark,darionyaphet/spark,dhruve/spark,kiszk/spark,witgo/spark,aosagie/spark,MLnick/spark,nlalevee/spark,mzl9039/spark,ericvandenbergfb/spark,ericvandenbergfb/spark,map222/spark,bOOm-X/spark,guoxiaolongzte/spark,ron8hu/spark,1haodian/spark,poffuomo/spark,ueshin/apache-spark,tejasapatil/spark,spark-test/spark,szhem/spark,joseph-torres/spark,zuotingbing/spark,spark-test/spark,ajaysaini725/spark,bravo-zhang/spark,zero323/spark,actuaryzhang/spark,WeichenXu123/spark,sureshthalamati/spark,mdespriee/spark,nilsgrabbert/spark,taroplus/spark,lvdongr/spark,wzhfy/spark,loneknightpy/spark,patrick-nicholson/spark,ron8hu/spark,narahari92/spark,ioana-delaney/spark,WeichenXu123/spark,bravo-zhang/spark,bdrillard/spark,Aegeaner/spark,someorz/spark,jrshust/spark,lvdongr/spark,sachintyagi22/spark,apache/spark,witgo/spark,stanzhai/spark,mdespriee/spark,liutang123/spark,kissmetrics/spark,liyichao/spark,taroplus/spark,mdespriee/spark,darionyaphet/spark,panfengfeng/spark,panfengfeng/spark,tengpeng/spark,pronix/spark,bdrillard/spark,jiangxb1987/spark,ericvandenbergfb/spark,rikima/spark,panfengfeng/spark,caneGuy/spark,huang1900/spark,rezasafi/spark,JerryLead/spark,MLnick/spark,wangmiao1981/spark,sachintyagi22/spark,ron8hu/spark,SHASHANKB/spark,ajaysaini725/spark,zuotingbing/spark,jiangxb1987/spark,shaneknapp/spark,aosagie/spark,wzhfy/spark,xuanyuanking/spark,stanzhai/spark,lxsmnv/spark,metamx/spark,ioana-delaney/spark,dbtsai/spark,ron8hu/spark,facaiy/spark,WindCanDie/spark,apache-spark-on-k8s/spark,vinodkc/spark,highfei2011/spark,sachintyagi22/spark,bravo-zhang/spark,highfei2011/spark,shubhamchopra/spark,cloud-fan/spark,nchammas/spark,xuanyuanking/spark,tengpeng/spark,vinodkc/spark,pgandhi999/spark,spark-test/spark,maropu/spark,poffuomo/spark,tengpeng/spark,holdenk/spark,wzhfy/spark,kiszk/spark,JoshRosen/spark,ddna1021/spark,loneknightpy/spark,shubhamchopra/spark,wzhfy/spark,brad-kaiser/spark,mahak/spark,publicRoman/spark,holdenk/spark,adrian-ionescu/apache-spark,facaiy/spark,jrshust/spark,lxsmnv/spark,xuanyuanking/spark,gengliangwang/spark,HyukjinKwon/spark,gengliangwang/spark,szhem/spark,shuangshuangwang/spark,kimoonkim/spark,SnappyDataInc/spark,panfengfeng/spark,Panos-Bletsos/spark-cost-model-optimizer,lxsmnv/spark,pronix/spark,techaddict/spark,Aegeaner/spark,skonto/spark,jlopezmalla/spark,highfei2011/spark,eyalfa/spark,wangyum/spark,ibm-research-ireland/sparkoscope,dbtsai/spark,zzcclp/spark,apache-spark-on-k8s/spark,eyalfa/spark,zero323/spark,michalsenkyr/spark,dhruve/spark,xuanyuanking/spark,WindCanDie/spark,xflin/spark,aosagie/spark,cin/spark,maropu/spark,debugger87/spark,ahnqirage/spark,JoshRosen/spark,SnappyDataInc/spark,xuanyuanking/spark,publicRoman/spark,jkbradley/spark,ioana-delaney/spark,gioenn/xSpark,patrick-nicholson/spark,szhem/spark,gengliangwang/spark,tengpeng/spark,dhruve/spark,taroplus/spark,nlalevee/spark,apache/spark,narahari92/spark,sureshthalamati/spark,saltstar/spark,haowu80s/spark,yanboliang/spark,saturday-shi/spark,jiangxb1987/spark,holdenk/spark,milliman/spark,stanzhai/spark,dbtsai/spark,mahak/spark,tejasapatil/spark,LantaoJin/spark,xflin/spark,techaddict/spark,taroplus/spark,nilsgrabbert/spark,adrian-ionescu/apache-spark,vinodkc/spark,HyukjinKwon/spark,liutang123/spark,cloud-fan/spark,janewangfb/spark,ueshin/apache-spark,joseph-torres/spark,JerryLead/spark,byakuinss/spark,hhbyyh/spark,lxsmnv/spark,alunarbeach/spark,mzl9039/spark,esi-mineset/spark,goldmedal/spark,LantaoJin/spark,yanboliang/spark,mdespriee/spark,highfei2011/spark,tengpeng/spark,guoxiaolongzte/spark,kissmetrics/spark,skonto/spark,hhbyyh/spark,alunarbeach/spark,cin/spark,sachintyagi22/spark,highfei2011/spark,andrewor14/iolap,minixalpha/spark,huang1900/spark,wzhfy/spark,pgandhi999/spark,dongjoon-hyun/spark,minixalpha/spark,minixalpha/spark,minixalpha/spark,UndeadBaneGitHub/spark,publicRoman/spark,taroplus/spark,1haodian/spark,techaddict/spark,skonto/spark,ptkool/spark,rednaxelafx/apache-spark,aokolnychyi/spark,holdenk/spark,MLnick/spark,ahnqirage/spark,1haodian/spark,mike0sv/spark,kimoonkim/spark,rikima/spark,ajaysaini725/spark,JoshRosen/spark,SHASHANKB/spark,icexelloss/spark,ahnqirage/spark,andrewor14/spark,Panos-Bletsos/spark-cost-model-optimizer,darionyaphet/spark,zuotingbing/spark,setjet/spark,tejasapatil/spark,saltstar/spark,BryanCutler/spark,xflin/spark,mahak/spark,HyukjinKwon/spark,jkbradley/spark,esi-mineset/spark,vinodkc/spark,narahari92/spark,milliman/spark,srowen/spark,guoxiaolongzte/spark,ddna1021/spark,alunarbeach/spark,ueshin/apache-spark,kiszk/spark,WindCanDie/spark,ibm-research-ireland/sparkoscope,LantaoJin/spark,zzcclp/spark,metamx/spark,zzcclp/spark,cin/spark,akopich/spark,Aegeaner/spark,actuaryzhang/spark