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 v8.0 #5146

Merged
merged 99 commits into from
Jan 8, 2022
Merged

Release v8.0 #5146

merged 99 commits into from
Jan 8, 2022

Conversation

MichaIng
Copy link
Owner

@MichaIng MichaIng commented Jan 7, 2022

v8.0

(2022-01-08)

Stretch support

  • Support for Debian Stretch has now been removed, which allowed us to do a major code cleanup and migrate to some newer methods in different areas which are only available on Buster and above.

Changes

  • DietPi-Dashboard | Added an option to view multiple dashboard nodes from one frontend web interface. Related to this, the backend can now be installed only, reducing memory usage and making it impossible to manually access the node outside of the backend API.
  • DietPi-Print_large | This new script has been added which can be executed or sourced from /boot/dietpi/func/dietpi-print_large to print the string passed via first argument in large figlet style fonts. It currently only supports the characters a-z, A-Z, 0-9, dot and dash, i.e. those commonly allowed in hostnames.
  • DietPi-Banner | Added an option to print the system's hostname in large figlet style fonts, right below the banner header. In case it is enabled as well, the regular/small hostname line will then be skipped. Many thanks to @matellis for implementing this feature: DietPi-Banner | Adds large style banner #5113
  • DietPi-Automation | The automatic login on first boot, when AUTO_SETUP_AUTOMATED=1 is set, is now deferred until all network interfaces have been fully configured, including DHCP. In case of slower DHCP servers it was otherwise possible that network checks timed out, aborting the automated first run setup. Many thanks to @jpeg2600 for reporting such a case: Slow DHCP server causing trouble with auto installation (with workaround)  #5143
  • DietPi-Software | Mono: "mono-complete" won't be installed anymore but only "mono-devel" instead. This skips the XSP4 webserver service, which listens on port 8084 by default where it conflicts with File Browser. This only affects new instals. You can manually apply this change via "apt-mark manual mono-devel && apt --autoremove purge mono-complete". Many thanks to @jaguar489 for reporting this issue: Dietpi-Software File browser won't start #5093
  • DietPi-Software | FuguHub: The outdated official installer has been replaced with a fully automated own setup, removing the obsolete or even harmful interactive dialogues. On fresh installs, an admin account "dietpi" with global software password is created as well.
  • DietPi-Software | myMPD: Installation is now done via official APT repository, which means quicker install compared to compiling from source, fewer dependencies and easier updates via "apt upgrade": Error installing myMPD #5115
  • DietPi-Software | Airsonic: Since the project has been archived by its maintainer and suffers from the critical Log4Shell security vulnerability, we moved to the advertised fork "Airsonic-Advanced" which also enables compatibility with Java 17 and hence Debian Bullseye. Airsonic will be reinstalled as part of the DietPi update to apply the migration. All data and settings will be preserved and migrated automatically.

