Skip to content

Commit

Permalink
Merge branch 'dev' into removals
Browse files Browse the repository at this point in the history
  • Loading branch information
StephanStS authored Jan 9, 2025
2 parents cfac858 + 256b615 commit ed5f2f3
Show file tree
Hide file tree
Showing 7 changed files with 32 additions and 76 deletions.
26 changes: 7 additions & 19 deletions .build/images/dietpi-build
Original file line number Diff line number Diff line change
Expand Up @@ -609,24 +609,15 @@ then

# Install Allo GUI via automated first run setup right here
G_CONFIG_INJECT 'AUTO_SETUP_AUTOMATED=' 'AUTO_SETUP_AUTOMATED=1' rootfs/boot/dietpi.txt
# - Workaround for skipped autologin in emulated Trixie containers: https://gitlab.com/qemu-project/qemu/-/issues/1962
# - Workaround for failing systemd services and hence missing autologin in emulated Trixie containers: https://gitlab.com/qemu-project/qemu/-/issues/1962, https://github.com/systemd/systemd/issues/31219
if (( $DISTRO == 8 && $G_HW_ARCH != $HW_ARCH && ( $G_HW_ARCH > 9 || $G_HW_ARCH < $HW_ARCH ) ))
then
cat << '_EOF_' > rootfs/etc/systemd/system/dietpi-automation.service
[Unit]
Description=DietPi-Automation
After=dietpi-postboot.service
[Service]
Type=idle
StandardOutput=tty
ExecStart=/bin/dash -c 'infocmp "$TERM" > /dev/null 2>&1 || export TERM=dumb; exec /boot/dietpi/dietpi-login'
ExecStop=/usr/bin/systemctl start poweroff.target
[Install]
WantedBy=multi-user.target
_EOF_
G_EXEC ln -s /etc/systemd/system/dietpi-automation.service rootfs/etc/systemd/system/multi-user.target.wants/
for i in rootfs/usr/lib/systemd/system/*.service
do
grep -q '^ImportCredential=' "$i" || continue
G_EXEC mkdir "${i/usr\/lib/etc}.d"
G_EXEC eval "echo -e '[Service]\nImportCredential=' > ${i/usr\/lib/etc}.d/dietpi-no-ImportCredential.conf"
done
fi
G_CONFIG_INJECT 'AUTO_SETUP_INSTALL_SOFTWARE_ID=' 'AUTO_SETUP_INSTALL_SOFTWARE_ID=159' rootfs/boot/dietpi.txt
# Revert autostart option, in case Amiberry image was generated before
Expand Down Expand Up @@ -711,9 +702,6 @@ _EOF_
# Revert ARMv6 Workaround
(( $HW_ARCH == 1 )) && G_EXEC rm rootfs/usr/local/bin/uname

# Revert workaround for skipped autologin in emulated Trixie containers: https://gitlab.com/qemu-project/qemu/-/issues/1962
(( $DISTRO == 8 )) && G_EXEC rm rootfs/etc/systemd/system/{multi-user.target.wants/,}dietpi-automation.service

[[ -f 'rootfs/success' ]] || { G_DIETPI-NOTIFY 1 'The container setup did not finish successfully, aborting...'; exit 1; }
G_EXEC rm rootfs/success
G_EXEC sync
Expand Down
23 changes: 7 additions & 16 deletions .build/software/Amiberry/container_build.bash
Original file line number Diff line number Diff line change
Expand Up @@ -119,24 +119,15 @@ G_EXEC mount "${FP_LOOP}p1" rootfs

# Enable automated setup
G_CONFIG_INJECT 'AUTO_SETUP_AUTOMATED=' 'AUTO_SETUP_AUTOMATED=1' rootfs/boot/dietpi.txt
# - Workaround for skipped autologin in emulated Trixie containers: https://gitlab.com/qemu-project/qemu/-/issues/1962
# - Workaround for failing systemd services and hence missing autologin in emulated Trixie containers: https://gitlab.com/qemu-project/qemu/-/issues/1962, https://github.com/systemd/systemd/issues/31219
if [[ $DISTRO == 'trixie' ]] && (( $G_HW_ARCH != $arch && ( $G_HW_ARCH > 9 || $G_HW_ARCH < $arch ) ))
then
cat << '_EOF_' > rootfs/etc/systemd/system/dietpi-automation.service
[Unit]
Description=DietPi-Automation
After=dietpi-postboot.service
[Service]
Type=idle
StandardOutput=tty
ExecStart=/bin/dash -c 'infocmp "$TERM" > /dev/null 2>&1 || { echo "[ WARN ] Unsupported TERM=\"$TERM\", switching to TERM=\"dumb\""; export TERM=dumb; }; exec /boot/dietpi/dietpi-login'
ExecStop=/usr/bin/systemctl start poweroff.target
[Install]
WantedBy=multi-user.target
_EOF_
G_EXEC ln -s /etc/systemd/system/dietpi-automation.service rootfs/etc/systemd/system/multi-user.target.wants/
for i in rootfs/usr/lib/systemd/system/*.service
do
grep -q '^ImportCredential=' "$i" || continue
G_EXEC mkdir "${i/usr\/lib/etc}.d"
G_EXEC eval "echo -e '[Service]\nImportCredential=' > ${i/usr\/lib/etc}.d/dietpi-no-ImportCredential.conf"
done
fi

# Workaround invalid TERM on login
Expand Down
26 changes: 7 additions & 19 deletions .build/software/dietpi-software-build.bash
Original file line number Diff line number Diff line change
Expand Up @@ -123,24 +123,15 @@ G_EXEC mount "${FP_LOOP}p1" rootfs

# Enable automated setup
G_CONFIG_INJECT 'AUTO_SETUP_AUTOMATED=' 'AUTO_SETUP_AUTOMATED=1' rootfs/boot/dietpi.txt
# - Workaround for skipped autologin in emulated Trixie containers: https://gitlab.com/qemu-project/qemu/-/issues/1962
# - Workaround for failing systemd services and hence missing autologin in emulated Trixie containers: https://gitlab.com/qemu-project/qemu/-/issues/1962, https://github.com/systemd/systemd/issues/31219
if [[ $DISTRO == 'trixie' ]] && (( $G_HW_ARCH != $arch && ( $G_HW_ARCH > 9 || $G_HW_ARCH < $arch ) ))
then
cat << '_EOF_' > rootfs/etc/systemd/system/dietpi-automation.service
[Unit]
Description=DietPi-Automation
After=dietpi-postboot.service
[Service]
Type=idle
StandardOutput=tty
ExecStart=/bin/dash -c 'infocmp "$TERM" > /dev/null 2>&1 || { echo "[ WARN ] Unsupported TERM=\"$TERM\", switching to TERM=\"dumb\""; export TERM=dumb; }; exec /boot/dietpi/dietpi-login'
ExecStop=/usr/bin/systemctl start poweroff.target
[Install]
WantedBy=multi-user.target
_EOF_
G_EXEC ln -s /etc/systemd/system/dietpi-automation.service rootfs/etc/systemd/system/multi-user.target.wants/
for i in rootfs/usr/lib/systemd/system/*.service
do
grep -q '^ImportCredential=' "$i" || continue
G_EXEC mkdir "${i/usr\/lib/etc}.d"
G_EXEC eval "echo -e '[Service]\nImportCredential=' > ${i/usr\/lib/etc}.d/dietpi-no-ImportCredential.conf"
done
fi

# Install Go for Gogs
Expand All @@ -159,9 +150,6 @@ G_EXEC sed --follow-symlinks -i 's|Prompt_on_Failure$|{ journalctl -n 50; ss -tu
# Avoid DietPi-Survey uploads to not mess with the statistics
G_EXEC rm rootfs/root/.ssh/known_hosts

# ARMv6/7 Trixie: Temporarily prevent dist-upgrade on Trixie, as it fails due to 64-bit time_t transition causing dependency conflicts across the repo.
(( $arch < 3 )) && [[ $DISTRO == 'trixie' ]] && G_EXEC touch rootfs/boot/dietpi/.skip_distro_upgrade

# Automated build
cat << _EOF_ > rootfs/boot/Automation_Custom_Script.sh || Error_Exit 'Failed to generate Automation_Custom_Script.sh'
#!/bin/dash
Expand Down
1 change: 0 additions & 1 deletion .build/software/vaultwarden/build.bash
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ G_DIETPI-NOTIFY 2 'Installing Rust via rustup'
grep -q '^ID=raspbian' /etc/os-release && G_HW_ARCH_NAME='armv6l' host=('--default-host' 'arm-unknown-linux-gnueabihf') || host=()
# - ARMv7: Apply workaround for failing crates index update in in emulated 32-bit ARM environments: https://github.com/rust-lang/cargo/issues/8719. CARGO_REGISTRIES_CRATES_IO_PROTOCOL='sparse' does not solve everything: https://github.com/rust-lang/cargo/issues/8719#issuecomment-1928540617
# - ARMv8: Apply workaround for increased cargo fetch RAM usage: https://github.com/rust-lang/cargo/issues/10583
# - Trixie: Set missing HOME, since the script runs from a systemd unit without login shell and hence no HOME set.
export HOME=$(mktemp -d) CARGO_NET_GIT_FETCH_WITH_CLI='true'
G_EXEC cd "$HOME"
G_EXEC curl -sSfo rustup-init.sh 'https://sh.rustup.rs'
Expand Down
25 changes: 7 additions & 18 deletions .github/workflows/dietpi-software.bash
Original file line number Diff line number Diff line change
Expand Up @@ -355,26 +355,15 @@ G_EXEC eval 'echo '\''infocmp "$TERM" > /dev/null 2>&1 || { echo "[ INFO ] Unsup

# Enable automated setup
G_CONFIG_INJECT 'AUTO_SETUP_AUTOMATED=' 'AUTO_SETUP_AUTOMATED=1' rootfs/boot/dietpi.txt
# - Workaround for skipped autologin in emulated Trixie containers: https://gitlab.com/qemu-project/qemu/-/issues/1962
# - Set HOME path, required e.g. go builds, which is otherwise missing when started from a systemd unit.
# - Workaround for failing systemd services and hence missing autologin in emulated Trixie containers: https://gitlab.com/qemu-project/qemu/-/issues/1962, https://github.com/systemd/systemd/issues/31219
if [[ $DISTRO == 'trixie' ]] && (( $G_HW_ARCH != $arch && ( $G_HW_ARCH > 9 || $G_HW_ARCH < $arch ) ))
then
cat << '_EOF_' > rootfs/etc/systemd/system/dietpi-automation.service
[Unit]
Description=DietPi-Automation
After=dietpi-postboot.service
[Service]
Type=idle
StandardOutput=tty
Environment=HOME=/root
ExecStart=/bin/dash -c 'infocmp "$TERM" > /dev/null 2>&1 || export TERM=dumb; exec /boot/dietpi/dietpi-login'
ExecStop=/usr/bin/systemctl start poweroff.target
[Install]
WantedBy=multi-user.target
_EOF_
G_EXEC ln -s /etc/systemd/system/dietpi-automation.service rootfs/etc/systemd/system/multi-user.target.wants/
for i in rootfs/usr/lib/systemd/system/*.service
do
grep -q '^ImportCredential=' "$i" || continue
G_EXEC mkdir "${i/usr\/lib/etc}.d"
G_EXEC eval "echo -e '[Service]\nImportCredential=' > ${i/usr\/lib/etc}.d/dietpi-no-ImportCredential.conf"
done
fi

# Workaround for failing IPv4 network connectivity check as GitHub Actions runners do not receive external ICMP echo replies.
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ Removed software:
- DietPi-Software | A number of software options have been removed from our menus, which were installed just as single APT package, without any configuration or dependant. Running dietpi-software for such is overkill, as one can just use the native Debian package manager directly, like "apt install tcpdump". Affected packages: mc, vifm, iftop, iptraf, iperf, mtr-tiny, nload, tcpdump, emacs, jed, vim, vim-tiny, neovim. Note: They won't be removed from your system, and they are upgraded as usual via "apt upgrade" or DietPi updates. The only difference is that you cannot install or uninstall them via dietpi-software anymore, but instead via APT directly.

Bug fixes:
- Orange Pi 5 Max | Resolved an issue where onboard WiFi was not working. Many thanks to @diego-hsp for reporting this issue: https://github.com/MichaIng/DietPi/issues/7338
- DietPi-Software | Sonarr: Resolved an issue where the internal updater did not work due to permission limits in the systemd unit. Many thanks to @tellice for reporting this issue: https://github.com/MichaIng/DietPi/issues/7321
- DietPi-Software | Fail2Ban: Resolved an issue where a fixed Dropbear filter could not be installed, because the directory did not exist yet. Many thanks to @augustresende for reporting this issue: https://github.com/MichaIng/DietPi/issues/7325
- DietPi-Software | Raspotify: Resolved an issue where the service failed to start, if Avahi-Daemon was not installed. librespot has it as new default DNS discovery backend, and official pre-compiled Raspotify binaries are not compiled with the old DNS-SD backend anymore. Avahi-Daemon is hence installed now by DietPi-Software as well. Many thanks to @gergokis for reporting this issue: https://github.com/MichaIng/DietPi/issues/7323
Expand Down
6 changes: 3 additions & 3 deletions dietpi/dietpi-software
Original file line number Diff line number Diff line change
Expand Up @@ -513,7 +513,7 @@ Available commands:
#------------------
software_id=167
aSOFTWARE_NAME[$software_id]='Raspotify'
aSOFTWARE_DESC[$software_id]='Spotify connect client'
aSOFTWARE_DESC[$software_id]='A Spotify Connect client that mostly Just Works™'
aSOFTWARE_CATX[$software_id]=2
aSOFTWARE_DOCS[$software_id]='https://dietpi.com/docs/software/media/#raspotify'
aSOFTWARE_DEPS[$software_id]='5 152'
Expand Down Expand Up @@ -7344,7 +7344,7 @@ _EOF_

if To_Install 179 komga # Komga
then
local fallback_url='https://github.com/gotson/komga/releases/download/1.16.0/komga-1.16.0.jar'
local fallback_url='https://github.com/gotson/komga/releases/download/1.17.0/komga-1.17.0.jar
Download_Install "$(curl -sSfL 'https://api.github.com/repos/gotson/komga/releases/latest' | mawk -F\" '/^ *"browser_download_url": ".*\/komga-[^"\/]*\.jar"$/{print $4}')" /mnt/dietpi_userdata/komga/komga.jar

# User
Expand Down Expand Up @@ -10537,7 +10537,7 @@ _EOF_
*) local arch='arm-6';;
esac

local fallback_url="https://github.com/go-gitea/gitea/releases/download/v1.22.6/gitea-1.22.6-linux-$arch.xz"
local fallback_url="https://github.com/go-gitea/gitea/releases/download/v1.23.0/gitea-1.23.0-linux-$arch.xz"
Download_Install "$(curl -sSfL 'https://api.github.com/repos/go-gitea/gitea/releases/latest' | mawk -F\" "/\"browser_download_url\": \".*\/gitea-[^\"\/]*-linux-$arch\.xz\"/{print \$4}")" /mnt/dietpi_userdata/gitea/gitea

# User
Expand Down

0 comments on commit ed5f2f3

Please sign in to comment.