rpms/OpenIPMI/devel OpenIPMI-1.4.14-oob.patch, NONE, 1.1 openipmi.initscript, NONE, 1.1 openipmi.sysconf, NONE, 1.1 .cvsignore, 1.3, 1.4 OpenIPMI.spec, 1.6, 1.7 sources, 1.3, 1.4

fedora-cvs-commits at redhat.com fedora-cvs-commits at redhat.com
Mon Jun 27 14:57:08 UTC 2005


Author: pknirsch

Update of /cvs/dist/rpms/OpenIPMI/devel
In directory cvs.devel.redhat.com:/tmp/cvs-serv8006

Modified Files:
	.cvsignore OpenIPMI.spec sources 
Added Files:
	OpenIPMI-1.4.14-oob.patch openipmi.initscript openipmi.sysconf 
Log Message:
- Updated to OpenIPMI-1.4.14
- Split the main package into normal and libs package for multilib support
- Added impitool-1.8.2 to OpenIPMI and put it in tools package
- Added sysconf and initscript (#158270)
- Fixed oob subscripts (#149142)


OpenIPMI-1.4.14-oob.patch:
 ipmi.c |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

--- NEW FILE OpenIPMI-1.4.14-oob.patch ---
--- OpenIPMI-1.4.14/lib/ipmi.c.oob	2005-06-27 16:46:46.000000000 +0200
+++ OpenIPMI-1.4.14/lib/ipmi.c	2005-06-27 16:52:30.000000000 +0200
@@ -981,17 +981,17 @@
     int             smi_intf;
 
     char            *str_addr[2];
-    char            *str_port[2];
+    char            *str_port[3];
     int             num_addr;
     int             authtype_set;
     int             authtype;
     int             privilege;
     int             privilege_set;
     int             username_set;
-    char            username[16];
+    char            username[17];
     unsigned int    username_len;
     int             password_set;
-    char            password[16];
+    char            password[17];
     unsigned int    password_len;
 
     unsigned char   swid;
@@ -1350,6 +1350,8 @@
 	ipmi_mem_free(args->str_port[0]);
     if (args->str_port[1])
 	ipmi_mem_free(args->str_port[1]);
+    if (args->str_port[2])
+	ipmi_mem_free(args->str_port[2]);
     ipmi_mem_free(args);
 }
 


--- NEW FILE openipmi.initscript ---
#!/bin/sh
#############################################################################
#
# ipmi:		OpenIPMI Driver init script
#
# Authors:	Matt Domsch <Matt_Domsch at dell.com>
#               Chris Poblete <Chris_Poblete at dell.com>
#
# chkconfig: - 04 96
# description: OpenIPMI Driver init script
#
### BEGIN INIT INFO
# Provides: ipmidrv
# Required-Start: $localfs $remotefs $syslog
# Required-Stop: $localfs $remotefs $syslog
# Default-Start:
# Default-Stop:
# Short-Description: OpenIPMI Driver init script
# Description: OpenIPMI Driver init script
### END INIT INFO
#
#############################################################################
# for log_success_msg and friends
[ -r /lib/lsb/init-functions ] && . /lib/lsb/init-functions
# source config info
[ -r /etc/sysconfig/ipmi ] && . /etc/sysconfig/ipmi

#############################################################################
# GLOBALS
#############################################################################
MODULE_NAME="ipmi"
INTF_NUM=0

IPMI_SMB_MODULE_NAME="ipmi_smb"
IPMI_SI_MODULE_NAME="ipmi_si"
kernel=`uname -r | cut -d. -f1-2`
if [ "${kernel}" == "2.4" ]; then
    IPMI_SMB_MODULE_NAME="ipmi_smb_intf"
    IPMI_SI_MODULE_NAME="ipmi_si_drv"
fi

MODULES="ipmi_radisys ipmi_imb ipmi_poweroff ipmi_watchdog \
	ipmi_devintf ${IPMI_SMB_MODULE_NAME} ${IPMI_SI_MODULE_NAME} \
        ipmi_msghandler"


RETVAL=0
LOCKFILE=/var/lock/subsys/ipmi

#############################################################################
start_watchdog()
{
    if [ "${IPMI_WATCHDOG}" = "1" ]; then
	modprobe ipmi_watchdog || RETVAL=2
    fi
}

stop_watchdog()
{
    modprobe -r ipmi_watchdog
}

start_powercontrol()
{
    local poweroff_opts=""
    if [ "${IPMI_POWEROFF}" = "1" ]; then
	[ "${IPMI_POWERCYCLE}" == "1" ] && poweroff_opts="chassis_ctrl_cmd_param=2"
	modprobe ipmi_poweroff "${poweroff_opts}" || RETVAL=2
    fi
}

stop_powercontrol()
{
    modprobe -r ipmi_poweroff
}

#############################################################################
load_ipmi_modules ()
{
	modprobe ipmi_msghandler || RETVAL=1
	if [ "${IPMI_SI}" = "1" ]; then
	    modprobe ${IPMI_SI_MODULE_NAME} || RETVAL=1
	fi
	if [ "${IPMI_SMB}" = "1" ]; then
	    modprobe ${IPMI_SMB_MODULE_NAME} || RETVAL=1
	fi
	[ "${RETVAL}" = "1" ] && return

	if [ "${DEV_IPMI}" = "1" ]; then
	    modprobe ipmi_devintf || RETVAL=2
	    if [ "${RETVAL}" != "2" ]; then
                # Note, this really should be done by udev on 2.6
		DEVMAJOR=`cat /proc/devices | awk '/ipmidev/{print $1}'`
		mknod -m 0600 /dev/ipmi${INTF_NUM} c ${DEVMAJOR} 0 || RETVAL=2
		ln -sf /dev/ipmi${INTF_NUM} /dev/ipmi || RETVAL=2
	    fi
	fi

	start_watchdog
	start_powercontrol
	if [ "${IPMI_IMB}" = "1" ]; then
	    modprobe ipmi_imb || RETVAL=2
	    # FIXME create canonical /dev/foo entry
	fi
	if [ "${IPMI_RADISYS}" = "1" ]; then
	    modprobe ipmi_radisys || RETVAL=2
	    # FIXME create canonical /dev/foo entry
	fi
	return
}

#############################################################################
unload_ipmi_modules()
{
    # Note, deleting these /dev files really should be done by udev
    # so this function will change soon as the driver changes
    # to allow such to happen automatically.
    rm -f "/dev/ipmi${INTF_NUM}"
    rm -f "/dev/ipmi"
    for m in ${MODULES}; do
	    modprobe -q -r ${m}
    done
}

#############################################################################
start()
{
    echo -n $"Starting ${MODULE_NAME} drivers: "
    load_ipmi_modules
    [ "${RETVAL}" = "1" ] && log_failure_msg && return
    [ "${RETVAL}" = "2" ] && touch ${LOCKFILE} && log_warning_msg
    [ "${RETVAL}" = "0" ] && touch ${LOCKFILE} && log_success_msg
}

#############################################################################
stop()
{
    echo -n $"Stopping ${MODULE_NAME} drivers: "
    unload_ipmi_modules
    rm -f ${LOCKFILE}
    log_success_msg
}

#############################################################################
restart()
{
    stop
    start
}

#############################################################################
status ()
{
    for m in ${MODULES}; do
        if /sbin/lsmod | grep $m >/dev/null 2>&1 ; then
            echo "$m module loaded"
        else
            echo "$m module not loaded"
        fi
    done
}

usage ()
{
		echo $"Usage: $0 {start|stop|status|restart|condrestart|"
		echo $"          start-watchdog|stop-watchdog|start-powercontrol|stop-powercontrol}" 1>&2
		RETVAL=1
}

condrestart ()
{
    [ -e ${LOCKFILE} ] && restart
}

#############################################################################
# MAIN
#############################################################################
case "$1" in
	start) start ;;
	stop)  stop ;;
	restart) restart ;;
	status)	status ;;
	condrestart) condrestart ;;
	start-watchdog) start_watchdog ;;
	stop-watchdog) stop_watchdog ;;
	start-powercontrol) start_powercontrol ;;
	stop-powercontrol) stop_powercontrol ;;
	*) usage ;;
