Skip to contentSkip to conversation

package/ledmon: new package

PATCH In review Maksim Kiselev 2 participants 3 messages Aug 20, 2023 – Aug 21, 2023

lore
Share & tools
lore
#0 lore raw

v2 cover package/ledmon: new package

Add Enclosure LED Utilities

v2 changes:
- add an entry in the DEVELOPERS file for this package
- use "select" instead of "depends on" for For pciutils and sg3_utils
- add patches for musl builds
- drop "v" prefix for LEDMON_VERSION variable
- add host-pkgconf dependency
- add comment about licenses
- bump ledmon version to 0.97

Maksim Kiselev (1):
package/ledmon: new package

 DEVELOPERS                                    |   3 +
 package/Config.in                             |   1 +
 ...nstandard-on_exit-function-by-atexit.patch | 223 ++++++++++++++++++
 ...-Fix-unknown-type-name-ssize_t-error.patch |  44 ++++
 .../ledmon/0003-Add-disable-doc-option.patch  |  63 +++++
 package/ledmon/Config.in                      |  15 ++
 package/ledmon/ledmon.hash                    |   3 +
 package/ledmon/ledmon.mk                      |  18 ++
 8 files changed, 370 insertions(+)
 create mode 100644 package/ledmon/0001-Replace-nonstandard-on_exit-function-by-atexit.patch
 create mode 100644 package/ledmon/0002-Fix-unknown-type-name-ssize_t-error.patch
 create mode 100644 package/ledmon/0003-Add-disable-doc-option.patch
 create mode 100644 package/ledmon/Config.in
 create mode 100644 package/ledmon/ledmon.hash
 create mode 100644 package/ledmon/ledmon.mk
Signature · 6 lines
2.39.2

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#1 lore raw

PATCH v2 1/1 package/ledmon: new package

Enclosure LED Utilities

ledmon and ledctl are userspace tools designed to control storage enclosure LEDs. The user must have root privileges to use these tools.

These tools use the SGPIO and SES-2 protocols to monitor and control LEDs. They been verified to work with Intel(R) storage controllers (i.e. the Intel(R) AHCI controller) and have not been tested with storage controllers of other vendors (especially SAS/SCSI controllers).

For backplane enclosures attached to ISCI controllers, support is limited to Intel(R) Intelligent Backplanes.

---
 DEVELOPERS                                    |   3 +
 package/Config.in                             |   1 +
 ...nstandard-on_exit-function-by-atexit.patch | 223 ++++++++++++++++++
 ...-Fix-unknown-type-name-ssize_t-error.patch |  44 ++++
 .../ledmon/0003-Add-disable-doc-option.patch  |  63 +++++
 package/ledmon/Config.in                      |  15 ++
 package/ledmon/ledmon.hash                    |   3 +
 package/ledmon/ledmon.mk                      |  18 ++
 8 files changed, 370 insertions(+)
 create mode 100644 package/ledmon/0001-Replace-nonstandard-on_exit-function-by-atexit.patch
 create mode 100644 package/ledmon/0002-Fix-unknown-type-name-ssize_t-error.patch
 create mode 100644 package/ledmon/0003-Add-disable-doc-option.patch
 create mode 100644 package/ledmon/Config.in
 create mode 100644 package/ledmon/ledmon.hash
 create mode 100644 package/ledmon/ledmon.mk
DEVELOPERS +3 -0
index 69ab723c0c..df19028d9f 100644
@@ -2123,6 +2123,9 @@ F:	package/python-txaio/
 F:	package/python-ujson/
 F:	package/python-wsaccel/
 
+N:	Maksim Kiselev <[email protected]>
+F:	package/ledmon/
+
 N:	Max Filippov <[email protected]>
 F:	arch/Config.in.xtensa
 
package/Config.in +1 -0
index 15b1866630..0378566305 100644
@@ -527,6 +527,7 @@ endmenu
 	source "package/iucode-tool/Config.in"
 	source "package/kbd/Config.in"
 	source "package/lcdproc/Config.in"
+	source "package/ledmon/Config.in"
 	source "package/libiec61850/Config.in"
 	source "package/libmanette/Config.in"
 	source "package/libubootenv/Config.in"
package/ledmon/0001-Replace-nonstandard-on_exit-function-by-atexit.patch new file +223 -0

223 lines not on this page · raw message

package/ledmon/0002-Fix-unknown-type-name-ssize_t-error.patch new file +44 -0

44 lines not on this page · raw message

package/ledmon/0003-Add-disable-doc-option.patch new file +63 -0

63 lines not on this page · raw message

