diff options
28 files changed, 1038 insertions, 118 deletions
diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..37c7f74 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +.bzr +.bzrignore +.pc diff --git a/config.h.in~ b/config.h.in~ deleted file mode 100644 index 95d7e2c..0000000 --- a/config.h.in~ +++ /dev/null @@ -1,118 +0,0 @@ -/* config.h.in. Generated from configure.ac by autoheader. */ - -/* Define to 1 if you have the <dlfcn.h> header file. */ -#undef HAVE_DLFCN_H - -/* Define to 1 if you don't have `vprintf' but do have `_doprnt.' */ -#undef HAVE_DOPRNT - -/* Define to 1 if you have the <fcntl.h> header file. */ -#undef HAVE_FCNTL_H - -/* Define to 1 if you have the `getpagesize' function. */ -#undef HAVE_GETPAGESIZE - -/* Define to 1 if you have the <inttypes.h> header file. */ -#undef HAVE_INTTYPES_H - -/* Define to 1 if you have the `memcpy' function. */ -#undef HAVE_MEMCPY - -/* Define to 1 if you have the <memory.h> header file. */ -#undef HAVE_MEMORY_H - -/* Define to 1 if you have a working `mmap' system call. */ -#undef HAVE_MMAP - -/* Define to 1 if you have the `select' function. */ -#undef HAVE_SELECT - -/* Define to 1 if you have the `socket' function. */ -#undef HAVE_SOCKET - -/* if socklen_t is defined, make note of it */ -#undef HAVE_SOCKLEN_T - -/* Define to 1 if you have the <stdint.h> header file. */ -#undef HAVE_STDINT_H - -/* Define to 1 if you have the <stdlib.h> header file. */ -#undef HAVE_STDLIB_H - -/* Define to 1 if you have the `strcspn' function. */ -#undef HAVE_STRCSPN - -/* Define to 1 if you have the `strdup' function. */ -#undef HAVE_STRDUP - -/* Define to 1 if you have the `strftime' function. */ -#undef HAVE_STRFTIME - -/* Define to 1 if you have the <strings.h> header file. */ -#undef HAVE_STRINGS_H - -/* Define to 1 if you have the <string.h> header file. */ -#undef HAVE_STRING_H - -/* Define to 1 if you have the `strspn' function. */ -#undef HAVE_STRSPN - -/* Define to 1 if you have the `strtoul' function. */ -#undef HAVE_STRTOUL - -/* Define to 1 if you have the <syslog.h> header file. */ -#undef HAVE_SYSLOG_H - -/* Define to 1 if you have the <sys/ioctl.h> header file. */ -#undef HAVE_SYS_IOCTL_H - -/* Define to 1 if you have the <sys/stat.h> header file. */ -#undef HAVE_SYS_STAT_H - -/* Define to 1 if you have the <sys/types.h> header file. */ -#undef HAVE_SYS_TYPES_H - -/* Define to 1 if you have the <unistd.h> header file. */ -#undef HAVE_UNISTD_H - -/* Define to 1 if you have the `vprintf' function. */ -#undef HAVE_VPRINTF - -/* Name of package */ -#undef PACKAGE - -/* Define to the address where bug reports for this package should be sent. */ -#undef PACKAGE_BUGREPORT - -/* Define to the full name of this package. */ -#undef PACKAGE_NAME - -/* Define to the full name and version of this package. */ -#undef PACKAGE_STRING - -/* Define to the one symbol short name of this package. */ -#undef PACKAGE_TARNAME - -/* Define to the version of this package. */ -#undef PACKAGE_VERSION - -/* Define to 1 if you have the ANSI C header files. */ -#undef STDC_HEADERS - -/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */ -#undef TIME_WITH_SYS_TIME - -/* Define to 1 if your <sys/time.h> declares `struct tm'. */ -#undef TM_IN_SYS_TIME - -/* Version number of package */ -#undef VERSION - -/* Define to empty if `const' does not conform to ANSI C. */ -#undef const - -/* Define to `long' if <sys/types.h> does not define. */ -#undef off_t - -/* if socklen_t is not defined, provide something useful */ -#undef socklen_t diff --git a/debian/README.Debian b/debian/README.Debian new file mode 100644 index 0000000..f4058b2 --- /dev/null +++ b/debian/README.Debian @@ -0,0 +1,6 @@ +ipmiutil for Debian +------------------- + + Please read the README.gz for setup. + + -- Jörg Frings-Fürst <debian@jff-webhosting.net> Mon, 26 May 2014 13:11:06 +0200 diff --git a/debian/README.source b/debian/README.source new file mode 100644 index 0000000..4bc7a31 --- /dev/null +++ b/debian/README.source @@ -0,0 +1,13 @@ +ipmiutil for Debian +------------------- + +- configure + parameter enable-landesk=yes does not work: + ipmiapi not found + +- copyright + Files: hpiutil/SaHpi.* + On the site http://www.saforum.org/Page/16627~375335 the file are + published under the Artistic License 2.0. + + -- Jörg Frings-Fürst <debian@jff-webhosting.net> Wed, 29 Oct 2014 16:12:18 +0100 diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 0000000..f15bbaf --- /dev/null +++ b/debian/changelog @@ -0,0 +1,5 @@ +ipmiutil (2.9.6-1) unstable; urgency=low + + * Initial release (Closes: #753881). + + -- Jörg Frings-Fürst <debian@jff-webhosting.net> Fri, 29 May 2015 08:27:28 +0200 diff --git a/debian/compat b/debian/compat new file mode 100644 index 0000000..ec63514 --- /dev/null +++ b/debian/compat @@ -0,0 +1 @@ +9 diff --git a/debian/control b/debian/control new file mode 100644 index 0000000..9570bf7 --- /dev/null +++ b/debian/control @@ -0,0 +1,26 @@ +Source: ipmiutil +Section: utils +Priority: optional +Maintainer: Jörg Frings-Fürst <debian@jff-webhosting.net> +Build-Depends: + autotools-dev, + debhelper (>= 9), + dh-autoreconf, + dh-systemd (>= 1.5), + libfreeipmi-dev (>= 1.1.5) | libopenipmi-dev (>=2.0.18), + libssl-dev +Standards-Version: 3.9.6 +Homepage: https://sourceforge.net/projects/ipmiutil/ +Vcs-Git: git://anonscm.debian.org/collab-maint/ipmiutil.git +Vcs-Browser: http://anonscm.debian.org/cgit/collab-maint/ipmiutil.git + +Package: ipmiutil +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: IPMI management utilities + ipmiutil performs a series of common IPMI server management + functions to allow administrators to perform management functions + without a learning curve. It can gather FRU inventory data, + SEL firmware log, sensors, watchdog, power control, health, + monitoring, and has an SOL console. It can write sensor thresholds, + FRU asset tags, and supports a full IPMI configuration save/restore. diff --git a/debian/copyright b/debian/copyright new file mode 100644 index 0000000..28115ba --- /dev/null +++ b/debian/copyright @@ -0,0 +1,330 @@ +Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: ipmiutil +Source: https://sourceforge.net/projects/ipmiutil/ + +Files: * +Copyright: 2002-2004 Service Availability(TM) Forum + 1999-2006 Intel Corporation + 2003 Sun Microsystems, Inc + 2009-2011 Kontron America, Inc +License: BSD-3-clause + +Files: debian/* +Copyright: 2014-2015 Jörg Frings-Fürst <debian@jff-webhosting.net> +License: BSD-3-clause + +Files: kern/bmcpanic-2.4.* + kern/bmcpanic-2.5.* +Copyright: 2003 Intel Corporation +License: GPL-2+ + +Files: kern/ipmi_kcs.patch +Copyright: 2000 San Mehat <nettwerk@valinux.com> +License: GPL-2+ + +Files: kern/linux-ipmi-* + kern/openipmi* +Copyright: 2002 MontaVista Software Inc. +License: GPL-2+ + +Files: util/AnsiTerm.* +Copyright: 2009 Robert Nelson <robertnelson@users.sourceforge.net> +License: BSD-2-clause + +Files: util/md2.h +Copyright: 2003 FreeIPMI Core Team +License: GPL-2+ with OpenSSL exception + +Files: util/md5.c +Copyright: 1999-2002 Aladdin Enterprises +License: Zlib + +Files: hpiutil/SaHpi.* +Copyright: 2002-2004 Service Availability(TM) Forum. +License: Artistic-2.0 + +License: Artistic-2.0 + Everyone is permitted to copy and distribute verbatim copies of this license + document, but changing it is not allowed. + . + Preamble + . + This license establishes the terms under which a given free software Package + may be copied, modified, distributed, and/or redistributed. The intent is that + the Copyright Holder maintains some artistic control over the development of + that Package while still keeping the Package available as open source and free + software. + . + You are always permitted to make arrangements wholly outside of this license + directly with the Copyright Holder of a given Package. If the terms of this + license do not permit the full use that you propose to make of the Package, + you should contact the Copyright Holder and seek a different licensing + arrangement. + . + Definitions + . + "Copyright Holder" means the individual(s) or organization(s) named in the + copyright notice for the entire Package. + . + "Contributor" means any party that has contributed code or other material to + the Package, in accordance with the Copyright Holder's procedures. + . + "You" and "your" means any person who would like to copy, distribute, or + modify the Package. + . + "Package" means the collection of files distributed by the Copyright Holder, + and derivatives of that collection and/or of those files. A given Package may + consist of either the Standard Version, or a Modified Version. + . + "Distribute" means providing a copy of the Package or making it accessible to + anyone else, or in the case of a company or organization, to others outside of + your company or organization. + . + "Distributor Fee" means any fee that you charge for Distributing this Package + or providing support for this Package to another party. It does not mean + licensing fees. + . + "Standard Version" refers to the Package if it has not been modified, or has + been modified only in ways explicitly requested by the Copyright Holder. + . + "Modified Version" means the Package, if it has been changed, and such changes + were not explicitly requested by the Copyright Holder. + . + "Original License" means this Artistic License as Distributed with the + Standard Version of the Package, in its current version or as it may be + modified by The Perl Foundation in the future. + . + "Source" form means the source code, documentation source, and configuration + files for the Package. + . + "Compiled" form means the compiled bytecode, object code, binary, or any other + form resulting from mechanical transformation or translation of the Source form. + . + Permission for Use and Modification Without Distribution + . + (1) You are permitted to use the Standard Version and create and use Modified + Versions for any purpose without restriction, provided that you do not + Distribute the Modified Version. + . + Permissions for Redistribution of the Standard Version + . + (2) You may Distribute verbatim copies of the Source form of the Standard + Version of this Package in any medium without restriction, either gratis or + for a Distributor Fee, provided that you duplicate all of the original + copyright notices and associated disclaimers. At your discretion, such + verbatim copies may or may not include a Compiled form of the Package. + . + (3) You may apply any bug fixes, portability changes, and other modifications + made available from the Copyright Holder. The resulting Package will still be + considered the Standard Version, and as such will be subject to the Original + License. + . + Distribution of Modified Versions of the Package as Source + . + (4) You may Distribute your Modified Version as Source (either gratis or for a + Distributor Fee, and with or without a Compiled form of the Modified Version) + provided that you clearly document how it differs from the Standard Version, + including, but not limited to, documenting any non-standard features, + executables, or modules, and provided that you do at least ONE of the + following: + . + (a) make the Modified Version available to the Copyright Holder of the + Standard Version, under the Original License, so that the Copyright Holder may + include your modifications in the Standard Version. + (b) ensure that installation of your Modified Version does not prevent the + user installing or running the Standard Version. In addition, the Modified + Version must bear a name that is different from the name of the Standard + Version. + (c) allow anyone who receives a copy of the Modified Version to make the + Source form of the Modified Version available to others under + (i) the Original License or + (ii) a license that permits the licensee to freely copy, modify and + redistribute the Modified Version using the same licensing terms that apply to + the copy that the licensee received, and requires that the Source form of the + Modified Version, and of any works derived from it, be made freely available + in that license fees are prohibited but Distributor Fees are allowed. + . + Distribution of Compiled Forms of the Standard Version or Modified Versions + without the Source + . + (5) You may Distribute Compiled forms of the Standard Version without the + Source, provided that you include complete instructions on how to get the + Source of the Standard Version. Such instructions must be valid at the time of + your distribution. If these instructions, at any time while you are carrying + out such distribution, become invalid, you must provide new instructions on + demand or cease further distribution. If you provide valid instructions or + cease distribution within thirty days after you become aware that the + instructions are invalid, then you do not forfeit any of your rights under + this license. + . + (6) You may Distribute a Modified Version in Compiled form without the Source, + provided that you comply with Section 4 with respect to the Source of the + Modified Version. + . + Aggregating or Linking the Package + . + (7) You may aggregate the Package (either the Standard Version or Modified + Version) with other packages and Distribute the resulting aggregation provided + that you do not charge a licensing fee for the Package. Distributor Fees are + permitted, and licensing fees for other components in the aggregation are + permitted. The terms of this license apply to the use and Distribution of the + Standard or Modified Versions as included in the aggregation. + . + (8) You are permitted to link Modified and Standard Versions with other works, + to embed the Package in a larger work of your own, or to build stand-alone + binary or bytecode versions of applications that include the Package, and + Distribute the result without restriction, provided the result does not expose + a direct interface to the Package. + . + Items That are Not Considered Part of a Modified Version + . + (9) Works (including, but not limited to, modules and scripts) that merely + extend or make use of the Package, do not, by themselves, cause the Package to + be a Modified Version. In addition, such works are not considered parts of the + Package itself, and are not subject to the terms of this license. + . + General Provisions + . + (10) Any use, modification, and distribution of the Standard or Modified + Versions is governed by this Artistic License. By using, modifying or + distributing the Package, you accept this license. Do not use, modify, or + distribute the Package, if you do not accept this license. + . + (11) If your Modified Version has been derived from a Modified Version made by + someone other than you, you are nevertheless required to ensure that your + Modified Version complies with the requirements of this license. + . + (12) This license does not grant you the right to use any trademark, service + mark, tradename, or logo of the Copyright Holder. + . + (13) This license includes the non-exclusive, worldwide, free-of-charge patent + license to make, have made, use, offer to sell, sell, import and otherwise + transfer the Package with respect to any patent claims licensable by the + Copyright Holder that are necessarily infringed by the Package. If you + institute patent litigation (including a cross-claim or counterclaim) against + any party alleging that the Package constitutes direct or contributory patent + infringement, then this Artistic License to you shall terminate on the date + that such litigation is filed. + . + (14) Disclaimer of Warranty: + THE PACKAGE IS PROVIDED BY THE COPYRIGHT HOLDER AND CONTRIBUTORS "AS IS' AND + WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES. THE IMPLIED WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT ARE + DISCLAIMED TO THE EXTENT PERMITTED BY YOUR LOCAL LAW. UNLESS REQUIRED BY LAW, + NO COPYRIGHT HOLDER OR CONTRIBUTOR WILL BE LIABLE FOR ANY DIRECT, INDIRECT, + INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING IN ANY WAY OUT OF THE USE OF THE + PACKAGE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +License: BSD-3-clause + All rights reserved. + . + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + 3. The name of the author may not be used to endorse or promote products + derived from this software without specific prior written permission. + . + THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + SUCH DAMAGE. + +License: BSD-2-clause + All rights reserved. + . + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + . + THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + SUCH DAMAGE. + +License: GPL-2+ + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 2 of the License, or + (at your option) any later version. + . + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + . + You should have received a copy of the GNU General Public License + along with this program. If not, see <http://www.gnu.org/licenses/>. + . + The complete text of the GNU General Public License + can be found in /usr/share/common-licenses/GPL-2 file. + +License: GPL-2+ with OpenSSL exception + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License as + published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. + . + This program is distributed in the hope that it will be useful, but + is provided AS IS, WITHOUT ANY WARRANTY; without even the implied + warranty of MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, and + NON-INFRINGEMENT. See the GNU General Public License for more details. + . + You should have received a copy of the GNU General Public License + along with this program. If not, see <http://www.gnu.org/licenses/>. + . + The complete text of the GNU General Public License + can be found in /usr/share/common-licenses/GPL-2 file. + . + In addition, as a special exception, the copyright holders give + permission to link the code of portions of this program with the + OpenSSL library under certain conditions as described in each + individual source file, and distribute linked combinations + including the two. + You must obey the GNU General Public License in all respects + for all of the code used other than OpenSSL. If you modify + file(s) with this exception, you may extend this exception to your + version of the file(s), but you are not obligated to do so. If you + do not wish to do so, delete this exception statement from your + version. If you delete this exception statement from all source + files in the program, then also delete it here. + +License: Zlib + This software is provided 'as-is', without any express or implied + warranty. In no event will the authors be held liable for any damages + arising from the use of this software. + . + Permission is granted to anyone to use this software for any purpose, + including commercial applications, and to alter it and redistribute it + freely, subject to the following restrictions: + . + 1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would be + appreciated but is not required. + 2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. + 3. This notice may not be removed or altered from any source distribution. diff --git a/debian/docs b/debian/docs new file mode 100644 index 0000000..5502ed8 --- /dev/null +++ b/debian/docs @@ -0,0 +1,3 @@ +NEWS +README +TODO diff --git a/debian/ipmiutil.cron.daily b/debian/ipmiutil.cron.daily new file mode 120000 index 0000000..9241b18 --- /dev/null +++ b/debian/ipmiutil.cron.daily @@ -0,0 +1 @@ +../scripts/checksel
\ No newline at end of file diff --git a/debian/ipmiutil.ipmi_port.init b/debian/ipmiutil.ipmi_port.init new file mode 120000 index 0000000..2ab7329 --- /dev/null +++ b/debian/ipmiutil.ipmi_port.init @@ -0,0 +1 @@ +../scripts/ipmi_port.sh
\ No newline at end of file diff --git a/debian/ipmiutil.ipmi_port.service b/debian/ipmiutil.ipmi_port.service new file mode 120000 index 0000000..f541dda --- /dev/null +++ b/debian/ipmiutil.ipmi_port.service @@ -0,0 +1 @@ +../scripts/ipmi_port.service
\ No newline at end of file diff --git a/debian/ipmiutil.ipmiutil_asy.init b/debian/ipmiutil.ipmiutil_asy.init new file mode 120000 index 0000000..b710118 --- /dev/null +++ b/debian/ipmiutil.ipmiutil_asy.init @@ -0,0 +1 @@ +../scripts/ipmiutil_asy
\ No newline at end of file diff --git a/debian/ipmiutil.ipmiutil_asy.service b/debian/ipmiutil.ipmiutil_asy.service new file mode 120000 index 0000000..2ffb952 --- /dev/null +++ b/debian/ipmiutil.ipmiutil_asy.service @@ -0,0 +1 @@ +../scripts/ipmiutil_asy.service
\ No newline at end of file diff --git a/debian/ipmiutil.ipmiutil_evt.init b/debian/ipmiutil.ipmiutil_evt.init new file mode 120000 index 0000000..192ca21 --- /dev/null +++ b/debian/ipmiutil.ipmiutil_evt.init @@ -0,0 +1 @@ +../scripts/ipmiutil_evt
\ No newline at end of file diff --git a/debian/ipmiutil.ipmiutil_evt.service b/debian/ipmiutil.ipmiutil_evt.service new file mode 120000 index 0000000..fda1c39 --- /dev/null +++ b/debian/ipmiutil.ipmiutil_evt.service @@ -0,0 +1 @@ +../scripts/ipmiutil_evt.service
\ No newline at end of file diff --git a/debian/ipmiutil.ipmiutil_wdt.init b/debian/ipmiutil.ipmiutil_wdt.init new file mode 120000 index 0000000..73359a6 --- /dev/null +++ b/debian/ipmiutil.ipmiutil_wdt.init @@ -0,0 +1 @@ +../scripts/ipmiutil_wdt
\ No newline at end of file diff --git a/debian/ipmiutil.ipmiutil_wdt.service b/debian/ipmiutil.ipmiutil_wdt.service new file mode 120000 index 0000000..644b77d --- /dev/null +++ b/debian/ipmiutil.ipmiutil_wdt.service @@ -0,0 +1 @@ +../scripts/ipmiutil_wdt.service
\ No newline at end of file diff --git a/debian/ipmiutuil.ipmi_port.init b/debian/ipmiutuil.ipmi_port.init new file mode 100755 index 0000000..85539ea --- /dev/null +++ b/debian/ipmiutuil.ipmi_port.init @@ -0,0 +1,187 @@ +#! /bin/sh +# +# ipmi_port +# +# chkconfig: 345 91 07 +# description: ipmi_port reserves the IPMI RMCP port 623 from portmap +# which prevents portmap from trying to use port 623. +# This script also applies any saved IPMI thresholds, and +# copies the bmclanpet.mib to where SNMP can find it. +# It is recommended that this service be started for +# all systems with ipmiutil that also have portmap. +# +### BEGIN INIT INFO +# Provides: ipmi_port +# Required-Start: $local_fs $network $remote_fs +# Required-Stop: $local_fs $network $remote_fs +# Default-Start: 3 4 5 3 4 5 +# Default-Stop: 0 1 2 6 0 1 2 6 +# Short-Description: ipmi_port reserves the RMCP port from portmap +# Description: ipmi_port is used to reserve the RMCP port from portmap +### END INIT INFO +# +#if [ -f /etc/init.d/functions ]; then +# Source function library. +#. /etc/init.d/functions +#fi + +name=ipmi_port +progdir=/usr/sbin +prog="$progdir/$name" +lockfile=/var/lock/subsys/$name +portmap=/etc/init.d/portmap +shardir=/usr/share +mibdir=$shardir/snmp/mibs +datadir=$shardir/ipmiutil +vardir=/var/lib/ipmiutil +ifout=${vardir}/ipmi_if.txt +sensorout=${vardir}/sensor_out.txt +threshout=${vardir}/thresh_out.txt +# This threshold script could be created by ipmiutil sensor -p ... +thresh="${vardir}/thresholds.sh" + +getpid () { + # This is messy if the parent script is same name as $1 + p=`ps -ef |grep "$1" |grep -v grep |awk '{print $2}'` + echo $p +} + +start() +{ + echo -n $"Starting $name: " + echo + retval=1 + PID=0 + + mkdir -p $vardir + # if [ ! -f $ifout ]; then + # ${datadir}/ipmi_if.sh + # fi + if [ ! -f $sensorout ]; then + # Capture a snapshot of IPMI sensor data for later reuse. + ipmiutil sensor -q >$sensorout + fi + if [ -f $thresh ] + then + # apply saved IPMI sensor thresholds, if any + sh $thresh >$threshout 2>&1 + fi + if [ -d ${mibdir} ] + then + # put bmclanpet MIB where SNMP can find it + cp -f $datadir/bmclanpet.mib ${mibdir}/BMCLAN-PET-MIB.txt + fi + + dpc=`getpid dpcproxy` + if [ "x${dpc}" != "x" ] + then + echo "$name: dpcproxy is already running on port 623," + echo "so $name is not needed." + retval=6 + else + [ -x $portmap ] || exit 6 + [ -x $prog ] || exit 5 + $prog -b + retval=$? + if [ $retval -eq 0 ]; then + PID=`getpid "$prog -b"` + echo $PID >$lockfile + fi + fi + echo + return $retval +} + +stop() +{ + echo -n $"Stopping $name: " + echo + retval=1 + if [ -f $lockfile ]; then + p=`cat $lockfile` + if [ "x$p" = "x" ]; then + p=`getpid "$prog -b"` + fi + if [ "x$p" != "x" ]; then + kill $p + retval=$? + fi + fi + echo + if [ -d ${mibdir} ]; then + rm -f ${mibdir}/BMCLAN-PET-MIB.txt + fi + [ $retval -eq 0 ] && rm -f $lockfile + return $retval +} + +restart() +{ + stop + start +} + +rh_status() { + if [ -f $lockfile ]; then + p=`cat $lockfile` + if [ "x$p" != "x" ]; then + pid=`getpid $p` + if [ "x$pid" != "x" ]; then + echo "$name (pid $pid) is running..." + retval=0 + else + echo "$name is dead but $lockfile exists" + retval=1 + fi + else + echo "$name $lockfile exists but is empty" + retval=2 + fi + else + echo "$name is stopped" + retval=3 + fi + return $retval +} + +rh_status_q() { + rh_status >/dev/null 2>&1 +} + +if [ ! -d /var/lock/subsys ]; then + lockfile=/var/run/$name.pid +fi + +case "$1" in + start) + rh_status_q && exit 0 + start + ;; + stop) + rh_status_q || exit 0 + stop + ;; + status) + rh_status + ;; + restart) + restart + ;; + reload) + rh_status_q || exit 7 + restart + ;; + force_reload) + restart + ;; + condrestart|try-restart) + rh_status_q || exit 0 + restart + ;; + *) + echo $"Usage: $0 {start|stop|status|restart|condrestart|try-restart|reload|force-reload}" + exit 2 +esac + +exit $? + diff --git a/debian/patches/003-typo-man.patch b/debian/patches/003-typo-man.patch new file mode 100644 index 0000000..9d4be3e --- /dev/null +++ b/debian/patches/003-typo-man.patch @@ -0,0 +1,67 @@ +Description: typo manpages +Author: Jörg Frings-Fürst <debian@jff-webhosting.net> +Last-Update: 2014-06-04 +--- +This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ +Index: trunk/doc/iseltime.8 +=================================================================== +--- trunk.orig/doc/iseltime.8 ++++ trunk/doc/iseltime.8 +@@ -54,7 +54,7 @@ Use a specified IPMI LAN Authentication + Use a specified IPMI LAN privilege level. 1=Callback level, 2=User level, 3=Operator level, 4=Administrator level (default), 5=OEM level. + .IP "-Y" + Yes, do prompt the user for the IPMI LAN remote password. +-Alternatives for the password are -E or -P. ++Alternatives for the password are \-E or \-P. + + + .SH "SEE ALSO" +Index: trunk/doc/iekanalyzer.8 +=================================================================== +--- trunk.orig/doc/iekanalyzer.8 ++++ trunk/doc/iekanalyzer.8 +@@ -114,7 +114,7 @@ Display point to point physical connecti + AMC slot B2 topology: + Port 0 =====> On Carrier Device ID 0, Port 3 + Port 2 =====> AMC slot B1, Port 2 +- *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-* ++ *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-* + From Carrier file: carrierfru + On Carrier Device ID 0 topology: + Port 0 =====> AMC slot B1, Port 4 +@@ -170,7 +170,7 @@ and an AMC module or between 2 AMC modul + Link Type: AMC.2 Ethernet + Link Type extension: 1000BASE-BX (SerDES Gigabit) Ethernet link + Link Group ID: 0 || Link Asym. Match: exact match +- *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-* ++ *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-* + AMC slot B1 port 1 ==> On-Carrier Device 0 port 12 + Matching Result + From On-Carrier Device ID 0 +@@ -183,7 +183,7 @@ and an AMC module or between 2 AMC modul + Link Type: AMC.2 Ethernet + Link Type extension: 1000BASE-BX (SerDES Gigabit) Ethernet link + Link Group ID: 0 || Link Asym. Match: exact match +- *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-* ++ *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-* + On-Carrier Device vs AMC slot A2 + AMC slot A2 port 0 ==> On-Carrier Device 0 port 3 + Matching Result +@@ -197,7 +197,7 @@ and an AMC module or between 2 AMC modul + Link Type: AMC.2 Ethernet + Link Type extension: 1000BASE-BX (SerDES Gigabit) Ethernet link + Link Group ID: 0 || Link Asym. Match: exact match +- *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-* ++ *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-* + AMC slot B1 vs AMC slot A2 + AMC slot A2 port 2 ==> AMC slot B1 port 2 + Matching Result +@@ -211,7 +211,7 @@ and an AMC module or between 2 AMC modul + Link Type: AMC.3 Storage + Link Type extension: Serial Attached SCSI (SAS/SATA) + Link Group ID: 0 || Link Asym. Match: FC or SAS interface {exact match} +- *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-* ++ *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-* + .TP + \fIunmatch\fP \fBxx=filename\fR \fBxx=filename\fR \fB...\fr + .br diff --git a/debian/patches/005-init.patch b/debian/patches/005-init.patch new file mode 100644 index 0000000..954e034 --- /dev/null +++ b/debian/patches/005-init.patch @@ -0,0 +1,219 @@ +Description: include lsb/init-functions +Author: Jörg Frings-Fürst <debian@jff-webhosting.net> +Last-Update: 2014-08-09 +--- +This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ +Index: trunk/scripts/ipmi_port.sh +=================================================================== +--- trunk.orig/scripts/ipmi_port.sh ++++ trunk/scripts/ipmi_port.sh +@@ -14,8 +14,8 @@ + # Provides: ipmi_port + # Required-Start: $local_fs $network $remote_fs + # Required-Stop: $local_fs $network $remote_fs +-# Default-Start: 3 4 5 3 4 5 +-# Default-Stop: 0 1 2 6 0 1 2 6 ++# Default-Start: 2 3 4 5 ++# Default-Stop: 0 1 6 + # Short-Description: ipmi_port reserves the RMCP port from portmap + # Description: ipmi_port is used to reserve the RMCP port from portmap + ### END INIT INFO +@@ -40,6 +40,8 @@ threshout=${vardir}/thresh_out.txt + # This threshold script could be created by ipmiutil sensor -p ... + thresh="${vardir}/thresholds.sh" + ++. /lib/lsb/init-functions ++ + getpid () { + # This is messy if the parent script is same name as $1 + p=`ps -ef |grep "$1" |grep -v grep |awk '{print $2}'` +@@ -184,4 +186,3 @@ case "$1" in + esac + + exit $? +- +Index: trunk/scripts/ipmiutil_asy +=================================================================== +--- trunk.orig/scripts/ipmiutil_asy ++++ trunk/scripts/ipmiutil_asy +@@ -13,8 +13,8 @@ + # Provides: ipmiutil_asy + # Required-Start: $local_fs $remote_fs $syslog + # Required-Stop: $local_fs $remote_fs $syslog +-# Default-Start: 3 4 5 3 4 5 +-# Default-Stop: 0 1 2 6 0 1 2 6 ++# Default-Start: 2 3 4 5 ++# Default-Stop: 0 1 6 + # Short-Description: ipmiutil async bridge agent init script + # Description: Init script starts ipmiutil async bridge agent for remote reset + ### END INIT INFO +@@ -37,6 +37,8 @@ getpid () { + echo $p + } + ++. /lib/lsb/init-functions ++ + start() + { + echo -n "Starting $dname: " +@@ -152,4 +154,3 @@ case "$1" in + exit 2 + esac + exit $? +- +Index: trunk/scripts/ipmiutil_wdt +=================================================================== +--- trunk.orig/scripts/ipmiutil_wdt ++++ trunk/scripts/ipmiutil_wdt +@@ -14,8 +14,8 @@ + # Provides: ipmiutil_wdt + # Required-Start: $local_fs $remote_fs $syslog + # Required-Stop: $local_fs $remote_fs $syslog +-# Default-Start: 3 4 5 3 4 5 +-# Default-Stop: 0 1 2 6 0 1 2 6 ++# Default-Start: 2 3 4 5 ++# Default-Stop: 0 1 6 + # Short-Description: ipmiutil watchdog timer init script + # Description: Init script to enable and reset ipmiutil watchdog timer via cron + ### END INIT INFO +@@ -33,6 +33,8 @@ wdtlog=/var/log/$name + #tmpcron=/tmp/wdtcron.$$ + # tmpcron2=/tmp/wdtcron2.$$ + ++. /lib/lsb/init-functions ++ + start() { + echo -n "Starting $prog: " + echo +@@ -137,10 +139,13 @@ case "$1" in + restart) + restart + ;; ++ force-reload) ++ restart ++ ;; + reload) + restart + ;; + *) +- echo "Usage: $0 {start|stop|status|restart|reload}" ++ echo "Usage: $0 {start|stop|status|restart|force-reload|reload}" + exit 1 + esac +Index: trunk/scripts/ipmiutil_evt +=================================================================== +--- trunk.orig/scripts/ipmiutil_evt ++++ trunk/scripts/ipmiutil_evt +@@ -15,8 +15,8 @@ + # Provides: ipmiutil_evt + # Required-Start: $local_fs $remote_fs $syslog + # Required-Stop: $local_fs $remote_fs $syslog +-# Default-Start: 3 4 5 3 4 5 +-# Default-Stop: 0 1 2 6 0 1 2 6 ++# Default-Start: 2 3 4 5 ++# Default-Stop: 0 1 6 + # Short-Description: ipmiutil event monitoring init script + # Description: Init script starts ipmiutil event monitoring service + ### END INIT INFO +@@ -40,6 +40,8 @@ getpid () { + echo $p + } + ++. /lib/lsb/init-functions ++ + start() + { + echo -n "Starting $name: " +@@ -155,4 +157,3 @@ case "$1" in + exit 2 + esac + exit $? +- +Index: trunk/configure.ac +=================================================================== +--- trunk.orig/configure.ac ++++ trunk/configure.ac +@@ -374,11 +374,11 @@ else + MD2_CFLAGS="-DSKIP_MD2" + init0=/etc/rc.d/init.d + fi +- if test $isredhat -eq 0 ; then ++# if test $isredhat -eq 0 ; then + # set default start/stop for init scripts +- sed -i 's/# Default-Start:/# Default-Start: 3 4 5/' $init_scripts +- sed -i 's/# Default-Stop:/# Default-Stop: 0 1 2 6/' $init_scripts +- fi ++# sed -i 's/# Default-Start:/# Default-Start: 3 4 5/' $init_scripts ++# sed -i 's/# Default-Stop:/# Default-Stop: 0 1 2 6/' $init_scripts ++# fi + if test -f "$LIB_DIR/libcrypto.so"; then + strings $LIB_DIR/libcrypto.so | grep EVP_md2 >/dev/null 2>&1 + if test $? -ne 0; then +Index: trunk/scripts/ipmi_info +=================================================================== +--- trunk.orig/scripts/ipmi_info ++++ trunk/scripts/ipmi_info +@@ -11,8 +11,8 @@ + # Provides: ipmi_info + # Required-Start: $local_fs $network $remote_fs + # Required-Stop: $local_fs $network $remote_fs +-# Default-Start: +-# Default-Stop: ++# Default-Start: 2 3 4 5 ++# Default-Stop: 0 1 6 + # Short-Description: ipmi_info saves OS info to the IPMI system info + # Description: ipmi_info saves OS info to the IPMI system info + ### END INIT INFO +@@ -21,6 +21,8 @@ name=ipmi_info + iuprog=/usr/bin/ipmiutil + tmp=/tmp/ipmi_info.tmp + ++. /lib/lsb/init-functions ++ + getosver() { + if [ -f /etc/os-release ]; then + . /etc/os-release +@@ -121,4 +123,3 @@ case "$1" in + esac + + exit $? +- +Index: trunk/scripts/ipmiutil_asy.service +=================================================================== +--- trunk.orig/scripts/ipmiutil_asy.service ++++ trunk/scripts/ipmiutil_asy.service +@@ -11,4 +11,3 @@ ExecStart=/usr/bin/ipmiutil getevt -a -b + + [Install] + WantedBy=multi-user.target +- +Index: trunk/scripts/ipmiutil_evt.service +=================================================================== +--- trunk.orig/scripts/ipmiutil_evt.service ++++ trunk/scripts/ipmiutil_evt.service +@@ -11,5 +11,3 @@ ExecStart=/usr/bin/ipmiutil getevt $IPMI + + [Install] + WantedBy=multi-user.target +- +- +Index: trunk/scripts/ipmiutil_wdt.service +=================================================================== +--- trunk.orig/scripts/ipmiutil_wdt.service ++++ trunk/scripts/ipmiutil_wdt.service +@@ -10,5 +10,3 @@ RemainAfterExit=1 + + [Install] + WantedBy=multi-user.target +- +- +Index: trunk/scripts/ipmi_port.service +=================================================================== +--- trunk.orig/scripts/ipmi_port.service ++++ trunk/scripts/ipmi_port.service +@@ -11,5 +11,3 @@ ExecStart=/usr/sbin/ipmi_port -b + + [Install] + WantedBy=multi-user.target +- +- diff --git a/debian/patches/100-out-of-bounds.patch b/debian/patches/100-out-of-bounds.patch new file mode 100644 index 0000000..19ba67b --- /dev/null +++ b/debian/patches/100-out-of-bounds.patch @@ -0,0 +1,61 @@ +Description: prevent out-of-bounds +Author: Jörg Frings-Fürst <debian@jff-webhosting.net> +Forwarded: https://sourceforge.net/p/ipmiutil/mailman/ipmiutil-developers/?viewmonth=201410 +Last-Update: 2014-10-29 +--- +Index: trunk/util/ievents.c +=================================================================== +--- trunk.orig/util/ievents.c ++++ trunk/util/ievents.c +@@ -193,10 +193,10 @@ static const char *sensor_types[NSTYPES] + /* 2Eh */ "ME" /* 0xDC == ME Node Manager */ + }; + +-#define NFWERRS 15 ++#define NFWERRS 14 + static struct { /* See Table 36-3, type 0Fh, offset 00h */ + int code; char *msg; +- } fwerrs[NFWERRS] = { ++ } fwerrs[NFWERRS + 1] = { + { 0x00, "Unspecified"}, + { 0x01, "No system memory"}, + { 0x02, "No usable memory"}, +@@ -214,10 +214,10 @@ static struct { /* See Table 36-3, ty + { 0x0E, "Reserved" } + }; + +-#define NFWSTAT 27 ++#define NFWSTAT 26 + static struct { /* See Table 36-3, type 0Fh, offset 01h & 02h */ + int code; char *msg; +- } fwstat[NFWSTAT] = { ++ } fwstat[NFWSTAT + 1] = { + { 0x00, "Unspecified"}, + { 0x01, "Memory init"}, + { 0x02, "Hard disk init"}, +Index: trunk/util/ifirewall.h +=================================================================== +--- trunk.orig/util/ifirewall.h ++++ trunk/util/ifirewall.h +@@ -82,7 +82,7 @@ struct lun_netfn_support { + }; + struct lun_support { + unsigned char support; +- struct lun_netfn_support netfn[MAX_NETFN_PAIR]; ++ struct lun_netfn_support netfn[MAX_NETFN]; + }; + struct bmc_fn_support { + struct lun_support lun[MAX_LUN]; +Index: trunk/util/iconfig.c +=================================================================== +--- trunk.orig/util/iconfig.c ++++ trunk/util/iconfig.c +@@ -1765,7 +1765,7 @@ int SerialIsOptional(int bparam) + int optvals[9] = { 5, 9, 10, 11, 12, 13, 14, 20, 21 }; + int rv = 0; + int i; +- for (i = 0; i < sizeof(optvals); i++) { ++ for (i = 0; i < (sizeof(optvals) / sizeof(int)); i++) { + if (optvals[i] == bparam) { rv = 1; break; } + } + return(rv); diff --git a/debian/patches/series b/debian/patches/series new file mode 100644 index 0000000..2777650 --- /dev/null +++ b/debian/patches/series @@ -0,0 +1,3 @@ +#100-out-of-bounds.patch +005-init.patch +003-typo-man.patch diff --git a/debian/postinst b/debian/postinst new file mode 100755 index 0000000..399957f --- /dev/null +++ b/debian/postinst @@ -0,0 +1,41 @@ +#!/bin/sh +# Debian postinstall script +# +# see: dh_installdeb(1) +set -e +case "$1" in + configure) + sbindir=/usr/bin + vardir=/var/lib/ipmiutil + sensorout=$vardir/sensor_out.txt + + mkdir -p $vardir + + # Run some ipmiutil command to see if any IPMI interface works. + IPMIcmd=true + $sbindir/ipmiutil sel -v >/dev/null 2>&1 || IPMIcmd=false + + # If IPMIcmd is still true, then the IPMI command was successful, and IPMI is enabled locally. + if $IPMIcmd ; then + # Capture a snapshot of IPMI sensor data once now for later reuse. + if [ ! -f $sensorout ]; then + $sbindir/ipmiutil sensor -q >$sensorout + fi + fi + ;; + + abort-upgrade|abort-remove|abort-deconfigure) + ;; + + *) + echo "postinst called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 diff --git a/debian/prerm b/debian/prerm new file mode 100755 index 0000000..e66d2d9 --- /dev/null +++ b/debian/prerm @@ -0,0 +1,26 @@ +#!/bin/sh +# Debian prerm script +# +set -e + +case "$1" in + purge) + if [ -d /var/lib/ipmiutil/ ] + then + rm -Rf /var/lib/ipmiutil/ + fi + ;; + remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear) + ;; + *) + echo "postrm called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 diff --git a/debian/rules b/debian/rules new file mode 100755 index 0000000..8c11f8a --- /dev/null +++ b/debian/rules @@ -0,0 +1,34 @@ +#!/usr/bin/make -f +# -*- makefile -*- + +# Uncomment this to turn on verbose mode. +# export DH_VERBOSE=1 + +export DEB_BUILD_MAINT_OPTIONS = hardening=+all + +CFLAGS += -fPIC +CONFPARA = --enable-gpl --enable-useflags --enable-libsensors + +%: + dh $@ --with autotools-dev --with systemd + +override_dh_auto_configure: + $(CURDIR)/beforeconf.sh + dh_auto_configure -- $(CONFPARA) + +override_dh_autoreconf: + dh_autoreconf --exclude=mkinstalldirs + +override_dh_installchangelogs: + dh_installchangelogs ChangeLog + +override_dh_installman: + dh_installman doc/iseltime.8 + dh_installman + +override_dh_installinit: + dh_installinit --name=ipmi_port + dh_installinit --name=ipmi_info + dh_installinit --name=ipmiutil_asy + dh_installinit --name=ipmiutil_evt + dh_installinit --name=ipmiutil_wdt diff --git a/debian/source/format b/debian/source/format new file mode 100644 index 0000000..163aaf8 --- /dev/null +++ b/debian/source/format @@ -0,0 +1 @@ +3.0 (quilt) diff --git a/debian/watch b/debian/watch new file mode 100644 index 0000000..7c0fc3f --- /dev/null +++ b/debian/watch @@ -0,0 +1,3 @@ +version=3 +opts=uversionmangle=s/\.(tar.*|tgz|zip|gz|bz2)$// \ +http://sf.net/ipmiutil/ipmiutil-?_?([\d+\.]+|\d+)\.(tar.*|tgz|zip|gz|bz2) |