equivs to the rescue …

»hp-health« packages on downloads.linux.hpe.com aren’t provided for semi-current versions for Debian or Ubuntu. But with some hackery it’s running fine, thanks to the »equivs« package …

4830.org is currently replacing it’s HPE Proliants G7/Gen8 by Gen9s, installing, of course, Debian 12. For some reason, HPE isn’t providing current .deb packages for hp-healt anymore, but at least an older package for Ubuntu is working. But, fiddling with dependencies breaks the apt/deb system. Thus, the idea was to just build a dummy package with dependencies, luring the package management into believing all dependencies are properly satisfied.

Turns out: Debian already provides an easy way for that: equivs!

root@basilisk:~# wget http://downloads.linux.hpe.com/SDR/repo/mcp/ubuntu/pool/non-free/hp-health_10.80-1874.10_amd64.deb
root@basilisk:~# dpkg -i hp-health_10.80-1874.10_amd64.deb 
Selecting previously unselected package hp-health.
[…]
Unpacking hp-health (10.80-1874.10) ...
dpkg: dependency problems prevent configuration of hp-health:
 hp-health depends on libc6-i686 | lib32gcc1; however:
  Package libc6-i686 is not installed.
  Package lib32gcc1 is not installed.

dpkg: error processing package hp-health (--install):
 dependency problems - leaving unconfigured
Processing triggers for libc-bin (2.36-9+deb12u3) ...
Processing triggers for man-db (2.11.2-2) ...
Errors were encountered while processing:
 hp-health
root@basilisk:~# apt install lib32gcc1 libc6-i686
Reading package lists... Done
[…]
Package lib32gcc1 is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
However the following packages replace it:
  lib32gcc-s1

E: Package 'lib32gcc1' has no installation candidate
root@basilisk:~# apt install lib32gcc-s2
[…]
root@basilisk:~# dpkg -i --ignore-depends=lib32gcc1 hp-health_10.80-1874.10_amd64.deb 
(Reading database ... 58319 files and directories currently installed.)
Preparing to unpack hp-health_10.80-1874.10_amd64.deb ...
Unpacking hp-health (10.80-1874.10) over (10.80-1874.10) ...
Setting up hp-health (10.80-1874.10) ...
Processing triggers for libc-bin (2.36-9+deb12u3) ...
Processing triggers for man-db (2.11.2-2) ...
root@basilisk:~# hpasmcli -s "show temp; show fans; show POWERSUPPLY"

Sensor   Location              Temp       Threshold
------   --------              ----       ---------
#1        AMBIENT              21C/69F    42C/107F 
[…]
Power supply #1
	Present  : Yes
	Redundant: No
	Condition: FAILED
	Hotplug  : Supported
Power supply #2
	Present  : Yes
	Redundant: No
	Condition: Ok
	Hotplug  : Supported
	Power    : 105 Watts

root@basilisk:~# apt install equivs
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
equivs is already the newest version (2.3.1).
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
 hp-health : Depends: libc6-i686 but it is not installable or
                      lib32gcc1 but it is not installable
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
root@basilisk:~# apt --fix-broken install
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Correcting dependencies... Done
The following packages will be REMOVED:
  hp-health
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
After this operation, 2,167 kB disk space will be freed.
Do you want to continue? [Y/n] y
[…]
root@basilisk:~# mkdir lib32gcc1-for-hphealth
root@basilisk:~# cd lib32gcc1-for-hphealth
root@basilisk:~/lib32gcc1-for-hphealth# equivs-control lib32gcc1-for-hphealth.control

root@basilisk:~/lib32gcc1-for-hphealth# grep -v '^#' lib32gcc1-for-hphealth.control
Section: misc
Priority: optional
Standards-Version: 3.9.2

Package: lib32gcc1-for-hphealth
Maintainer: Kai 'wusel' Siering 
Depends: lib32gcc-s1
Provides: lib32gcc1
Description: Dummy package to install lib32gcc1-s1 and list lib32gcc1 as installed
 hp-health_10.80-1874.10_amd64.deb depends on lib32gcc1, but works with lib32gcc1-s1 installed, but package management insists on broken install with lib32gcc1 missing.
root@basilisk:~/lib32gcc1-for-hphealth# equivs-build lib32gcc1-for-hphealth.control 
dpkg-buildpackage: info: source package lib32gcc1-for-hphealth
dpkg-buildpackage: info: source version 1.0
[…]
The package has been created.
Attention, the package has been created in the current directory,
not in ".." as indicated by the message above!
root@basilisk:~/lib32gcc1-for-hphealth# ls -la
total 28
drwxr-xr-x 2 root root 4096 Jan 24 23:27 .
drwx------ 5 root root 4096 Jan 24 23:20 ..
-rw-r--r-- 1 root root 2288 Jan 24 23:27 lib32gcc1-for-hphealth_1.0_all.deb
-rw-r--r-- 1 root root 4803 Jan 24 23:27 lib32gcc1-for-hphealth_1.0_amd64.buildinfo
-rw-r--r-- 1 root root 1086 Jan 24 23:27 lib32gcc1-for-hphealth_1.0_amd64.changes
-rw-r--r-- 1 root root 1443 Jan 24 23:27 lib32gcc1-for-hphealth.control
root@basilisk:~/lib32gcc1-for-hphealth# dpkg -i lib32gcc1-for-hphealth_1.0_all.deb
Selecting previously unselected package lib32gcc1-for-hphealth.
(Reading database ... 58276 files and directories currently installed.)
Preparing to unpack lib32gcc1-for-hphealth_1.0_all.deb ...
Unpacking lib32gcc1-for-hphealth (1.0) ...
Setting up lib32gcc1-for-hphealth (1.0) ...
root@basilisk:~/lib32gcc1-for-hphealth# cd
root@basilisk:~# dpkg -i hp-health_10.80-1874.10_amd64.deb 
Selecting previously unselected package hp-health.
(Reading database ... 58280 files and directories currently installed.)
Preparing to unpack hp-health_10.80-1874.10_amd64.deb ...
Unpacking hp-health (10.80-1874.10) ...
Setting up hp-health (10.80-1874.10) ...
Processing triggers for libc-bin (2.36-9+deb12u3) ...
Processing triggers for man-db (2.11.2-2) ...
root@basilisk:~# hpasmcli -s "show temp; show fans; show POWERSUPPLY"

Sensor   Location              Temp       Threshold
------   --------              ----       ---------
#1        AMBIENT              21C/69F    42C/107F 
[…]
Power supply #1
	Present  : Yes
	Redundant: No
	Condition: FAILED
	Hotplug  : Supported
Power supply #2
	Present  : Yes
	Redundant: No
	Condition: Ok
	Hotplug  : Supported
	Power    : 105 Watts

root@basilisk:~# apt install equivs
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
equivs is already the newest version (2.3.1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

Nice, really, really nice!