From 37e5ab0c72076eab22014cb3612ed245d65f2146 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Nov 03 2016 05:46:04 +0000 Subject: import librtas-1.4.1-2.el7 --- diff --git a/.gitignore b/.gitignore index 6d4ab95..70b1b4e 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -SOURCES/librtas-1.3.13.tar.gz +SOURCES/librtas-1.4.1.tar.gz diff --git a/.librtas.metadata b/.librtas.metadata index e027eb0..75ffebd 100644 --- a/.librtas.metadata +++ b/.librtas.metadata @@ -1 +1 @@ -bc45fc7e3942437097a6e6f6d03503230fee72e8 SOURCES/librtas-1.3.13.tar.gz +afc6a102535cfc5bc65045a89e4ae2370fee68be SOURCES/librtas-1.4.1.tar.gz diff --git a/SOURCES/librtas-1.3.6-ln.patch b/SOURCES/librtas-1.3.6-ln.patch index f1714c5..4168293 100644 --- a/SOURCES/librtas-1.3.6-ln.patch +++ b/SOURCES/librtas-1.3.6-ln.patch @@ -1,55 +1,47 @@ -diff -up librtas-1.3.6/libofdt_src/Makefile.ln librtas-1.3.6/libofdt_src/Makefile ---- librtas-1.3.6/libofdt_src/Makefile.ln 2011-02-07 11:53:34.000000000 -0500 -+++ librtas-1.3.6/libofdt_src/Makefile 2011-08-11 06:45:39.948735397 -0400 -@@ -26,12 +26,12 @@ all: $(LIBOFDT_OBJS) $(LIBOFDT_HDRS) - install: - @$(call install_lib,$(LIBOFDT),$(DESTDIR)) - @$(call install_inc,$(LIBOFDT_SHIP_HDR),$(DESTDIR)) -- @ln -sf $(LIBOFDT) $(DESTDIR)/$(LIB_DIR)$(call is_lib64,$(LIBOFDT))/$(LIBOFDT_SONAME) -+ @ln -sf $(LIBOFDT) $(DESTDIR)/$(LIB_DIR)/$(LIBOFDT_SONAME) - - uninstall: - @$(call uninstall_lib,$(LIBOFDT),$(DESTDIR)) - @$(call uninstall_inc,$(LIBOFDT_SHIP_HDR),$(DESTDIR)) -- @rm -f $(DESTDIR)/$(LIB_DIR)$(call is_lib64,$(LIBOFDT))/$(LIBOFDT_SONAME) -+ @rm -f $(DESTDIR)/$(LIB_DIR)/$(LIBOFDT_SONAME) - - clean: - @echo "Cleaning up $(WORK_DIR) files..." -diff -up librtas-1.3.6/librtasevent_src/Makefile.ln librtas-1.3.6/librtasevent_src/Makefile ---- librtas-1.3.6/librtasevent_src/Makefile.ln 2011-02-07 11:53:34.000000000 -0500 -+++ librtas-1.3.6/librtasevent_src/Makefile 2011-08-11 06:47:03.377757115 -0400 -@@ -27,13 +27,12 @@ all: $(LIBRE_OBJS) $(HEADERS) +diff -upr librtas-1.4.1/librtasevent_src/Makefile librtas-1.4.1p/librtasevent_src/Makefile +--- librtas-1.4.1/librtasevent_src/Makefile 2016-03-28 21:59:38.000000000 +0530 ++++ librtas-1.4.1p/librtasevent_src/Makefile 2016-04-29 19:05:27.550567796 +0530 +@@ -39,14 +39,14 @@ all: $(LIBRE_OBJS) $(HEADERS) install: @$(call install_lib,$(LIBRE),$(DESTDIR)) @$(call install_inc,$(LIBRE_HDRS),$(DESTDIR)) - @ln -sf $(LIBRE) $(DESTDIR)/$(LIB_DIR)$(call is_lib64,$(LIBRE))/$(LIBRE_SONAME) - @ln -sf $(LIBRE) $(DESTDIR)/$(LIB_DIR)$(call is_lib64,$(LIBRE))/$(LIBRE_SONAME).1 + @ln -sf $(LIBRE) $(DESTDIR)/$(LIB_DIR)/$(LIBRE_SONAME) ++ @ln -sf $(LIBRE) $(DESTDIR)/$(LIB_DIR)/$(LIBRE_SONAME).1 uninstall: @$(call uninstall_lib,$(LIBRE),$(DESTDIR)) @$(call uninstall_inc,$(LIBRE_HDRS),$(DESTDIR)) - @rm -f $(DESTDIR)/$(LIB_DIR)$(call is_lib64,$(LIBRE))/$(LIBRE_SONAME) +- @rm -f $(DESTDIR)/$(LIB_DIR)$(call is_lib64,$(LIBRE))/$(LIBRE_SONAME).1 + @rm -f $(DESTDIR)/$(LIB_DIR)/$(LIBRE_SONAME) ++ @rm -f $(DESTDIR)/$(LIB_DIR)/$(LIBRE_SONAME).1 clean: @echo "Cleaning up $(WORK_DIR) files..." -diff -up librtas-1.3.6/librtas_src/Makefile.ln librtas-1.3.6/librtas_src/Makefile ---- librtas-1.3.6/librtas_src/Makefile.ln 2011-02-07 11:53:34.000000000 -0500 -+++ librtas-1.3.6/librtas_src/Makefile 2011-08-11 06:45:39.950735397 -0400 -@@ -32,12 +32,12 @@ librtas_static: $(LIBRTAS_OBJS) $(HEADER +Only in librtas-1.4.1p/librtasevent_src: Makefile.orig +diff -upr librtas-1.4.1/librtas_src/Makefile librtas-1.4.1p/librtas_src/Makefile +--- librtas-1.4.1/librtas_src/Makefile 2016-03-28 21:59:38.000000000 +0530 ++++ librtas-1.4.1p/librtas_src/Makefile 2016-04-29 19:05:27.550567796 +0530 +@@ -44,14 +44,14 @@ librtas_static: $(LIBRTAS_OBJS) $(HEADER install: @$(call install_lib,$(LIBRTAS),$(DESTDIR)) @$(call install_inc,$(HEADERS),$(DESTDIR)) - @ln -sf $(LIBRTAS) $(DESTDIR)/$(LIB_DIR)$(call is_lib64,$(LIBRTAS))/$(LIBRTAS_SONAME) +- @ln -sf $(LIBRTAS) $(DESTDIR)/$(LIB_DIR)$(call is_lib64,$(LIBRTAS))/$(LIBRTAS_SONAME).1 + @ln -sf $(LIBRTAS) $(DESTDIR)/$(LIB_DIR)/$(LIBRTAS_SONAME) ++ @ln -sf $(LIBRTAS) $(DESTDIR)/$(LIB_DIR)/$(LIBRTAS_SONAME).1 uninstall: @$(call uninstall_lib,$(LIBRTAS),$(DESTDIR)) - @$(call uninstall_inc,$(LIBRTAS_HDR),$(DESTDIR)) +- @$(call uninstall_inc,$(HEADERS),$(DESTDIR)) - @rm -f $(DESTDIR)/$(LIB_DIR)$(call is_lib64,$(LIBRTAS))/$(LIBRTAS_SONAME) +- @rm -f $(DESTDIR)/$(LIB_DIR)$(call is_lib64,$(LIBRTAS))/$(LIBRTAS_SONAME).1 ++ @$(call uninstall_inc,$(LIBRTAS_HDR),$(DESTDIR)) + @rm -f $(DESTDIR)/$(LIB_DIR)/$(LIBRTAS_SONAME) ++ @rm -f $(DESTDIR)/$(LIB_DIR)/$(LIBRTAS_SONAME).1 clean: @echo "Cleaning up $(WORK_DIR) files..." +Only in librtas-1.4.1p/librtas_src: Makefile.orig diff --git a/SOURCES/librtas-1.4.1-eeh_tool.patch b/SOURCES/librtas-1.4.1-eeh_tool.patch new file mode 100644 index 0000000..ea5463e --- /dev/null +++ b/SOURCES/librtas-1.4.1-eeh_tool.patch @@ -0,0 +1,53 @@ +From 7f841902eb50ca77c3aa884e3fd924c2bbd817ca Mon Sep 17 00:00:00 2001 +From: Vasant Hegde +Date: Mon, 13 Jun 2016 09:33:57 -0400 +Subject: [PATCH] librtas: Fix endianess issue in errinjct rtas call + +Unlike other RTAS calls, first output parameter of "ibm,open-errinjct" +is "open token", not status value. + +With commit ee457b1c, we endedup calling be32toh twice for otoken and +didn't convert status from BE to host format. + +This patch fixes above issue. + +Fixes: ee457b1c (librtas: consolidate common actions in making a rtas call) + +Signed-off-by: Vasant Hegde +Signed-off-by: Nathan Fontenot +Reviewed-by: Tyrel Datwyler +--- + librtas_src/syscall_calls.c | 11 ++++++++--- + 1 file changed, 8 insertions(+), 3 deletions(-) + +diff --git a/librtas_src/syscall_calls.c b/librtas_src/syscall_calls.c +index cb668dc..a194e4b 100644 +--- a/librtas_src/syscall_calls.c ++++ b/librtas_src/syscall_calls.c +@@ -466,15 +466,20 @@ int rtas_errinjct_close(int otoken) + */ + int rtas_errinjct_open(int *otoken) + { +- __be32 be_otoken; ++ __be32 be_status; + int rc, status; + + rc = sanity_check(); + if (rc) + return rc; + +- rc = rtas_call("ibm,open-errinjct", 0, 2, &be_otoken, &status); +- *otoken = be32toh(be_otoken); ++ /* ++ * Unlike other RTAS calls, here first output parameter is otoken, ++ * not status. rtas_call converts otoken to host endianess. We ++ * have to convert status parameter. ++ */ ++ rc = rtas_call("ibm,open-errinjct", 0, 2, otoken, &be_status); ++ status = be32toh(be_status); + + dbg("(%p) = %d, %d\n", otoken, rc ? rc : status, *otoken); + return rc ? rc : status; +-- +2.4.11 + diff --git a/SOURCES/librtas-papr.patch b/SOURCES/librtas-papr.patch deleted file mode 100644 index 1ae37fa..0000000 --- a/SOURCES/librtas-papr.patch +++ /dev/null @@ -1,50 +0,0 @@ -From 4e46c718f42bf05e797c7fcfdd6cfc2a21fb4c91 Mon Sep 17 00:00:00 2001 -From: Tyrel Datwyler -Date: Wed, 7 Jan 2015 14:26:15 -0500 -Subject: [PATCH] PAPR requires that the status word is the first parameter in - the return buffer for rtas calls. Due to this requirement the librtas - sc_rtas_call function always performs a be32toh operation on the first - parameter in the return buffer. However, the ibm,open-errinjct rtas is - special in that its return buffer is switched. The "Open Token" is the first - return parameter while the "Status" word is second. - -This patch fixes this special case in the sc_errinjct_open function such -that the byteswapping of "status" and "otoken" are handled correctly. - -Signed-off-by: Tyrel Datwyler ---- - librtas_src/syscall_calls.c | 8 ++++---- - 1 file changed, 4 insertions(+), 4 deletions(-) - -diff --git a/librtas_src/syscall_calls.c b/librtas_src/syscall_calls.c -index dc52370..a81c25c 100644 ---- a/librtas_src/syscall_calls.c -+++ b/librtas_src/syscall_calls.c -@@ -493,20 +493,20 @@ int sc_errinjct_close(int token, int otoken) - int sc_errinjct_open(int token, int *otoken) - { - uint64_t elapsed = 0; -- __be32 be_otoken; -+ __be32 be_status; - int status; - int rc; - - do { -- rc = sc_rtas_call(token, 0, 2, &be_otoken, &status); -+ rc = sc_rtas_call(token, 0, 2, otoken, &be_status); - if (rc) - return rc; - -+ status = be32toh(be_status); -+ - rc = handle_delay(status, &elapsed); - } while (rc == CALL_AGAIN); - -- *otoken = be32toh(be_otoken); -- - dbg1("(%p) = %d, %d\n", otoken, rc ? rc : status, *otoken); - return rc ? rc : status; - } --- -1.9.3 - diff --git a/SPECS/librtas.spec b/SPECS/librtas.spec index 839aa6b..42e2e39 100644 --- a/SPECS/librtas.spec +++ b/SPECS/librtas.spec @@ -1,18 +1,16 @@ Summary: Libraries to provide access to RTAS calls and RTAS events Name: librtas -Version: 1.3.13 +Version: 1.4.1 Release: 2%{?dist} URL: http://librtas.ozlabs.org -License: CPL +License: LGPL Group: System Environment/Libraries -Source: http://downloads.sourceforge.net/project/%{name}/%{name}-%{version}.tar.gz +Source: https://github.com/nfont/librtas/archive/%{name}-%{version}.tar.gz #Fedora specific patch Patch0: %{name}-1.3.4-libdir.patch Patch1: %{name}-1.3.6-ln.patch -# Resolves #1184466 -Patch2: %{name}-papr.patch - +Patch2: %{name}-1.4.1-eeh_tool.patch Obsoletes: librtas(ppc) ExclusiveArch: ppc64 ppc64le @@ -37,10 +35,10 @@ The librtas-devel packages contains the header files necessary for developing programs using librtas. %prep -%setup +%setup -q %patch0 -p1 -b .libdir %patch1 -p1 -b .ln -%patch2 -p1 -b .papr +%patch2 -p1 -b .ln find . -name "*.so.*" -print -delete @@ -64,25 +62,30 @@ mkdir -p %{buildroot}/%{_libdir} %{__rm} -rf %{buildroot} %files -%defattr(-,root,root,-) -%doc COPYRIGHT README Changelog +%doc COPYING.LESSER README Changelog %{_libdir}/librtas.so.%{version} +%{_libdir}/librtas.so.1 %{_libdir}/librtasevent.so.%{version} -%{_libdir}/libofdt.so.%{version} +%{_libdir}/librtasevent.so.1 %files devel -%defattr(-,root,root,-) %{_libdir}/librtas.so %{_libdir}/librtasevent.so %{_includedir}/librtas.h %{_includedir}/librtasevent.h %{_includedir}/librtasevent_v4.h %{_includedir}/librtasevent_v6.h -%{_includedir}/common.h -%{_includedir}/libofdt.h -%{_libdir}/libofdt.so %changelog +* Mon Jun 27 2016 Sinny Kumari 1.4.1-2 +- Resolves: #1349878 - EEH_Tool fails to inject error with librtas-1.4.1-1.ppc64le file + +* Thu Apr 28 2016 Sinny Kumari 1.4.1-1 +- Resolves: #1182039 - librtas package update +- Resolves: #1302727 - License change from CPL to LGPL +- Resolves: #1300542 - If mmap() of /dev/mem fails, librtas does not release /run/lock/LCK. +- Removed patch librtas-papr.patch, changes included in upstream release 1.3.14 + * Mon Jun 08 2015 Jakub Čajka 1.3.13-2 - Resolves: #1184466 - errinct failed with error " errinjct: RTAS: ioa-bus-error: Argument error (-3)"