miskcoo / ugreen_leds_controller

An LED Controller for UGREEN's DX/DXP NAS Series
179 stars 26 forks source link

Add SPECS for RHEL8/9 #33

Closed gulikoza closed 3 weeks ago

gulikoza commented 3 weeks ago

Hi,

This PR builds on #16. I removed the files that were not needed and tested it to compile for RHEL8 as well.

RHEL tries to keep a stable kernel abi, so kmods generally might work for multiple kernel versions until there is an abi change and the module has to be rebuilt. So not every kernel update needs a new build, but generally minor releases (eg. rhel9.3 -> rhel9.4) might need them.

I kept most of the code from #16 so most of the credits go to axelolmos

I removed brp-strip-lto since it is not available in RHEL8. I modified the spec to keep original directory structure without copying the files with a script (as it was done in #16) and added a diff file to patch scripts/ugreen-probe-leds on rpmbuild without modifying the original file. I don't know how it is for other distros, but RHEL's lsmod changes '-' to underscore, eg:

# lsmod
Module                  Size  Used by
ledtrig_oneshot        16384  0
led_ugreen             24576  0
miskcoo commented 3 weeks ago

Thanks!

I don't know how it is for other distros, but RHEL's lsmod changes '-' to underscore.

This seems a typo in scripts/ugreen-probe-leds. In other distros lsmod also gives underscores. I think we can directly modify this script.

gulikoza commented 3 weeks ago

Sure. I pushed a v2, removed the patching and added a commit to fix scripts/ugreen-probe-leds