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

Beta v7.0.1 #4146

Merged
merged 26 commits into from
Feb 27, 2021
Merged

Beta v7.0.1 #4146

merged 26 commits into from
Feb 27, 2021

Conversation

MichaIng
Copy link
Owner

@MichaIng MichaIng commented Feb 27, 2021

Beta v7.0.1

(2021-02-27)

Changes since v7.0.0

  • DietPi-Backup | A new feature has been added which allows to automatically restore a dietpi-backup on first boot. For this set the new dietpi.txt option AUTO_SETUP_BACKUP_RESTORE=1, to get a list of found backups to select from (this does not work in combination with AUTO_SETUP_AUTOMATED=1). All attached drives are mounted temporarily and seached automatically. Set AUTO_SETUP_BACKUP_RESTORE=2 to have the first found backup restored non-interactively (this works in combination with AUTO_SETUP_AUTOMATED=1). The restore runs after the initial update, hence works with older images as well and can be done via SSH connection. Credits go to @ravenclaw900 for implementing this feature: DietPi-Backup | Add Option to Automatically Restore on First Boot #4112
  • DietPi-Config | RPi: An option has been added to toggle the SPI interface. Many thanks to @incanus for resurrecting this old feature request: DietPi-Config | Add i2c/spi and other hardware options for RPi's #98 (comment)

Fixes since v7.0.0

MichaIng and others added 18 commits February 23, 2021 13:07
+ DietPi-Update | Do not apply DietPi v7 pre-patches after DietPi v6 pre-patches. Instead apply the first as part of the second, internally, to assure they run before APT-
+ DietPi-Pre-patches | Run DietPi v7 pre-patches as part of DietPi v6 pre-patches, to assure they run before APT.
+ DietPi-Update | Apply auto-migrated target Git branch permanently (if fetching the version file succeeded) to not cause a mismatch between the dietpi.txt entry and what the updater is downloading from.
+ DietPi-Pre-patches | Update Jellyfin APT repo key, if last modified prior to expiration date: https://dietpi.com/phpbb/viewtopic.php?t=8703
+ DietPi-Config | Add an option to toggle the SPI state on RPi
+ DietPi-Pre-patches | Remove obsolete pre-patch 4, which is overridden by pre-patch 16
+ DietPi-Software | Bump a few software's minor versions
+ README | Align header with other repos, no need to define <html> tags in markdown
+ README | Add forum link to header
+ CHANGELOG | Add forgotten changelog about piwheels.org being applied on ARMv6 and ARMv7 boards when installing pip
+ DietPi-Pre-patches | Mute output of function check
+ DietPi-Drive_Manager | The "_netdev" mount option is not required for CIFS and Samba mounts, since systemd identifies them automatically as remote/network mounts. This option is only required when the remote/network mount cannot be identified by its file system type: http://codingberg.com/linux/systemd_when_to_use_netdev_mount_option
+ DietPi-Drive_Manager | Minor coding
+ DietPi-Software | Fix Download_Install function when no target is given with a custom file type
+ DietPi-Software | Really fix Download_Install: If no target path is given, but file type is an achieve, it has been extracted/installed and hence needs to be removed. Else, if either no target path has been given or it matches the downloaded file name, return the function so that we don't need to complicated logic afterwards whether the file needs to be removed or not. Luckily the optional environment variables can be unset before starting to unpack/install/move the downloaded file.
The choice of the user for an automatic logic (with its dialog) appeared too often. 
Now the choice is only done in cases of automatic login (dietpi-autologin options 7 and 2).
+ DietPi-Autostart | Assure that if no X server has been installed yet, LightDM selection does not trigger an autologin user selection. Instead prompt a failure and inform user that an X server must be installed first.
+ DietPi-Software | Do not offer to install and configure No-IP from within the software selection. It will fail as of concurrent dietpi-software execution. Since this was the only reason for writing/reading a temporary install state file, this function can be removed from the code. Instead allow to configure No-IP after it has been installed.
+ DietPi-Software | Offer to configure DietPi-AutoStart after installs instead of before installs. We'd need to allow failing systemctl calls and others to allow this, and need to keep re-configuring DietPi-AutoStart (automated) after installs. It's better do have the ability to for error handling all required steps and hence relying on software services and binaries being available so that we can check and assure that all worked fine. Since DietPi-Software does not force a reboot after installs, this interactive step after installs have finished is pretty fine and it adds to the anyway possible GPU memory split prompt + No-IP config with above change.
@MichaIng MichaIng added the Beta 🧪 Issues specific to the Beta branch testing label Feb 27, 2021
@MichaIng MichaIng added this to the v7.0 milestone Feb 27, 2021
+ DietPi-Config | Detect No-IP install based on binary and service file existence, which allows to do the configuration from within dietpi-software.
Copy link
Collaborator