Fixes

  • Raspberry Pi | Resolved an issue where unintentionally the turbo mode was enabled. This got backported to v7.9, to our existing RPi images and via live patch. Many thanks to @ayo-x and @whyisthisbroken for reporting this issue: Raspberry Pi | CPU frequency scaling does not work #5088
  • DietPi-FS_partition_resize | Resolved an issue where in some cases the boot partition failed to mount on first boot since after the partition resize the system in some cases didn't get sufficient time to fully apply the change before continuing with the boot mount attempt. Many thanks to @Mausy5043 and @sistemicorp for reporting this issue: rebooting after PREP-script #5006
  • DietPi-Config | Resolved an issue where on Raspberry Pi, when the full KMS display driver is used, the sound card selection could have been falsely applied. With full KMS enabled, for each HDMI port an additional HDMI sound card appears (replacing the regular firmware HDMI sound device), even when no HDMI device is attached and with onboard audio disabled. This lead to an incrementation of external sound card indices. The appearance of the KMS HDMI sound cards is now aligned with the onboard firmware HDMI sound cards, i.e. if not onboard "auto" or HDMI is selected in dietpi-config, now the KMS HDMI sound devices are disabled as well, making use of the "noaudio" device tree overlay parameter.
  • DietPi-Software | Resolved an issue where on first boot, choice and preference menu selections triggered an error as the install state file did not exist yet. Many thanks to @bsheeres for reporting this issue: Clean Install Errors on Software - Log System (AUTO_SETUP_LOGGING_INDEX) #5080
  • DietPi-Software | Resolved an issue where the deprecated AUTO_SETUP_FILE_SERVER_INDEX dietpi.txt option was applied inverted. "-1" should have installed ProFTPD and "-2" Samba, while it was done the opposite way. However, note that this setting is not present on current images and deprecated. Use AUTO_SETUP_INSTALL_SOFTWARE_ID instead to mark any one or multiple file servers for automatic install. Many thanks to @bsheeres for reporting this issue: AUTO_SETUP_FILE_SERVER_INDEX options reversed #5081
  • DietPi-Software | Browsers: On the ARMv6 Raspberry Pi models Raspberry Pi 1 and Zero (1) since Bullseye, Chromium and Firefox fail to start due to hardware and build limitations which are outside of our control. Since those are currently the only two browser available from dietpi-software, they have been disabled together with the browser preference menu for those systems, until we find and implement a good additional compatible browser. Further info: [Bullseye] Chromium fails to start on ARMv6 RPi-Distro/chromium#21
  • DietPi-Software | Kodi: Resolved an issue where subsequent Kodi reinstalls created duplicates of the CMA parameter for the KMS overlay setting in config.txt. The duplicates are patched out during DietPi update.
  • DietPi-Software | Docker: Resolved an issue where the install was aborted due to an incorrect check for missing kernel modules. Many thanks to @dragonandy for reporting this issue: Docker and its dependants will be deselected Modules for the loaded kernel are missing. #5061
  • DietPi-Software | Pi-hole: Resolved an issue where the teleporter import log was not shown but denied by the X-Frame-Options header: https://discourse.pi-hole.net/t/unable-to-restore-teleporter-backup-fresh-install-no-funky-changes-made/51573
  • DietPi-Software | Blynk Server: Resolved an issue on ARMv6 RPi models where the install failed as the latest Blynk Server release does not contain a Java 8 build. Since the older Java 8 build does not contain a native Log4Shell vulnerability mitigation, it is added server-wise on these systems.
  • DietPi-Software | Mycroft AI: Resolved an issue on Bullseye (and above) systems where "mycroft-cli-client" command fails with a permissions issue, even as root user. Many thanks to @berndverhofstadt for reporting this issue: DietPi-Software | Mycroft AI: mycroft-cli-client fails as root on Bullseye #5100
  • DietPi-Software | Nukkit: Resolved an issue where the install failed due to a changed download URL. The Jenkins instance has moved to ci.opencollab.dev, where also the Geyser and Floodgate projects are hosted.
  • DietPi-Software | FuguHub: Resolved an issue where the uninstall failed as the process was not stopped as intended. Many thanks to @kd9352 for reporting this issue: Concurrent execution of DietPi-Software detected #5058
  • DietPi-Software | myMPD: Resolved an issue where the installation failed due to an updated dependency. Many thanks to @supersexy for reporting this issue: Error installing myMPD #5115
  • DietPi-Software | Python 3: Worked around an issue where the pip reinstall failed. Many thanks to @hueppinr for reporting this issue: Dietpi-software | Python3 - reinstall failed due to conflict between Setuptools and Distutils #5117
  • DietPi-Software | Unbound: Resolved an issue where the "unbound-resolvconf" service applied localhost automatically as local nameserver, if the "resolvconf" package was installed. Since often Unbound is installed in combination with Pi-hole or AdGuard Home, and those are usually used by network clients only, not the server itself, "unbound-resolvconf" is disabled now on Unbound installs. If Unbound is wanted as local resolver as well, it should be explicitly configured, e.g. via dietpi-config network options. Many thanks to @Ianszh for reporting this issue: DietPi-Software | Unbound: Disable unbound-resolvconf.service #5133

