Skip to content

Commit

Permalink
Beta v9.2.1 (#6957)
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaIng authored Mar 17, 2024
2 parents 5252cb5 + 60b75b7 commit e838da4
Show file tree
Hide file tree
Showing 8 changed files with 129 additions and 115 deletions.
14 changes: 7 additions & 7 deletions .update/patches
Original file line number Diff line number Diff line change
Expand Up @@ -1504,13 +1504,6 @@ map $arg_v $asset_immutable {
# shellcheck disable=SC2230
G_EXEC sed -i "s|, reboot, poweroff|, $(which reboot), $(which poweroff)|" /etc/sudoers.d/octoprint
fi

# Amiberry
if grep -q '^[[:blank:]]*aSOFTWARE_INSTALL_STATE\[108\]=2' /boot/dietpi/.installed && dpkg --compare-versions "$(dpkg-query -Wf '${Version}' amiberry 2> /dev/null)" lt 5.6.6-dietpi1
then
G_DIETPI-NOTIFY 2 'Preparing Amiberry upgrade to v5.6.6, including migration for RPi systems from fake KMS DispmanX to full KMS SDL2 graphics backend'
echo 108 >> /var/tmp/dietpi/dietpi-update_reinstalls
fi
fi
}

Expand Down Expand Up @@ -1607,6 +1600,13 @@ Patch_9_2()
G_AGI ./package.deb
G_EXEC rm package.deb
fi

# Amiberry
if grep -q '^[[:blank:]]*aSOFTWARE_INSTALL_STATE\[108\]=2' /boot/dietpi/.installed && dpkg --compare-versions "$(dpkg-query -Wf '${Version}' amiberry 2> /dev/null)" lt 5.6.8-dietpi1
then
G_DIETPI-NOTIFY 2 'Preparing Amiberry upgrade to v5.6.6, including migration for RPi systems from fake KMS DispmanX to full KMS SDL2 graphics backend'
echo 108 >> /var/tmp/dietpi/dietpi-update_reinstalls
fi
fi
}