@StephanStS StephanStS left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I checked the changed behaviour of the dietpi-autostart (also called within dietpi-software). This works fine.
Also the change that the login selection is done after all installations is a better choice. Love that.

All other issues I have not reviewed. So no global approve is possible.

@MichaIng
Copy link
Owner Author

Many thanks for testing those it. The merge yesterday night was an accident when I wanted to resolve branch conflicts 😅, so that PR deserved a dedicated review.

ravenclaw900 and others added 4 commits February 27, 2021 15:34
+ DietPi-Software | Add way to automatically restore from backup on first boot
+ DietPi-Software | Only reboot when backup restore succeeded, inform user about it for three seconds
+ DietPi-Software | Downgrade auto-restore =2 to =1 in every case
+ DietPi-Backup | Clear PATH cache after backup restore, in case commands are restored to a different locations
+ DietPi-Backup | Do not stop services before we definitely run the backup or restore. The rsync process check still needs to be done after stopping the services, which include the rsync daemon. But do not kill a running rsync process afterwards, better error out.
+ DietPi-Backup | Implement function when restoring a backup, to check whether the backup's UUIDs match the current drive's UUIDs, so that we do not restore a system that is not booting, because the bootloader and fstab do not find the configured drives. If the UUIDs seem to not match, check whether we are able to reliably make the system bootable by adjusting known bootloader configurations. Add function to restore UUIDs, in case, but content is on ToDo for now :).
+ DietPi-Globals | G_WHIP_YESNO: If the default is set to "yes", return "true" as well in case of non-interactive calls
+ DietPi-Backup | Add whiptail yes/no dialogues when storing a backup to a system with different UUIDs. Default to "yes", if we did find the boot configuration method, else default to "no", which is especially relevant for non-interactive first run setups with AUTO_SETUP_BACKUP_RESTORE=1 set.
+ DietPi-Software | Tiny
+ DietPi-Software | SABnzbd: Since v3.2.0 raised the minimum Python dependency to v3.6, on Stretch, v3.1.1 needs to be installed. However, check the actually installed Python version so that a custom Python install allows to install SABnzbd v3.2+ as well.
+ DietPi-Software | SABnzbd: Use the new Create_Config function to pre-create the config file
+ CHANGELOG | SABnzbd: Resolved an issue on Stretch where the install failed due to raised minimum Python version with SABnzbd v3.2.0
+ DietPi-Globals | Default RC up
+ RC up
+ CONTRIBUTING | Add a few more cross-references to docs and new contribution web page
@Joulinar
Copy link
Collaborator

Joulinar commented Feb 27, 2021

@MichaIng
I test the backup feature. In general the system is booting after restore. However there are still some error message

sent 468,346,991 bytes  received 178,318 bytes  9,863,690.72 bytes/sec
total size is 633,813,270  speedup is 1.35
hits    command
   1    /usr/bin/mkdir
   1    /usr/bin/dpkg-query
   1    /usr/bin/rsync
   1    /usr/bin/pgrep
   2    /usr/bin/grep
   1    /usr/bin/whiptail
   1    /usr/bin/apt-get
   2    /usr/bin/rm
   3    /usr/bin/cat
