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.33 #3829

Merged
merged 213 commits into from
Oct 17, 2020
Merged

Release v6.33 #3829

merged 213 commits into from
Oct 17, 2020

Conversation

MichaIng
Copy link
Owner

@MichaIng MichaIng commented Oct 15, 2020

v6.33

(17/10/20)

API Changes

  • DietPi-Globals | The G_FP_DIETPI_USERDATA variable has been removed. Variables cannot be used in every context, e.g. not in config files stored on GitHub or dietpi.com for download, its value "/mnt/dietpi_userdata" does not change and using the path literally allows slightly simplified and hardened coding.

Changes / Improvements / Optimisations

  • DietPi-Login | Logins do not wait for DietPi-PostBoot to finish anymore, as this is not strictly required. On local console, DietPi-PostBoot processing output practically blocks login until finished or timed out and logins on any other console like SSH or serial do not require it. DietPi-PostBoot only checks for DietPi updates, starts background services and prints the pre-login banner to local console, nothing that is required for console usage.
  • DietPi-Autostart | Autostart programs with a foreground process are now started as replacement for the DietPi-Login process via "exec" which saves 3-4 MiB RAM usage.
  • DietPi-Software | When using an invalid input argument, dietpi-software now prints usage info to the terminal.
  • DietPi-Software | The "dietpi" UNIX group has been made the primary group for all* services which ran with "Group=dietpi" before: Transmission, Mopidy, MiniDLNA, Airsonic, Plex Media Server, Emby Server, Medusa, Tonido, Blynk Server, SABnzbd, Koel, NZBGet. If the user (+group) is created by an external package or installer, the original primary group is kept as supplementary group to not possibly break access permissions to pre-created directories and files. *Only example from these changes is Deluge for now, since we don't want to run the separate web UI service with dietpi group permissions. In case of Tautulli, the dietpi group permissions are remove, since Tautulli does not require it.
  • DietPi-Software | Bazarr: Companion application to Sonarr and Radarr, which manages and downloads subtitles based on your requirements, now available for install. Many thanks to @DiogoAbu for doing this suggestion: DietPi-Software | Bazarr #2045
  • DietPi-Software | phpBB: New installs will be v3.3.1 now, existing instances won't be touched as updates need to be done manually through the internal update mechanism, which includes the mandatory database migration. Additionally new installs will now be places at /var/www/phpbb, the old location /var/www/phpBB3 is still handled gracefully, if existing.
  • DietPi-Software | OctoPrint: The service runs now as user "octoprint", the Git branch directory has been moved to /opt/octoprint and /mnt/dietpi_userdata/octoprint is the run users home and hence config and data directory now. To apply these changes, OctoPrint is reinstalled with DietPi v6.33, which includes the Python 3 migration (see v6.32 changelog) on Buster and Bullseye systems. This implies that the CLI ("octoprint" command) needs to be executed as user "octoprint" to invoke the correct configuration. A bash shell alias solves this automatically for all users with sudo permissions, but if you use a custom shell, the CLI needs to be called like: "sudo -u octoprint octoprint ". Many thanks to @ModischFabrications for reporting an issue that is related to the fact that the service ran as root user before: DietPi-Software | OctoPrint: Run as "octoprint" user #3315
  • DietPi-Software | Tautulli: Finally, directories, user and service are renamed from "plexpy" to "tautulli". Additionally it runs with Python 3 now instead of Python 2. These changes are applied as well during DietPi update.
  • DietPi-Software | Baikal: Update (re)install procedure to cover the new config directory and use the pre-packed release archives instead of raw source and composer. Additionally webserver configs have been added to harden access permissions.
  • DietPi-Software | Docker: On fresh installs or reinstalls, logs are now done with limited verbosity to systemd-journald (RAM), accessible via "journalctl -u docker -u containerd" to reduce disk writes. Docker can be reinstalled via "dietpi-software reinstall 162". Many thanks to @SaturnusDJ for doing this suggestion: DietPi-Software | Docker logging to RAM/journald #2388
  • DietPi-Software | Mosquitto: The official APT repository is now used where possible, which currently excludes ARMv8/arm64 and Raspbian/Debian Bullseye. This change is applied via reinstall during DietPi update. Many thanks to @marcobrianza for doing this suggestion: DietPi-Software | Mosquitto: Use official repo #3042
  • DietPi-Software | Cuberite: A wrong directory name based on a typo has been fixed. A reinstall updates Cuberite and moves its install directory to /mnt/dietpi_userdata/cuberite as intended. This is applied via DietPi update but a backup is created to cover issues due to potential structural changes, especially for older instances installed at /etc/cubrite.
  • DietPi-Software | Amiberry: An update to Amiberry v3.3 is applied during DietPi v6.33 update.
  • DietPi-Software | LXDE: By default, when double-clicking a desktop icon or executable file, it will be executed directly now, without being asked first what to do. This behaviour can be changed from within PCManFM file manager > "Edit" > "Preferences" > "General" > "Don't ask options to launch executable file".

