Skip to content

Commit

Permalink
Merge branch 'v3.x/staging' into chore/v3/node-18
Browse files Browse the repository at this point in the history
  • Loading branch information
MarkAckert authored Dec 2, 2024
2 parents 29147a9 + 06a9e33 commit 9771053
Show file tree
Hide file tree
Showing 8 changed files with 52 additions and 54 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
All notable changes to the Zowe Installer will be documented in this file.

## `3.1.0`
- Bugfix: When logging `zwe` command, sometimes the log has wrong file tag and the log is unreadable. [#4071](https://github.com/zowe/zowe-install-packaging/pull/4071)
- Bugfix: When `--log-dir` parameter for `zwe` command is a file, there might be an error "InternalError: stack overflow". [#4064](https://github.com/zowe/zowe-install-packaging/pull/4064)
- Enhancement: command `zwe init` does not require NodeJS [#4088](https://github.com/zowe/zowe-install-packaging/pull/4088)
- Enhancement: command `zwe install` does not require NodeJS [#4069](https://github.com/zowe/zowe-install-packaging/pull/4069)
- Enhancement: new javascript funtion `getStatvfs()` to obtain information about the file sysytem [#3994](https://github.com/zowe/zowe-install-packaging/pull/3994)
Expand Down
10 changes: 7 additions & 3 deletions bin/commands/init/certificate/index.sh
Original file line number Diff line number Diff line change
Expand Up @@ -95,13 +95,17 @@ elif [[ "${cert_type}" == JCE*KS ]]; then
keyring_option=2
fi
fi
# Trace or debug information will be part of the output, let's turn it off for the inline zwe commands
save_trace=$ZWE_PRIVATE_LOG_LEVEL_ZWELS
ZWE_PRIVATE_LOG_LEVEL_ZWELS=
# read keystore domains
cert_import_CAs=$(read_yaml_configmgr "${ZWE_CLI_PARAMETER_CONFIG}" ".zowe.setup.certificate.importCertificateAuthorities" | tr '\n' ',')
cert_import_CAs=$(zwecli_inline_execute_command internal config get --config "${ZWE_CLI_PARAMETER_CONFIG}" --path ".zowe.setup.certificate.importCertificateAuthorities" | tr '\n' ',' | awk '{ print substr( $0, 1, length($0)-1 ) }')
# read keystore domains
cert_domains=$(read_yaml_configmgr "${ZWE_CLI_PARAMETER_CONFIG}" ".zowe.setup.certificate.san" | tr '\n' ',')
cert_domains=$(zwecli_inline_execute_command internal config get --config "${ZWE_CLI_PARAMETER_CONFIG}" --path ".zowe.setup.certificate.san" | tr '\n' ',' | awk '{ print substr( $0, 1, length($0)-1 ) }')
if [ -z "${cert_domains}" ]; then
cert_domains=$(read_yaml_configmgr "${ZWE_CLI_PARAMETER_CONFIG}" ".zowe.externalDomains" | tr '\n' ',')
cert_domains=$(zwecli_inline_execute_command internal config get --config "${ZWE_CLI_PARAMETER_CONFIG}" --path ".zowe.externalDomains" | tr '\n' ',' | awk '{ print substr( $0, 1, length($0)-1 ) }')
fi
ZWE_PRIVATE_LOG_LEVEL_ZWELS=$save_trace

# read z/OSMF info
for item in user ca; do
Expand Down
33 changes: 9 additions & 24 deletions bin/libs/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -128,36 +128,21 @@ export function date(...args: string[]): string|undefined {


let logExists = false;
let logFile:std.File|null = null;

function writeLog(message: string): boolean {
const filename = std.getenv('ZWE_PRIVATE_LOG_FILE');
if (!filename) {
return false;
}
logExists = fs.fileExists(filename);
if (!logExists) {
const filename = std.getenv('ZWE_PRIVATE_LOG_FILE');
if (filename) {
fs.createFile(filename, 0o640, message);
logExists = fs.fileExists(filename);
if (!logExists) {
fs.createFile(filename, 0o640, message);
logExists = fs.fileExists(filename);
}
if (logExists) {
let errObj = {errno:undefined};
logFile = std.open(filename, 'w', errObj);
if (errObj.errno) {
printError(`Error opening file ${filename}, errno=${errObj.errno}`);
logFile=null;
logExists=false;
return false;
}
}
}
}
if (logFile===undefined || logFile===null) {
return false;
} else {
//TODO this does utf8. should we flip it to 1047 on zos?
logFile.puts(message);
return true;
xplatform.appendFileUTF8(filename, xplatform.AUTO_DETECT, message);
return true;
}
return logExists;
}


Expand Down
1 change: 1 addition & 0 deletions build/zwe/types/@qjstypes/xplatform.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ export function stringFromBytes(data:ArrayBuffer, offset:number, length:number,
*/
export function loadFileUTF8(path:string, sourceCCSID:number):string;
export function storeFileUTF8(path:string, targetCCSID:number, content:string):number;
export function appendFileUTF8(path: string, targetCCSID:number, content:string):number;

export var AUTO_DETECT:number;
export var NO_CONVERT:number;
7 changes: 7 additions & 0 deletions pswi/03_create.sh
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,13 @@ echo "iconv -f ISO8859-1 -t IBM-1047 \$source > _ZWECONF;" >>JCL
echo "sed 's|UTF-8|IBM-1047|g' _ZWECONF > ZWECONF;" >>JCL
echo "cp -T ZWECONF \$target;" >>JCL
echo "/*" >>JCL
echo "//CHMODZWE EXEC PGM=BPXBATCH" >>JCL
echo "//STDOUT DD SYSOUT=*" >>JCL
echo "//STDERR DD SYSOUT=*" >>JCL
echo "//STDPARM DD *" >>JCL
echo "SH set -x;set -e;" >>JCL
echo "chmod -R 777 ${ZOWE_MOUNT};" >>JCL
echo "/*" >>JCL

sh scripts/submit_jcl.sh "$(cat JCL)"
if [ $? -gt 0 ]; then exit -1; fi
Expand Down
45 changes: 22 additions & 23 deletions pswi/04_create_cleanup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -100,29 +100,28 @@ sh scripts/submit_jcl.sh "$(cat JCL)"
# Not checking results so the script doesn't fail
rm JCL

if [ "$ZOSMF_V" = "2.3" ]; then
# Unmount and delete
echo "Unmounting and deleting zFS ${WORK_ZFS}."

echo ${JOBST1} >JCL
echo ${JOBST2} >>JCL
echo "//UNMNTZFS EXEC PGM=IKJEFT01,REGION=4096K,DYNAMNBR=50" >>JCL
echo "//SYSTSPRT DD SYSOUT=*" >>JCL
echo "//SYSTSOUT DD SYSOUT=*" >>JCL
echo "//SYSTSIN DD * " >>JCL
echo "UNMOUNT FILESYSTEM('${WORK_ZFS}') + " >>JCL
echo "IMMEDIATE" >>JCL
echo "/*" >>JCL
echo "//DELTZFST EXEC PGM=IDCAMS" >>JCL
echo "//SYSPRINT DD SYSOUT=*" >>JCL
echo "//SYSIN DD *" >>JCL
echo " DELETE ${WORK_ZFS}" >>JCL
echo "/*" >>JCL

sh scripts/submit_jcl.sh "$(cat JCL)"
# Not checking results so the script doesn't fail
rm JCL
fi

# Unmount and delete
echo "Unmounting and deleting zFS ${WORK_ZFS}."

echo ${JOBST1} >JCL
echo ${JOBST2} >>JCL
echo "//UNMNTZFS EXEC PGM=IKJEFT01,REGION=4096K,DYNAMNBR=50" >>JCL
echo "//SYSTSPRT DD SYSOUT=*" >>JCL
echo "//SYSTSOUT DD SYSOUT=*" >>JCL
echo "//SYSTSIN DD * " >>JCL
echo "UNMOUNT FILESYSTEM('${WORK_ZFS}') + " >>JCL
echo "IMMEDIATE" >>JCL
echo "/*" >>JCL
echo "//DELTZFST EXEC PGM=IDCAMS" >>JCL
echo "//SYSPRINT DD SYSOUT=*" >>JCL
echo "//SYSIN DD *" >>JCL
echo " DELETE ${WORK_ZFS}" >>JCL
echo "/*" >>JCL

sh scripts/submit_jcl.sh "$(cat JCL)"
# Not checking results so the script doesn't fail
rm JCL

echo "Invoking REST API to unmount Zowe zFS ${ZOWE_ZFS} from its mountpoint."

Expand Down
4 changes: 2 additions & 2 deletions workflows/files/ZWECONF.properties
Original file line number Diff line number Diff line change
Expand Up @@ -140,10 +140,10 @@ zowe_job_prefix=ZWE1

# zowe_externalDomains
# Label: Zowe external domains
# Abstract: The domain name of your Dynamic VIP Address (DVIPA)
# Abstract: The list of external domains
# Category: zowe
# Description:
# The domain name of your Dynamic VIP Address (DVIPA)
# Defines a list of external domains that will be used by the Zowe instance.
zowe_externalDomains=sample-domain.com

# zowe_externalPort
Expand Down
4 changes: 2 additions & 2 deletions workflows/files/ZWECONF.xml
Original file line number Diff line number Diff line change
Expand Up @@ -202,8 +202,8 @@ It is used by ZWESLSTC or by zwe command</description>
</variable>
<variable name="zowe_externalDomains" scope="instance" visibility="public">
<label>Zowe external domains</label>
<abstract>The domain name of your Dynamic VIP Address (DVIPA)</abstract>
<description>The domain name of your Dynamic VIP Address (DVIPA)</description>
<abstract>The list of external domains</abstract>
<description>Defines a list of external domains that will be used by the Zowe instance.</description>
<category>zowe</category>
<string valueMustBeChoice="false" multiLine="true">
<!-- Put validation here -->
Expand Down

0 comments on commit 9771053

Please sign in to comment.