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 v6.29 #3502

Merged
merged 322 commits into from
May 3, 2020
Merged

Release v6.29 #3502

merged 322 commits into from
May 3, 2020

Conversation

MichaIng
Copy link
Owner

@MichaIng MichaIng commented May 3, 2020

v6.29

(03/05/20)

API Changes

  • Hardware info | The hardware info file /DietPi/dietpi/.hw_model should be now accessed at /boot/dietpi/.hw_model (see DietPi-RAMdisk removal below) and contains info now as NAME=VALUE like lines, which can be sourced from shell scripts.
  • Flag/Info files | /DietPi/dietpi/.update_available, /DietPi/dietpi/.timesync_exit_status, /DietPi/dietpi/.network and /tmp/.dietpi_motd have all been moved into a new runtime directory: /run/dietpi/
  • DietPi-Globals | The global variables G_HW_ARCH_DESCRIPTION and G_HW_MODEL_DESCRIPTION have been renamed to G_HW_ARCH_NAME and G_HW_MODEL_NAME. The new variables G_HW_UUID (DietPi-internal device UUID) and G_ROOTFS_DEV (RootFS device path) are available. On RPi additionally G_HW_REVISION, G_HW_PCB_REVISION, G_HW_MEMORY_SIZE and G_HW_MANUFACTURER are available, the revision code and its decoded information: https://www.raspberrypi.org/documentation/hardware/raspberrypi/revision-codes/README.md
  • DietPi-Globals | G_RUN_CMD and G_ERROR_HANDLER have been removed and replaced with G_EXEC. Basically G_EXEC can be used the same way G_RUN_CMD was before and it is wider configurable to make manual G_ERROR_HANDLER usage obsolete where custom solution menu entries or command output parsing is required, e.g. to check for errors that do not produce exit codes. Visual change for regular DietPi users is that every error handled command can be retried, a subshell can be opened to investigate or fix the originating issue and, for experienced users, the command can be altered, e.g. if a download link has changed or an expected file has been moved manually to a new path. Further details can be found in the script: /boot/dietpi/func/dietpi-globals
  • DietPi-Globals | G_FILE_EXISTS has been removed, as it was used only a single time in our code and usually it needs to be checked and handled explicitly, whether it is a file, directory, symlink with or without existing target.
  • DietPi-Globals | The new global funktions G_CHECK_CON and G_CHECK_DNS have been added to test general network connectivity and DNS resolver based on dietpi.txt settings.