+ DietPi-PREP | Spelling
- DietPi-Software | Docker: Resolved an issue where the install was aborted due to an incorrect check for missing kernel modules. Many thanks to @dragonandy for reporting this issue: #5061
+ DietPi-Backup | Mute visual-only error message when restoring a backup and it was not selected as one of multiple kept backup instances
+ DietPi-Software | FuguHub: Code simplifications
+ DietPi-Patches | Reinstall DietPi-Dashboard after migrating the port, since versions prior to v0.3.2 didn't respect the config file: #5063
+ DietPi-Update | Rename old DietPi version branch, as a leaving "v" is removed from the archive and included parent directory name by GitHub, so that branch name and archive/parent directory name do not match anymore.
+ DietPi-Patches | Syntax
+ DietPi-Patches | Remove legacy Jessie migration and pre-v6.14 patches. Also wrap a lot more commands into G_EXEC error handling for transparency and debug reasons. Some minor coding and spelling changes have been applied as well.
+ DietPi-Software | Satisfy shellcheck
+ DietPi-Software | Fix reversed file server ID when applying AUTO_SETUP_FILE_SERVER_INDEX from dietpi.txt. Many thanks to @bsheeres for reporting this issue: #5081
- DietPi-Software | Resolved an issue where on first boot, choice and preference menu selections triggered an error as the install state file did not exist yet. Many thanks to @bsheeres for reporting this issue: #5080
+ CHANGELOG | Remove all entries below v6.15, the earliest version to which since v8.0 an update is possible. Also align the latest remaining entries a bit in format.
+ DietPi-PREP | Pre-create install state file until v8.0 release
+ DietPi-PREP | Make post PREP info prints more useful
+ DietPi-Build | Add support for building foreign/incompatible architecture images and assure that all required filesystem utilities are installed
+ DietPi-Build | Add support to build VM applicances directly
+ DietPi-Imager | Syntax
+ DietPi-Build | Syntax
+ DietPi-Build | Little fix
+ DietPi-Build | VirtualBox OVA format does not allow TAR compression but has the VMDK itself compressed instead
- DietPi-Software | Pi-hole: Resolved an issue where the teleporter import log was not shown but denied by the X-Frame-Options header: https://discourse.pi-hole.net/t/unable-to-restore-teleporter-backup-fresh-install-no-funky-changes-made/51573
- DietPi-Software | Pi-hole: Remove obsolete Access-Control-Allow-Origin header and allow local IPv6 requests to the blocking/404 page.
+ DietPi-Software | Pi-hole: Fix/harden Nginx teleporter X-Frame-Origins header
+ DietPi-Builld | Little format change to enhacne readability of the VM block
+ DietPi-Config | Limit minimum idle frequency to 300 MHz as values below cause several stability issue, e.g. slowdown/hang of the system clock
+ DietPi-Software | Pi-hole: Pro-actively add API QR code X-Frame-Options header
+ DietPi-PREP | Fix kernel package print at the end of the script
+ DietPi-Software | Download_Install(): Skip dedicated URL check when download is done in foreground. curl itself is error-handled and provides sufficient error messages.
+ Raspberry Pi | Avoid comment lines > 100 columns, else havoc can happen: raspberrypi/firmware#1669
+ DietPi-Software | Remove all Debian Stretch exclusive code, workarounds, mentions etc.
+ DietPi-Globals | Remove Stretch workaround for systemctl from G_EXEC and consequently use "tput" to obtain terminal dimensions: It does not required any of STDOUT, STDERR or STDOUT since Buster, hence works more reliable than "stty", which requires STDIN, which breaks using G_EXEC in loops through e.g. "< <(command)".
+ DietPi-PREP | Raise minimum pre-image Debian version from Stretch to Buster
+ DietPi-VPN/WiFi_Monitor | Remove obsolete After=dietpi-boot.service from systemd unit
+ DietPi-Imager | Remove now obsolete /dev/tty input override. G_WHIP now uses tput to obtain terminal dimensions which does not require STDIN.
+ DietPi-Software | Use LogsDirectory consequently in systemd units, assured to be available with min Debian Buster, instead of pre-creating logging directories. This assures those being created before the process is started and has correct permissions, hence even works when the directory got removed or lost (e.g. dietpi-ramlog.service failure) for some reason.
+ DietPi-Software | Roon Bridge: Move systemd unit back into dietpi-software: This allows faster search and alignment of systemd units and assures the content always matches the DietPi version. Otherwise old DietPi versions may download an incompatible systemd unit, e.g. Stretch systems the one with invalid LogsDirectory.
+ DietPi-Software | Nukkit: Fix install due to changed repository and download URLs
+ DietPi-Software | MineOS: Fix install on Bullseye by removing "python" from APT dependencies. It is not required for the Node.js based web interface and rdiff-backup pulls it as dependency automatically on Buster, but "python3" on Bullseye and above.
+ DietPi-Software | Mitigate Log4Shell in Airsonic and Blynk Server: https://www.infiniroot.com/blog/?p=1155
+ General | Remove further Stretch specific code and methods from DietPi scripts
+ DietPi-LetsEncrypt | Minio: Use the native Certbot renewal hook system to update Minio cert/key only when a successful renewal happened, instead of on every certbot.service execution. Remove the obsolete pre-v8.0 method and do the same for Lighttpd.
+ DietPi-LetsEncrypt | Assure that future Certbot service executions have the obsolete renewal drop-ins unloaded after migration
+ DietPi-Globals | Use "autopurge" shortcut, availlable since Buster
+ DietPi-Imager | Sync and sleep also when resetting the journal of non-root ext4 filesystems
+ DietPi-Software | Typo
- CHANGELOG | Add v8.0 release PR URL
- DietPi-PREP | Remove obsolete temporary fix
- DietPi-FirstBoot | Assure that script always exists with positive exit code
- DietPi-LetsEncrypt | Fix Minio certs directory
@Joulinar
Copy link
Collaborator

