Update
This commit is contained in:
0
hmi-scripts/build-jaas-bridge.sh
Executable file → Normal file
0
hmi-scripts/build-jaas-bridge.sh
Executable file → Normal file
0
hmi-scripts/build-native-loader-smoke.sh
Executable file → Normal file
0
hmi-scripts/build-native-loader-smoke.sh
Executable file → Normal file
25
hmi-scripts/build-sysparameter-fallback.sh
Normal file
25
hmi-scripts/build-sysparameter-fallback.sh
Normal file
@@ -0,0 +1,25 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
ROOT="$(cd "$(dirname "$0")/.." && pwd)"
|
||||
SRC="$ROOT/hmi-docs/cheerpj/sysparameter"
|
||||
OUT="$ROOT/hmi-frontend/public/cheerpj/sysparameter-jaas-fallback-java11.jar"
|
||||
WORK="$(mktemp -d)"
|
||||
trap 'rm -rf "$WORK"' EXIT
|
||||
mkdir -p "$WORK/stubs" "$WORK/classes"
|
||||
# Test-only iTAC logging ABI stubs are excluded from the output JAR.
|
||||
javac --release 11 -d "$WORK/stubs" \
|
||||
"$SRC/src/test/java/com/itac/util/logging/LogHandler.java"
|
||||
javac --release 11 -cp "$WORK/stubs" -d "$WORK/classes" \
|
||||
"$SRC/src/main/java/com/itac/util/system/SysParameter.java"
|
||||
javac --release 11 -cp "$WORK/classes:$WORK/stubs" -d "$WORK/stubs" \
|
||||
"$SRC/src/test/java/com/widgetworkbench/compat/SysParameterCompatTest.java"
|
||||
java -cp "$WORK/classes:$WORK/stubs" -Duser.name=browser-fallback-test \
|
||||
com.widgetworkbench.compat.SysParameterCompatTest
|
||||
jar --create --file "$OUT" -C "$WORK/classes" com/itac/util/system/SysParameter.class
|
||||
javap -verbose -cp "$OUT" com.itac.util.system.SysParameter \
|
||||
| grep -q 'major version: 55'
|
||||
jar tf "$OUT" | grep -q '^com/itac/util/system/SysParameter.class$'
|
||||
if [[ "$(jar tf "$OUT" | grep -c '\.class$')" -ne 1 ]]; then
|
||||
echo 'FEHLER: JAR enthält unerwartete Klassen' >&2; exit 1
|
||||
fi
|
||||
printf 'PASS Java-11-SysParameter-Fallback: %s\n' "$OUT"
|
||||
22
hmi-scripts/prepare-workplace.py
Normal file
22
hmi-scripts/prepare-workplace.py
Normal file
@@ -0,0 +1,22 @@
|
||||
#!/usr/bin/env python3
|
||||
"""Validate local vendor archive and stage byte-identical JARs as private WAR resources."""
|
||||
from pathlib import Path
|
||||
import xml.etree.ElementTree as ET
|
||||
import zipfile, io, hashlib, json
|
||||
root=Path(__file__).resolve().parents[1]
|
||||
manifest=ET.parse(root/'backend/src/main/resources/hmi/Workplace.jnlp')
|
||||
names=sorted({j.attrib['href'] for group in manifest.findall('resources')
|
||||
if 'os' not in group.attrib and 'arch' not in group.attrib for j in group.findall('jar')})
|
||||
output=root/'.workplace-bundle'
|
||||
output.mkdir(exist_ok=True)
|
||||
checksums={}
|
||||
with zipfile.ZipFile(root/'Workplace.zip') as archive:
|
||||
for name in names:
|
||||
if '/' in name or '\\' in name or not name.endswith('.jar'): raise ValueError(name)
|
||||
data=archive.read('Workplace/'+name)
|
||||
with zipfile.ZipFile(io.BytesIO(data)) as jar:
|
||||
if jar.testzip() is not None: raise ValueError('Corrupt JAR: '+name)
|
||||
(output/name).write_bytes(data)
|
||||
checksums[name]=hashlib.sha256(data).hexdigest()
|
||||
(output/'SHA256.json').write_text(json.dumps(checksums,indent=2)+'\n')
|
||||
print('Validated and staged',len(names),'unaltered vendor JARs')
|
||||
Reference in New Issue
Block a user