diff --git a/.github/workflows/build-linux-installer-rpm.yml b/.github/workflows/build-linux-installer-rpm.yml index 16d8378fb6f3..ba6a48f54e51 100644 --- a/.github/workflows/build-linux-installer-rpm.yml +++ b/.github/workflows/build-linux-installer-rpm.yml @@ -119,7 +119,7 @@ jobs: git -C ./chia-blockchain-gui status . ./activate cd ./build_scripts - sh build_linux_rpm.sh amd64 + bash build_linux_rpm.sh amd64 - name: Upload Linux artifacts uses: actions/upload-artifact@v2 diff --git a/build_scripts/build_linux_rpm.sh b/build_scripts/build_linux_rpm.sh index 7ec656eeef8e..a383e8d70307 100644 --- a/build_scripts/build_linux_rpm.sh +++ b/build_scripts/build_linux_rpm.sh @@ -44,6 +44,31 @@ if [ "$LAST_EXIT_CODE" -ne 0 ]; then exit $LAST_EXIT_CODE fi +# Builds CLI only rpm +CLI_RPM_BASE="chia-blockchain-cli-$CHIA_INSTALLER_VERSION-1.$REDHAT_PLATFORM" +mkdir -p "dist/$CLI_RPM_BASE/opt/chia" +mkdir -p "dist/$CLI_RPM_BASE/usr/bin" +cp -r dist/daemon/* "dist/$CLI_RPM_BASE/opt/chia/" +ln -s ../../opt/chia/chia "dist/$CLI_RPM_BASE/usr/bin/chia" +# This is built into the base build image +# shellcheck disable=SC1091 +. /etc/profile.d/rvm.sh +rvm use ruby-3 +# /usr/lib64/libcrypt.so.1 is marked as a dependency specifically because newer versions of fedora bundle +# libcrypt.so.2 by default, and the libxcrypt-compat package needs to be installed for the other version +# Marking as a dependency allows yum/dnf to automatically install the libxcrypt-compat package as well +fpm -s dir -t rpm \ + -C "dist/$CLI_RPM_BASE" \ + -p "dist/$CLI_RPM_BASE.rpm" \ + --name chia-blockchain-cli \ + --license Apache-2.0 \ + --version "$CHIA_INSTALLER_VERSION" \ + --architecture "$REDHAT_PLATFORM" \ + --description "Chia is a modern cryptocurrency built from scratch, designed to be efficient, decentralized, and secure." \ + --depends /usr/lib64/libcrypt.so.1 \ + . +# CLI only rpm done + cp -r dist/daemon ../chia-blockchain-gui/packages/gui cd .. || exit cd chia-blockchain-gui || exit @@ -110,4 +135,7 @@ if [ "$REDHAT_PLATFORM" = "x86_64" ]; then fi fi +# Move the cli only rpm into final installers as well, so it gets uploaded as an artifact +mv "dist/$CLI_RPM_BASE.rpm" final_installer/ + ls final_installer/