Joulinar commented Jan 7, 2022

@MichaIng
we definitely need to keep the workaround for pip3 setuptools. Otherwise pip/pip3 will be brocken completely on reinstall.

Python3 reinstall with workaround

Install log attached. Click to expand!
root@DietPi4:~# dietpi-software reinstall 130
[  OK  ] DietPi-Software | Initialised database
[  OK  ] DietPi-Software | Reading database

 DietPi-Software
─────────────────────────────────────────────────────
 Mode: Automated reinstall

[  OK  ] DietPi-Software | Reinstalling Python 3: Runtime system, pip package installer and development headers
[  OK  ] DietPi-Software | DietPi-Userdata validation: /mnt/dietpi_userdata

 DietPi-Software
─────────────────────────────────────────────────────
 Step: Checking for conflicts and missing inputs


 DietPi-Software
─────────────────────────────────────────────────────
 Step: Checking for prerequisite software

[  OK  ] DietPi-Software | Checking network connectivity
[  OK  ] DietPi-Software | Checking DNS resolver
[  OK  ] Network time sync | Completed
[ SUB1 ] DietPi-Services > unmask
[  OK  ] DietPi-Services | unmask : cron
[ SUB1 ] DietPi-Services > stop
[  OK  ] DietPi-Services | stop : cron
[ INFO ] DietPi-Software | APT update, please wait...
Hit:1 https://deb.debian.org/debian bullseye InRelease
Hit:2 https://deb.debian.org/debian bullseye-updates InRelease
Hit:3 https://deb.debian.org/debian-security bullseye-security InRelease
Hit:4 https://deb.debian.org/debian bullseye-backports InRelease
Hit:5 https://archive.raspberrypi.org/debian bullseye InRelease
Reading package lists...
[  OK  ] DietPi-Software | APT update
[  OK  ] DietPi-Software | mkdir -p /mnt/dietpi_userdata/Music /mnt/dietpi_userdata/Pictures /mnt/dietpi_userdata/Video /mnt/dietpi_userdata/downloads /var/www /opt /usr/local/bin
[  OK  ] DietPi-Software | chown dietpi:dietpi /mnt/dietpi_userdata/Music /mnt/dietpi_userdata/Pictures /mnt/dietpi_userdata/Video /mnt/dietpi_userdata/downloads
[  OK  ] DietPi-Software | chmod 0775 /mnt/dietpi_userdata/Music /mnt/dietpi_userdata/Pictures /mnt/dietpi_userdata/Video /mnt/dietpi_userdata/downloads

 DietPi-Software
