alexreinert/piVCCU

pivccu nach dist-upgrade deinstalliert, "broken package" pivccu-modules-dkms

Tutmanichtun opened this issue · 6 comments

MoinMoin,

gestern zeigte mir die WebUI meiner pivccu-Instanz ein mögliches Update von 2.59.7 auf 2.61.7 an, was ich heute installieren wollte.
Auf dem darunterliegenden Raspberry Pi 3B+ (Raspbian Buster) habe ich also folgende Befehle abgesetzt:
sudo apt update
sudo apt upgrade
Dabei kam die Meldung, das ich dist-upgrade musten müsste, um pivccu zu aktualisieren. Also:
sudo apt dist-upgrade
mich hat schon stutzig gemacht, das hier folgende Ausgabe zurückkam:

The following packages will be REMOVED:
  pivccu
The following packages will be upgraded:
  pivccu-modules-dkms

Aber ich dachte mir, das System wird schon wissen, was es tut. Lässt sich ja wieder installieren, und ich habe ja ein Backup.
Also weiter mit:
sudo apt autoremove
sudo reboot
sudo pivccu-info
Und dann der Schock: sudo: pivccu-info: command not found. Na gut:
sudo apt install pivccu
Als Ausgabe bekam ich:

Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 pivccu : Depends: pivccu-modules-dkms (>= 1.0.10) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

Hm, also ein veraltetes pivccu-modules-dkms? Aber das wurde doch beim dist-upgrade aktualisert?
sudo apt search pivccu-modules-dkms
lieferte:

Sorting... Done
Full Text Search... Done
pivccu-modules-dkms/stable,now 1.0.70 all [installed]
  DKMS package for kernel modules needed for Homematic

Jetzt bin ich irritiert: 1.0.70 ist doch >= 1.0.10?
Der aktuell verwendete Linux-Kernel ist die 5.10.63-v7+. Irgendwelche konstruktiven Vorschläge? Am liebsten, bevor meine Freundin den Ausfall bemerkt und wieder verächtlich von einem "60 IQ-Home" spricht. ;)

sudo apt install pivccu-modules-dkms=1.0.69
sudo apt install pivccu

Leider nein:

pi@Flur-Pi:~ $ sudo apt install pivccu-modules-dkms=1.0.69
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be DOWNGRADED:
  pivccu-modules-dkms
0 upgraded, 0 newly installed, 1 downgraded, 0 to remove and 0 not upgraded.
Need to get 41.3 kB of archives.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 https://www.pivccu.de/piVCCU stable/main armhf pivccu-modules-dkms all 1.0.69 [41.3 kB]
Fetched 41.3 kB in 1s (58.3 kB/s)
Preconfiguring packages ...
dpkg: warning: downgrading pivccu-modules-dkms from 1.0.70 to 1.0.69
(Reading database ... 96325 files and directories currently installed.)
Preparing to unpack .../pivccu-modules-dkms_1.0.69_all.deb ...
Removed /etc/systemd/system/multi-user.target.wants/pivccu-dkms.service.
Removed /etc/systemd/system/pivccu.service.requires/pivccu-dkms.service.
Removed /etc/systemd/system/debmatic.service.wants/pivccu-dkms.service.

-------- Uninstall Beginning --------
Module:  pivccu
Version: 1.0.70
Kernel:  5.10.63-v7+ (armv7l)
-------------------------------------

Status: Before uninstall, this module version was ACTIVE on this kernel.

dummy_rx8130.ko:
 - Uninstallation
   - Deleting from: /lib/modules/5.10.63-v7+/kernel/drivers/pivccu/
rmdir: failed to remove 'kernel/drivers/pivccu': Directory not empty
 - Original module
   - No original module was found for this module on this kernel.
   - Use the dkms install command to reinstall any previous module version.


dw_apb_raw_uart.ko:
 - Uninstallation
   - Deleting from: /lib/modules/5.10.63-v7+/kernel/drivers/pivccu/
rmdir: failed to remove 'kernel/drivers/pivccu': Directory not empty
 - Original module
   - No original module was found for this module on this kernel.
   - Use the dkms install command to reinstall any previous module version.


