diff --git a/.gitignore b/.gitignore index aa26296..5cd427d 100644 --- a/.gitignore +++ b/.gitignore @@ -11,3 +11,4 @@ librtas-1.3.4.tar.gz /v2.0.0.tar.gz /v2.0.1.tar.gz /v2.0.2.tar.gz +/librtas-2.0.6.tar.gz diff --git a/.librtas.metadata b/.librtas.metadata new file mode 100644 index 0000000..fcbe879 --- /dev/null +++ b/.librtas.metadata @@ -0,0 +1 @@ +4c929de98c54b7b72bfb4d82ffe22243ecf722bf librtas-2.0.6.tar.gz diff --git a/librtas-2.0.1-libversion.patch b/librtas-2.0.1-libversion.patch deleted file mode 100644 index 3cf27ec..0000000 --- a/librtas-2.0.1-libversion.patch +++ /dev/null @@ -1,27 +0,0 @@ -From 2c954feaa59657fd8a13cf6e7208c4bf8c46f0dc Mon Sep 17 00:00:00 2001 -From: Sinny Kumari -Date: Sun, 19 Mar 2017 00:21:22 +0530 -Subject: [PATCH] Update library version to 2.0.1 to match with release version - ---- - Makefile.am | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) - -diff --git a/Makefile.am b/Makefile.am -index e02d007..5f819c3 100644 ---- a/Makefile.am -+++ b/Makefile.am -@@ -19,7 +19,9 @@ AM_CFLAGS = -I$(top_srcdir)/librtas_src/ -I$(top_srcdir)/librtasevent_src/ - - library_includedir=$(includedir) - --LIBRTAS_LIBRARY_VERSION = 2:0:0 -+# CURRENT:REVISION:AGE(C:R:A) -+# For calculating version number of library, formula used is (C - A).(A).(R) -+LIBRTAS_LIBRARY_VERSION = 2:2:0 - - lib_LTLIBRARIES += librtas.la - librtas_la_LDFLAGS = -version-info $(LIBRTAS_LIBRARY_VERSION) --- -2.9.3 - diff --git a/librtas-2.0.2-coverity.patch b/librtas-2.0.2-coverity.patch deleted file mode 100644 index 5a24a3e..0000000 --- a/librtas-2.0.2-coverity.patch +++ /dev/null @@ -1,141 +0,0 @@ -diff -up librtas-2.0.2/librtasevent_src/get_rtas_event.c.me librtas-2.0.2/librtasevent_src/get_rtas_event.c ---- librtas-2.0.2/librtasevent_src/get_rtas_event.c.me 2021-03-25 11:26:19.754142871 +0100 -+++ librtas-2.0.2/librtasevent_src/get_rtas_event.c 2021-03-25 11:29:24.322686995 +0100 -@@ -29,6 +29,10 @@ - #include "librtasevent.h" - #include "rtas_event.h" - -+#if __GNUC__ >= 9 -+#pragma GCC diagnostic ignored "-Waddress-of-packed-member" -+#endif -+ - /** - * rtas_copy - * @brief front end for common memcpy calls -diff -up librtas-2.0.2/librtasevent_src/rtas_post.c.me librtas-2.0.2/librtasevent_src/rtas_post.c ---- librtas-2.0.2/librtasevent_src/rtas_post.c.me 2021-03-25 11:52:35.489805806 +0100 -+++ librtas-2.0.2/librtasevent_src/rtas_post.c 2021-03-25 12:11:38.817324108 +0100 -@@ -139,6 +139,7 @@ print_re_post_scn(struct scn_header *shd - len += rtas_print("Self-test error in firmware extended " - "diagnostics.\n"); - -+ /* coverity[invalid_type : FALSE] */ - len += rtas_print("POST Error Code: %x\n", post->err_code); - len += rtas_print("Firmware Revision Code: %x\n", post->firmware_rev); - -diff -up librtas-2.0.2/librtasevent_src/rtas_v6_misc.c.me librtas-2.0.2/librtasevent_src/rtas_v6_misc.c ---- librtas-2.0.2/librtasevent_src/rtas_v6_misc.c.me 2021-03-25 11:29:57.445143562 +0100 -+++ librtas-2.0.2/librtasevent_src/rtas_v6_misc.c 2021-03-25 11:30:05.924260442 +0100 -@@ -28,6 +28,10 @@ - #include "librtasevent.h" - #include "rtas_event.h" - -+#if __GNUC__ >= 9 -+#pragma GCC diagnostic ignored "-Waddress-of-packed-member" -+#endif -+ - /** - * months - * @brief array of month strings -diff -up librtas-2.0.2/librtas_src/syscall_calls.c.me librtas-2.0.2/librtas_src/syscall_calls.c ---- librtas-2.0.2/librtas_src/syscall_calls.c.me 2021-03-25 11:34:20.691775299 +0100 -+++ librtas-2.0.2/librtas_src/syscall_calls.c 2021-03-25 11:49:03.830951225 +0100 -@@ -886,7 +886,7 @@ int rtas_platform_dump(uint64_t dump_tag - uint32_t next_hi, next_lo; - uint32_t bytes_hi, bytes_lo; - uint32_t dump_tag_hi, dump_tag_lo; -- void *kernbuf; -+ void *kernbuf = NULL; - int rc, status; - - rc = sanity_check(); -@@ -927,6 +927,7 @@ int rtas_platform_dump(uint64_t dump_tag - if (buffer && (rc == 0)) - memcpy(buffer, kernbuf, length); - -+ /* coverity[uninit_use : FALSE] */ - if (kernbuf) - (void)rtas_free_rmo_buffer(kernbuf, kernbuf_pa, length); - -diff -up librtas-2.0.2/librtas_src/syscall_rmo.c.me librtas-2.0.2/librtas_src/syscall_rmo.c ---- librtas-2.0.2/librtas_src/syscall_rmo.c.me 2021-03-25 11:49:26.704266218 +0100 -+++ librtas-2.0.2/librtas_src/syscall_rmo.c 2021-03-25 12:47:12.108229574 +0100 -@@ -247,6 +247,7 @@ static int get_phys_region(size_t size, - if (bits == 0ll) { - if (acquire_file_lock(i, n_pages) == 0) { - set_bits(i, i + n_pages - 1, -+ /* coverity[overflow_before_widen : FALSE] */ - (1 << n_pages) - 1, - &wa_config.pages_map); - addr = kregion->addr + (i * PAGE_SIZE); -@@ -289,6 +290,7 @@ static int release_phys_region(uint32_t - - bits = get_bits(first_page, first_page + n_pages - 1, - wa_config.pages_map); -+ /* coverity[overflow_before_widen : FALSE] */ - if (bits != ((1 << n_pages) - 1)) { - dbg("Invalid region [0x%x, 0x%zx]\n", phys_addr, size); - return RTAS_IO_ASSERT; -diff --git a/librtasevent_src/rtas_srcfru.c b/librtasevent_src/rtas_srcfru.c -index 23c8584..a2eac9a 100644 ---- a/librtasevent_src/rtas_srcfru.c -+++ b/librtasevent_src/rtas_srcfru.c -@@ -74,13 +74,13 @@ parse_fru_id_scn(struct rtas_event *re) - re->offset += RE_FRU_HDR_SZ; - - if (fruid_has_part_no(fru_id)) { -- strcpy(fru_id->part_no, RE_EVENT_OFFSET(re)); -- re->offset += 8; -+ rtas_copy(fru_id->part_no, re, 7); -+ fru_id->part_no[7] = '\0'; - } - - if (fruid_has_proc_id(fru_id)) { -- strcpy(fru_id->procedure_id, RE_EVENT_OFFSET(re)); -- re->offset += 8; -+ rtas_copy(fru_id->procedure_id, re, 7); -+ fru_id->procedure_id[7] = '\0'; - } - - if (fruid_has_ccin(fru_id)) { -@@ -238,9 +238,10 @@ parse_src_scn(struct rtas_event *re) - - add_re_scn(re, src, re_scn_id(&src_raw->v6hdr)); - -- if (!src_subscns_included(src)) -+ if (!src_subscns_included(src)) { -+ free (src_raw); - return 0; -- -+ } - rtas_copy( (char *) src_raw + RE_SRC_SCN_SZ + 4, re, RE_SRC_SUBSCN_SZ); - - src->subscn_id = src_raw->subscn_id; -@@ -251,6 +252,7 @@ parse_src_scn(struct rtas_event *re) - total_len = RE_SRC_SUBSCN_SZ; - - last_fru = NULL; -+ free(src_raw); - - do { - uint32_t fru_len, fru_end; -@@ -288,6 +290,7 @@ parse_src_scn(struct rtas_event *re) - - if (cur_fruhdr == NULL) { - cleanup_rtas_event(re); -+ free(fru); - return -1; - } - -diff --git a/librtasevent_src/rtas_vend.c b/librtasevent_src/rtas_vend.c -index 6fa717e..2814726 100644 ---- a/librtasevent_src/rtas_vend.c -+++ b/librtasevent_src/rtas_vend.c -@@ -116,6 +116,7 @@ parse_vend_errlog_scn(struct rtas_event *re) - ve->vendor_data = malloc(ve->vendor_data_sz); - if (ve->vendor_data == NULL) { - errno = ENOMEM; -+ free(ve); - return -1; - } - diff --git a/librtas.spec b/librtas.spec index 674acf0..910f41a 100644 --- a/librtas.spec +++ b/librtas.spec @@ -1,19 +1,16 @@ Summary: Libraries to provide access to RTAS calls and RTAS events Name: librtas -Version: 2.0.2 -Release: 14%{?dist} -URL: https://github.com/nfont/librtas +Version: 2.0.6 +Release: 1%{?dist} +URL: https://github.com/ibm-power-utilities/librtas License: LGPLv2+ -Source0: https://github.com/nfont/librtas/archive/v%{version}.tar.gz +Source0: https://github.com/ibm-power-utilities/%{name}/archive/v%{version}/%{name}-%{version}.tar.gz BuildRequires: autoconf BuildRequires: libtool BuildRequires: make -Patch0: librtas-2.0.1-libversion.patch -Patch1: librtas-2.0.2-coverity.patch - ExclusiveArch: %{power64} %description @@ -40,7 +37,7 @@ developing programs using librtas. %build ./autogen.sh %configure --disable-silent-rules --disable-static -%make_build +%make_build CFLAGS="$CFLAGS" %install %make_install @@ -61,13 +58,15 @@ rm -f %{buildroot}/%{_docdir}/librtas/* %files devel %{_libdir}/librtas.so %{_libdir}/librtasevent.so -%{_libdir}/pkgconfig/librtas.pc %{_includedir}/librtas.h %{_includedir}/librtasevent.h %{_includedir}/librtasevent_v4.h %{_includedir}/librtasevent_v6.h %changelog +* Thu May 02 2024 Than Ngo - 2.0.6-1 +- Resolves: RHEL-10566, use lockdown-compatible ABI when available + * Wed Feb 09 2022 Than Ngo - 2.0.2-14 - Resolves: #2039517, add librtas-devel to compose diff --git a/sources b/sources index b8413ae..a82f814 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (v2.0.2.tar.gz) = 112d355bc486657289a186d9f1b8c576af55422f1527259a0cd680c07d6fa787aef2dc0cb6322721dc4aa1c5bd1de669f5c4d05e6a07de65262e9e3d4d0283c7 +SHA512 (librtas-2.0.6.tar.gz) = ad2e8b4c8e32bae708e5243625eaa63023f93d23eaa4d6675c46eb68766abcaa90f9555d6a3c79d2a564fad132d35a8afc4035d44c76a63c64dcb3b25e15a0c4