[ .... ] DietPi-Backup | sed -i \|[[:blank:]]/boot[[:blank:]]|s|^[[:blank:]]*UUID=[^[:blank:]]*|UUID=DC3E-E470| /etc/fstab
[  OK  ] DietPi-Backup | sed -i \|[[:blank:]]/boot[[:blank:]]|s|^[[:blank:]]*UUID=[^[:blank:]]*|UUID=DC3E-E470| /etc/fstab
/boot/dietpi/func/dietpi-globals: line 1059: /usr/bin/rm: No such file or directory
[ .... ] DietPi-Backup | sed -i \|[[:blank:]]/boot[[:blank:]]|s|^[[:blank:]]*PARTUUID=[^[:blank:]]*|PARTUUID=e8af6eb2-01| /etc/fstab
[  OK  ] DietPi-Backup | sed -i \|[[:blank:]]/boot[[:blank:]]|s|^[[:blank:]]*PARTUUID=[^[:blank:]]*|PARTUUID=e8af6eb2-01| /etc/fstab
/boot/dietpi/func/dietpi-globals: line 1059: /usr/bin/rm: No such file or directory
[ .... ] DietPi-Backup | sed -i \|[[:blank:]]/[[:blank:]]|s|^[[:blank:]]*UUID=[^[:blank:]]*|UUID=a7adb26a-8b87-4729-99c8-9f5ac069d51e| /etc/fstab
[  OK  ] DietPi-Backup | sed -i \|[[:blank:]]/[[:blank:]]|s|^[[:blank:]]*UUID=[^[:blank:]]*|UUID=a7adb26a-8b87-4729-99c8-9f5ac069d51e| /etc/fstab
/boot/dietpi/func/dietpi-globals: line 1059: /usr/bin/rm: No such file or directory
[ .... ] DietPi-Backup | sed -i \|[[:blank:]]/[[:blank:]]|s|^[[:blank:]]*PARTUUID=[^[:blank:]]*|PARTUUID=e8af6eb2-02| /etc/fstab
[  OK  ] DietPi-Backup | sed -i \|[[:blank:]]/[[:blank:]]|s|^[[:blank:]]*PARTUUID=[^[:blank:]]*|PARTUUID=e8af6eb2-02| /etc/fstab
/boot/dietpi/func/dietpi-globals: line 1059: /usr/bin/rm: No such file or directory
[  OK  ] DietPi-Backup | sed -Ei s/(^|[[:blank:]])root=[^[:blank:]]*/\1root=PARTUUID=e8af6eb2-02/ /boot/cmdline.txt
/boot/dietpi/func/dietpi-globals: line 1059: /usr/bin/rm: No such file or directory
[  OK  ] DietPi-Backup: Restore | Completed
/boot/dietpi/func/dietpi-globals: line 140: /usr/bin/rm: No such file or directory
[FAILED] DietPi-Backup | Failed to remove scripts working directory: /tmp/DietPi-Backup
[ INFO ] DietPi-Software | The system will now reboot into the restored system

As well it seems /mnt did not contain the same folder as before. I guess this is because dietpi-backup did not save them at all. Is this something we would need to inform users on? At least I'm not able to mount my USB stick without creating the mount point inside /mnt manually

@MichaIng
Copy link
Owner Author

MichaIng commented Feb 27, 2021

I have no idea how after hash -d the rm still cannot be found and I have no idea how to tell the system in a different/effective way to forget cached executable paths. So I think we need to live with this as a temporary issue on RPi's when older backups are restored.

The problem with /mnt/dietpi_userdata is a different known issue and I'm not sure how to handle best. When userdata have been moved to an external drive, they are excluded, when they are on the root partition, they are included. And as all other /mnt/ content is excluded anyway, the mount point directories (required to mount) are excluded as well. So it's a bit similar like with the UUIDs: If the setup does not match the backup, it does not work perfectly fine, but at least currently it can never happen that data on the system can be removed, like an actual directory with content replaced with a dietpi_userdata symlink or such.

I collected some thoughts here: #2558

@Joulinar
Copy link
Collaborator

ok understood. As said, the system is working fine after restore. Good to go for this release.

Next I tested SABnzbd on Stretch. Python 3.5 as well as SABnzbd 3.1.1 are installed and working.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Beta 🧪 Issues specific to the Beta branch testing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Open Beta v7.0 | Please help testing and hardening the upcoming release
4 participants