From patchwork Fri May 3 19:28:39 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Fabrice Fontaine X-Patchwork-Id: 1931172 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=buildroot.org (client-ip=2605:bc80:3010::136; helo=smtp3.osuosl.org; envelope-from=buildroot-bounces@buildroot.org; receiver=patchwork.ozlabs.org) Received: from smtp3.osuosl.org (smtp3.osuosl.org [IPv6:2605:bc80:3010::136]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4VWLT32kXxz1ydX for ; Sat, 4 May 2024 05:28:53 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 3ECA260611; Fri, 3 May 2024 19:28:50 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id zNhzh1oKd-D3; Fri, 3 May 2024 19:28:48 +0000 (UTC) X-Comment: SPF check N/A for local connections - client-ip=140.211.166.34; helo=ash.osuosl.org; envelope-from=buildroot-bounces@buildroot.org; receiver= DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org A317560613 Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp3.osuosl.org (Postfix) with ESMTP id A317560613; Fri, 3 May 2024 19:28:48 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by ash.osuosl.org (Postfix) with ESMTP id 770BC1BF41B for ; Fri, 3 May 2024 19:28:47 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 6468C60613 for ; Fri, 3 May 2024 19:28:47 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id csGn1xPlXKqz for ; Fri, 3 May 2024 19:28:46 +0000 (UTC) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=2a00:1450:4864:20::32a; helo=mail-wm1-x32a.google.com; envelope-from=fontaine.fabrice@gmail.com; receiver= DMARC-Filter: OpenDMARC Filter v1.4.2 smtp3.osuosl.org 8E35360611 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 8E35360611 Received: from mail-wm1-x32a.google.com (mail-wm1-x32a.google.com [IPv6:2a00:1450:4864:20::32a]) by smtp3.osuosl.org (Postfix) with ESMTPS id 8E35360611 for ; Fri, 3 May 2024 19:28:45 +0000 (UTC) Received: by mail-wm1-x32a.google.com with SMTP id 5b1f17b1804b1-41ba1ba5591so615795e9.1 for ; Fri, 03 May 2024 12:28:45 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714764523; x=1715369323; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=y6k8QnPwSbJluMgtmbkar9sSi3apeC5ZDB2Nbt7rJR4=; b=qf7K+4VwVV3l6mpMUPJw2BRxjOENRYUThOdiwTtlZtvTmUVk7x/5R35TPJLabBbmSc /kzQhhrbtYKN4W0mT6iOXS0RKAXnkBIujo1wJRsAXLNl6XIwx7SzN97zHpOsG6i152AH KPHwGmE3uAuU4ZPAY2dE/9axWId5NP7Ugfw0XRV9NfHm2+KNoFqtTA+TB8heij/Z1fcB GXxSFrQDQ868fWwM778vHgwEiu0Kr9LGFUM/j+xP0qZOjl1TbiBk9uGfgoClEWGWBsz/ eHyYvFmVeor6wFYSkSCdNsPiA+WnwV2H0ZFczcCSEkM3gJMhVXDSNByEaG9/5VuSrpzd Dw8g== X-Gm-Message-State: AOJu0Yz2pB1UdKoj0TwMTTj0dWojX7mrq9W5BDPSb+6ZPzedNH8XI52t wxIPmFnPZjlf6ty+4f+Upaqg4289PePZ86+tswsmW/2/n0a9uZjV+iguIA== X-Google-Smtp-Source: AGHT+IGnEvSjwOGvPgveeF1APp1ECvRU1iiM5EktWcIq38ZNALoIelcFDzCTDc0aXuRWaz2Dt90fNA== X-Received: by 2002:a05:600c:3d86:b0:419:fd49:5d46 with SMTP id bi6-20020a05600c3d8600b00419fd495d46mr2770914wmb.38.1714764522849; Fri, 03 May 2024 12:28:42 -0700 (PDT) Received: from kali.home (lfbn-ren-1-785-215.w83-197.abo.wanadoo.fr. [83.197.112.215]) by smtp.gmail.com with ESMTPSA id l30-20020a05600c1d1e00b0041b086d664fsm6676847wms.6.2024.05.03.12.28.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 May 2024 12:28:42 -0700 (PDT) From: Fabrice Fontaine To: buildroot@buildroot.org Date: Fri, 3 May 2024 21:28:39 +0200 Message-ID: <20240503192840.1240802-1-fontaine.fabrice@gmail.com> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1714764523; x=1715369323; darn=buildroot.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=y6k8QnPwSbJluMgtmbkar9sSi3apeC5ZDB2Nbt7rJR4=; b=BLv1XMSaSyzlXP6mDfWRLXM1M1ib6Klam+R3MBybYs36HP0Q5hMkWKk/A9iT3JAyA+ cEq8cY6G+g+CnPM3Wai2uiNsYNab4hvU/Dm5EIC5FvUqTwcxUvqTmOX+zhd5dILwPmFn ROcE7vIGxMceiuh3tkOzJaw7FHL8Ixd2gnqmuLioecw1vD0hd8b8dYGCO9gl9i9UnRO5 DLf2F4F106mHlcdMErX+gMsZZHza+mw/LgjLCl9UiJdxJvM8u2flo7/kUbgtrfKmfvTU 1xNoDYSRQpOUdhN0/SaZ7UcfCCZzg/UKye/JArD80o8RnUGJyHVE2TtX7tfjPBBtt/mg UktQ== X-Mailman-Original-Authentication-Results: smtp3.osuosl.org; dmarc=pass (p=none dis=none) header.from=gmail.com X-Mailman-Original-Authentication-Results: smtp3.osuosl.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20230601 header.b=BLv1XMSa Subject: [Buildroot] [PATCH 1/1] package/ledmon: bump to version 1.0.0 X-BeenThere: buildroot@buildroot.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Maksim Kiselev , Fabrice Fontaine Errors-To: buildroot-bounces@buildroot.org Sender: "buildroot" - Add host-autoconf-archive mandatory dependency - Drop patches (already in version) https://github.com/intel/ledmon/releases/tag/v1.0.0 Signed-off-by: Fabrice Fontaine --- ...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/ledmon.hash | 2 +- package/ledmon/ledmon.mk | 7 +- 5 files changed, 5 insertions(+), 334 deletions(-) delete mode 100644 package/ledmon/0001-Replace-nonstandard-on_exit-function-by-atexit.patch delete mode 100644 package/ledmon/0002-Fix-unknown-type-name-ssize_t-error.patch delete mode 100644 package/ledmon/0003-Add-disable-doc-option.patch diff --git a/package/ledmon/0001-Replace-nonstandard-on_exit-function-by-atexit.patch b/package/ledmon/0001-Replace-nonstandard-on_exit-function-by-atexit.patch deleted file mode 100644 index 7a89c3f1a4..0000000000 --- a/package/ledmon/0001-Replace-nonstandard-on_exit-function-by-atexit.patch +++ /dev/null @@ -1,223 +0,0 @@ -From e57ad4c71cce734de7f8aa75e84fce97bc148c2b Mon Sep 17 00:00:00 2001 -From: Maksim Kiselev -Date: Mon, 15 May 2023 14:46:56 +0300 -Subject: [PATCH] Replace nonstandard on_exit() function by atexit() - -on_exit() is not portable and not available on the C libraries musl -and uClibc. - -So let's replace it with standard atexit() function. - -Upstream: https://github.com/intel/ledmon/pull/139 - -Signed-off-by: Maksim Kiselev ---- - src/ledctl.c | 12 ++++------- - src/ledmon.c | 59 +++++++++++++++++++++++++++------------------------- - 2 files changed, 35 insertions(+), 36 deletions(-) - -diff --git a/src/ledctl.c b/src/ledctl.c -index 7a89a24..10fd57a 100644 ---- a/src/ledctl.c -+++ b/src/ledctl.c -@@ -214,15 +214,11 @@ static void ibpi_state_fini(struct ibpi_state *p) - * - * This is internal function of ledctl utility. The function cleans up a memory - * allocated for the application and closes all opened handles. This function is -- * design to be registered as on_exit() handler function. -- * -- * @param[in] status exit status of the ledctl application. -- * @param[in] ignored function ignores this argument. -+ * design to be registered as atexit() handler function. - * - * @return The function does not return a value. - */ --static void _ledctl_fini(int status __attribute__ ((unused)), -- void *ignore __attribute__ ((unused))) -+static void _ledctl_fini(void) - { - sysfs_reset(); - list_erase(&ibpi_list); -@@ -948,7 +944,7 @@ static char *ledctl_strstatus(ledctl_status_code_t s) - * @brief Application's entry point. - * - * This is the entry point of ledctl utility. This function does all the work. -- * It allocates and initializes all used structures. Registers on_exit() -+ * It allocates and initializes all used structures. Registers atexit() - * handlers. - * Then the function parses command line options and commands given and scans - * sysfs tree for controllers, block devices and RAID devices. If no error is -@@ -983,7 +979,7 @@ int main(int argc, char *argv[]) - status = _init_ledctl_conf(); - if (status != LEDCTL_STATUS_SUCCESS) - return status; -- if (on_exit(_ledctl_fini, progname)) -+ if (atexit(_ledctl_fini)) - exit(LEDCTL_STATUS_ONEXIT_ERROR); - slot_request_init(&slot_req); - status = _cmdline_parse(argc, argv, &slot_req); -diff --git a/src/ledmon.c b/src/ledmon.c -index 6f52fd6..1329295 100644 ---- a/src/ledmon.c -+++ b/src/ledmon.c -@@ -57,6 +57,19 @@ - #include "utils.h" - #include "vmdssd.h" - -+/** -+ * This macro is the alternative way to get exit status -+ * in atexit() callback function -+ */ -+#define EXIT(x) ((exit)(exit_status = (x))) -+ -+static int exit_status; -+ -+/** -+ * Flag to print exit status -+ */ -+static int ignore; -+ - /** - * @brief List of active block devices. - * -@@ -151,20 +164,16 @@ static int possible_params_size = ARRAY_SIZE(possible_params); - * - * This is internal function of monitor service. It is used to finalize daemon - * process i.e. free allocated memory, unlock and remove pidfile and close log -- * file and syslog. The function is registered as on_exit() handler. -- * -- * @param[in] status The function ignores this parameter. -- * @param[in] program_name The name of the binary file. This argument -- * is passed via on_exit() function. -+ * file and syslog. The function is registered as atexit() handler. - * - * @return The function does not return a value. - */ --static void _ledmon_fini(int __attribute__ ((unused)) status, void *program_name) -+static void _ledmon_fini(void) - { - sysfs_reset(); - list_erase(&ledmon_block_list); - log_close(); -- pidfile_remove(program_name); -+ pidfile_remove(progname); - } - - typedef enum { -@@ -207,30 +216,25 @@ static char *ledmon_strstatus(ledmon_status_code_t s) - * - * This is internal function of monitor service. It is used to report an exit - * status of the monitor service. The message is logged in to syslog and to log -- * file. The function is registered as on_exit() hander. -- * -- * @param[in] status Status given in the last call to exit() -- * function. -- * @param[in] arg Argument passed to on_exit(). -+ * file. The function is registered as atexit() handler. - * - * @return The function does not return a value. - */ --static void _ledmon_status(int status, void *arg) -+static void _ledmon_status(void) - { - int log_level; - char message[4096]; -- int ignore = *((int *)arg); - - if (ignore) - return; - -- if (status == LEDMON_STATUS_SUCCESS) -+ if (exit_status == LEDMON_STATUS_SUCCESS) - log_level = LOG_LEVEL_INFO; - else - log_level = LOG_LEVEL_ERROR; - - snprintf(message, sizeof(message), "exit status is %s.", -- ledmon_strstatus(status)); -+ ledmon_strstatus(exit_status)); - - if (get_log_fd() >= 0) - _log(log_level, message); -@@ -364,10 +368,10 @@ static ledmon_status_code_t _cmdline_parse_non_daemonise(int argc, char *argv[]) - break; - case 'h': - _ledmon_help(); -- exit(EXIT_SUCCESS); -+ EXIT(EXIT_SUCCESS); - case 'v': - _ledmon_version(); -- exit(EXIT_SUCCESS); -+ EXIT(EXIT_SUCCESS); - case ':': - case '?': - return LEDMON_STATUS_CMDLINE_ERROR; -@@ -890,14 +894,13 @@ static void _close_parent_fds(void) - int main(int argc, char *argv[]) - { - ledmon_status_code_t status = LEDMON_STATUS_SUCCESS; -- static int ignore; - - setup_options(&longopt, &shortopt, possible_params, - possible_params_size); - set_invocation_name(argv[0]); - openlog(progname, LOG_PID | LOG_PERROR, LOG_DAEMON); - -- if (on_exit(_ledmon_status, &ignore)) -+ if (atexit(_ledmon_status)) - return LEDMON_STATUS_ONEXIT_ERROR; - - if (_cmdline_parse_non_daemonise(argc, argv) != LEDMON_STATUS_SUCCESS) -@@ -935,18 +938,18 @@ int main(int argc, char *argv[]) - - if (pid < 0) { - log_debug("main(): fork() failed (errno=%d).", errno); -- exit(EXIT_FAILURE); -+ EXIT(EXIT_FAILURE); - } - if (pid > 0) { - ignore = 1; /* parent: don't print exit status */ -- exit(EXIT_SUCCESS); -+ EXIT(EXIT_SUCCESS); - } - - pid_t sid = setsid(); - - if (sid < 0) { - log_debug("main(): setsid() failed (errno=%d).", errno); -- exit(EXIT_FAILURE); -+ EXIT(EXIT_FAILURE); - } - - _close_parent_fds(); -@@ -960,16 +963,16 @@ int main(int argc, char *argv[]) - - if (chdir("/") < 0) { - log_debug("main(): chdir() failed (errno=%d).", errno); -- exit(EXIT_FAILURE); -+ EXIT(EXIT_FAILURE); - } - if (pidfile_create(progname)) { - log_debug("main(): pidfile_creat() failed."); -- exit(EXIT_FAILURE); -+ EXIT(EXIT_FAILURE); - } - _ledmon_setup_signals(); - -- if (on_exit(_ledmon_fini, progname)) -- exit(LEDMON_STATUS_ONEXIT_ERROR); -+ if (atexit(_ledmon_fini)) -+ EXIT(LEDMON_STATUS_ONEXIT_ERROR); - list_init(&ledmon_block_list, (item_free_t)block_device_fini); - sysfs_init(); - log_info("monitor service has been started..."); -@@ -987,5 +990,5 @@ int main(int argc, char *argv[]) - } - ledmon_remove_shared_conf(); - stop_udev_monitor(); -- exit(EXIT_SUCCESS); -+ EXIT(EXIT_SUCCESS); - } --- -2.39.2 - diff --git a/package/ledmon/0002-Fix-unknown-type-name-ssize_t-error.patch b/package/ledmon/0002-Fix-unknown-type-name-ssize_t-error.patch deleted file mode 100644 index 4aeadbbbf8..0000000000 --- a/package/ledmon/0002-Fix-unknown-type-name-ssize_t-error.patch +++ /dev/null @@ -1,44 +0,0 @@ -From b9f454cd29b6b5a0927b3c1e98807d54ffacd73e Mon Sep 17 00:00:00 2001 -From: Maksim Kiselev -Date: Mon, 15 May 2023 19:29:45 +0300 -Subject: [PATCH] Fix unknown type name ‘ssize_t’ error - -This error occurs for builds with musl libc. -Move include to utils header to -resolve this issue. - -Upstream: https://github.com/intel/ledmon/pull/139 - -Signed-off-by: Maksim Kiselev ---- - src/utils.c | 1 - - src/utils.h | 1 + - 2 files changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/utils.c b/src/utils.c -index 86b9593..0b83d5a 100644 ---- a/src/utils.c -+++ b/src/utils.c -@@ -33,7 +33,6 @@ - #include - #include - #include --#include - #include - #include - #include -diff --git a/src/utils.h b/src/utils.h -index 5d590b9..d02da8f 100644 ---- a/src/utils.h -+++ b/src/utils.h -@@ -22,6 +22,7 @@ - #define _UTILS_H_INCLUDED_ - - #include -+#include - #include "config_file.h" - #include "stdlib.h" - #include "stdint.h" --- -2.39.2 - diff --git a/package/ledmon/0003-Add-disable-doc-option.patch b/package/ledmon/0003-Add-disable-doc-option.patch deleted file mode 100644 index ab7a242289..0000000000 --- a/package/ledmon/0003-Add-disable-doc-option.patch +++ /dev/null @@ -1,63 +0,0 @@ -From 141628519d227b59be3977b16ebaab0feb22b295 Mon Sep 17 00:00:00 2001 -From: Maksim Kiselev -Date: Sun, 20 Aug 2023 11:35:57 +0300 -Subject: [PATCH] Add '--disable-doc' option - -Introduce a configure option to disable documentation installation -in case if it is not required. - -Upstream: https://github.com/intel/ledmon/pull/154 - -Signed-off-by: Maksim Kiselev ---- - Makefile.am | 8 ++++++-- - configure.ac | 11 ++++++++++- - 2 files changed, 16 insertions(+), 3 deletions(-) - -diff --git a/Makefile.am b/Makefile.am -index ddcd200..644a8d2 100644 ---- a/Makefile.am -+++ b/Makefile.am -@@ -20,6 +20,10 @@ if SYSTEMD_CONDITION - OPTIONAL_SUBDIR = systemd - endif - --SUBDIRS = doc src $(OPTIONAL_SUBDIR) -+if WITH_DOC -+ DOC_SUBDIR = doc -+ dist_doc_DATA = README.md -+endif -+ -+SUBDIRS = src $(DOC_SUBDIR) $(OPTIONAL_SUBDIR) - EXTRA_DIST = config/config.h systemd/ledmon.service.in --dist_doc_DATA = README.md -diff --git a/configure.ac b/configure.ac -index 05baa62..114957f 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -74,6 +74,15 @@ AM_CONDITIONAL([SYSTEMD_CONDITION], [test "$SYSTEMD_STR" = yes]) - # target directory for ledmon service file - AC_SUBST([SYSTEMD_PATH], "$(pkg-config systemd --variable=systemdsystemunitdir)") - -+# Add configure option to disable documentation building -+AC_ARG_ENABLE([doc], -+ [AS_HELP_STRING([--disable-doc], -+ [do not install ledmon documentaion])], -+ [with_doc=${enableval}], -+ [with_doc=yes]) -+ -+AM_CONDITIONAL([WITH_DOC], [test "x$with_doc" = "xyes"]) -+ - AC_CONFIG_FILES([Makefile - doc/Makefile - src/Makefile -@@ -86,5 +95,5 @@ $PACKAGE_NAME $VERSION configuration: - Preprocessor flags: ${AM_CPPFLAGS} ${CPPFLAGS} - C compiler flags: ${AM_CFLAGS} ${CFLAGS} - Common install location: ${prefix} -- configure parameters: --enable-systemd=${SYSTEMD_STR} -+ configure parameters: --enable-systemd=${SYSTEMD_STR} --enable-doc=${with_doc} - ]) --- -2.39.2 - diff --git a/package/ledmon/ledmon.hash b/package/ledmon/ledmon.hash index dfc5d74242..e9cfcc63cb 100644 --- a/package/ledmon/ledmon.hash +++ b/package/ledmon/ledmon.hash @@ -1,3 +1,3 @@ # Locally calculated -sha256 40ee7e462b78c77468cc2ef356a06c5b6db44747d596dc11532f7b6f378d2d4b ledmon-0.97.tar.gz +sha256 2826786cd5e7fe7d32d22e9d209b23124801fec9c3220dcd7fb45706f3818dc5 ledmon-1.0.0.tar.gz sha256 dcc100d4161cc0b7177545ab6e47216f84857cda3843847c792a25289852dcaa COPYING diff --git a/package/ledmon/ledmon.mk b/package/ledmon/ledmon.mk index 473d0de7a3..71150ad1e4 100644 --- a/package/ledmon/ledmon.mk +++ b/package/ledmon/ledmon.mk @@ -4,16 +4,17 @@ # ################################################################################ -LEDMON_VERSION = 0.97 +LEDMON_VERSION = 1.0.0 LEDMON_SITE = $(call github,intel,ledmon,v$(LEDMON_VERSION)) -LEDMON_DEPENDENCIES = host-pkgconf pciutils sg3_utils udev +LEDMON_DEPENDENCIES = host-autoconf-archive host-pkgconf pciutils sg3_utils udev # 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_LICENSE = GPL-2.0 LEDMON_LICENSE_FILES = COPYING -# 0002-Fix-unknown-type-name-ssize_t-error.patch +# From git LEDMON_AUTORECONF = YES +LEDMON_AUTORECONF_OPTS = --include=$(HOST_DIR)/share/autoconf-archive $(eval $(autotools-package))