Skip to content

Commit

Permalink
Merge pull request #752 from mbektas/update-platform-keys
Browse files Browse the repository at this point in the history
update platform keys for installers, update dependencies
  • Loading branch information
mbektas authored Jan 26, 2024
2 parents 41ef6ef + 295231c commit dc1e267
Show file tree
Hide file tree
Showing 4 changed files with 75 additions and 112 deletions.
42 changes: 21 additions & 21 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ jobs:
strategy:
matrix:
cfg:
- { platform: linux, platform_name: Linux, os: ubuntu-latest, build_platform: linux-64, conda_platform: linux-64 }
- { platform: linux-64, platform_name: Linux x64, os: ubuntu-latest, build_platform: linux-64, conda_platform: linux-64 }
- { platform: osx-64, platform_name: macOS x64, os: macos-latest, build_platform: osx-64, conda_platform: osx-64 }
- { platform: osx-arm64, platform_name: macOS arm64, os: macos-latest, build_platform: osx-64, conda_platform: osx-arm64 }
- { platform: win, platform_name: Windows, os: windows-latest, build_platform: win-64, conda_platform: win-64 }
- { platform: win-64, platform_name: Windows x64, os: windows-latest, build_platform: win-64, conda_platform: win-64 }

name: '${{ matrix.cfg.platform_name }} installer'
runs-on: ${{ matrix.cfg.os }}
Expand Down Expand Up @@ -122,19 +122,19 @@ jobs:
yarn dist:${{ matrix.cfg.platform }}
if: steps.release-exists.outputs.result == 'true'

- name: Upload Debian Installer
if: matrix.cfg.platform == 'linux'
- name: Upload Debian x64 Installer
if: matrix.cfg.platform == 'linux-64'
uses: actions/upload-artifact@v4
with:
name: debian-installer
name: debian-installer-x64
path: |
dist/JupyterLab.deb
- name: Upload Fedora Installer
if: matrix.cfg.platform == 'linux'
- name: Upload Fedora x64 Installer
if: matrix.cfg.platform == 'linux-64'
uses: actions/upload-artifact@v4
with:
name: fedora-installer
name: fedora-installer-x64
path: |
dist/JupyterLab.rpm
Expand All @@ -154,31 +154,31 @@ jobs:
path: |
dist/JupyterLab-arm64.dmg
- name: Upload Windows Installer
if: matrix.cfg.platform == 'win'
- name: Upload Windows x64 Installer
if: matrix.cfg.platform == 'win-64'
uses: actions/upload-artifact@v4
with:
name: windows-installer
name: windows-installer-x64
path: |
dist/JupyterLab-Setup.exe
- name: Upload Debian Installer as Release asset
if: matrix.cfg.platform == 'linux' && steps.release-exists.outputs.result == 'true'
- name: Upload Debian x64 Installer as Release asset
if: matrix.cfg.platform == 'linux-64' && steps.release-exists.outputs.result == 'true'
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.JLAB_APP_TOKEN }}
file: dist/JupyterLab.deb
asset_name: JupyterLab-Setup-Debian.deb
asset_name: JupyterLab-Setup-Debian-x64.deb
tag: v${{ steps.package-info.outputs.version}}
overwrite: true

- name: Upload Fedora Installer as Release asset
if: matrix.cfg.platform == 'linux' && steps.release-exists.outputs.result == 'true'
- name: Upload Fedora x64 Installer as Release asset
if: matrix.cfg.platform == 'linux-64' && steps.release-exists.outputs.result == 'true'
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.JLAB_APP_TOKEN }}
file: dist/JupyterLab.rpm
asset_name: JupyterLab-Setup-Fedora.rpm
asset_name: JupyterLab-Setup-Fedora-x64.rpm
tag: v${{ steps.package-info.outputs.version}}
overwrite: true

Expand Down Expand Up @@ -222,18 +222,18 @@ jobs:
tag: v${{ steps.package-info.outputs.version}}
overwrite: true

- name: Upload Windows Installer as Release asset
if: matrix.cfg.platform == 'win' && steps.release-exists.outputs.result == 'true'
- name: Upload Windows x64 Installer as Release asset
if: matrix.cfg.platform == 'win-64' && steps.release-exists.outputs.result == 'true'
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.JLAB_APP_TOKEN }}
file: dist/JupyterLab-Setup.exe
asset_name: JupyterLab-Setup-Windows.exe
asset_name: JupyterLab-Setup-Windows-x64.exe
tag: v${{ steps.package-info.outputs.version}}
overwrite: true

