Skip to content

Commit

Permalink
Beta v8.1.0 (#5215)
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaIng authored Jan 29, 2022
2 parents 23ee1f4 + 69cad97 commit fa396c4
Show file tree
Hide file tree
Showing 83 changed files with 829 additions and 622 deletions.
5 changes: 5 additions & 0 deletions .build/images/U-Boot/99-dietpi-uboot
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/dash
echo 'update-initramfs: Converting to U-Boot format'
mkimage -A arm64 -O linux -T ramdisk -C gzip -n uInitrd -d "$2" "/boot/uInitrd-$1"
ln -sf "uInitrd-$1" /boot/uInitrd
exit 0
79 changes: 79 additions & 0 deletions .build/images/U-Boot/boot.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
# DO NOT EDIT THIS FILE
#
# Please edit /boot/dietpiEnv.txt to set supported parameters
#
# If you must edit this file, recompile with:
# mkimage -C none -A arm64 -T script -d /boot/boot.cmd /boot/boot.scr

# Default values
setenv rootdev "/dev/mmcblk0p1"
setenv rootfstype "ext4"
setenv consoleargs "console=tty1"
setenv verbosity "4"
setenv docker_optimizations "off"
setenv overlay_path "amlogic"
setenv overlay_prefix "meson"

# Load addresses
setenv load_addr "0x32000000"
setenv kernel_addr_r "0x34000000"
setenv fdt_addr_r "0x4080000"
setenv overlay_error "false"

# Load dietpiEnv.txt
if test -e ${devtype} ${devnum} ${prefix}dietpiEnv.txt; then
load ${devtype} ${devnum} ${load_addr} ${prefix}dietpiEnv.txt
env import -t ${load_addr} ${filesize}
fi

# Get PARTUUID of first partition on SD/eMMC it was loaded from
# mmc 0 is always mapped to device u-boot (2016.09+) was loaded from
if test "${devtype}" = "mmc"; then part uuid mmc ${devnum}:1 partuuid; fi

# Define kernel command-line arguments
setenv bootargs "root=${rootdev} rootfstype=${rootfstype} rootwait ${consoleargs} loglevel=${verbosity} consoleblank=0 coherent_pool=2M ubootpart=${partuuid} libata.force=noncq usb-storage.quirks=${usbstoragequirks} ${extraargs} ${extraboardargs}"

# Add bootargs for Docker
if test "${docker_optimizations}" = "on"; then setenv bootargs "${bootargs} cgroup_enable=memory swapaccount=1"; fi

# Load kernel, initramfs and device tree
load ${devtype} ${devnum} ${kernel_addr_r} ${prefix}Image
load ${devtype} ${devnum} ${ramdisk_addr_r} ${prefix}uInitrd
load ${devtype} ${devnum} ${fdt_addr_r} ${prefix}dtb/${fdtfile}
fdt addr ${fdt_addr_r}

# Apply DT overlays
if test -n "${overlays}" || test -n "${user_overlays}"; then
fdt resize 65536
for overlay_file in ${overlays}; do
if load ${devtype} ${devnum} ${load_addr} ${prefix}dtb/${overlay_path}/overlay/${overlay_prefix}-${overlay_file}.dtbo; then
echo "Applying kernel provided DT overlay ${overlay_prefix}-${overlay_file}.dtbo"
fdt apply ${load_addr} || setenv overlay_error "true"
fi
done

for overlay_file in ${user_overlays}; do
if load ${devtype} ${devnum} ${load_addr} ${prefix}overlay-user/${overlay_file}.dtbo; then
echo "Applying user provided DT overlay ${overlay_file}.dtbo"
fdt apply ${load_addr} || setenv overlay_error "true"
fi
done

if test "${overlay_error}" = "true"; then
echo "Error applying DT overlays, restoring original DT"
load ${devtype} ${devnum} ${fdt_addr_r} ${prefix}dtb/${fdtfile}
else
if load ${devtype} ${devnum} ${load_addr} ${prefix}dtb/${overlay_path}/overlay/${overlay_prefix}-fixup.scr; then
echo "Applying kernel provided DT fixup script (${overlay_prefix}-fixup.scr)"
source ${load_addr}
fi
if test -e ${devtype} ${devnum} ${prefix}fixup.scr; then
load ${devtype} ${devnum} ${load_addr} ${prefix}fixup.scr
echo "Applying user provided fixup script (fixup.scr)"
source ${load_addr}
fi
fi
fi

# Boot
booti ${kernel_addr_r} ${ramdisk_addr_r} ${fdt_addr_r}
24 changes: 24 additions & 0 deletions .build/images/U-Boot/dietpi-initramfs_cleanup
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#!/bin/dash

# Skip if initramfs-tools is not installed
[ -x '/usr/sbin/update-initramfs' ] || exit 0

# Passing the kernel version is required
version="$1"
if [ -z "$version" ]
then
echo "W: initramfs-tools: ${DPKG_MAINTSCRIPT_PACKAGE:-kernel package} did not pass a version number" >&2
exit 0
fi

# Avoid running multiple times
if [ "$DEB_MAINT_PARAMS" ]
then
eval set -- "$DEB_MAINT_PARAMS"
[ "$1" = 'upgrade' ] || exit 0
fi

# Delete unused initrd images
find /boot -name 'initrd.img-*' -o -name 'uInitrd-*' ! -name "*-$version" -printf 'Removing obsolete file %f\n' -delete

exit 0
12 changes: 12 additions & 0 deletions .build/images/U-Boot/dietpiEnv.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
rootdev=UUID=3ccf3790-5e80-44b9-83be-17e3b21083d9
rootfstype=ext4
# The init system logs to the console defined last.
consoleargs=console=ttyAML0,115200 console=tty1
verbosity=4
usbstoragequirks=0x2537:0x1066:u,0x2537:0x1068:u
extraargs=net.ifnames=0
docker_optimizations=off
overlay_path=amlogic
overlay_prefix=meson
overlays=
user_overlays=
33 changes: 12 additions & 21 deletions .meta/dietpi-build → .build/images/dietpi-build
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,12 @@ G_EXIT_CUSTOM(){
# Inputs
HW_MODEL=
HW_ARCH=
DISTRO=6 # 6=Bulleye, 7=Bookworm
DISTRO=6 # 6=Bullseye, 7=Bookworm
PTTYPE='msdos'
FSTYPE='ext4'
ITYPE=
VMTYPE=
GITBRANCH='master'
while (( $# ))
do
case $1 in
Expand All @@ -34,6 +35,7 @@ do
'-f') shift; FSTYPE=$1;;
'-i') ITYPE='Installer';;
'-v') shift; VMTYPE=$1;;
'-b') shift; GITBRANCH=$1;;
*) G_DIETPI-NOTIFY 1 "Invalid input \"$1\", aborting..."; exit 1;;
esac
shift
Expand All @@ -48,6 +50,7 @@ root_size=1023
CLONING_TOOL='dd'
case $HW_MODEL in
0) iname='RPi' partition_start=4 boot_size=128 root_size=892;;
15) iname='OdroidN2' partition_start=4 root_size=768;;
20) iname='VM' WIFI_REQUIRED=0 VMTYPE=${VMTYPE:-raw};;
21) iname='NativePC-BIOS' HW_ARCH=10 root_size=1215;;
*) G_DIETPI-NOTIFY 1 "Invalid hardware model \"$HW_MODEL\" passed, aborting..."; exit 1;;
Expand Down Expand Up @@ -91,6 +94,8 @@ case $FSTYPE in
*) G_DIETPI-NOTIFY 1 "Invalid filesystem type \"$FSTYPE\" passed, aborting..."; exit 1;;
esac

