ZOSOpenTools / meta

Meta repository to tie together the various underlying z/OS Open Source tools repositories here
https://zosopentools.github.io/meta/
Apache License 2.0
37 stars 25 forks source link

/etc/profile issue with zopen-config #734

Open lbdyck opened 3 months ago

lbdyck commented 3 months ago

This relates to zigi and zopen.

When zigi starts it uses the bpxwunix service to find the environment variables from which it then finds git but if zopen-config is run from within /etc/profile the zopen updates do not occur.

Sample code:

/* rexx */                                                        
  /* get the users home directory (pwd) */                        
  address syscall 'getpwnam' sysvar('sysuid') 'h.'                
  /* put into the bpxwunix environment variable */                
  env.1 = 'HOME='h.4                                              
  env.0 = 1                                                       
  /* issue the bpxwunix command */                                
  cmd = '. /etc/profile && env'                                   
  cmd = 'env'                                                     
  x = bpxwunix(cmd,,s.,e.,env.,1)                                 
  /* view results if stemedit from cbt file 895 is installed */   
  call stemedit 'view','s.',,,'stdout'                            
  if e.0 > 0 then                                                 
  call stemedit 'view','e.',,,'stderr'                            
  /* If stemedit is not installed then use these commands         
  say 'stdout:'                                                   
  do i = 1 to s.0;say s.i;end;say copies('-',72)                  
  say 'stderr:'                                                   
  do i = 1 to e.0;say e.i;end;say copies('-',72)                  
  Comment End */                                                  

For zigi to work it must have defined a file with the correct environment variables (path, libpath, ...) if the /etc/profile does not provide them.

Request can the zopen install provide a zopen.env file with the full set of environment variables in the format of:

variable=value

This can then be used by zigi to pass to the bpxwunix service.

Or is there something I'm missing in the above code?

lbdyck commented 3 months ago

See https://github.com/orgs/ZOSOpenTools/discussions/735