Changes / Improvements / Optimisations

  • NanoPi M4V2 | Initial hardware identifier (ID: 58) and support for this device has been added to DietPi. Many thanks to @purist doing this request: https://dietpi.com/phpbb/viewtopic.php?f=12&t=6451
  • NanoPi NEO Plus2 | Initial hardware identifier (ID: 57) and support for this device has been added to DietPi. Many thanks to @StephanStS for doing this request and creating an image: Images | Update all images to Buster where possible #2979 (comment)
  • PINE H64 | Initial hardware identifier (ID: 45) and support for this device has been added to DietPi. Many thanks to @unixino for doing this request: Image | PINE H64 #3286
  • ROCK Pi S | Initial hardware identifier (ID: 73) and support for this device has been added to DietPi. Many thanks to @lwqcz for doing this request: Image | ROCK Pi S #3365
  • Sparky SBC | Updated kernel drivers and SBC-specific service and config files
  • General | Switched to C.UTF-8 as default locale and for DietPi scripts. It is shipped statically by APT package, international and more lightweight compared to en_GB.UTF-8.
  • DietPi-RAMdisk | Removed from DietPi, which means that one can edit config files in /boot directory directly now. To keep performance for our scripts up, vmtouch is installed instead, which allows to lock files in native file system cache, configured to lock /boot/dietpi and /boot/dietpi.txt in cache by default. More info: DietPi-RAMdisk | Replace with vmtouch to use native fs caching #3288
  • DietPi-LED_control | LED trigger choices are now applied via udev rules, existing settings are migrated on DietPi-Update. This allows to skip running this script at boot and simplify the preboot script, which both reduces boot time a bid. Additionally, applied LED triggers can now be reset to system defaults, which removes related udev rules. Since the script is now for interactive usage only, it has been moved to /boot/dietpi/dietpi-led_control and an alias has been added to call it from console via "dietpi-led_control" command.
  • DietPi-Update | The DietPi auto update feature has been removed. Our updates require users attention, they often contain deeper changes, interactive elements and important information. We'll instead add an auto APT upgrade feature at a later release, similar to "unattended-upgrades" but with the possibility to also upgrade non-security patches, right into dietpi-update. Checking for available updates is done as before on a daily basis if not disabled via dietpi.txt.
  • DietPi-Cron | Allows now to set the cron job output mail recipient. Cron mails are disabled by default since no MTA is preconfigured on DietPi. Additionally the execution times are now shown more clearly in 24h format.
  • DietPi-Autostart | When selecting a non-root autologin user, some required tasks, like permissions, are now applied automatically, based on autostart option. This especially allows non-root users to launch Kodi without applying permissions manually. Many thanks to @sbrl for requesting this feature: DietPi-Autostart | Add autologin user to required groups #3351
  • DietPi-Drive_Manager | GlusterFS fstab entries are now preserved. Many thanks to @Sudrien for implementing this addition: DietPi-Drive_Manager | Support glusterfs mounts #3374
  • DietPi-Software | Domoticz: open-source home automation platform is now available for install. Many thanks to @andyb for doing this request a long time ago: https://dietpi.com/phpbb/viewtopic.php?f=12&t=222
  • DietPi-Software | phpBB: Updated to v3.3.0 which has PHP7.3 support, hence can be installed on all hardware models and distro versions.
  • DietPi-Software | Sonarr/Radarr/Lidarr: Enhanced install and uninstall steps. On reinstalls, the install dir is left unchanged now, suggesting to use the internal updater instead, which is generally safer and now does not require a manual service restart (see bug fix below). In case of a broken instance, the install dir /opt/ needs to be removed manually now, to have reinstalls downloading and installing the newest binaries.
  • DietPi-Software | Sonarr/Radarr/Lidarr: The service now runs with hardened permissions, by default blocking access to directories outside of /opt/ /mnt /var/log/ and /tmp. If writing to other directories is wanted, the service file needs to be edited, easiest with "dietpi-services" > "" > "Edit" and adding an additional "ReadWritePaths=/path/to/custom/dir".
  • DietPi-Software | Chromium: Unlocked install on ARMv6 RPi models: RPi1/Zero/Zero W. Browsing performance will not be perfect, but for kiosk mode or light usage there are use cases. Many thanks to @kmplngj for requesting and testing: Could not install Chromium from dietpi-software #3364
  • DietPi-Software | myMPD: Updated installer according to next upstream release v6.2.0. Many thanks to @jcorporation for informing us about the new version: Notice of myMPD behaviour change - primary group of mympd user #3382
  • DietPi-Software | MPD: Assured that UNIX domain socket and systemd unit for socket activation is present on Stretch systems. As well the obsolete cache dir symlinks in "/var/lib/mpd" will not be present anymore. Any custom scripts must use the absolute paths in "/mnt/dietpi_userdata/.mpd_cache" from now on.
  • DietPi-Software | Pi-hole: Enabled support for Pi-hole v5. Many thanks to @maartenlangeveld for reporting the required change: DietPi-Software | Pi-hole: Add version 5 support #3391
  • DietPi-Software | Shairport-Sync: Updated to new version 3.3.6, using self-compiled deb packages. Many thanks to @kmplngj for doing this request: DietPi-Software | Update Shairport binaries #3216
  • DietPi-Software | HAProxy: Updated to newest stable upstream version 2.1.3 and the sysvinit service has been replaced with the officially provided systemd service. It will be reinstalled on all systems via DietPi-Update, your config files will not be touched on any reinstall.
  • DietPi-Software | rTorrent: Further rework and update of the default config file. Many thanks to @bbsixzz for this contribution: rTorrent Performance Tuning - proposal for a modern .rtorrent.rc #3332