Expand Down
2 changes: 1 addition & 1 deletion .update/version
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Available DietPi version
G_REMOTE_VERSION_CORE=9
G_REMOTE_VERSION_SUB=2
G_REMOTE_VERSION_RC=0
G_REMOTE_VERSION_RC=1
# Minimum DietPi version to allow update
G_MIN_VERSION_CORE=7
G_MIN_VERSION_SUB=0
Expand Down
9 changes: 4 additions & 5 deletions BRANCH_SYSTEM.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,11 @@ By joining the Beta and reporting issues, you will be assisting DietPi (and all
1. Recommended: Backup your system with `dietpi-backup` (or backup quickly with `dietpi-backup 1`).
2. Run the following command to switch to "beta" branch:
```sh
G_CONFIG_INJECT 'DEV_GITBRANCH=' 'DEV_GITBRANCH=beta' /boot/dietpi.txt
G_DEV_BRANCH beta
```
3. Run `dietpi-update` to update the system, then reboot (or update quickly with `dietpi-update 1`).
4. Test away, please report any issues on our GitHub page. Also ensure you mention "beta branch" in your post: https://github.com/MichaIng/DietPi/issues
5. If you want to return the system to the previous restore state, run `dietpi-backup` to restore (or restore quickly with `dietpi-backup -1`).
3. Test away, please report any issues on our GitHub page. Also ensure you mention "beta branch" in your post: https://github.com/MichaIng/DietPi/issues
4. If you want to return the system to the previous restore state, run `dietpi-backup` to restore (or restore quickly with `dietpi-backup -1`).

## Steps to use the DietPi "dev" branch
#### This is the active development branch. It is potentially unstable, unsupported and should not be used by end users.
1. Same as above, however, use `DEV_GITBRANCH=dev` instead.
1. Same as above, however, use `G_DEV_BRANCH dev` instead.
7 changes: 5 additions & 2 deletions CHANGELOG.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,22 @@ v9.2
(2024-03-16)

Enhancements:
- NanoPi R4S | Resolved an issue where Ethernet adapter of the "LAN" port could disappear after a soft reboot. Many thanks to @idaanx for reporting this issue: https://github.com/MichaIng/DietPi/issues/6342
- DietPi-Banner | Support for showing the current RAM usage was added. Many thanks to @Andr3Carvalh0 for the implementation: https://github.com/MichaIng/DietPi/pull/6844
- DietPi-Software | It is now possible to run "dietpi-software list" concurrent to other dietpi-software instances, and as non-root user. This avoids an issue in DietPi-Dashboard, where opening dietpi-software in the Terminal and switching to the Software page, caused an infinite hang.
- DietPi-Software | Gogs/Gitea: Using repositories via SSH should now work OOTB with new installs and reinstalls. If pull or push operations via SSH fail in your case, try to give the respective user a default shell: "sudo usermod -s /bin/dash gogs" respectively "sudo usermod -s /bin/dash gitea". This is now included in our default setup. Many thanks to @din14970 for reporting this missing feature: https://github.com/MichaIng/DietPi/discussions/6964#discussioncomment-8813390

Bug fixes:
- NanoPi R4S | Resolved an issue where Ethernet adapter of the "LAN" port could disappear after a soft reboot. Many thanks to @idaanx for reporting this issue: https://github.com/MichaIng/DietPi/issues/6342
- DietPi-Globals | Resolved an issue where a concurrent DietPi script detection could have prevented the start of a script, if a previous instance was killed via SIGKILL.
- DietPi-Config | Resolved an issue where a WiFi connection, configured for the first time via dietpi-config from a local terminal session, was automatically stopped when exiting or logging out from the terminal session.
- DietPi-Config | Resolved an issue on RPi systems, where HDMI audio did not work if full KMS was enabled. The firmware/bcm2835 HDMI audio driver conflicts with the full KMS display driver, hence the VC4 HDMI driver needs to be used instead. That one however only supports the IEC958 audio format, which requires a complex ALSA config. This config is shipped with the "libasound2-data" package of the RPi APT repository, but it was overwritten by our /etc/asound.conf. For HDMI audio to work with KMS, the "default" or "sysdefault" ALSA PCM needs to be used by players. This is usually the case, but some allow to select a specific sound card, in which case the ALSA config and plugin for IEC958 conversion is bypassed, breaking HDMI audio. Many thanks to @Lollly2997 for reporting this issue. We are working with Amiberry on a solution for Amiberry in particular. This fix is for the underlying system level: https://dietpi.com/forum/t/19568
- DietPi-Software | PaperMC: Resolved an issue where installing the Geyser and Floodgate plugins failed due to changed download URLs, and a false syntax in the Geyser config file. Many thanks to @boterocamilo for reporting this issue: https://github.com/MichaIng/DietPi/issues/6898
- DietPi-Software | Nextcloud: Resolved an issue with the updated Nginx config where assets were served with the wrong MIME type. This fix was backported to v9.1 and a live patch offered. Many thanks to @howardroark for reporting this issue: https://dietpi.com/forum/t/nextcloud-theme-broken-after-upgrade-v9-1-1/19372
- DietPi-Software | Home Assistant: Resolved an issue on x86_64 and ARMv8 systems where some core integrations did not work if no C++ compiler was installed. If you are affected by this, "apt install g++ && systemctl restart home-assistant" will fix it. Many thanks to @pdsakurai for fixing this issue in our install code: https://github.com/MichaIng/DietPi/pull/6931
- DietPi-Software | DarkIce: Resolved an issue where the service failed to start due to false config file permissions.
- DietPi-Software | LXQt: Resolved an issue where the installation failed on Trixie and RISC-V systems, since we did not host a config archive for those Debian versions yet. Many thanks to @jtmoon79 for reporting this issue: https://github.com/MichaIng/DietPi/issues/6939

As always, many smaller code performance and stability improvements, visual and spelling fixes have been done, too much to list all of them here. Check out all code changes of this release on GitHub: https://github.com/MichaIng/DietPi/pull/ADDME
As always, many smaller code performance and stability improvements, visual and spelling fixes have been done, too much to list all of them here. Check out all code changes of this release on GitHub: https://github.com/MichaIng/DietPi/pull/6955

-----------------------------------------------------------------------------------------------------------

Expand Down
144 changes: 72 additions & 72 deletions dietpi/dietpi-software
Original file line number Diff line number Diff line change
Expand Up @@ -6501,7 +6501,7 @@ _EOF_
esac

# Download
local fallback_url="https://github.com/fatedier/frp/releases/download/v0.54.0/frp_0.54.0_linux_$arch.tar.gz"
local fallback_url="https://github.com/fatedier/frp/releases/download/v0.55.1/frp_0.55.1_linux_$arch.tar.gz"
Download_Install "$(curl -sSfL 'https://api.github.com/repos/fatedier/frp/releases/latest' | mawk -F\" "/\"browser_download_url\": .*\/frp_[0-9.]*_linux_$arch\.tar\.gz\"/{print \$4}")"