─────────────────────────────────────────────────────
 Step: Installing Python 3: Runtime system, pip package installer and development headers

[  OK  ] DietPi-Software | pip3 uninstall -y setuptools
[  OK  ] DietPi-Software | cd /tmp/DietPi-Software
[  OK  ] DietPi-Software | Checking URL: https://bootstrap.pypa.io/pip/get-pip.py
[ INFO ] DietPi-Software | G_THREAD_START_0 | curl -sSfL https://bootstrap.pypa.io/pip/get-pip.py -o get-pip.py
[ INFO ] DietPi-Software | APT install for: python3-dev, please wait...
[  OK  ] DietPi-Software | APT install for: python3-dev
[  OK  ] DietPi-Software | G_THREAD: All threads finished
[ INFO ] DietPi-Software | python3 ./get-pip.py, please wait...
Collecting pip
  Using cached pip-21.3.1-py3-none-any.whl (1.7 MB)
Collecting setuptools
  Using cached setuptools-60.3.1-py3-none-any.whl (953 kB)
Installing collected packages: setuptools, pip
  Attempting uninstall: pip
    Found existing installation: pip 21.3.1
    Uninstalling pip-21.3.1:
      Successfully uninstalled pip-21.3.1
Successfully installed pip-21.3.1 setuptools-60.3.1
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
[  OK  ] DietPi-Software | python3 ./get-pip.py
[  OK  ] DietPi-Software | rm get-pip.py

 DietPi-Software
─────────────────────────────────────────────────────
 Step: Finalising install

[  OK  ] DietPi-Software | systemctl daemon-reload
2022-01-08 00:26:38 [ INFO ] DietPi-RAMlog | Storing /var/log to /var/tmp/dietpi/logs/dietpi-ramlog_store...
2022-01-08 00:26:38 [  OK  ] DietPi-RAMlog | Stored /var/log to /var/tmp/dietpi/logs/dietpi-ramlog_store.
[ SUB1 ] DietPi-Services > dietpi_controlled
[  OK  ] DietPi-Services | dietpi_controlled : cron

 DietPi-Software
─────────────────────────────────────────────────────
 Step: Install completed

[  OK  ] DietPi-Survey | Purging survey data
[ SUB1 ] DietPi-Services > restart
[  OK  ] DietPi-Services | restart : cron
root@DietPi4:~#

pip/pip3 are working fine.

Python3 reinstall without workaround

Install log attached. Click to expand!
root@DietPi4:~# dietpi-software reinstall 130
[  OK  ] DietPi-Software | Initialised database
[  OK  ] DietPi-Software | Reading database

 DietPi-Software
─────────────────────────────────────────────────────
 Mode: Automated reinstall

[  OK  ] DietPi-Software | Reinstalling Python 3: Runtime system, pip package installer and development headers
[  OK  ] DietPi-Software | DietPi-Userdata validation: /mnt/dietpi_userdata

 DietPi-Software
─────────────────────────────────────────────────────
 Step: Checking for conflicts and missing inputs


 DietPi-Software
─────────────────────────────────────────────────────
 Step: Checking for prerequisite software