Bug Fixes

  • General | Resolved an issue where using AUTO_UNMASK_LOGIND=1 or enabling Amiberry fastboot did not allow to start systemd-logind as intended if the required dbus package was not installed before. Many thanks to @razerbann for reporting this issue: Non-interactive firstrun setup fails when AUTO_UNMASK_LOGIND is set to 1 in /boot/dietpi.txt #3770
  • RPi | Resolved an issue where Allo USBridge Sig (ASIX AX88179) Ethernet fails due to non-matching driver. Many thanks to @dsnyder0pc for reporting this issue any many thanks to Allo for providing stable branch driver builds and a method to compare kernel module layouts: RPi + Allo USBridge Sig | Ethernet driver ax88179_178a fails #3725
  • DietPi-Backup | Resolved an issue where F2FS was not supported as target location. Since it has full UNIX permissions and symlinks support and can be used as rootfs file system, it can be used for OS backups as well. Many thanks to @Cjkeenan for reporting this issue: RPi | Support for + provide F2FS images #606 (comment)
  • DietPi-Set_swapfile | Resolved an issue where swapon failed on ext4 due to an external bug in Linux 5.7 and 5.8. The script now tries quick and less write-intense fallocate pre-allocation first, regardless of kernel version and file system type, and falls back to dd in case of failure. Many thanks to @auanasgheps for reporting this issue: DietPi-Set_swapfile | swapon fails on ext4 when using fallocate #3756
  • DietPi-Config | Resolved an issue where on devices with old Linux kernel versions (e.g. Sparky SBC with Linux 3.10.38) the Performance Options failed to open with a syntax error. Many thanks to @dsnyder0pc for reporting this issue: dietpi-config Performance Options exits with syntax error on Sparky #3799
  • DietPi-Config | Resolved an issue on RPi 2 where a wrong default SDRAM frequency was shown, which is 450 MHz instead of 400 MHz with current firmware.
  • DietPi-Software | OpenTyrian: The autostart option and run script have been fixed and slightly enhanced to lower RAM usage a bid.
  • DietPi-Software | Firefox Sync Server: Resolved an issue where the build failed due to missing MySQL/MariaDB headers, newly required. Many thanks to @kinoushe for reporting this issue: DietPi Software | Firefox Sync Server upgrade/new install fails #3774
  • DietPi-Software | Firefox Sync Server: Resolved another issue where the build failed due to transition of the whole project from Python to Rust. We now stay on a fixed commit and won't ship newer Firefox Sync Server versions until this transition has been fully completed, as the install process and requirements will constantly change. Many thanks again to @kinoushe for reporting this issue.
  • DietPi-Software | LXDE: Resolved several issues due to conflicts between the RPi desktop LXDE packages with native LXDE.
  • DietPi-Software | Webmin: Worked around an issue where install failed. Webmin depends on apt-show-versions which does not support compressed APT list files, which be implemented as default with DietPi v6.32.
  • DietPi-Software | WebIOPi: Resolved an issue where the download failed.
  • DietPi-Software | Home Assistant: Resolved an issue where install failed on ARM due to missing new build dependency. Many thanks to @pbutterworth for reporting and @novitibo for providing the solution: https://dietpi.com/phpbb/viewtopic.php?f=11&t=8095
  • DietPi-Software | Kodi: Resolved an issue on Odroid XU4 where install failed due to missing librockchip-mpp1 package which instead was aimed to be installed on Odroid N1 only.
  • DietPi-Software | TigerVNC+LXDE: Resolved an issue where lxappearance start ("Customize Look and Feel") hangs within TigerVNC sessions.
  • DietPi-Software | Fail2Ban: Resolved an issue where the service could have failed to start due to a missing variable declaration in our default config. Many thanks to @mafioso12dk for reporting this issue: https://dietpi.com/phpbb/viewtopic.php?f=11&t=8147
  • DietPi-Software | DietPi-RAMlog: Resolved an issue where /var/log content was not restored when reinstalling DietPi-RAMlog, e.g. when swiching logging mode from Fix warning when running scp over openssh-server #1 to Fix for dumb or unset TERM #2. This could have led to service start issues, when those rely on log files or directories being present. Many thanks to @djashdj for reporting this issue: https://dietpi.com/phpbb/viewtopic.php?f=11&t=8163