Bug Fixes

+ DietPi-Explorer | In selection mode, when choosing a file, use "Select" as default item, because "Open" is not available
+ DietPi-Explorer | List hidden elements (dot files) as well
+ DietPi-Explorer | Coding enhancements, especially for current permissions estimation
+ DietPi-Explorer | Syntax
+ DietPi-Explorer | List double dot files first, single dot files afterwards, others last, like "ls -Al" would do on most locales
+ DietPi-PREP | Remove debug code, bash -c "$(curl -s ...)" leads to basename being empty string, hence [[ -f ... ]] check returns false and script removal is skipped 👍
+ DietPi-PREP | Further home dir cleanup
+ DietPi-PREP | Fix DietPi directory permissions: #3322 (comment)
+ DietPi-PREP | Pre-generate DietPi core directories before installing code. This assures the parent directories have correct intended permissions, while contained system service and config files stay only root-writable, as of default umask.
+ DietPi-Software | Nextcloud: Revert occ maintenance:install workaround, since the issue has been fixed with latest NC18
+ DietPi-PostBoot | Add /var/lib/dietpi/postboot.d readme
+ DietPi-PREP | /var/lib/dietpi/dietpi-autostart is created if required, /var/lib/dietpi/dietpi-config is not in use anymore, hence both don't need to be pre-created
+ NanoPi M4v2 | Add initial definition and support
+ Network | Remove Rock64 + RK3399 Ethernet workaround, which has been fixed with current Armbian kernel, which our images are currently based on. We do not remove the file via patch on systems, since we cannot assure that the patch has been applied in every case (dist-upgrade) and must "not change a running system".
+ DietPi-PREP | DietPi user must be created first, before chown DietPi dirs can work. Lets simply use dietpi:dietpi for all of them and 775 for all directories. Execute permissions have been given to scripts before.
+ DietPi-PREP | Further increase verbosity
+ DietPi-PREP | Syntax
+ DietPi-Software | Xserver: Do not purge x11-* packages, since at least x11-common is a dependency of Java. Mark them for autoremoval instead, to be purged at uninstall finalise, if no other package depends on it.
+ DietPi-Software | myMPD: Re-assure that service runs with "dietpi" as primary group, since new webdav feature allows to push media to server. Remove now unused "mympd" group: #3382
+ DietPi-Software | myMPD: Use installdeps build command to satisfy dependencies
+ DietPi-Software | myMPD: Do not add user to "render" group, which has no point here
+ DietPi-Software | myMPD: Assure that on uninstall all custom/dietpi-services systemd unit drop-ins are removed as well
+ DietPi-Software | MPD: Install systemd socket on Stretch as well, which allows socket activation for MPD
+ DietPi-Software | MPD: Limit dir permissions to mpd:audio and default 755/644 since nothing requires write access to MPD cache, config and log but MPD itself
+ DietPi-Software | MPD: Omit creation of obsolete symlinks. The file names we used are anyway not all correct defaults on current versions and whatever wants to access them, must either ask MPD directly or have the correct final paths. /usr/local/etc/mpd.conf would only be required when mpd binary is executed directly. In this case an error and different dirs and configs are best anyway, since user and systemd environment are wrong and must not access the same MPD instance.
+ DietPi-Software | MPD: Enable socket bind by default
+ DietPi-Software | MPD: Align Stretch (custom package) setup with Debian repo package, by creating "mpd" user with primary group "audio". Make chown more flexible via syntax that sets the primary user group. Do not add MPD user to "render" group, since this is for DRI (graphics) rendering only, not required for audio-only software
+ DietPi-Software | myMPD: Set correct socket path: /var/run symlinks to /run and systemd units meanwhile complain if /var/run is used.
+ DietPi-Software | myMPD: Remove config file on uninstall from new location, delete group on uninstall, which can be left from pre-v6.29 installs
+ DietPi-Software | myMPD: Add playlist setting now, with will be effective with myMPD v6.2.0 and throws a warning only on earlier versions
+ DietPi-Software | MPD: Remove id3v1_encoding setting from mpd.conf, which has been deprecated with v0.20
+ DietPi-PREP | Install dosfstools only if any fat/vfat fs is actually attached (i.e. for boot/efi partition). On Armbian this is mostly not the case, hence we can skip it there. DietPi-Drive_Manager will automatically pull it once a format to or fsck on FAT is chosen.
…sive umount

