Khem Raj e770e09e40 ipmiutil: Upgrade to 3.1.9
Changes
03/12/2020 ARCress ipmiutil-3.1.6  changes (iver 3.16)
  util/iconfig.c          - fix Fedora bug 1811462 [abrt] ipmiutil config -a
  util/ipmiutil.c         - show version with usage in -h case
  scripts/ipmiutil.env.template - renamed env as template
			    (contributed by mwilliams<at>illuminate.solutions)
  scripts/Makefile.am     - renamed env as template
  scripts/checksel	  - also rm -f $ddir/sel.idx after isel -d
			    (contributed by eguzovsky<at>gmail.com)
  doc/Makefile.am     	  - change gzip -f to gzip -nf for man pages
			    (SR#40 patch from Jeremy Puhlman)

08/31/2020 ARCress ipmiutil-3.1.7  changes (iver 3.17)
  setup/*          - added Win msi setup files
  lib/lanplus/lanplus.c   - revert WIN IPv6 changes, add os_assert routine
  lib/lanplus/lanplus_crypt.c - switch assert to os_assert/return
  lib/lanplus/lanplus_crypt_implc.c - switch assert to os_assert
  util/ipmidir.h	  - AMD_SMB_1_STATUS_* 1< to 1<<  (SF_SR#41)
  util/isel.c             - fix compile warning
  util/ilan.c             - fix compile warning
  configure.ac   - add --enable-doc option to allow not building documentation
  		     contributed by Fabrice Fontaine (ffontaine)
  util/isensor.c  - add SDR conflict 0xC5 handling retries with delay
   		     contributed by albertlav

11/15/2021 ARCress ipmiutil-3.1.8  changes (iver 3.18)
  libeay32.dll - updated for Windows 64 lanplus
  ssleay32.dll - updated for Windows 64 lanplus
  util/oem_supermicro.c - disable DIMM decoding from SMBIOS for SuperMicro (albertlav)
  util/ilan.c  - new -W option to limit lan settings
  util/ipmicmd.h - add VENDOR_MITAC
  util/subs.c    - add VENDOR_MITAC
  util/ipmilanplus.c - print reason if no lan2
  util/ipmilan2.c    - print reason if no lan2
  util/isensor.c  - never skip free_sdr_cache() SR#45
  configure.ac   - fix --disable-lanplus option to avoid random disables,
		   recognize openssl-3.0 for SSL flags

03/03/2023 ARCress ipmiutil-3.1.9  changes (iver 3.19)
  util/isensor.c - fix -i get_idx_range to show last idx in range
  util/igetevent.c - fix printf extra arg
  util/memif.c - SR56: try UEFI address 6d5a7000 if F0000 error
  configure.ac - Clang 16 fixes, resolve -Wimplicit-function-declaration issues
			 (Sam James sam@gentoo.org 11/16/2022)
  lib/lanplus/lanplus.h - resolve implicit os_assert declaration (Sam James)
  util/ireset.c  - SR58: remove is_romley case for ireset -D
  scripts/ipmiutil_wdt - SR43: changed $prog to $progn for Debian
  scripts/uninstall.vbs - SR53: add ; to fix path
  SR53 (Windows): install libeay32.dll, ssleay32.dll into ipmiutil path also
  util/ipmidir.c - ipmi_open_direct(char)
  util/mem_if.c  - UCHAR/int
  doc/ipmiutil.spec - enumerate ipmiutil.env, ipmiutil.env.template
  configure.ac  - add -Wlto-type-mismatch to cfwarn

Signed-off-by: Khem Raj <raj.khem@gmail.com>
2023-05-26 08:28:37 -07:00

123 lines
4.2 KiB
Diff

allow systemd path to be defined by configure option.
The configure probes the host for systemd path information.
Upstream-Status: Inappropriate [Embedded]
Signed-off-by: Armin Kuster <akuster@mvista.com>
--- a/configure.ac
+++ b/configure.ac
@@ -151,7 +151,6 @@ CROSS_LFLAGS=""
CROSS_CFLAGS=""
LIBSENSORS=""
SAM2OBJ="isensor2.o ievents2.o"
-SYSTEMD_DIR=/usr/share/ipmiutil
AC_ARG_ENABLE([useflags],
[ --enable-useflags include environment CFLAGS and LDFLAGS.],
@@ -211,29 +210,42 @@ AC_ARG_ENABLE([gpl],
dnl Does this Linux have systemd enabled? Otherwise use sysv init.
AC_ARG_ENABLE([systemd],
- [ --enable-systemd enable systemd service type=notify support and %_unitdir [[default=disabled]]],)
-if test "x$enable_systemd" = "xyes"; then
- GPL_CFLAGS="$GPL_CFLAGS -DENABLE_SYSTEMD"
- # if systemd enabled, install service scripts in unitdir
- which rpm >/dev/null 2>&1
- if test $? -eq 0 ; then
- SYSTEMD_DIR=`rpm --eval "%{_unitdir}"`
- else
- SYSTEMD_DIR=/usr/share/ipmiutil
- fi
+ [ --enable-systemd[=systemddir] install systemd unit file. If 'yes'
+ probe the system for unit directory.
+ If a path is specified, assume that
+ is a valid install path. [[default=disabled]]],)
+# Check whether --enable-systemd was given.
+if test "${enable_systemd+set}" = set; then :
+ withval=$enable_systemd; if test "$withval" = yes; then
+ GPL_CFLAGS="$GPL_CFLAGS -DENABLE_SYSTEMD"
+ if test -z "$systemddir"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking location of the systemd unit files directory" >&5
+ $as_echo_n "checking location of the systemd unit files directory... " >&6; }
+ _rpmdir = ""
+ which rpm >/dev/null 2>&1
+ if test $? -eq 0 ; then
+ _rpmdir = `rpm --eval "%{_unitdir}"`
+ fi
+ for systemd_d in ${datadir}/usr/share/ipmiutil ${_rpmdir} /usr/share/ipmiutil; do
+ if test -z "$systemddir"; then
+ if test -d "$systemd_d"; then
+ systemddir="$systemd_d"
+ fi
+ fi
+ done
+ fi
+ if test -n "$systemddir"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $systemddir" >&5
+ $as_echo "$systemddir" >&6; }
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+ $as_echo "not found" >&6; }
+ fi
else
- # otherwise install the systemd service scripts in the data dir
- SYSTEMD_DIR=/usr/share/ipmiutil
- if test "x$sysname" != "xDarwin" ; then
- if test "x$os" != "xhpux" ; then
- # MacOS and HP-UX: 'which' command returns 0 always
- which rpm >/dev/null 2>&1
- if test $? -eq 0 ; then
- datad=`rpm --eval "%{_datadir}"`
- SYSTEMD_DIR=${datad}/ipmiutil
- fi
- fi
- fi
+ if test "$withval" != no; then
+ systemddir=$withval
+ fi
+fi
fi
dnl start main logic
@@ -563,7 +575,7 @@ AC_SUBST(INS_LIB)
AC_SUBST(SUBDIR_S)
AC_SUBST(CROSS_CFLAGS)
AC_SUBST(CROSS_LFLAGS)
-AC_SUBST(SYSTEMD_DIR)
+AC_SUBST(systemddir)
AC_SUBST(SHR_LINK)
AC_SUBST(pkgconfigdir)
--- a/scripts/Makefile.am
+++ b/scripts/Makefile.am
@@ -17,7 +17,8 @@ cronto = ${DESTDIR}${etcdir}/cron.daily
sbinto = ${DESTDIR}${sbindir}
varto = ${DESTDIR}/var/lib/ipmiutil
initto = ${DESTDIR}@INIT_DIR@
-sysdto = ${DESTDIR}@SYSTEMD_DIR@
+sysdto = ${DESTDIR}@systemddir@
+systemddir = @systemddir@
sysvinit = ${datato}
sbinfls = ialarms ihealth ifru igetevent ireset icmd isol ilan isensor isel iserial iwdt iconfig ipicmg ifirewall ifwum ihpm iuser
@@ -47,10 +48,13 @@ install:
${INSTALL_SCRIPT_SH} ipmi_port.sh ${sysvinit}/ipmi_port
${INSTALL_SCRIPT_SH} ipmi_info ${sysvinit}/ipmi_info
${INSTALL_SCRIPT_SH} checksel ${datato}
- ${INSTALL_DATA_SH} ipmiutil_wdt.service ${sysdto}
- ${INSTALL_DATA_SH} ipmiutil_asy.service ${sysdto}
- ${INSTALL_DATA_SH} ipmiutil_evt.service ${sysdto}
- ${INSTALL_DATA_SH} ipmi_port.service ${sysdto}
+ if [ ! -z "${systemddir}" ]; then \
+ $(MKDIR) ${sysdto}; \
+ ${INSTALL_DATA_SH} ipmiutil_wdt.service ${sysdto}; \
+ ${INSTALL_DATA_SH} ipmiutil_asy.service ${sysdto}; \
+ ${INSTALL_DATA_SH} ipmiutil_evt.service ${sysdto}; \
+ ${INSTALL_DATA_SH} ipmi_port.service ${sysdto}; \
+ fi
${INSTALL_SCRIPT_SH} ipmiutil.env.template ${datato}
${INSTALL_SCRIPT_SH} ipmiutil.env.template ${datato}/ipmiutil.env
${INSTALL_SCRIPT_SH} ipmiutil.pre ${datato}