+ DietPi-Software | Increase maximum software menu width to hold all descriptions + scroll bar
+ DietPi-Software | RK3399/RK3288: From Bullseye on, use the open Mesa GPU drivers, which provide good GPU acceleration and are assured to work fine with the X.org packages from Debian
+ DietPi-Software | Xserver: Delete obsolete config
+ DietPi-Software | Xserver: Delete obsolete conf
+ DietPi-Software | Xserver: Remove obsolete conf
+ DietPi-Software | Xserver: Disable DPMS and screen blanking via Extensions and ServerFlags sections, which apply to all screens, regardless of specific identifies. DPMS options do not need to be set to "0" if the extensions itself is not loaded. Change config file name to apply new standard and allow overriding via prefix "99".
+ DietPi-Patch | Update Xserver config file name
+ DietPi-Software | Xserver: Update config file name
+ DietPi-Boot | Check default route via actual output instead of command exit code, since it can return true even if not route exists
+ DietPi-Set_hardware | RPi4 EEPROM update: binutils has been added to dependencies meanwhile, flashrom is not used anymore by default (can be used via env var but is not recommended) and "rpi-eeprom-images" is a transitional dummy package now: raspberrypi/rpi-eeprom@ea5dff5#diff-d837a1c17de0268bcea321239ddbed47
+ DietPi-Software | Kodi: Fix dependencies for Bullseye, although no kodi package is available yet
+ DietPi-Globals | G_OBTAIN_CPU_TEMP: Revert afp_temperature array quoting to allow glob expansion on coretemp file paths
+ DietPi-Imager | Minor coding: Prefer read or mapfile when creating an array from command output to avoid globbing and have a clearly defined delimiter. When multiple lines need to be split at newline and space, stay with the old method for now as for now I didn't fine a nice method to do this without additional command calls (mawk) or loops.
+ DietPi-Backup | Revert "read -ra" to "readarray" respectively its actual command "mapfile". "read" only reads a single line, hence multiple old backup search is broken by this. mapfile/readarray can be used with "-t" option to remove the trailing newline in each array entry. Additional coding enhancements: Do not write to file first but write to array directly, do not unset local variables, especially since read and mapfile both first clear the array/variable they write to.
+ DietPi-Backup | Remove dietpi-drive_manager_selmnt after it has been used
+ DietPi-PREP | Minor coding
+ DietPi-Autostart | Minor coding
+ DietPi-Backup | Minor coding
+ DietPi-Bugreport | Minor coding, do not glob on file list, add all files and dirs explicitly instead, which rules out all users .bashrc and .profile files but that is okay as our scripts mostly run as root.
+ DietPi-Bugreport | Tiny
+ DietPi-Cleaner | Coding
+ DietPi-Cleaner | Further coding
+ DietPi-Cleaner | Minor coding
+ DietPi-CPU_info | Minor coding
+ DietPi-Explorer | Minor coding
+ DietPi-Launcher | Minor coding
+ DietPi-LED_control | Minor coding and one syntax fix that luckily doesn't have any negative effect
+ DietPi-LetsEncrypt | Minor coding
+ DietPi-Login | Minor coding
+ DietPi-Morsecode | Minor coding
+ DietPi-Survey | Minor coding
+ CHANGELOG | Fix typos and set pull request URL for v6.33
@Joulinar
Copy link
Collaborator

tested on RPi3B+

update path

  • general update working fine
  • fail2ban > fail2ban installed on 6.32.2, fail2ban.service is not starting as expected. But was working fine after automatic correction during upgrade to 6.33.2.

general usage of 6.33.2

  • Bazarr > installation working fine
  • DietPi-RAMlog > log mode switch working in general
    However there is an issue if fail2ban is installed. Because it's holding a log file preventing /var/log to be unmount
[FAILED] DietPi-Software | Unmounting /var/log
 - Command: umount -R /var/log
root@DietPi3:~# fuser -m /var/log
/var/log:              319
root@DietPi3:~# ps -ef |grep 319
root       319     1  0 11:02 ?        00:00:05 /usr/bin/python3 /usr/bin/fail2ban-server -xf start

I tried to set the service to DietPi controlled - included. But dietpi-software is going to ignore the setting and service will not be stopped. As well, it seems fail2ban.service is not started automatically on reboot if service is set to DietPi controlled

  • HA > still missing libjpeg-dev package on my test installation. HA was not starting correctly and it was needed to run apt install libjpeg-dev manually
  • swap file > swap file creation via fallocate working
  • Webmine > installation is working fine
  • LXDE > installation ok, all buttons shown on desktop

+ DietPi-Software | LXDE: Execute desktop icons and executable files directly without asking what to do
@MichaIng
Copy link
Owner Author

MichaIng commented Oct 16, 2020

Many thanks for testing.