eq3_char_loop.ko:
 - Uninstallation
   - Deleting from: /lib/modules/5.10.63-v7+/kernel/drivers/pivccu/
rmdir: failed to remove 'kernel/drivers/pivccu': Directory not empty
 - Original module
   - No original module was found for this module on this kernel.
   - Use the dkms install command to reinstall any previous module version.


fake_hmrf.ko:
 - Uninstallation
   - Deleting from: /lib/modules/5.10.63-v7+/kernel/drivers/pivccu/
rmdir: failed to remove 'kernel/drivers/pivccu': Directory not empty
 - Original module
   - No original module was found for this module on this kernel.
   - Use the dkms install command to reinstall any previous module version.


generic_raw_uart.ko:
 - Uninstallation
   - Deleting from: /lib/modules/5.10.63-v7+/kernel/drivers/pivccu/
rmdir: failed to remove 'kernel/drivers/pivccu': Directory not empty
 - Original module
   - No original module was found for this module on this kernel.
   - Use the dkms install command to reinstall any previous module version.


hb_rf_eth.ko:
 - Uninstallation
   - Deleting from: /lib/modules/5.10.63-v7+/kernel/drivers/pivccu/
rmdir: failed to remove 'kernel/drivers/pivccu': Directory not empty
 - Original module
   - No original module was found for this module on this kernel.
   - Use the dkms install command to reinstall any previous module version.


hb_rf_usb-2.ko:
 - Uninstallation
   - Deleting from: /lib/modules/5.10.63-v7+/kernel/drivers/pivccu/
rmdir: failed to remove 'kernel/drivers/pivccu': Directory not empty
 - Original module
   - No original module was found for this module on this kernel.
   - Use the dkms install command to reinstall any previous module version.


hb_rf_usb.ko:
 - Uninstallation
   - Deleting from: /lib/modules/5.10.63-v7+/kernel/drivers/pivccu/
rmdir: failed to remove 'kernel/drivers/pivccu': Directory not empty
 - Original module
   - No original module was found for this module on this kernel.
   - Use the dkms install command to reinstall any previous module version.


led_trigger_timer.ko:
 - Uninstallation
   - Deleting from: /lib/modules/5.10.63-v7+/kernel/drivers/pivccu/
rmdir: failed to remove 'kernel/drivers/pivccu': Directory not empty
 - Original module
   - No original module was found for this module on this kernel.
   - Use the dkms install command to reinstall any previous module version.


meson_raw_uart.ko:
 - Uninstallation
   - Deleting from: /lib/modules/5.10.63-v7+/kernel/drivers/pivccu/
rmdir: failed to remove 'kernel/drivers/pivccu': Directory not empty
 - Original module
   - No original module was found for this module on this kernel.
   - Use the dkms install command to reinstall any previous module version.


pl011_raw_uart.ko:
 - Uninstallation
   - Deleting from: /lib/modules/5.10.63-v7+/kernel/drivers/pivccu/
rmdir: failed to remove 'kernel/drivers/pivccu': Directory not empty
 - Original module
   - No original module was found for this module on this kernel.
   - Use the dkms install command to reinstall any previous module version.


plat_eq3ccu2.ko:
 - Uninstallation
   - Deleting from: /lib/modules/5.10.63-v7+/kernel/drivers/pivccu/
rmdir: failed to remove 'kernel/drivers/pivccu': Directory not empty
 - Original module
   - No original module was found for this module on this kernel.
   - Use the dkms install command to reinstall any previous module version.


rpi_rf_mod_led.ko:
 - Uninstallation
   - Deleting from: /lib/modules/5.10.63-v7+/kernel/drivers/pivccu/
rmdir: failed to remove 'kernel/drivers/pivccu': Directory not empty
 - Original module
   - No original module was found for this module on this kernel.
   - Use the dkms install command to reinstall any previous module version.


rtc-rx8130.ko:
 - Uninstallation
   - Deleting from: /lib/modules/5.10.63-v7+/kernel/drivers/pivccu/
rmdir: failed to remove directory 'kernel/drivers': Directory not empty
 - Original module
   - No original module was found for this module on this kernel.
   - Use the dkms install command to reinstall any previous module version.

