11764 Ship .env files for building on various distributions

Review Request #2360 — Created Oct. 1, 2019 and updated

citrus
illumos-gate
master
11764
b862e01...
general
11764 Ship .env files for building on various distributions

OmniOS bloody

build% uname -a
SunOS bloody 5.11 omnios-master-b723a71830 i86pc i386 i86pc
build% git clean -fdx
build% cd usr/src
build% export SRC=`pwd`
build% cd tools/env
build% make
build% cd ../scripts
build% chmod +x nightly.sh
build% ./nightly.sh ../env/omnios
build% echo $?
0

OmniOS r151032

build% uname -a
SunOS build 5.11 omnios-r151032-702376803e i86pc i386 i86pc
...
build% ./nightly.sh ../env/omnios
build% echo $?
0

OmniOS r151030

build% uname -a
SunOS r151030 5.11 omnios-r151030-521a1fc4d1 i86pc i386 i86pc
...
build% ./nightly.sh ../env/omnios
build% echo $?
0

OpenIndiana

af@hipster:~/illumos-gate$ uname -a
SunOS hipster 5.11 illumos-ad3e6d4dd8 i86pc i386 i86pc
...
af@hipster:~/illumos-gate/usr/src/tools/scripts$ ./nightly.sh ../env/openindiana
af@hipster:~/illumos-gate/usr/src/tools/scripts$ echo $?
0
  • 1
  • 0
  • 1
  • 0
  • 2
Description From Last Updated
I'm not sure why OI should get a preference here, that is I think all the CC(S) defines except smatch ... jlevon jlevon
alp
  1. 
      
  2. TOOLS_PYTHON was not necessary here,
    Makefile.master has

    PYTHON3=                /usr/bin/python$(PYTHON3_VERSION)
    $(BUILDPY3TOOLS)TOOLS_PYTHON=           $(PYTHON3)
    $(BUILDPY2TOOLS)TOOLS_PYTHON=           $(PYTHON)
    
  3. 
      
andy_js
  1. 
      
  2. usr/src/tools/env/Makefile (Diff revision 1)
     
     
    The illumos-gate- prefix seems kind of unnecessary.
    1. I think it makes the purpose a bit clearer. Having an env file just called omnios makes me think it is for building OmniOS.

    2. Having the files reside in /opt/onbld/env ought to make that clear enough.

  3. 
      
citrus
citrus
gwr
  1. 
      
  2. usr/src/tools/env/Makefile (Diff revision 3)
     
     

    Just curious... Why do we need a Makefile in here at all? Why do anything to these files?

    1. Oh, I see. these get packaged. OK.

    2. It's also because the way I have structured it is to provide distribution-specific fragments which are appended to the illumos.sh.
      I'm still not entirely happy with the layout here so I'll re-jig it slightly later on today.

  3. 
      
citrus
citrus
Review request changed

Testing Done:

  +

OmniOS bloody

  +
  +

  +
  +
build% uname -a
  +
SunOS bloody 5.11 omnios-master-b723a71830 i86pc i386 i86pc
  +
build% git clean -fdx
  +
build% cd usr/src
  +
build% export SRC=`pwd`
  +
build% cd tools/env
  +
build% make
  +
build% cd ../scripts
  +
build% chmod +x nightly.sh
  +
build% ./nightly.sh ../env/omnios
  +
build% echo $?
  +
0
  +
  +

  +
  +

OmniOS r151032

  +
  +

  +
  +
build% uname -a
  +
SunOS build 5.11 omnios-r151032-702376803e i86pc i386 i86pc
  +
...
  +
build% ./nightly.sh ../env/omnios
  +
build% echo $?
  +
0
  +
  +

  +
  +

OmniOS r151030

  +
  +

  +
  +
build% uname -a
  +
SunOS r151030 5.11 omnios-r151030-521a1fc4d1 i86pc i386 i86pc
  +
...
  +
build% ./nightly.sh ../env/omnios
  +
build% echo $?
  +
0
  +
  +

  +
  +

OpenIndiana

  +
   

   
~  
% (cd usr/src/tools/env; make)
~  
/data/omnios-build/omniosorg/bloody/illumos/usr/src/tools/env
~  
/usr/bin/rm -f illumos
~  
cat illumos.sh > illumos
~  
chmod +x illumos
  ~
af@hipster:~/illumos-gate$ uname -a
  ~
SunOS hipster 5.11 illumos-ad3e6d4dd8 i86pc i386 i86pc
  ~
...
  ~
af@hipster:~/illumos-gate/usr/src/tools/scripts$ ./nightly.sh ../env/openindiana
  ~
af@hipster:~/illumos-gate/usr/src/tools/scripts$ echo $?
-  
/usr/bin/rm -f illumos-gate-omnios
-  
/usr/bin/cat illumos.sh > illumos-gate-omnios
-  
/usr/bin/sed '/^# CDDL HEADER START/,/^# CDDL HEADER END/d' < illumos-gate-omnios.sh >> illumos-gate-omnios
-  
/usr/bin/chmod +x illumos-gate-omnios
-  
/usr/bin/rm -f illumos-gate-openindiana
-  
/usr/bin/cat illumos.sh > illumos-gate-openindiana
-  
/usr/bin/sed '/^# CDDL HEADER START/,/^# CDDL HEADER END/d' < illumos-gate-openindiana.sh >> illumos-gate-openindiana
-  
/usr/bin/chmod +x illumos-gate-openindiana
-  
-  
% chmod +x usr/src/tools/scripts/nightly.sh
-  
% usr/src/tools/scripts/nightly.sh usr/src/tools/env/illumos-gate-omnios
-  
% echo $?
   
0
jlevon
  1. Thanks!

    Can we remove all the existing commented out entries in the main env file? Right now, it looks like uncommenting would have an effect,
    but it won't, because they get set later on. (We could move the SMB variable into both too for that reason.)

    Also, mega-nit, but illumos.sh has:

    # -----------------------------------------------------------------------------

    and you use:

    ############################################################################

    seems like we might as well be consistent for each section.

    Do you have draft changes for the illumos docs?

  2. I'm not sure why OI should get a preference here, that is I think all the CC(S) defines except smatch should get moved down to the distro env files. That seems much clearer to me?

  3. 
      
Loading...