-
Notifications
You must be signed in to change notification settings - Fork 24
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
I wrote a spec file to create an rpm. #16
Conversation
Added additional code to turn off extra disks.
Running the create-kmod-led-ugreen.sh script as root on an Alma Linux 9.4 system will rpm build the kmod-led-ugreen.spec file and create rpms.
@@ -161,7 +161,11 @@ for i in "${!led_map[@]}"; do | |||
echo 0 > /sys/class/leds/$led/brightness | |||
echo none > /sys/class/leds/$led/trigger | |||
fi | |||
fi | |||
else | |||
# turn off the led if no disk installed on this slot |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The indent here seems incorrect?
Thank you for creating this script. I am not familiar with the rpm packaging, but it seems there are some unnecessary files in the For the pre-built rpm package, if I understand correctly it only applies to a specific kernel (since it is a .ko, not built with dkms), so maybe we can also remove it (or put it in the release page instead of the source files) as other users may have different kernel, and write a |
Requires(postun): %{_sbindir}/weak-modules | ||
Requires: kernel >= %{kmod_kernel_version} | ||
Requires: kernel-core-uname-r >= %{kmod_kernel_version} | ||
Requires: i2c-tools smartmontools |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The script also requires dmidecode
.
* Bugfixes - add missing led_map thanks @miskcoo - implement functions for modprobe from drivers - minor changes for logger messages - add DXP480T and function to set static white LED * Bugfix for DXP6800 * fix: turn off the light when no disk in a slot (#16) * Update ugreen-leds --------- Co-authored-by: Yuhao Zhou <miskcoo@gmail.com>
Hello!
Thank you so much for creating this wonderful led software!
I created a fork which has a SPECS directory. In that directory, I wrote a spec file so that your package can be distributed as an rpm. I also put the rpms in there.
The spec file is a modified version of: https://elrepo.org/linux/testing/el9/SRPMS/kmod-hello-1-0.0-13.el9_2.elrepo.src.rpm
I also think I found a bug in ugreen-diskiomon where the drive bays with no disk installed still had led lights on. Fix and diff is below.
nas:/usr/bin$ diff ugreen-diskiomon.orig ugreen-diskiomon.new
164c164,168
< fi
Feel free to use or not use anything I wrote.
Thank you again for all your work!
Axel