+ Clonezilla is x86_64 only!
+ umount -R cannot be used with source device as input, but only with mountpoint as input.
+ DietPi-RAMlog | Minor coding and output updates
+ Images | Add initial Pine H64 and ROCK Pi S support
+ DietPi-PREP | Reorder device selection menu to reflect a bid more our order of support. Since NanoPi M4/T4/NEO4 images basically can be used on all three boards, merge them into one hardware ID for now.
+ Rephrase list, since it contains links to hardware manufacturers as well
+ DietPi-Drive_Manager | Move RootFS: Failsafe changes: Exclude /DietPi and /tmp, as those are tmpfs. Exlude /var/log if it is any kind of mount, e.g. when mounted from another external drive, it must be excluded as well of course. Add RPi rootdelay after just added rootfstype block, since it is assured to be present, while "console=tty1" could not be present (although default on DietPi). Search existing entries that really start with the pattern, just in case something like "something_root=" is present. Add "rw" option to new fstab entry, which should not be required but to be failsafe.
- ToDo: Exclude simply all mount points from rsync. Add rootdelay on RPi only if target RootFS is on external drive, remove in case it is moved (back) to internal SDcard.
+ DietPi-FirstBoot | Remove obsolete workaround for NanoPi Fire3: #3221 (comment)
+ DietPi-FirstBoot | Be case-sensitive with dietpi.txt, since "sed -n" value scraping is as well. No need and not consistent to ignore cases for dietpi.txt settings.
+ DietPi-Boot | Remove ancient WiFi workaround for OPi Zero 2 and NanoPi NEO Air
+ DietPi-Boot | Do now lower kernel print level during boot. This should only be relevant until login prompt and during boot those messages can be very helpful for debugging and informational reasons. Re-evaluate if Odroid C2 HiFi Shield users still complain and then report to Hardkernel instead.
+ DietPi-PREP | Add support for official Radxa Debian image, remove pre-created "rock" user
+ DietPi-PREP | Scan only sources.list.d/*.list for kernel/firmware repos, as these are the only effective files, sources.list itself would be overwritten.
+ DietPi-PREP | ROCK Pi S: Do not pre-install Bluetooth firmware as it gets purged later with bluez => dbus dependency. Install it ondemand when Bluetooth is activated via dietpi-config.
+ DietPi-PREP | Disable Docker optimisations on Armbian images. These are enabled by default but have some performance drawbacks for the base system. This setting will be enabled instead on Docker install (ToDo).
+ DietPi-PREP | Set kernel log verbosity to 4 on Armbian images. This is Linux default and should be sufficient for regular usage.
+ DietPi-Software | Sonarr/Radarr/Lidarr: Enhance reinstall by skipping download and install of new binaries when install dir already exist. Print an info that updates should be done via internal updater, which is generally safer due to possible migration steps. If the instance is broken, hence internal updater cannot work, the install dir must be removed manually first.
+ DietPi-Software | Sonarr/Radarr/Lidarr: Create run user with "dietpi" as primary group and skip creation of group with same name. This resolves potential issues where supplementary groups are overwritten by the systemd units "Group=" setting.
+ DietPi-Software | Sonarr/Radarr/Lidarr: Enable automated service restart after internal updater has finished. Prior to this, internal updates led to a service stop, which then needed to be restarted manually.
+ DietPi-Software | Sonarr/Radarr/Lidarr: Harden service permissions by allowing R/W access only to install dir, log dir, /tmp and /mnt. The whole /mnt dir is granted since this is the most common dir where users might place downloads, if outside of /mnt/dietpi_userdata. UNIX permissions must match as well, since ReadWritePaths only adds exclusions to ProtectSystem=strict but does not add additional permissions. This change must be communicated since user might currently use custom dirs outside the permitted ones. Those can easily be added to the ReadWritePaths list via dietpi-services GUI service edit.
+ DietPi-Software | Sonarr/Radarr/Lidarr: Enhance uninstall by cleanly disable and remove the systemd unit with all drop-in configs.
+ DietPi-Patch | Sonarr/Radarr/Lidarr: Inform user about permission changes: #3349
+ DietPi-LED_control | Major rework: Chosen LED triggers are now applied as udev rules so that this script does not need to be executed on boot. Reset options have been added to remove udev rules. Location has been moved to parent, since now it is for interactive execution only. A shell alias has been added for quick access via "dietpi-led_control".
+ DietPi-Patch | Convert old DietPi-LED_control settings to udev rules and remove script from old location
+ DietPi-PreBoot | Remove DietPi-LED_control call, since LED triggers are now applied via udev rules
+ DietPi-PreBoot | Do not use G_THREAD, since DietPi-Set_CPU is the only larger call being done, hence no benefit of concurrency
+ DietPi-PreBoot | Do not load DietPi-Globals, since checking for RPi is the only left reason, which can be done much simpler
+ DietPi-PreBoot | Obtain hardware info only if resulting file is missing, and on RPi to allow SDcard swapping. For non-RPi models, the result can only change after DietPi updates, and DietPi-Patch forces a hardware info reload on every execution.
+ DietPi-Config | DietPi-LED_control script has been moved to parent dir
+ DietPi-Login | Since PROMPT_COMMAND() is called from regular interactive shell with bashrc sourced, assure that "rm /tmp/dietpi-process.pid" is non-interactive and silent, regardless of applied "rm" interactive or verbose aliases.
+ DietPi-Obtain_HW_model | In any unexpected hardware identifier case, revert to "Generic Device" (ID: 22) to assure that our scripts cannot do wrong assumptions, e.g. assume RPi because of missing identifier file only (( $G_HW_MODEL < 10 )).
+ DietPi-Obtain_HW_model | Remove $IMAGE_ADDITIONAL_CREDITS, since this doubles with .prep_info. If no .prep_info is present (very old images), convert old $IMAGE_ADDITIONAL_CREDITS entry via pre-patches instead
+ DietPi-Banner | Remove $image_additional_credits line in favour of pre-image line which basically double each other
+ DietPi-Banner | Add Joulinar to DietPi Team line, deserves credit for outstanding support on GitHub and Forums
+ DietPi-Pre-patch | Convert .hw_model additional credits line to .prep_info pre-image. This must be done as pre-patch, since DietPi-Patch calls DietPi-Obtain_HW_model, which clears the line
+ DietPi-Globals | Use hardware ID 22 (Generic Device) as general fallback to assure that it is never falsely identified as RPi by (( $G_HW_MODEL < 10 )).
+ DietPi-PREP | Set modern /usr/local permissions. Remove flag file, created on distro upgrades to preserve old permissions with group "staff": https://www.debian.org/doc/debian-policy/ch-opersys.html#site-specific-programs
MichaIng added 18 commits April 25, 2020 21:38
+ DietPi-Software | Xserver: X.org config consistency
+ DietPi-Software | Xserver: Revert RK3399 X.org config to a very basic and compatible default until other X.org packages with different methods have been proven to work better
+ DietPi-Software | X.org: Remove obsolete and unavailable command from currently anyway unused RK3399 udev rules
+ DietPi-Globals | Whenever one of our global functions invoke G_EXEC with internal G_EXEC_PRE_FUNC/G_EXEC_POST_FUNC, allow originating script/user G_EXEC_PRE_FUNC/G_EXEC_POST_FUNC by renaming existing ones and calling them as well.
+ DietPi-Globals | Use "declare -F" instead of "declare -f" when checking for declared functions. The first one only prints the name (slightly faster) while the second one prints the functions content.
+ DietPi-PREP | Failsafe: Assure that apt-mark can never get an empty package list
+ DietPi-PREP | Jessie: Apply a workaround for Jessie pre-images to replace the not yet available APT "--allow-change-held-packages" option with "--force-yes", until distro has been upgraded
+ DietPi-Config | Remove doubled brackets on No-IP status
+ DietPi-PREP | Assure that systemd-timesyncd is installed on Bullseye+ systems, where it is available as dedicated APT package and only one possibility to satisfy systemd dependency for "time-daemon": https://packages.debian.org/bullseye/time-daemon
+ DietPi-Globals | Default RC up
+ RC up
+ DietPi-Software | Install PHP composer in a consistent way. The installer does not need to be removed manually, as "unlink" performs that already.
+ DietPi-Drive_Manager | Fix handling mount sources and targets with spaces, especially for Samba/SMB/CIFS mounts.
+ DietPi-Drive_Manager | Bind mounts are now excluded by using only the first match of multiple mount sources, which implies that multiple "regular" mounts of the same source will not be shown anymore in the menu. This is acceptable since multiple mounts of the same source was never really supported, e.g. unmounting such a drive would have it been removed on next drive scan loop and mounting a source a second time was never possible.
+ DietPi-Software | Nextcloud Talk: On Buster, /etc/turnserver.conf is now added/fixed, however as failsafe step keep creating default or empty file as fallback
+ DietPi-Software | Nextcloud Talk: Fix deprecated settings: no-loopback-peers has been replaced by allow-loopback-peers, no-multicast-peers has not changed + fix a sed syntax
+ DietPi-Software | Nextcloud Talk: Force spreed app install success if command reports "already installed", since it then exits with error code. This is only relevant when the install fails one time and is retried, or if an alternative apps directory is used: #3499 (comment)
+ DietPi-Software | Nextcloud Talk: Succeed app install as well in case of "Cannot declare class" error, which appears to be a new bug and can be ignored since the app enables and works fine: #3499 (comment)
+ DietPi-Software | ownCloud/Nextcloud: Use fixed Redis config path, which is now valid on all supported Debian versions
+ DietPi-Software | ownCloud/Nextcloud: Revert to Redis socket 770 permissions, which works now well on Debian Buster
+ DietPi-Software | Nextcloud: Add missing database columns and indices, which is not done automatically by Nextcloud
+ DietPi-Software | Nextcloud Talk: Do not print coTURN authentication secret to console
+ CHANGELOG | Nextcloud Talk: Worked around an external bug where Nextcloud Talk app failed to install
+ RC up
+ DietPi-Globals | Default RC up
@MichaIng MichaIng added the Beta 🧪 Issues specific to the Beta branch testing label May 3, 2020
@MichaIng MichaIng added this to the v6.29 milestone May 3, 2020
@MichaIng MichaIng requested review from Fourdee and Joulinar May 3, 2020 20:09
MichaIng added 6 commits May 3, 2020 22:11
+ CHANGELOG | Add v6.29 release PR link
+ DietPi-Software | Home Assistant: Add user to gpio and i2c groups, if present (e.g. RPi), since this is often used to connect HA modules
+ DietPi-Software | Home Assistant: Install Python module wheel, to enable pip building wheels for all modules that need to be compiled
+ DietPi-Patch | Migrate new SBCs to master branch now, as v6.29 is to be released
+ DietPi-Patch | Migrate new SBCs to master branch now, as v6.29 is to be released
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.

3 participants