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

Make changes for Raspberry Pi OS Bookworm #2084

Merged
merged 15 commits into from
Nov 8, 2023
Merged
14 changes: 11 additions & 3 deletions .github/workflows/pythonpackage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,20 @@ jobs:
run: |
pip install -r requirements.txt
pytest --cov --cov-report xml
- name: Report to Coveralls
- name: Report to Coveralls (parallel)
uses: coverallsapp/github-action@v2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
file: ./components/gpio_control/coverage.xml
format: cobertura
parallel: true



finish:
needs: build
runs-on: ubuntu-latest
steps:
- name: Close parallel build
uses: coverallsapp/github-action@v1
with:
parallel-finished: true
#carryforward: "run-1,run-2"
2 changes: 1 addition & 1 deletion .github/workflows/test_docker_debian.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
strategy:
fail-fast: false
matrix:
debian_version_name: ['bullseye', 'buster']
debian_version_name: ['bullseye', 'buster', 'bookworm']
uses: ./.github/workflows/test_docker_debian_versionname_sub.yml
with:
runs_on: ubuntu-latest
Expand Down
19 changes: 14 additions & 5 deletions scripts/installscripts/buster-install-default.sh
Original file line number Diff line number Diff line change
Expand Up @@ -838,7 +838,8 @@ install_main() {
local jukebox_dir="$1"
local apt_get="sudo apt-get -qq --yes"
local allow_downgrades="--allow-downgrades --allow-remove-essential --allow-change-held-packages"

local pip_install="sudo python3 -m pip install --upgrade --force-reinstall -q"

clear

echo "#####################################################
Expand Down Expand Up @@ -905,7 +906,7 @@ install_main() {
${apt_get} ${allow_downgrades} install raspberrypi-kernel-headers
fi

${apt_get} ${allow_downgrades} install samba samba-common-bin gcc lighttpd php-common php-cgi php at mpd mpc mpg123 git ffmpeg resolvconf spi-tools netcat alsa-utils lsof procps
${apt_get} ${allow_downgrades} install samba samba-common-bin gcc lighttpd php-common php-cgi php at mpd mpc mpg123 git ffmpeg resolvconf spi-tools netcat-traditional alsa-utils lsof procps

# in the docker test env fiddling with resolv.conf causes issues, see https://stackoverflow.com/a/60576223
if [ "$DOCKER_RUNNING" != "true" ]; then
Expand All @@ -918,6 +919,8 @@ install_main() {

# use python3 as default
sudo update-alternatives --install /usr/bin/python python /usr/bin/python3 1
# make compatible for Bookworm, which implements PEP 668
sudo python3 -m pip config set global.break-system-packages true

# Get github code
cd "${HOME_DIR}" || exit
Expand Down Expand Up @@ -953,12 +956,12 @@ install_main() {
${apt_get} ${allow_downgrades} install libspotify12 python3-cffi python3-ply python3-pycparser python3-spotify

# Install necessary Python packages
sudo python3 -m pip install --upgrade --force-reinstall -q -r "${jukebox_dir}"/requirements-spotify.txt
${pip_install} -r "${jukebox_dir}"/requirements-spotify.txt
fi

# Install more required packages
echo "Installing additional Python packages..."
sudo python3 -m pip install --upgrade --force-reinstall -q -r "${jukebox_dir}"/requirements.txt
${pip_install} -r "${jukebox_dir}"/requirements.txt

samba_config

Expand Down Expand Up @@ -1062,6 +1065,7 @@ install_main() {
local mopidy_conf="${HOME_DIR}/.config/mopidy/mopidy.conf"
echo "Configuring Spotify support..."
sudo systemctl disable mpd
sudo service mpd stop
sudo systemctl enable mopidy
# Install Config Files
sudo cp "${jukebox_dir}"/misc/sampleconfigs/locale.gen.sample /etc/locale.gen
Expand Down Expand Up @@ -1092,7 +1096,7 @@ install_main() {

# GPIO-Control
if [[ "${GPIOconfig}" == "YES" ]]; then
sudo python3 -m pip install --upgrade --force-reinstall -q -r "${jukebox_dir}"/requirements-GPIO.txt
${pip_install} -r "${jukebox_dir}"/requirements-GPIO.txt
sudo systemctl enable phoniebox-gpio-control.service
if [[ ! -f "${jukebox_dir}"/settings/gpio_settings.ini ]]; then
cp "${jukebox_dir}"/misc/sampleconfigs/gpio_settings.ini.sample "${jukebox_dir}"/settings/gpio_settings.ini
Expand All @@ -1114,6 +1118,11 @@ install_main() {
sudo sed -i "s%/home/pi%${HOME_DIR}%g" "${mpd_conf}"
sudo chown mpd:audio "${mpd_conf}"
sudo chmod 640 "${mpd_conf}"

# start mpd
echo "Starting mpd service..."
sudo service mpd restart
sudo systemctl enable mpd
fi

# set which version has been installed
Expand Down
2 changes: 1 addition & 1 deletion scripts/installscripts/tests/test_installation.sh
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ verify_apt_packages(){
local packages="samba
samba-common-bin gcc lighttpd php${phpver}-common php${phpver}-cgi php${phpver} at mpd mpc mpg123 git ffmpeg
resolvconf spi-tools python3 python3-dev python3-pip python3-setuptools python3-wheel python3-mutagen python3-gpiozero
python3-spidev netcat alsa-utils"
python3-spidev netcat-traditional alsa-utils"
local packages_raspberrypi="raspberrypi-kernel-headers"
local packages_spotify="libspotify-dev mopidy mopidy-mpd mopidy-local mopidy-spotify libspotify12
python3-cffi python3-ply python3-pycparser python3-spotify"
Expand Down
Loading