Skip to content
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

Add cli only rpm #11236

Merged
merged 6 commits into from
Apr 21, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/build-linux-installer-rpm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
28 changes: 28 additions & 0 deletions build_scripts/build_linux_rpm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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/