- name: Upload latest.yml Release asset
if: matrix.cfg.platform == 'win' && steps.release-exists.outputs.result == 'true'
if: matrix.cfg.platform == 'win-64' && steps.release-exists.outputs.result == 'true'
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.JLAB_APP_TOKEN }}
Expand Down
20 changes: 11 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,21 +16,23 @@
"extract": "node scripts/extract.js",
"pack": "yarn build && electron-builder --dir",
"dist": "yarn build && electron-builder",
"dist:linux": "yarn build && electron-builder --linux --publish never",
"dist:linux-64": "yarn build && electron-builder --linux --publish never",
"dist:linux-aarch64": "yarn build && electron-builder --linux --arm64 --publish never",
"dist:osx": "yarn build && electron-builder --macos --publish never",
"dist:osx-64": "yarn dist:osx",
"dist:osx-arm64": "yarn dist:osx",
"dist:osx-dev": "yarn build && CSC_IDENTITY_AUTO_DISCOVERY=false electron-builder --macos --publish never",
"dist:win": "yarn build && electron-builder --win --publish never",
"dist:win-64": "yarn build && electron-builder --win --publish never",
"dist:win-arm64": "yarn build && yarn electron-builder --arm64 --publish never",
"update_workflow_conda_lock": "cd workflow_env && rimraf *.lock && conda-lock --kind explicit -f publish_env.yaml && cd -",
"update_conda_lock": "cd env_installer && rimraf *.lock && conda-lock --kind explicit -f jlab_server.yaml && cd -",
"clean_env_installer": "rimraf ./env_installer/jlab_server.tar.gz && rimraf ./env_installer/jlab_server",
"create_env_installer:linux": "yarn clean_env_installer && conda-lock install --prefix ./env_installer/jlab_server ./env_installer/conda-linux-64.lock && conda pack -p ./env_installer/jlab_server -o ./env_installer/jlab_server.tar.gz",
"create_env_installer:linux-aarch64": "yarn clean_env_installer && conda-lock install --prefix ./env_installer/jlab_server ./env_installer/conda-linux-aarch64.lock && conda pack -p ./env_installer/jlab_server -o ./env_installer/jlab_server.tar.gz",
"create_env_installer:osx-64": "yarn clean_env_installer && conda-lock install --prefix ./env_installer/jlab_server ./env_installer/conda-osx-64.lock && conda pack -p ./env_installer/jlab_server -o ./env_installer/jlab_server.tar.gz",
"create_env_installer:osx-arm64": "yarn clean_env_installer && conda-lock install --no-validate-platform --prefix ./env_installer/jlab_server ./env_installer/conda-osx-arm64.lock && conda pack -p ./env_installer/jlab_server -o ./env_installer/jlab_server.tar.gz",
"create_env_installer:win": "yarn clean_env_installer && conda-lock install --prefix ./env_installer/jlab_server ./env_installer/conda-win-64.lock && conda pack -p ./env_installer/jlab_server -o ./env_installer/jlab_server.tar.gz",
"create_env_installer": "yarn clean_env_installer && conda-lock install --no-validate-platform --prefix ./env_installer/jlab_server ./env_installer/conda-${ENV_PLATFORM}.lock && conda pack -p ./env_installer/jlab_server -o ./env_installer/jlab_server.tar.gz",
"create_env_installer:linux-64": "ENV_PLATFORM=linux-64 yarn create_env_installer",
"create_env_installer:linux-aarch64": "ENV_PLATFORM=linux-aarch64 yarn create_env_installer",
"create_env_installer:osx-64": "ENV_PLATFORM=osx-64 yarn create_env_installer",
"create_env_installer:osx-arm64": "ENV_PLATFORM=osx-arm64 yarn create_env_installer",
"create_env_installer:win-64": "yarn clean_env_installer && conda-lock install --no-validate-platform --prefix ./env_installer/jlab_server ./env_installer/conda-win-64.lock && conda pack -p ./env_installer/jlab_server -o ./env_installer/jlab_server.tar.gz",
"extract_env_installer:osx": "cd ./env_installer && rimraf jlab_server_extracted && mkdir jlab_server_extracted && tar -xzf jlab_server.tar.gz -C jlab_server_extracted && cd -",
"extract_env_installer:osx-64": "yarn extract_env_installer:osx",
"extract_env_installer:osx-arm64": "yarn extract_env_installer:osx",
Expand Down Expand Up @@ -180,13 +182,14 @@
"@typescript-eslint/parser": "~5.28.0",
"@leeoniya/ufuzzy": "1.0.14",
"electron": "^27.0.2",
"electron-builder": "^24.6.4",
"electron-builder": "^24.9.1",
"electron-notarize": "^1.2.2",
"eslint": "~8.17.0",
"eslint-config-prettier": "~8.5.0",
"eslint-plugin-prettier": "~4.0.0",
"eslint-plugin-react": "~7.29.4",
"fs-extra": "~9.1.0",
"istextorbinary": "^6.0.0",
"meow": "^6.0.1",
"mini-css-extract-plugin": "^1.3.9",
"node-watch": "^0.7.4",
Expand All @@ -209,7 +212,6 @@
"electron-log": "^4.4.8",
"fast-xml-parser": "^4.2.5",
"fix-path": "^3.0.0",
"istextorbinary": "^6.0.0",
"js-yaml": "^4.1.0",
"node-fetch": "^2.6.7",
"semver": "^7.5.4",
Expand Down
39 changes: 0 additions & 39 deletions src/main/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -555,45 +555,6 @@ export function createCommandScriptInEnv(
return scriptLines.join(joinStr);
}