esac

exit ${RETVAL}

#############################################################################
# end of file
#############################################################################


--- NEW FILE openipmi.sysconf ---
# Enable standard hardware interfaces (KCS, BT, SMIC)
# You probably want this enabled.
IPMI_SI=1

# Enable nonstandard interfaces (SMB via i2c)
# IPMI_SMB=1

# Enable /dev/ipmi0 interface, used by ipmitool, ipmicmd,
# and other userspace IPMI-using applications.
# You probably want this enabled.
DEV_IPMI=1

# Enable IPMI_WATCHDOG if you want the IPMI watchdog
# to reboot the system if it hangs
# IPMI_WATCHDOG=1

# Enable IPMI_POWEROFF if you want the IPMI
# poweroff module to be loaded.
# IPMI_POWEROFF=1

# Enable IPMI_POWERCYCLE if you want the system to be power-cycled (power
# down, delay briefly, power on) rather than power off, on systems
# that support such.  IPMI_POWEROFF=1 is also required.
# IPMI_POWERCYCLE=1

# Enable "legacy" interfaces for applications
# Intel IMB driver interface
# IPMI_IMB=1
# Radisys driver interface
# IPMI_RADISYS=1


Index: .cvsignore
===================================================================
RCS file: /cvs/dist/rpms/OpenIPMI/devel/.cvsignore,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- .cvsignore	8 Feb 2005 12:46:28 -0000	1.3
+++ .cvsignore	27 Jun 2005 14:57:04 -0000	1.4
@@ -1 +1,2 @@
 OpenIPMI-1.4.11.tar.gz
+ipmitool-1.8.2.tar.gz


Index: OpenIPMI.spec
===================================================================
RCS file: /cvs/dist/rpms/OpenIPMI/devel/OpenIPMI.spec,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- OpenIPMI.spec	30 Mar 2005 16:05:00 -0000	1.6
+++ OpenIPMI.spec	27 Jun 2005 14:57:04 -0000	1.7
@@ -1,18 +1,40 @@
+%define ipmitoolver 1.8.2
 Summary: OpenIPMI (Intelligent Platform Management Interface) library and tools
 Name: OpenIPMI
-Version: 1.4.11
-Release: 5
+Version: 1.4.14
+Release: 1
 License: GPL
 Group: System Environment/Base
+URL: http://sourceforge.net/projects/openipmi/
 Source: http://prdownloads.sourceforge.net/openipmi/%{name}-%{version}.tar.gz
+Source2: http://prdownloads.sourceforge.net/ipmitool/ipmitool-%{ipmitoolver}.tar.gz
+Source3: openipmi.sysconf
+Source4: openipmi.initscript
 Patch1: OpenIPMI-1.4.11-gcc4.patch
+Patch2: OpenIPMI-1.4.14-oob.patch
 BuildRoot: /var/tmp/%{name}-%{version}-root
 BuildPrereq: gdbm-devel swig
 
 %description
 The Open IPMI project aims to develop an open code base to allow access to
 platform information using Intelligent Platform Management Interface (IPMI).
-This package contains the runtime libraries and tools of the OpenIPMI project.
+This package contains the tools of the OpenIPMI project.
+
+%package libs
+Group: Development/Libraries
+Summary: The OpenIPMI runtime libraries
+
+%description libs
+The OpenIPMI-libs package contains the runtime libraries for shared binaries
+and applications.
+
+%package tools
+Group: Applications/System
+Summary: OpenIPMI utilities and scripts from ipmitool
+
+%description tools
+The OpenIPMI-tools package contains the addon utilities and script from the
+ipmitool project.
 
 %package devel
 Group: Development/Libraries
@@ -24,37 +46,91 @@
 of the OpenIPMI project.
 
 %prep
-%setup -q
+%setup -q -a 2
 %patch1 -p1 -b .gcc4
+%patch2 -p1 -b .oob
 
 %build
 %configure
 make
+pushd ipmitool-%{ipmitoolver}
+%configure
+make
+popd
 
 %install
 %makeinstall
 rm -rf $RPM_BUILD_ROOT/%{_libdir}/*.la
+pushd ipmitool-%{ipmitoolver}
+%makeinstall
+rm -rf $RPM_BUILD_ROOT/%{_datadir}/doc/
+popd
+
+install -d ${RPM_BUILD_ROOT}%{_sysconfdir}/sysconfig
+install -m 644 %SOURCE3 ${RPM_BUILD_ROOT}%{_sysconfdir}/sysconfig/ipmi
+install -d ${RPM_BUILD_ROOT}%{_initrddir}
+install -m 755 %SOURCE4 ${RPM_BUILD_ROOT}%{_initrddir}/ipmi
+
+%post
+/sbin/chkconfig --add ipmi
+
+%preun
+if [ $1 = 0 ]; then
+   service impi stop >/dev/null 2>&1
+   /sbin/chkconfig --del ipmi
+fi
+
+%postun
+if [ "$1" -ge "1" ]; then
+    service ipmi condrestart >/dev/null 2>&1 || :
+fi
+
+%post libs -p /sbin/ldconfig
+
+%postun libs -p /sbin/ldconfig
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
 %files
 %defattr(-,root,root)
-%{_bindir}/*
-%{_libdir}/*.so.*
-%{_libdir}/pkgconfig/*
-%{_mandir}/man[178]/*
+%config(noreplace) %{_sysconfdir}/sysconfig/ipmi
+%config(noreplace) %{_initrddir}/ipmi
+%{_bindir}/ipmi_ui
+%{_bindir}/ipmicmd
+%{_bindir}/ipmilan
+%{_bindir}/ipmish
+%{_mandir}/man[18]/*
 %{_libdir}/perl5/site_perl/*/*-linux-thread-multi/OpenIPMI.pm
 %dir %{_libdir}/perl5/site_perl/*/*-linux-thread-multi/auto/OpenIPMI
 %{_libdir}/perl5/site_perl/*/*-linux-thread-multi/auto/OpenIPMI/*
 
+%files tools
+%defattr(-,root,root)
+%{_datadir}/ipmitool/
+%{_bindir}/ipmitool
+/usr/sbin/ipmievd
+
+%files libs
+%defattr(-,root,root)
+%{_libdir}/*.so.*
+%{_libdir}/pkgconfig/*
+
 %files devel
 %defattr(-,root,root)
+%{_mandir}/man7/*
 %{_includedir}/OpenIPMI
 %{_libdir}/*.so
 %{_libdir}/*.a
 
 %changelog
+* Mon Jun 27 2005 Phil Knirsch <pknirsch at redhat.com> 1.4.14-2
+- Updated to OpenIPMI-1.4.14
+- Split the main package into normal and libs package for multilib support
+- Added impitool-1.8.2 to OpenIPMI and put it in tools package
+- Added sysconf and initscript (#158270)
+- Fixed oob subscripts (#149142)
+
 * Wed Mar 30 2005 Phil Knirsch <pknirsch at redhat.com> 1.4.11-5
 - Correctly put libs in the proper packages
 


Index: sources
===================================================================
RCS file: /cvs/dist/rpms/OpenIPMI/devel/sources,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- sources	8 Feb 2005 12:46:28 -0000	1.3
+++ sources	27 Jun 2005 14:57:04 -0000	1.4
@@ -1 +1,2 @@
-6ca47bafdf25d54dc07b87c8f3726af2  OpenIPMI-1.4.11.tar.gz
+06fc4b2c8d758f4f9187f0065188542b  OpenIPMI-1.4.14.tar.gz
+d249ddd2176385fcea93753f5e103160  ipmitool-1.8.2.tar.gz




More information about the fedora-cvs-commits mailing list