package/ledmon/Config.in new file +15 -0
new file mode 100644
index 0000000000..d08be715c3
@@ -0,0 +1,15 @@
+config BR2_PACKAGE_LEDMON
+	bool "ledmon"
+	depends on BR2_PACKAGE_HAS_UDEV
+	depends on BR2_TOOLCHAIN_HAS_THREADS # sg3_utils
+	select BR2_PACKAGE_PCIUTILS
+	select BR2_PACKAGE_SG3_UTILS
+	help
+	  Enclosure LED Utilities. The ledmon application is
+	  a daemon process used to monitor a state of software
+	  RAID devices (md only) or a state of block devices.
+
+	  https://github.com/intel/ledmon
+
+comment "ledmon needs udev and a toolchain w/ threads"
+	depends on !BR2_PACKAGE_HAS_UDEV || !BR2_TOOLCHAIN_HAS_THREADS
package/ledmon/ledmon.hash new file +3 -0
new file mode 100644
index 0000000000..dfc5d74242
@@ -0,0 +1,3 @@
+# Locally calculated
+sha256  40ee7e462b78c77468cc2ef356a06c5b6db44747d596dc11532f7b6f378d2d4b  ledmon-0.97.tar.gz
+sha256  dcc100d4161cc0b7177545ab6e47216f84857cda3843847c792a25289852dcaa  COPYING
package/ledmon/ledmon.mk new file +18 -0
new file mode 100644
index 0000000000..a3a655ab9f
@@ -0,0 +1,18 @@
+################################################################################
+#
+# ledmon
+#
+################################################################################
+
+LEDMON_VERSION = 0.97
+LEDMON_SITE = $(call github,intel,ledmon,v$(LEDMON_VERSION))
+LEDMON_DEPENDENCIES = host-pkgconf pciutils sg3_utils udev
+LEDMON_LICENSE = GPL-2.0
+LEDMON_LICENSE_FILES = COPYING
+# The code base also include a COPYING.LIB file with the LGPL-2.1 text,
+# and some source files are published under LGPL-2.1, but all of them are
+# at some point linked with GPL-2.0 code, making the resulting binaries
+# GPL-2.0 licensed
+LEDMON_AUTORECONF = YES
+
+$(eval $(autotools-package))
Signature · 6 lines
2.39.2

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#2 lore raw

Hello Maksim,

Quoted 10 lines · On Sun, 20 Aug 2023 12:58:33 +0300 Maksim Kiselev <[email protected]> wrote:

Enclosure LED Utilities

ledmon and ledctl are userspace tools designed to control storage enclosure LEDs. The user must have root privileges to use these tools.

These tools use the SGPIO and SES-2 protocols to monitor and control LEDs. They been verified to work with Intel(R) storage controllers (i.e. the Intel(R) AHCI controller) and have not been tested with storage controllers of other vendors (especially SAS/SCSI controllers).

Quoted 4 lines

For backplane enclosures attached to ISCI controllers, support is limited to Intel(R) Intelligent Backplanes.

Thanks, I've applied to our next branch, with some very small changes. See below.

package/ledmon/0001-Replace-nonstandard-on_exit-function-by-atexit.patch

Quoted 5 lines
package/ledmon/0001-Replace-nonstandard-on_exit-function-by-atexit.patch new file +5 -0
+Date: Mon, 15 May 2023 14:46:56 +0300
+Subject: [PATCH 1/2] Replace nonstandard on_exit() function by atexit()
+
+Date: Mon, 15 May 2023 19:29:45 +0300
+Subject: [PATCH 2/2] Fix unknown type name ‘ssize_t’ error

The patches in Buildroot should not have 1/2, 2/2, because this gets quickly out of sync. And indeed: you have 3 patches for this package, and these 1/2 and 2/2 are already wrong. So we ask people to generate patches with "git format-patch -N". Note that you can run "make check-package" which validates this kind of coding style issues.

package/ledmon/ledmon.mk line 15

Quoted 9 lines
package/ledmon/ledmon.mk new file +9 -0
+LEDMON_VERSION = 0.97
+LEDMON_SITE = $(call github,intel,ledmon,v$(LEDMON_VERSION))
+LEDMON_DEPENDENCIES = host-pkgconf pciutils sg3_utils udev
+LEDMON_LICENSE = GPL-2.0
+LEDMON_LICENSE_FILES = COPYING
+# The code base also include a COPYING.LIB file with the LGPL-2.1 text,
+# and some source files are published under LGPL-2.1, but all of them are
+# at some point linked with GPL-2.0 code, making the resulting binaries
+# GPL-2.0 licensed

I've moved this comment above LEDMON_LICENSE, as we always put comments *before* the code they correspond to.

Quoted 1 line

+LEDMON_AUTORECONF = YES

I've added a comment above this line that explains why it is needed.

Thanks a lot!

Thomas

Signature · 8 lines
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot