Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Yann E. MORIN" <yann.morin.1998@free.fr>
To: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>, buildroot@buildroot.org
Subject: Re: [Buildroot] [PATCH 1/1] package/freeipmi: new package
Date: Sat, 1 Jan 2022 12:01:27 +0100	[thread overview]
Message-ID: <20220101110127.GE3390456@scaer> (raw)
In-Reply-To: <20211227124417.1509743-1-fontaine.fabrice@gmail.com>

Fabrice, All,

On 2021-12-27 13:44 +0100, Fabrice Fontaine spake thusly:
> FreeIPMI provides in-band and out-of-band IPMI software based on the
> IPMI v1.5/2.0 specification.
> 
> The IPMI specification defines a set of interfaces for platform
> management and is implemented by a number vendors for system management.
> The features of IPMI that most users will be interested in are sensor
> monitoring, system event monitoring, power control, and serial-over-LAN
> (SOL).
> 
> https://www.gnu.org/software/freeipmi/
> 
> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
[--SNIP--]
> diff --git a/package/freeipmi/0001-fix-build-on-musl.patch b/package/freeipmi/0001-fix-build-on-musl.patch
> new file mode 100644
> index 0000000000..0a570b8841
> --- /dev/null
> +++ b/package/freeipmi/0001-fix-build-on-musl.patch
> @@ -0,0 +1,49 @@
> +From 6295c96ae54cb16efe41e53f526a4dc19cd719f2 Mon Sep 17 00:00:00 2001
> +From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> +Date: Sat, 30 Oct 2021 00:26:40 +0200
> +Subject: [PATCH] fix build on musl
> +
> +musl doesn't provide getmsg or putmsg even if stropts.h is available
> +
> +Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> +[Retrieved from:
> +https://github.com/chu11/freeipmi-mirror/commit/6295c96ae54cb16efe41e53f526a4dc19cd719f2]

I've changed that to point to the official git repository:
https://git.savannah.gnu.org/cgit/freeipmi.git/commit/?id=6295c96ae54cb16efe41e53f526a4dc19cd719f2

Applied to master, thanks.

Regards,
Yann E. MORIN.

> +---
> + configure.ac                            | 1 +
> + libfreeipmi/driver/ipmi-sunbmc-driver.c | 4 ++--
> + 2 files changed, 3 insertions(+), 2 deletions(-)
> +
> +diff --git a/configure.ac b/configure.ac
> +index 562dd624e..711b27674 100644
> +--- a/configure.ac
> ++++ b/configure.ac
> +@@ -479,6 +479,7 @@ AC_CHECK_FUNCS([flockfile fputs_unlocked fwrite_unlocked])
> + AC_CHECK_FUNCS([iopl])
> + AC_CHECK_FUNCS([asprintf])
> + AC_CHECK_FUNCS([cbrt])
> ++AC_CHECK_FUNCS([getmsg putmsg])
> + 
> + dnl sighandler_t apparently not defined in Apple/OS X
> + AC_CHECK_TYPES([sighandler_t], [], [], [[#include <signal.h>]])
> +diff --git a/libfreeipmi/driver/ipmi-sunbmc-driver.c b/libfreeipmi/driver/ipmi-sunbmc-driver.c
> +index 05caca8b6..4ae8c5719 100644
> +--- a/libfreeipmi/driver/ipmi-sunbmc-driver.c
> ++++ b/libfreeipmi/driver/ipmi-sunbmc-driver.c
> +@@ -423,7 +423,7 @@ _sunbmc_write (ipmi_sunbmc_ctx_t ctx,
> +   assert (ctx->io_init);
> +   assert (ctx->putmsg_intf);
> + 
> +-#if defined(HAVE_SYS_STROPTS_H)
> ++#if defined(HAVE_SYS_STROPTS_H) && defined(HAVE_PUTMSG)
> +   memset (&sbuf, '\0', sizeof (struct strbuf));
> + 
> +   /* Due to API differences, we need to extract the cmd out of the
> +@@ -573,7 +573,7 @@ _sunbmc_read (ipmi_sunbmc_ctx_t ctx,
> +       return (-1);
> +     }
> + 
> +-#if defined(HAVE_SYS_STROPTS_H)
> ++#if defined(HAVE_SYS_STROPTS_H) && defined(HAVE_GETMSG)
> +   if (getmsg (ctx->device_fd, NULL, &sbuf, &flags) < 0)
> +     {
> +       SUNBMC_ERRNO_TO_SUNBMC_ERRNUM (ctx, errno);
> diff --git a/package/freeipmi/Config.in b/package/freeipmi/Config.in
> new file mode 100644
> index 0000000000..8ef2e137fa
> --- /dev/null
> +++ b/package/freeipmi/Config.in
> @@ -0,0 +1,20 @@
> +config BR2_PACKAGE_FREEIPMI
> +	bool "freeipmi"
> +	depends on BR2_USE_MMU # fork()
> +	depends on BR2_TOOLCHAIN_HAS_THREADS
> +	select BR2_PACKAGE_ARGP_STANDALONE if BR2_TOOLCHAIN_USES_UCLIBC || BR2_TOOLCHAIN_USES_MUSL
> +	help
> +	  FreeIPMI provides in-band and out-of-band IPMI software based
> +	  on the IPMI v1.5/2.0 specification.
> +
> +	  The IPMI specification defines a set of interfaces for
> +	  platform management and is implemented by a number vendors
> +	  for system management. The features of IPMI that most users
> +	  will be interested in are sensor monitoring, system event
> +	  monitoring, power control, and serial-over-LAN (SOL).
> +
> +	  https://www.gnu.org/software/freeipmi/
> +
> +comment "freeipmi needs a toolchain w/ threads"
> +	depends on BR2_USE_MMU
> +	depends on !BR2_TOOLCHAIN_HAS_THREADS
> diff --git a/package/freeipmi/freeipmi.hash b/package/freeipmi/freeipmi.hash
> new file mode 100644
> index 0000000000..f73b4a25fe
> --- /dev/null
> +++ b/package/freeipmi/freeipmi.hash
> @@ -0,0 +1,15 @@
> +# Locally computed:
> +sha256  4aa46a269ecc1bbff9412451f17b5408f64395e7dc45b713edf5eb5362700a71  freeipmi-1.6.8.tar.gz
> +sha256  8ceb4b9ee5adedde47b31e975c1d90c73ad27b6b165a1dcd80c7c545eb65b903  COPYING
> +sha256  8ceb4b9ee5adedde47b31e975c1d90c73ad27b6b165a1dcd80c7c545eb65b903  COPYING.bmc-watchdog
> +sha256  8ceb4b9ee5adedde47b31e975c1d90c73ad27b6b165a1dcd80c7c545eb65b903  COPYING.ipmiconsole
> +sha256  8ceb4b9ee5adedde47b31e975c1d90c73ad27b6b165a1dcd80c7c545eb65b903  COPYING.ipmi-dcmi
> +sha256  8ceb4b9ee5adedde47b31e975c1d90c73ad27b6b165a1dcd80c7c545eb65b903  COPYING.ipmidetect
> +sha256  8ceb4b9ee5adedde47b31e975c1d90c73ad27b6b165a1dcd80c7c545eb65b903  COPYING.ipmi-fru
> +sha256  8ceb4b9ee5adedde47b31e975c1d90c73ad27b6b165a1dcd80c7c545eb65b903  COPYING.ipmimonitoring
> +sha256  8ceb4b9ee5adedde47b31e975c1d90c73ad27b6b165a1dcd80c7c545eb65b903  COPYING.ipmiping
> +sha256  8ceb4b9ee5adedde47b31e975c1d90c73ad27b6b165a1dcd80c7c545eb65b903  COPYING.ipmipower
> +sha256  8ceb4b9ee5adedde47b31e975c1d90c73ad27b6b165a1dcd80c7c545eb65b903  COPYING.ipmiseld
> +sha256  8ceb4b9ee5adedde47b31e975c1d90c73ad27b6b165a1dcd80c7c545eb65b903  COPYING.pstdout
> +sha256  48f44386b3f359e70d7e4a5d7f1d529d8591a7c64c47df3f4abdf2ad45a6d537  COPYING.sunbmc
> +sha256  8ceb4b9ee5adedde47b31e975c1d90c73ad27b6b165a1dcd80c7c545eb65b903  COPYING.ZRESEARCH
> diff --git a/package/freeipmi/freeipmi.mk b/package/freeipmi/freeipmi.mk
> new file mode 100644
> index 0000000000..b25ef0a4c6
> --- /dev/null
> +++ b/package/freeipmi/freeipmi.mk
> @@ -0,0 +1,35 @@
> +################################################################################
> +#
> +# freeipmi
> +#
> +################################################################################
> +
> +FREEIPMI_VERSION = 1.6.8
> +FREEIPMI_SITE = https://ftp.gnu.org/gnu/freeipmi
> +FREEIPMI_LICENSE = GPL-3.0+, BSD-like (sunbmc)
> +FREEIPMI_LICENSE_FILES = \
> +	COPYING COPYING.bmc-watchdog COPYING.ipmiconsole COPYING.ipmi-dcmi \
> +	COPYING.ipmidetect COPYING.ipmi-fru COPYING.ipmimonitoring \
> +	COPYING.ipmiping COPYING.ipmipower COPYING.ipmiseld COPYING.pstdout \
> +	COPYING.sunbmc COPYING.ZRESEARCH
> +FREEIPMI_DEPENDENCIES = host-pkgconf
> +FREEIPMI_INSTALL_STAGING = YES
> +# We're patching configure.ac
> +FREEIPMI_AUTORECONF = YES
> +# Disable checking for /dev/urandom and /dev/random through AC_CHECK_FILE
> +FREEIPMI_CONF_OPTS = --without-random-device
> +
> +# Work around for uClibc or musl toolchains which lack argp_*()
> +# functions.
> +ifeq ($(BR2_PACKAGE_ARGP_STANDALONE),y)
> +FREEIPMI_DEPENDENCIES += argp-standalone
> +endif
> +
> +ifeq ($(BR2_PACKAGE_LIBGCRYPT),y)
> +FREEIPMI_CONF_OPTS += --with-encryption
> +FREEIPMI_DEPENDENCIES += libgcrypt
> +else
> +FREEIPMI_CONF_OPTS += --without-encryption
> +endif
> +
> +$(eval $(autotools-package))
> -- 
> 2.33.0
> 
> _______________________________________________
> buildroot mailing list
> buildroot@buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

      reply	other threads:[~2022-01-01 11:01 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-27 12:44 [Buildroot] [PATCH 1/1] package/freeipmi: new package Fabrice Fontaine
2022-01-01 11:01 ` Yann E. MORIN [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220101110127.GE3390456@scaer \
    --to=yann.morin.1998@free.fr \
    --cc=buildroot@buildroot.org \
    --cc=fontaine.fabrice@gmail.com \
    --cc=thomas.petazzoni@bootlin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox