diff --git a/SOURCES/nvsetenv b/SOURCES/nvsetenv new file mode 100644 index 00000000..9ee95719 --- /dev/null +++ b/SOURCES/nvsetenv @@ -0,0 +1,14 @@ +#!/bin/sh + +if [ "$1" = "--version" ]; then + echo This version of nvsetenv is just a wrapper to invoke nvram + exit 0 +fi +if [ -z "$1" ]; then + nvram --print-config +elif [ -z "$2" ]; then + nvram --print-config="$1" +else + nvram --update-config "$1"="$2" +fi +exit $? diff --git a/SOURCES/powerpc-utils-1.2.15-man.patch b/SOURCES/powerpc-utils-1.2.15-man.patch new file mode 100644 index 00000000..588c693e --- /dev/null +++ b/SOURCES/powerpc-utils-1.2.15-man.patch @@ -0,0 +1,328 @@ +diff -up powerpc-utils-1.2.25/Makefile.am.man powerpc-utils-1.2.25/Makefile.am +--- powerpc-utils-1.2.25/Makefile.am.man 2015-04-13 18:36:01.000000000 +0200 ++++ powerpc-utils-1.2.25/Makefile.am 2015-06-18 10:23:04.039591102 +0200 +@@ -43,7 +43,15 @@ man_MANS = \ + man/lsslot.8 \ + man/ppc64_cpu.8 \ + man/errinjct.8 \ +- man/rtas_dbg.8 ++ man/rtas_dbg.8 \ ++ man/lsdevinfo.8 \ ++ man/rtas_event_decode.8 \ ++ man/ls-vdev.8 \ ++ man/lsprop.8 \ ++ man/drmgr.8 \ ++ man/ls-veth.8 \ ++ man/nvsetenv.8 \ ++ man/ls-vscsi.8 + + EXTRA_DIST += $(bin_SCRIPTS) $(sbin_SCRIPTS) $(man_MANS) + +diff -up powerpc-utils-1.2.25/man/drmgr.8.man powerpc-utils-1.2.25/man/drmgr.8 +--- powerpc-utils-1.2.25/man/drmgr.8.man 2015-06-18 10:23:04.040591105 +0200 ++++ powerpc-utils-1.2.25/man/drmgr.8 2015-06-18 10:23:04.040591105 +0200 +@@ -0,0 +1,60 @@ ++.TH DRMGR "8" "Oct 2010" "Linux" "Linux on Power Service Tools" ++.SH NAME ++drmgr \- Dynamic Resource Manager. Utility used to perform DLPAR operations on a client partition. ++ ++.SH SYNOPSIS ++.B drmgr ++.RB [ \-w ++.IR minutes ] ++.RB [ \-d ++.IR detail_level ] ++.RB [ \-C | \-\-capabilities ] ++.RB [ \-h | \-\-help ] ++ ++.B drmgr ++.RB { \-c " {" port " | " slot " | " phb " | " pci " | " mem " | " cpu } ++.RB | \-m } ++ ++.B drmgr \-c ++.RB { port " | " slot " | " phb } ++.RB { \-a " | " \-r " | " \-Q "} " \-s ++.I drc_name ++ ++.B drmgr \-c pci \-s ++.I slot ++.RB { \-i " | " \-a " [" \-I "] | " \-r " [" \-I "] | " \-R " [" \-I "]}" ++ ++.B drmgr \-c mem ++.RB { \-a " | " \-r "} {" \-q ++.I quantity ++.BR \-p ++.RI { variable_weight " | " ent_capacity "} |" ++.RB { \-q ++.I quantity ++.RB "| " \-s ++.IR drc_name }} ++ ++.B drmgr \-c cpu ++.RB { \-a " | " \-r "} {" \-q ++.I quantity ++.BR \-p ++.RI { variable_weight " | " ent_capacity } ++.RB [ \-s ++.IR drc_names ] ++ ++ ++ ++.SH OVERVIEW ++.B drmgr ++program is a member of the ppc64-utils suite of utils. ++Use it to list DLPAR and hotplug capable slots. ++ ++.SH DESCRIPTION ++.B drmgr ++is a utility to list DLPAR and hotplug capable slots. ++ ++.SH AUTHOR ++.B drmgr ++was written by IBM Corporation ++.PP ++This manual page was written by Roman Rakus +diff -up powerpc-utils-1.2.25/man/lsdevinfo.8.man powerpc-utils-1.2.25/man/lsdevinfo.8 +--- powerpc-utils-1.2.25/man/lsdevinfo.8.man 2015-06-18 10:23:04.040591105 +0200 ++++ powerpc-utils-1.2.25/man/lsdevinfo.8 2015-06-18 10:23:04.040591105 +0200 +@@ -0,0 +1,39 @@ ++.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.36. ++.TH LSDEVINFO "8" "October 2010" "Linux" "Linux on Power Service Tools" ++.SH NAME ++lsdevinfo - information on Virtual devices ++ ++.SH SYNOPSIS ++.B lsdevinfo ++[\fI-q criteria\fR] [\fI-F format\fR] [\fI-R\fR] [\fI-c\fR] [\fI-h\fR] ++ ++.SH DESCRIPTION ++Provide information on Virtual devices ++.PP ++ ++.SH OPTIONS ++.TP ++\fB\-q\fR criteria ++Specifies a criteria to select which devices are to be displayed. ++.TP ++\fB\-F\fR format ++Specifies the set of attributes to be displayed. ++.TP ++\fB\-R\fR ++Recursively display children of selected devices ++.TP ++\fB\-c\fR ++Display output as a comma separated list for each device. ++.TP ++\fB\-V\fR ++Display version information and exit ++.TP ++\fB\-h\fR ++Display help information and exit ++ ++.SH AUTHOR ++.B lsdevinfo ++was written by Santiago Leon . ++.PP ++This manual page was written by Roman Rakus . ++ +diff -up powerpc-utils-1.2.25/man/lsprop.8.man powerpc-utils-1.2.25/man/lsprop.8 +--- powerpc-utils-1.2.25/man/lsprop.8.man 2015-06-18 10:23:04.040591105 +0200 ++++ powerpc-utils-1.2.25/man/lsprop.8 2015-06-18 10:23:04.040591105 +0200 +@@ -0,0 +1,42 @@ ++.TH LSPROP "8" "Sep 2010" "Linux" "Linux on Power Service Tools" ++.SH NAME ++lsprop \- list properties ++.SH SYNOPSIS ++.B lsprop ++.RB [ \-R ] ++.RB [ \-m ++.IR max-bytes ] ++.RB [ \-w ++.IR num-words ] ++.RI [ FILE .\|.\|.] ++.SH OVERVIEW ++.B lsprop ++program is a member of the ppc64-utils suite of utils. ++Use it to list properties ++ ++.SH DESCRIPTION ++.B lsprop ++displays properties for ++.IR FILE s ++like Open Firmware ++.I .properties ++word. ++If the ++.I FILE ++is not set, the current directory is used. ++ ++.SH OPTIONS ++.TP ++.B \-R ++Process recursively ++.TP ++.BI \-m " max-bytes" ++Read only first ++.I max-bytes ++bytes from the ++.IR FILE s ++.TP ++.BI \-w " num-words" ++Display up to ++.I num-words ++words per line +diff -up powerpc-utils-1.2.25/man/ls-vdev.8.man powerpc-utils-1.2.25/man/ls-vdev.8 +--- powerpc-utils-1.2.25/man/ls-vdev.8.man 2015-06-18 10:23:04.040591105 +0200 ++++ powerpc-utils-1.2.25/man/ls-vdev.8 2015-06-18 10:23:04.040591105 +0200 +@@ -0,0 +1,25 @@ ++.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.36. ++.TH LS-VDEV "8" "October 2010" "Linux" "Linux on Power Service Tools" ++.SH NAME ++ls-vdev \- information on Virtual SCSI adapters and devices ++.SH SYNOPSIS ++.BR ls-vdev " [" \-h " | " -V ] ++ ++.SH DESCRIPTION ++Provide information on Virtual SCSI adapters and devices ++.PP ++ ++.SH OPTIONS ++.TP ++\fB\-V\fR ++Display version information and exit ++.TP ++\fB\-h\fR ++Display help information and exit ++.PP ++ ++.SH AUTHOR ++.B ls-vdev ++was written by Brian King . ++.PP ++This manual page was written by Roman Rakus . +diff -up powerpc-utils-1.2.25/man/ls-veth.8.man powerpc-utils-1.2.25/man/ls-veth.8 +--- powerpc-utils-1.2.25/man/ls-veth.8.man 2015-06-18 10:23:04.041591108 +0200 ++++ powerpc-utils-1.2.25/man/ls-veth.8 2015-06-18 10:23:04.040591105 +0200 +@@ -0,0 +1,25 @@ ++.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.36. ++.TH LS-VETH "8" "October 2010" "Linux" "Linux on Power Service Tools" ++.SH NAME ++ls-veth \- information on Virtual Ethernet devices ++.SH SYNOPSIS ++.BR ls-veth " [" \-h " | " -V ] ++ ++.SH DESCRIPTION ++Provide information on Virtual Ethernet devices ++.PP ++ ++.SH OPTIONS ++.TP ++\fB\-V\fR ++Display version information and exit ++.TP ++\fB\-h\fR ++Display help information and exit ++.PP ++ ++.SH AUTHOR ++.B ls-veth ++was written by Brian King . ++.PP ++This manual page was written by Roman Rakus . +diff -up powerpc-utils-1.2.25/man/ls-vscsi.8.man powerpc-utils-1.2.25/man/ls-vscsi.8 +--- powerpc-utils-1.2.25/man/ls-vscsi.8.man 2015-06-18 10:23:04.041591108 +0200 ++++ powerpc-utils-1.2.25/man/ls-vscsi.8 2015-06-18 10:23:04.041591108 +0200 +@@ -0,0 +1,25 @@ ++.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.36. ++.TH LS-VSCSI "8" "October 2010" "Linux" "Linux on Power Service Tools" ++.SH NAME ++ls-vscsi \- information on Virtual devices ++.SH SYNOPSIS ++.BR ls-vscsi " [" \-h " | " -V ] ++ ++.SH DESCRIPTION ++Provide information on Virtual devices ++.PP ++ ++.SH OPTIONS ++.TP ++\fB\-V\fR ++Display version information and exit ++.TP ++\fB\-h\fR ++Display help information and exit ++.PP ++ ++.SH AUTHOR ++.B ls-vscsi ++was written by Brian King . ++.PP ++This manual page was written by Roman Rakus . +diff -up powerpc-utils-1.2.25/man/nvsetenv.8.man powerpc-utils-1.2.25/man/nvsetenv.8 +--- powerpc-utils-1.2.25/man/nvsetenv.8.man 2015-06-18 10:23:04.041591108 +0200 ++++ powerpc-utils-1.2.25/man/nvsetenv.8 2015-06-18 10:23:04.041591108 +0200 +@@ -0,0 +1,29 @@ ++.TH NVSETENV "8" "Oct 2010" "Linux" "Linux on Power Service Tools" ++.SH NAME ++nvsetenv \- wrapper to invoke nvram ++ ++.SH SYNOPSIS ++.B nvsetenv ++[ ARG1 ] [ ARG2 ] ++ ++.SH DESCRIPTION ++.B nvsetenv ++is just a wrapper to invoke nvram ++ ++.SH OPTIONS ++ ++Without any argument, nvsetenv calls ++.I nvram --print-config ++ ++With one argument ++.IR ARG1 , ++nvsetenv calls ++.I nvram --print-config=ARG1 ++ ++With two arguments ++.IR "ARG1 ARG2" , ++nvsetenv calls ++.I nvram --update-config ARG1=ARG2 ++ ++.SH "SEE ALSO" ++.IR nvram (8) +diff -up powerpc-utils-1.2.25/man/rtas_event_decode.8.man powerpc-utils-1.2.25/man/rtas_event_decode.8 +--- powerpc-utils-1.2.25/man/rtas_event_decode.8.man 2015-06-18 10:23:04.041591108 +0200 ++++ powerpc-utils-1.2.25/man/rtas_event_decode.8 2015-06-18 10:23:04.041591108 +0200 +@@ -0,0 +1,31 @@ ++.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.36. ++.TH RTAS_EVENT_DECODE 8 "September 2010" "Linux" "Linux on Power Service Tools" ++.SH NAME ++\fBrtas_event_decode\fP - RTAS message decoder ++.SH SYNOPSIS ++.B rtas_event_decode ++[\fI-dv\fR] [\fI-n eventnum\fR] [\fI-w width\fR] ++.SH DESCRIPTION ++RTAS messages are placed in the syslog encoded in a binary ++format, and are unreadable. This tool will take exactly one ++message, parse it, and spit out the human-readable equivalent. ++This program expects ascii data on stdin. ++ ++This tool is mostly meant to be used in conjuction with the ++rtas_dump shell script, which provides a suitable user ++interface. ++ ++.SH OPTIONS ++.TP ++.B \-d ++dump the raw RTAS event ++.TP ++.BI \-n " eventnum" ++event number of the RTAS event being dumped ++.TP ++.B \-v ++verbose, print all details, not just header ++.TP ++.BI \-w " width" ++limit the output to the specified width, default width is 80 characters. The width must be > 0 and < 1024. ++ diff --git a/SOURCES/powerpc-utils-1.3.4-update_flash_nv_pseries_platform_man.patch b/SOURCES/powerpc-utils-1.3.4-update_flash_nv_pseries_platform_man.patch new file mode 100644 index 00000000..36fdcf67 --- /dev/null +++ b/SOURCES/powerpc-utils-1.3.4-update_flash_nv_pseries_platform_man.patch @@ -0,0 +1,280 @@ +diff -up powerpc-utils-1.3.4/Makefile.am.than powerpc-utils-1.3.4/Makefile.am +--- powerpc-utils-1.3.4/Makefile.am.than 2017-09-15 11:28:59.482394868 +0200 ++++ powerpc-utils-1.3.4/Makefile.am 2017-09-15 11:32:25.447393942 +0200 +@@ -31,6 +31,7 @@ man_MANS = \ + man/amsstat.1 \ + man/serv_config.8 \ + man/update_flash.8 \ ++ man/update_flash_nv.8 \ + man/nvram.8 \ + man/set_poweron_time.8 \ + man/bootlist.8 \ +@@ -52,7 +53,8 @@ man_MANS = \ + man/drmgr.8 \ + man/ls-veth.8 \ + man/nvsetenv.8 \ +- man/ls-vscsi.8 ++ man/ls-vscsi.8 \ ++ man/pseries_platform.8 + + EXTRA_DIST += $(bin_SCRIPTS) $(sbin_SCRIPTS) $(man_MANS) + +diff -up powerpc-utils-1.3.4/man/pseries_platform.8.than powerpc-utils-1.3.4/man/pseries_platform.8 +--- powerpc-utils-1.3.4/man/pseries_platform.8.than 2017-09-15 11:22:21.675326705 +0200 ++++ powerpc-utils-1.3.4/man/pseries_platform.8 2017-09-15 11:24:33.705686446 +0200 +@@ -0,0 +1,15 @@ ++.\" ++.\" Copyright (C) 2011 International Business Machines ++.\" Brian King ++.\" ++.TH pseries_platform 8 "December 2011" Linux "Linux on Power Service Tools" ++.SH NAME ++pseries_platform \- display platform name ++.SH SYNOPSIS ++.BI "pseries_platform" ++.SH DESCRIPTION ++The ++.B pseries_platform ++command can be used to display platform name. ++.SH AUTHOR ++Brian King +diff -up powerpc-utils-1.3.4/man/update_flash_nv.8.than powerpc-utils-1.3.4/man/update_flash_nv.8 +--- powerpc-utils-1.3.4/man/update_flash_nv.8.than 2017-09-15 11:21:28.571583127 +0200 ++++ powerpc-utils-1.3.4/man/update_flash_nv.8 2017-09-15 11:20:55.610742291 +0200 +@@ -0,0 +1,236 @@ ++.\" ++.\" Copyright (C) 2002 - 2013 International Business Machines ++.\" Todd Inglett ++.\" Michael Strosaker ++.\" Vasant Hegde ++.\" ++.TH UPDATE_FLASH_NV 8 "8 May 2013" Linux "PowerLinux Service Tools" ++.SH NAME ++update_flash_nv \- manage system and service processor firmware ++.SH SYNOPSIS ++.nf ++\fB/usr/sbin/update_flash_nv \fR[\fB-v|-n\fR] \fB-f \fIfirmware.img ++.B /usr/sbin/update_flash_nv -h ++.B /usr/sbin/update_flash_nv -c ++.B /usr/sbin/update_flash_nv -r ++.B /usr/sbin/update_flash_nv -s ++.B /usr/sbin/update_flash_nv -d ++.fi ++.SH DESCRIPTION ++.P ++The ++.I update_flash_nv ++script is used to validate, update and manage firmware on an IBM Power ++Systems servers. ++.TP ++.nf ++.B VALIDATION ++.fi ++When used with the ++.B -v ++option, the script will ONLY perform validation of the image file. Regardless ++of the outcome of the validation, no actual flash will occur. This option is ++only useful on machines that support validation of firmware images. ++.TP ++.nf ++.B UPDATE ++.fi ++When used with only the ++.B -f ++option and an image file name, the script will attempt to update the system ++firmware with the given image. If the machine has the ability to pre-validate ++the image, this will be done automatically before the flash. If the machine ++is not capable of pre-validation, or if validation passes, this script will ++upload the firmware image into the kernel and will perform a ++.B shutdown -r now ++which will reboot the system. The flash will occur at the end of the reboot ++process. ++ ++.B WARNING: ++The system WILL be rebooted! Wait until the flash process has completed. This ++can be anywhere from 2 minutes to 20 minutes (or more) depending on the system. ++The control panel display will show that the system is flashing. Failure to ++wait may render a system inoperable. ++ ++.B NOTE: ++If machine supports two firmware image areas, update is always applied to the ++temporary image area. The ++.B -c ++option is the normal means by which a temporary image is committed to the ++permanent side (see MANAGEMENT). However, if a platform is running from a ++temporary image when an update is to be applied, then the platform may ++automatically commit the current temporary image to the permanent side to ++allow the new image to be updated to the temporary image area. The ++.B -v ++option can be used to determine what would result from an attempt to update ++a flash image. ++ ++The ++.B -n ++option will prevent the automatic overwrite of the permanent image area ++and abandon the update entirely. ++ ++To apply an update to the temporary image area without overwriting the ++permanent image area, the system must first be running with the permanent ++image. The temporary image can then be rejected (see MANAGEMENT). ++Subsequently, the update can be applied. ++.TP ++.nf ++.B MANAGEMENT ++.fi ++When used with the ++.B -c ++option, the script will commit the temporary image to the permanent side. ++In order to use this, the machine must be running on the temporary image. ++This option is only useful on machines supporting two firmware image areas. ++ ++When used with the ++.B -r ++option, the script will reject the temporary image. In order to use this, ++the machine must be running on the permanent image. To switch from the ++temporary image to the permanent image, you must reboot from the permanent ++image -- for example, using the ASMI or HMC. This option is only useful on ++machines supporting two firmware image areas. ++ ++.SH OPTIONS ++.TP ++.B \-h ++Print the usage message and exit. ++.TP ++\fB\-f \fIfilename ++Supply the filename to flash (required). ++.TP ++.B \-v ++Validate ONLY with specified image file. ++.TP ++.B \-n ++Do not overwrite permanent side image automatically. ++.TP ++.B \-c ++Commit temporary image to permanent side. ++.TP ++.B \-r ++Reject temporary image. ++.TP ++.B \-s ++Determine if partition has access to perform flash image management. ++.TP ++.B \-d ++Display current firmware version. ++ ++.SH EXAMPLES ++.P ++To determine if partition has authority to flash image: ++ ++# update_flash_nv -s ++ ++.P ++For a typical firmware update (this may commit temporary to permanent): ++ ++# update_flash_nv -f 01AL740_100_042.img ++ ++.P ++To update only if permanent side will not be overwritten: ++ ++# update_flash_nv -n -f 01AL740_100_042.img ++ ++.P ++To validate an image: ++ ++# update_flash_nv -v -f 01AL740_100_042.img ++ ++.P ++To commit temporary image to permanent (note that the system ++must be running on temporary image): ++ ++# update_flash_nv -c ++ ++.P ++To reject temporary image, and copy to permanent to temporary ++(note that the system must be running on permanent image): ++ ++# update_flash_nv -r ++ ++.SH EXIT STATUS ++.TP ++.nf ++All cases: ++ 3 - Usage error ++ 4 - Permission error ++ 6 - Unexpected problem with /proc filesystem access ++ 7 - Error loading module ++ 8 - RTAS(pSeries)/OPAL(PowerNV) call failed ++ 9 - User aborted operation ++.fi ++.TP ++.nf ++Determine if partition has authority to manage image (-s): ++ 0 - Flash image management is supported ++ 1 - Flash image management is not supported on this system ++.fi ++.TP ++.nf ++Validation (-v): ++ 0 - Validation successful ++.fi ++.TP ++.nf ++Update ([-n] -f): ++ 5 - Image file error ++10 - Auto overwrite permanent side image ++15 - Update Access Key Expired ++.fi ++.TP ++.nf ++Manage (-c|-r): ++ 0 - Temporary image commit/reject successful ++.fi ++ ++.SH FILES ++.TP ++.nf ++pSeries ++ rtas_flash kernel module ++ /proc/ppc64/rtas/firmware_flash (provided by kernel module) ++.fi ++.TP ++.nf ++PowerNV ++ /sys/firmware/opal/image ++ /sys/firmware/opal/{validate/manage/update}_flash ++.fi ++.SH NOTES ++Firmware may be downloaded from the IBM website. Instructions for ++downloading and installing the firmware image are also there, and ++information there will be more up-to-date than this page. ++ ++.P ++Various conditions can lead to a firmware update failure. If you ++receive an authentication-related error, such as: ++.P ++.nf ++update_flash: RTAS: validate() Partition does not have authority ++-or- ++update_flash: System does not have authority to perform firmware update. ++.fi ++.P ++This can reflect either 1) That the permission is not set (correctable ++through the ASM interface, System -> Firmware Update Policy, or through an ++HMC if attached. ++.P ++-or- ++.P ++2) Firmware still believes an HMC is attached. This can be corrected by ++following the steps outlined here: ++.P ++http://publib.boulder.ibm.com/infocenter/powersys/v3r1m5/index.jsp?topic=/p7hatl/iphblresetserverp6.htm ++ ++.P ++For older "AIX format" images, the file will have a .BIN extension. This ++zip file happens to be an AIX binary, but it can be extracted with the ++unzip command (with password from the web page): ++ ++ unzip 70286C4F.BIN ++ ++This should produce a file with a .img extension. This image file is what ++should be flashed. diff --git a/SOURCES/powerpc-utils-autoconf.patch b/SOURCES/powerpc-utils-autoconf.patch new file mode 100644 index 00000000..c2cfe632 --- /dev/null +++ b/SOURCES/powerpc-utils-autoconf.patch @@ -0,0 +1,142 @@ +2009-10-29 Stepan Kasal + +Make build with autoconf 2.59. + +diff -urN powerpc-utils-1.2.2.orig/configure.ac powerpc-utils-1.2.2/configure.ac +--- powerpc-utils-1.2.2.orig/configure.ac 2009-10-22 21:00:13.000000000 +0200 ++++ powerpc-utils-1.2.2/configure.ac 2009-10-29 15:41:58.000000000 +0100 +@@ -1,8 +1,9 @@ + # -*- Autoconf -*- + # Process this file with autoconf to produce a configure script. + +-AC_PREREQ([2.63]) +-AC_INIT([powerpc-utils], [1.2.0], [nfont@austin.ibm.com]) ++AC_PREREQ([2.59]) ++m4_include([ac_type_uint.m4]) ++AC_INIT([powerpc-utils], [1.2.2], [nfont@austin.ibm.com]) + AM_INIT_AUTOMAKE + AC_CONFIG_SRCDIR([src/rtas_ibm_get_vpd.c]) + +diff -urN powerpc-utils-1.2.2.orig/ac_type_uint.m4 powerpc-utils-1.2.2/ac_type_uint.m4 +--- powerpc-utils-1.2.2.orig/ac_type_uint.m4 1970-01-01 01:00:00.000000000 +0100 ++++ powerpc-utils-1.2.2/ac_type_uint.m4 2009-10-29 16:04:41.000000000 +0100 +@@ -0,0 +1,119 @@ ++AC_DEFUN([AC_TYPE_INT8_T], [_AC_TYPE_INT(8)]) ++AC_DEFUN([AC_TYPE_INT16_T], [_AC_TYPE_INT(16)]) ++AC_DEFUN([AC_TYPE_INT32_T], [_AC_TYPE_INT(32)]) ++AC_DEFUN([AC_TYPE_INT64_T], [_AC_TYPE_INT(64)]) ++AC_DEFUN([AC_TYPE_UINT8_T], [_AC_TYPE_UNSIGNED_INT(8)]) ++AC_DEFUN([AC_TYPE_UINT16_T], [_AC_TYPE_UNSIGNED_INT(16)]) ++AC_DEFUN([AC_TYPE_UINT32_T], [_AC_TYPE_UNSIGNED_INT(32)]) ++AC_DEFUN([AC_TYPE_UINT64_T], [_AC_TYPE_UNSIGNED_INT(64)]) ++ ++# _AC_TYPE_INT(NBITS) ++# ------------------- ++AC_DEFUN([_AC_TYPE_INT], ++[ ++ AC_CACHE_CHECK([for int$1_t], [ac_cv_c_int$1_t], ++ [ac_cv_c_int$1_t=no ++ for ac_type in 'int$1_t' 'int' 'long int' \ ++ 'long long int' 'short int' 'signed char'; do ++ AC_COMPILE_IFELSE( ++ [AC_LANG_BOOL_COMPILE_TRY( ++ [AC_INCLUDES_DEFAULT], ++ [[0 < ($ac_type) (((($ac_type) 1 << ($1 - 2)) - 1) * 2 + 1)]])], ++ [AC_COMPILE_IFELSE( ++ [AC_LANG_BOOL_COMPILE_TRY( ++ [AC_INCLUDES_DEFAULT], ++ [[($ac_type) (((($ac_type) 1 << ($1 - 2)) - 1) * 2 + 1) ++ < ($ac_type) (((($ac_type) 1 << ($1 - 2)) - 1) * 2 + 2)]])], ++ [], ++ [AS_CASE([$ac_type], [int$1_t], ++ [ac_cv_c_int$1_t=yes], ++ [ac_cv_c_int$1_t=$ac_type])])]) ++ test "$ac_cv_c_int$1_t" != no && break ++ done]) ++ case $ac_cv_c_int$1_t in #( ++ no|yes) ;; #( ++ *) ++ AC_DEFINE_UNQUOTED([int$1_t], [$ac_cv_c_int$1_t], ++ [Define to the type of a signed integer type of width exactly $1 bits ++ if such a type exists and the standard includes do not define it.]);; ++ esac ++])# _AC_TYPE_INT ++ ++# _AC_TYPE_UNSIGNED_INT(NBITS) ++# ---------------------------- ++AC_DEFUN([_AC_TYPE_UNSIGNED_INT], ++[ ++ AC_CACHE_CHECK([for uint$1_t], [ac_cv_c_uint$1_t], ++ [ac_cv_c_uint$1_t=no ++ for ac_type in 'uint$1_t' 'unsigned int' 'unsigned long int' \ ++ 'unsigned long long int' 'unsigned short int' 'unsigned char'; do ++ AC_COMPILE_IFELSE( ++ [AC_LANG_BOOL_COMPILE_TRY( ++ [AC_INCLUDES_DEFAULT], ++ [[($ac_type) -1 >> ($1 - 1) == 1]])], ++ [AS_CASE([$ac_type], [uint$1_t], ++ [ac_cv_c_uint$1_t=yes], ++ [ac_cv_c_uint$1_t=$ac_type])]) ++ test "$ac_cv_c_uint$1_t" != no && break ++ done]) ++ case $ac_cv_c_uint$1_t in #( ++ no|yes) ;; #( ++ *) ++ m4_bmatch([$1], [^\(8\|32\|64\)$], ++ [AC_DEFINE([_UINT$1_T], 1, ++ [Define for Solaris 2.5.1 so the uint$1_t typedef from ++ , , or is not used. ++ If the typedef were allowed, the #define below would cause a ++ syntax error.])]) ++ AC_DEFINE_UNQUOTED([uint$1_t], [$ac_cv_c_uint$1_t], ++ [Define to the type of an unsigned integer type of width exactly $1 bits ++ if such a type exists and the standard includes do not define it.]);; ++ esac ++])# _AC_TYPE_UNSIGNED_INT ++ ++ ++# AS_CASE(WORD, [PATTERN1], [IF-MATCHED1]...[DEFAULT]) ++# ---------------------------------------------------- ++# Expand into ++# | case WORD in ++# | PATTERN1) IF-MATCHED1 ;; ++# | ... ++# | *) DEFAULT ;; ++# | esac ++m4_define([_AS_CASE], ++[ $1[)] m4_default([$2], [:]) ;; ++]) ++m4_define([_AS_CASE_DEFAULT], ++[ *[)] $1 ;; ++]) ++m4_defun([AS_CASE], ++[m4_ifval([$2$3], ++[case $1 in ++m4_transform_pair([_$0], [_$0_DEFAULT], m4_shift($@))dnl ++esac ++])dnl ++])# AS_CASE ++ ++ ++# m4_transform_pair(EXPRESSION, [END-EXPR = EXPRESSION], ARG...) ++# -------------------------------------------------------------- ++# Perform a pairwise grouping of consecutive ARGs, by expanding ++# EXPRESSION([ARG1], [ARG2]). If there are an odd number of ARGs, the ++# final argument is expanded with END-EXPR([ARGn]). ++# ++# For example: ++# m4_define([show], [($*)m4_newline])dnl ++# m4_transform_pair([show], [], [a], [b], [c], [d], [e])dnl ++# => (a,b) ++# => (c,d) ++# => (e) ++# ++# Please keep foreach.m4 in sync with any adjustments made here. ++m4_define([m4_transform_pair], ++[m4_if([$#], [0], [m4_fatal([$0: too few arguments: $#])], ++ [$#], [1], [m4_fatal([$0: too few arguments: $#: $1])], ++ [$#], [2], [], ++ [$#], [3], [m4_default([$2], [$1])([$3])[]], ++ [$#], [4], [$1([$3], [$4])[]], ++ [$1([$3], [$4])[]$0([$1], [$2], m4_shift(m4_shift3($@)))])]) ++ diff --git a/SPECS/powerpc-utils.spec b/SPECS/powerpc-utils.spec new file mode 100644 index 00000000..c54d5707 --- /dev/null +++ b/SPECS/powerpc-utils.spec @@ -0,0 +1,379 @@ +Name: powerpc-utils +Version: 1.3.4 +Release: 3%{?dist} +Summary: Utilities for PowerPC platforms +Group: System Environment/Base +License: GPLv2 +URL: https://github.com/nfont/%{name}/ + +Source0: https://github.com/nfont/%{name}/archive/v%{version}.tar.gz +Source1: nvsetenv + +# This hack is needed only for platforms with autoconf < 2.63 +Patch0: powerpc-utils-autoconf.patch +Patch1: powerpc-utils-1.2.15-man.patch +# add missing man pages: update_flash_nv, pseries_platform +Patch2: powerpc-utils-1.3.4-update_flash_nv_pseries_platform_man.patch + +ExclusiveArch: ppc64 ppc64le + +# This is done before release of F12 +Obsoletes: powerpc-utils-papr < 1.1.6-3 +Provides: powerpc-utils-papr = 1.1.6-3 + +# should be fixed - libservicelog is not right name +Requires: libservicelog bc which +Requires: powerpc-utils-python +Requires: perl(Data::Dumper) +BuildRequires: zlib-devel doxygen automake librtas-devel >= 1.4.0 libservicelog-devel >= 1.0.1-2 + + +%description +Utilities for PowerPC platforms. + + +%prep +%setup -q + +# This hack is needed only for platforms with autoconf < 2.63 +%if 0%{?fedora} < 9 && 0%{?rhel} < 6 +%patch0 -p1 -b .aconf +%endif +%patch1 -p1 -b .man +%patch2 -p1 -b .man1 + +%build +export CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing" +./autogen.sh +%configure +make %{?_smp_mflags} + + +%install +make install DESTDIR=$RPM_BUILD_ROOT FILES= RCSCRIPTS= +install -m 755 %{SOURCE1} $RPM_BUILD_ROOT%{_sbindir}/nvsetenv + +%define pkgdocdir %{_datadir}/doc/%{name}-%{version} +# move doc files +mkdir -p $RPM_BUILD_ROOT%{pkgdocdir} +install $RPM_BUILD_ROOT/usr/share/doc/packages/powerpc-utils/* -t $RPM_BUILD_ROOT%{pkgdocdir} +rm -rf $RPM_BUILD_ROOT/usr/share/doc/packages/powerpc-utils + +# remove init script and perl script. They are deprecated +rm -rf $RPM_BUILD_ROOT/etc/init.d/ibmvscsis.sh $RPM_BUILD_ROOT/usr/sbin/vscsisadmin + +# nvsetenv is just a wrapper to nvram +ln -s nvram.8.gz $RPM_BUILD_ROOT/%{_mandir}/man8/nvsetenv.8.gz + + +%files +%{_sbindir}/nvsetenv +%{_sbindir}/nvram +#deprecated, use sosreport instead +%exclude %{_sbindir}/snap +%{_sbindir}/bootlist +%{_sbindir}/ofpathname +%{_sbindir}/ppc64_cpu +%{_sbindir}/lsdevinfo +%{_sbindir}/lsprop +%{_mandir}/man8/nvram.8* +%{_mandir}/man8/nvsetenv.8* +%exclude %{_mandir}/man8/snap.8* +%{_mandir}/man8/bootlist.8* +%{_mandir}/man8/ofpathname.8* + +%{_sbindir}/update_flash +%{_sbindir}/activate_firmware +%{_sbindir}/set_poweron_time +%{_sbindir}/rtas_ibm_get_vpd +%{_sbindir}/serv_config +%{_sbindir}/uesensor +%{_sbindir}/hvcsadmin +%{_sbindir}/rtas_dump +%{_sbindir}/rtas_event_decode +%{_sbindir}/sys_ident +%{_sbindir}/drmgr +%{_sbindir}/lsslot +%{_sbindir}/ls-vdev +%{_sbindir}/ls-veth +%{_sbindir}/ls-vscsi +%{_sbindir}/lparstat +%{_sbindir}/pseries_platform +%{_sbindir}/update_flash_nv +%{_sbindir}/errinjct +%{_sbindir}/rtas_dbg + +%{_bindir}/amsstat +%{_mandir}/man8/update_flash.8* +%{_mandir}/man8/update_flash_nv.8* +%{_mandir}/man8/activate_firmware.8* +%{_mandir}/man8/set_poweron_time.8* +%{_mandir}/man8/rtas_ibm_get_vpd.8* +%{_mandir}/man8/serv_config.8* +%{_mandir}/man8/uesensor.8* +%{_mandir}/man8/hvcsadmin.8* +%{_mandir}/man8/rtas_dump.8* +%{_mandir}/man8/sys_ident.8* +%{_mandir}/man8/lparstat.8* +%{_mandir}/man5/lparcfg.5* +%{_mandir}/man1/amsstat.1* +%{_mandir}/man8/lsdevinfo.8* +%{_mandir}/man8/rtas_event_decode.8* +%{_mandir}/man8/ls-vdev.8* +%{_mandir}/man8/lsslot.8* +%{_mandir}/man8/lsprop.8* +%{_mandir}/man8/drmgr.8* +%{_mandir}/man8/ls-veth.8* +%{_mandir}/man8/ppc64_cpu.8* +%{_mandir}/man8/ls-vscsi.8* +%{_mandir}/man8/errinjct.8* +%{_mandir}/man8/rtas_dbg.8* +%{_mandir}/man8/pseries_platform.8* + +%doc README COPYING Changelog + + +%changelog +* Fri Sep 15 2017 Than Ngo - 1.3.4-3 +- Related: #1478871 - correct bugzilla number in changelog + +* Fri Sep 15 2017 Than Ngo - 1.3.4-2 +- Related: #1457408 - add missing man pages + +* Thu Sep 14 2017 Than Ngo - 1.3.4-1 +- Resolves: #1457408 - Update to 1.3.4 +- Resolves: #1478871 - "lsslot -c mem" fails with segmentation fault + +* Wed Jun 07 2017 Dan Horák - 1.3.3-4 +- Resolves: #1459270 - mkvterm calls fail with "DLPAR slot operations are not supported" + +* Fri Jun 02 2017 Dan Horák - 1.3.3-3 +- Resolves: #1457885 - lsslot doesn't display the slot information + +* Tue Mar 21 2017 Sinny Kumari - 1.3.3-2 +- Related: #1380656 - Rebuild due to soname change in librtas package + +* Mon Jan 23 2017 Rafael Fonseca - 1.3.3-1 +- Resolves: #1380648 - Update to 1.3.3 + +* Tue Aug 30 2016 Rafael Fonseca - 1.3.2-2 +- Resolves: #1366512 - lparstat segfault if 'SPU' line in /proc/interrupts is + too long + +* Tue Jul 12 2016 Rafael Fonseca - 1.3.2-1 +- Resolves: #1355775 - Update 1.3.2 to incorporate various important fixes +- Drop deprecated patches. + +* Mon Jul 04 2016 Rafael Fonseca - 1.3.1-2 +- Resolves: #1347083 - lparstat doesn't report physc correctly. + +* Fri Apr 08 2016 Rafael Fonseca - 1.3.1-1 +- Resolves: #1275706 - [7.3 FEAT] powerpc-utils package update - ppc64/ppc64le +- Resolves: #1302728 - [LEGAL] License change in powerpc-utils 1.3.0 +- Resolves: #1334203 - Hotplug detach issue with Mellanox CX4 (SR-IOV and + dedicated) +- Resolves: #1263772 - drmgr command is not giving valid error message under + RHEL +- Updated upstream URL. +- Drop deprecated patches. + +* Tue Sep 08 2015 Jakub Čajka - 1.2.26-2 +- Resolves: #1260285 - chhwres command hungs when creating VNIC adapter on RHEL7.1 LE partition (powerpc-utils) + +* Thu Jun 25 2015 Jakub Čajka - 1.2.26-1 +- Resolves: #1182040 - [7.2 FEAT] powerpc-utils package update - ppc64/ppc64le + +* Fri Jun 19 2015 Jakub Čajka - 1.2.25-1 +- Resolves: #1182040 - [7.2 FEAT] powerpc-utils package update - ppc64/ppc64le +- Resolves: #1199348 - After migration of RHEL7.1 Little Endian lpar, RMC connection on HMC will be lost (LPM) +- Resolves: #1207823 - drmgr -R flag is not working (powerpc-utils) + + +* Thu Jan 08 2015 Jakub Čajka - 1.2.24-7 +- Related: #1179263 - reverted changes related to this bug + +* Tue Jan 06 2015 Jakub Čajka - 1.2.24-6 +- Related: #1179263 - fixed file permissions + +* Tue Jan 06 2015 Jakub Čajka - 1.2.24-5 +- Resolves: #1179263 - RHEL 7.1-LE LPAR: ppc64_cpu --threads-per-core gives wrong data when --smt value set + +* Fri Jan 02 2015 Jakub Čajka - 1.2.24-4 +- Resolves: #1175812 - powerpc-utils: rtas_dump showing some unwanted character + +* Tue Dec 09 2014 Jakub Čajka - 1.2.24-3 +- Resolves: #1172087 - snap fails +- snap removed, sosreport should be used instead + +* Fri Dec 05 2014 Jakub Čajka - 1.2.24-2 +- Resolves: #1170856 - Could not gather LMB information when doing Mem DLPAR on RHEL7.1 Alpha LE (powerpc-utils) + +* Thu Nov 27 2014 Jakub Čajka - 1.2.24-1 +- Resolves: #1167865 - CPU/Mem DLPAR failed on both RHEL7.1 Alpha BE and LE +- Rebase to 1.2.24 + +* Fri Nov 14 2014 Jakub Čajka - 1.2.23-2 +- Resolves: #1164147 - CVE-2014-4040 powerpc-utils: snap creates archives with fstab and yaboot.conf which may expose certain passwords [rhel-7.1] + +* Mon Nov 10 2014 Jakub Čajka - 1.2.23-1 +- Resolves: #1161552 - powerpc-utils package update for RHEL7.1 Beta + +* Tue Oct 14 2014 Jakub Čajka - 1.2.22-2 +- Resolves: #1152313 - STC820:Brazos:JMET:lisafp1:lisap05:RHEL7 Hung/Crashed while running htx ... + +* Thu Sep 04 2014 Jakub Čajka - 1.2.22-1 +- Related: #1088539 - [7.1 FEAT] powerpc-utils package update - ppc64 +- Rebase to 1.2.22 + +* Mon Aug 25 2014 Jakub Čajka - 1.2.21-1 +- Resolves: #1088539 - [7.1 FEAT] powerpc-utils package update - ppc64 +- Resolves: #1083221 - Validation Failure with Linux partitions - Inactive RMC ... +- Resolves: #1079246 - powerpc-utils: lsdevinfo does not handle path of device on full system lpar. +- Resolves: #1083791 - powerpc-utils: add support for hotplug of qemu pci virtio devices +- Resolves: #1124006 - powerpc-utils needs ppc64le added to ExclusiveArch + +* Wed Mar 12 2014 Karsten Hopp 1.2.18-9 +- fix parsing of the value supplied for the -s option +- Resolves: #1074629 +- fix wrong check of valid_platform() return value +- Resolves: #1074635 + +* Mon Mar 10 2014 Karsten Hopp 1.2.18-8 +- update display message when Power System FW entitlement expires +- Resolves: rhbz 1071555 + +* Mon Feb 17 2014 Jaromir Capik - 1.2.18-7 +- drmgr: Fixing addition of device nodes (#1064220) +- sys_ident: Adding support for P8 Systems (#1064484) +- Resolves: rhbz#1064220, rhbz#1064484 + +* Mon Feb 10 2014 Jaromir Capik - 1.2.18-6 +- drmgr: Fixing allocation failures & race when removing adapter (#1061179) +- drmgr: Fixing return code when running with --capabilities (#1061092) +- Fixing bogus date in the changelog +- Cleaning the spec +- Resolves: rhbz#1061179, rhbz#1061092 + +* Thu Jan 16 2014 Filip Kocina - 1.2.18-5 +- Resolves: #1054031 - snap command get hung. No response + +* Tue Jan 14 2014 Filip Kocina - 1.2.18-4 +- Resolves: #1043455 && #1039473 - nvram tool fails to decompress the data && ofpathname in RHEL7 doesn't handle virtio-blk disks + +* Fri Dec 27 2013 Daniel Mach - 1.2.18-3 +- Mass rebuild 2013-12-27 + +* Thu Nov 28 2013 Filip Kocina - 1.2.18-2 +- Resolves: #1030236 - update FW entitlement message terminology + +* Wed Sep 25 2013 Filip Kocina - 1.2.18-1 +- Resolves: #1011038 - updated to latest upstream 1.2.18 + +* Thu Sep 12 2013 Filip Kocina - 1.2.17-1 +- Resolves: #947179 - updated to latest upstream 1.2.17 && applying patch nvram + +* Wed Jun 26 2013 Tony Breeds - 1.2.16-2 +- drmgr: Check for rpadlpar_io module +- resolves: #972606 + +* Tue May 21 2013 Vasant Hegde - 1.2.16 +- Update to latest upstream 1.2.16 + +* Thu Feb 14 2013 Fedora Release Engineering - 1.2.15-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild + +* Wed Jan 16 2013 Karsten Hopp 1.2.15-1 +- update to 1.2.15 +- usysident/usysattn got moved to ppc64-diag package +- multipath ofpathname patch removed as it is upstream now + +* Tue Dec 18 2012 Filip Kocina 1.2.14-1 +- Resolves: #859222 - updated to latest upstream 1.2.14 + +* Thu Dec 13 2012 Karsten Hopp 1.2.12-4 +- Add multipath support to ofpathname for bug #884826 + +* Tue Sep 04 2012 Karsten Hopp 1.2.12-3 +- require powerpc-utils-python (#852326 comment 7) + +* Sat Jul 21 2012 Fedora Release Engineering - 1.2.12-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + +* Thu Mar 22 2012 Jiri Skala - 1.2.12-1 +- updated to latest upstream 1.2.12 + +* Sat Jan 14 2012 Fedora Release Engineering - 1.2.11-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild + +* Thu Nov 03 2011 Jiri Skala - 1.2.11-2 +- updated dependecy + +* Mon Oct 31 2011 Jiri Skala - 1.2.11-1 +- updated to latest upstream 1.2.11 +-fixes #749892 - powerpc-utils spec file missing dependency + +* Fri Aug 05 2011 Jiri Skala - 1.2.10-1 +- updated to latest upstream 1.2.10 + +* Wed Feb 09 2011 Fedora Release Engineering - 1.2.6-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild + +* Mon Jan 24 2011 Jiri Skala - 1.2.6-1 +- updated to latest upstream 1.2.6 +- removed amsvis man page (amsvis moved to powerpc-utils-python) +- added lparcfg man page - doc to /proc/ppc64/lparcfg + +* Thu Jun 24 2010 Roman Rakus - 1.2.2-14 +- Compile with -fno-strict-aliasing CFLAG +- linked nvsetenv man page to nvram man page +- Updated man page of ofpathname +- Updated amsstat script + +* Tue Jun 15 2010 Roman Rakus - 1.2.2-11 +- Correct the parameter handling of ppc64_cpu when setting the run-mode + +* Wed Jun 09 2010 Roman Rakus - 1.2.2-10 +- Added some upstream patches +- also bump release + +* Wed Jun 02 2010 Roman Rakus - 1.2.2-4 +- correct the parameter checking when attempting to set the run mode +- also bump release + +* Fri Mar 05 2010 Roman Rakus - 1.2.2-2 +- Removed deprecated init script and perl script + +* Thu Oct 29 2009 Stepan Kasal - 1.2.2-1 +- new upstream version +- amsvis removed, this package has no longer anything with python +- change the manual pages in the file list so that it does not depend on + particular compression used +- add patch for configure.ac on platforms with autoconf < 2.63 +- use standard %%configure/make in %%build + +* Mon Aug 17 2009 Roman Rakus - 1.2.0-1 +- Bump tu version 1.2.0 - powerpc-utils and powerpc-utils-papr get merged + +* Sun Jul 26 2009 Fedora Release Engineering - 1.1.3-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild + +* Mon Apr 06 2009 Roman Rakus - 1.1.3-1 +- new upstream version 1.1.3 + +* Tue Mar 03 2009 Roman Rakus - 1.1.2-1 +- new upstream version 1.1.2 + +* Thu Feb 26 2009 Fedora Release Engineering - 1.1.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild + +* Thu Feb 19 2009 Roman Rakus - 1.1.1-1 +- new upstream version 1.1.1 + +* Mon Feb 18 2008 Fedora Release Engineering - 1.0.6-3 +- Autorebuild for GCC 4.3 + +* Mon Dec 3 2007 David Woodhouse 1.0.6-2 +- Add --version to nvsetenv, for ybin compatibility + +* Fri Nov 23 2007 David Woodhouse 1.0.6-1 +- New package, split from ppc64-utils