diff options
| author | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2014-11-12 17:25:25 +0100 | 
|---|---|---|
| committer | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2014-11-12 17:25:25 +0100 | 
| commit | 14304e0827cd7de7fc55b1ba587ccdd380525b94 (patch) | |
| tree | f70c126b91e68b66d7005cfea53b88a82aa0c7fa | |
| parent | d279e229635f19852dc829552aa7c7d72d7a4dd2 (diff) | |
New upstream release
76 files changed, 1979 insertions, 265 deletions
@@ -3980,7 +3980,7 @@ wdt.8          iwdt.8       (ipmiutil wdt)      idiscover	(ipmiutil discover)  	 ver 1.9      ipmi_port	(ipmi_port)  		 ver 1.4 -06/28/2014 ARCress ipmiutil-2.9.4  changes +08/08/2014 ARCress ipmiutil-2.9.4  changes    util/isensor.c      - for -j: more debug output & handle if recid=0,    			longer KCS timeouts for Supermicro    util/idcmi.c        - cast ulong for << 24 @@ -4006,3 +4006,38 @@ wdt.8          iwdt.8       (ipmiutil wdt)      ihpm	(ipmiutil hpm)  	 ver 1.09      idiscover	(ipmiutil discover)  	 ver 1.9      ipmi_port	(ipmi_port)  		 ver 1.4 + +11/03/2014 ARCress ipmiutil-2.9.5  changes + util/iseltime.c      - fix UTC conversion issue in show_time() + util/ipmilan.c       - only show Opening/Connecting messages if fdebugcmd + configure.ac         - added enable-libsensors to add sensor modules to lib + util/Makefile.am     - added LIBSENSORS/SAM2OBJ variables for libsensors + util/ipmicmd.c       - changed ipmi_sendrecv to handle different oem lun +  icmd.c              - add -p option for port (from Rafal Zajac) +  ipmicmd.c/.h        - changes to handle -p lan option (from Rafal Zajac) +  ipmilan.c/.h        - changes to handle custom lan port (from Rafal Zajac) +  idcmi.c	      - add -p port option +  igetevent.c	      - add -p port option +  ipmi_sample.c	      - add -p port option +  ipmi_sample_evt.c   - add -p port option +  isel.c    	      - add -p port option +  isol.c  	      - add -p port option +  util/ipmiutil*.mak  - add mt.exe to embed manifest +  lib/Makefile.am     - new, fix for automake +  lib/libipmiutil.pc.in - new, fix for pkg-config +  configure.ac        - add support for pkg-config, +  			add enable-useflags option for cross-compiling +  debpkg/             - renamed from debian/ to debpkg/ (jff) +  util/iconfig.c      - fix optvals loop out-of-bounds (from jff-webhosting.net) +  util/ievents.c      - fix NFWERRS/NFWSTAT potential out-of-bounds (jff) +  util/ifirewall.h    - fix netfn out-of-bounds around line 1064    (jff) +  doc/ipmiutil.spec   - move libipmiutil.a to ipmiutil-static package (fedora) +  ipmiutil-2.9.5 contains: +    ipmiutil	(ipmiutil)	  	 ver 2.95 +    ...(various subcommands)	  	 ver 2.95 +    ismcoem	(ipmiutil smcoem)  	 ver 2.95 +    iekanalyzer	(ipmiutil ekanalyzer)  	 ver 1.00 +    ifwum	(ipmiutil fwum)  	 ver 1.3 +    ihpm	(ipmiutil hpm)  	 ver 1.09 +    idiscover	(ipmiutil discover)  	 ver 1.9 +    ipmi_port	(ipmi_port)  		 ver 1.4 diff --git a/Makefile.am b/Makefile.am index 0c3af55..f63a865 100644 --- a/Makefile.am +++ b/Makefile.am @@ -5,24 +5,23 @@ SOURCEDIR = $(PKGDIR)/SOURCES  BUILDDIR = $(PKGDIR)/BUILD  RSPEC = doc/$(PACKAGE).spec  PNAME  = $(PACKAGE)-$(VERSION) -TMPDIR = /var/tmp/$(PNAME) +TARDIR = /tmp/iu +TMPDIR = $(TARDIR)/$(PNAME)  BDIR = $(TMPDIR)-1-root  RPMB = rpmbuild  # $(RPMB) -bb --buildroot $(BDIR) $(RSPEC)  rpm:	$(RSPEC)  	make tarball +	cp -f $(TARDIR)/$(PNAME).tar.gz $(SOURCEDIR)  	$(RPMB) -bb  $(RSPEC)  	$(RPMB) -bs  $(RSPEC)  tarball: -	rm -f $(SOURCEDIR)/$(PNAME).tar.gz  +	rm -f $(TMPDIR)/../$(PNAME).tar.gz   	rm -rf $(TMPDIR)  	mkdir -p $(TMPDIR) -	mkdir -p $(SOURCEDIR)  	find . -print | cpio -pdumv $(TMPDIR) -	chown -R root $(TMPDIR) -	chgrp -R root $(TMPDIR)  	rm -f $(TMPDIR)/lib/libipmiapi*.a*   	cd $(TMPDIR)/test; make clean; cd ..  	cd $(TMPDIR)/hpiutil; make clean; cd .. @@ -31,8 +30,10 @@ tarball:  	cd $(TMPDIR); rm -f  util/events  	cd $(TMPDIR); sed -i 's/\r//' ChangeLog AUTHORS COPYING NEWS README TODO doc/UserGuide  	cd $(TMPDIR); chmod 644 doc/UserGuide -	cd $(TMPDIR); cd ..; tar -czvf $(SOURCEDIR)/$(PNAME).tar.gz $(PNAME) +	cd $(TMPDIR); cd ..; tar -czvf $(TARDIR)/$(PNAME).tar.gz $(PNAME) +	ls $(TARDIR)/*.gz  	rm -rf $(TMPDIR) +# chown -R root:root $(TMPDIR)  tarsol:        util/ipmiutil  	rm -f /tmp/$(PNAME)-solaris.tar diff --git a/Makefile.am-new b/Makefile.am-new new file mode 100644 index 0000000..24301e9 --- /dev/null +++ b/Makefile.am-new @@ -0,0 +1,68 @@ + +SUBDIRS = @SUBDIR_S@ +PKGDIR = @PKG_DIR@ +SOURCEDIR = $(PKGDIR)/SOURCES +BUILDDIR = $(PKGDIR)/BUILD +RSPEC = doc/$(PACKAGE).spec +PNAME  = $(PACKAGE)-$(VERSION) +# TMPDIR = /var/tmp/$(PNAME) +TMPD = $(shell mktemp -d -t ${PNAME}.XXXXXX) +TMPDIR = $(TMPD)/${PNAME} +BDIR = $(TMPDIR)-1-root +RPMB = rpmbuild +# $(RPMB) -bb --buildroot $(BDIR) $(RSPEC) + +# Note: put files here, while waiting for a proper lib/Makefile.am +# pkg-config support rules +# if WITH_PKG_CONFIG + # pkgconfig_DATA = lib/libipmiutil.pc +# endif + +rpm:	$(RSPEC) +	make tarball +	$(RPMB) -bb  $(RSPEC) +	$(RPMB) -bs  $(RSPEC) + +tarball: +	rm -f $(SOURCEDIR)/$(PNAME).tar.gz  +	rm -rf $(TMPDIR) +	mkdir -p $(TMPDIR) +	mkdir -p $(SOURCEDIR) +	echo "TMPDIR=$(TMPDIR)" +	find . -print | cpio -pdumv $(TMPDIR) +	rm -f $(TMPDIR)/lib/libipmiapi*.a*  $(TMPDIR)/util/events +	cd $(TMPDIR)/test; make clean; cd .. +	cd $(TMPDIR)/hpiutil; make clean; cd .. +	echo "TMPDIR=$(TMPDIR)" +	cd $(TMPDIR); make distclean +	cd $(TMPDIR); rm -rf autom4te.cache +	cd $(TMPDIR); sed -i 's/\r//' ChangeLog AUTHORS COPYING NEWS README TODO doc/UserGuide +	cd $(TMPDIR); chmod 644 doc/UserGuide +	cd $(TMPDIR)/..; tar -czvf $(SOURCEDIR)/$(PNAME).tar.gz $(PNAME) +	rm -rf $(TMPDIR) +# chown -R root:root $(TMPDIR) + +tarsol:        util/ipmiutil +	rm -f /tmp/$(PNAME)-solaris.tar +	rm -rf $(TMPDIR) +	mkdir -p $(TMPDIR) +	cd util; cp ipmiutil idiscover ievents ipmi_port $(TMPDIR) +	cd doc; cp UserGuide *.8 *.mib  $(TMPDIR) +	cd scripts; cp checksel ipmiutil_??? *.sh $(TMPDIR) +	cd $(TMPDIR); mv install-solaris.sh install.sh +	cd $(TMPDIR); tar cvf /tmp/$(PNAME)-solaris.tar . +	rm -rf $(TMPDIR) + +tarbsd:        util/ipmiutil +	rm -f /tmp/$(PNAME)-bsd.tar +	rm -rf $(TMPDIR) +	mkdir -p $(TMPDIR) +	cd util; cp ipmiutil idiscover ievents ipmi_port $(TMPDIR) +	cd doc; cp UserGuide *.8 *.mib  $(TMPDIR) +	cd scripts; cp checksel ipmiutil_??? *.sh $(TMPDIR) +	cd $(TMPDIR); mv install-solaris.sh install.sh +	cd $(TMPDIR); tar -cvf /tmp/$(PNAME)-bsd.tar . +	rm -rf $(TMPDIR) + +clean-generic: +	rm -f *.log *.tmp debug*.list diff --git a/Makefile.in b/Makefile.in index 6398861..0ae34ea 100644 --- a/Makefile.in +++ b/Makefile.in @@ -122,6 +122,7 @@ LDFLAGS = @LDFLAGS@  LD_SAMX = @LD_SAMX@  LIBOBJS = @LIBOBJS@  LIBS = @LIBS@ +LIBSENSORS = @LIBSENSORS@  LIBTOOL = @LIBTOOL@  LIB_DIR = @LIB_DIR@  LN_S = @LN_S@ @@ -140,6 +141,7 @@ PACKAGE_VERSION = @PACKAGE_VERSION@  PATH_SEPARATOR = @PATH_SEPARATOR@  PKG_DIR = @PKG_DIR@  RANLIB = @RANLIB@ +SAM2OBJ = @SAM2OBJ@  SED = @SED@  SET_MAKE = @SET_MAKE@  SHELL = @SHELL@ @@ -148,6 +150,8 @@ STRIP = @STRIP@  SUBDIR_S = @SUBDIR_S@  SYSTEMD_DIR = @SYSTEMD_DIR@  VERSION = @VERSION@ +WITH_PKG_CONFIG_FALSE = @WITH_PKG_CONFIG_FALSE@ +WITH_PKG_CONFIG_TRUE = @WITH_PKG_CONFIG_TRUE@  ac_ct_AR = @ac_ct_AR@  ac_ct_CC = @ac_ct_CC@  ac_ct_CXX = @ac_ct_CXX@ @@ -185,6 +189,7 @@ localstatedir = @localstatedir@  mandir = @mandir@  mkdir_p = @mkdir_p@  oldincludedir = @oldincludedir@ +pkgconfigdir = @pkgconfigdir@  prefix = @prefix@  program_transform_name = @program_transform_name@  sbindir = @sbindir@ @@ -197,7 +202,8 @@ SOURCEDIR = $(PKGDIR)/SOURCES  BUILDDIR = $(PKGDIR)/BUILD  RSPEC = doc/$(PACKAGE).spec  PNAME = $(PACKAGE)-$(VERSION) -TMPDIR = /var/tmp/$(PNAME) +TARDIR = /tmp/iu +TMPDIR = $(TARDIR)/$(PNAME)  BDIR = $(TMPDIR)-1-root  RPMB = rpmbuild  all: config.h @@ -400,6 +406,7 @@ distclean-tags:  distdir: $(DISTFILES)  	$(am__remove_distdir)  	mkdir $(distdir) +	$(mkdir_p) $(distdir)/lib  	@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \  	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \  	list='$(DISTFILES)'; for file in $$list; do \ @@ -636,17 +643,15 @@ uninstall-info: uninstall-info-recursive  rpm:	$(RSPEC)  	make tarball +	cp -f $(TARDIR)/$(PNAME).tar.gz $(SOURCEDIR)  	$(RPMB) -bb  $(RSPEC)  	$(RPMB) -bs  $(RSPEC)  tarball: -	rm -f $(SOURCEDIR)/$(PNAME).tar.gz  +	rm -f $(TMPDIR)/../$(PNAME).tar.gz   	rm -rf $(TMPDIR)  	mkdir -p $(TMPDIR) -	mkdir -p $(SOURCEDIR)  	find . -print | cpio -pdumv $(TMPDIR) -	chown -R root $(TMPDIR) -	chgrp -R root $(TMPDIR)  	rm -f $(TMPDIR)/lib/libipmiapi*.a*   	cd $(TMPDIR)/test; make clean; cd ..  	cd $(TMPDIR)/hpiutil; make clean; cd .. @@ -655,8 +660,10 @@ tarball:  	cd $(TMPDIR); rm -f  util/events  	cd $(TMPDIR); sed -i 's/\r//' ChangeLog AUTHORS COPYING NEWS README TODO doc/UserGuide  	cd $(TMPDIR); chmod 644 doc/UserGuide -	cd $(TMPDIR); cd ..; tar -czvf $(SOURCEDIR)/$(PNAME).tar.gz $(PNAME) +	cd $(TMPDIR); cd ..; tar -czvf $(TARDIR)/$(PNAME).tar.gz $(PNAME) +	ls $(TARDIR)/*.gz  	rm -rf $(TMPDIR) +# chown -R root:root $(TMPDIR)  tarsol:        util/ipmiutil  	rm -f /tmp/$(PNAME)-solaris.tar @@ -11,17 +11,18 @@ Change ipmicmd.c/ipmilan.c to be thread-safe if accessing multiple nodes.     PARTIAL in ipmiutil-2.9.0, multiple nodes in sequence is fixed     . need to use context structure for ipmilan +SPD decoding: +   . handle DDR4 SPD format +   . expose SPD decoding from file/buffer, not just FRU +   c handle DDR3 SPD 1.0 format  +   PARTIAL in ipmiutil-2.9.1  +  stdout/stderr debug messages mixed     . have a global variable for stderr and if -x debug, set it to stdout.  SuperMicro Users:     . implement an OEM cmd to set user privilege level (needs research) -SPD decoding: -   . expose SPD decoding from file/buffer, not just FRU -   c handle DDR3 SPD 1.0 format  -   PARTIAL in ipmiutil-2.9.1  -  Add additional IPMI 2.0 commands from addendum:     c Get/Set System Info     . Get/Set SEL UTC Offset (requested 4/22/13) diff --git a/cleanwin.cmd b/cleanwin.cmd index 0fbd64e..38b08bf 100644 --- a/cleanwin.cmd +++ b/cleanwin.cmd @@ -16,7 +16,9 @@ REM # echo make lib done  cd util
  nmake /nologo -f %UTMAKE% clean
 +del tmp\*.obj 2>NULL
  del *.pdb 2>NUL
 +del *.manifest 2>NUL
  cd ..
  REM # echo make util done
 @@ -1,6 +1,6 @@  #! /bin/sh  # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.59. +# Generated by GNU Autoconf 2.59 for ipmiutil 2.9.5.  #  # Copyright (C) 2003 Free Software Foundation, Inc.  # This configure script is free software; the Free Software Foundation @@ -419,14 +419,15 @@ SHELL=${CONFIG_SHELL-/bin/sh}  : ${ac_max_here_lines=38}  # Identity of this package. -PACKAGE_NAME= -PACKAGE_TARNAME= -PACKAGE_VERSION= -PACKAGE_STRING= -PACKAGE_BUGREPORT= +PACKAGE_NAME='ipmiutil' +PACKAGE_TARNAME='ipmiutil' +PACKAGE_VERSION='2.9.5' +PACKAGE_STRING='ipmiutil 2.9.5' +PACKAGE_BUGREPORT=''  ac_unique_file="util/ipmiutil.c"  ac_default_prefix=/usr +ac_default_prefix=/usr  # Factoring default headers for most tests.  ac_includes_default="\  #include <stdio.h> @@ -464,7 +465,7 @@ ac_includes_default="\  # include <unistd.h>  #endif" -ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE LN_S SED CPP EGREP build build_cpu build_vendor build_os host host_cpu host_vendor host_os ECHO AR ac_ct_AR RANLIB ac_ct_RANLIB CXX CXXFLAGS ac_ct_CXX CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE CXXCPP F77 FFLAGS ac_ct_F77 LIBTOOL LANDESK_CFLAGS LANDESK_LDADD IA64_CFLAGS LANPLUS_CFLAGS LANPLUS_LDADD LANPLUS_LIB LANPLUS_CRYPTO LANPLUS_SAM LD_SAMX GPL_CFLAGS OS_CFLAGS OS_LFLAGS OS_DRIVERS PKG_DIR INIT_DIR LIB_DIR INS_LIB SUBDIR_S CROSS_CFLAGS CROSS_LFLAGS SYSTEMD_DIR SHR_LINK LIBOBJS LTLIBOBJS' +ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE LN_S SED CPP EGREP build build_cpu build_vendor build_os host host_cpu host_vendor host_os ECHO AR ac_ct_AR RANLIB ac_ct_RANLIB CXX CXXFLAGS ac_ct_CXX CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE CXXCPP F77 FFLAGS ac_ct_F77 LIBTOOL LANDESK_CFLAGS LANDESK_LDADD WITH_PKG_CONFIG_TRUE WITH_PKG_CONFIG_FALSE IA64_CFLAGS LANPLUS_CFLAGS LANPLUS_LDADD LANPLUS_LIB LANPLUS_CRYPTO LANPLUS_SAM LIBSENSORS SAM2OBJ LD_SAMX GPL_CFLAGS OS_CFLAGS OS_LFLAGS OS_DRIVERS PKG_DIR INIT_DIR LIB_DIR INS_LIB SUBDIR_S CROSS_CFLAGS CROSS_LFLAGS SYSTEMD_DIR SHR_LINK pkgconfigdir LIBOBJS LTLIBOBJS'  ac_subst_files=''  # Initialize some variables set by options. @@ -953,7 +954,7 @@ if test "$ac_init_help" = "long"; then    # Omit some internal or obsolete options to make the list less imposing.    # This message is too long to be a string in the A/UX 3.1 sh.    cat <<_ACEOF -\`configure' configures this package to adapt to many kinds of systems. +\`configure' configures ipmiutil 2.9.5 to adapt to many kinds of systems.  Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1018,7 +1019,9 @@ _ACEOF  fi  if test -n "$ac_init_help"; then - +  case $ac_init_help in +     short | recursive ) echo "Configuration of ipmiutil 2.9.5:";; +   esac    cat <<\_ACEOF  Optional Features: @@ -1036,9 +1039,11 @@ Optional Features:    --enable-landesk       adds landesk library support [default=no]    --disable-lanplus      disable lanplus support [default=enabled]    --enable-sha256        build with SHA256 support, requires later openssl. +  --enable-useflags    include environment CFLAGS and LDFLAGS.    --enable-standalone    build standalone, with no GPL or LanPlus libs. +  --enable-libsensors	 build libipmiutil with sensor modules [default=no]    --enable-gpl           build with some GPL code [default=no] -  --enable-systemd      enable systemd service type=notify support and %_unitdir [default=disabled] +  --enable-systemd       enable systemd service type=notify support and %_unitdir [default=disabled]  Optional Packages:    --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes] @@ -1048,6 +1053,9 @@ Optional Packages:                            both]    --with-tags[=TAGS]                            include additional configurations [automatic] +  --with-pkgconfig-dir=PATH +                          where to install pkg-config *.pc files +                          (EPREFIX/lib/pkgconfig)  Some influential environment variables:    CC          C compiler command @@ -1161,6 +1169,8 @@ fi  test -n "$ac_init_help" && exit 0  if $ac_init_version; then    cat <<\_ACEOF +ipmiutil configure 2.9.5 +generated by GNU Autoconf 2.59  Copyright (C) 2003 Free Software Foundation, Inc.  This configure script is free software; the Free Software Foundation @@ -1173,7 +1183,7 @@ cat >&5 <<_ACEOF  This file contains any messages produced by compilers while  running configure, to aid debugging if configure makes a mistake. -It was created by $as_me, which was +It was created by ipmiutil $as_me 2.9.5, which was  generated by GNU Autoconf 2.59.  Invocation command line was    $ $0 $@ @@ -1501,6 +1511,19 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu + + + + + + + + + +echo "ipmiutil version ${PACKAGE_VERSION}" +          ac_config_headers="$ac_config_headers config.h" + +  am__api_version="1.9"  ac_aux_dir=  for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do @@ -1807,8 +1830,8 @@ fi  # Define the identity of the package. - PACKAGE=ipmiutil - VERSION=2.9.4 + PACKAGE='ipmiutil' + VERSION='2.9.5'  cat >>confdefs.h <<_ACEOF @@ -1938,8 +1961,6 @@ am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -' -          ac_config_headers="$ac_config_headers config.h" - @@ -3817,9 +3838,9 @@ echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&  echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}      (        cat <<\_ASBOX -## ------------------------------------------ ## -## Report this to the AC_PACKAGE_NAME lists.  ## -## ------------------------------------------ ## +## ----------------------------------- ## +## Report this to the ipmiutil lists.  ## +## ----------------------------------- ##  _ASBOX      ) |        sed "s/^/$as_me: WARNING:     /" >&2 @@ -4321,9 +4342,9 @@ echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&  echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}      (        cat <<\_ASBOX -## ------------------------------------------ ## -## Report this to the AC_PACKAGE_NAME lists.  ## -## ------------------------------------------ ## +## ----------------------------------- ## +## Report this to the ipmiutil lists.  ## +## ----------------------------------- ##  _ASBOX      ) |        sed "s/^/$as_me: WARNING:     /" >&2 @@ -5707,7 +5728,7 @@ ia64-*-hpux*)    ;;  *-*-irix6*)    # Find out which ABI we are using. -  echo '#line 5710 "configure"' > conftest.$ac_ext +  echo '#line 5731 "configure"' > conftest.$ac_ext    if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5    (eval $ac_compile) 2>&5    ac_status=$? @@ -6011,9 +6032,9 @@ echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&  echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}      (        cat <<\_ASBOX -## ------------------------------------------ ## -## Report this to the AC_PACKAGE_NAME lists.  ## -## ------------------------------------------ ## +## ----------------------------------- ## +## Report this to the ipmiutil lists.  ## +## ----------------------------------- ##  _ASBOX      ) |        sed "s/^/$as_me: WARNING:     /" >&2 @@ -6833,7 +6854,7 @@ fi  # Provide some information about the compiler. -echo "$as_me:6836:" \ +echo "$as_me:6857:" \       "checking for Fortran 77 compiler version" >&5  ac_compiler=`set X $ac_compile; echo $2`  { (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5 @@ -7896,11 +7917,11 @@ else     -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \     -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \     -e 's:$: $lt_compiler_flag:'` -   (eval echo "\"\$as_me:7899: $lt_compile\"" >&5) +   (eval echo "\"\$as_me:7920: $lt_compile\"" >&5)     (eval "$lt_compile" 2>conftest.err)     ac_status=$?     cat conftest.err >&5 -   echo "$as_me:7903: \$? = $ac_status" >&5 +   echo "$as_me:7924: \$? = $ac_status" >&5     if (exit $ac_status) && test -s "$ac_outfile"; then       # The compiler can only warn and ignore the option if not recognized       # So say no if there are warnings other than the usual output. @@ -8164,11 +8185,11 @@ else     -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \     -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \     -e 's:$: $lt_compiler_flag:'` -   (eval echo "\"\$as_me:8167: $lt_compile\"" >&5) +   (eval echo "\"\$as_me:8188: $lt_compile\"" >&5)     (eval "$lt_compile" 2>conftest.err)     ac_status=$?     cat conftest.err >&5 -   echo "$as_me:8171: \$? = $ac_status" >&5 +   echo "$as_me:8192: \$? = $ac_status" >&5     if (exit $ac_status) && test -s "$ac_outfile"; then       # The compiler can only warn and ignore the option if not recognized       # So say no if there are warnings other than the usual output. @@ -8268,11 +8289,11 @@ else     -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \     -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \     -e 's:$: $lt_compiler_flag:'` -   (eval echo "\"\$as_me:8271: $lt_compile\"" >&5) +   (eval echo "\"\$as_me:8292: $lt_compile\"" >&5)     (eval "$lt_compile" 2>out/conftest.err)     ac_status=$?     cat out/conftest.err >&5 -   echo "$as_me:8275: \$? = $ac_status" >&5 +   echo "$as_me:8296: \$? = $ac_status" >&5     if (exit $ac_status) && test -s out/conftest2.$ac_objext     then       # The compiler can only warn and ignore the option if not recognized @@ -9737,7 +9758,7 @@ linux*)    libsuff=    case "$host_cpu" in    x86_64*|s390x*|powerpc64*) -    echo '#line 9740 "configure"' > conftest.$ac_ext +    echo '#line 9761 "configure"' > conftest.$ac_ext      if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5    (eval $ac_compile) 2>&5    ac_status=$? @@ -10634,7 +10655,7 @@ else    lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2    lt_status=$lt_dlunknown    cat > conftest.$ac_ext <<EOF -#line 10637 "configure" +#line 10658 "configure"  #include "confdefs.h"  #if HAVE_DLFCN_H @@ -10734,7 +10755,7 @@ else    lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2    lt_status=$lt_dlunknown    cat > conftest.$ac_ext <<EOF -#line 10737 "configure" +#line 10758 "configure"  #include "confdefs.h"  #if HAVE_DLFCN_H @@ -13077,11 +13098,11 @@ else     -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \     -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \     -e 's:$: $lt_compiler_flag:'` -   (eval echo "\"\$as_me:13080: $lt_compile\"" >&5) +   (eval echo "\"\$as_me:13101: $lt_compile\"" >&5)     (eval "$lt_compile" 2>conftest.err)     ac_status=$?     cat conftest.err >&5 -   echo "$as_me:13084: \$? = $ac_status" >&5 +   echo "$as_me:13105: \$? = $ac_status" >&5     if (exit $ac_status) && test -s "$ac_outfile"; then       # The compiler can only warn and ignore the option if not recognized       # So say no if there are warnings other than the usual output. @@ -13181,11 +13202,11 @@ else     -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \     -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \     -e 's:$: $lt_compiler_flag:'` -   (eval echo "\"\$as_me:13184: $lt_compile\"" >&5) +   (eval echo "\"\$as_me:13205: $lt_compile\"" >&5)     (eval "$lt_compile" 2>out/conftest.err)     ac_status=$?     cat out/conftest.err >&5 -   echo "$as_me:13188: \$? = $ac_status" >&5 +   echo "$as_me:13209: \$? = $ac_status" >&5     if (exit $ac_status) && test -s out/conftest2.$ac_objext     then       # The compiler can only warn and ignore the option if not recognized @@ -13717,7 +13738,7 @@ linux*)    libsuff=    case "$host_cpu" in    x86_64*|s390x*|powerpc64*) -    echo '#line 13720 "configure"' > conftest.$ac_ext +    echo '#line 13741 "configure"' > conftest.$ac_ext      if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5    (eval $ac_compile) 2>&5    ac_status=$? @@ -14775,11 +14796,11 @@ else     -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \     -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \     -e 's:$: $lt_compiler_flag:'` -   (eval echo "\"\$as_me:14778: $lt_compile\"" >&5) +   (eval echo "\"\$as_me:14799: $lt_compile\"" >&5)     (eval "$lt_compile" 2>conftest.err)     ac_status=$?     cat conftest.err >&5 -   echo "$as_me:14782: \$? = $ac_status" >&5 +   echo "$as_me:14803: \$? = $ac_status" >&5     if (exit $ac_status) && test -s "$ac_outfile"; then       # The compiler can only warn and ignore the option if not recognized       # So say no if there are warnings other than the usual output. @@ -14879,11 +14900,11 @@ else     -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \     -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \     -e 's:$: $lt_compiler_flag:'` -   (eval echo "\"\$as_me:14882: $lt_compile\"" >&5) +   (eval echo "\"\$as_me:14903: $lt_compile\"" >&5)     (eval "$lt_compile" 2>out/conftest.err)     ac_status=$?     cat out/conftest.err >&5 -   echo "$as_me:14886: \$? = $ac_status" >&5 +   echo "$as_me:14907: \$? = $ac_status" >&5     if (exit $ac_status) && test -s out/conftest2.$ac_objext     then       # The compiler can only warn and ignore the option if not recognized @@ -16328,7 +16349,7 @@ linux*)    libsuff=    case "$host_cpu" in    x86_64*|s390x*|powerpc64*) -    echo '#line 16331 "configure"' > conftest.$ac_ext +    echo '#line 16352 "configure"' > conftest.$ac_ext      if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5    (eval $ac_compile) 2>&5    ac_status=$? @@ -17106,11 +17127,11 @@ else     -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \     -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \     -e 's:$: $lt_compiler_flag:'` -   (eval echo "\"\$as_me:17109: $lt_compile\"" >&5) +   (eval echo "\"\$as_me:17130: $lt_compile\"" >&5)     (eval "$lt_compile" 2>conftest.err)     ac_status=$?     cat conftest.err >&5 -   echo "$as_me:17113: \$? = $ac_status" >&5 +   echo "$as_me:17134: \$? = $ac_status" >&5     if (exit $ac_status) && test -s "$ac_outfile"; then       # The compiler can only warn and ignore the option if not recognized       # So say no if there are warnings other than the usual output. @@ -17374,11 +17395,11 @@ else     -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \     -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \     -e 's:$: $lt_compiler_flag:'` -   (eval echo "\"\$as_me:17377: $lt_compile\"" >&5) +   (eval echo "\"\$as_me:17398: $lt_compile\"" >&5)     (eval "$lt_compile" 2>conftest.err)     ac_status=$?     cat conftest.err >&5 -   echo "$as_me:17381: \$? = $ac_status" >&5 +   echo "$as_me:17402: \$? = $ac_status" >&5     if (exit $ac_status) && test -s "$ac_outfile"; then       # The compiler can only warn and ignore the option if not recognized       # So say no if there are warnings other than the usual output. @@ -17478,11 +17499,11 @@ else     -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \     -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \     -e 's:$: $lt_compiler_flag:'` -   (eval echo "\"\$as_me:17481: $lt_compile\"" >&5) +   (eval echo "\"\$as_me:17502: $lt_compile\"" >&5)     (eval "$lt_compile" 2>out/conftest.err)     ac_status=$?     cat out/conftest.err >&5 -   echo "$as_me:17485: \$? = $ac_status" >&5 +   echo "$as_me:17506: \$? = $ac_status" >&5     if (exit $ac_status) && test -s out/conftest2.$ac_objext     then       # The compiler can only warn and ignore the option if not recognized @@ -18947,7 +18968,7 @@ linux*)    libsuff=    case "$host_cpu" in    x86_64*|s390x*|powerpc64*) -    echo '#line 18950 "configure"' > conftest.$ac_ext +    echo '#line 18971 "configure"' > conftest.$ac_ext      if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5    (eval $ac_compile) 2>&5    ac_status=$? @@ -20428,8 +20449,22 @@ if test "${enable_sha256+set}" = set; then  fi; +GPL_CFLAGS=""  CROSS_LFLAGS=""  CROSS_CFLAGS="" +LIBSENSORS="" +SAM2OBJ="isensor2.o ievents2.o" +SYSTEMD_DIR=/usr/share/ipmiutil + +# Check whether --enable-useflags or --disable-useflags was given. +if test "${enable_useflags+set}" = set; then +  enableval="$enable_useflags" +  if test "x$enableval" = "xyes"; then +	   CROSS_CFLAGS="$CFLAGS" +	   CROSS_LFLAGS="$LDFLAGS" +    fi + +fi;  # Check whether --enable-standalone or --disable-standalone was given.  if test "${enable_standalone+set}" = set; then @@ -20454,13 +20489,21 @@ if test "${enable_standalone+set}" = set; then  fi; +# Check whether --enable-libsensors or --disable-libsensors was given. +if test "${enable_libsensors+set}" = set; then +  enableval="$enable_libsensors" +  if test "x$enableval" = "xyes"; then +        LIBSENSORS="isensor2.o ievents2.o" +        SAM2OBJ="" +    fi + +fi; +  # Check whether --enable-gpl or --disable-gpl was given.  if test "${enable_gpl+set}" = set; then    enableval="$enable_gpl"    if test "x$enableval" = "xyes"; then          GPL_CFLAGS="-DALLOW_GPL" -     else -        GPL_CFLAGS=""      fi  fi; @@ -20520,6 +20563,44 @@ case "$archm" in          ;;  esac +pkgconfigdir='${libdir}/pkgconfig' +echo "$as_me:$LINENO: checking whether to install pkg-config *.pc files" >&5 +echo $ECHO_N "checking whether to install pkg-config *.pc files... $ECHO_C" >&6 + +# Check whether --with-pkgconfig-dir or --without-pkgconfig-dir was given. +if test "${with_pkgconfig_dir+set}" = set; then +  withval="$with_pkgconfig_dir" + +	case "${withval}" in +	yes|auto) +		;; +	no) +		pkgconfigdir="" +		;; +	*) +		pkgconfigdir="${withval}" +		;; +	esac + +fi; +if test -n "${pkgconfigdir}"; then +	echo "$as_me:$LINENO: result: using ${pkgconfigdir}" >&5 +echo "${ECHO_T}using ${pkgconfigdir}" >&6 +else +	echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + +if test -n "${pkgconfigdir}"; then +  WITH_PKG_CONFIG_TRUE= +  WITH_PKG_CONFIG_FALSE='#' +else +  WITH_PKG_CONFIG_TRUE='#' +  WITH_PKG_CONFIG_FALSE= +fi + +  echo $libdir |grep exec_prefix >/dev/null 2>&1  if test $? -ne 0; then    LIB_DIR="$libdir" @@ -20723,7 +20804,10 @@ INIT_DIR=${init0} -                                                  ac_config_files="$ac_config_files Makefile util/Makefile lib/lanplus/Makefile doc/Makefile scripts/Makefile" + + + +                                                                      ac_config_files="$ac_config_files Makefile util/Makefile lib/Makefile lib/libipmiutil.pc lib/lanplus/Makefile doc/Makefile scripts/Makefile"  cat >confcache <<\_ACEOF  # This file is a shell script that caches the results of configure  # tests run on this system so they can be shared between configure @@ -20836,6 +20920,13 @@ echo "$as_me: error: conditional \"am__fastdepCXX\" was never defined.  Usually this means the macro was only invoked conditionally." >&2;}     { (exit 1); exit 1; }; }  fi +if test -z "${WITH_PKG_CONFIG_TRUE}" && test -z "${WITH_PKG_CONFIG_FALSE}"; then +  { { echo "$as_me:$LINENO: error: conditional \"WITH_PKG_CONFIG\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"WITH_PKG_CONFIG\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} +   { (exit 1); exit 1; }; } +fi  : ${CONFIG_STATUS=./config.status}  ac_clean_files_save=$ac_clean_files @@ -21107,7 +21198,7 @@ _ASBOX  } >&5  cat >&5 <<_CSEOF -This file was extended by $as_me, which was +This file was extended by ipmiutil $as_me 2.9.5, which was  generated by GNU Autoconf 2.59.  Invocation command line was    CONFIG_FILES    = $CONFIG_FILES @@ -21170,7 +21261,7 @@ _ACEOF  cat >>$CONFIG_STATUS <<_ACEOF  ac_cs_version="\\ -config.status +ipmiutil config.status 2.9.5  configured by $0, generated by GNU Autoconf 2.59,    with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" @@ -21282,6 +21373,8 @@ do    # Handling of arguments.    "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;    "util/Makefile" ) CONFIG_FILES="$CONFIG_FILES util/Makefile" ;; +  "lib/Makefile" ) CONFIG_FILES="$CONFIG_FILES lib/Makefile" ;; +  "lib/libipmiutil.pc" ) CONFIG_FILES="$CONFIG_FILES lib/libipmiutil.pc" ;;    "lib/lanplus/Makefile" ) CONFIG_FILES="$CONFIG_FILES lib/lanplus/Makefile" ;;    "doc/Makefile" ) CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;    "scripts/Makefile" ) CONFIG_FILES="$CONFIG_FILES scripts/Makefile" ;; @@ -21440,12 +21533,16 @@ s,@ac_ct_F77@,$ac_ct_F77,;t t  s,@LIBTOOL@,$LIBTOOL,;t t  s,@LANDESK_CFLAGS@,$LANDESK_CFLAGS,;t t  s,@LANDESK_LDADD@,$LANDESK_LDADD,;t t +s,@WITH_PKG_CONFIG_TRUE@,$WITH_PKG_CONFIG_TRUE,;t t +s,@WITH_PKG_CONFIG_FALSE@,$WITH_PKG_CONFIG_FALSE,;t t  s,@IA64_CFLAGS@,$IA64_CFLAGS,;t t  s,@LANPLUS_CFLAGS@,$LANPLUS_CFLAGS,;t t  s,@LANPLUS_LDADD@,$LANPLUS_LDADD,;t t  s,@LANPLUS_LIB@,$LANPLUS_LIB,;t t  s,@LANPLUS_CRYPTO@,$LANPLUS_CRYPTO,;t t  s,@LANPLUS_SAM@,$LANPLUS_SAM,;t t +s,@LIBSENSORS@,$LIBSENSORS,;t t +s,@SAM2OBJ@,$SAM2OBJ,;t t  s,@LD_SAMX@,$LD_SAMX,;t t  s,@GPL_CFLAGS@,$GPL_CFLAGS,;t t  s,@OS_CFLAGS@,$OS_CFLAGS,;t t @@ -21460,6 +21557,7 @@ s,@CROSS_CFLAGS@,$CROSS_CFLAGS,;t t  s,@CROSS_LFLAGS@,$CROSS_LFLAGS,;t t  s,@SYSTEMD_DIR@,$SYSTEMD_DIR,;t t  s,@SHR_LINK@,$SHR_LINK,;t t +s,@pkgconfigdir@,$pkgconfigdir,;t t  s,@LIBOBJS@,$LIBOBJS,;t t  s,@LTLIBOBJS@,$LTLIBOBJS,;t t  CEOF diff --git a/configure.ac b/configure.ac index 33e6dab..c1193c6 100644 --- a/configure.ac +++ b/configure.ac @@ -1,7 +1,10 @@  dnl Process this file with autoconf to produce a configure script. -AC_INIT(util/ipmiutil.c) -AM_INIT_AUTOMAKE(ipmiutil,2.9.4) +AC_INIT(ipmiutil,2.9.5) +AC_CONFIG_SRCDIR(util/ipmiutil.c) +echo "ipmiutil version ${PACKAGE_VERSION}"  AM_CONFIG_HEADER(config.h) +AC_PREFIX_DEFAULT(/usr) +AM_INIT_AUTOMAKE()  AC_PREFIX_DEFAULT(/usr)  @@ -131,8 +134,20 @@ AC_ARG_ENABLE([sha256],      fi]      ) +GPL_CFLAGS=""  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.], +    [if test "x$enableval" = "xyes"; then +	   CROSS_CFLAGS="$CFLAGS" +	   CROSS_LFLAGS="$LDFLAGS" +    fi] +    )  dnl configure for standalone, with no lanplus or GPL libs   AC_ARG_ENABLE([standalone], @@ -156,19 +171,26 @@ AC_ARG_ENABLE([standalone],      fi]      ) +dnl build libipmiutil with sensor modules +AC_ARG_ENABLE([libsensors], +    [  --enable-libsensors	 build libipmiutil with sensor modules [[default=no]]], +    [if test "x$enableval" = "xyes"; then +        LIBSENSORS="isensor2.o ievents2.o" +        SAM2OBJ="" +    fi] +    ) +  dnl configure for GPL build or not (GPL files: md2.h, ipmi_ioctl.h)  AC_ARG_ENABLE([gpl],      [  --enable-gpl           build with some GPL code [[default=no]]],      [if test "x$enableval" = "xyes"; then          GPL_CFLAGS="-DALLOW_GPL" -     else -        GPL_CFLAGS=""      fi]      )  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]]],) +    [  --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 @@ -189,6 +211,7 @@ else    fi  fi +dnl start main logic  case "$archm" in      ia64)  	IA64_CFLAGS="-D__IA64__" @@ -219,6 +242,30 @@ case "$archm" in          ;;  esac +dnl pkg-config support +pkgconfigdir='${libdir}/pkgconfig' +AC_MSG_CHECKING(whether to install pkg-config *.pc files) +AC_ARG_WITH(pkgconfig-dir, +	AS_HELP_STRING([--with-pkgconfig-dir=PATH], [where to install pkg-config *.pc files (EPREFIX/lib/pkgconfig)]), +[ +	case "${withval}" in +	yes|auto) +		;; +	no) +		pkgconfigdir="" +		;; +	*) +		pkgconfigdir="${withval}" +		;; +	esac +], []) +if test -n "${pkgconfigdir}"; then +	AC_MSG_RESULT(using ${pkgconfigdir}) +else +	AC_MSG_RESULT(no) +fi +AM_CONDITIONAL(WITH_PKG_CONFIG, test -n "${pkgconfigdir}") +  dnl # libdir can be set with --libdir=/usr/lib (default=${exec_prefix}/lib)  echo $libdir |grep exec_prefix >/dev/null 2>&1  if test $? -ne 0; then @@ -409,6 +456,8 @@ AC_SUBST(LANPLUS_LDADD)  AC_SUBST(LANPLUS_LIB)  AC_SUBST(LANPLUS_CRYPTO)  AC_SUBST(LANPLUS_SAM) +AC_SUBST(LIBSENSORS) +AC_SUBST(SAM2OBJ)  AC_SUBST(LD_SAMX)  AC_SUBST(GPL_CFLAGS)  AC_SUBST(OS_CFLAGS) @@ -423,8 +472,9 @@ AC_SUBST(CROSS_CFLAGS)  AC_SUBST(CROSS_LFLAGS)  AC_SUBST(SYSTEMD_DIR)  AC_SUBST(SHR_LINK) +AC_SUBST(pkgconfigdir) -AC_OUTPUT(Makefile util/Makefile lib/lanplus/Makefile doc/Makefile scripts/Makefile) +AC_OUTPUT(Makefile util/Makefile lib/Makefile lib/libipmiutil.pc lib/lanplus/Makefile doc/Makefile scripts/Makefile)  if test "x$sysname" = "xSunOS"; then  	sed -e 's/^LDFLAGS = /LDFLAGS = -L\/usr\/sfw\/lib -lxnet -lsocket -lnsl /' -e 's/-DLINUX/-DSOLARIS -I\/usr\/sfw\/include/' util/Makefile >/tmp/make  diff --git a/debian/changelog b/debian/changelog index 431ab37..38cc2bf 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +ipmiutil (2.9.5-1) UNRELEASED; urgency=medium + +  * New upstream release + + -- Jörg Frings-Fürst <debian@jff-webhosting.net>  Wed, 12 Nov 2014 17:12:39 +0100 +  ipmiutil (2.9.4-1) unstable; urgency=low    * Initial release (Closes: #753881). diff --git a/debpkg/changelog b/debpkg/changelog new file mode 100644 index 0000000..f194fd3 --- /dev/null +++ b/debpkg/changelog @@ -0,0 +1,290 @@ +ipmiutil (2.9.5-1) unstable; urgency=low + +  * New upstream version. + + -- Andy Cress <arcress@users.sourceforge.net>  Fri, 10 Oct 2014 14:28:03 -0400 + +ipmiutil (2.9.5-1) unstable; urgency=low + +  * New upstream version. + + -- Andy Cress <arcress@users.sourceforge.net>  Mon, 25 Aug 2014 04:16:26 -0400 + +ipmiutil (2.9.4-1) unstable; urgency=low + +  * New upstream version. + + -- Andy Cress <arcress@users.sourceforge.net>  Thu, 22 May 2014 04:11:16 -0400 + +ipmiutil (2.9.3-1) unstable; urgency=low + +  * New upstream version. + + -- Andy Cress <arcress@users.sourceforge.net>  Mon, 02 Dec 2013 22:39:56 -0500 + +ipmiutil (2.9.3-2) unstable; urgency=low + +  * New upstream version. + + -- Andy Cress <arcress@users.sourceforge.net>  Mon, 02 Dec 2013 22:39:26 -0500 + +ipmiutil (2.9.2-2) unstable; urgency=low + +  * New upstream version. + + -- Andy Cress <arcress@users.sourceforge.net>  Fri, 18 Oct 2013 04:11:06 -0400 + +ipmiutil (2.9.2-1) unstable; urgency=low + +  * Initial official Debian release (Closes: #650323) +  * Updated debian/copyright to DEP-5 format, and included more detail +  * See also ChangeLog file in source + + -- Andy Cress <arcress@users.sourceforge.net>  Fri, 14 Jun 2013 12:08:08 -0400 + +ipmiutil (2.9.1+nmu1) UNRELEASED; urgency=low + +  * updated rules to use dh syntax and debhelper 9 (up from 4); many lintian +    cleanups as a result +  * added dh-autoreconf as a build dependency; can now stop using beforeconf.sh +  * updated control file with additional information and standards-version +  * --enable-gpl is now used in rules; enables MD2 hash for IPMI LAN +  * daily cronjob is no longer installed via postinst script +  * prerm script added, properly deletes /var/lib/ipmiutil on purge + + -- Alex Waite <Alexqw85@gmail.com>  Fri, 14 Jun 2013 17:21:15 +0200 + +ipmiutil (2.9.1) UNRELEASED; urgency=low + +  * New upstream version. + + -- Andy Cress <arcress@users.sourceforge.net>  Fri, 12 Apr 2013 07:21:54 -0400 + +ipmiutil (2.9.0) UNRELEASED; urgency=low + +  * New upstream version. + + -- Andy Cress <arcress@users.sourceforge.net>  Thu, 04 Apr 2013 21:14:03 -0400 + +ipmiutil (2.9.0) UNRELEASED; urgency=low + +  * New upstream version. + + -- Andy Cress <arcress@users.sourceforge.net>  Thu, 04 Apr 2013 21:12:25 -0400 + +ipmiutil (2.9.0) UNRELEASED; urgency=low + +  * New upstream version. + + -- Andy Cress <arcress@users.sourceforge.net>  Thu, 04 Apr 2013 21:09:44 -0400 + +ipmiutil (2.9.0) UNRELEASED; urgency=low + +  * New upstream version. + + -- Andy Cress <arcress@users.sourceforge.net>  Thu, 04 Apr 2013 21:06:46 -0400 + +ipmiutil (2.9.0) UNRELEASED; urgency=low + +  * New upstream version. + + -- Andy Cress <arcress@users.sourceforge.net>  Thu, 04 Apr 2013 21:00:16 -0400 + +ipmiutil (2.9.0) UNRELEASED; urgency=low + +  * New upstream version. + + -- Andy Cress <arcress@users.sourceforge.net>  Thu, 04 Apr 2013 20:58:37 -0400 + +ipmiutil (2.8.9) UNRELEASED; urgency=low + +  * New upstream version. + + -- Andy Cress <arcress@users.sourceforge.net>  Sun, 31 Mar 2013 18:51:35 -0400 + +ipmiutil (2.8.9) UNRELEASED; urgency=low + +  * New upstream version. + + -- Andy Cress <arcress@users.sourceforge.net>  Sun, 31 Mar 2013 18:51:07 -0400 + +ipmiutil (2.8.9) UNRELEASED; urgency=low + +  * New upstream version. + + -- Andy Cress <arcress@users.sourceforge.net>  Sun, 31 Mar 2013 18:50:35 -0400 + +ipmiutil (2.8.9) UNRELEASED; urgency=low + +  * New upstream version. + + -- Andy Cress <arcress@users.sourceforge.net>  Sun, 31 Mar 2013 18:49:23 -0400 + +ipmiutil (2.8.9) UNRELEASED; urgency=low + +  * New upstream version. + + -- Andy Cress <arcress@users.sourceforge.net>  Sun, 31 Mar 2013 18:46:31 -0400 + +ipmiutil (2.8.8) UNRELEASED; urgency=low + +  * New upstream version. + + -- Andy Cress <arcress@users.sourceforge.net>  Thu, 17 Jan 2013 06:06:40 -0500 + +ipmiutil (2.8.7) UNRELEASED; urgency=low + +  * New upstream version. + + -- Andy Cress <arcress@users.sourceforge.net>  Tue, 11 Dec 2012 16:17:16 -0500 + +ipmiutil (2.8.6) UNRELEASED; urgency=low + +  * New upstream version. + + -- Andy Cress <arcress@users.sourceforge.net>  Thu, 30 Aug 2012 11:57:52 -0400 + +ipmiutil (2.8.5) UNRELEASED; urgency=low + +  * New upstream version. + + -- Andy Cress <arcress@users.sourceforge.net>  Wed, 13 Jun 2012 12:16:30 -0400 + +ipmiutil (2.8.5) UNRELEASED; urgency=low + +  * New upstream version. + + -- Andy Cress <arcress@users.sourceforge.net>  Wed, 13 Jun 2012 12:15:57 -0400 + +ipmiutil (2.8.5) UNRELEASED; urgency=low + +  * New upstream version. + + -- Andy Cress <arcress@users.sourceforge.net>  Wed, 13 Jun 2012 11:39:40 -0400 + +ipmiutil (2.8.4) UNRELEASED; urgency=low + +  * New upstream version. + + -- Andy Cress <arcress@users.sourceforge.net>  Thu, 03 May 2012 11:03:55 -0400 + +ipmiutil (2.8.4) UNRELEASED; urgency=low + +  * New upstream version. + + -- Andy Cress <arcress@users.sourceforge.net>  Wed, 02 May 2012 15:53:24 -0400 + +ipmiutil (2.8.3) UNRELEASED; urgency=low + +  * New upstream version. + + -- Andy Cress <arcress@users.sourceforge.net>  Thu, 22 Mar 2012 16:36:45 -0400 + +ipmiutil (2.8.2) UNRELEASED; urgency=low + +  * New upstream version. + + -- Andy Cress <arcress@users.sourceforge.net>  Mon, 13 Feb 2012 10:12:08 -0500 + +ipmiutil (2.8.1) UNRELEASED; urgency=low + +  * New upstream version. + + -- Andy Cress <arcress@users.sourceforge.net>  Fri, 13 Jan 2012 10:27:46 -0500 + +ipmiutil (2.8.0) UNRELEASED; urgency=low + +  * New upstream version. + + -- Andy Cress <arcress@users.sourceforge.net>  Wed, 07 Dec 2011 16:50:02 -0500 + +ipmiutil (2.8.0) UNRELEASED; urgency=low + +  * New upstream version. + + -- Andy Cress <arcress@users.sourceforge.net>  Wed, 07 Dec 2011 16:49:11 -0500 + +ipmiutil (2.8.0b) UNRELEASED; urgency=low + +  * New upstream version. + + -- Andy Cress <arcress@users.sourceforge.net>  Fri, 02 Dec 2011 18:37:57 -0500 + +ipmiutil (2.8.0) UNRELEASED; urgency=low + +  * New upstream version, added prerm script + + -- Andy Cress <arcress@users.sourceforge.net>  Fri, 28 Oct 2011 16:44:02 -0400 + +ipmiutil (2.7.9) UNRELEASED; urgency=low + +  * New upstream version. + + -- Andy Cress <arcress@users.sourceforge.net>  Fri, 28 Oct 2011 16:43:35 -0400 + +ipmiutil (2.8.0) UNRELEASED; urgency=low + +  * New upstream version. + + -- Andy Cress <arcress@users.sourceforge.net>  Wed, 26 Oct 2011 11:01:02 -0400 + +ipmiutil (2.7.9) UNRELEASED; urgency=low + +  * New upstream version. + + -- Andy Cress <arcress@users.sourceforge.net>  Tue, 20 Sep 2011 08:17:01 -0400 + +ipmiutil (2.7.9) UNRELEASED; urgency=low + +  * New upstream version. + + -- Andy Cress <arcress@users.sourceforge.net>  Tue, 20 Sep 2011 08:14:05 -0400 + +ipmiutil (2.7.9) UNRELEASED; urgency=low + +  * New upstream version. + + -- Andy Cress <arcress@users.sourceforge.net>  Thu, 15 Sep 2011 17:13:31 -0400 + +ipmiutil (2.7.8) UNRELEASED; urgency=low + +  * New upstream version. + + -- Andy Cress <arcress@users.sourceforge.net>  Tue, 19 Jul 2011 12:57:11 -0400 + +ipmiutil (2.7.7) UNRELEASED; urgency=low + +  * New upstream version. + + -- Andy Cress <arcress@users.sourceforge.net>  Mon, 16 May 2011 16:49:12 -0400 + +ipmiutil (2.7.6) UNRELEASED; urgency=low + +  * New upstream version. + + -- Andy Cress <arcress@users.sourceforge.net>  Fri, 15 Apr 2011 12:47:17 -0400 + +ipmiutil (2.7.5) UNRELEASED; urgency=low + +  * New upstream version. + + -- Andy Cress <arcress@users.sourceforge.net>  Fri, 25 Feb 2011 12:43:45 -0500 + +ipmiutil (2.7.4) UNRELEASED; urgency=low + +  * New upstream version. + + -- Andy Cress <arcress@users.sourceforge.net>  Tue, 11 Jan 2011 13:52:43 -0500 + +ipmiutil (2.7.3) UNRELEASED; urgency=low + +  * New upstream version. + + -- Andy Cress <arcress@users.sourceforge.net>  Fri, 17 Dec 2010 14:30:28 -0500 + +ipmiutil (2.7.2) UNRELEASED; urgency=low + +  * New upstream version. +  * Patch to allow Debian package builds from svn. + + -- Andy Cress <arcress@users.sourceforge.net>  Fri, 29 Oct 2010 16:44:31 -0500 diff --git a/debpkg/compat b/debpkg/compat new file mode 100644 index 0000000..ec63514 --- /dev/null +++ b/debpkg/compat @@ -0,0 +1 @@ +9 diff --git a/debpkg/control b/debpkg/control new file mode 100644 index 0000000..b69ef91 --- /dev/null +++ b/debpkg/control @@ -0,0 +1,27 @@ +Source: ipmiutil +Section: utils +Priority: optional +Maintainer: Andy Cress <arcress@users.sourceforge.net> +Build-Depends: debhelper (>> 9), dh-autoreconf, libssl-dev +Standards-Version: 3.9.4.0 +Vcs-Svn: svn://svn.code.sf.net/p/ipmiutil/code/trunk +Vcs-Browser: https://sourceforge.net/p/ipmiutil/code/HEAD/tree/trunk/  +Homepage: http://ipmiutil.sourceforge.net/ + +Package: ipmiutil +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends}, lsb-base +Suggests: openipmi +Description: Easy-to-use IPMI server management utilities + The ipmiutil package provides easy-to-use utilities to view the SEL, + perform an IPMI chassis reset, set up the IPMI LAN and Platform Event Filter + entries to allow SNMP alerts, Serial-Over-LAN console, event daemon, and + other IPMI tasks. + . + These can be invoked with the metacommand ipmiutil, or via subcommand + shortcuts as well.  IPMIUTIL can also write sensor thresholds, FRU asset tags, + and has a full IPMI configuration save/restore. + An IPMI driver can be provided by either the OpenIPMI driver (/dev/ipmi0) + or the Intel IPMI driver (/dev/imb), etc.  If used locally and no driver is + detected, ipmiutil will use user-space direct I/Os instead. + diff --git a/debpkg/copyright b/debpkg/copyright new file mode 100644 index 0000000..1800759 --- /dev/null +++ b/debpkg/copyright @@ -0,0 +1,129 @@ +Format:  http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: ipmiutil +Upstream-Contact: Andy Cress <arcress at users.sourceforge.net> +Source:  http://ipmiutil.sourceforge.net  +Comment: This package was debianized by Andy Cress on 2010-10-29,  +   with Debian package updates by Alex Waite on 2013-06-14 + +Files: * +Copyright: 2001-2008, Intel Corporation +   2009-2012, Kontron America +   2013, Andy Cress <arcress at users.sourceforge.net> +License: BSD-3-clause + +Files: lib/lanplus/*  +Copyright: 2003 Sun Microsystems, Inc. +License:   BSD-3-clause + +Files: util/itsol.c +Copyright: 2005 Tyan Computer Corp.   +License:   BSD-3-clause + +Files: util/iekanalyzer.c +Copyright: 2007 Kontron Canada, Inc.  +           2003 Sun Microsystems, Inc.  +License:   BSD-3-clause + +Files: util/md2.h +Copyright: 2003 FreeIPMI Core Team +Comment:   Optional to include this file, based on configure options +License:   GPL-2.0 + +Files: util/AnsiTerm.cpp +Copyright: 2009 Robert Nelson <robertnelson at users.sourceforge.net> +License:   BSD-2-clause + +Files: util/oem_dell.c +Copyright: 2008, Dell Inc +License:   BSD-3-clause + +Files: util/oem_sun.c +Copyright: 2005 Sun Microsystems, Inc. +License:   BSD-3-clause + +Files: util/ifirewall.c +Copyright: 2010 Kontron America Inc.  +	   2005 International Business Machines, Inc.   +	   2003 Sun Microsystems, Inc.   +License:   BSD-3-clause + +Files: util/ifwum.c util/ihpm.c +Copyright: 2004-2006 Kontron Canada, Inc.  +           2003 Sun Microsystems, Inc.  +License:   BSD-3-clause + +Files: util/md5.c +Copyright: 1999, 2000, 2002 Aladdin Enterprises. +Comment: Aladdin unrestricted license is compatible with BSD-3-clause +License: Aladdin +  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. +  L. Peter Deutsch +  ghost@aladdin.com + +License:   BSD-3-clause + Redistribution and use in source and binary forms, with or without  + modification, are permitted provided that the following conditions are met: +   a. Redistributions of source code must retain the above copyright notice,  +      this list of conditions and the following disclaimer.  +   b. 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.  +   c. Neither the name of Kontron, nor the names of its  +      contributors may be used to endorse or promote products derived from  +      this software without specific prior written permission.  + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 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 COPYRIGHT OWNER 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 + Redistribution and use in source and binary forms, with or without  + modification, are permitted provided that the following conditions are met: +  a. Redistributions of source code must retain the above copyright notice,  +     this list of conditions and the following disclaimer.  +  b. 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 COPYRIGHT HOLDERS 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 COPYRIGHT OWNER 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.0 +  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, 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. +  A copy of the GNU General Public License is available as  +  /usr/share/common-licenses/GPL-2 in the Debian distribution or on  +  the World Wide Web at http://www.gnu.org/copyleft/gpl.html. You can  +  also obtain it by writing to the Free Software Foundation, Inc.,  +  51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.  diff --git a/debpkg/dirs b/debpkg/dirs new file mode 100644 index 0000000..d398c09 --- /dev/null +++ b/debpkg/dirs @@ -0,0 +1,2 @@ +etc/init.d +etc/cron.daily diff --git a/debpkg/docs b/debpkg/docs new file mode 100644 index 0000000..55bc0a6 --- /dev/null +++ b/debpkg/docs @@ -0,0 +1,2 @@ +README +AUTHORS diff --git a/debpkg/files b/debpkg/files new file mode 100644 index 0000000..793f54c --- /dev/null +++ b/debpkg/files @@ -0,0 +1 @@ +ipmiutil_2.9.1_amd64.deb utils optional diff --git a/debpkg/ipmiutil.cron.daily b/debpkg/ipmiutil.cron.daily new file mode 120000 index 0000000..9241b18 --- /dev/null +++ b/debpkg/ipmiutil.cron.daily @@ -0,0 +1 @@ +../scripts/checksel
