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

Fix future3 installation for bookworm #2100

Merged
merged 5 commits into from
Nov 11, 2023
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
8 changes: 8 additions & 0 deletions installation/routines/setup_jukebox_core.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,19 @@ _jukebox_core_install_os_dependencies() {
python3-rpi.gpio python3-gpiozero \
espeak ffmpeg mpg123 \
pulseaudio pulseaudio-module-bluetooth pulseaudio-utils caps \
libasound2-dev \
--no-install-recommends \
--allow-downgrades \
--allow-remove-essential \
--allow-change-held-packages

# add configuration that we break the global python system packages
# (required for bookworm, see
# https://github.com/MiczFlor/RPi-Jukebox-RFID/issues/2050). This
# should be removed once the jukebox has been isolated to a dedicated
# venv
sudo python3 -m pip config set global.break-system-packages true

sudo pip3 install --upgrade pip
}

Expand Down
19 changes: 14 additions & 5 deletions installation/routines/setup_jukebox_webapp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
GD_ID_COMPILED_WEBAPP="1EE_1MdneGtKL5V7GyYZC0nb6ODQWTsPb" # https://drive.google.com/file/d/1EE_1MdneGtKL5V7GyYZC0nb6ODQWTsPb/view?usp=sharing

# For ARMv7+
NODE_SOURCE="https://deb.nodesource.com/setup_16.x"
NODE_MAJOR=16
# For ARMv6
# To update version, follow these links
# https://github.com/sdesalas/node-pi-zero
Expand All @@ -26,12 +26,18 @@ _jukebox_webapp_install_node() {
# Zero and older versions of Pi with ARMv6 only
# support experimental NodeJS
if [[ $(uname -m) == "armv6l" ]]; then
NODE_SOURCE=${NODE_SOURCE_EXPERIMENTAL}
wget -O - ${NODE_SOURCE_EXPERIMENTAL} | sudo bash
sudo apt-get -qq -y install nodejs
sudo npm install --silent -g npm
else
# install NodeJS and npm as recommended in
# https://github.com/nodesource/distributions
curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | sudo gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg
echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR.x nodistro main" | sudo tee /etc/apt/sources.list.d/nodesource.list
sudo apt-get update
sudo apt-get install nodejs npm -y
Comment on lines +33 to +38
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Based on the installation guide, we would have to do the following as well.

sudo apt-get install -y ca-certificates curl gnupg
sudo mkdir -p /etc/apt/keyrings

Did you omit those 2 lines on purpose?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these are standard libraries that have been installed already, probably due to previous installation steps (or eventually even as part of raspbian already)

fi

wget -O - ${NODE_SOURCE} | sudo bash
sudo apt-get -qq -y install nodejs
sudo npm install --silent -g npm
fi
}

Expand Down Expand Up @@ -67,6 +73,9 @@ _jukebox_webapp_register_as_system_service_with_nginx() {
sudo mv -f /etc/nginx/sites-available/default /etc/nginx/sites-available/default.orig
sudo cp -f "${INSTALLATION_PATH}/resources/default-settings/nginx.default" /etc/nginx/sites-available/default

# make sure nginx can access the home directory of the user
sudo chmod o+x /home/pi

sudo service nginx restart
}

Expand Down