-
Notifications
You must be signed in to change notification settings - Fork 117
RHAIENG-1475: enablement(s390x): changes for codeserver #2575
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
39326db
b71d268
e0274b5
f04382c
389a447
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -63,6 +63,36 @@ build_pyarrow() { | |||||||||||||
rm -rf ${TEMP_BUILD_DIR} | ||||||||||||||
} | ||||||||||||||
|
||||||||||||||
# Additional dev tools only for s390x \ | ||||||||||||||
if [[ $(uname -m) == "s390x" ]]; then \ | ||||||||||||||
|
||||||||||||||
dnf install -y perl mesa-libGL skopeo libxcrypt-compat python3.12-devel pkgconf-pkg-config gcc gcc-gfortran gcc-c++ ninja-build make openssl-devel python3-devel pybind11-devel autoconf automake libtool cmake openblas-devel libjpeg-devel zlib-devel libtiff-devel freetype-devel lcms2-devel libwebp-devel git tar wget | ||||||||||||||
dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm | ||||||||||||||
dnf install -y cmake gcc gcc-toolset-13 fribidi-devel lcms2-devel && \ | ||||||||||||||
openjpeg2-devel libraqm-devel libimagequant-devel tcl-devel tk-devel && \ | ||||||||||||||
dnf clean all && rm -rf /var/cache/dnf; | ||||||||||||||
|
||||||||||||||
# install rust | ||||||||||||||
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y | ||||||||||||||
|
||||||||||||||
source /opt/rh/gcc-toolset-13/enable | ||||||||||||||
source "$HOME/.cargo/env" | ||||||||||||||
|
||||||||||||||
export MAX_JOBS=${MAX_JOBS:-$(nproc)} | ||||||||||||||
|
||||||||||||||
if [[ $(uname -m) == "s390x" ]]; then | ||||||||||||||
echo "Checking OpenBLAS pkg-config..." | ||||||||||||||
pkg-config --exists openblas || echo "Warning: openblas.pc not found" | ||||||||||||||
fi | ||||||||||||||
|
||||||||||||||
export CMAKE_ARGS="-DPython3_EXECUTABLE=python -DCMAKE_PREFIX_PATH=/usr/local" | ||||||||||||||
|
||||||||||||||
PYARROW_VERSION=$(grep -A1 '"pyarrow"' pylock.toml | grep -Eo '\b[0-9\.]+\b') | ||||||||||||||
build_pyarrow ${PYARROW_VERSION} | ||||||||||||||
uv pip install ${WHEEL_DIR}/*.whl | ||||||||||||||
fi | ||||||||||||||
|
||||||||||||||
|
||||||||||||||
if [[ $(uname -m) == "ppc64le" ]]; then | ||||||||||||||
# install development packages | ||||||||||||||
dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm | ||||||||||||||
|
@@ -101,7 +131,8 @@ if [[ $(uname -m) == "ppc64le" ]]; then | |||||||||||||
build_pillow ${PILLOW_VERSION} | ||||||||||||||
|
||||||||||||||
uv pip install ${WHEEL_DIR}/*.whl | ||||||||||||||
else | ||||||||||||||
# only for mounting on non-ppc64le | ||||||||||||||
mkdir -p /root/OpenBLAS/ | ||||||||||||||
fi | ||||||||||||||
if [[ $(uname -m) != "ppc64le" ]]; then | ||||||||||||||
# only for mounting on other ppc64le | ||||||||||||||
mkdir -p /root/OpenBLAS/ | ||||||||||||||
fi | ||||||||||||||
Comment on lines
+135
to
137
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Clarify comment vs condition. Block runs on non-ppc64le, but the comment mentions “other ppc64le”. Reword to match behavior. - # only for mounting on other ppc64le
+ # Create mount point for OpenBLAS in non-ppc64le builds (used by ppc64le multistage mounting) 📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,7 +17,7 @@ UNAME_TO_GOARCH["s390x"]="s390x" | |
|
||
ARCH="${UNAME_TO_GOARCH[$(uname -m)]}" | ||
|
||
if [[ "$ARCH" == "amd64" || "$ARCH" == "arm64" ||"$ARCH" == "ppc64le" ]]; then | ||
if [[ "$ARCH" == "amd64" || "$ARCH" == "arm64" ||"$ARCH" == "ppc64le" || "$ARCH" == "s390x" ]]; then | ||
coderabbitai[bot] marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
||
export MAX_JOBS=${MAX_JOBS:-$(nproc)} | ||
export NODE_VERSION=${NODE_VERSION:-22.18.0} | ||
|
@@ -62,12 +62,57 @@ if [[ "$ARCH" == "amd64" || "$ARCH" == "arm64" ||"$ARCH" == "ppc64le" ]]; then | |
# build codeserver | ||
git clone --depth 1 --branch "${CODESERVER_VERSION}" --recurse-submodules --shallow-submodules https://github.com/coder/code-server.git | ||
cd code-server | ||
|
||
#patch taken from vscodium s390x IBM : https://github.com/VSCodium/vscodium/blob/master/patches/linux/reh/s390x/arch-4-s390x-package.json.patch | ||
if [[ "$ARCH" == "s390x" ]]; then | ||
cat > s390x.patch <<EOL | ||
diff --git a/lib/vscode/package-lock.json b/lib/vscode/package-lock.json | ||
index 0d0272a92b2..73e8feb92dd 100644 | ||
--- a/lib/vscode/package-lock.json | ||
+++ b/lib/vscode/package-lock.json | ||
@@ -18236,10 +18236,11 @@ | ||
} | ||
}, | ||
"node_modules/web-tree-sitter": { | ||
- "version": "0.20.8", | ||
- "resolved": "https://registry.npmjs.org/web-tree-sitter/-/web-tree-sitter-0.20.8.tgz", | ||
- "integrity": "sha512-weOVgZ3aAARgdnb220GqYuh7+rZU0Ka9k9yfKtGAzEYMa6GgiCzW9JjQRJyCJakvibQW+dfjJdihjInKuuCAUQ==", | ||
- "dev": true | ||
+ "version": "0.23.0", | ||
+ "resolved": "https://registry.npmjs.org/web-tree-sitter/-/web-tree-sitter-0.23.0.tgz", | ||
+ "integrity": "sha512-p1T+ju2H30fpVX2q5yr+Wv/NfdMMWMjQp9Q+4eEPrHAJpPFh9DPfI2Yr9L1f5SA5KPE+g1cNUqPbpihxUDzmVw==", | ||
+ "dev": true, | ||
+ "license": "MIT" | ||
}, | ||
"node_modules/webidl-conversions": { | ||
"version": "3.0.1", | ||
diff --git a/lib/vscode/package.json b/lib/vscode/package.json | ||
index a4c7a2a3a35..d7f816248af 100644 | ||
--- a/lib/vscode/package.json | ||
+++ b/lib/vscode/package.json | ||
@@ -227,6 +227,9 @@ | ||
"node-gyp-build": "4.8.1", | ||
"[email protected]": { | ||
"node-addon-api": "7.1.0" | ||
+ }, | ||
+ "@vscode/[email protected]": { | ||
+ "web-tree-sitter": "0.23.0" | ||
} | ||
}, | ||
"repository": { | ||
EOL | ||
|
||
git apply s390x.patch | ||
fi | ||
|
||
source ${NVM_DIR}/nvm.sh | ||
while IFS= read -r src_patch; do echo "patches/$src_patch"; patch -p1 < "patches/$src_patch"; done < patches/series | ||
nvm use ${NODE_VERSION} | ||
npm cache clean --force | ||
npm install | ||
npm run build | ||
VERSION=${CODESERVER_VERSION/v/} npm run build:vscode | ||
export KEEP_MODULES=1 | ||
npm run release | ||
npm run release:standalone | ||
|
||
|
aryabjena marked this conversation as resolved.
Show resolved
Hide resolved
|
Uh oh!
There was an error while loading. Please reload this page.