G_EXEC cd frp_*
Expand Down Expand Up @@ -7425,7 +7425,7 @@ _EOF_
then
Download_Install 'https://github.com/gotson/komga/releases/download/v0.165.0/komga-0.165.0.jar' /mnt/dietpi_userdata/komga/komga.jar
else
local fallback_url='https://github.com/gotson/komga/releases/download/1.10.3/komga-1.10.3.jar'
local fallback_url='https://github.com/gotson/komga/releases/download/1.10.4/komga-1.10.4.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
fi

Expand Down Expand Up @@ -7521,7 +7521,7 @@ _EOF_
local json=()
[[ $PHP_VERSION == 8* ]] || aDEPS+=("php$PHP_VERSION-json") json=('json')

local fallback_url="https://github.com/ampache/ampache/releases/download/6.2.1/ampache-6.2.1_all_php$PHP_VERSION.zip"
local fallback_url="https://github.com/ampache/ampache/releases/download/6.3.0/ampache-6.3.0_all_php$PHP_VERSION.zip"
Download_Install "$(curl -sSfL 'https://api.github.com/repos/ampache/ampache/releases/latest' | mawk -F\" "/^ *\"browser_download_url\": \".*\/ampache-[0-9\.]*_all_php$PHP_VERSION.zip\"$/{print \$4}")" ampache

# Reinstall: Preserve configs from old and new paths
Expand Down Expand Up @@ -8401,68 +8401,6 @@ Environment="SHELL=/bin/bash" "HOME=/root"
ExecStart=$(command -v node) webui.js
KillMode=process

[Install]
WantedBy=multi-user.target
_EOF_
fi

if To_Install 49 gogs # Gogs
then
# ARMv6/RISC-V: No pre-compiled binaries available, so we host our own.
if (( $G_HW_ARCH == 1 || $G_HW_ARCH == 11 ))
then
local url="https://dietpi.com/downloads/binaries/$G_DISTRO_NAME/gogs_$G_HW_ARCH_NAME.7z"

# Else install latest binaries from GitHub
else
case $G_HW_ARCH in
2) local arch='armv7';;
3) local arch='armv8';;
*) local arch='amd64';;
esac

local fallback_url="https://github.com/gogs/gogs/releases/download/v0.13.0/gogs_0.13.0_linux_$arch.tar.gz"
local url=$(curl -sSfL 'https://api.github.com/repos/gogs/gogs/releases/latest' | mawk -F\" "/^ *\"browser_download_url\": \".*\/gogs_[^\"\/]*_linux_$arch.tar.gz\"$/{print \$4}")
fi

Download_Install "$url"
G_EXEC mkdir -p /etc/gogs
G_EXEC mv gogs/gogs /etc/gogs/gogs
G_EXEC rm -R gogs

# Pre-v8.14: Remove unnecessary init scripts
[[ -d '/etc/gogs/scripts' ]] && G_EXEC rm -R /etc/gogs/scripts

# User
Create_User -d /etc/gogs gogs

# Directories + permissions
G_EXEC mkdir -p /mnt/dietpi_userdata/gogs-repo
G_EXEC chown -R gogs:gogs /etc/gogs /mnt/dietpi_userdata/gogs-repo

# Database
/boot/dietpi/func/create_mysql_db gogs gogs "$GLOBAL_PW"

# Service: https://github.com/gogs/gogs/blob/main/scripts/systemd/gogs.service
cat << '_EOF_' > /etc/systemd/system/gogs.service
[Unit]
Description=Gogs (DietPi)
Wants=network-online.target
After=network-online.target mariadb.service

[Service]
User=gogs
LogsDirectory=gogs
WorkingDirectory=/etc/gogs
ExecStart=/etc/gogs/gogs web

# Hardening
ProtectSystem=full
PrivateDevices=yes
PrivateTmp=yes
NoNewPrivileges=true
ReadWritePaths=-/etc/gogs

