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

Release v8.18 #6406

Merged
merged 112 commits into from
Jun 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
112 commits
Select commit Hold shift + click to select a range
6ba1d61
Init v8.18
MichaIng May 10, 2023
5f70a20
v8.18 (#6371)
Joulinar May 10, 2023
6736daa
v8.18
MichaIng May 10, 2023
20c04ad
v8.18 (#6370)
dano6 May 10, 2023
8d54e0e
v8.18
MichaIng May 11, 2023
139cffc
v8.18 (#6378)
StephanStS May 13, 2023
035ec2f
v8.18
MichaIng May 17, 2023
cf88052
v8.18
MichaIng May 17, 2023
0821e06
v8.18 (#6380)
pulpe May 17, 2023
3398a0e
v8.18 (#6375)
ma651851384 May 18, 2023
55f8514
v8.18
MichaIng May 19, 2023
0efd632
v8.18
MichaIng May 20, 2023
f1c385e
v8.18
MichaIng May 21, 2023
21a5e3f
v8.18
MichaIng May 21, 2023
a15078b
v8.18
MichaIng May 21, 2023
a599e33
v8.18
MichaIng May 21, 2023
c7d7a05
v8.18
MichaIng May 24, 2023
a18ac82
v8.18
MichaIng May 24, 2023
e6f6251
v8.18
MichaIng May 24, 2023
deed508
v8.18
MichaIng May 24, 2023
bab0373
v8.18
MichaIng May 24, 2023
1bdb9f2
v8.18
MichaIng May 27, 2023
6154321
v8.18
MichaIng May 27, 2023
11b653b
v8.18
MichaIng May 27, 2023
14ef809
v8.18 (#6391)
MichaIng May 27, 2023
930de49
v8.18
MichaIng May 27, 2023
1386461
v8.18
MichaIng May 27, 2023
80c4f41
v8.18 (#6365)
MichaIng May 27, 2023
f571be7
Beta v8.18.0 (#6395)
MichaIng May 27, 2023
d2e513a
v8.18
MichaIng May 28, 2023
5991a7a
v8.18
MichaIng May 28, 2023
044ec97
v8.18
MichaIng May 28, 2023
e6d4ba3
v8.18
MichaIng May 28, 2023
42ec9a5
v8.18
MichaIng May 29, 2023
070f07c
v8.18
MichaIng May 29, 2023
46fd29b
v8.18
MichaIng May 29, 2023
70f7fae
v8.18
MichaIng May 29, 2023
afd1ca1
v8.18
MichaIng May 29, 2023
97e380a
v8.18
MichaIng May 29, 2023
45c6b01
v8.18
MichaIng May 29, 2023
a6973d0
v8.18
MichaIng May 29, 2023
baf4e55
v8.18
MichaIng May 29, 2023
79fc97a
v8.18
MichaIng May 29, 2023
8d79764
v8.18
MichaIng May 29, 2023
6bde129
v8.18
MichaIng May 29, 2023
fcd7ce8
v8.18
MichaIng May 29, 2023
9852c8a
v8.18
MichaIng May 29, 2023
6dbcd55
v8.18
MichaIng May 30, 2023
0844cf8
v8.18
MichaIng May 30, 2023
00cefd7
v8.18
MichaIng May 30, 2023
4f7b007
v8.18
MichaIng May 30, 2023
5406f65
v8.18 (#6398)
MichaIng May 30, 2023
18b3e4d
v8.18
MichaIng May 30, 2023
83ec236
v8.18
MichaIng May 30, 2023
7639bb3
v8.18
MichaIng May 30, 2023
8769e0a
v8.18
MichaIng May 31, 2023
7456ef4
v8.18 (#6401)
MichaIng May 31, 2023
92c2502
v8.18
MichaIng May 31, 2023
d75e1d7
v8.18
MichaIng May 31, 2023
5809033
v8.18
MichaIng May 31, 2023
8bcf6f5
v8.18
MichaIng May 31, 2023
1ae7661
v8.18
MichaIng May 31, 2023
751d963
v8.18
MichaIng May 31, 2023
f31655f
v8.18
MichaIng May 31, 2023
6d589b8
v8.18
MichaIng May 31, 2023
f7df163
v8.18
MichaIng May 31, 2023
133f17d
v8.18
MichaIng May 31, 2023
0f7d0f0
v8.18
MichaIng Jun 1, 2023
2c72095
v8.18
MichaIng Jun 1, 2023
b0bc3ad
v8.18
MichaIng Jun 1, 2023
a2bcfd5
v8.18
MichaIng Jun 1, 2023
3315289
v8.18
MichaIng Jun 1, 2023
5f52da2
v8.18
MichaIng Jun 1, 2023
a02120f
v8.18
MichaIng Jun 1, 2023
378ef32
v8.18 (#6405)
MichaIng Jun 1, 2023
4ee5e6a
v8.18
MichaIng Jun 1, 2023
53f378e
v8.18
MichaIng Jun 1, 2023
175fd61
v8.18
MichaIng Jun 2, 2023
5956f37
Beta v8.18.1 (#6397)
MichaIng Jun 2, 2023
9a0962b
v8.18
MichaIng Jun 3, 2023
9db05ad
v8.18
MichaIng Jun 3, 2023
0baa61b
v8.18
MichaIng Jun 3, 2023
38e5ec6
v8.18
MichaIng Jun 3, 2023
ccc5d41
v8.18
MichaIng Jun 3, 2023
52c7aba
v8.18
MichaIng Jun 3, 2023
82ed5a8
v8.18
MichaIng Jun 3, 2023
68ba90a
v8.18
MichaIng Jun 3, 2023
54ed26e
v8.18
MichaIng Jun 3, 2023
dc62495
v8.18
MichaIng Jun 3, 2023
ceae1da
v8.18
MichaIng Jun 3, 2023
fc9cb6b
v8.18
MichaIng Jun 3, 2023
92dc2d3
v8.18
MichaIng Jun 3, 2023
00f9a01
v8.18
MichaIng Jun 3, 2023
9d03ac3
v8.18
MichaIng Jun 3, 2023
03b6f6f
v8.18
MichaIng Jun 3, 2023
ee404d7
v8.18
MichaIng Jun 3, 2023
e6565c1
v8.18
MichaIng Jun 3, 2023
a4b6b61
v8.18 (#6410)
MichaIng Jun 3, 2023
d828298
v8.18
MichaIng Jun 3, 2023
f896aa5
v8.18
MichaIng Jun 3, 2023
0521a43
v8.18
MichaIng Jun 3, 2023
f0c4f28
v8.18
MichaIng Jun 3, 2023
9fc2cfc
v8.18
MichaIng Jun 3, 2023
7691e22
v8.18
MichaIng Jun 3, 2023
69d6b3d
v8.18
MichaIng Jun 3, 2023
58be308
v8.18
MichaIng Jun 3, 2023
6f9ea3f
Beta v8.18.2 (#6411)
MichaIng Jun 3, 2023
10d032a
v8.18
MichaIng Jun 3, 2023
6221f9d
v8.18 (#6412)
MichaIng Jun 3, 2023
1f5625f
v8.18
MichaIng Jun 3, 2023
79b4d07
v8.18
MichaIng Jun 3, 2023
cd6ccb8
v8.18 (#6413)
MichaIng Jun 3, 2023
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
9 changes: 9 additions & 0 deletions .build/images/Quartz64/quartz64_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -408,6 +408,15 @@ CONFIG_SATA_MV=y
CONFIG_PATA_PLATFORM=y
CONFIG_PATA_OF_PLATFORM=y
CONFIG_MD=y
CONFIG_MD_LINEAR=m
CONFIG_MD_RAID0=m
CONFIG_MD_RAID1=m
CONFIG_MD_RAID10=m
CONFIG_MD_RAID456=m
CONFIG_MD_MULTIPATH=m
CONFIG_MD_FAULTY=m
CONFIG_MD_CLUSTER=m

CONFIG_BLK_DEV_MD=m
CONFIG_BLK_DEV_DM=m
CONFIG_DM_MIRROR=m
Expand Down
10 changes: 6 additions & 4 deletions .build/images/dietpi-build
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ case $HW_MODEL in
'68.1') iname='NanoPiM4' HW_ARCH=3 partition_start=16 root_size=752;;
'68.2') iname='NanoPCT4' HW_ARCH=3 partition_start=16 root_size=752;;
'68.3') iname='NanoPiNEO4' HW_ARCH=3 partition_start=16 root_size=752;;
70) iname='SparkySBC' HW_ARCH=2 partition_start=8 boot_size=48 root_size=712 boot_fstype='fat16';;
72) iname='ROCKPi4' HW_ARCH=3 partition_start=16 root_size=752;;
73) iname='ROCKPiS' HW_ARCH=3 partition_start=16 root_size=752;;
74) iname='RadxaZero' HW_ARCH=3 partition_start=4 root_size=764;;
Expand Down Expand Up @@ -212,8 +213,8 @@ if [[ ! -f $keyring ]]
then
case $keyring in
*'raspbian'*) url='https://archive.raspbian.org/raspbian/pool/main/r/raspbian-archive-keyring/raspbian-archive-keyring_20120528.2_all.deb';;
*'debian-ports'*) url='http://deb.debian.org/debian/pool/main/d/debian-ports-archive-keyring/debian-ports-archive-keyring_2023.02.01_all.deb';;
*) url='https://deb.debian.org/debian/pool/main/d/debian-archive-keyring/debian-archive-keyring_2021.1.1_all.deb';;
*'debian-ports'*) url='https://deb.debian.org/debian/pool/main/d/debian-ports-archive-keyring/debian-ports-archive-keyring_2023.02.01~deb11u1_all.deb';;
*) url='https://deb.debian.org/debian/pool/main/d/debian-archive-keyring/debian-archive-keyring_2023.3_all.deb';;
esac
G_EXEC curl -sSf "$url" -o /tmp/keyring.deb
G_EXEC_OUTPUT=1 G_EXEC dpkg -i /tmp/keyring.deb
Expand Down Expand Up @@ -459,7 +460,7 @@ export FP_ROOT_DEV CLONING_TOOL OUTPUT_IMG_NAME MOUNT_IT='Off' SKIP_ARCHIVE SKIP
[[ $EDITION && $EDITION != 'all' ]] || bash -c "$(curl -sSf "https://raw.githubusercontent.com/$G_GITOWNER/DietPi/$G_GITBRANCH/.build/images/dietpi-imager")" 'DietPi-Imager' "$OUTPUT_IMG_NAME.img" || exit 1

# Amiberry edition: Install automatically on first boot, enable autostart option and onboard audio on RPi
if [[ $EDITION =~ ^(Amiberry|all)$ ]]
if [[ $EDITION == 'Amiberry' || ( $EDITION == 'all' && $HW_MODEL == 0 ) ]]
then
G_EXEC mv "$OUTPUT_IMG_NAME.img" "${OUTPUT_IMG_NAME}_Amiberry.img"
OUTPUT_IMG_NAME="${OUTPUT_IMG_NAME}_Amiberry"
Expand Down Expand Up @@ -498,7 +499,7 @@ then
fi

# AlloGUI edition: Pre-install Allo GUI with all managed audiophile software
if [[ $EDITION =~ ^(AlloGUI|all)$ ]]
if [[ $EDITION == 'AlloGUI' || ( $EDITION == 'all' && $HW_MODEL =~ ^(0|70)$ ) ]]
then
G_EXEC mv "$OUTPUT_IMG_NAME.img" "${OUTPUT_IMG_NAME%_Amiberry}_AlloGUI.img"
OUTPUT_IMG_NAME="${OUTPUT_IMG_NAME%_Amiberry}_AlloGUI"
Expand Down Expand Up @@ -551,6 +552,7 @@ then
{
. /boot/dietpi/func/dietpi-globals
/boot/dietpi/dietpi-services stop
/boot/dietpi/dietpi-services enable

# RPi: Reset for supporting all models
if (( $G_HW_MODEL < 10 ))
Expand Down
122 changes: 33 additions & 89 deletions .build/images/dietpi-installer
Original file line number Diff line number Diff line change
Expand Up @@ -1053,19 +1053,19 @@ _EOF_
# Workaround for Odroid N2 failing to boot from eMMC: https://forum.armbian.com/topic/20206-odroid-n2-issues-with-recent-firmware-and-emmc-modules/#comment-142409
elif (( $G_HW_MODEL == 15 ))
then
G_EXEC curl -sSfO 'https://dietpi.com/downloads/binaries/u-boot-odroidn2.bin.gz'
G_EXEC gzip -d u-boot-odroidn2.bin.gz
G_EXEC dd if=u-boot-odroidn2.bin "of=$BOOT_DEVICE" bs=512 seek=1 conv=notrunc,fdatasync
G_EXEC rm u-boot-odroidn2.bin
G_EXEC curl -sSfo u-boot.gz 'https://dietpi.com/downloads/binaries/u-boot-odroidn2.bin.gz'
G_EXEC gzip -d u-boot.gz
G_EXEC dd if=u-boot "of=$BOOT_DEVICE" bs=512 seek=1 conv=notrunc,fdatasync
G_EXEC rm u-boot

# Workaround for NanoPi R1 failing boot: https://github.com/MichaIng/DietPi/issues/5927
elif (( $G_HW_MODEL == 48 ))
then
G_EXEC curl -sSfO 'https://dietpi.com/downloads/binaries/u-boot-nanopir1.bin.gz'
G_EXEC gzip -d u-boot-nanopir1.bin.gz
G_EXEC curl -sSfo u-boot.gz 'https://dietpi.com/downloads/binaries/u-boot-nanopir1.bin.gz'
G_EXEC gzip -d u-boot.gz
G_EXEC dd if=/dev/zero "of=$BOOT_DEVICE" bs=1K count=1023 seek=1 conv=notrunc,fdatasync
G_EXEC dd if=u-boot-nanopir1.bin "of=$BOOT_DEVICE" bs=1K seek=8 conv=notrunc,fdatasync
G_EXEC rm u-boot-nanopir1.bin
G_EXEC dd if=u-boot "of=$BOOT_DEVICE" bs=1K seek=8 conv=notrunc,fdatasync
G_EXEC rm u-boot
fi

# RPi
Expand Down Expand Up @@ -1122,15 +1122,35 @@ _EOF_
G_EXEC rm package.deb

# VisionFive 2
elif [[ $G_HW_MODEL == 81 ]]
elif (( $G_HW_MODEL == 81 ))
then
[[ -f '/boot/extlinux/extlinux.conf' ]] && G_EXEC rm /boot/extlinux/extlinux.conf
G_EXEC curl -sSfo package.deb 'https://dietpi.com/downloads/binaries/linux-image-visionfive2.deb'
[[ -f '/boot/extlinux/extlinux.conf' ]] && G_EXEC rm /boot/extlinux/extlinux.conf
G_EXEC_OUTPUT=1 G_EXEC dpkg -i package.deb
G_EXEC rm package.deb
G_EXEC sed -i "s/root=[^[:blank:]]*/root=PARTUUID=$(findmnt -Ufnro PARTUUID -M /)/" /boot/extlinux/extlinux.conf
G_EXEC sed -i "s/rootfstype=[^[:blank:]]*/rootfstype=$(findmnt -Ufnro FSTYPE -M /)/" /boot/extlinux/extlinux.conf

# Sparky SBC
elif (( $G_HW_MODEL == 70 ))
then
G_EXEC curl -sSfo package.deb 'https://dietpi.com/downloads/binaries/firmware-sparkysbc.deb'
[[ -f '/boot/uenv.txt' ]] && G_EXEC rm /boot/uenv.txt
G_EXEC_OUTPUT=1 G_EXEC dpkg -i package.deb
G_EXEC rm package.deb

G_EXEC curl -sSfo u-boot.gz 'https://dietpi.com/downloads/binaries/u-boot-sparkysbc.img.gz'
G_EXEC gzip -d u-boot.gz
G_EXEC dd if=u-boot "of=$BOOT_DEVICE" bs=1 count=442 conv=notrunc,fdatasync
G_EXEC dd if=u-boot "of=$BOOT_DEVICE" bs=512 skip=1 seek=1 conv=notrunc,fdatasync
G_EXEC rm u-boot

# Use performance governor for stability
G_CONFIG_INJECT 'CONFIG_CPU_GOVERNOR=' 'CONFIG_CPU_GOVERNOR=performance' /boot/dietpi.txt

# Apply Lighttpd as default webserver, since Apache does not run on Linux 3.10: https://dietpi.com/forum/t/allogui-not-working-apache-service-doesnt-start/15708
G_CONFIG_INJECT 'AUTO_SETUP_WEB_SERVER_INDEX=' 'AUTO_SETUP_WEB_SERVER_INDEX=-2' /boot/dietpi.txt

# Armbian grab currently installed packages
elif [[ $G_HW_MODEL != 75 && $(dpkg-query -Wf '${Package} ') == *'armbian'* ]]
then
Expand Down Expand Up @@ -1196,8 +1216,8 @@ _EOF_
G_EXEC rm -Rf /etc/apt/sources.list.d/{,.??,.[^.]}*
G_EXEC eval "echo 'deb https://apt.armbian.com/ $DISTRO_TARGET_NAME main' > /etc/apt/sources.list.d/dietpi-armbian.list"

# Generic kernel + device tree + U-Boot package auto detect + initramfs-tools (not required on Sparky SBC)
elif (( $G_HW_MODEL != 75 && $G_HW_MODEL != 70 ))
# Generic kernel + device tree + U-Boot package auto detect + initramfs-tools
elif (( $G_HW_MODEL != 75 ))
then
mapfile -t apackages < <(dpkg-query -Wf '${Package}\n' | grep -E '^linux-(image|dtb|u-boot)-|^u-boot')
[[ ${apackages[0]} ]] || G_DIETPI-NOTIFY 2 'Unable to find kernel packages for installation. Assuming non-APT/.deb kernel installation.'
Expand Down Expand Up @@ -1809,84 +1829,8 @@ _EOF_'
G_EXEC eval 'echo -e '\''apm = 127\nforce_spindown_time = 120'\'' > /etc/hdparm.conf'
fi

# Sparky SBC
if (( $G_HW_MODEL == 70 ))
then
# Install latest kernel/drivers
G_EXEC curl -sSf 'https://raw.githubusercontent.com/sparky-sbc/sparky-test/master/dragon_fly_check/uImage' -o /boot/uImage
G_EXEC curl -sSfO 'https://raw.githubusercontent.com/sparky-sbc/sparky-test/master/dragon_fly_check/3.10.38.bz2'
G_EXEC rm -Rf /lib/modules/*
G_EXEC tar -xf 3.10.38.bz2 -C /lib/modules/
G_EXEC rm 3.10.38.bz2
# - USB audio update
G_EXEC curl -sSf 'https://raw.githubusercontent.com/sparky-sbc/sparky-test/master/dsd-marantz/snd-usb-audio.ko' -o /lib/modules/3.10.38/kernel/sound/usb/snd-usb-audio.ko
# - Ethernet update
G_EXEC curl -sSf 'https://raw.githubusercontent.com/sparky-sbc/sparky-test/master/sparky-eth/ethernet.ko' -o /lib/modules/3.10.38/kernel/drivers/net/ethernet/acts/ethernet.ko

# Boot args
cat << '_EOF_' > /boot/uenv.txt
uenvcmd=setenv os_type linux;
bootargs=earlyprintk clk_ignore_unused selinux=0 scandelay console=tty0 loglevel=1 real_rootflag=rw root=/dev/mmcblk0p2 rootwait init=/lib/systemd/systemd aotg.urb_fix=1 aotg.aotg1_speed=0 net.ifnames=0 systemd.unified_cgroup_hierarchy=0
_EOF_
# Blacklist GPU and touch screen modules: https://github.com/MichaIng/DietPi/issues/699#issuecomment-271362441
cat << '_EOF_' > /etc/modprobe.d/dietpi-disable_sparkysbc_touchscreen.conf
blacklist owl_camera
blacklist gsensor_stk8313
blacklist ctp_ft5x06
blacklist ctp_gsl3680
blacklist gsensor_bma222
blacklist gsensor_mir3da
_EOF_
cat << '_EOF_' > /etc/modprobe.d/dietpi-disable_sparkysbc_gpu.conf
blacklist pvrsrvkm
blacklist drm
blacklist videobuf2_vmalloc
blacklist bc_example
_EOF_
# Use performance gov for stability
G_CONFIG_INJECT 'CONFIG_CPU_GOVERNOR=' 'CONFIG_CPU_GOVERNOR=performance' /boot/dietpi.txt

# Install script to toggle between USB and onboard Ethernet automatically
cat << '_EOF_' > /var/lib/dietpi/services/dietpi-sparkysbc_ethernet.sh
#!/bin/dash
# Called from: /etc/systemd/system/dietpi-sparkysbc_ethernet.service
# We need to wait until USB Ethernet is established on USB bus, which takes much longer than onboard init.
sleep 20
# Disable onboard Ethernet if USB Ethernet is found
if ip a s eth1 > /dev/null 2>&1; then

echo 'blacklist ethernet' > /etc/modprobe.d/dietpi-disable_sparkysbc_ethernet.conf
reboot

# Enable onboard Ethernet if no adapter is found
elif ! ip a s eth0 > /dev/null 2>&1; then

rm -f /etc/modprobe.d/dietpi-disable_sparkysbc_ethernet.conf
reboot

fi
_EOF_
G_EXEC chmod +x /var/lib/dietpi/services/dietpi-sparkysbc_ethernet.sh
cat << '_EOF_' > /etc/systemd/system/dietpi-sparkysbc_ethernet.service
[Unit]
Description=Sparky SBC auto detect and toggle onboard/USB Ethernet
Wants=network-online.target
After=network-online.target

[Service]
RemainAfterExit=yes
ExecStart=/var/lib/dietpi/services/dietpi-sparkysbc_ethernet.sh

[Install]
WantedBy=multi-user.target
_EOF_
G_EXEC systemctl enable dietpi-sparkysbc_ethernet

# Apply Lighttpd as default webserver, since Apache does not run on Linux 3.10: https://dietpi.com/forum/t/allogui-not-working-apache-service-doesnt-start/15708
G_CONFIG_INJECT 'AUTO_SETUP_WEB_SERVER_INDEX=' 'AUTO_SETUP_WEB_SERVER_INDEX=-2' /boot/dietpi.txt

# RPi
elif (( $G_HW_MODEL < 10 ))
if (( $G_HW_MODEL < 10 ))
then
# Apply minimum GPU memory split for server usage: This applies a custom dtoverlay to disable VCSM: https://github.com/MichaIng/DietPi/pull/3900
/boot/dietpi/func/dietpi-set_hardware gpumemsplit 16
Expand Down
42 changes: 34 additions & 8 deletions .build/software/shairport-sync/build.bash
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,14 @@ G_AGUP
G_AGDUG automake pkg-config make g++ libpopt-dev libconfig-dev libssl-dev libsoxr-dev libavahi-client-dev libasound2-dev libglib2.0-dev libmosquitto-dev avahi-daemon git libplist-dev libsodium-dev libgcrypt20-dev libavformat-dev xxd
(( $G_DISTRO == 5 )) && G_EXEC systemctl unmask avahi-daemon

# Download
# Obtain latest version
name='shairport-sync'
name_pretty='Shairport Sync'
repo='https://github.com/mikebrady/shairport-sync'
version='4.1.1'
version=$(curl -sSf 'https://api.github.com/repos/mikebrady/shairport-sync/releases/latest' | mawk -F\" '/^ "tag_name"/{print $4}')
[[ $version ]] || { G_DIETPI-NOTIFY 1 "No latest $name_pretty version found, aborting ..."; exit 1; }

# Download
G_DIETPI-NOTIFY 2 "Building $name_pretty version \e[33m$version"
G_EXEC cd /tmp
G_EXEC curl -sSfLO "$repo/archive/$version.tar.gz"
Expand Down Expand Up @@ -83,7 +86,7 @@ general =

// drift_tolerance_in_seconds = 0.002; // allow a timing error of this number of seconds of drift away from exact synchronisation before attempting to correct it
// resync_threshold_in_seconds = 0.050; // a synchronisation error greater than this number of seconds will cause resynchronisation; 0 disables it

// resync_recovery_time_in_seconds = 0.100; // allow this extra time to recover after a late resync. Increase the value, possibly to 0.5, in a virtual machine.
// playback_mode = "stereo"; // This can be "stereo", "mono", "reverse stereo", "both left" or "both right". Default is "stereo".
// alac_decoder = "hammerton"; // This can be "hammerton" or "apple". This advanced setting allows you to choose
// the original Shairport decoder by David Hammerton or the Apple Lossless Audio Codec (ALAC) decoder written by Apple.
Expand All @@ -98,9 +101,24 @@ general =
// "standard" makes the volume change more quickly at lower volumes and slower at higher volumes.
// "flat" makes the volume change at the same rate at all volumes.
// volume_control_combined_hardware_priority = "no"; // when extending the volume range by combining the built-in software attenuator with the hardware mixer attenuator, set this to "yes" to reduce volume by using the hardware mixer first, then the built-in software attenuator.

// default_airplay_volume = -24.0; // this is the suggested volume after a reset or after the high_volume_threshold has been exceed and the high_volume_idle_timeout_in_minutes has passed

// The following settings are for dealing with potentially surprising high ("very loud") volume levels.
// When a new play session starts, it usually requests a suggested volume level from Shairport Sync. This is normally the volume level of the last session.
// This can cause unpleasant surprises if the last session was (a) very loud and (b) a long time ago.
// Thus, the user could be unpleasantly surprised by the volume level of the new session.

// To deal with this, when the last session volume is "very loud", the following two settings will lower the suggested volume after a period of idleness:

// high_threshold_airplay_volume = -16.0; // airplay volume greater or equal to this is "very loud"
// high_volume_idle_timeout_in_minutes = 0; // if the current volume is "very loud" and the device is not playing for more than this time, suggest the default volume for new connections instead of the current volume.
// Note 1: This timeout is set to 0 by default to disable this feature. Set it to some positive number, e.g. 180 to activate the feature.
// Note 2: Not all applications use the suggested volume: MacOS Music and Mac OS System Sounds use their own settings.

// run_this_when_volume_is_set = "/full/path/to/application/and/args"; // Run the specified application whenever the volume control is set or changed.
// The desired AirPlay volume is appended to the end of the command line – leave a space if you want it treated as an extra argument.
// AirPlay volume goes from 0 to -30 and -144 means "mute".
// AirPlay volume goes from 0.0 to -30.0 and -144.0 means "mute".

// audio_backend_latency_offset_in_seconds = 0.0; // This is added to the latency requested by the player to delay or advance the output by a fixed amount.
// Use it, for example, to compensate for a fixed delay in the audio back end.
Expand Down Expand Up @@ -315,16 +333,24 @@ DEPS_APT_VERSIONED=${DEPS_APT_VERSIONED%,}
# shellcheck disable=SC2001
grep -q 'raspbian' /etc/os-release && DEPS_APT_VERSIONED=$(sed 's/+rp[it][0-9]\+[^)]*)/)/g' <<< "$DEPS_APT_VERSIONED") || DEPS_APT_VERSIONED=$(sed 's/+b[0-9]\+)/)/g' <<< "$DEPS_APT_VERSIONED")

# - Obtain version suffix
G_EXEC curl -sSfo package.deb "https://dietpi.com/downloads/binaries/$G_DISTRO_NAME/shairport-sync_$G_HW_ARCH_NAME.deb"
old_version=$(dpkg-deb -f package.deb Version)
G_EXEC rm package.deb
suffix=${old_version#*-dietpi}
[[ $old_version == "$version-"* ]] && suffix="dietpi$((suffix+1))" || suffix="dietpi1"

# - control
cat << _EOF_ > "$DIR/DEBIAN/control"
Package: $name
Version: $version-dietpi1
Version: $version-$suffix
Architecture: $(dpkg --print-architecture)
Maintainer: MichaIng <[email protected]>
Date: $(date -u '+%a, %d %b %Y %T %z')
Standards-Version: 4.6.1.1
Standards-Version: 4.6.2.0
Installed-Size: $(du -sk "$DIR" | mawk '{print $1}')
Depends:$DEPS_APT_VERSIONED
Conflicts: $name-airplay2
Section: sound
Priority: optional
Homepage: $repo
Expand Down Expand Up @@ -472,14 +498,14 @@ grep -q 'raspbian' /etc/os-release && DEPS_APT_VERSIONED=$(sed 's/+rp[it][0-9]\+
# - control
cat << _EOF_ > "$DIR/DEBIAN/control"
Package: $name-airplay2
Version: $version-dietpi1
Version: $version-$suffix
Architecture: $(dpkg --print-architecture)
Maintainer: MichaIng <[email protected]>
Date: $(date -u '+%a, %d %b %Y %T %z')
Standards-Version: 4.6.2.0
Installed-Size: $(du -sk "$DIR" | mawk '{print $1}')
Depends:$DEPS_APT_VERSIONED
Conflicts: shairport-sync
Conflicts: $name
Section: sound
Priority: optional
Homepage: $repo
Expand Down
25 changes: 10 additions & 15 deletions .build/software/shairport-sync/container_build.bash
Original file line number Diff line number Diff line change
Expand Up @@ -43,26 +43,21 @@ do
esac
shift
done
case $DISTRO in
5) distro='buster';;
6) distro='bullseye';;
7) distro='bookworm';;
*) G_DIETPI-NOTIFY 1 "Invalid distro \"$DISTRO\" passed, aborting..."; exit 1;;
esac
[[ $DISTRO =~ ^('buster'|'bullseye'|'bookworm')$ ]] || { G_DIETPI-NOTIFY 1 "Invalid distro \"$DISTRO\" passed, aborting..."; exit 1; }
case $ARCH in
1) image="DietPi_Container-ARMv6-${distro^}" arch='armv6l';;
2) image="DietPi_Container-ARMv7-${distro^}" arch='armv7l';;
3) image="DietPi_Container-ARMv8-${distro^}" arch='aarch64';;
10) image="DietPi_Container-x86_64-${distro^}" arch='x86_64';;
11) image='DietPi_Container-RISC-V-Sid' arch='riscv64';;
'armv6l') image="DietPi_Container-ARMv6-${DISTRO^}" arch=1;;
'armv7l') image="DietPi_Container-ARMv7-${DISTRO^}" arch=2;;
'aarch64') image="DietPi_Container-ARMv8-${DISTRO^}" arch=3;;
'x86_64') image="DietPi_Container-x86_64-${DISTRO^}" arch=10;;
'riscv64') image='DietPi_Container-RISC-V-Sid' arch=11;;
*) G_DIETPI-NOTIFY 1 "Invalid architecture \"$ARCH\" passed, aborting..."; exit 1;;
esac

##########################################
# Dependencies
##########################################
apackages=('7zip' 'parted' 'fdisk' 'systemd-container')
(( $G_HW_ARCH == $ARCH || ( $G_HW_ARCH < 10 && $G_HW_ARCH > $ARCH ) )) || apackages+=('qemu-user-static' 'binfmt-support')
(( $G_HW_ARCH == $arch || ( $G_HW_ARCH < 10 && $G_HW_ARCH > $arch ) )) || apackages+=('qemu-user-static' 'binfmt-support')
G_AG_CHECK_INSTALL_PREREQ "${apackages[@]}"

##########################################
Expand Down Expand Up @@ -92,7 +87,7 @@ G_EXEC mount "${FP_LOOP}p1" rootfs
G_CONFIG_INJECT 'AUTO_SETUP_AUTOMATED=' 'AUTO_SETUP_AUTOMATED=1' rootfs/boot/dietpi.txt

# Force ARMv6 arch on Raspbian
(( $ARCH == 1 )) && echo 'sed -i -e '\''/^G_HW_ARCH=/c\G_HW_ARCH=1'\'' -e '\''/^G_HW_ARCH_NAME=/c\G_HW_ARCH_NAME=armv6l'\'' /boot/dietpi/.hw_model' > rootfs/boot/Automation_Custom_PreScript.sh
(( $arch == 1 )) && echo 'sed -i -e '\''/^G_HW_ARCH=/c\G_HW_ARCH=1'\'' -e '\''/^G_HW_ARCH_NAME=/c\G_HW_ARCH_NAME=armv6l'\'' /boot/dietpi/.hw_model' > rootfs/boot/Automation_Custom_PreScript.sh

# Avoid DietPi-Survey uploads to not mess with the statistics
G_EXEC rm rootfs/root/.ssh/known_hosts
Expand All @@ -109,13 +104,13 @@ cat << _EOF_ > rootfs/boot/Automation_Custom_Script.sh || exit 1
#!/bin/dash
echo '[ INFO ] Running Shairport Sync build script...'
bash -c "\$(curl -sSf 'https://raw.githubusercontent.com/$G_GITOWNER/DietPi/$G_GITBRANCH/.build/software/shairport-sync/build.bash')"
mv -v '/tmp/shairport-sync_$arch.deb' '/tmp/shairport-sync-airplay2_$arch.deb' /
mv -v '/tmp/shairport-sync_$ARCH.deb' '/tmp/shairport-sync-airplay2_$ARCH.deb' /
poweroff
_EOF_

##########################################
# Boot container
##########################################
systemd-nspawn -bD rootfs
[[ -f rootfs/shairport-sync_$arch.deb ]] || exit 1
[[ -f rootfs/shairport-sync_$ARCH.deb ]] || exit 1
}
Loading