\ No newline at end of file diff --git a/debpkg/ipmiutil.lintian-overrides b/debpkg/ipmiutil.lintian-overrides new file mode 100644 index 0000000..5667e46 --- /dev/null +++ b/debpkg/ipmiutil.lintian-overrides @@ -0,0 +1,4 @@ +# The only GPL code in ipmiutil is md2.h, which is excluded +# by default, so ignore unsafe link with openssl warning +ipmiutil: possible-gpl-code-linked-with-openssl + diff --git a/debpkg/ipmiutil.substvars b/debpkg/ipmiutil.substvars new file mode 100644 index 0000000..275a91d --- /dev/null +++ b/debpkg/ipmiutil.substvars @@ -0,0 +1,2 @@ +shlibs:Depends=libc6 (>= 2.15), libssl1.0.0 (>= 1.0.0) +misc:Depends= diff --git a/debpkg/postinst b/debpkg/postinst new file mode 100755 index 0000000..399957f --- /dev/null +++ b/debpkg/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/debpkg/prerm b/debpkg/prerm new file mode 100755 index 0000000..e66d2d9 --- /dev/null +++ b/debpkg/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/debpkg/rules b/debpkg/rules new file mode 100755 index 0000000..49191d6 --- /dev/null +++ b/debpkg/rules @@ -0,0 +1,23 @@ +#!/usr/bin/make -f +%: +	dh $@ --with autoreconf + +PKD  = $(abspath $(dir $(MAKEFILE_LIST))) +PKG  = $(word 2,$(shell dpkg-parsechangelog -l$(PKD)/changelog | grep ^Source)) +VER ?= $(shell dpkg-parsechangelog -l$(PKD)/changelog | perl -ne 'print $$1 if m{^Version:\s+(?:\d+:)?(\d.*)(?:\-\d+.*)};') + +.PHONY: get-orig-source +## http://wiki.debian.org/onlyjob/get-orig-source +get-orig-source: $(info I: $(PKG)_$(VER)) +	@echo "# Downloading..." +	uscan --noconf --verbose --rename --destdir=$(CURDIR) --check-dirname-level=0 --force-download --download-version $(VER) $(PKD)  + +override_dh_auto_configure: +	dh_auto_configure -- --enable-gpl + +# work around bug #670796 +override_dh_autoreconf: +	dh_autoreconf --exclude=mkinstalldirs + +override_dh_installchangelogs: +	dh_installchangelogs ChangeLog diff --git a/debpkg/source/format b/debpkg/source/format new file mode 100644 index 0000000..163aaf8 --- /dev/null +++ b/debpkg/source/format @@ -0,0 +1 @@ +3.0 (quilt) diff --git a/debpkg/watch b/debpkg/watch new file mode 100644 index 0000000..f1d1c3c --- /dev/null +++ b/debpkg/watch @@ -0,0 +1,2 @@ +version=3 +http://sf.net/ipmiutil/ipmiutil-(.+)\.tar\.gz diff --git a/doc/Makefile b/doc/Makefile index 4ec983d..4016bc3 100644 --- a/doc/Makefile +++ b/doc/Makefile @@ -47,14 +47,14 @@ CONFIG_CLEAN_FILES =  SOURCES =  DIST_SOURCES =  DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = ${SHELL} /home/acress/ipmiutil/src/missing --run aclocal-1.9 +ACLOCAL = ${SHELL} /usr/dev/ipmiutil-2.9.5/missing --run aclocal-1.9  AMDEP_FALSE = #  AMDEP_TRUE =  -AMTAR = ${SHELL} /home/acress/ipmiutil/src/missing --run tar +AMTAR = ${SHELL} /usr/dev/ipmiutil-2.9.5/missing --run tar  AR = ar -AUTOCONF = ${SHELL} /home/acress/ipmiutil/src/missing --run autoconf -AUTOHEADER = ${SHELL} /home/acress/ipmiutil/src/missing --run autoheader -AUTOMAKE = ${SHELL} /home/acress/ipmiutil/src/missing --run automake-1.9 +AUTOCONF = ${SHELL} /usr/dev/ipmiutil-2.9.5/missing --run autoconf +AUTOHEADER = ${SHELL} /usr/dev/ipmiutil-2.9.5/missing --run autoheader +AUTOMAKE = ${SHELL} /usr/dev/ipmiutil-2.9.5/missing --run automake-1.9  AWK = gawk  CC = gcc  CCDEPMODE = depmode=gcc3 @@ -97,24 +97,26 @@ LDFLAGS =  LD_SAMX = ../lib/libipmi_lanplus.a -lcrypto  LIBOBJS =   LIBS =  +LIBSENSORS =   LIBTOOL = $(SHELL) $(top_builddir)/libtool  LIB_DIR = /usr/lib64  LN_S = ln -s  LTLIBOBJS =  -MAKEINFO = ${SHELL} /home/acress/ipmiutil/src/missing --run makeinfo +MAKEINFO = ${SHELL} /usr/dev/ipmiutil-2.9.5/missing --run makeinfo  OBJEXT = o  OS_CFLAGS = -DLINUX  -fPIC  -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2  OS_DRIVERS = imbapi.c ipmimv.c ipmild.c ipmidir.c  OS_LFLAGS =   PACKAGE = ipmiutil  PACKAGE_BUGREPORT =  -PACKAGE_NAME =  -PACKAGE_STRING =  -PACKAGE_TARNAME =  -PACKAGE_VERSION =  +PACKAGE_NAME = ipmiutil +PACKAGE_STRING = ipmiutil 2.9.5 +PACKAGE_TARNAME = ipmiutil +PACKAGE_VERSION = 2.9.5  PATH_SEPARATOR = :  PKG_DIR = /usr/src/redhat  RANLIB = ranlib +SAM2OBJ = isensor2.o ievents2.o  SED = /bin/sed  SET_MAKE =   SHELL = /bin/sh @@ -122,7 +124,9 @@ SHR_LINK = libipmiutil.so  STRIP = strip  SUBDIR_S = doc scripts lib util  SYSTEMD_DIR = /usr/share/ipmiutil -VERSION = 2.9.4 +VERSION = 2.9.5 +WITH_PKG_CONFIG_FALSE = # +WITH_PKG_CONFIG_TRUE =   ac_ct_AR = ar  ac_ct_CC = gcc  ac_ct_CXX = g++ @@ -153,13 +157,14 @@ host_os = linux-gnu  host_vendor = redhat  includedir = ${prefix}/include  infodir = ${prefix}/info -install_sh = /home/acress/ipmiutil/src/install-sh +install_sh = /usr/dev/ipmiutil-2.9.5/install-sh  libdir = ${exec_prefix}/lib  libexecdir = ${exec_prefix}/libexec  localstatedir = ${prefix}/var  mandir = ${prefix}/share/man  mkdir_p = mkdir -p --  oldincludedir = /usr/include +pkgconfigdir = ${libdir}/pkgconfig  prefix = /usr  program_transform_name = s,x,x,  sbindir = ${exec_prefix}/sbin diff --git a/doc/Makefile.in b/doc/Makefile.in index a6825ce..0a8583f 100644 --- a/doc/Makefile.in +++ b/doc/Makefile.in @@ -97,6 +97,7 @@ LDFLAGS = @LDFLAGS@  LD_SAMX = @LD_SAMX@  LIBOBJS = @LIBOBJS@  LIBS = @LIBS@ +LIBSENSORS = @LIBSENSORS@  LIBTOOL = @LIBTOOL@  LIB_DIR = @LIB_DIR@  LN_S = @LN_S@ @@ -115,6 +116,7 @@ PACKAGE_VERSION = @PACKAGE_VERSION@  PATH_SEPARATOR = @PATH_SEPARATOR@  PKG_DIR = @PKG_DIR@  RANLIB = @RANLIB@ +SAM2OBJ = @SAM2OBJ@  SED = @SED@  SET_MAKE = @SET_MAKE@  SHELL = @SHELL@ @@ -123,6 +125,8 @@ STRIP = @STRIP@  SUBDIR_S = @SUBDIR_S@  SYSTEMD_DIR = @SYSTEMD_DIR@  VERSION = @VERSION@ +WITH_PKG_CONFIG_FALSE = @WITH_PKG_CONFIG_FALSE@ +WITH_PKG_CONFIG_TRUE = @WITH_PKG_CONFIG_TRUE@  ac_ct_AR = @ac_ct_AR@  ac_ct_CC = @ac_ct_CC@  ac_ct_CXX = @ac_ct_CXX@ @@ -160,6 +164,7 @@ localstatedir = @localstatedir@  mandir = ${prefix}/share/man  mkdir_p = @mkdir_p@  oldincludedir = @oldincludedir@ +pkgconfigdir = @pkgconfigdir@  prefix = /usr  program_transform_name = @program_transform_name@  sbindir = @sbindir@ diff --git a/doc/UserGuide b/doc/UserGuide index d7eb67c..d6bd83d 100644 --- a/doc/UserGuide +++ b/doc/UserGuide @@ -1,6 +1,6 @@                    IPMIUTIL USER GUIDE  -                     VERSION 2.9.4 +                     VERSION 2.9.5           An easy-to-use IPMI server management utility @@ -6161,6 +6161,7 @@ The make rpm produces a binary rpm, and a source rpm, which can be  installed with "rpm -i *.rpm".  To build and install a Debian package, do this: +#  mv debpkg debian  #  dpkg-buildpackage  then install it with "dpkg -i *.deb". @@ -3,7 +3,7 @@  ipmiutil_cmd \- a tool to send specific IPMI commands via the command line.  .SH SYNOPSIS -.B "ipmiutil cmd [-qsx -NUPREFJTVY] bus rsSa netFn/lun cmd [data bytes]" +.B "ipmiutil cmd [-pqsx -NUPREFJTVY] bus rsSa netFn/lun cmd [data bytes]"  .SH DESCRIPTION  This @@ -26,6 +26,8 @@ specification, or you have specific pre-written commands to send.  .SH OPTIONS  Command line options are described below. +.IP "-p" +Port to use.  Defaults to RMCP port 623.  .IP "-q"  Quiet mode.  Show only minimal header information.  .IP "-s" @@ -185,6 +185,8 @@ The default is to automatically obtain this from the Linux ifconfig.  Nodename or IP address of the remote target system.  If a nodename is  specified, IPMI LAN interface is used.  Otherwise the local system  management interface is used. +.IP "-O" +Observe security.  Disables the default null user and disable cipher 0.  .IP "-P rmt_pswd"  Remote password for the nodename given.  The default is a null password.  Same as \-R below. diff --git a/doc/ipmiutil.spec b/doc/ipmiutil.spec index 245eb44..308289e 100644 --- a/doc/ipmiutil.spec +++ b/doc/ipmiutil.spec @@ -3,7 +3,7 @@  # Copyright (c) 2012 Andy Cress  #  Name:      ipmiutil -Version: 2.9.4 +Version: 2.9.5  Release: 1%{?dist}  Summary:   Easy-to-use IPMI server management utilities  License:   BSD @@ -13,7 +13,7 @@ URL:       http://ipmiutil.sourceforge.net  BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)  # Suggests: cron or vixie-cron or cronie or similar  %if 0%{?fedora} >= 15 -BuildRequires: systemd +BuildRequires: systemd autoconf automake  Requires: systemd-units  %endif  %if 0%{?suse_version} >= 1210 @@ -30,7 +30,7 @@ BuildRequires: gcc gcc-c++ libtool systemd  %define systemd_fls %{unit_dir}  # Requires: %{?systemd_requires}  %else -BuildRequires: gcc gcc-c++ libtool +BuildRequires: gcc gcc-c++ libtool   %if 0%{?fedora} == 16  %define unit_dir  /lib/systemd/system  %else @@ -55,12 +55,19 @@ detected, ipmiutil will use user-space direct I/Os instead.  %package devel  Group:    Development/Libraries  Summary:  Includes libraries and headers for the ipmiutil package -Provides: ipmiutil-static = %{version}-%{release}  %description devel  The ipmiutil-devel package contains headers and libraries which are  useful for building custom IPMI applications. +%package static +Group:    Development/Libraries +Summary:  Includes static libraries for the ipmiutil package + +%description static +The ipmiutil-static package contains static libraries which are +useful for building custom IPMI applications. +  %prep  %setup -q @@ -167,9 +174,11 @@ rm -rf %{buildroot}  %{_datadir}/%{name}/ievents.h  %{_datadir}/%{name}/Makefile  %{_includedir}/ipmicmd.h -%{_libdir}/libipmiutil.a  %{_libdir}/libipmiutil.so +%files static +%defattr(-,root,root) +%{_libdir}/libipmiutil.a  %pre  %if 0%{?req_systemd} @@ -65,9 +65,7 @@ Show output in a nominal/canonical format, with a default delimiter of '|'.  Show the 16 raw hex bytes for each SEL entry.  The default is to display  interpreted entries, and include relevant hex event bytes.  .IP "-p" -By default, all SEL records are displayed.  This option -causes only the Panic events with sensor_type = 0x20 (OS Critical Stop) -to be displayed. +Port to use.  Defaults to RMCP port 623.  .IP "-s N"  Show only SEL events with severity N or greater.  Severity 0=INF, 1=MIN,  2=MAJ, 3=CRT.  The default is to show all SEL events. @@ -55,6 +55,8 @@ Use a Trace log.  The output_file is created and all SOL screen output is  written to the file, including VT100 escape sequences.  If the output_file  exists, the output is appended to it.  This can be used to log what the  user has done in an SOL session. +.IP "-p" +Port to use.  Defaults to RMCP port 623.  .IP "-r"  Use Raw terminal I/O instead of custom VT100 to ANSI translation (in Windows).  Use this option if the server is configured in BIOS and BMC for ANSI and diff --git a/lib/Makefile b/lib/Makefile index c5c9030..6d0b2ec 100644 --- a/lib/Makefile +++ b/lib/Makefile @@ -1,5 +1,181 @@ +# Makefile.in generated by automake 1.9.6 from Makefile.am. +# lib/Makefile.  Generated from Makefile.in by configure. + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005  Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + + +srcdir = . +top_srcdir = .. + +pkgdatadir = $(datadir)/ipmiutil +pkglibdir = $(libdir)/ipmiutil +pkgincludedir = $(includedir)/ipmiutil +top_builddir = .. +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = x86_64-redhat-linux-gnu +host_triplet = x86_64-redhat-linux-gnu +subdir = lib +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ +	$(srcdir)/libipmiutil.pc.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ +	$(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = libipmiutil.pc +SOURCES = +DIST_SOURCES = +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +INSTALL = sh ../install-sh -c +ACLOCAL = ${SHELL} /usr/dev/ipmiutil-2.9.5/missing --run aclocal-1.9 +AMDEP_FALSE = # +AMDEP_TRUE =  +AMTAR = ${SHELL} /usr/dev/ipmiutil-2.9.5/missing --run tar +AR = ar +AUTOCONF = ${SHELL} /usr/dev/ipmiutil-2.9.5/missing --run autoconf +AUTOHEADER = ${SHELL} /usr/dev/ipmiutil-2.9.5/missing --run autoheader +AUTOMAKE = ${SHELL} /usr/dev/ipmiutil-2.9.5/missing --run automake-1.9 +AWK = gawk +CC = gcc +CCDEPMODE = depmode=gcc3 +CFLAGS = -g -O2 +CPP = gcc -E +CPPFLAGS =  +CROSS_CFLAGS =  +CROSS_LFLAGS =  +CXX = g++ +CXXCPP = g++ -E +CXXDEPMODE = depmode=gcc3 +CXXFLAGS = -g -O2 +CYGPATH_W = echo +DEFS = -DHAVE_CONFIG_H +DEPDIR = .deps +ECHO = echo +ECHO_C =  +ECHO_N = -n +ECHO_T =  +EGREP = grep -E +EXEEXT =  +F77 = f95 +FFLAGS = -g -O2 +GPL_CFLAGS =  +IA64_CFLAGS =  +INIT_DIR = /etc//rc.d/init.d +INSTALL_DATA = ${INSTALL} -m 644 +INSTALL_PROGRAM = ${INSTALL} +# INSTALL_DATA = $(INSTALL) -m 644 +INSTALL_SCRIPT = $(INSTALL) -m 755 +INSTALL_STRIP_PROGRAM = ${SHELL} $(install_sh) -c -s +INS_LIB =  +LANDESK_CFLAGS =  +LANDESK_LDADD =  +LANPLUS_CFLAGS = -DHAVE_LANPLUS +LANPLUS_CRYPTO = -lcrypto +LANPLUS_LDADD = -L../lib -lipmi_lanplus -L/usr/local/lib -lcrypto +LANPLUS_LIB = ../lib/libipmi_lanplus.a +LANPLUS_SAM = yes +LDFLAGS =  +LD_SAMX = ../lib/libipmi_lanplus.a -lcrypto +LIBOBJS =  +LIBS =  +LIBSENSORS =  +LIBTOOL = $(SHELL) $(top_builddir)/libtool +LIB_DIR = /usr/lib64 +LN_S = ln -s +LTLIBOBJS =  +MAKEINFO = ${SHELL} /usr/dev/ipmiutil-2.9.5/missing --run makeinfo +OBJEXT = o +OS_CFLAGS = -DLINUX  -fPIC  -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2 +OS_DRIVERS = imbapi.c ipmimv.c ipmild.c ipmidir.c +OS_LFLAGS =  +PACKAGE = ipmiutil +PACKAGE_BUGREPORT =  +PACKAGE_NAME = ipmiutil +PACKAGE_STRING = ipmiutil 2.9.5 +PACKAGE_TARNAME = ipmiutil +PACKAGE_VERSION = 2.9.5 +PATH_SEPARATOR = : +PKG_DIR = /usr/src/redhat +RANLIB = ranlib +SAM2OBJ = isensor2.o ievents2.o +SED = /bin/sed +SET_MAKE =  +SHELL = /bin/sh +SHR_LINK = libipmiutil.so +STRIP = strip +SUBDIR_S = doc scripts lib util +SYSTEMD_DIR = /usr/share/ipmiutil +VERSION = 2.9.5 +WITH_PKG_CONFIG_FALSE = # +WITH_PKG_CONFIG_TRUE =  +ac_ct_AR = ar +ac_ct_CC = gcc +ac_ct_CXX = g++ +ac_ct_F77 = f95 +ac_ct_RANLIB = ranlib +ac_ct_STRIP = strip +am__fastdepCC_FALSE = # +am__fastdepCC_TRUE =  +am__fastdepCXX_FALSE = # +am__fastdepCXX_TRUE =  +am__include = include +am__leading_dot = . +am__quote =  +am__tar = ${AMTAR} chof - "$$tardir" +am__untar = ${AMTAR} xf - +bindir = ${exec_prefix}/bin +build = x86_64-redhat-linux-gnu +build_alias =  +build_cpu = x86_64 +build_os = linux-gnu +build_vendor = redhat +datadir = $(iprefix)/share +exec_prefix = ${prefix} +host = x86_64-redhat-linux-gnu +host_alias =  +host_cpu = x86_64 +host_os = linux-gnu +host_vendor = redhat +includedir = ${prefix}/include +infodir = ${prefix}/info +install_sh = /usr/dev/ipmiutil-2.9.5/install-sh +libdir = $(iprefix)/lib +libexecdir = ${exec_prefix}/libexec +localstatedir = ${prefix}/var +mandir = $(iprefix)/man +mkdir_p = mkdir -p -- +oldincludedir = /usr/include +pkgconfigdir = ${libdir}/pkgconfig +prefix = /usr +program_transform_name = s,x,x, +sbindir = $(iexec_prefix)/sbin +sharedstatedir = ${prefix}/com +sysconfdir = ${prefix}/etc +target_alias =  +  #!/bin/sh -# Makefile to build/install ipmiutil lib files +# Makefile.am to build/install ipmiutil lib files  #  # If --enable-lanplus (-DHAVE_LANPLUS), then this script  # does a make from lib/lanplus/ for the lanplus library. @@ -8,19 +184,169 @@  #   libipmiapi32.a  libipmiapi64.a.suse  libipmiapi64.a.redhat  #  MKDIR = sh ../mkinstalldirs  -INSTALL = sh ../install-sh -c -INSTALL_DATA = $(INSTALL) -m 644 -INSTALL_SCRIPT =  $(INSTALL) -m 755  INSTALL_BIN = /usr/bin/install -c -prefix = /usr - -datadir = ${prefix}/share -mandir = ${prefix}/man -sbindir = ${exec_prefix}/sbin -libdir = ${exec_prefix}/lib +iprefix = /usr +iexec_prefix = ${prefix}  datato = ${DESTDIR}${datadir}/ipmiutil -lib32  = ${DESTDIR}/usr/lib -lib64  = ${DESTDIR}/usr/lib64 +lib32 = ${DESTDIR}$(iprefix)/lib +lib64 = ${DESTDIR}$(iprefix)/lib64 +all: all-am + +.SUFFIXES: +$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps) +	@for dep in $?; do \ +	  case '$(am__configure_deps)' in \ +	    *$$dep*) \ +	      cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ +		&& exit 0; \ +	      exit 1;; \ +	  esac; \ +	done; \ +	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign  lib/Makefile'; \ +	cd $(top_srcdir) && \ +	  $(AUTOMAKE) --foreign  lib/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status +	@case '$?' in \ +	  *config.status*) \ +	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ +	  *) \ +	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ +	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ +	esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) +	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure:  $(am__configure_deps) +	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4):  $(am__aclocal_m4_deps) +	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +libipmiutil.pc: $(top_builddir)/config.status $(srcdir)/libipmiutil.pc.in +	cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ + +mostlyclean-libtool: +	-rm -f *.lo + +clean-libtool: +	-rm -rf .libs _libs + +distclean-libtool: +	-rm -f libtool +uninstall-info-am: +tags: TAGS +TAGS: + +ctags: CTAGS +CTAGS: + + +distdir: $(DISTFILES) +	@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ +	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ +	list='$(DISTFILES)'; for file in $$list; do \ +	  case $$file in \ +	    $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ +	    $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ +	  esac; \ +	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ +	  dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ +	  if test "$$dir" != "$$file" && test "$$dir" != "."; then \ +	    dir="/$$dir"; \ +	    $(mkdir_p) "$(distdir)$$dir"; \ +	  else \ +	    dir=''; \ +	  fi; \ +	  if test -d $$d/$$file; then \ +	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ +	      cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ +	    fi; \ +	    cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ +	  else \ +	    test -f $(distdir)/$$file \ +	    || cp -p $$d/$$file $(distdir)/$$file \ +	    || exit 1; \ +	  fi; \ +	done +check-am: all-am +check: check-am +all-am: Makefile +installdirs: +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am +	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: +	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ +	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ +	  `test -z '$(STRIP)' || \ +	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: +	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: +	@echo "This command is intended for maintainers to use" +	@echo "it deletes files that may require special tools to rebuild." +clean-am: clean-generic clean-libtool mostlyclean-am + +distclean-am: clean-am distclean-generic distclean-libtool + +dvi: dvi-am + +dvi-am: + +html: html-am + +info: info-am + +info-am: + +install-data-am: + +install-exec-am: + +install-info: install-info-am + +install-man: + +installcheck-am: + +maintainer-clean: maintainer-clean-am +	-rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-info-am + +.PHONY: all all-am check check-am clean clean-generic clean-libtool \ +	distclean distclean-generic distclean-libtool distdir dvi \ +	dvi-am html html-am info info-am install install-am \ +	install-data install-data-am install-exec install-exec-am \ +	install-info install-info-am install-man install-strip \ +	installcheck installcheck-am installdirs maintainer-clean \ +	maintainer-clean-generic mostlyclean mostlyclean-generic \ +	mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am \ +	uninstall-info-am +  all:	  	if [ -f libipmiapi32.a ]; then \ @@ -33,7 +359,6 @@ all:  	fi  	cd lanplus; make clean; make    	cp -f lanplus/libipmi_lanplus.a  . -	# cp -f lanplus/.libs/libipmi_lanplus.so.0.0.0 libipmi_lanplus.so   clean:  	rm -f libipmiapi.a lib*_lanplus.a lib*_lanplus.so @@ -42,11 +367,11 @@ clean:  clobber:  	rm -f libipmiapi.a lib*_lanplus.a  lib*_lanplus.so  	cd lanplus; make clean -	 +  distclean:  	rm -f libipmiapi.a lib*.a  lib*_lanplus.so  	cd lanplus; make distclean -	 +  install:  	$(MKDIR) ${datato}  	cd lanplus; make install @@ -68,6 +393,6 @@ installso:  	(cd ${lib32} && rm -f libipmi_lanplus.* ); \  	../../libtool --finish ${lib64} \  	fi -	 -# $(INSTALL_DATA) libipmiapi.a  ${datato} -# $(INSTALL_DATA) libintf_lanplus.a  ${datato} +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/lib/Makefile.am b/lib/Makefile.am new file mode 100644 index 0000000..cfb6fc4 --- /dev/null +++ b/lib/Makefile.am @@ -0,0 +1,71 @@ +#!/bin/sh +# Makefile.am to build/install ipmiutil lib files +# +# If --enable-lanplus (-DHAVE_LANPLUS), then this script +# does a make from lib/lanplus/ for the lanplus library. +# If --enable-landesk (-DLINK_LANDESK), then this script +# assumes that these files are copied into this lib/ directory: +#   libipmiapi32.a  libipmiapi64.a.suse  libipmiapi64.a.redhat +# +MKDIR = sh ../mkinstalldirs  +INSTALL = sh ../install-sh -c +# INSTALL_DATA = $(INSTALL) -m 644 +INSTALL_SCRIPT =  $(INSTALL) -m 755 +INSTALL_BIN = /usr/bin/install -c +iprefix = @prefix@ +iexec_prefix = @exec_prefix@ + +sbindir = $(iexec_prefix)/sbin +mandir = $(iprefix)/man +libdir = $(iprefix)/lib +datadir = $(iprefix)/share +datato = ${DESTDIR}${datadir}/ipmiutil +lib32  = ${DESTDIR}$(iprefix)/lib +lib64  = ${DESTDIR}$(iprefix)/lib64 + +all:	 +	if [ -f libipmiapi32.a ]; then \ +	  rm -f libipmiapi.a;  \ +	  if [ "`uname -m`" = "x86_64" ]; then \ +	    if [ -f /etc/SuSE-release ]; then  \ +	      cp -f libipmiapi64.a.suse libipmiapi.a; \ +	    else cp -f libipmiapi64.a.redhat  libipmiapi.a; fi \ +          else cp -f libipmiapi32.a libipmiapi.a; fi \ +	fi +	cd lanplus; make clean; make   +	cp -f lanplus/libipmi_lanplus.a  . + +clean: +	rm -f libipmiapi.a lib*_lanplus.a lib*_lanplus.so +	cd lanplus; make clean + +clobber: +	rm -f libipmiapi.a lib*_lanplus.a  lib*_lanplus.so +	cd lanplus; make clean +	 +distclean: +	rm -f libipmiapi.a lib*.a  lib*_lanplus.so +	cd lanplus; make distclean +	 +install: +	$(MKDIR) ${datato} +	cd lanplus; make install + +check: + +installso: +	@if [ -d /usr/lib64 ]; then \ +	$(MKDIR) ${lib64} ; \ +	echo "installing libipmi_lanplus into ${lib64}"; \ +	cd lanplus; /bin/sh ../../libtool --mode=install $(INSTALL_BIN)  'libipmi_lanplus.la' '${lib64}/libipmi_lanplus.la' ; \ +	$(INSTALL_BIN) .libs/libipmi_lanplus.so.0.0.0 ${lib64}/libipmi_lanplus.so.0.0.0 ; \ +	(cd ${lib64} && rm -f libipmi_lanplus.so.0 && ln -s libipmi_lanplus.so.0.0.0 libipmi_lanplus.so.0) ; \ +	(cd ${lib64} && rm -f libipmi_lanplus.so && ln -s libipmi_lanplus.so.0.0.0 libipmi_lanplus.so) ; \ +	$(INSTALL_BIN) .libs/libipmi_lanplus.lai ${lib64}/libipmi_lanplus.la ; \ +	$(INSTALL_BIN) .libs/libipmi_lanplus.a ${lib64}/libipmi_lanplus.a; \ +	ranlib ${lib64}/libipmi_lanplus.a ; \ +	chmod 644 ${lib64}/libipmi_lanplus.a ;  \ +	(cd ${lib32} && rm -f libipmi_lanplus.* ); \ +	../../libtool --finish ${lib64} \ +	fi +	 diff --git a/lib/Makefile.in b/lib/Makefile.in new file mode 100644 index 0000000..58a8f73 --- /dev/null +++ b/lib/Makefile.in @@ -0,0 +1,398 @@ +# Makefile.in generated by automake 1.9.6 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005  Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ +srcdir = @srcdir@ +top_srcdir = @top_srcdir@ +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +top_builddir = .. +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = lib +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ +	$(srcdir)/libipmiutil.pc.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ +	$(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = libipmiutil.pc +SOURCES = +DIST_SOURCES = +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +INSTALL = sh ../install-sh -c +ACLOCAL = @ACLOCAL@ +AMDEP_FALSE = @AMDEP_FALSE@ +AMDEP_TRUE = @AMDEP_TRUE@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CROSS_CFLAGS = @CROSS_CFLAGS@ +CROSS_LFLAGS = @CROSS_LFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +ECHO = @ECHO@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +GPL_CFLAGS = @GPL_CFLAGS@ +IA64_CFLAGS = @IA64_CFLAGS@ +INIT_DIR = @INIT_DIR@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +# INSTALL_DATA = $(INSTALL) -m 644 +INSTALL_SCRIPT = $(INSTALL) -m 755 +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +INS_LIB = @INS_LIB@ +LANDESK_CFLAGS = @LANDESK_CFLAGS@ +LANDESK_LDADD = @LANDESK_LDADD@ +LANPLUS_CFLAGS = @LANPLUS_CFLAGS@ +LANPLUS_CRYPTO = @LANPLUS_CRYPTO@ +LANPLUS_LDADD = @LANPLUS_LDADD@ +LANPLUS_LIB = @LANPLUS_LIB@ +LANPLUS_SAM = @LANPLUS_SAM@ +LDFLAGS = @LDFLAGS@ +LD_SAMX = @LD_SAMX@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBSENSORS = @LIBSENSORS@ +LIBTOOL = @LIBTOOL@ +LIB_DIR = @LIB_DIR@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +OBJEXT = @OBJEXT@ +OS_CFLAGS = @OS_CFLAGS@ +OS_DRIVERS = @OS_DRIVERS@ +OS_LFLAGS = @OS_LFLAGS@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PKG_DIR = @PKG_DIR@ +RANLIB = @RANLIB@ +SAM2OBJ = @SAM2OBJ@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SHR_LINK = @SHR_LINK@ +STRIP = @STRIP@ +SUBDIR_S = @SUBDIR_S@ +SYSTEMD_DIR = @SYSTEMD_DIR@ +VERSION = @VERSION@ +WITH_PKG_CONFIG_FALSE = @WITH_PKG_CONFIG_FALSE@ +WITH_PKG_CONFIG_TRUE = @WITH_PKG_CONFIG_TRUE@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_F77 = @ac_ct_F77@ +ac_ct_RANLIB = @ac_ct_RANLIB@ +ac_ct_STRIP = @ac_ct_STRIP@ +am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ +am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ +am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ +am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +datadir = $(iprefix)/share +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = $(iprefix)/lib +libexecdir = @libexecdir@ +localstatedir = @localstatedir@ +mandir = $(iprefix)/man +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pkgconfigdir = @pkgconfigdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +sbindir = $(iexec_prefix)/sbin +sharedstatedir = @sharedstatedir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ + +#!/bin/sh +# Makefile.am to build/install ipmiutil lib files +# +# If --enable-lanplus (-DHAVE_LANPLUS), then this script +# does a make from lib/lanplus/ for the lanplus library. +# If --enable-landesk (-DLINK_LANDESK), then this script +# assumes that these files are copied into this lib/ directory: +#   libipmiapi32.a  libipmiapi64.a.suse  libipmiapi64.a.redhat +# +MKDIR = sh ../mkinstalldirs  +INSTALL_BIN = /usr/bin/install -c +iprefix = @prefix@ +iexec_prefix = @exec_prefix@ +datato = ${DESTDIR}${datadir}/ipmiutil +lib32 = ${DESTDIR}$(iprefix)/lib +lib64 = ${DESTDIR}$(iprefix)/lib64 +all: all-am + +.SUFFIXES: +$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps) +	@for dep in $?; do \ +	  case '$(am__configure_deps)' in \ +	    *$$dep*) \ +	      cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ +		&& exit 0; \ +	      exit 1;; \ +	  esac; \ +	done; \ +	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign  lib/Makefile'; \ +	cd $(top_srcdir) && \ +	  $(AUTOMAKE) --foreign  lib/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status +	@case '$?' in \ +	  *config.status*) \ +	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ +	  *) \ +	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ +	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ +	esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) +	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure:  $(am__configure_deps) +	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4):  $(am__aclocal_m4_deps) +	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +libipmiutil.pc: $(top_builddir)/config.status $(srcdir)/libipmiutil.pc.in +	cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ + +mostlyclean-libtool: +	-rm -f *.lo + +clean-libtool: +	-rm -rf .libs _libs + +distclean-libtool: +	-rm -f libtool +uninstall-info-am: +tags: TAGS +TAGS: + +ctags: CTAGS +CTAGS: + + +distdir: $(DISTFILES) +	@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ +	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ +	list='$(DISTFILES)'; for file in $$list; do \ +	  case $$file in \ +	    $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ +	    $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ +	  esac; \ +	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ +	  dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ +	  if test "$$dir" != "$$file" && test "$$dir" != "."; then \ +	    dir="/$$dir"; \ +	    $(mkdir_p) "$(distdir)$$dir"; \ +	  else \ +	    dir=''; \ +	  fi; \ +	  if test -d $$d/$$file; then \ +	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ +	      cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ +	    fi; \ +	    cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ +	  else \ +	    test -f $(distdir)/$$file \ +	    || cp -p $$d/$$file $(distdir)/$$file \ +	    || exit 1; \ +	  fi; \ +	done +check-am: all-am +check: check-am +all-am: Makefile +installdirs: +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am +	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: +	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ +	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ +	  `test -z '$(STRIP)' || \ +	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: +	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: +	@echo "This command is intended for maintainers to use" +	@echo "it deletes files that may require special tools to rebuild." +clean-am: clean-generic clean-libtool mostlyclean-am + +distclean-am: clean-am distclean-generic distclean-libtool + +dvi: dvi-am + +dvi-am: + +html: html-am + +info: info-am + +info-am: + +install-data-am: + +install-exec-am: + +install-info: install-info-am + +install-man: + +installcheck-am: + +maintainer-clean: maintainer-clean-am +	-rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-info-am + +.PHONY: all all-am check check-am clean clean-generic clean-libtool \ +	distclean distclean-generic distclean-libtool distdir dvi \ +	dvi-am html html-am info info-am install install-am \ +	install-data install-data-am install-exec install-exec-am \ +	install-info install-info-am install-man install-strip \ +	installcheck installcheck-am installdirs maintainer-clean \ +	maintainer-clean-generic mostlyclean mostlyclean-generic \ +	mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am \ +	uninstall-info-am + + +all:	 +	if [ -f libipmiapi32.a ]; then \ +	  rm -f libipmiapi.a;  \ +	  if [ "`uname -m`" = "x86_64" ]; then \ +	    if [ -f /etc/SuSE-release ]; then  \ +	      cp -f libipmiapi64.a.suse libipmiapi.a; \ +	    else cp -f libipmiapi64.a.redhat  libipmiapi.a; fi \ +          else cp -f libipmiapi32.a libipmiapi.a; fi \ +	fi +	cd lanplus; make clean; make   +	cp -f lanplus/libipmi_lanplus.a  . + +clean: +	rm -f libipmiapi.a lib*_lanplus.a lib*_lanplus.so +	cd lanplus; make clean + +clobber: +	rm -f libipmiapi.a lib*_lanplus.a  lib*_lanplus.so +	cd lanplus; make clean + +distclean: +	rm -f libipmiapi.a lib*.a  lib*_lanplus.so +	cd lanplus; make distclean + +install: +	$(MKDIR) ${datato} +	cd lanplus; make install + +check: + +installso: +	@if [ -d /usr/lib64 ]; then \ +	$(MKDIR) ${lib64} ; \ +	echo "installing libipmi_lanplus into ${lib64}"; \ +	cd lanplus; /bin/sh ../../libtool --mode=install $(INSTALL_BIN)  'libipmi_lanplus.la' '${lib64}/libipmi_lanplus.la' ; \ +	$(INSTALL_BIN) .libs/libipmi_lanplus.so.0.0.0 ${lib64}/libipmi_lanplus.so.0.0.0 ; \ +	(cd ${lib64} && rm -f libipmi_lanplus.so.0 && ln -s libipmi_lanplus.so.0.0.0 libipmi_lanplus.so.0) ; \ +	(cd ${lib64} && rm -f libipmi_lanplus.so && ln -s libipmi_lanplus.so.0.0.0 libipmi_lanplus.so) ; \ +	$(INSTALL_BIN) .libs/libipmi_lanplus.lai ${lib64}/libipmi_lanplus.la ; \ +	$(INSTALL_BIN) .libs/libipmi_lanplus.a ${lib64}/libipmi_lanplus.a; \ +	ranlib ${lib64}/libipmi_lanplus.a ; \ +	chmod 644 ${lib64}/libipmi_lanplus.a ;  \ +	(cd ${lib32} && rm -f libipmi_lanplus.* ); \ +	../../libtool --finish ${lib64} \ +	fi +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/lib/lanplus/Makefile.in b/lib/lanplus/Makefile.in index 91f0bd7..2b55ede 100644 --- a/lib/lanplus/Makefile.in +++ b/lib/lanplus/Makefile.in @@ -132,6 +132,7 @@ LDFLAGS = @LDFLAGS@  LD_SAMX = @LD_SAMX@  LIBOBJS = @LIBOBJS@  LIBS = @LIBS@ +LIBSENSORS = @LIBSENSORS@  LIBTOOL = @LIBTOOL@  LIB_DIR = @LIB_DIR@  LN_S = @LN_S@ @@ -150,6 +151,7 @@ PACKAGE_VERSION = @PACKAGE_VERSION@  PATH_SEPARATOR = @PATH_SEPARATOR@  PKG_DIR = @PKG_DIR@  RANLIB = @RANLIB@ +SAM2OBJ = @SAM2OBJ@  SED = @SED@  SET_MAKE = @SET_MAKE@  SHELL = @SHELL@ @@ -158,6 +160,8 @@ STRIP = @STRIP@  SUBDIR_S = @SUBDIR_S@  SYSTEMD_DIR = @SYSTEMD_DIR@  VERSION = @VERSION@ +WITH_PKG_CONFIG_FALSE = @WITH_PKG_CONFIG_FALSE@ +WITH_PKG_CONFIG_TRUE = @WITH_PKG_CONFIG_TRUE@  ac_ct_AR = @ac_ct_AR@  ac_ct_CC = @ac_ct_CC@  ac_ct_CXX = @ac_ct_CXX@ @@ -195,6 +199,7 @@ localstatedir = @localstatedir@  mandir = @mandir@  mkdir_p = @mkdir_p@  oldincludedir = @oldincludedir@ +pkgconfigdir = @pkgconfigdir@  prefix = @prefix@  program_transform_name = @program_transform_name@  sbindir = @sbindir@ diff --git a/lib/libipmiutil.pc b/lib/libipmiutil.pc new file mode 100644 index 0000000..88e2b13 --- /dev/null +++ b/lib/libipmiutil.pc @@ -0,0 +1,13 @@ +prefix=/usr +exec_prefix=${prefix} +libdir=${exec_prefix}/lib +includedir=${prefix}/include +sysconfdir=@CONFPATH@ +statepath=@STATEPATH@ +nutuser=@RUN_AS_USER@ + +Name: libipmiutil +Description: Library for ipmiutil +Version: 2.9.5 +Libs: -L${libdir} -lipmi_lanplus +Cflags: -I${includedir} diff --git a/lib/libipmiutil.pc.in b/lib/libipmiutil.pc.in new file mode 100644 index 0000000..1847793 --- /dev/null +++ b/lib/libipmiutil.pc.in @@ -0,0 +1,13 @@ +prefix=@prefix@ +exec_prefix=@exec_prefix@ +libdir=@libdir@ +includedir=@includedir@ +sysconfdir=@CONFPATH@ +statepath=@STATEPATH@ +nutuser=@RUN_AS_USER@ + +Name: libipmiutil +Description: Library for ipmiutil +Version: @PACKAGE_VERSION@ +Libs: -L${libdir} -lipmi_lanplus +Cflags: -I${includedir} diff --git a/scripts/Makefile b/scripts/Makefile index d214ac7..5996a30 100644 --- a/scripts/Makefile +++ b/scripts/Makefile @@ -47,14 +47,14 @@ CONFIG_CLEAN_FILES =  SOURCES =  DIST_SOURCES =  DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = ${SHELL} /home/acress/ipmiutil/src/missing --run aclocal-1.9 +ACLOCAL = ${SHELL} /usr/dev/ipmiutil-2.9.5/missing --run aclocal-1.9  AMDEP_FALSE = #  AMDEP_TRUE =  -AMTAR = ${SHELL} /home/acress/ipmiutil/src/missing --run tar +AMTAR = ${SHELL} /usr/dev/ipmiutil-2.9.5/missing --run tar  AR = ar -AUTOCONF = ${SHELL} /home/acress/ipmiutil/src/missing --run autoconf -AUTOHEADER = ${SHELL} /home/acress/ipmiutil/src/missing --run autoheader -AUTOMAKE = ${SHELL} /home/acress/ipmiutil/src/missing --run automake-1.9 +AUTOCONF = ${SHELL} /usr/dev/ipmiutil-2.9.5/missing --run autoconf +AUTOHEADER = ${SHELL} /usr/dev/ipmiutil-2.9.5/missing --run autoheader +AUTOMAKE = ${SHELL} /usr/dev/ipmiutil-2.9.5/missing --run automake-1.9  AWK = gawk  CC = gcc  CCDEPMODE = depmode=gcc3 @@ -97,24 +97,26 @@ LDFLAGS =  LD_SAMX = ../lib/libipmi_lanplus.a -lcrypto  LIBOBJS =   LIBS =  +LIBSENSORS =   LIBTOOL = $(SHELL) $(top_builddir)/libtool  LIB_DIR = /usr/lib64  LN_S = ln -s  LTLIBOBJS =  -MAKEINFO = ${SHELL} /home/acress/ipmiutil/src/missing --run makeinfo +MAKEINFO = ${SHELL} /usr/dev/ipmiutil-2.9.5/missing --run makeinfo  OBJEXT = o  OS_CFLAGS = -DLINUX  -fPIC  -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2  OS_DRIVERS = imbapi.c ipmimv.c ipmild.c ipmidir.c  OS_LFLAGS =   PACKAGE = ipmiutil  PACKAGE_BUGREPORT =  -PACKAGE_NAME =  -PACKAGE_STRING =  -PACKAGE_TARNAME =  -PACKAGE_VERSION =  +PACKAGE_NAME = ipmiutil +PACKAGE_STRING = ipmiutil 2.9.5 +PACKAGE_TARNAME = ipmiutil +PACKAGE_VERSION = 2.9.5  PATH_SEPARATOR = :  PKG_DIR = /usr/src/redhat  RANLIB = ranlib +SAM2OBJ = isensor2.o ievents2.o  SED = /bin/sed  SET_MAKE =   SHELL = /bin/sh @@ -122,7 +124,9 @@ SHR_LINK = libipmiutil.so  STRIP = strip  SUBDIR_S = doc scripts lib util  SYSTEMD_DIR = /usr/share/ipmiutil -VERSION = 2.9.4 +VERSION = 2.9.5 +WITH_PKG_CONFIG_FALSE = # +WITH_PKG_CONFIG_TRUE =   ac_ct_AR = ar  ac_ct_CC = gcc  ac_ct_CXX = g++ @@ -153,13 +157,14 @@ host_os = linux-gnu  host_vendor = redhat  includedir = ${prefix}/include  infodir = ${prefix}/info -install_sh = /home/acress/ipmiutil/src/install-sh +install_sh = /usr/dev/ipmiutil-2.9.5/install-sh  libdir = ${exec_prefix}/lib  libexecdir = ${exec_prefix}/libexec  localstatedir = ${prefix}/var  mandir = ${prefix}/share/man  mkdir_p = mkdir -p --  oldincludedir = /usr/include +pkgconfigdir = ${libdir}/pkgconfig  prefix = /usr  program_transform_name = s,x,x,  sbindir = ${prefix}/sbin diff --git a/scripts/Makefile.in b/scripts/Makefile.in index f8587da..7c7e242 100644 --- a/scripts/Makefile.in +++ b/scripts/Makefile.in @@ -97,6 +97,7 @@ LDFLAGS = @LDFLAGS@  LD_SAMX = @LD_SAMX@  LIBOBJS = @LIBOBJS@  LIBS = @LIBS@ +LIBSENSORS = @LIBSENSORS@  LIBTOOL = @LIBTOOL@  LIB_DIR = @LIB_DIR@  LN_S = @LN_S@ @@ -115,6 +116,7 @@ PACKAGE_VERSION = @PACKAGE_VERSION@  PATH_SEPARATOR = @PATH_SEPARATOR@  PKG_DIR = @PKG_DIR@  RANLIB = @RANLIB@ +SAM2OBJ = @SAM2OBJ@  SED = @SED@  SET_MAKE = @SET_MAKE@  SHELL = @SHELL@ @@ -123,6 +125,8 @@ STRIP = @STRIP@  SUBDIR_S = @SUBDIR_S@  SYSTEMD_DIR = @SYSTEMD_DIR@  VERSION = @VERSION@ +WITH_PKG_CONFIG_FALSE = @WITH_PKG_CONFIG_FALSE@ +WITH_PKG_CONFIG_TRUE = @WITH_PKG_CONFIG_TRUE@  ac_ct_AR = @ac_ct_AR@  ac_ct_CC = @ac_ct_CC@  ac_ct_CXX = @ac_ct_CXX@ @@ -160,6 +164,7 @@ localstatedir = @localstatedir@  mandir = ${prefix}/share/man  mkdir_p = @mkdir_p@  oldincludedir = @oldincludedir@ +pkgconfigdir = @pkgconfigdir@  prefix = /usr  program_transform_name = @program_transform_name@  sbindir = ${prefix}/sbin @@ -6,7 +6,7 @@  #    [doinc?] is 'n'.  #    if [doinc?] is 'r', reverse increment (decrement).  # -ver=2.9.4 +ver=2.9.5  rel=1  tmped=/tmp/edver.tmp  tmpspec=/tmp/edspec.tmp @@ -59,10 +59,11 @@ AM_INIT_AUTOMAKE(ipmiutil,$ver)  w  q  %%% -if [ -f configure.in ]; then -  ed configure.in <$tmped +if [ -f configure.ac ]; then +  sed -i "/AC_INIT(ipmiutil,/cAC_INIT(ipmiutil,$ver)" configure.ac +  # sed -i "/INIT_AUTOMAKE(ipmiutil/cAM_INIT_AUTOMAKE(ipmiutil,$ver)" configure.ac  else -  sed -i "/INIT_AUTOMAKE(ipmiutil/cAM_INIT_AUTOMAKE(ipmiutil,$ver)" configure.ac +  ed configure.in <$tmped  fi  cat - <<%%% >$tmped @@ -178,7 +179,7 @@ q    ed ../../ipmimisc/buildmisc.sh   <$tmped  fi -if [ -f debian/changelog ]; then +if [ -f debpkg/changelog ]; then    rdate=`date -R`    cat - <<%%% >$tmped  1 @@ -193,7 +194,7 @@ ipmiutil (${ver}-${rel}) unstable; urgency=low  w  q  %%% -  ed debian/changelog   <$tmped +  ed debpkg/changelog   <$tmped  fi  cmdc="ialarms.c icmd.c iconfig.c ievents.c ifru.c igetevent.c ihealth.c  diff --git a/util/Makefile.am b/util/Makefile.am index d7ed5eb..16a8665 100644 --- a/util/Makefile.am +++ b/util/Makefile.am @@ -22,9 +22,9 @@ CMDMOD += md5.c md2.c ipmilan.c  CMDMOD += ipmilanplus.c  # CMDMOD = ipmicmd.c mem_if.c @OS_DRIVERS@  # am: configure substitutions are not allowed in _SOURCES variables -LIBOBJ = ipmicmd.o mem_if.o ipmidir.o imbapi.o ipmimv.o ipmild.o ipmibmc.o ipmilipmi.o subs.o md5.o md2.o $(tmpobj)/ipmilan.o $(tmpobj)/ipmilanplus.o  +LIBOBJ = ipmicmd.o mem_if.o ipmidir.o imbapi.o ipmimv.o ipmild.o ipmibmc.o ipmilipmi.o subs.o md5.o md2.o $(tmpobj)/ipmilan.o $(tmpobj)/ipmilanplus.o @LIBSENSORS@  OEMMOD = oem_kontron.c oem_fujitsu.c oem_intel.c oem_sun.c oem_supermicro.c oem_dell.c oem_quanta.c oem_hp.c oem_newisys.c iekanalyzer.c  - +L2OBJ = @SAM2OBJ@  AM_CPPFLAGS += -I. -I.. -DMETACOMMAND   METASOURCE = ipmiutil.c ialarms.c ihealth.c ievents.c ifru.c ifru_picmg.c igetevent.c ireset.c icmd.c ilan.c isensor.c isel.c iserial.c iwdt.c isol.c idiscover.c iconfig.c ipicmg.c ifirewall.c ifwum.c ihpm.c itsol.c idcmi.c $(OEMMOD) $(CMDMOD)  @@ -77,7 +77,7 @@ libimbapi.a:	imbapi.c  # Build a lib to support all of the IPMI drivers (libipmiutil.a)  # If LANPLUS_SAM = yes, include LANPLUS_OBJ, else do not.  # See configure --enable-liblanplus to change this -$(DEV_LIB):	$(CMDMOD:.c=.o) @LANPLUS_LIB@ +$(DEV_LIB):	$(CMDMOD:.c=.o) @LANPLUS_LIB@ @LIBSENSORS@  	mkdir -p $(tmpobj)  	if [ "x@LANPLUS_SAM@" = "xyes" ]; then \  	   $(CC) $(CFLAGS_SAMX) -o $(tmpobj)/ipmilanplus.o -c ipmilanplus.c; \ @@ -92,7 +92,7 @@ $(DEV_LIB):	$(CMDMOD:.c=.o) @LANPLUS_LIB@  	   $(RANLIB) $(DEV_LIB) ; \  	fi  -$(SHR_LIB):	$(CMDMOD:.c=.o) @LANPLUS_LIB@ +$(SHR_LIB):	$(CMDMOD:.c=.o) @LANPLUS_LIB@ @LIBSENSORS@  	mkdir -p $(tmpobj)  	if [ "x@LANPLUS_SAM@" = "xyes" ]; then \  	   $(CC) $(CFLAGS_SAMX) -o $(tmpobj)/ipmilanplus.o -c ipmilanplus.c; \ @@ -125,24 +125,26 @@ ialarms_enc:	$(DEV_LIB) ialarms.c oem_intel.c  	$(CC) $(CFLAGS_SAM) -DNO_EVENTS -o oem_intel2.o -c oem_intel.c  	$(CC) -g -O2 -o ialarms_enc ialarms2.o oem_intel2.o $(DEV_LIB) $(LDFLAGS) $(LDSAM) +isensor2.o:	isensor.c +	$(CC) $(CFLAGS_SAM) -o isensor2.o -c isensor.c  + +ievents2.o:	ievents.c +	$(CC) $(CFLAGS_SAM) -DSENSORS_OK -o ievents2.o -c ievents.c  +  ifru_picmg2.o:	ifru_picmg.c  	$(CC) $(CFLAGS_SAM) -o ifru_picmg2.o -c ifru_picmg.c  # To build ipmi_sample with GET_SENSORS enabled, need isensors.o, ievents.o   # Note that this does not include oem_intel, etc. for OEM SEL decoding. -ipmi_sample2:	$(DEV_LIB) ipmi_sample.c isensor.c ievents.c ifru.c isel.c ifru_picmg2.o +ipmi_sample2:	$(DEV_LIB) ipmi_sample.c ifru.c isel.c ifru_picmg2.o $(L2OBJ)  	$(CC) $(CFLAGS_SAM) -D GET_SENSORS -D GET_FRU -o ipmi_sample2.o -c ipmi_sample.c -	$(CC) $(CFLAGS_SAM) -o isensor2.o -c isensor.c  -	$(CC) $(CFLAGS_SAM) -o ievents2.o -c ievents.c   	$(CC) $(CFLAGS_SAM) -o ifru2.o    -c ifru.c  	$(CC) $(CFLAGS_SAM) -o isel2.o    -c isel.c -	$(CC) -g -O2 -o ipmi_sample2 ipmi_sample2.o isensor2.o ievents2.o ifru2.o ifru_picmg2.o isel2.o $(DEV_LIB) $(LDFLAGS) $(LDSAM) +	$(CC) -g -O2 -o ipmi_sample2 ipmi_sample2.o $(L2OBJ) ifru2.o ifru_picmg2.o isel2.o $(DEV_LIB) $(LDFLAGS) $(LDSAM) -ipmi_sample_evt:	$(DEV_LIB) ipmi_sample_evt.c isensor.c ievents.c  +ipmi_sample_evt:	$(DEV_LIB) ipmi_sample_evt.c $(L2OBJ)  	$(CC) $(CFLAGS_SAM) -o ipmi_sample_evt.o -c ipmi_sample_evt.c -	$(CC) $(CFLAGS_SAM) -o isensor2.o -c isensor.c  -	$(CC) $(CFLAGS_SAM) -DSENSORS_OK -o ievents2.o -c ievents.c  -	$(CC) -g -O2 -o ipmi_sample_evt ipmi_sample_evt.o isensor2.o ievents2.o   $(DEV_LIB) $(LDFLAGS) $(LDSAM) +	$(CC) -g -O2 -o ipmi_sample_evt ipmi_sample_evt.o $(L2OBJ) $(DEV_LIB) $(LDFLAGS) $(LDSAM)  ifruset:	$(DEV_LIB) ifruset.c ifru_picmg2.o  	$(CC) $(CFLAGS_SAM) -c ifruset.c diff --git a/util/Makefile.in b/util/Makefile.in index e18d0ac..6d79806 100644 --- a/util/Makefile.in +++ b/util/Makefile.in @@ -168,6 +168,7 @@ LDFLAGS = @LDFLAGS@  LD_SAMX = @LD_SAMX@  LIBOBJS = @LIBOBJS@  LIBS = @LIBS@ +LIBSENSORS = @LIBSENSORS@  LIBTOOL = @LIBTOOL@  LIB_DIR = @LIB_DIR@  LN_S = @LN_S@ @@ -186,6 +187,7 @@ PACKAGE_VERSION = @PACKAGE_VERSION@  PATH_SEPARATOR = @PATH_SEPARATOR@  PKG_DIR = @PKG_DIR@  RANLIB = @RANLIB@ +SAM2OBJ = @SAM2OBJ@  SED = @SED@  SET_MAKE = @SET_MAKE@  SHELL = @SHELL@ @@ -194,6 +196,8 @@ STRIP = @STRIP@  SUBDIR_S = @SUBDIR_S@  SYSTEMD_DIR = @SYSTEMD_DIR@  VERSION = @VERSION@ +WITH_PKG_CONFIG_FALSE = @WITH_PKG_CONFIG_FALSE@ +WITH_PKG_CONFIG_TRUE = @WITH_PKG_CONFIG_TRUE@  ac_ct_AR = @ac_ct_AR@  ac_ct_CC = @ac_ct_CC@  ac_ct_CXX = @ac_ct_CXX@ @@ -231,6 +235,7 @@ localstatedir = @localstatedir@  mandir = @mandir@  mkdir_p = @mkdir_p@  oldincludedir = @oldincludedir@ +pkgconfigdir = @pkgconfigdir@  prefix = @prefix@  program_transform_name = @program_transform_name@  sbindir = @sbindir@ @@ -279,8 +284,9 @@ CMDMOD = ipmicmd.c mem_if.c ipmidir.c imbapi.c ipmimv.c ipmild.c \  	ipmilanplus.c  # CMDMOD = ipmicmd.c mem_if.c @OS_DRIVERS@  # am: configure substitutions are not allowed in _SOURCES variables -LIBOBJ = ipmicmd.o mem_if.o ipmidir.o imbapi.o ipmimv.o ipmild.o ipmibmc.o ipmilipmi.o subs.o md5.o md2.o $(tmpobj)/ipmilan.o $(tmpobj)/ipmilanplus.o  +LIBOBJ = ipmicmd.o mem_if.o ipmidir.o imbapi.o ipmimv.o ipmild.o ipmibmc.o ipmilipmi.o subs.o md5.o md2.o $(tmpobj)/ipmilan.o $(tmpobj)/ipmilanplus.o @LIBSENSORS@  OEMMOD = oem_kontron.c oem_fujitsu.c oem_intel.c oem_sun.c oem_supermicro.c oem_dell.c oem_quanta.c oem_hp.c oem_newisys.c iekanalyzer.c  +L2OBJ = @SAM2OBJ@  METASOURCE = ipmiutil.c ialarms.c ihealth.c ievents.c ifru.c ifru_picmg.c igetevent.c ireset.c icmd.c ilan.c isensor.c isel.c iserial.c iwdt.c isol.c idiscover.c iconfig.c ipicmg.c ifirewall.c ifwum.c ihpm.c itsol.c idcmi.c $(OEMMOD) $(CMDMOD)   LANPLUS_OBJ = $(shell ar t @LANPLUS_LIB@ 2>/dev/null)   DEV_LIB = libipmiutil.a @@ -651,7 +657,7 @@ libimbapi.a:	imbapi.c  # Build a lib to support all of the IPMI drivers (libipmiutil.a)  # If LANPLUS_SAM = yes, include LANPLUS_OBJ, else do not.  # See configure --enable-liblanplus to change this -$(DEV_LIB):	$(CMDMOD:.c=.o) @LANPLUS_LIB@ +$(DEV_LIB):	$(CMDMOD:.c=.o) @LANPLUS_LIB@ @LIBSENSORS@  	mkdir -p $(tmpobj)  	if [ "x@LANPLUS_SAM@" = "xyes" ]; then \  	   $(CC) $(CFLAGS_SAMX) -o $(tmpobj)/ipmilanplus.o -c ipmilanplus.c; \ @@ -666,7 +672,7 @@ $(DEV_LIB):	$(CMDMOD:.c=.o) @LANPLUS_LIB@  	   $(RANLIB) $(DEV_LIB) ; \  	fi  -$(SHR_LIB):	$(CMDMOD:.c=.o) @LANPLUS_LIB@ +$(SHR_LIB):	$(CMDMOD:.c=.o) @LANPLUS_LIB@ @LIBSENSORS@  	mkdir -p $(tmpobj)  	if [ "x@LANPLUS_SAM@" = "xyes" ]; then \  	   $(CC) $(CFLAGS_SAMX) -o $(tmpobj)/ipmilanplus.o -c ipmilanplus.c; \ @@ -699,24 +705,26 @@ ialarms_enc:	$(DEV_LIB) ialarms.c oem_intel.c  	$(CC) $(CFLAGS_SAM) -DNO_EVENTS -o oem_intel2.o -c oem_intel.c  	$(CC) -g -O2 -o ialarms_enc ialarms2.o oem_intel2.o $(DEV_LIB) $(LDFLAGS) $(LDSAM) +isensor2.o:	isensor.c +	$(CC) $(CFLAGS_SAM) -o isensor2.o -c isensor.c  + +ievents2.o:	ievents.c +	$(CC) $(CFLAGS_SAM) -DSENSORS_OK -o ievents2.o -c ievents.c  +  ifru_picmg2.o:	ifru_picmg.c  	$(CC) $(CFLAGS_SAM) -o ifru_picmg2.o -c ifru_picmg.c  # To build ipmi_sample with GET_SENSORS enabled, need isensors.o, ievents.o   # Note that this does not include oem_intel, etc. for OEM SEL decoding. -ipmi_sample2:	$(DEV_LIB) ipmi_sample.c isensor.c ievents.c ifru.c isel.c ifru_picmg2.o +ipmi_sample2:	$(DEV_LIB) ipmi_sample.c ifru.c isel.c ifru_picmg2.o $(L2OBJ)  	$(CC) $(CFLAGS_SAM) -D GET_SENSORS -D GET_FRU -o ipmi_sample2.o -c ipmi_sample.c -	$(CC) $(CFLAGS_SAM) -o isensor2.o -c isensor.c  -	$(CC) $(CFLAGS_SAM) -o ievents2.o -c ievents.c   	$(CC) $(CFLAGS_SAM) -o ifru2.o    -c ifru.c  	$(CC) $(CFLAGS_SAM) -o isel2.o    -c isel.c -	$(CC) -g -O2 -o ipmi_sample2 ipmi_sample2.o isensor2.o ievents2.o ifru2.o ifru_picmg2.o isel2.o $(DEV_LIB) $(LDFLAGS) $(LDSAM) +	$(CC) -g -O2 -o ipmi_sample2 ipmi_sample2.o $(L2OBJ) ifru2.o ifru_picmg2.o isel2.o $(DEV_LIB) $(LDFLAGS) $(LDSAM) -ipmi_sample_evt:	$(DEV_LIB) ipmi_sample_evt.c isensor.c ievents.c  +ipmi_sample_evt:	$(DEV_LIB) ipmi_sample_evt.c $(L2OBJ)  	$(CC) $(CFLAGS_SAM) -o ipmi_sample_evt.o -c ipmi_sample_evt.c -	$(CC) $(CFLAGS_SAM) -o isensor2.o -c isensor.c  -	$(CC) $(CFLAGS_SAM) -DSENSORS_OK -o ievents2.o -c ievents.c  -	$(CC) -g -O2 -o ipmi_sample_evt ipmi_sample_evt.o isensor2.o ievents2.o   $(DEV_LIB) $(LDFLAGS) $(LDSAM) +	$(CC) -g -O2 -o ipmi_sample_evt ipmi_sample_evt.o $(L2OBJ) $(DEV_LIB) $(LDFLAGS) $(LDSAM)  ifruset:	$(DEV_LIB) ifruset.c ifru_picmg2.o  	$(CC) $(CFLAGS_SAM) -c ifruset.c diff --git a/util/ialarms.c b/util/ialarms.c index 6f9f15b..6554256 100644 --- a/util/ialarms.c +++ b/util/ialarms.c @@ -75,7 +75,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  /*   * Global variables    */ -static char * progver   = "2.94"; +static char * progver   = "2.95";  static char * progname  = "ialarms";  static char   fdebug    = 0;  static char   fbmctam   = 0; @@ -434,7 +434,7 @@ main(int argc, char **argv)                  printf("       -o   sets all Alarms off\n");                  printf("       -w21b writes picmg LED 2 on(1) color=blue(b)\n");                  printf("       -x   show eXtra debug messages\n"); -		print_lan_opt_usage(); +		print_lan_opt_usage(0);  		ret = ERR_USAGE;          	goto do_exit;        } diff --git a/util/icmd.c b/util/icmd.c index 20949be..523248b 100644 --- a/util/icmd.c +++ b/util/icmd.c @@ -78,7 +78,7 @@ extern void ipmi_lan_set_timeout(int ipmito, int tries, int pingto);  /*   * Global variables    */ -static char * progver   = "2.94"; +static char * progver   = "2.95";  static char * progname  = "icmd";  static char   fdebug    = 0;  static char   fquiet    = 0; @@ -175,7 +175,7 @@ main(int argc, char **argv)     char *s1;     istart = 1; -   while ( (c = getopt( argc, argv,"djkm:qst:xN:P:R:U:EF:J:T:V:YZ:?")) != EOF )  +   while ( (c = getopt( argc, argv,"djkm:qst:xp:N:P:R:U:EF:J:T:V:YZ:?")) != EOF )         switch(c) {            case 'j': /* just pass the bytes to KCS */  		    fjustpass = 1; @@ -209,6 +209,7 @@ main(int argc, char **argv)            case 'x': fdebug = 1;       break;  /* debug messages */            case 'V':    /* priv level */  		fprivset = 1; +          case 'p':    /* port */            case 'N':    /* nodename */            case 'U':    /* remote username */            case 'P':    /* remote password */ @@ -230,7 +231,7 @@ main(int argc, char **argv)                  printf("       -m002000 specific MC (bus 00,sa 20,lun 00)\n");                   printf("       -q   quiet mode, with minimal headers\n");                   printf("       -s   skips the GetDeviceID command\n");  -		print_lan_opt_usage(); +		print_lan_opt_usage(1);                  ret = ERR_USAGE;  		goto do_exit;        } diff --git a/util/iconfig.c b/util/iconfig.c index cbbe78d..5fb8680 100644 --- a/util/iconfig.c +++ b/util/iconfig.c @@ -171,7 +171,7 @@ typedef struct  /*   * Global variables    */ -static char * progver   = "2.94"; +static char * progver   = "2.95";  static char * progname  = "iconfig";  static char   fdebug    = 0;  static char   fipmilan  = 0; @@ -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); @@ -1898,7 +1898,7 @@ main(int argc, char **argv)               printf("      -x  show eXtra debug messages\n");               printf("      -p <psw> specify a user password to set\n");               printf("      -L 3     specify lan channel number 3\n"); -	     print_lan_opt_usage(); +	     print_lan_opt_usage(0);  	     ret = ERR_USAGE;  	     goto do_exit;        } diff --git a/util/idcmi.c b/util/idcmi.c index 1ba08cd..bcd728f 100644 --- a/util/idcmi.c +++ b/util/idcmi.c @@ -62,7 +62,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  #include "idcmi.h"  static char * progname  = "idcmi"; -static char * progver   = "2.94"; +static char * progver   = "2.95";  extern char   fdebug;  /*from ipmicmd.c*/  static uchar  g_bus  = PUBLIC_BUS;  static uchar  g_sa   = BMC_SA; @@ -109,7 +109,7 @@ static int dcmi_usage(void)     printf("       -m002000 specific MC (bus 00,sa 20,lun 00)\n");     printf("       -s       Get DCMI sensor info\n");     printf("       -x       Display extra debug messages\n"); -   print_lan_opt_usage(); +   print_lan_opt_usage(1);     printf("where <function> is one of:\n");     printf("   info        Get DCMI Capabilities, MC ID, asset tag (default)\n");     printf("   power [get]               Get Power reading & limit\n"); @@ -747,7 +747,7 @@ main(int argc, char **argv)  	printf("%s ver %s\n", progname,progver);  	parse_lan_options('V',"4",0);  /*default to admin priv*/ -        while ( (c = getopt( argc, argv,"a:d:m:sT:V:J:EYF:P:N:R:U:Z:x?")) != EOF ) +        while ( (c = getopt( argc, argv,"a:d:m:p:sT:V:J:EYF:P:N:R:U:Z:x?")) != EOF )  	switch (c) {            case 'a': set_asset = 1; asset_new = optarg;  break;            case 'd': set_mcid = 1; mcid_new = optarg; break; @@ -765,6 +765,7 @@ main(int argc, char **argv)                      break;            case 's': do_sensors = 1; break;            case 'x': fdebug = 1; break;  /* debug messages */ +          case 'p':    /* port */            case 'N':    /* nodename */            case 'U':    /* remote username */            case 'P':    /* remote password */ diff --git a/util/iekanalyzer.c b/util/iekanalyzer.c index ddeeba8..1f405cc 100644 --- a/util/iekanalyzer.c +++ b/util/iekanalyzer.c @@ -4086,7 +4086,7 @@ main(int argc, char **argv)  	printf("%s ver %s\n", progname,progver); -        while ( (c = getopt( argc, argv,"m:T:V:J:EYF:P:N:R:U:Z:x?")) != EOF ) +        while ( (c = getopt( argc, argv,"m:p:T:V:J:EYF:P:N:R:U:Z:x?")) != EOF )  	switch (c) {            case 'm': /* specific IPMB MC, 3-byte address, e.g. "409600" */                      g_bus = htoi(&optarg[0]);  /*bus/channel*/ diff --git a/util/ievents.c b/util/ievents.c index cbc7622..098df46 100644 --- a/util/ievents.c +++ b/util/ievents.c @@ -76,7 +76,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  #define  SELprintf  printf    #define  SMS_SA   0x41  #define  SMI_SA   0x21 -static char *progver   = "2.94"; +static char *progver   = "2.95";  static char *progname  = "ievents";  static char fsensdesc = 0;   /* 1= get extended sensor descriptions*/  static char fcanonical = 0;  /* 1= show canonical, delimited output*/ @@ -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, type 0Fh, offset 00h */   { 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"}, diff --git a/util/ifirewall.c b/util/ifirewall.c index 3956668..9adfd24 100644 --- a/util/ifirewall.c +++ b/util/ifirewall.c @@ -64,7 +64,7 @@  /* global variables */  static char * progname  = "ifirewall"; -static char * progver   = "2.94"; +static char * progver   = "2.95";  static char   fdebug    = 0;  static uchar  g_bus  = PUBLIC_BUS;  static uchar  g_sa   = BMC_SA; diff --git a/util/ifirewall.h b/util/ifirewall.h index 14a04f4..3953b09 100644 --- a/util/ifirewall.h +++ b/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]; diff --git a/util/ifru.c b/util/ifru.c index b1ac4ba..af4d94b 100755..100644 --- a/util/ifru.c +++ b/util/ifru.c @@ -116,7 +116,7 @@ extern int ipmi_kontronoem_main(void * intf, int  argc, char ** argv);  #endif  static char *progname  = "ifru"; -static char *progver   = "2.94"; +static char *progver   = "2.95";  static int  vend_id = 0;   static int  prod_id = 0;   static char fdebug = 0; @@ -1779,7 +1779,7 @@ int i_fru(int argc, char **argv)  		printf("   -s snum  Sets the Product Serial Number\n");  		printf("   -v pver  Sets the Product Version Number\n");  		printf("   -x       Display extra debug messages\n"); -		print_lan_opt_usage(); +		print_lan_opt_usage(0);  		ret = ERR_USAGE;  		goto do_exit;         } diff --git a/util/ifruset.c b/util/ifruset.c index ee0fac8..5939b56 100644 --- a/util/ifruset.c +++ b/util/ifruset.c @@ -106,7 +106,7 @@ extern void fmt_time(time_t etime, char *buf, int bufsz); /*see ievents.c*/  #define IPROD_OEM    7  static char *progname  = "ifruset"; -static char *progver   = "2.94"; +static char *progver   = "2.95";  static char fdebug = 0;  static char fpicmg = 0;  static char fonlybase = 0; @@ -1378,7 +1378,7 @@ main(int argc, char **argv)  		printf("   -i 00    Get/Set a specific FRU ID\n");                  printf("   -m002000 specific MC (bus 00,sa 20,lun 00)\n");  		printf("   -x       Display extra debug messages\n"); -		print_lan_opt_usage(); +		print_lan_opt_usage(0);                  ret = ERR_USAGE;  		goto do_exit;        } diff --git a/util/igetevent.c b/util/igetevent.c index e2eb587..fb3b4ab 100644 --- a/util/igetevent.c +++ b/util/igetevent.c @@ -168,7 +168,7 @@ extern void free_sdr_cache(uchar *pret); /*see isensor.c*/   * Global variables    */  static char * progname  = "igetevent"; -static char * progver   = "2.94"; +static char * progver   = "2.95";  static char   fdebug    = 0;  static char   fipmilan  = 0;  static char   frunonce  = 0; @@ -1047,7 +1047,7 @@ main(int argc, char **argv)     fdout = stdout;     msgout("%s ver %s\n", progname,progver); -   while ( (c = getopt(argc,argv,"abce:lmn:or:st:uvT:V:J:YEF:P:N:R:U:Z:x?")) != EOF )  +   while ( (c = getopt(argc,argv,"abce:lmn:op:r:st:uvT:V:J:YEF:P:N:R:U:Z:x?")) != EOF )         switch(c) {            case 'a': fAsync = 1;    /* imb async message method */     		    /* chenge the output log filename */ @@ -1086,6 +1086,7 @@ main(int argc, char **argv)            case 'u': futc = 1; break;             case 'x': fdebug = 1;     break;  /* debug messages */            case 'v': fdebug = 3;     break;  /* verbose debug with lan */ +          case 'p':             case 'N':    /* nodename */            case 'U':    /* remote username */            case 'P':    /* remote password */ @@ -1112,7 +1113,7 @@ main(int argc, char **argv)                  printf("       -t N   set timeout to N seconds\n");                   printf("       -u     use raw UTC time\n");                  printf("       -x     show eXtra debug messages\n"); -		print_lan_opt_usage(); +		print_lan_opt_usage(1);  		ret = ERR_USAGE;  		goto do_exit;        } diff --git a/util/ihealth.c b/util/ihealth.c index 466131e..986185f 100644 --- a/util/ihealth.c +++ b/util/ihealth.c @@ -82,7 +82,7 @@ extern int oem_supermicro_get_firmware_str(char *pstr, int sz); /*oem_supermicro   * Global variables    */  static char * progname  = "ihealth"; -static char * progver   = "2.94"; +static char * progver   = "2.95";  static char   fdebug    = 0;  static char   fipmilan  = 0;  static char   fcanonical = 0; @@ -905,7 +905,7 @@ main(int argc, char **argv)  		printf("       -o   set Operating System to this string\n");  		printf("       -p1  set restore policy: 0=off, 1=last, 2=on\n");                  printf("       -s   get the IPMI Session info also\n"); -		print_lan_opt_usage(); +		print_lan_opt_usage(0);  		ret = ERR_USAGE;  		goto health_end;        } diff --git a/util/ilan.c b/util/ilan.c index 8415b07..910b1fa 100644 --- a/util/ilan.c +++ b/util/ilan.c @@ -305,7 +305,7 @@ extern char *get_sensor_type_desc(uchar stype);  /*from ievents.c*/  /*   * Global variables    */ -static char * progver   = "2.94"; +static char * progver   = "2.95";  static char * progname  = "ilan";  static char   fdebug    = 0;  static char   fipmilan  = 0; @@ -3924,7 +3924,7 @@ main(int argc, char **argv)               printf("      -K  (Kontron) IPMI hostname to set\n");               printf("      -Q  VLAN Priority (default =0)\n");               printf("      -O  Force LAN security: no null user, cipher 0 off\n"); -	     print_lan_opt_usage(); +	     print_lan_opt_usage(0);  	     ret = ERR_USAGE;               goto do_exit;        } /*end switch*/ diff --git a/util/ipicmg.c b/util/ipicmg.c index 73bed68..15613f6 100644 --- a/util/ipicmg.c +++ b/util/ipicmg.c @@ -81,7 +81,7 @@  /* Global data */  static char * progname  = "ipicmg"; -static char * progver   = "2.94"; +static char * progver   = "2.95";  static char   fdebug    = 0;  static char   fset_mc   = 0;  static uint8_t g_bus  = PUBLIC_BUS; diff --git a/util/ipmi_sample.c b/util/ipmi_sample.c index ddda7f3..faa0d51 100644 --- a/util/ipmi_sample.c +++ b/util/ipmi_sample.c @@ -115,7 +115,7 @@ main(int argc, char **argv)     printf("%s ver %s\n", progname,progver); -   while ((c = getopt( argc, argv,"i:l:m:f:s:t:xEF:N:P:R:T:U:V:YZ:?")) != EOF )  +   while ((c = getopt( argc, argv,"i:l:m:p:f:s:t:xEF:N:P:R:T:U:V:YZ:?")) != EOF )         switch(c) {            case 'm': /* specific IPMB MC, 3-byte address, e.g. "409600" */                      g_bus = htoi(&optarg[0]);  /*bus/channel*/ @@ -136,6 +136,7 @@ main(int argc, char **argv)            case 's': sdrfile = optarg; break;             case 't': mytag = optarg; break; /* specific sensor tag */            case 'x': fdebug = 1;     break;  /* debug messages */ +          case 'p':    /* port */            case 'N':    /* nodename */            case 'U':    /* remote username */            case 'P':    /* remote password */ @@ -158,7 +159,7 @@ main(int argc, char **argv)  		printf("       -m002000 specific MC (bus 00,sa 20,lun 00)\n");                  printf("       -s File  loads SDRs from File\n");                  printf("       -t tag   search for 'tag' in SDRs\n"); -		print_lan_opt_usage(); +		print_lan_opt_usage(1);                  exit(1);        }     /* Rather than parse_lan_options above, the set_lan_options function  diff --git a/util/ipmi_sample_evt.c b/util/ipmi_sample_evt.c index eada5eb..f0f8e97 100644 --- a/util/ipmi_sample_evt.c +++ b/util/ipmi_sample_evt.c @@ -328,7 +328,7 @@ main(int argc, char **argv)     fdout = stderr;     printf("%s ver %s\n", progname,progver); -   while ( (c = getopt( argc, argv,"m:s:t:xEF:N:P:R:T:U:V:YZ:?")) != EOF )  +   while ( (c = getopt( argc, argv,"m:p:s:t:xEF:N:P:R:T:U:V:YZ:?")) != EOF )         switch(c) {            case 'm': /* specific IPMB MC, 3-byte address, e.g. "409600" */                      g_bus = htoi(&optarg[0]);  /*bus/channel*/ @@ -346,6 +346,7 @@ main(int argc, char **argv)            case 's': sdrfile = optarg; break;             case 't': mytag = optarg; break; /* specific sensor tag */            case 'x': fdebug = 1;     break;  /* debug messages */ +          case 'p':    /* port */            case 'N':    /* nodename */            case 'U':    /* remote username */            case 'P':    /* remote password */ @@ -364,7 +365,7 @@ main(int argc, char **argv)  		printf("       -m002000 specific MC (bus 00,sa 20,lun 00)\n");                  printf("       -s File  loads SDRs from File\n");                  printf("       -t tag   search for 'tag' in SDRs\n"); -		print_lan_opt_usage(); +		print_lan_opt_usage(1);                  exit(1);        }     /* Rather than parse_lan_options above, the set_lan_options function  diff --git a/util/ipmicmd.c b/util/ipmicmd.c index 8501359..9d56630 100644 --- a/util/ipmicmd.c +++ b/util/ipmicmd.c @@ -267,7 +267,7 @@ uchar my_devid[20] = {0,0,0,0,0,0,0,0}; /*saved devid, only needs 16 bytes*/  int  gshutdown  = 0;    /* see ipmilan.c ipmilanplus.c */  LAN_OPT lanp = { "localhost","","", IPMI_SESSION_AUTHTYPE_MD5,  -			IPMI_PRIV_LEVEL_USER, 3, "", 0 }; +			IPMI_PRIV_LEVEL_USER, 3, "", 0, RMCP_PRI_RMCP_PORT };  static char *gnode = lanp.node;  //char *guser = lanp.user;  //char *gpswd = lanp.pswd; @@ -655,7 +655,7 @@ int ipmi_open(char fdebugcmd)     /* first time, so try each */     if (fipmi_lan) {        /* Try IPMI LAN 1.5 first */ -      rc = ipmi_open_lan(gnode,lanp.user,lanp.pswd,fdebugcmd);  +      rc = ipmi_open_lan(gnode,lanp.port,lanp.user,lanp.pswd,fdebugcmd);         fDriverTyp = DRV_LAN;        if (rc == LAN_ERR_V2) {            /* Use IPMI LAN 2.0 if BMC said it only supports LAN2 */ @@ -1125,9 +1125,15 @@ int ipmi_sendrecv(struct ipmi_rq * req, uchar *rsp, int *rsp_len)     rlen = IPMI_RSPBUF_SIZE;     *rsp_len = 0; -   rv = ipmi_cmdraw_mc(req->msg.cmd, req->msg.netfn,  -                    req->msg.data, (uchar)req->msg.data_len, -                    rsp, &rlen, &ccode, fdebug); +   if ((fDriverTyp != DRV_MV) && (mc->adrtype == ADDR_IPMB) && !fipmi_lan) { +      rv = ipmi_cmd_ipmb( req->msg.cmd, req->msg.netfn, mc->sa,mc->bus, +		       req->msg.lun, req->msg.data, (uchar)req->msg.data_len, +                       rsp, &rlen, &ccode, fdebug); +   } else {    /* use ADDR_SMI */ +      rv = ipmi_cmdraw(req->msg.cmd, req->msg.netfn, mc->sa,mc->bus, +		       req->msg.lun, req->msg.data, (uchar)req->msg.data_len, +                       rsp, &rlen, &ccode, fdebug); +   }     if (rv == 0 && ccode != 0) rv = ccode;     if (rv == 0) { /*success*/          *rsp_len = rlen; @@ -1340,6 +1346,12 @@ void parse_lan_options(int c, char *popt, char fdebugcmd)     switch(c)      { +		  case 'p': +                i = atoi(popt); +                if (i > 0) lanp.port = i; +				else printf("-p port %d < 0, defaults to %d\n", +				i,RMCP_PRI_RMCP_PORT); +                break;            case 'F':      /* force driver type */                  i = set_driver_type(popt);  		if (i == 0) fset_dtype = 1; @@ -1406,11 +1418,13 @@ void parse_lan_options(int c, char *popt, char fdebugcmd)  #endif  }  /*end parse_lan_options*/ -void print_lan_opt_usage(void) +void print_lan_opt_usage(int opt)  {  #if defined(EFI) | defined(DOS)      return;  #else +    if (opt == 1) /*port ok*/ +	printf("       -p port  UDP Port of target system\n");      printf("       -N node  Nodename or IP address of target system\n");      printf("       -U user  Username for remote node\n");      printf("       -P/-R pswd  Remote Password\n"); diff --git a/util/ipmicmd.h b/util/ipmicmd.h index bf735ef..a4c911b 100644 --- a/util/ipmicmd.h +++ b/util/ipmicmd.h @@ -344,6 +344,7 @@ typedef struct {  	int cipher;   	unsigned char addr[128]; /* sizeof(struct sockaddr_storage) = 128 */  	int addr_len; /* struct sockaddr_in/_in6 gaddr; _in6=28, _in=16 bytes*/ +	int port;  } LAN_OPT; /* used for IPMI LAN, specified with option -NUP, etc. */  #ifndef _IPMI_RQ_ @@ -351,8 +352,8 @@ typedef struct {  /* structure used in ipmi_sendrecv, maps to ipmitool syntax. */  struct ipmi_rq {          struct { -                uchar netfn:6; -                uchar lun:2; +                uchar netfn:6;  +                uchar lun:2;                   uchar cmd;                  uchar target_cmd;                  ushort data_len; @@ -421,17 +422,18 @@ int ipmi_close(void);  /*ditto*/   * parse_lan_options   * Parse the IPMI LAN options from the command-line getopt.   * int  c        (input): command-line option from getopt, one of: +	  case 'p':  UDP port  	  case 'F':  force driver type  -          case 'T':  auth type  -          case 'V':  priv level  -          case 'J':  cipher suite -          case 'N':  nodename  +	  case 'T':  auth type  +	  case 'V':  priv level  +	  case 'J':  cipher suite +	  case 'N':  nodename   	  case 'U':  username  	  case 'R':  remote password  -          case 'P':  remote password  -          case 'E':  get password from IPMI_PASSWORD environment var  -          case 'Y':  prompt for remote password  -          case 'Z':  set local MC address  +	  case 'P':  remote password  +	  case 'E':  get password from IPMI_PASSWORD environment var  +	  case 'Y':  prompt for remote password  +	  case 'Z':  set local MC address    * char *optarg  (input): command-line argument from getopt   * char fdebug   (input): show debug messages if =1, default=0   */ @@ -467,7 +469,7 @@ int set_lan_options(char *node, char *user, char *pswd, int auth, int priv,                  int cipher, void *addr, int addr_len);  int get_lan_options(char *node, char *user, char *pswd, int *auth, int *priv,                  int *cipher, void *addr, int *addr_len); -void  print_lan_opt_usage(void); +void  print_lan_opt_usage(int opt);  int   ipmi_getdeviceid(uchar *presp, int sresp, char fdebugcmd);  /* int ipmi_open(void);  * embedded in ipmi_cmd() */  int   ipmi_getpicmg(uchar *presp, int sresp, char fdebug); diff --git a/util/ipmilan.c b/util/ipmilan.c index b852f3a..814092e 100644 --- a/util/ipmilan.c +++ b/util/ipmilan.c @@ -215,7 +215,7 @@ extern char * get_iana_str(int mfg); /*subs.c*/  #define dbg_dump dump_buf  extern FILE *fperr;  /*defined in ipmicmd.c, usu stderr */  extern FILE *fpdbg;  /*defined in ipmicmd.c, usu stdout */ -extern int  gshutdown;   /* from ipmicmd.c */ +extern int  gshutdown;   /* from ipmicmd.c, usu =0 */  extern int  fauth_type_set; /* from ipmicmd.c */  extern LAN_OPT lanp;     /* from ipmicmd.c */  //extern char *gnode;      /* from ipmicmd.c */ @@ -236,7 +236,7 @@ static int    vend_id  = 0;  static int    prod_id  = 0;     #if defined(DOS) || defined(EFI) -int ipmi_open_lan(char *node, char *user, char *pswd, int fdebugcmd) +int ipmi_open_lan(char *node, char *user, int port, char *pswd, int fdebugcmd)  {     printf("IPMI LAN is not supported under DOS.\n");     return(-1); @@ -520,9 +520,9 @@ void close_sockfd(SockType sfd)      pconn->sockfd = 0;   /*set global to zero */  } -int open_sockfd(char *node, SockType *sfd, SOCKADDR_T  *daddr,  +int open_sockfd(char *node, int port, SockType *sfd, SOCKADDR_T  *daddr,                          int *daddr_len, int foutput); -int open_sockfd(char *node, SockType *sfd, SOCKADDR_T  *daddr,  +int open_sockfd(char *node, int port, SockType *sfd, SOCKADDR_T  *daddr,                          int *daddr_len, int foutput)  {      int rv = 0; @@ -560,7 +560,7 @@ int open_sockfd(char *node, SockType *sfd, SOCKADDR_T  *daddr,  #ifdef HAVE_IPV6  	memset(&_srcaddr, 0, sizeof(_srcaddr));  	memset(daddr, 0, sizeof(_destaddr));  -	sprintf(service, "%d", RMCP_PRI_RMCP_PORT); +	sprintf(service, "%d", port);  	/* Obtain address(es) matching host/port */  	memset(&hints, 0, sizeof(hints));  	hints.ai_family   = AF_UNSPEC;    /* Allow IPv4 or IPv6 */ @@ -623,7 +623,7 @@ int open_sockfd(char *node, SockType *sfd, SOCKADDR_T  *daddr,  	memset(daddr, 0, sizeof(SOCKADDR_T));  	daddr->sin_family = AF_INET; -	daddr->sin_port = htons(RMCP_PRI_RMCP_PORT);  /*0x26f = 623.*/ +	daddr->sin_port = htons(port);  /*RMCP_PRI_RMCP_PORT 0x26f = 623.*/  	if (StrIsIp(node)) {  /* the node string is an IP address */  	    uchar in_ip[4];              atoip(in_ip,node); @@ -1645,7 +1645,7 @@ int ping_bmc(char *node, int fdebugcmd)      SockType sfd;      int rv; -    rv = open_sockfd(node,&sfd, &toaddr, &toaddr_len, fdebugcmd); +    rv = open_sockfd(node, RMCP_PRI_RMCP_PORT, &sfd, &toaddr, &toaddr_len, fdebugcmd);      if (rv != 0) return(rv);      rv = rmcp_ping(sfd, (struct sockaddr *)&toaddr,toaddr_len, fdebugcmd); @@ -1676,7 +1676,7 @@ static int get_rand(void *data, int len)  /*    * ipmi_open_lan   */ -int ipmi_open_lan(char *node, char *user, char *pswd, int fdebugcmd) +int ipmi_open_lan(char *node, int port, char *user, char *pswd, int fdebugcmd)  {     char *username;     uchar priv_level; @@ -1697,21 +1697,21 @@ int ipmi_open_lan(char *node, char *user, char *pswd, int fdebugcmd)          goto EXIT;     } else { -        if ((gshutdown==0) || fdebugcmd)  +        if (fdebugcmd)   	   fprintf(fpdbg,"Opening lan connection to node %s ...\n",node);  	/* save nodename for sig_abort later */  	if (strlen(node) > SZGNODE) {  	       strncpy(nodename, node, SZGNODE); nodename[SZGNODE] = 0;  	} else strcpy(nodename, node); - -        rv = open_sockfd(node, &(pconn->sockfd), &_destaddr, &_destaddr_len, 1); +        rv = open_sockfd(node, port, &(pconn->sockfd), &_destaddr, &_destaddr_len, 1);  	if (fdebugcmd)    	   printf("open_sockfd returned %d, fd=%d\n", rv, pconn->sockfd);          if (rv != 0) goto EXIT;  #ifdef HAVE_IPV6  	strcpy(gnodename,nodename); -	fprintf(fpdbg,"Connecting to node %s\n",gnodename); +        if (fdebugcmd)  +	   fprintf(fpdbg,"Connecting to node %s\n",gnodename);  #else  #ifdef WIN32          /* check for ws2_32.lib(getnameinfo) resolution */ @@ -1904,7 +1904,7 @@ int ipmicmd_lan(char *node,          if (pconn->sockfd == 0) {  /* closed, do re-open */              if (fdebugcmd)  		fprintf(fpdbg,"sockfd==0, node %s needs re-open\n",node); -            rv = ipmi_open_lan(lanp.node, lanp.user, lanp.pswd, fdebugcmd); +            rv = ipmi_open_lan(lanp.node, lanp.port, lanp.user, lanp.pswd, fdebugcmd);              if (rv != 0) goto EXIT;          }          if (fdebugcmd) { diff --git a/util/ipmilan.h b/util/ipmilan.h index 9e92e55..9a47efe 100644 --- a/util/ipmilan.h +++ b/util/ipmilan.h @@ -65,7 +65,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  /* see ipmicmd.h for LAN_ERR definitions */ -int ipmi_open_lan(char *node, char *user, char *pswd, int fdebugcmd); +int ipmi_open_lan(char *node, int port, char *user, char *pswd, int fdebugcmd);  int ipmi_close_lan(char *node);  int ipmi_flush_lan(char *node);  int ipmi_cmd_lan(char *node, ushort cmd, uchar *pdata, int sdata, diff --git a/util/ipmiutil.c b/util/ipmiutil.c index dc54f41..d51e469 100644 --- a/util/ipmiutil.c +++ b/util/ipmiutil.c @@ -57,7 +57,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  #include "ipmiutil.h"  static char *progname  = "ipmiutil"; -static char *progver   = "2.94"; +static char *progver   = "2.95";  // static char fdebug = 0;  /*int ipmiutil(int argc, char **argv); */ @@ -110,7 +110,7 @@ static void show_usage()      for (i=0; i<NSUBCMDS; i++)         printf("\t%s\t%s\n",subcmds[i].tag,subcmds[i].desc);      printf("   common IPMI LAN options:\n"); -    print_lan_opt_usage(); +    print_lan_opt_usage(0);      printf("%s", helpmsg);  } diff --git a/util/ipmiutil.mak b/util/ipmiutil.mak index 83a23c1..00d5b71 100644 --- a/util/ipmiutil.mak +++ b/util/ipmiutil.mak @@ -62,7 +62,7 @@ LIBS_EX  = advapi32.lib kernel32.lib wsock32.lib $(LIBS_W) $(LIBC_RT)  LIBS_PEF = /LIBPATH:$(LIB_D) iphlpapi.lib
  # LIBS_EX+=wsock32.lib user32.lib gdi32.lib 
 -HEADER=ipmicmd.h imb_api.h ipmilan.h ipmidir.h ipmilanplus.h \
 +HEADER=ipmicmd.h imb_api.h ipmilan.h ipmidir.h ipmi_ioctls.h ipmilanplus.h \
         ipmiutil.h 
  SHOWSEL = showsel
 @@ -118,13 +118,13 @@ clean:  	$(RM) *.obj 2>NUL
  	$(RM) $(TARG_EXE) 2>NUL
  	$(RM) *.exe 2>NUL
 -	-$(RM) $(TMP_D)\*.obj 2>NUL
 +	$(RM) $(TMP_D)\*.obj 2>NUL
  distclean:
  	$(RM) *.obj 2>NUL
  	$(RM) $(TARG_EXE) 2>NUL
  	$(RM) *.exe 2>NUL
 -	-$(RM) $(TMP_D)\*.* 2>NUL
 +	$(RM) $(TMP_D)\*.* 2>NUL
  	rmdir $(TMP_D) 2>NUL
  	$(RM) *.rc 2>NUL
  	$(RM) *.bin 2>NUL
 @@ -385,7 +385,8 @@ $(TMP_D)\iwdt.obj:    iwdt.c      $(CC) /c $(CFLAGS_M) /Fo$(TMP_D)\iwdt.obj iwdt.c
  $(E_EXE):  $(E_OBJ) 
 -  $(LINK) $(LFLAGS) /OUT:$(E_EXE) $(E_OBJ) $(LF_LANPLUS) $(LIBS_PEF) $(LIBS_EX) 
 +  $(LINK) $(LFLAGS) /OUT:$(E_EXE) $(E_OBJ) $(LF_LANPLUS) $(LIBS_PEF) $(LIBS_EX)
 +  mt.exe -manifest $(E_EXE).manifest -outputresource:$(E_EXE);1
  ipmi_sample.obj:    ipmi_sample.c
      $(CC) /c $(CFLAGS_SAM) ipmi_sample.c
 @@ -400,8 +401,7 @@ $(SAMP_DLL):    $(CMD_OBJ) mem_if.obj      $(LINK) /DLL $(LFLAGS) /OUT:$(SAMP_DLL) /def:ipmiutillib.def $(CMD_OBJ) mem_if.obj $(LIBS_PEF) $(LIBS_EX) 
      del ipmilanplus.obj
 -ipmi_sample.exe:  $(SAMP_LIB) ipmi_sample.c 
 -    $(CC) /c $(CFLAGS_SAM) ipmi_sample.c
 +ipmi_sample.exe:  $(SAMP_LIB) ipmi_sample.obj
      $(LINK) $(LFLAGS) /OUT:ipmi_sample.exe ipmi_sample.obj $(SAMP_LIB) $(LIBS_PEF) $(LIBS_EX) 
  ipmi_sample2.exe:  $(SAMP_LIB) ipmi_sample.c isensor.c ievents.c
 diff --git a/util/ireset.c b/util/ireset.c index 08794e0..3ca5312 100644 --- a/util/ireset.c +++ b/util/ireset.c @@ -108,7 +108,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  /*   * Global variables    */ -static char * progver   = "2.94"; +static char * progver   = "2.95";  static char * progname  = "ireset";  static uchar  ipmi_maj;  static uchar  ipmi_min; @@ -486,7 +486,7 @@ static void show_usage(void)                  printf("       -w  Wait for BMC ready after reset\n");                  printf("       -x  show eXtra debug messages\n");                  printf("       -y  Yes, persist boot options [-befhpms]\n"); -		print_lan_opt_usage(); +		print_lan_opt_usage(0);  }  #ifdef METACOMMAND diff --git a/util/isel.c b/util/isel.c index d4914d5..21fb932 100644 --- a/util/isel.c +++ b/util/isel.c @@ -162,7 +162,7 @@ typedef struct  #define RDATA_OFFSET    13    //byte offset to the record event data    static char *progname  = "isel"; -static char *progver   = "2.94"; +static char *progver   = "2.95";  #ifdef WIN32  #define IDXFILE   "sel.idx"  static char idxfile[80] = IDXFILE; @@ -651,7 +651,7 @@ int i_sel(int argc, char **argv)     char *s1;     printf("%s: version %s\n",progname,progver); -   while ((c = getopt(argc,argv,"a:b:cdef:h:l:m:nprs:uwvx:T:V:J:EYF:P:N:U:R:Z:?")) != EOF) +   while ((c = getopt(argc,argv,"a:b:cdef:h:l:m:np:rs:uwvx:T:V:J:EYF:P:N:U:R:Z:?")) != EOF)        switch(c) {            case 'a': faddsel = 1; /*undocumented option, to prevent misuse*/  		addstr = optarg; /*text string, max 13 bytes*/ @@ -686,13 +686,14 @@ int i_sel(int argc, char **argv)                      fsensdesc = 1;          /*extended sensor descriptions*/  		    /* Note that this option does not show event data bytes */  		    break; -          case 'p': fall = 0;        break; /*crit stop (panic) only*/ +          // case 'p': fall = 0;        break; /*crit stop (panic) only*/            case 'r': fshowraw = 1;    break;            case 's': min_sev = atob(optarg); break; /*show sev >= value*/            case 'u': futc = 1;    break;            case 'v': fonlyver = 1;    break;            case 'w': fwritesel = 1;   break;            case 'x': fdebug = 1;      break; +          case 'p':    /* port */            case 'N':    /* nodename */            case 'U':    /* remote username */            case 'P':    /* remote password */ @@ -717,13 +718,13 @@ int i_sel(int argc, char **argv)  		printf("   -l5 Show last 5 SEL records (reverse order)\n");  		printf("   -r  Show uninterpreted raw SEL records in ascii hex\n");  		printf("   -n  Show nominal/canonical output (same as -c)\n"); -		printf("   -p  Show only Panic/Critical Stop records\n"); +		//printf("   -p  Show only Panic/Critical Stop records\n");  		printf("   -s1 Show only Severity >= value (0,1,2,3)\n");                  printf("   -u  use raw UTC time\n");  		printf("   -v  Only show version information\n");  		printf("   -w  Writes new SEL records to syslog\n");  		printf("   -x  Display extra debug messages\n"); -		print_lan_opt_usage(); +		print_lan_opt_usage(1);  		ret = ERR_USAGE;  		goto do_exit;        }                @@ -866,10 +867,10 @@ int i_sel(int argc, char **argv)  	 /* PEF alerts and other log messages fail if low free space,  	    so show a warning. */  	 if (vfree < MIN_FREE) { -             printf("WARNING: free space is very low (=%d), need to clear with -c\n", +             printf("WARNING: free space is very low (=%d), need to clear with -d\n",  		    vfree);  	 } else if ((vfree/vsize) < ((vtotal * 20)/100)) { -             printf("WARNING: free space is low (=%d), need to clear with -c\n", +             printf("WARNING: free space is low (=%d), need to clear with -d\n",  		    vfree);  	 }        } diff --git a/util/iseltime.c b/util/iseltime.c index e72c93b..28ec5cc 100644 --- a/util/iseltime.c +++ b/util/iseltime.c @@ -75,7 +75,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  /*   * Global variables    */ -static char * progver   = "2.94"; +static char * progver   = "2.95";  static char * progname  = "iseltime";  static char   fdebug    = 0;  static char   fset      = 0; @@ -139,14 +139,15 @@ time_t utc2local(time_t t)  }  #define TIMESTR_SZ  30 -void show_time(time_t etime) +void show_time(time_t etime, int doutc)  {  	char buf[TIMESTR_SZ];          int bufsz = TIMESTR_SZ;  	time_t t;          strcpy(buf,"00/00/00 00:00:00"); -	t = utc2local(etime); +	if (doutc) t = utc2local(etime); +	else t = etime;          strftime(buf,bufsz, "%x %H:%M:%S", gmtime(&t)); /*or "%x %T"*/  	printf("%s\n",buf);          return; @@ -195,7 +196,7 @@ main(int argc, char **argv)                  printf("Usage: %s [-sx -NUPRETVF]\n", progname);                  printf(" where -s      Set SEL time (usually once a day)\n");                  printf("       -x      show eXtra debug messages\n"); -		print_lan_opt_usage(); +		print_lan_opt_usage(0);                  exit(1);        } @@ -220,10 +221,10 @@ main(int argc, char **argv)  	exit(1);     }     time(<ime2); -   printf("Current System time: "); show_time(ltime2); +   printf("Current System time: "); show_time(ltime2,1);     ltime1 = timebuf[0] + (timebuf[1] << 8) + (timebuf[2] << 16) +   		(timebuf[3] << 24); -   printf("Current SEL time:    "); show_time(ltime1); +   printf("Current SEL time:    "); show_time(ltime1,0);     // if (fdebug) ltime3 = utc2local(ltime1);  @@ -239,7 +240,7 @@ main(int argc, char **argv)  	else {  	   ltime3 = timebuf[0] + (timebuf[1] << 8) + (timebuf[2] << 16) +   			(timebuf[3] << 24); -	   printf("New SEL time:        "); show_time(ltime3); +	   printf("New SEL time:        "); show_time(ltime3,0);  	}        }     }  diff --git a/util/isensor.c b/util/isensor.c index e24eea0..6ce290d 100644 --- a/util/isensor.c +++ b/util/isensor.c @@ -247,7 +247,7 @@ char *decode_entity_id(int id) {   *  Global Data   ************************/  static char *progname  = "isensor"; -static char *progver   = "2.94"; +static char *progver   = "2.95";  #ifdef WIN32  static char savefile[] = "%ipmiutildir%\\thresholds.cmd";  #else @@ -3222,7 +3222,7 @@ int i_sensor(int argc, char **argv)  	     printf("      -v      Verbose: thresholds, max/min, hysteresis\n");  	     printf("      -w      Wrap thresholds on sensor line\n");  	     printf("      -L n    Loop n times\n"); -	     print_lan_opt_usage(); +	     print_lan_opt_usage(0);  	     ret = ERR_USAGE;  	     goto do_exit;        } diff --git a/util/iserial.c b/util/iserial.c index a7f722c..af90f8f 100644 --- a/util/iserial.c +++ b/util/iserial.c @@ -155,7 +155,7 @@ typedef struct  /*   * Global variables    */ -static char * progver   = "2.94"; +static char * progver   = "2.95";  static char * progname  = "iserial";  static int    vend_id = 0;  static int    prod_id = 0; @@ -942,7 +942,7 @@ main(int  argc, char **argv)  		printf("   -t   Configure serial port for shared Terminal Mode & Console (same as -c)\n");  		printf("   -v4  access priVilege: 4=Admin, 3=Operator, 2=User\n");  		printf("   -x   eXtra debug messages\n"); -		print_lan_opt_usage(); +		print_lan_opt_usage(0);                  ret = ERR_USAGE;  		goto do_exit;        } diff --git a/util/isol.c b/util/isol.c index 460411e..c092361 100644 --- a/util/isol.c +++ b/util/isol.c @@ -165,7 +165,7 @@ void dbglog( char *pattn, ... ); /*local prototype*/  /*   * Global variables    */ -static char * progver   = "2.94"; +static char * progver   = "2.95";  static char * progname  = "isol";  static char  fdebug        = 0;  static char  fpicmg        = 0; @@ -1114,7 +1114,7 @@ static void show_usage(void)                  printf("       -v     debug log filename (default=isoldbg.log)\n");                  printf("       -x     show eXtra debug messages in debug log\n");                  printf("       -z     show even more debug messages\n"); -		print_lan_opt_usage(); +		print_lan_opt_usage(1);  }  #ifdef METACOMMAND @@ -1138,7 +1138,7 @@ main(int argc, char **argv)     parse_lan_options('V',"2",0);  /*default to user priv*/ -   while ( (c = getopt( argc, argv,"ac:dei:k:ln:o:rs:t:u:wv:xzEF:J:N:P:R:T:U:V:YZ:?")) != EOF )  +   while ( (c = getopt( argc, argv,"ac:dei:k:ln:o:p:rs:t:u:wv:xzEF:J:N:P:R:T:U:V:YZ:?")) != EOF )         switch(c) {            case 'a': factivate = 1;   break;    /*activate*/            case 'd': fdeactivate = 1; break;    /*deactivate*/ @@ -1183,6 +1183,7 @@ main(int argc, char **argv)            case 'z': fdebug = 3;  break;  /*full debug messages */            case 'V':    /* priv level */  		fprivset = 1; +          case 'p':    /* port */            case 'N':    /* nodename */            case 'U':    /* remote username */            case 'P':    /* remote password */ diff --git a/util/itsol.c b/util/itsol.c index ce3f98c..64b1865 100644 --- a/util/itsol.c +++ b/util/itsol.c @@ -98,7 +98,7 @@ int   gettimeofday(struct timeval *tv, struct timezone *tz);  extern int verbose;  extern char   fdebug;  /*from ipmicmd.c*/  static char * progname  = "itsol"; -static char * progver   = "2.94"; +static char * progver   = "2.95";  static uchar  g_bus  = PUBLIC_BUS;  static uchar  g_sa   = BMC_SA;  static uchar  g_lun  = BMC_LUN; diff --git a/util/iwdt.c b/util/iwdt.c index dbc6f9a..8486b3d 100644 --- a/util/iwdt.c +++ b/util/iwdt.c @@ -100,7 +100,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  /*   * Global variables    */ -static char * progver   = "2.94"; +static char * progver   = "2.95";  static char * progname  = "iwdt";  static char   fdebug    = 0;  static char   fdontlog  = 0; @@ -335,7 +335,7 @@ main(int argc, char **argv)                  printf("       -q N    set watchdog pretimeout to N sec\n");                  printf("       -t N    set timeout to N seconds\n");                  printf("       -x      show eXtra debug messages\n"); -		print_lan_opt_usage(); +		print_lan_opt_usage(0);  		ret = ERR_USAGE;  		goto do_exit;        } diff --git a/util/oem_dell.c b/util/oem_dell.c index aab64d9..ef2fe4c 100644 --- a/util/oem_dell.c +++ b/util/oem_dell.c @@ -132,7 +132,7 @@ char NIC_Selection_Mode_String_12g[] [50] =	{  						"shared with failover all loms"  						}; -static char * progver   = "2.94"; +static char * progver   = "2.95";  static char * progname  = "idelloem";  static int verbose = 0;  static char fdebug = 0; diff --git a/util/oem_sun.c b/util/oem_sun.c index 25686c0..8171915 100644 --- a/util/oem_sun.c +++ b/util/oem_sun.c @@ -109,7 +109,7 @@ static const struct valstr sunoem_led_mode_optvals[] = {  /* global variables */  static char * progname  = "isunoem"; -static char * progver   = "2.94"; +static char * progver   = "2.95";  static char   fdebug    = 0;  static uchar  g_bus  = PUBLIC_BUS;  static uchar  g_sa   = BMC_SA; diff --git a/util/oem_supermicro.c b/util/oem_supermicro.c index 5da8614..fa0da75 100644 --- a/util/oem_supermicro.c +++ b/util/oem_supermicro.c @@ -66,7 +66,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  void set_loglevel(int level);  /*prototype */  extern char fsm_debug;  /*mem_if.c*/ -static char * progver   = "2.94"; +static char * progver   = "2.95";  static char * progname  = "ismcoem";  static int verbose = 0;  static char fdebug = 0;  | 