fail2ban is a special case for service handling: It is handled but only for showing status: https://github.com/MichaIng/DietPi/blob/dev/dietpi/dietpi-services#L210
Since it is in the list already and hence shown in dietpi-services menu, when choosing "Include", it is assumed that the service is on the blacklist only and hence only needs to be removed there, instead of adding it. When choosing "Add", it fails since the service is in the list already. Two possible solutions:

  • Do not process this list of "status-only" services in dietpi-services menu, so that fail2ban and the others can be "Add"ed.
  • Handle those "status-only" services in a special way, as separate array, so that those are shown in the manu but can still be included/excluded by checking if those are present in the regular array. That is what I want to go with, but requires a bid too much work to be included with v6.33.

If someone wants to have fail2ban processed, currently, it should be possible to manually add it to the config file:

echo '+ fail2ban' > /boot/dietpi/.dietpi-services_include_exclude

For v6.33: I'll allow the unmount to fail. It is not a big issue and was not related to the bug that was fixed in the same commit that unmount was added. With the unmount, it is possible to remove left log files below the mount point. But usually there are none, even if, those do not break the /tmp mount, only throw a warning/notice. And there may be other reasons for unmount to fail. Only left issue, if there is a different mount on /var/log so that mounting a tmpfs then fails? However unlikely and something that needs to be resolved then manually.
EDIT: Not an issue, if there is another mount, it is simply overmounted by the tmpfs. With reboot all is solved anyway due to clean fstab entry.

Interesting, Debian Stretch umount gives useful hints about what to do, while since Buster this info is missing:

umount: /var/log: target is busy
        (In some cases useful info about processes that
         use the device is found by lsof(8) or fuser(1).)

That solves it: d3515c6
Additionally I switched fail2ban logging target to syslog/journald by default, so it does not keep the mount point busy and I anyway aim to move all logs away from file to journald.

+ DietPi-Software | Fail2ban: Change logging target to systemd-journald so that it does not prevent /var/log unmount
+ DietPi-Software | DietPi-RAMlog: Allow unmount of /var/log to fail as it is only a bonus to allow cleaning the below mount point but not strictly required for RAMlog install which will at latest be fully setup with next boot
@MichaIng
Copy link
Owner Author

About Home Assistant, libjpeg-dev is only installed on ARM since on x86 the Pillow wheel is available pre-compiled. Since you say it is not starting up well, aside of the still present first service start, is it now compiling something else on first start on x86 as well? I'll test.

@Joulinar
Copy link
Collaborator

I did all my HA testing on RPI3B+. Therefore it should have been installed. Isn't it?

+ DietPi-Software | Home Assistant: Raise Python version to 3.8.6
@MichaIng
Copy link
Owner Author

MichaIng commented Oct 16, 2020

Strange, yes should have been 🤔. I'll run a test as well.
EDIT:

[ INFO ] DietPi-Software | APT install for: gcc libc6-dev make zlib1g-dev libbz2-dev libreadline-dev libssl-dev libsqlite3-dev libffi-dev libjpeg-dev, please wait...

worked here 🤔.

@MichaIng MichaIng requested a review from fpetru October 16, 2020 21:14
+ RC up
+ DietPi-Globals | Default RC up
+ DietPi-Software | LXDE: Typo
@MichaIng
Copy link
Owner Author

Okay, from my end, I'd merge v6.33.3 tonight together with the release.

+ CHANGELOG | Set v6.33 release date
@Joulinar
Copy link
Collaborator

Will do one more test an HA this evening

@Joulinar
Copy link
Collaborator

Joulinar commented Oct 17, 2020

ok I'm lost with this libjpeg-dev. Yesterday, definitely it was not present. Otherwise I would not have been able to install it using apt. 🤔

Anyway, was working well today using 6.33.3 dev branch 👍

+ DietPi-FS_partition_resize | Inform kernel about changed partition table with two different methods, to be failsafe. This might be specially required since we added "--no-tell-kernel" to sfdisk which produces an ugly error message but still might have had an effect. partprobe alone is known to be not sufficient in some cases, e.g. when changing image files attached to the same loop device and doing another "partx -u" assures this succeeding in every case, so it is a good failsafe step in general.
@MichaIng
Copy link
Owner Author

Okay great, probably you forgot to run the update or it was on a previous state of v6.32.2 where the HA fix was not yet merged.

fpetru
fpetru previously approved these changes Oct 17, 2020
Joulinar
Joulinar previously approved these changes Oct 17, 2020
@StephanStS
Copy link
Collaborator

Installed the beta on a couple of targets (PI 2, PI 3, PI Zero W, NanoPi NEO4, NanoPi NEO2, native PC) without problems so far.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Open Beta v6.33 | Please help testing and hardening the upcoming release
4 participants