aboutsummaryrefslogtreecommitdiffstats
path: root/meta-oe
diff options
context:
space:
mode:
authorChristophe Vu-Brugier <christophe.vu-brugier@seagate.com>2023-05-26 14:21:34 +0200
committerKhem Raj <raj.khem@gmail.com>2023-05-26 08:28:37 -0700
commitdb5e11c890c3e7849a7ead46a8f1ff359c56edd7 (patch)
treed6213e9722307410c9612aa91b8b5dfead4038fd /meta-oe
parent829dcb63f01651750a56e2a3d21635e53199af38 (diff)
downloadmeta-openembedded-db5e11c890c3e7849a7ead46a8f1ff359c56edd7.tar.gz
switchtec-user: add new recipe
switchtec-user provides an easy to use CLI and C library for communicating with Microsemi's Switchtec management interface. https://github.com/Microsemi/switchtec-user/ Signed-off-by: Christophe Vu-Brugier <christophe.vu-brugier@seagate.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-oe')
-rw-r--r--meta-oe/recipes-support/switchtec-user/switchtec-user/0001-cli-Fix-format-security-warning.patch27
-rw-r--r--meta-oe/recipes-support/switchtec-user/switchtec-user_4.1.bb23
2 files changed, 50 insertions, 0 deletions
diff --git a/meta-oe/recipes-support/switchtec-user/switchtec-user/0001-cli-Fix-format-security-warning.patch b/meta-oe/recipes-support/switchtec-user/switchtec-user/0001-cli-Fix-format-security-warning.patch
new file mode 100644
index 0000000000..ff2743eb68
--- /dev/null
+++ b/meta-oe/recipes-support/switchtec-user/switchtec-user/0001-cli-Fix-format-security-warning.patch
@@ -0,0 +1,27 @@
+From 2d61587f85d1bf57287d12b470afb94c0bf9249d Mon Sep 17 00:00:00 2001
+From: Davide Cavalca <dcavalca@fedoraproject.org>
+Date: Mon, 27 Jun 2022 16:54:35 -0700
+Subject: [PATCH] cli: Fix format security warning
+
+Upstream-Status: Submitted [https://github.com/Microsemi/switchtec-user/pull/316]
+
+---
+ cli/graph.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/cli/graph.c b/cli/graph.c
+index 5748914..95609de 100644
+--- a/cli/graph.c
++++ b/cli/graph.c
+@@ -134,7 +134,7 @@ static void draw_status(WINDOW *win, int x_off, int x_cnt, const char *status)
+ mvwprintw(win, 0, 0, " ");
+ for (i = 0; i < x_cnt * 2 + x_off; i++)
+ mvwaddch(win, 1, i, ' ');
+- mvwprintw(win, 1, x_off, status);
++ mvwprintw(win, 1, x_off, "%s", status);
+ wrefresh(win);
+ }
+
+--
+2.39.2
+
diff --git a/meta-oe/recipes-support/switchtec-user/switchtec-user_4.1.bb b/meta-oe/recipes-support/switchtec-user/switchtec-user_4.1.bb
new file mode 100644
index 0000000000..6d5c9f1a67
--- /dev/null
+++ b/meta-oe/recipes-support/switchtec-user/switchtec-user_4.1.bb
@@ -0,0 +1,23 @@
+SUMMARY = "Easy to use CLI and C library for communicating with Microsemi's Switchtec management interface"
+HOMEPAGE = "https://github.com/Microsemi/switchtec-user"
+SECTION = "console/utils"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=3d6b07c89629cff2990d2e8e1f4c2382"
+DEPENDS = "ncurses openssl"
+SRCREV = "762ba441d2c02685f98e5f56e984db033bab279a"
+
+SRC_URI = " \
+ git://github.com/Microsemi/switchtec-user.git;protocol=https;branch=master \
+ file://0001-cli-Fix-format-security-warning.patch \
+"
+SRC_URI[sha256sum] = "f98c1fe23e1d7a11fb23e8bcf9b563929fc805ea669191a7fd525ad16519f655"
+
+S = "${WORKDIR}/git"
+
+inherit autotools-brokensep pkgconfig
+
+EXTRA_OEMAKE = "DESTDIR=\"${D}\" PREFIX=\"${prefix}\" LDCONFIG=\"true\""
+
+do_install () {
+ oe_runmake install
+}