From 82c01ff2bc1b0825e324f012c2ee40a97946136b Mon Sep 17 00:00:00 2001 From: Chris Marslender Date: Fri, 15 Apr 2022 14:13:00 -0500 Subject: [PATCH] Simplify how the chia symlink is created in the CLI .deb (#11188) --- build_scripts/assets/deb/postinst | 5 ----- build_scripts/assets/deb/prerm | 5 ----- build_scripts/build_linux_deb.sh | 5 ++--- 3 files changed, 2 insertions(+), 13 deletions(-) delete mode 100644 build_scripts/assets/deb/postinst delete mode 100644 build_scripts/assets/deb/prerm diff --git a/build_scripts/assets/deb/postinst b/build_scripts/assets/deb/postinst deleted file mode 100644 index ecd01ea753b2..000000000000 --- a/build_scripts/assets/deb/postinst +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/sh - -set -e - -ln -s /opt/chia/chia /usr/local/bin/chia diff --git a/build_scripts/assets/deb/prerm b/build_scripts/assets/deb/prerm deleted file mode 100644 index 30fb724db228..000000000000 --- a/build_scripts/assets/deb/prerm +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/sh - -set -e - -unlink /usr/local/bin/chia diff --git a/build_scripts/build_linux_deb.sh b/build_scripts/build_linux_deb.sh index bce0ea330111..62834020104d 100644 --- a/build_scripts/build_linux_deb.sh +++ b/build_scripts/build_linux_deb.sh @@ -49,12 +49,11 @@ fi pip install j2cli CLI_DEB_BASE="chia-blockchain-cli_$CHIA_INSTALLER_VERSION-1_$PLATFORM" mkdir -p "dist/$CLI_DEB_BASE/opt/chia" +mkdir -p "dist/$CLI_DEB_BASE/usr/bin" mkdir -p "dist/$CLI_DEB_BASE/DEBIAN" j2 -o "dist/$CLI_DEB_BASE/DEBIAN/control" assets/deb/control.j2 -cp assets/deb/postinst "dist/$CLI_DEB_BASE/DEBIAN/postinst" -cp assets/deb/prerm "dist/$CLI_DEB_BASE/DEBIAN/prerm" -chmod 0755 "dist/$CLI_DEB_BASE/DEBIAN/postinst" "dist/$CLI_DEB_BASE/DEBIAN/prerm" cp -r dist/daemon/* "dist/$CLI_DEB_BASE/opt/chia/" +ln -s ../../opt/chia/chia "dist/$CLI_DEB_BASE/usr/bin/chia" dpkg-deb --build --root-owner-group "dist/$CLI_DEB_BASE" # CLI only .deb done