G_CHECK_URL "https://github.com/MichaIng/DietPi/tree/$GITBRANCH" || { G_DIETPI-NOTIFY 1 "Failed to access Git branch \"$GITBRANCH\", aborting..."; exit 1; }

# Image name
OUTPUT_IMG_NAME="DietPi_$iname-$iarch-${distro^}"
[[ $ITYPE ]] && OUTPUT_IMG_NAME+="_$ITYPE"
Expand Down Expand Up @@ -198,25 +203,14 @@ _EOF_
fi

# Create rc.local to automate DietPi-PREP
cat << '_EOF_' > rootfs/etc/rc.local
cat << _EOF_ > rootfs/etc/rc.local
#!/bin/dash
{
_EOF_
G_EXEC chmod +x rootfs/etc/rc.local

# - RPi: https://github.com/RPi-Distro/repo/issues/253
[[ $HW_MODEL == 0 ]] && cat << '_EOF_' >> rootfs/etc/rc.local
echo '[ INFO ] Installing Raspberry Pi repository keyring...'
curl -sSfLO 'https://archive.raspberrypi.org/debian/pool/main/r/raspberrypi-archive-keyring/raspberrypi-archive-keyring_2016.10.31_all.deb' || exit 1
dpkg -i raspberrypi-archive-keyring_2016.10.31_all.deb || exit 1
rm raspberrypi-archive-keyring_2016.10.31_all.deb || exit 1
_EOF_

cat << _EOF_ >> rootfs/etc/rc.local
echo '[ INFO ] Running DietPi-PREP...'
export GITBRANCH='master' HW_MODEL='$HW_MODEL' IMAGE_CREATOR=0 PREIMAGE_INFO='from scratch' WIFI_REQUIRED=$WIFI_REQUIRED DISTRO_TARGET=$DISTRO
export GITBRANCH='$GITBRANCH' HW_MODEL='$HW_MODEL' IMAGE_CREATOR=0 PREIMAGE_INFO='from scratch' WIFI_REQUIRED=$WIFI_REQUIRED DISTRO_TARGET=$DISTRO
bash -c "\$(curl -sSfL 'https://raw.githubusercontent.com/$G_GITOWNER/DietPi/$G_GITBRANCH/PREP_SYSTEM_FOR_DIETPI.sh')"
_EOF_
G_EXEC chmod +x rootfs/etc/rc.local

# - VM: Generate tiny-initramfs with explicit kernel modules, as auto-detection doesn't work correctly within container and loop devices
[[ $HW_MODEL == 20 ]] && cat << _EOF_ >> rootfs/etc/rc.local
Expand All @@ -242,12 +236,9 @@ G_EXEC rm -Rf rootfs/var/{cache/apt,lib/apt/lists}/*
# Start container
# - dbus required for container spawn
mask_dbus=0
if [[ $(readlink /etc/systemd/system/dbus.socket) == '/dev/null' ]]
then
mask_dbus=1
G_EXEC systemctl unmask dbus.socket dbus
G_EXEC systemctl start dbus.socket dbus
fi
[[ $(readlink /etc/systemd/system/dbus.socket) == '/dev/null' ]] && mask_dbus=1
G_EXEC systemctl unmask dbus.socket dbus
G_EXEC systemctl start dbus.socket dbus
# - Bind mounts required to allow container reading its own drive info, /dev/disk for GRUB and probably other tools to detect UUIDs
abind=()
[[ -b '/dev/loop0p2' ]] && abind=('--bind=/dev/loop0p2')
Expand Down
Empty file modified .conf/desktop/apps/dietpi-backup.desktop
100644 → 100755
Empty file.
Empty file modified .conf/desktop/apps/dietpi-bugreport.desktop
100644 → 100755
Empty file.
Empty file modified .conf/desktop/apps/dietpi-cleaner.desktop
100644 → 100755
Empty file.
Empty file modified .conf/desktop/apps/dietpi-config.desktop
100644 → 100755
Empty file.
Empty file modified .conf/desktop/apps/dietpi-cron.desktop
100644 → 100755
Empty file.
Empty file modified .conf/desktop/apps/dietpi-drive_manager.desktop
100644 → 100755
Empty file.
Empty file modified .conf/desktop/apps/dietpi-justboom.desktop
100644 → 100755
Empty file.
Empty file modified .conf/desktop/apps/dietpi-launcher.desktop
100644 → 100755
Empty file.
Empty file modified .conf/desktop/apps/dietpi-services.desktop
100644 → 100755
Empty file.
Empty file modified .conf/desktop/apps/dietpi-software.desktop
100644 → 100755
Empty file.
Empty file modified .conf/desktop/apps/dietpi-sync.desktop
100644 → 100755
Empty file.
Empty file modified .conf/desktop/apps/dietpi-update.desktop
100644 → 100755
Empty file.
Empty file modified .conf/desktop/apps/es2_gears.desktop
100644 → 100755
Empty file.
Empty file modified .conf/desktop/apps/es2_info.desktop
100644 → 100755
Empty file.
Empty file modified .conf/desktop/apps/glx_gears.desktop
100644 → 100755
Empty file.
Empty file modified .conf/desktop/apps/glx_info.desktop
100644 → 100755
Empty file.
Empty file modified .conf/desktop/apps/kodi.desktop
100644 → 100755
Empty file.
Empty file modified .conf/desktop/apps/opentyrian.desktop
100644 → 100755
Empty file.
3 changes: 1 addition & 2 deletions .conf/dps_47/nginx.owncloud.conf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Based on: https://github.com/owncloud/docs/blob/deda107004c35ccfc4927e4aab32a337bc2bb380/modules/admin_manual/examples/installation/nginx/subdirectory-configuration.conf
# Based on: https://github.com/owncloud/docs/blob/deda107/modules/admin_manual/examples/installation/nginx/subdirectory-configuration.conf

location ^~ /owncloud {

Expand Down Expand Up @@ -73,7 +73,6 @@ location ^~ /owncloud {
try_files $uri /owncloud/index.php$uri$is_args$args;
add_header Cache-Control "max-age=15778463" always;
# Add headers to serve security related headers (It is intended to have those duplicated to the ones above)
#add_header Strict-Transport-Security "max-age=15552000; includeSubDomains" always;
add_header X-Content-Type-Options nosniff always;
add_header X-Frame-Options "SAMEORIGIN" always;
add_header X-XSS-Protection "1; mode=block" always;
Expand Down
4 changes: 4 additions & 0 deletions .meta/dietpi-cloud-migration
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@ run_backup(){
! rsync -aHp --delete "$fp_datadir/" "$2" && echo -e '[\e[31mFAILED\e[0m] "rsync" failed, please check for error reasons and try again.' && exit 1
echo -e "[\e[32m OK \e[0m] Successfully synced data directory to: $2"

# Remove old backups when sync was successful @StephanStS
echo "[ INFO ] Removing backups from $fp_datadir/ after successful sync to $2..."
rm -R "$fp_datadir/dietpi-$1-database-backup.sql" "$fp_datadir/dietpi-$1-installation-backup"

else

echo '[ INFO ] You did not provide an additional backup location. We assume your data directory is already on an external drive, ready for migration? If not, move it there, or, rerun this script with the desired external backup path as argument.'
Expand Down
Empty file modified .meta/dietpi-fan_control
100644 → 100755
Empty file.
6 changes: 4 additions & 2 deletions .meta/dietpi-survey_report
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -579,17 +579,19 @@ shopt -s extglob
unset -v 'aSOFTWARE_NAME7_8[99]' # emonHub
aSOFTWARE_NAME7_8[200]='DietPi-Dashboard'

# v7.9 + v8.0
# v7.9 + v8.0 + v8.1
aSOFTWARE_NAME7_9=()
aSOFTWARE_NAME8_0=()
aSOFTWARE_NAME8_1=()
for i in "${!aSOFTWARE_NAME7_8[@]}"
do
aSOFTWARE_NAME7_9[$i]=${aSOFTWARE_NAME7_8[$i]}
aSOFTWARE_NAME8_0[$i]=${aSOFTWARE_NAME7_9[$i]}
aSOFTWARE_NAME8_1[$i]=${aSOFTWARE_NAME8_0[$i]}
done

# Pre-create software counter array so that we can see also software (available in newest version) with 0 installs
for i in "${aSOFTWARE_NAME8_0[@]}"
for i in "${aSOFTWARE_NAME8_1[@]}"
do
aSOFTWARE["$i"]=0
done
Expand Down
21 changes: 21 additions & 0 deletions .update/patches
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -619,6 +619,27 @@ Patch_8_0()
[[ -f '/etc/systemd/system/blynkserver.service' ]] && ! grep -q '\-Dlog4j2.formatMsgNoLookups=true' /etc/systemd/system/blynkserver.service && G_EXEC sed -i 's/java -jar/java -Dlog4j2.formatMsgNoLookups=true -jar/' /etc/systemd/system/blynkserver.service
}

Patch_8_1()
{
# DietPi-Services cleanup: https://dietpi.com/phpbb/viewtopic.php?p=42027#p42027
[[ -f '/dietpi-process_tool.conf' ]] && G_EXEC rm /dietpi-process_tool.conf
[[ -f '/dietpi-services_edit.conf' ]] && G_EXEC rm /dietpi-services_edit.conf

# RPi: Remove obsolete VCSM overlay since the device node has been removed
if (( $G_HW_MODEL < 10 ))
then
grep -q 'dtoverlay=dietpi-disable_vcsm' /boot/config.txt && G_EXEC sed -i '/dtoverlay=dietpi-disable_vcsm/d' /boot/config.txt
[[ -f '/boot/overlays/dietpi-disable_vcsm.dtbo' ]] && G_EXEC rm /boot/overlays/dietpi-disable_vcsm.dtbo
fi

# RPi: Fix MATE install: https://github.com/MichaIng/DietPi/issues/5214
[[ $G_HW_MODEL -le 9 && -f '/etc/apt/preferences.d/dietpi-lxde' ]] && cat << '_EOF_' > /etc/apt/preferences.d/dietpi-lxde
Package: openbox* obconf* libob* pcmanfm* libfm* gtk-* libgtk* libgail* gir1.2-gtk-3.0 lx*
Pin: origin archive.raspberrypi.org
Pin-Priority: -1
_EOF_
}

# v6.35 => v7 migration
if (( $G_DIETPI_VERSION_CORE == 6 && $G_DIETPI_VERSION_SUB > 34 ))
then
Expand Down
Empty file modified .update/pre-patches
100644 → 100755
Empty file.
4 changes: 2 additions & 2 deletions .update/version
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Available DietPi version
G_REMOTE_VERSION_CORE=8
G_REMOTE_VERSION_SUB=0
G_REMOTE_VERSION_RC=2
G_REMOTE_VERSION_SUB=1
G_REMOTE_VERSION_RC=0
# Minimum DietPi version to allow update
G_MIN_VERSION_CORE=6
G_MIN_VERSION_SUB=14
Expand Down
36 changes: 29 additions & 7 deletions CHANGELOG.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,32 @@
v8.1
(2022-02-05)

SBC support:
- Odroid N2 | Support for Odroid N2 with modern mainline Linux images has been added, including proper boot configuration, serial console selection, HDMI and 3.5mm audio selection and more. Sadly existing images cannot be migrated, a new image is available for testing: https://github.com/MichaIng/DietPi/issues/5039

Changes:
- DietPi-Benchmark | During RAM I/O benchmarks, the CPU governor is now changed to "performance" so that the result is not affected by possible CPU frequency scaling but the raw/max RAM I/O performance is measured. A significant effect of this has been recognised on Odroid N2 images with modern mainline kernel. Since the CPU benchmark is done first, this has no effect on its score and CPU temperature results.
- DietPi-Drive_Manager | Btrfs subvolume mounts are now preserved in /etc/fstab. Many thanks to @laddde for implementing this feature: https://github.com/MichaIng/DietPi/pull/5176
- DietPi-Drive_Manager | The Samba mount dialogues do now indicate that a hostname can be entered instead of a server IP and a shared folder path instead of a share name only.
- DietPi-Backup | A notification is not printed when rsync dry-run to obtain required disk space is starting, since this can take a while. Many thanks to @whisdol for reporting the the impression of a hanging script: https://github.com/MichaIng/DietPi/issues/5209

Fixes:
- DietPi-Services | Resolved an issue where service edits and process tool settings were not effective as they were stored to the wrong file path. Many thanks to @TopFord and @MicDG for reporting this issue: https://dietpi.com/phpbb/viewtopic.php?p=41509#p41509
- DietPi-LetsEncrypt | Resolved an issue where Certbot failed on fresh Apache installs since the 000-default.conf vhost by default does not contain any directive anymore. The ServerName directive with the entered domain name is now added to 000-default.conf instead of apache2.conf, with the benefit that it overrides the global ServerName directive in dietpi.conf, which uses the local IP address only.
- DietPi-Software/DietPi-AutoStart | Chromium: Resolved an issue where the Chromium kiosk autostart option failed on all non-RPi systems.
- DietPi-Software | FuguHub: Resolved an issue where the uninstall failed as the service was not stopped and removed as expected, before attempting to remove the service user.
- DietPi-Software | PHP: Resolved an issue where the PATH variable was not available for PHP applications with Lighttpd and Nginx webservers. It is now set to the static value "/usr/local/bin:/usr/bin:/bin", the default PATH excluding super user executables "sbin". Many thanks to @shanew1694 for reporting a related issue with rTorrent: https://github.com/MichaIng/DietPi/issues/5161#issuecomment-1013381362
- DietPi-Software | MineOS: Resolved an issue where the install failed on Bullseye: https://github.com/MichaIng/DietPi/issues/5181
- DietPi-Software | Cuberite: Resolved an issue where the server failed to start on ARMv8 systems: https://github.com/MichaIng/DietPi/issues/5180
- DietPi-Software | MATE: Resolved an issue where the install failed when LXDE is installed already. Many thanks to @n0valis for reporting this issue: https://github.com/MichaIng/DietPi/issues/5214
- DietPi-Software | Ampache: Resolved an issue on Bullseye systems where Ampache v5 installs/reinstalls did not work because of a changed webroot directory: https://github.com/MichaIng/DietPi/pull/5205

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/XXXX

For all additional issues that may appear after release, please see the following link for active tickets: https://github.com/MichaIng/DietPi/issues

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

v8.0
(2022-01-08)

Expand Down Expand Up @@ -36,11 +65,6 @@ Fixes:

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/5146

Known/Outstanding Issues:
- DietPi-Config | Enabling WiFi + Ethernet adapters, both on different subnets, breaks WiFi connection in some cases: https://github.com/MichaIng/DietPi/issues/2103

For all additional issues that may appear after release, please see the following link for active tickets: https://github.com/MichaIng/DietPi/issues

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

v7.9
Expand Down Expand Up @@ -82,8 +106,6 @@ Fixes:

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/5053

For all additional issues that may appear after release, please see the following link for active tickets: https://github.com/MichaIng/DietPi/issues

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

v7.8
Expand Down
Loading

0 comments on commit fa396c4

Please sign in to comment.