[  OK  ] DietPi-Software | Checking network connectivity
[  OK  ] DietPi-Software | Checking DNS resolver
[  OK  ] Network time sync | Completed
[ SUB1 ] DietPi-Services > unmask
[  OK  ] DietPi-Services | unmask : cron
[ SUB1 ] DietPi-Services > stop
[  OK  ] DietPi-Services | stop : cron
[ INFO ] DietPi-Software | APT update, please wait...
Hit:1 https://deb.debian.org/debian bullseye InRelease
Hit:2 https://deb.debian.org/debian bullseye-updates InRelease
Hit:3 https://archive.raspberrypi.org/debian bullseye InRelease
Hit:4 https://deb.debian.org/debian-security bullseye-security InRelease
Hit:5 https://deb.debian.org/debian bullseye-backports InRelease
Reading package lists...
[  OK  ] DietPi-Software | APT update
[  OK  ] DietPi-Software | mkdir -p /mnt/dietpi_userdata/Music /mnt/dietpi_userdata/Pictures /mnt/dietpi_userdata/Video /mnt/dietpi_userdata/downloads /var/www /opt /usr/local/bin
[  OK  ] DietPi-Software | chown dietpi:dietpi /mnt/dietpi_userdata/Music /mnt/dietpi_userdata/Pictures /mnt/dietpi_userdata/Video /mnt/dietpi_userdata/downloads
[  OK  ] DietPi-Software | chmod 0775 /mnt/dietpi_userdata/Music /mnt/dietpi_userdata/Pictures /mnt/dietpi_userdata/Video /mnt/dietpi_userdata/downloads

 DietPi-Software
─────────────────────────────────────────────────────
 Step: Installing Python 3: Runtime system, pip package installer and development headers

