Fix problems installing on Raspberry Pi OS 12 (bookworm) (#1408)

* Fix problems installing on Raspberry Pi OS 12 (bookworm)

* don’t cachePipPackages in option 1

* add gcc to required packages for web container
This commit is contained in:
Delan Azabani 2024-01-11 13:11:06 +08:00 committed by GitHub
parent b7f65d33e2
commit 2f483fdd9c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 21 additions and 6 deletions

View File

@ -4,7 +4,7 @@ ARG OS_VERSION=bullseye
FROM "debian:${OS_VERSION}-slim" FROM "debian:${OS_VERSION}-slim"
RUN apt-get update \ RUN apt-get update \
&& apt-get install -y --no-install-recommends sudo systemd rsyslog procps man-db wget git \ && apt-get install -y --no-install-recommends sudo systemd rsyslog procps man-db wget git gcc \
&& apt-get clean \ && apt-get clean \
&& rm -rf /var/lib/apt/lists/* && rm -rf /var/lib/apt/lists/*

View File

@ -76,7 +76,7 @@ SECRET_FILE="$HOME/.config/piscsi/secret"
FILE_SHARE_PATH="$HOME/shared_files" FILE_SHARE_PATH="$HOME/shared_files"
FILE_SHARE_NAME="Pi File Server" FILE_SHARE_NAME="Pi File Server"
APT_PACKAGES_COMMON="build-essential git protobuf-compiler bridge-utils ca-certificates" APT_PACKAGES_COMMON="build-essential git protobuf-compiler bridge-utils ca-certificates rsyslog"
APT_PACKAGES_BACKEND="libspdlog-dev libpcap-dev libprotobuf-dev protobuf-compiler libgmock-dev clang" APT_PACKAGES_BACKEND="libspdlog-dev libpcap-dev libprotobuf-dev protobuf-compiler libgmock-dev clang"
APT_PACKAGES_PYTHON="python3 python3-dev python3-pip python3-venv python3-setuptools python3-wheel libev-dev libevdev2" APT_PACKAGES_PYTHON="python3 python3-dev python3-pip python3-venv python3-setuptools python3-wheel libev-dev libevdev2"
APT_PACKAGES_WEB="nginx-light genisoimage man2html hfsutils dosfstools kpartx unzip unar disktype gettext" APT_PACKAGES_WEB="nginx-light genisoimage man2html hfsutils dosfstools kpartx unzip unar disktype gettext"
@ -1267,7 +1267,6 @@ function runChoice() {
echo "Detected piscsi control board service; will run the installation steps for the control board ui." echo "Detected piscsi control board service; will run the installation steps for the control board ui."
installPiscsiCtrlBoard installPiscsiCtrlBoard
fi fi
cachePipPackages
installPiscsiWebInterface installPiscsiWebInterface
installWebInterfaceService installWebInterfaceService
showServiceStatus "piscsi-oled" showServiceStatus "piscsi-oled"
@ -1497,9 +1496,6 @@ function runChoice() {
installWebInterfaceService installWebInterfaceService
echo "Automated install of the PiSCSI Service $(CONNECT_TYPE) complete!" echo "Automated install of the PiSCSI Service $(CONNECT_TYPE) complete!"
;; ;;
-h|--help|h|help)
showMenu
;;
*) *)
echo "${1} is not a valid option, exiting..." echo "${1} is not a valid option, exiting..."
exit 1 exit 1
@ -1520,7 +1516,13 @@ function readChoice() {
# Shows the interactive main menu of the script # Shows the interactive main menu of the script
function showMenu() { function showMenu() {
echo "For command line options, rerun with ./easyinstall.sh --help"
echo "Board Type: $CONNECT_TYPE | Compiler: $COMPILER | Compiler Cores: $CORES" echo "Board Type: $CONNECT_TYPE | Compiler: $COMPILER | Compiler Cores: $CORES"
if [[ $SKIP_MAKE_CLEAN ]]; then
echo "Skip 'make clean': YES"
else
echo "Skip 'make clean': NO (will compile from scratch every time!)"
fi
echo "" echo ""
echo "Choose among the following options:" echo "Choose among the following options:"
echo "INSTALL/UPDATE PISCSI" echo "INSTALL/UPDATE PISCSI"
@ -1592,6 +1594,19 @@ while [ "$1" != "" ]; do
-l | --skip_make_clean) -l | --skip_make_clean)
SKIP_MAKE_CLEAN=1 SKIP_MAKE_CLEAN=1
;; ;;
--help)
echo "Usage: ./easyinstall.sh [options]"
echo
echo "-c=TYPE, --connect_type=TYPE Connect type (FULLSPEC, STANDARD, AIBOM, GAMERNIUM)"
echo "-r=CHOICE, --run_choice=CHOICE Choose a menu option (1 to 16)"
echo "-j=CORES, --cores=CORES Compile on this many cores in parallel"
echo "-t=TOKEN, --token=TOKEN Token password for protecting PiSCSI"
echo "-h, --headless Don't ask questions (use with -r=CHOICE)"
echo "-g, --with_gcc Compile with g++ instead of clang++"
echo "-s, --skip_packages Don't install Debian packages"
echo "-l, --skip_make_clean Don't recompile from scratch every time"
exit
;;
*) *)
echo "ERROR: Unknown parameter \"$PARAM\"" echo "ERROR: Unknown parameter \"$PARAM\""
exit 1 exit 1