[Install]
WantedBy=multi-user.target
_EOF_
Expand Down Expand Up @@ -8576,7 +8514,7 @@ _EOF_
# Install ruTorrent: Web UI for rTorrent
# - Grab current version
local version=$(curl -sSfL 'https://api.github.com/repos/Novik/ruTorrent/releases/latest' | mawk -F\" '/^ *"tag_name": "[^"]*",$/{print $4}')
[[ $version ]] || { version='v4.2.10'; G_DIETPI-NOTIFY 1 "Automatic latest ruTorrent version detection failed. Version \"$version\" will be installed as fallback, but a newer version might be available. Please report this at: https://github.com/MichaIng/DietPi/issues"; }
[[ $version ]] || { version='v4.2.11'; G_DIETPI-NOTIFY 1 "Automatic latest ruTorrent version detection failed. Version \"$version\" will be installed as fallback, but a newer version might be available. Please report this at: https://github.com/MichaIng/DietPi/issues"; }
Download_Install "https://github.com/Novik/ruTorrent/archive/$version.tar.gz"

# - Reinstall freshly with preserved configs and 3rd party plugins
Expand Down Expand Up @@ -10088,7 +10026,7 @@ _EOF_
*) local arch='x64';;
esac

local fallback_url="https://github.com/Readarr/Readarr/releases/download/v0.3.19.2437/Readarr.develop.0.3.19.2437.linux-core-$arch.tar.gz"
local fallback_url="https://github.com/Readarr/Readarr/releases/download/v0.3.20.2452/Readarr.develop.0.3.20.2452.linux-core-$arch.tar.gz"
Download_Install "$(curl -sSfL 'https://api.github.com/repos/Readarr/Readarr/releases' | mawk -F\" "/^ *\"browser_download_url\": \".*linux-core-$arch\.tar\.gz\"$/{print \$4}" | head -1)"
G_EXEC mv Readarr /opt/readarr
fi
Expand Down Expand Up @@ -10576,6 +10514,68 @@ WorkingDirectory=/usr/local/bin/nukkit
ExecStart=/usr/bin/java -jar /usr/local/bin/nukkit/nukkit.jar
SuccessExitStatus=143

[Install]
WantedBy=multi-user.target
_EOF_
fi

if To_Install 49 gogs # Gogs
then
# ARMv6/RISC-V: No pre-compiled binaries available, so we host our own.
if (( $G_HW_ARCH == 1 || $G_HW_ARCH == 11 ))
then
local url="https://dietpi.com/downloads/binaries/$G_DISTRO_NAME/gogs_$G_HW_ARCH_NAME.7z"

# Else install latest binaries from GitHub
else
case $G_HW_ARCH in
2) local arch='armv7';;
3) local arch='armv8';;
*) local arch='amd64';;
esac

local fallback_url="https://github.com/gogs/gogs/releases/download/v0.13.0/gogs_0.13.0_linux_$arch.tar.gz"
local url=$(curl -sSfL 'https://api.github.com/repos/gogs/gogs/releases/latest' | mawk -F\" "/^ *\"browser_download_url\": \".*\/gogs_[^\"\/]*_linux_$arch.tar.gz\"$/{print \$4}")
fi

Download_Install "$url"
G_EXEC mkdir -p /etc/gogs
G_EXEC mv gogs/gogs /etc/gogs/gogs
G_EXEC rm -R gogs

# Pre-v8.14: Remove unnecessary init scripts
[[ -d '/etc/gogs/scripts' ]] && G_EXEC rm -R /etc/gogs/scripts

# User
Create_User -d /etc/gogs -s /bin/dash gogs

# Directories + permissions
G_EXEC mkdir -p /mnt/dietpi_userdata/gogs-repo
G_EXEC chown -R gogs:gogs /etc/gogs /mnt/dietpi_userdata/gogs-repo

# Database
/boot/dietpi/func/create_mysql_db gogs gogs "$GLOBAL_PW"

# Service: https://github.com/gogs/gogs/blob/main/scripts/systemd/gogs.service
cat << '_EOF_' > /etc/systemd/system/gogs.service
[Unit]
Description=Gogs (DietPi)
Wants=network-online.target
After=network-online.target mariadb.service

[Service]
User=gogs
LogsDirectory=gogs
WorkingDirectory=/etc/gogs
ExecStart=/etc/gogs/gogs web

# Hardening
ProtectSystem=full
PrivateDevices=yes
PrivateTmp=yes
NoNewPrivileges=true
ReadWritePaths=-/etc/gogs

[Install]
WantedBy=multi-user.target
_EOF_
Expand All @@ -10590,11 +10590,11 @@ _EOF_
*) local arch='arm-6';;
esac

local fallback_url="https://github.com/go-gitea/gitea/releases/download/v1.21.7/gitea-1.21.7-linux-$arch.xz"
local fallback_url="https://github.com/go-gitea/gitea/releases/download/v1.21.8/gitea-1.21.8-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
Create_User -d /mnt/dietpi_userdata/gitea gitea
Create_User -d /mnt/dietpi_userdata/gitea -s /bin/dash gitea

# Permissions
G_EXEC chown -R gitea:gitea /mnt/dietpi_userdata/gitea
Expand Down Expand Up @@ -11584,7 +11584,7 @@ _EOF_
*) local arch='amd64';;
esac