export function getBinarySignList(envPath: string) {
const { isBinary } = require('istextorbinary');
const envBinDir = path.join(envPath, 'bin');

const needsSigning = (filePath: string) => {
// conly consider bin directory, and .so, .dylib files in other directories
if (
filePath.startsWith(envBinDir) ||
filePath.endsWith('.so') ||
filePath.endsWith('.dylib')
) {
// check for binary content
return isBinary(null, fs.readFileSync(filePath));
}

return false;
};

const findBinariesInDirectory = (dirPath: string): string[] => {
let results: string[] = [];
const list = fs.readdirSync(dirPath);
list.forEach(filePath => {
filePath = dirPath + '/' + filePath;
const stat = fs.lstatSync(filePath);
if (stat && stat.isDirectory()) {
results = results.concat(findBinariesInDirectory(filePath));
} else {
if (!stat.isSymbolicLink() && needsSigning(filePath)) {
results.push(path.relative(envPath, filePath));
}
}
});

return results;
};

return findBinariesInDirectory(envPath);
}

/*
signed tarball contents need to be unsigned except for python binary,
otherwise server runs into issues at runtime. python binary comes originally
Expand Down
86 changes: 43 additions & 43 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
# yarn lockfile v1


"7zip-bin@~5.1.1":
version "5.1.1"
resolved "https://registry.yarnpkg.com/7zip-bin/-/7zip-bin-5.1.1.tgz#9274ec7460652f9c632c59addf24efb1684ef876"
integrity sha512-sAP4LldeWNz0lNzmTird3uWfFDWWTeg6V/MsmyyLR9X1idwKBWIgt/ZvinqQldJm3LecKEs1emkbquO6PCiLVQ==
"7zip-bin@~5.2.0":
version "5.2.0"
resolved "https://registry.yarnpkg.com/7zip-bin/-/7zip-bin-5.2.0.tgz#7a03314684dd6572b7dfa89e68ce31d60286854d"
integrity sha512-ukTPVhqG4jNzMro2qA9HSCSSVJN3aN7tlb+hfqYCt3ER0yWroeA2VR38MNrOHLQ/cVj+DaIMad0kFCtWWowh/A==

"@babel/code-frame@^7.0.0":
version "7.18.6"
Expand Down Expand Up @@ -813,12 +813,12 @@ [email protected]:
resolved "https://registry.yarnpkg.com/app-builder-bin/-/app-builder-bin-4.0.0.tgz#1df8e654bd1395e4a319d82545c98667d7eed2f0"
integrity sha512-xwdG0FJPQMe0M0UA4Tz0zEB8rBJTRA5a476ZawAqiBkMv16GRK5xpXThOjMaEOFnZ6zabejjG4J3da0SXG63KA==

app-builder-lib@24.6.4:
version "24.6.4"
resolved "https://registry.yarnpkg.com/app-builder-lib/-/app-builder-lib-24.6.4.tgz#5bf77dd89d3ee557bc615b9ddfaf383f3e51577b"
integrity sha512-m9931WXb83teb32N0rKg+ulbn6+Hl8NV5SUpVDOVz9MWOXfhV6AQtTdftf51zJJvCQnQugGtSqoLvgw6mdF/Rg==
app-builder-lib@24.9.1:
version "24.9.1"
resolved "https://registry.yarnpkg.com/app-builder-lib/-/app-builder-lib-24.9.1.tgz#bf3568529298b4de8595ed1acbb351fe27db5ba4"
integrity sha512-Q1nYxZcio4r+W72cnIRVYofEAyjBd3mG47o+zms8HlD51zWtA/YxJb01Jei5F+jkWhge/PTQK+uldsPh6d0/4g==
dependencies:
"7zip-bin" "~5.1.1"
"7zip-bin" "~5.2.0"
"@develar/schema-utils" "~2.6.5"
"@electron/notarize" "2.1.0"
"@electron/osx-sign" "1.0.5"
Expand All @@ -827,12 +827,12 @@ [email protected]:
"@types/fs-extra" "9.0.13"
async-exit-hook "^2.0.1"
bluebird-lst "^1.0.9"
builder-util "24.5.0"
builder-util-runtime "9.2.1"
builder-util "24.8.1"
builder-util-runtime "9.2.3"
chromium-pickle-js "^0.2.0"
debug "^4.3.4"
ejs "^3.1.8"
electron-publish "24.5.0"
electron-publish "24.8.1"
form-data "^4.0.0"
fs-extra "^10.1.0"
hosted-git-info "^4.1.0"
Expand Down Expand Up @@ -1031,24 +1031,24 @@ buffer@^5.1.0:
base64-js "^1.3.1"
ieee754 "^1.1.13"

[email protected].1:
version "9.2.1"
resolved "https://registry.yarnpkg.com/builder-util-runtime/-/builder-util-runtime-9.2.1.tgz#3184dcdf7ed6c47afb8df733813224ced4f624fd"
integrity sha512-2rLv/uQD2x+dJ0J3xtsmI12AlRyk7p45TEbE/6o/fbb633e/S3pPgm+ct+JHsoY7r39dKHnGEFk/AASRFdnXmA==
[email protected].3:
version "9.2.3"
resolved "https://registry.yarnpkg.com/builder-util-runtime/-/builder-util-runtime-9.2.3.tgz#0a82c7aca8eadef46d67b353c638f052c206b83c"
integrity sha512-FGhkqXdFFZ5dNC4C+yuQB9ak311rpGAw+/ASz8ZdxwODCv1GGMWgLDeofRkdi0F3VCHQEWy/aXcJQozx2nOPiw==
dependencies:
debug "^4.3.4"
sax "^1.2.4"

builder-util@24.5.0:
version "24.5.0"
resolved "https://registry.yarnpkg.com/builder-util/-/builder-util-24.5.0.tgz#8683c9a7a1c5c9f9a4c4d2789ecca0e47dddd3f9"
integrity sha512-STnBmZN/M5vGcv01u/K8l+H+kplTaq4PAIn3yeuufUKSpcdro0DhJWxPI81k5XcNfC//bjM3+n9nr8F9uV4uAQ==
builder-util@24.8.1:
version "24.8.1"
resolved "https://registry.yarnpkg.com/builder-util/-/builder-util-24.8.1.tgz#594d45b0c86d1d17f5c7bebbb77405080b2571c2"
integrity sha512-ibmQ4BnnqCnJTNrdmdNlnhF48kfqhNzSeqFMXHLIl+o9/yhn6QfOaVrloZ9YUu3m0k3rexvlT5wcki6LWpjTZw==
dependencies:
"7zip-bin" "~5.1.1"
"7zip-bin" "~5.2.0"
"@types/debug" "^4.1.6"
app-builder-bin "4.0.0"
bluebird-lst "^1.0.9"
builder-util-runtime "9.2.1"
builder-util-runtime "9.2.3"
chalk "^4.1.2"
cross-spawn "^7.0.3"
debug "^4.3.4"
Expand Down Expand Up @@ -1425,14 +1425,14 @@ dir-glob@^3.0.1:
dependencies:
path-type "^4.0.0"

dmg-builder@24.6.4:
version "24.6.4"
resolved "https://registry.yarnpkg.com/dmg-builder/-/dmg-builder-24.6.4.tgz#e19b8305f7e1ea0b4faaa30382c81b9d6de39863"
integrity sha512-BNcHRc9CWEuI9qt0E655bUBU/j/3wUCYBVKGu1kVpbN5lcUdEJJJeiO0NHK3dgKmra6LUUZlo+mWqc+OCbi0zw==
dmg-builder@24.9.1:
version "24.9.1"
resolved "https://registry.yarnpkg.com/dmg-builder/-/dmg-builder-24.9.1.tgz#04bf6c0dcd235f6214511f2358a78ed2b9379421"
integrity sha512-huC+O6hvHd24Ubj3cy2GMiGLe2xGFKN3klqVMLAdcbB6SWMd1yPSdZvV8W1O01ICzCCRlZDHiv4VrNUgnPUfbQ==
dependencies:
app-builder-lib "24.6.4"
builder-util "24.5.0"
builder-util-runtime "9.2.1"
app-builder-lib "24.9.1"
builder-util "24.8.1"
builder-util-runtime "9.2.3"
fs-extra "^10.1.0"
iconv-lite "^0.6.2"
js-yaml "^4.1.0"
Expand Down Expand Up @@ -1491,16 +1491,16 @@ ejs@^3.1.8:
dependencies:
jake "^10.8.5"

electron-builder@^24.6.4:
version "24.6.4"
resolved "https://registry.yarnpkg.com/electron-builder/-/electron-builder-24.6.4.tgz#c51271e49b9a02c9a3ec444f866b6008c4d98a1d"
integrity sha512-uNWQoU7pE7qOaIQ6CJHpBi44RJFVG8OHRBIadUxrsDJVwLLo8Nma3K/EEtx5/UyWAQYdcK4nVPYKoRqBb20hbA==
electron-builder@^24.9.1:
version "24.9.1"
resolved "https://registry.yarnpkg.com/electron-builder/-/electron-builder-24.9.1.tgz#4aee03947963b829a7f48a850fe02c219311ef63"
integrity sha512-v7BuakDuY6sKMUYM8mfQGrwyjBpZ/ObaqnenU0H+igEL10nc6ht049rsCw2HghRBdEwJxGIBuzs3jbEhNaMDmg==
dependencies:
app-builder-lib "24.6.4"
builder-util "24.5.0"
builder-util-runtime "9.2.1"
app-builder-lib "24.9.1"
builder-util "24.8.1"
builder-util-runtime "9.2.3"
chalk "^4.1.2"
dmg-builder "24.6.4"
dmg-builder "24.9.1"
fs-extra "^10.1.0"
is-ci "^3.0.0"
lazy-val "^1.0.5"
Expand All @@ -1526,14 +1526,14 @@ electron-notarize@^1.2.2:
debug "^4.1.1"
fs-extra "^9.0.1"

electron-publish@24.5.0:
version "24.5.0"
resolved "https://registry.yarnpkg.com/electron-publish/-/electron-publish-24.5.0.tgz#492a4d7caa232e88ee3c18f5c3b4dc637e5e1b3a"
integrity sha512-zwo70suH15L15B4ZWNDoEg27HIYoPsGJUF7xevLJLSI7JUPC8l2yLBdLGwqueJ5XkDL7ucYyRZzxJVR8ElV9BA==
electron-publish@24.8.1:
version "24.8.1"
resolved "https://registry.yarnpkg.com/electron-publish/-/electron-publish-24.8.1.tgz#4216740372bf4297a429543402a1a15ce8c3560b"
integrity sha512-IFNXkdxMVzUdweoLJNXSupXkqnvgbrn3J4vognuOY06LaS/m0xvfFYIf+o1CM8if6DuWYWoQFKPcWZt/FUjZPw==
dependencies:
"@types/fs-extra" "^9.0.11"
builder-util "24.5.0"
builder-util-runtime "9.2.1"
builder-util "24.8.1"
builder-util-runtime "9.2.3"
chalk "^4.1.2"
fs-extra "^10.1.0"
lazy-val "^1.0.5"
Expand Down

0 comments on commit dc1e267

Please sign in to comment.