Skip to content

Commit

Permalink
feat!(deps): bump electron to 29 COMPASS-7868 (#5693)
Browse files Browse the repository at this point in the history
- Bump Electron to 29.x
- Drop support for RHEL 7
- Account for missing `root`/changed `rpm` output on RHEL8 when verifying signatures
  • Loading branch information
addaleax authored Apr 17, 2024
1 parent a49c599 commit 58907c1
Show file tree
Hide file tree
Showing 26 changed files with 94 additions and 113 deletions.
4 changes: 2 additions & 2 deletions .evergreen/buildvariants.yml
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,8 @@ buildvariants:
depends_on: package-compass

- name: rhel
display_name: RHEL 7.6 (Test and Package)
run_on: rhel76-large
display_name: RHEL 8.0 (Test and Package)
run_on: rhel80-large
tasks:
- name: check

Expand Down
12 changes: 6 additions & 6 deletions .evergreen/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"run_on": [
"ubuntu2004-large",
"windows-vsCurrent-large",
"rhel76-large",
"rhel80-large",
["macos-1100", { "gui": "macos-1100-gui" }],
["macos-1100-arm64", { "gui": "macos-1100-arm64-gui" }]
],
Expand Down Expand Up @@ -136,7 +136,7 @@
"vars": {
"mongodb_version": "latest-alpha-enterprise"
},
"skip_on": ["macos-1100", "macos-1100-arm64", "rhel76-large"]
"skip_on": ["macos-1100", "macos-1100-arm64", "rhel80-large"]
}
],
"test-web-sandbox": [
Expand All @@ -146,15 +146,15 @@
"mongodb_version": "latest-alpha-enterprise",
"browser_name": "chrome"
},
"skip_on": ["macos-1100", "macos-1100-arm64", "rhel76-large", "windows-vsCurrent-large"]
"skip_on": ["macos-1100", "macos-1100-arm64", "rhel80-large", "windows-vsCurrent-large"]
},
{
"name": "firefox",
"vars": {
"mongodb_version": "latest-alpha-enterprise",
"browser_name": "firefox"
},
"skip_on": ["macos-1100", "macos-1100-arm64", "rhel76-large", "windows-vsCurrent-large"]
"skip_on": ["macos-1100", "macos-1100-arm64", "rhel80-large", "windows-vsCurrent-large"]
}
]
}
Expand All @@ -163,7 +163,7 @@
"short": {
"ubuntu2004-large": "ubuntu",
"windows-vsCurrent-large": "windows",
"rhel76-large": "rhel",
"rhel80-large": "rhel",
"macos-1100": "macos",
"macos-1100-arm64": "macos-arm",
"macos-1100-gui": "macos-gui",
Expand All @@ -172,7 +172,7 @@
"long": {
"ubuntu2004-large": "Ubuntu 20.04",
"windows-vsCurrent-large": "Windows 10",
"rhel76-large": "RHEL 7.6",
"rhel80-large": "RHEL 8.0",
"macos-1100": "MacOS x64 11.00",
"macos-1100-arm64": "MacOS arm64 11.00",
"macos-1100-gui": "MacOS x64 11.00 w/ GUI Session",
Expand Down
16 changes: 7 additions & 9 deletions .evergreen/verify-artifacts.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ ARTIFACTS_DIR="packages/compass/dist"
echo "Verifying artifacts at $ARTIFACTS_DIR"
ls -l $ARTIFACTS_DIR

# Use tmp directory for all gpg operations
# Use tmp directory for all gpg operations/the rpm database
GPG_HOME=$(mktemp -d)
TMP_FILE=$(mktemp)
COMPASS_KEY="https://pgp.mongodb.com/compass.asc"
Expand Down Expand Up @@ -45,16 +45,14 @@ verify_using_rpm() {
# RPM packages are signed using gpg and the signature is embedded in the package.
# Here, we need to import the key in `rpm` and then verify the signature.
echo "Importing key into rpm"
rpm --import $COMPASS_KEY > "$TMP_FILE" 2>&1
# Even if the file is not signed, the command below will exit with 0 and output something like: sha1 md5 OK
rpm --dbpath "$GPG_HOME" --import $COMPASS_KEY > "$TMP_FILE" 2>&1
# Even if the file is not signed, the command below will exit with 0 and output something like: digests OK
# So we need to check the output of the command to see if the file is signed successfully.
echo "Verifying $1 using rpm"
output=$(rpm -K $ARTIFACTS_DIR/$1)
# Remove the imported key from rpm
rpm -e $(rpm -q gpg-pubkey --qf '%{name}-%{version}-%{release}:%{summary}\n' | grep compass | awk -F: '{print $1}')

output=$(rpm --dbpath "$GPG_HOME" -K $ARTIFACTS_DIR/$1)

# Check if the output contains the string "pgp md5 OK"
if [[ $output != *"pgp md5 OK"* ]]; then
if [[ $output != *"digests signatures OK"* ]]; then
echo "File $1 is not signed"
exit 1
fi
Expand Down Expand Up @@ -84,4 +82,4 @@ elif [ "$IS_OSX" = true ]; then
else
echo "Unknown OS, failed to verify file signing"
exit 1
fi
fi
2 changes: 1 addition & 1 deletion configs/webpack-config-compass/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
"cli-progress": "^3.9.1",
"core-js": "^3.17.3",
"css-loader": "^4.3.0",
"electron": "^28.2.10",
"electron": "^29.3.0",
"html-webpack-plugin": "^5.3.2",
"less-loader": "^10.0.1",
"mini-css-extract-plugin": "^2.3.0",
Expand Down
Loading

0 comments on commit 58907c1

Please sign in to comment.