local fallback_url="https://github.com/rclone/rclone/releases/download/v1.65.2/rclone-v1.65.2-linux-$arch.deb"
local fallback_url="https://github.com/rclone/rclone/releases/download/v1.66.0/rclone-v1.66.0-linux-$arch.deb"
Download_Install "$(curl -sSfL 'https://api.github.com/repos/rclone/rclone/releases/latest' | mawk -F\" "/^ *\"browser_download_url\": \".*\/rclone-v[^\"\/]*-linux-$arch.deb\"$/{print \$4}")"
fi
fi
Expand All @@ -11598,7 +11598,7 @@ _EOF_
*) local arch='arm';;
esac

local fallback_url="https://github.com/restic/restic/releases/download/v0.15.2/restic_0.15.2_linux_$arch.bz2"
local fallback_url="https://github.com/restic/restic/releases/download/v0.16.4/restic_0.16.4_linux_$arch.bz2"
Download_Install "$(curl -sSfL 'https://api.github.com/repos/restic/restic/releases/latest' | mawk -F\" "/^ *\"browser_download_url\": \".*\/restic_[^\"\/]*_linux_$arch\.bz2\"$/{print \$4}")" /usr/local/bin/restic
G_EXEC chmod +x /usr/local/bin/restic
fi
Expand Down Expand Up @@ -13676,7 +13676,7 @@ _EOF_
Remove_Service docker

# Packages, repo and key
G_AGP docker-ce docker-ce-cli docker-engine
G_AGP docker-ce docker-ce-cli docker.io
[[ -f '/etc/apt/sources.list.d/docker.list' ]] && G_EXEC rm /etc/apt/sources.list.d/docker.list
[[ -f '/etc/apt/trusted.gpg.d/dietpi-docker.gpg' ]] && G_EXEC rm /etc/apt/trusted.gpg.d/dietpi-docker.gpg

Expand Down
7 changes: 5 additions & 2 deletions dietpi/func/dietpi-banner
Original file line number Diff line number Diff line change
Expand Up @@ -57,14 +57,15 @@
'Large hostname'
'Print credits'
'Let'\''s Encrypt cert status'
'RAM usage'
)

# Set defaults: Disable CPU temp by default in VMs
if (( $G_HW_MODEL == 20 ))
then
aENABLED=(1 0 0 0 0 1 0 1 0 0 0 1 1 0 0 1 0)
aENABLED=(1 0 0 0 0 1 0 1 0 0 0 1 1 0 0 1 0 0)
else
aENABLED=(1 0 1 0 0 1 0 0 0 0 0 1 1 0 0 1 0)
aENABLED=(1 0 1 0 0 1 0 0 0 0 0 1 1 0 0 1 0 0)
fi

COLOUR_RESET='\e[0m'
Expand Down Expand Up @@ -237,6 +238,8 @@ $GREEN_LINE"
(( ${aENABLED[1]} == 1 )) && echo -e "$GREEN_BULLET ${aCOLOUR[1]}${aDESCRIPTION[1]} $GREEN_SEPARATOR $(uptime -p 2>&1)"
# CPU temp
(( ${aENABLED[2]} == 1 )) && echo -e "$GREEN_BULLET ${aCOLOUR[1]}${aDESCRIPTION[2]} $GREEN_SEPARATOR $(print_full_info=1 G_OBTAIN_CPU_TEMP 2>&1)"
# RAM usage
(( ${aENABLED[17]} == 1 )) && echo -e "$GREEN_BULLET ${aCOLOUR[1]}${aDESCRIPTION[17]} $GREEN_SEPARATOR $(free -b | mawk 'NR==2 {CONVFMT="%.0f"; print $3/1024^2" of "$2/1024^2" MiB ("$3/$2*100"%)"}')"
# Hostname
(( ${aENABLED[3]} == 1 && ${aENABLED[14]} != 1 )) && echo -e "$GREEN_BULLET ${aCOLOUR[1]}${aDESCRIPTION[3]} $GREEN_SEPARATOR $(</etc/hostname)"
# NIS/YP domainname
Expand Down
2 changes: 1 addition & 1 deletion dietpi/func/dietpi-globals
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
# - Assign defaults/code version as fallback
[[ $G_DIETPI_VERSION_CORE ]] || G_DIETPI_VERSION_CORE=9
[[ $G_DIETPI_VERSION_SUB ]] || G_DIETPI_VERSION_SUB=2
[[ $G_DIETPI_VERSION_RC ]] || G_DIETPI_VERSION_RC=0
[[ $G_DIETPI_VERSION_RC ]] || G_DIETPI_VERSION_RC=1
[[ $G_GITBRANCH ]] || G_GITBRANCH='master'
[[ $G_GITOWNER ]] || G_GITOWNER='MichaIng'
# - Save current version and Git branch
Expand Down
Loading

0 comments on commit e838da4

Please sign in to comment.