[  OK  ] DietPi-Software | cd /tmp/DietPi-Software
[  OK  ] DietPi-Software | Checking URL: https://bootstrap.pypa.io/pip/get-pip.py
[ INFO ] DietPi-Software | G_THREAD_START_0 | curl -sSfL https://bootstrap.pypa.io/pip/get-pip.py -o get-pip.py
[ INFO ] DietPi-Software | APT install for: python3-dev, please wait...
[  OK  ] DietPi-Software | APT install for: python3-dev
[  OK  ] DietPi-Software | G_THREAD: All threads finished
[ INFO ] DietPi-Software | python3 ./get-pip.py, please wait...
/usr/local/lib/python3.9/dist-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
  warnings.warn(
Collecting pip
  Using cached pip-21.3.1-py3-none-any.whl (1.7 MB)
Installing collected packages: pip
  Attempting uninstall: pip
    Found existing installation: pip 21.3.1
    Uninstalling pip-21.3.1:
      Successfully uninstalled pip-21.3.1
/usr/local/lib/python3.9/dist-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
  warnings.warn(
/usr/local/lib/python3.9/dist-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
  warnings.warn(
Successfully installed pip-21.3.1
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
[  OK  ] DietPi-Software | python3 ./get-pip.py
[  OK  ] DietPi-Software | rm get-pip.py

 DietPi-Software
─────────────────────────────────────────────────────
 Step: Finalising install

[  OK  ] DietPi-Software | systemctl daemon-reload
2022-01-08 00:27:59 [ INFO ] DietPi-RAMlog | Storing /var/log to /var/tmp/dietpi/logs/dietpi-ramlog_store...
2022-01-08 00:27:59 [  OK  ] DietPi-RAMlog | Stored /var/log to /var/tmp/dietpi/logs/dietpi-ramlog_store.
[ SUB1 ] DietPi-Services > dietpi_controlled
[  OK  ] DietPi-Services | dietpi_controlled : cron

 DietPi-Software
─────────────────────────────────────────────────────
 Step: Install completed

[  OK  ] DietPi-Survey | Purging survey data
[ SUB1 ] DietPi-Services > restart
[  OK  ] DietPi-Services | restart : cron
root@DietPi4:~#

And this is how pip/pip3 looks like afterwards

root@DietPi4:~# pip3
-bash: /usr/local/bin/pip3: No such file or directory
root@DietPi4:~# pip
-bash: /usr/local/bin/pip: No such file or directory
root@DietPi4:~#

as well I have seen

root@DietPi1:~# pip3
Traceback (most recent call last):
  File "/usr/bin/pip3", line 5, in <module>
    from pip._internal.cli.main import main
ModuleNotFoundError: No module named 'pip'
root@DietPi1:~# pip
Traceback (most recent call last):
  File "/usr/bin/pip", line 5, in <module>
    from pip._internal.cli.main import main
ModuleNotFoundError: No module named 'pip'
root@DietPi1:~#

Not sure what pypa.io guys did with setuptools

Python3 uninstall is failing as well now

Uninstall log attached. Click to expand!
root@DietPi4:~# dietpi-software uninstall 130
[  OK  ] DietPi-Software | Initialised database
[  OK  ] DietPi-Software | Reading database

 DietPi-Software
─────────────────────────────────────────────────────
 Mode: Automated uninstall

[  OK  ] DietPi-Software | Uninstalling Python 3: Runtime system, pip package installer and development headers

 DietPi-Software
─────────────────────────────────────────────────────
 Step: Uninstalling Python 3: Runtime system, pip package installer and development headers

[ INFO ] DietPi-Software | pip3 uninstall -y pip setuptools wheel, please wait...
Traceback (most recent call last):
  File "/usr/bin/pip3", line 5, in <module>
    from pip._internal.cli.main import main
ModuleNotFoundError: No module named 'pip'
[FAILED] DietPi-Software | pip3 uninstall -y pip setuptools wheel

@MichaIng
Copy link
Owner Author

MichaIng commented Jan 7, 2022

Ayayay, luckily I did not recognise that v60.3.x has been released 😄. Okay, really not a big problem to keep this simple and quick workaround in place and give the setuptools devs some more time to have it properly fixed. Has this already been reported?

@Joulinar
Copy link
Collaborator

Joulinar commented Jan 7, 2022

I did not checked back. I just stumble across while checking an issue from forum and Python3 brock during reinstall. I hope nobody will do a reinstall on a version below DietPi v8. 🙄

@MichaIng
Copy link
Owner Author

MichaIng commented Jan 8, 2022

Good that we release tomorrow 🙈.

@Joulinar
Copy link
Collaborator

Joulinar commented Jan 8, 2022

and we have a hardcore workaround for users who already broke Python

rm -rf /usr/local/lib/python3.9/dist-packages/setuptools*

- DietPi-LetsEncrypt | Pre-create MinIO certs directory with correct permissions. It is actually created by the service, but lets be failsafe.
@MichaIng
Copy link
Owner Author

MichaIng commented Jan 8, 2022

Ah nice, simple when this is all (manual setuptools "uninstall").

@Joulinar
Copy link
Collaborator

Joulinar commented Jan 8, 2022

yes, only chance to get it back working because pip3 uninstall -y setuptools is failing as well with same error and there is no other way to get setuptools removed. Let's hope that we will not have to much issues on older versions.

@MichaIng
Copy link
Owner Author

MichaIng commented Jan 8, 2022

We do not install an older version, but only uninstall it before running get-pip.py. Upgrading setuptools outside of get-pip.py seems to not cause issues 🙂.

@Joulinar
Copy link
Collaborator

Joulinar commented Jan 8, 2022

ah I was not clear enough. I mean older DietPi versions below v8. As there we do not remove setuptools leading to actual issue😉

@MichaIng
Copy link
Owner Author

MichaIng commented Jan 8, 2022

Ah yes, that is true. Good that we have a simple repair step, and another argument to keep DietPi updated.

- DietPi-WiFiDB | Refactoring and spelling
- DietPi-FirstBoot | Remove ineffective autologin defer after network, since this is implied already. The reason for the network check timeouts is in case when DHCP times out after 10 seconds, in which case the network-online.target is reached even that no IP address has been leased.
- DietPi-PREP | Do not reduce DHCP timeout (from 60) seconds) to 10 seconds, which can be too low in some cases, leading to autologin and connections checks before the network has been brought up, when automatated first run setup has been enabled.
- DietPi-WiFiDB | When bringing up the WiFi adapter for SSID scanning, use "ip" instead of "ifup" to skip WPA and DHCP setup. Only the raw adapter state needs to be up for scanning and "ifup" takes until DHCP times out when no SSID has been configured yet.
- CHANGELOG | Network: For new images, the default DHCP timeout is not reduced to 10 seconds anymore. This could have been too short, in which case network targets of the boot sequence are reached before an IP has been actually assigned. Especially in case of AUTO_SETUP_AUTOMATED=1 this could have lead to connection test timeouts and hence abortion of the automated first run setup. Many thanks to @jpeg2600 for reporting such a case: #5143
- CHANGELOG | DietPi-Config: When configuring a first WiFi slot via scanning for SSIDs, the WiFi adapter is now not brought up via "ifup" but "ip l dev wlanX up". This way no DHCP and WPA client starts are triggered, which are doomed to fail when the WiFi adapter is not connected to any access point yet. Especially in case of the default 60 seconds DHCP timeout, this would otherwise cause an unnecessary long delay.
- RC up
- DietPi-Software | Mosquitto: Applied a workaround on ARMv6 where the latest Mosquitto packages from the official APT repository are not ARMv6-compatible. Many thanks to @thomasmockridge for reporting this issue: #5140
- DietPi-Software | Bumped all fallback URLs and the Single File PHP Gallery version
@MichaIng MichaIng merged commit 1eae2f7 into master Jan 8, 2022
@MichaIng
Copy link
Owner Author

MichaIng commented Jan 9, 2022

There have been two further releases of setuptools in the meantime, now being v60.5.0. Probably this has solved the issue.

@Joulinar
Copy link
Collaborator

Will do some testing this week on this.

@Joulinar
Copy link
Collaborator

Joulinar commented Jan 10, 2022

installation seems to be brocken still

 DietPi-Software
─────────────────────────────────────────────────────
 Step: Installing Python 3: Runtime system, pip package installer and development headers

[  OK  ] DietPi-Software | cd /tmp/DietPi-Software
[  OK  ] DietPi-Software | Checking URL: https://bootstrap.pypa.io/pip/get-pip.py
[ INFO ] DietPi-Software | G_THREAD_START_0 | curl -sSfL https://bootstrap.pypa.io/pip/get-pip.py -o get-pip.py
[ INFO ] DietPi-Software | APT install for: python3-dev, please wait...
[  OK  ] DietPi-Software | APT install for: python3-dev
[  OK  ] DietPi-Software | G_THREAD: All threads finished
[ INFO ] DietPi-Software | python3 ./get-pip.py, please wait...
/usr/local/lib/python3.9/dist-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
  warnings.warn(
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple/
Collecting pip
  Using cached https://www.piwheels.org/simple/pip/pip-21.3.1-py3-none-any.whl (1.7 MB)
Installing collected packages: pip
  Attempting uninstall: pip
    Found existing installation: pip 21.3.1
    Uninstalling pip-21.3.1:
      Successfully uninstalled pip-21.3.1
/usr/local/lib/python3.9/dist-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
  warnings.warn(
/usr/local/lib/python3.9/dist-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
  warnings.warn(
Successfully installed pip-21.3.1
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
[  OK  ] DietPi-Software | python3 ./get-pip.py
[  OK  ] DietPi-Software | rm get-pip.py

pip/pip3 not working afterwards

root@DietPi1:~# pip
Traceback (most recent call last):
  File "/usr/bin/pip", line 5, in <module>
    from pip._internal.cli.main import main
ModuleNotFoundError: No module named 'pip'
root@DietPi1:~# pip3
Traceback (most recent call last):
  File "/usr/bin/pip3", line 5, in <module>
    from pip._internal.cli.main import main
ModuleNotFoundError: No module named 'pip'
root@DietPi1:~#

@MichaIng
Copy link
Owner Author

Reported: pypa/pip#10742 (comment)

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 v8.0 | Please help testing and hardening the upcoming release
6 participants