Add /usr/bin/chia and /opt/chia symlinks to the UI RPM to mirror available paths in the CLI version

Already exists in the UI .deb - this is the last linux installer that needed this
This commit is contained in:
Chris Marslender 2022-07-18 10:03:01 -05:00
parent 52e0d430c7
commit da7b35e8a6
No known key found for this signature in database
GPG Key ID: 5A3FF8E135EABA2C
5 changed files with 28 additions and 3 deletions

View File

View File

@ -0,0 +1,7 @@
#!/usr/bin/env bash
# Post install script for the UI .rpm to place symlinks in places to allow the CLI to work similarly in both versions
set -e
ln -s /usr/lib/chia-blockchain/resources/app.asar.unpacked/daemon/chia /usr/bin/chia || true
ln -s /usr/lib/chia-blockchain/resources/app.asar.unpacked/daemon /opt/chia || true

View File

@ -0,0 +1,7 @@
#!/usr/bin/env bash
# Pre remove script for the UI .rpm to clean up the symlinks from the installer
set -e
unlink /usr/bin/chia || true
unlink /opt/chia || true

View File

@ -124,9 +124,10 @@ if [ "$REDHAT_PLATFORM" = "x86_64" ]; then
# shellcheck disable=SC2086
sed -i "s#throw new Error('Please upgrade to RPM 4.13.*#console.warn('You are using RPM < 4.13')\n return { requires: [ 'gtk3', 'libnotify', 'nss', 'libXScrnSaver', 'libXtst', 'xdg-utils', 'at-spi2-core', 'libdrm', 'mesa-libgbm', 'libxcb' ] }#g" $GLOBAL_NPM_ROOT/electron-installer-redhat/src/dependencies.js
electron-installer-redhat --src dist/$DIR_NAME/ --dest final_installer/ \
--arch "$REDHAT_PLATFORM" --options.version $CHIA_INSTALLER_VERSION \
--license ../LICENSE --options.bin chia-blockchain --options.name chia-blockchain
electron-installer-redhat --src dist/$DIR_NAME/ \
--arch "$REDHAT_PLATFORM" \
--options.version $CHIA_INSTALLER_VERSION \
--config rpm-options.json
LAST_EXIT_CODE=$?
if [ "$LAST_EXIT_CODE" -ne 0 ]; then
echo >&2 "electron-installer-redhat failed!"

View File

@ -0,0 +1,10 @@
{
"dest": "final_installer/",
"bin": "chia-blockchain",
"name": "chia-blockchain",
"license": "../LICENSE",
"scripts": {
"post": "assets/rpm/postinst.sh",
"preun": "assets/rpm/prerm.sh"
}
}