depmod.....

DKMS: uninstall completed.

------------------------------
Deleting module version: 1.0.70
completely from the DKMS tree.
------------------------------
Done.
Unpacking pivccu-modules-dkms (1.0.69) over (1.0.70) ...
Setting up pivccu-modules-dkms (1.0.69) ...
Error! There are no instances of module: pivccu
1.0.69 located in the DKMS tree.

Creating symlink /var/lib/dkms/pivccu/1.0.69/source ->
                 /usr/src/pivccu-1.0.69

DKMS: add completed.

Kernel preparation unnecessary for this kernel.  Skipping...

Building module:
cleaning build area....
make -j4 KERNELRELEASE=5.10.63-v7+ ARCH=arm all.........
cleaning build area...

DKMS: build completed.

dummy_rx8130.ko:
Running module version sanity check.
 - Original module
   - No original module exists within this kernel
 - Installation
   - Installing to /lib/modules/5.10.63-v7+/kernel/drivers/pivccu/

dw_apb_raw_uart.ko:
Running module version sanity check.
 - Original module
   - No original module exists within this kernel
 - Installation
   - Installing to /lib/modules/5.10.63-v7+/kernel/drivers/pivccu/

eq3_char_loop.ko:
Running module version sanity check.
 - Original module
   - No original module exists within this kernel
 - Installation
   - Installing to /lib/modules/5.10.63-v7+/kernel/drivers/pivccu/

fake_hmrf.ko:
Running module version sanity check.
 - Original module
   - No original module exists within this kernel
 - Installation
   - Installing to /lib/modules/5.10.63-v7+/kernel/drivers/pivccu/

generic_raw_uart.ko:
Running module version sanity check.
 - Original module
   - No original module exists within this kernel
 - Installation
   - Installing to /lib/modules/5.10.63-v7+/kernel/drivers/pivccu/

hb_rf_eth.ko:
Running module version sanity check.
 - Original module
   - No original module exists within this kernel
 - Installation
   - Installing to /lib/modules/5.10.63-v7+/kernel/drivers/pivccu/

hb_rf_usb-2.ko:
Running module version sanity check.
 - Original module
   - No original module exists within this kernel
 - Installation
   - Installing to /lib/modules/5.10.63-v7+/kernel/drivers/pivccu/

hb_rf_usb.ko:
Running module version sanity check.
 - Original module
   - No original module exists within this kernel
 - Installation
   - Installing to /lib/modules/5.10.63-v7+/kernel/drivers/pivccu/

led_trigger_timer.ko:
Running module version sanity check.
 - Original module
   - No original module exists within this kernel
 - Installation
   - Installing to /lib/modules/5.10.63-v7+/kernel/drivers/pivccu/

meson_raw_uart.ko:
Running module version sanity check.
 - Original module
   - No original module exists within this kernel
 - Installation
   - Installing to /lib/modules/5.10.63-v7+/kernel/drivers/pivccu/

pl011_raw_uart.ko:
Running module version sanity check.
 - Original module
   - No original module exists within this kernel
 - Installation
   - Installing to /lib/modules/5.10.63-v7+/kernel/drivers/pivccu/

plat_eq3ccu2.ko:
Running module version sanity check.
 - Original module
   - No original module exists within this kernel
 - Installation
   - Installing to /lib/modules/5.10.63-v7+/kernel/drivers/pivccu/

rpi_rf_mod_led.ko:
Running module version sanity check.
 - Original module
   - No original module exists within this kernel
 - Installation
   - Installing to /lib/modules/5.10.63-v7+/kernel/drivers/pivccu/

rtc-rx8130.ko:
Running module version sanity check.
 - Original module
   - No original module exists within this kernel
 - Installation
   - Installing to /lib/modules/5.10.63-v7+/kernel/drivers/pivccu/

depmod...

DKMS: install completed.
Created symlink /etc/systemd/system/multi-user.target.wants/pivccu-dkms.service → /lib/systemd/system/pivccu-dkms.service.
Created symlink /etc/systemd/system/debmatic.service.wants/pivccu-dkms.service → /lib/systemd/system/pivccu-dkms.service.
Created symlink /etc/systemd/system/pivccu.service.requires/pivccu-dkms.service → /lib/systemd/system/pivccu-dkms.service.
pi@Flur-Pi:~ $ sudo apt install pivccu
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 pivccu : Depends: pivccu-modules-dkms (>= 1.0.10) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

Ich bin das Problem wie folgt umgangen:
Paket mit apt download pivccu runterladen. Dann dpkg-dep -R pivccu.deb tmp/. In tmp/DEBIAN/control die Zeile mit Conflicts entfernen. Paket neu packen: dpkg-deb -b tmp pivccu-custom.deb und installieren dpkg -i pivccu-custom.deb. Dann ist das Modul pivccu-modules-dkms auch nicht in einer bestimmten Version nötig. Ja, das ist ein Hack, aber piVCCU läuft dann wenigstens wieder. :)
Quelle: https://unix.stackexchange.com/a/319838

Yay, der Ansatz funktioniert! Auch wenn ich eine Nummer tiefer gehen musste:
apt download pivccu
sudo dpkg-deb -R pivccu_2.61.7-67_all.deb tmp/
sudo nano tmp/DEBIAN/control
Die beiden Zeilen Depends: pivccu-modules-dkms (>= 1.0.10) und Conflicts: pivccu-modules-dkms (>= 2.0.0) löschen. (Ob es nötig ist, habe ich jetzt nicht mehr ausprobiert, denn nach
sudo dpkg-deb -b tmp pivccu_2.61.7-67_custom.deb
bekam ich bei der Installation:

pi@Flur-Pi:~ $ sudo dpkg -i pivccu_2.61.7-67_custom.deb
dpkg: regarding pivccu_2.61.7-67_custom.deb containing pivccu:
 pivccu-modules-dkms conflicts with pivccu
  pivccu (version 2.61.7-67) is to be installed.

dpkg: error processing archive pivccu_2.61.7-67_custom.deb (--install):
 conflicting packages - not installing pivccu
Errors were encountered while processing:
 pivccu_2.61.7-67_custom.deb

Also, Ring frei für Runde 2:
apt download pivccu-modules-dkms
sudo dpkg-deb -R pivccu-modules-dkms_1.0.70_all.deb tmp2/
sudo nano tmp2/DEBIAN/control
Diese Zeile entfernen: Conflicts: pivccu
sudo dpkg-deb -b tmp2 pivccu-modules-dkms_1.0.70_custom.deb
sudo dpkg -i pivccu-modules-dkms_1.0.70_custom.deb (die vorige Installation über apt wird automatisch deinstalliert)
sudo dpkg -i pivccu_2.61.7-67_custom.deb
Tadaa! pivccu läuft wieder, und sogar in der alten Instanz. Backups sind überflüssig. ;) Danke für den Tipp. :)
Ich frage mich nur, warum zwei Pakete, die sind bedingen, als Konflikte eingetragen sind?
Hinweis: meiner Freundin ist es gestern doch aufgefallen, das da was nicht stimmt. Und nicht erst, als ich Abends die Sicherung geschmissen habe, damit das Licht aus geht. ;)

Die Version 1.0.70 von pivccu-modules-dkms ist nicht voll mit piVCCU2 kompatibel, deswegen ist da auch der Conflicts Eintrag drin.
Ich habe alles mögliche ausprobiert, aber ich bekomme das Problem nicht nachgestellt, ein Update funktiert da problemlos und es bleibt einfach die Version 1.0.69 installiert.

Insgesamt sollte man auch dringend auf piVCCU3 wechseln, eQ-3 hat den Support für die CCU2 zum Jahreswechsel eingestellt und dementsprechend ist die Wahrscheinlichkeit für Updates recht gering. Mich hat es sehr gewundert, dass da überhaupt noch die Version 2.61.7 rausgebracht wurde.

Alles klar, dann werde ich beizeiten mal wechseln, danke für den Hinweis. :) Da der Host sowieso nicht ins Internet kommt, halte ich das Sicherheitsrisiko allerdings für überschaubar. :)
Ich mach hier dann mal zu.