diff options
author | Armin Kuster <akuster808@gmail.com> | 2017-10-26 13:42:54 -0700 |
---|---|---|
committer | Armin Kuster <akuster808@gmail.com> | 2018-03-01 16:10:36 -0800 |
commit | a53cb5a94488b62ed919bac17e1509c18b329d16 (patch) | |
tree | 83d07a7bb9dc0c6c1b760671adfd4476349f8985 /meta-oe/recipes-kernel | |
parent | c9ac78c9d1ac2ad17ab145d074cb45605879f201 (diff) | |
download | meta-openembedded-a53cb5a94488b62ed919bac17e1509c18b329d16.tar.gz |
ipmiutil: move to recipes-kernel
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Diffstat (limited to 'meta-oe/recipes-kernel')
-rw-r--r-- | meta-oe/recipes-kernel/ipmiutil/ipmiutil/fix_systemd_path.patch | 127 | ||||
-rw-r--r-- | meta-oe/recipes-kernel/ipmiutil/ipmiutil_3.0.5.bb | 46 |
2 files changed, 173 insertions, 0 deletions
diff --git a/meta-oe/recipes-kernel/ipmiutil/ipmiutil/fix_systemd_path.patch b/meta-oe/recipes-kernel/ipmiutil/ipmiutil/fix_systemd_path.patch new file mode 100644 index 000000000..33116b3c0 --- /dev/null +++ b/meta-oe/recipes-kernel/ipmiutil/ipmiutil/fix_systemd_path.patch | |||
@@ -0,0 +1,127 @@ | |||
1 | allow systemd path to be defined by configure option. | ||
2 | |||
3 | The configure probes the host for systemd path information. | ||
4 | |||
5 | Upstream Status: Inappropriate [Embedded] | ||
6 | |||
7 | Signed-off-By: Armin Kuster <akuster@mvista.com> | ||
8 | |||
9 | Index: ipmiutil-3.0.5/configure.ac | ||
10 | =================================================================== | ||
11 | --- ipmiutil-3.0.5.orig/configure.ac | ||
12 | +++ ipmiutil-3.0.5/configure.ac | ||
13 | @@ -149,7 +149,6 @@ CROSS_LFLAGS="" | ||
14 | CROSS_CFLAGS="" | ||
15 | LIBSENSORS="" | ||
16 | SAM2OBJ="isensor2.o ievents2.o" | ||
17 | -SYSTEMD_DIR=/usr/share/ipmiutil | ||
18 | |||
19 | AC_ARG_ENABLE([useflags], | ||
20 | [ --enable-useflags include environment CFLAGS and LDFLAGS.], | ||
21 | @@ -200,29 +199,42 @@ AC_ARG_ENABLE([gpl], | ||
22 | |||
23 | dnl Does this Linux have systemd enabled? Otherwise use sysv init. | ||
24 | AC_ARG_ENABLE([systemd], | ||
25 | - [ --enable-systemd enable systemd service type=notify support and %_unitdir [[default=disabled]]],) | ||
26 | -if test "x$enable_systemd" = "xyes"; then | ||
27 | - GPL_CFLAGS="$GPL_CFLAGS -DENABLE_SYSTEMD" | ||
28 | - # if systemd enabled, install service scripts in unitdir | ||
29 | - which rpm >/dev/null 2>&1 | ||
30 | - if test $? -eq 0 ; then | ||
31 | - SYSTEMD_DIR=`rpm --eval "%{_unitdir}"` | ||
32 | - else | ||
33 | - SYSTEMD_DIR=/usr/share/ipmiutil | ||
34 | - fi | ||
35 | + [ --enable-systemd[=systemddir] install systemd unit file. If 'yes' | ||
36 | + probe the system for unit directory. | ||
37 | + If a path is specified, assume that | ||
38 | + is a valid install path. [[default=disabled]]],) | ||
39 | +# Check whether --enable-systemd was given. | ||
40 | +if test "${enable_systemd+set}" = set; then : | ||
41 | + withval=$enable_systemd; if test "$withval" = yes; then | ||
42 | + GPL_CFLAGS="$GPL_CFLAGS -DENABLE_SYSTEMD" | ||
43 | + if test -z "$systemddir"; then | ||
44 | + { $as_echo "$as_me:${as_lineno-$LINENO}: checking location of the systemd unit files directory" >&5 | ||
45 | + $as_echo_n "checking location of the systemd unit files directory... " >&6; } | ||
46 | + _rpmdir = "" | ||
47 | + which rpm >/dev/null 2>&1 | ||
48 | + if test $? -eq 0 ; then | ||
49 | + _rpmdir = `rpm --eval "%{_unitdir}"` | ||
50 | + fi | ||
51 | + for systemd_d in ${datadir}/usr/share/ipmiutil ${_rpmdir} /usr/share/ipmiutil; do | ||
52 | + if test -z "$systemddir"; then | ||
53 | + if test -d "$systemd_d"; then | ||
54 | + systemddir="$systemd_d" | ||
55 | + fi | ||
56 | + fi | ||
57 | + done | ||
58 | + fi | ||
59 | + if test -n "$systemddir"; then | ||
60 | + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $systemddir" >&5 | ||
61 | + $as_echo "$systemddir" >&6; } | ||
62 | + else | ||
63 | + { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5 | ||
64 | + $as_echo "not found" >&6; } | ||
65 | + fi | ||
66 | else | ||
67 | - # otherwise install the systemd service scripts in the data dir | ||
68 | - SYSTEMD_DIR=/usr/share/ipmiutil | ||
69 | - if test "x$sysname" != "xDarwin" ; then | ||
70 | - if test "x$os" != "xhpux" ; then | ||
71 | - # MacOS and HP-UX: 'which' command returns 0 always | ||
72 | - which rpm >/dev/null 2>&1 | ||
73 | - if test $? -eq 0 ; then | ||
74 | - datad=`rpm --eval "%{_datadir}"` | ||
75 | - SYSTEMD_DIR=${datad}/ipmiutil | ||
76 | - fi | ||
77 | - fi | ||
78 | - fi | ||
79 | + if test "$withval" != no; then | ||
80 | + systemddir=$withval | ||
81 | + fi | ||
82 | +fi | ||
83 | fi | ||
84 | |||
85 | dnl start main logic | ||
86 | @@ -528,7 +540,7 @@ AC_SUBST(INS_LIB) | ||
87 | AC_SUBST(SUBDIR_S) | ||
88 | AC_SUBST(CROSS_CFLAGS) | ||
89 | AC_SUBST(CROSS_LFLAGS) | ||
90 | -AC_SUBST(SYSTEMD_DIR) | ||
91 | +AC_SUBST(systemddir) | ||
92 | AC_SUBST(SHR_LINK) | ||
93 | AC_SUBST(pkgconfigdir) | ||
94 | |||
95 | Index: ipmiutil-3.0.5/scripts/Makefile.am | ||
96 | =================================================================== | ||
97 | --- ipmiutil-3.0.5.orig/scripts/Makefile.am | ||
98 | +++ ipmiutil-3.0.5/scripts/Makefile.am | ||
99 | @@ -17,7 +17,8 @@ cronto = ${DESTDIR}${etcdir}/cron.daily | ||
100 | sbinto = ${DESTDIR}${sbindir} | ||
101 | varto = ${DESTDIR}/var/lib/ipmiutil | ||
102 | initto = ${DESTDIR}@INIT_DIR@ | ||
103 | -sysdto = ${DESTDIR}@SYSTEMD_DIR@ | ||
104 | +sysdto = ${DESTDIR}@systemddir@ | ||
105 | +systemddir = @systemddir@ | ||
106 | sysvinit = ${datato} | ||
107 | sbinfls = ialarms ihealth ifru igetevent ireset icmd isol ilan isensor isel iserial iwdt iconfig ipicmg ifirewall ifwum ihpm iuser | ||
108 | |||
109 | @@ -47,10 +48,14 @@ install: | ||
110 | ${INSTALL_SCRIPT_SH} ipmi_port.sh ${sysvinit}/ipmi_port | ||
111 | ${INSTALL_SCRIPT_SH} ipmi_info ${sysvinit}/ipmi_info | ||
112 | ${INSTALL_SCRIPT_SH} checksel ${datato} | ||
113 | - ${INSTALL_DATA_SH} ipmiutil_wdt.service ${sysdto} | ||
114 | - ${INSTALL_DATA_SH} ipmiutil_asy.service ${sysdto} | ||
115 | - ${INSTALL_DATA_SH} ipmiutil_evt.service ${sysdto} | ||
116 | - ${INSTALL_DATA_SH} ipmi_port.service ${sysdto} | ||
117 | + | ||
118 | + if [ ! -z "${systemddir}" ]; then \ | ||
119 | + $(MKDIR) ${sysdto}; \ | ||
120 | + ${INSTALL_DATA_SH} ipmiutil_wdt.service ${sysdto}; \ | ||
121 | + ${INSTALL_DATA_SH} ipmiutil_asy.service ${sysdto}; \ | ||
122 | + ${INSTALL_DATA_SH} ipmiutil_evt.service ${sysdto}; \ | ||
123 | + ${INSTALL_DATA_SH} ipmi_port.service ${sysdto}; \ | ||
124 | + fi | ||
125 | ${INSTALL_SCRIPT_SH} ipmiutil.env ${datato} | ||
126 | ${INSTALL_SCRIPT_SH} ipmiutil.pre ${datato} | ||
127 | ${INSTALL_SCRIPT_SH} ipmiutil.setup ${datato} | ||
diff --git a/meta-oe/recipes-kernel/ipmiutil/ipmiutil_3.0.5.bb b/meta-oe/recipes-kernel/ipmiutil/ipmiutil_3.0.5.bb new file mode 100644 index 000000000..338cafd53 --- /dev/null +++ b/meta-oe/recipes-kernel/ipmiutil/ipmiutil_3.0.5.bb | |||
@@ -0,0 +1,46 @@ | |||
1 | SUMMARY = "ipmiutil is an easy-to-use set of IPMI server management utilities.\ | ||
2 | It can get/set sensor thresholds, automate SEL management, do SOL console, etc." | ||
3 | |||
4 | DESCRIPTION = "The IPMI Management Utilities currently work with platforms that \ | ||
5 | support the IPMI 1.5 or 2.0 specification. IPMI servers can be managed\ | ||
6 | locally, or remotely via IPMI LAN, even when the OS or main CPU is not\ | ||
7 | functional.\n \ | ||
8 | The ipmiutil utilities will use an IPMI Driver, either the Intel IPMI package \ | ||
9 | (ipmidrvr, /dev/imb), MontaVista OpenIPMI (/dev/ipmi0), the valinux IPMI \ | ||
10 | Driver (/dev/ipmikcs), or the LANDesk ldipmi daemon. The ipmiutil utilities \ | ||
11 | can also use direct user-space I/Os in Linux or FreeBSD if no IPMI driver \ | ||
12 | is detected." | ||
13 | |||
14 | HOMEPAGE = "http://ipmiutil.sourceforge.net" | ||
15 | LICENSE = "BSD-2-Clause" | ||
16 | LIC_FILES_CHKSUM = "file://COPYING;md5=626a5970304daa1fcb87f757fb42b795" | ||
17 | |||
18 | DEPENDS += "openssl" | ||
19 | |||
20 | PARALLEL_MAKE = "" | ||
21 | |||
22 | SRC_URI = "${SOURCEFORGE_MIRROR}/ipmiutil/ipmiutil-${PV}.tar.gz \ | ||
23 | file://fix_systemd_path.patch \ | ||
24 | " | ||
25 | SRC_URI[md5sum] = "5feaf6a827205792e057bb4ff5c4e842" | ||
26 | SRC_URI[sha256sum] = "b2d7f72535131c7832ba4be13dc33c81513fc3ee43fe797b4b52014600ecee5e" | ||
27 | |||
28 | inherit autotools-brokensep pkgconfig systemd | ||
29 | |||
30 | PACKAGECONFIG ?= "lanplus gpl" | ||
31 | PACKAGECONFIG += "${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}" | ||
32 | PACKAGECONFIG[systemd] = "--enable-systemd=${datadir}/${BPN}, --enable-systemd=no" | ||
33 | PACKAGECONFIG[sha256] = "--enable-sha256, --enable-sha256=no, openssl-native, openssl" | ||
34 | PACKAGECONFIG[lanplus] = "--enable-lanplus, --enable-lanplus=no, openssl-native, openssl" | ||
35 | PACKAGECONFIG[landesk] = "--enable-landesk, --enable-landesk=no" | ||
36 | PACKAGECONFIG[sensors] = "--enable-libsensors, --enable-libsensors=no" | ||
37 | |||
38 | #build with some GPL code | ||
39 | PACKAGECONFIG[gpl] = "--enable-gpl, --enable-gpl=no" | ||
40 | #no GPL or LanPlus libs | ||
41 | PACKAGECONFIG[standalone] = "--enable-standalone, --enable-standalone=no" | ||
42 | |||
43 | CFLAGS += "-I${STAGING_INCDIR}" | ||
44 | LDFLAGS += "-L${STAGING_LIBDIR}" | ||
45 | |||
46 | COMPATIBLE_HOST = '(x86_64|i.86).*-linux' | ||