Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package librtas for openSUSE:Factory checked in at 2023-01-25 17:42:52 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/librtas (Old) and /work/SRC/openSUSE:Factory/.librtas.new.32243 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "librtas" Wed Jan 25 17:42:52 2023 rev:43 rq:1060885 version:2.0.4 Changes: -------- --- /work/SRC/openSUSE:Factory/librtas/librtas.changes 2022-01-13 23:20:47.384021899 +0100 +++ /work/SRC/openSUSE:Factory/.librtas.new.32243/librtas.changes 2023-01-25 17:50:09.846301208 +0100 @@ -1,0 +2,15 @@ +Wed Jan 25 09:14:32 UTC 2023 - Michal Suchanek <msucha...@suse.com> + +- Update to version 2.0.4 (jsc#PED-554) + - fix possible call to munmap with garbage value +- Refresh librtas.fix_doc_path.patch + +------------------------------------------------------------------- +Fri Jan 20 15:06:16 UTC 2023 - Michal Suchanek <msucha...@suse.com> + +- Update to version 2.0.3 +- Remove upstreamed patch + - librtasevent-Fix-memory-page-address-print-issue.patch +- Refresh spec file + +------------------------------------------------------------------- Old: ---- librtas-2.0.2.tar.gz librtas-doc.changes librtasevent-Fix-memory-page-address-print-issue.patch New: ---- librtas-2.0.4.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ librtas-doc.spec ++++++ --- /var/tmp/diff_new_pack.EwW04d/_old 2023-01-25 17:50:10.318303729 +0100 +++ /var/tmp/diff_new_pack.EwW04d/_new 2023-01-25 17:50:10.322303750 +0100 @@ -1,7 +1,7 @@ # # spec file for package librtas-doc # -# Copyright (c) 2022 SUSE LLC +# Copyright (c) 2023 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -17,43 +17,40 @@ Name: librtas-doc -Version: 2.0.2 +Version: 2.0.4 Release: 0 -BuildRequires: autoconf -BuildRequires: automake -BuildRequires: doxygen -BuildRequires: fdupes -BuildRequires: libtool Summary: Documents for librtas License: LGPL-2.1-or-later Group: Documentation/Other -ExclusiveArch: ppc ppc64 ppc64le URL: https://github.com/ibm-power-utilities/librtas Source0: https://github.com/ibm-power-utilities/librtas/archive/v%{version}.tar.gz#/librtas-%{version}.tar.gz Patch0: librtas.fix_doc_path.patch -Patch1: librtasevent-Fix-memory-page-address-print-issue.patch +BuildRequires: autoconf +BuildRequires: automake +BuildRequires: doxygen +BuildRequires: fdupes +BuildRequires: libtool +ExclusiveArch: ppc ppc64 ppc64le %description This package provides librtas documentation %prep -%setup -n librtas-%{version} -%autopatch -p1 +%autosetup -p1 -n librtas-%{version} %build ./autogen.sh %configure -make CFLAGS="%optflags -fPIC -g -I $PWD/librtasevent_src" LIB_DIR="%{_libdir}" %{?_smp_mflags} +%make_build CFLAGS="%{optflags} -fPIC -g -I $PWD/librtasevent_src" LIB_DIR="%{_libdir}" %install rm -rf doc/*/latex -make install DESTDIR=%buildroot LIB_DIR="%{_libdir}" -rm -rf %buildroot/%_libdir -rm -rf %buildroot/%_includedir -%fdupes %buildroot/%_docdir +make install DESTDIR=%{buildroot} LIB_DIR="%{_libdir}" +rm -rf %{buildroot}/%{_libdir} +rm -rf %{buildroot}/%{_includedir} +%fdupes %{buildroot}/%{_docdir} %files -%defattr(-, root, root) %doc %{_docdir}/librtas %changelog ++++++ librtas.spec ++++++ --- /var/tmp/diff_new_pack.EwW04d/_old 2023-01-25 17:50:10.346303878 +0100 +++ /var/tmp/diff_new_pack.EwW04d/_new 2023-01-25 17:50:10.350303900 +0100 @@ -1,7 +1,7 @@ # # spec file for package librtas # -# Copyright (c) 2022 SUSE LLC +# Copyright (c) 2023 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -17,22 +17,20 @@ %define sover 2 - Name: librtas -Version: 2.0.2 +Version: 2.0.4 Release: 0 Summary: Libraries to provide access to RTAS calls and RTAS events License: LGPL-2.1-or-later Group: System/Libraries -ExclusiveArch: ppc ppc64 ppc64le URL: https://github.com/ibm-power-utilities/librtas -BuildRequires: autoconf -BuildRequires: automake -BuildRequires: libtool Source0: https://github.com/ibm-power-utilities/librtas/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz Source1: baselibs.conf Patch0: librtas.fix_doc_path.patch -Patch1: librtasevent-Fix-memory-page-address-print-issue.patch +BuildRequires: autoconf +BuildRequires: automake +BuildRequires: libtool +ExclusiveArch: ppc ppc64 ppc64le %description The librtas shared library provides userspace with an interface through @@ -47,7 +45,7 @@ %package devel Summary: Devel librtas files Group: Development/Libraries/C and C++ -BuildRequires: pkg-config +BuildRequires: pkgconfig Requires: %{name}%{sover} = %{version} %description devel @@ -76,47 +74,42 @@ contents of RTAS events. %prep -%setup -q -%autopatch -p1 +%autosetup -p1 %build %global _lto_cflags %{_lto_cflags} -ffat-lto-objects ./autogen.sh %configure -make CFLAGS="%optflags -fPIC -g -I $PWD/librtasevent_src" LIB_DIR="%{_libdir}" %{?_smp_mflags} +%make_build CFLAGS="%{optflags} -fPIC -g -I $PWD/librtasevent_src" LIB_DIR="%{_libdir}" %install rm -rf doc/*/latex -make install DESTDIR=%buildroot LIB_DIR="%{_libdir}" +make install DESTDIR=%{buildroot} LIB_DIR="%{_libdir}" # documents are in -doc subpackage -rm -rf %buildroot/%_docdir -/sbin/ldconfig -n %buildroot%{_libdir} +rm -rf %{buildroot}/%{_docdir} +/sbin/ldconfig -n %{buildroot}%{_libdir} chmod -x %{buildroot}%{_libdir}/*.a -rm %{buildroot}/%{_libdir}/*.la +find %{buildroot} -type f -name "*.la" -delete -print %post -n %{name}%{sover} -p /sbin/ldconfig - %postun -n %{name}%{sover} -p /sbin/ldconfig %files -n %{name}%{sover} -%defattr(-, root, root) -%doc COPYING.LESSER Changelog README +%license COPYING.LESSER +%doc Changelog README %{_libdir}/lib*.so.* %files devel -%defattr(-, root, root) -%doc COPYING.LESSER +%license COPYING.LESSER %{_libdir}/librtasevent.so %{_libdir}/librtas.so %{_includedir}/librtas.h %{_includedir}/librtasevent.h %{_includedir}/librtasevent_v4.h %{_includedir}/librtasevent_v6.h -%{_libdir}/pkgconfig/*.pc %files devel-static -%defattr(-,root,root) -%doc COPYING.LESSER +%license COPYING.LESSER %{_libdir}/librtas.a %{_libdir}/librtasevent.a ++++++ librtas-2.0.2.tar.gz -> librtas-2.0.4.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/librtas-2.0.2/.github/problem-matchers/compiler-source.json new/librtas-2.0.4/.github/problem-matchers/compiler-source.json --- old/librtas-2.0.2/.github/problem-matchers/compiler-source.json 1970-01-01 01:00:00.000000000 +0100 +++ new/librtas-2.0.4/.github/problem-matchers/compiler-source.json 2023-01-24 19:08:58.000000000 +0100 @@ -0,0 +1,17 @@ +{ + "problemMatcher": [ + { + "owner": "gcc-problem-matcher", + "pattern": [ + { + "regexp": "^(.*?):(\\d+):(\\d*):?\\s+(?:fatal\\s+)?(warning|error):\\s+(.*)$", + "file": 1, + "line": 2, + "column": 3, + "severity": 4, + "message": 5 + } + ] + } + ] +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/librtas-2.0.2/.github/workflows/main.yml new/librtas-2.0.4/.github/workflows/main.yml --- old/librtas-2.0.2/.github/workflows/main.yml 1970-01-01 01:00:00.000000000 +0100 +++ new/librtas-2.0.4/.github/workflows/main.yml 2023-01-24 19:08:58.000000000 +0100 @@ -0,0 +1,47 @@ +name: CI + +# Controls when the workflow will run. +on: + # This allows the build to be triggered manually via the github UI. + workflow_dispatch: + + # Push to any branch + push: + + # Any pull request + pull_request: + +jobs: + build: + runs-on: ubuntu-22.04 + + strategy: + matrix: + host: [powerpc-linux-gnu, powerpc64-linux-gnu, powerpc64le-linux-gnu, x86_64-linux-gnu] + + steps: + - uses: actions/checkout@v2 + + - name: Register problem matchers + run: | + echo "::add-matcher::.github/problem-matchers/compiler-source.json" + + - name: Install cross compiler + if: matrix.host != 'x86_64-linux-gnu' + run: | + sudo apt update + sudo apt install -y gcc-${{ matrix.host }} + + - name: autogen + run: ./autogen.sh + + - name: configure + run: ./configure --host=${{ matrix.host }} CFLAGS='-Wall -Werror -O2 -g' + + - name: make + run: make V=1 + + - name: distcheck + run: | + make distcheck V=1 DISTCHECK_CONFIGURE_FLAGS=--host=${{ matrix.host }} + file .libs/librtas.so* diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/librtas-2.0.2/.gitignore new/librtas-2.0.4/.gitignore --- old/librtas-2.0.2/.gitignore 2018-06-15 01:49:01.000000000 +0200 +++ new/librtas-2.0.4/.gitignore 2023-01-24 19:08:58.000000000 +0100 @@ -1,69 +1,35 @@ -# -# NOTE! Don't add files that are generated in specific -# subdirectories here. Add them in the ".gitignore" file -# in that subdirectory instead. -# -# NOTE! Please use 'git ls-files -i --exclude-standard' -# command after changing this file, to see if there are -# any tracked files which get ignored after the change. -# -# Normal rules -# -.* -*.o -*.o.* -*.a -*.s -*.so -*.so.dbg -*.mod.c -*.i -*.order -*.gz -*.bz2 -*.lzma -*.zip -*.lzo -*.patch -*.gcno - -# -# Build files -# +# Build outputs at top level +/Makefile +/Makefile.in /aclocal.m4 /autom4te.cache/ -/config/ +/config.h +/config.h.in /config.log /config.status +/config/ /configure -/Makefile -/Makefile.in +/librtas-2.*.tar.* /librtas.spec -/librtas_src/Makefile -/librtas_src/Makefile.in -/librtasevent_src/Makefile -/librtasevent_src/Makefile.in - -# -# git files that we don't want to ignore even it they are dot-files -# -!.gitignore - -# -# Generated include files -# -include/config -include/linux/version.h -include/generated - -# stgit generated dirs -patches-* +/libtool +/m4/libtool.m4 +/m4/lt~obsolete.m4 +/m4/ltoptions.m4 +/m4/ltsugar.m4 +/m4/ltversion.m4 +/stamp-h1 + +# Build outputs that appear in subdirectories +*.la +*.lo +*.o +.deps/ +.dirstamp +.libs/ -# quilt's files -patches -series +# Below: miscellaneous outputs from external utilities, for convenience -# cscope files +# cscope cscope.* ncscope.* @@ -71,12 +37,8 @@ tags TAGS -# gnu global files +# gnu global GPATH GRTAGS GSYMS GTAGS - -*.orig -*~ -\#*# diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/librtas-2.0.2/Changelog new/librtas-2.0.4/Changelog --- old/librtas-2.0.2/Changelog 2018-06-15 01:49:01.000000000 +0200 +++ new/librtas-2.0.4/Changelog 2023-01-24 19:08:58.000000000 +0100 @@ -1,3 +1,486 @@ +Changelog for librtas-2.0.4 +======================================= +commit 33aa9aee37cfc4bdc93ba4aff25afb962b6a7606 +Author: Tyrel Datwyler <tyr...@linux.ibm.com> +Date: Mon Jan 23 11:48:23 2023 -0800 + + ci: rev Ubuntu action runner from 20.04 -> 22.04 + + Move from previous LTS release to the latest LTS release. This has the + benefit of also moving gcc-toolchain from gcc-10 -> gcc-11. + + Signed-off-by: Tyrel Datwyler <tyr...@linux.ibm.com> + +commit 44d189b070eb04af6d237d52084e703327ea6243 +Author: Nathan Lynch <nath...@linux.ibm.com> +Date: Tue Aug 2 15:39:02 2022 -0500 + + rtas_platform_dump: fix uninitialized use of local variable + + The Clang Static Analyzer correctly identifies an uninitialized use: + + librtas_src/syscall_calls.c:930:6: warning: Branch condition evaluates to a + garbage value [core.uninitialized.Branch] + if (kernbuf) + ^~~~~~~ + + When rtas_platform_dump() is called with a NULL buffer argument, + rtas_free_rmo_buffer() is called with a stack garbage value for the buffer + address, which is ultimately passed to munmap(). + + Signed-off-by: Nathan Lynch <nath...@linux.ibm.com> + Signed-off-by: Tyrel Datwyler <tyr...@linux.ibm.com> + +commit 1116a74b8ed01722957098eb934c0a8c186e2b27 +Author: Nathan Lynch <nath...@linux.ibm.com> +Date: Mon Aug 1 09:52:51 2022 -0500 + + configure.ac: discard LOCAL_CHECK_FLAGS + + As pointed out by Thomas Petazzoni, unconditionally setting build flags in + this manner is problematic for downstreams, potentially conflicting with + distribution policies. + + Drop LOCAL_CHECK_FLAGS and associated m4 code, preserving -Wall in + AM_CFLAGS. This leaves m4/ empty, but removing altogether provokes a + warning from autoreconf, so leave an empty file in the directory. + + Fixes #25. + + Signed-off-by: Nathan Lynch <nath...@linux.ibm.com> + Signed-off-by: Tyrel Datwyler <tyr...@linux.ibm.com> + +commit 7e2216265ce2621e48036f4dcd2ea23b032d7eb5 +Author: Nathan Lynch <nath...@linux.ibm.com> +Date: Wed Jul 13 15:01:33 2022 -0500 + + update .gitignore + + 'git status' in a built tree gives: + + Untracked files: + (use "git add <file>..." to include in what will be committed) + config.h + config.h.in + librtas.la + librtas_src/ofdt.lo + librtas_src/syscall_calls.lo + librtas_src/syscall_rmo.lo + librtasevent.la + librtasevent_src/get_rtas_event.lo + librtasevent_src/print_rtas_event.lo + librtasevent_src/rtas_cpu.lo + librtasevent_src/rtas_dump.lo + librtasevent_src/rtas_epow.lo + librtasevent_src/rtas_hotplug.lo + librtasevent_src/rtas_io.lo + librtasevent_src/rtas_lri.lo + librtasevent_src/rtas_mem.lo + librtasevent_src/rtas_post.lo + librtasevent_src/rtas_sp.lo + librtasevent_src/rtas_srcfru.lo + librtasevent_src/rtas_v6_misc.lo + librtasevent_src/rtas_vend.lo + libtool + m4/libtool.m4 + m4/ltoptions.m4 + m4/ltsugar.m4 + m4/ltversion.m4 + m4/lt~obsolete.m4 + stamp-h1 + + Ideally 'git status' should not report any untracked files after a build. + This reduces the likelihood of accidentally checking in build outputs when + making changes. + + Update .gitignore. Add things that aren't ignored but should be, + remove irrelevant patterns, remove comments which don't match current + practice (the git ls-files.. command just gives an error). + + Signed-off-by: Nathan Lynch <nath...@linux.ibm.com> + Signed-off-by: Tyrel Datwyler <tyr...@linux.ibm.com> + +commit b51c540e15d00ec0e079d55d83e97ebc9c08fece +Author: Nathan Lynch <nath...@linux.ibm.com> +Date: Thu Feb 17 08:27:35 2022 -0600 + + librtas: drop inline function attributes + + There's no real need to specify inline on file-static functions in this + code. The compiler will inline these as it sees fit. + + Signed-off-by: Nathan Lynch <nath...@linux.ibm.com> + Signed-off-by: Tyrel Datwyler <tyr...@linux.ibm.com> + +commit 29ad6be0b4a595441c3093457aaa7432d38ba4be +Author: Nathan Lynch <nath...@linux.ibm.com> +Date: Fri Feb 18 08:09:47 2022 -0600 + + use AC_CONFIG_SRCDIR + + This allows configure to verify that the specified source directory + actually contains the project source code. + + Signed-off-by: Nathan Lynch <nath...@linux.ibm.com> + Signed-off-by: Tyrel Datwyler <tyr...@linux.ibm.com> + +commit ad5868616777037350c2abd720dc547c6141bb52 +Author: Nathan Lynch <nath...@linux.ibm.com> +Date: Wed Feb 16 16:45:12 2022 -0600 + + drop AM_PROG_AR + + $(AR) isn't used in our build system, so this isn't needed. + + Signed-off-by: Nathan Lynch <nath...@linux.ibm.com> + Signed-off-by: Tyrel Datwyler <tyr...@linux.ibm.com> + +commit 755943eb5d8fabb11977b1d690187f51342328d9 +Author: Nathan Lynch <nath...@linux.ibm.com> +Date: Wed Feb 16 16:28:47 2022 -0600 + + drop AC_CANONICAL_TARGET + + In autoconf parlance, "target" refers to the type of system for which any + compiler tools in the package produce code. No compiler-like tools here, + drop it. + + Signed-off-by: Nathan Lynch <nath...@linux.ibm.com> + Signed-off-by: Tyrel Datwyler <tyr...@linux.ibm.com> + +commit e473e2991f4a69438f618aa1c8e55d2f65229a4f +Author: Nathan Lynch <nath...@linux.ibm.com> +Date: Wed Feb 16 10:21:26 2022 -0600 + + remove position-independent executable flags + + Seems odd to specify -fPIE, -pie at the top level for a library project. + Libtool takes care of adding -fPIC where it's appropriate. + + Signed-off-by: Nathan Lynch <nath...@linux.ibm.com> + Signed-off-by: Tyrel Datwyler <tyr...@linux.ibm.com> + +commit a0d932bbbdf23999c6e2d13a5a3b9e796b470263 +Author: Nathan Lynch <nath...@linux.ibm.com> +Date: Wed Feb 16 09:53:11 2022 -0600 + + drop redundant ssp-buffer-size specification + + It appears that setting ssp-buffer-size to the minimum changes the code + emitted with -fstack-protector but not -fstack-protector-strong or + -fstack-protector-all. We're using -fstack-protector-all so our use of + --param=ssp-buffer-size=1 is redundant. + + Examples/background: + https://bugzilla.redhat.com/show_bug.cgi?id=1105456 + https://lore.kernel.org/all/1471862567.5256.18.ca...@linux.intel.com + https://lwn.net/Articles/584225/ + + Signed-off-by: Nathan Lynch <nath...@linux.ibm.com> + Signed-off-by: Tyrel Datwyler <tyr...@linux.ibm.com> + +commit f30ebfe896de3712b922fe8a26444bfd29497da4 +Author: Nathan Lynch <nath...@linux.ibm.com> +Date: Thu Feb 10 13:19:20 2022 -0600 + + use AM_CPPFLAGS for include directives + + Preprocessor search paths are more appropriately set in AM_CPPFLAGS than + AM_CFLAGS. + + Signed-off-by: Nathan Lynch <nath...@linux.ibm.com> + Signed-off-by: Tyrel Datwyler <tyr...@linux.ibm.com> + +commit 05c043f59d2cae5378a705c1d674c9bad432643b +Author: Nathan Lynch <nath...@linux.ibm.com> +Date: Thu Feb 17 08:36:31 2022 -0600 + + require Autoconf 2.69 + + Autoscan suggests requiring a minimum version of 2.69, which is a decade + old as of this writing. All Linux distributions we care about supporting + satisfy this. + + Signed-off-by: Nathan Lynch <nath...@linux.ibm.com> + Signed-off-by: Tyrel Datwyler <tyr...@linux.ibm.com> + +commit ee8ed1384b15f24df83f3c9de6eabcac03a2d698 +Author: Nathan Lynch <nath...@linux.ibm.com> +Date: Fri Feb 18 08:50:32 2022 -0600 + + drop useless librtas.pc + + It's impossible that anyone actually uses the librtas.pc generated by the + build since all the flags are completely wrong and don't match the library + name(s) or the installed header paths. + + We don't use pkg-config to configure dependencies during our build so we + can drop PKG_PROG_PKG_CONFIG from configure.ac as well. + + Signed-off-by: Nathan Lynch <nath...@linux.ibm.com> + Signed-off-by: Tyrel Datwyler <tyr...@linux.ibm.com> + +Changelog for librtas-2.0.3 +======================================= +commit c8a4104ac76ceb0eb61d36c6a1b6043ec92e2eb3 +Author: Than Ngo <t...@redhat.com> +Date: Thu Mar 25 16:13:20 2021 +0100 + + librtasevent: Fix coverity issues found by Covscan + + Error: RESOURCE_LEAK (CWE-772): [#def1] + librtas-2.0.2/librtasevent_src/rtas_srcfru.c:208: alloc_fn: Storage is returned from allocation function "malloc". + librtas-2.0.2/librtasevent_src/rtas_srcfru.c:208: var_assign: Assigning: "src_raw" = storage returned from "malloc(88UL)". + librtas-2.0.2/librtasevent_src/rtas_srcfru.c:216: noescape: Resource "src_raw" is not freed or pointed-to in "memset". [Note: The source code implementation of the function has been overridden by a builtin model.] + librtas-2.0.2/librtasevent_src/rtas_srcfru.c:219: noescape: Resource "src_raw" is not freed or pointed-to in "rtas_copy". + librtas-2.0.2/librtasevent_src/rtas_srcfru.c:220: noescape: Resource "&src_raw->v6hdr" is not freed or pointed-to in "parse_v6_hdr". + librtas-2.0.2/librtasevent_src/rtas_srcfru.c:239: noescape: Resource "&src_raw->v6hdr" is not freed or pointed-to in "re_scn_id". + librtas-2.0.2/librtasevent_src/rtas_srcfru.c:242: leaked_storage: Variable "src_raw" going out of scope leaks the storage it points to. + 240| + 241| if (!src_subscns_included(src)) + 242|-> return 0; + 243| + 244| rtas_copy( (char *) src_raw + RE_SRC_SCN_SZ + 4, re, RE_SRC_SUBSCN_SZ); + + Error: RESOURCE_LEAK (CWE-772): [#def2] + librtas-2.0.2/librtasevent_src/rtas_srcfru.c:208: alloc_fn: Storage is returned from allocation function "malloc". + librtas-2.0.2/librtasevent_src/rtas_srcfru.c:208: var_assign: Assigning: "src_raw" = storage returned from "malloc(88UL)". + librtas-2.0.2/librtasevent_src/rtas_srcfru.c:216: noescape: Resource "src_raw" is not freed or pointed-to in "memset". [Note: The source code implementation of the function has been overridden by a builtin model.] + librtas-2.0.2/librtasevent_src/rtas_srcfru.c:219: noescape: Resource "src_raw" is not freed or pointed-to in "rtas_copy". + librtas-2.0.2/librtasevent_src/rtas_srcfru.c:220: noescape: Resource "&src_raw->v6hdr" is not freed or pointed-to in "parse_v6_hdr". + librtas-2.0.2/librtasevent_src/rtas_srcfru.c:239: noescape: Resource "&src_raw->v6hdr" is not freed or pointed-to in "re_scn_id". + librtas-2.0.2/librtasevent_src/rtas_srcfru.c:244: noescape: Resource "(char *)src_raw + 80 + 4" is not freed or pointed-to in "rtas_copy". + librtas-2.0.2/librtasevent_src/rtas_srcfru.c:263: leaked_storage: Variable "src_raw" going out of scope leaks the storage it points to. + 261| cleanup_rtas_event(re); + 262| errno = ENOMEM; + 263|-> return 1; + 264| } + 265| + + Error: RESOURCE_LEAK (CWE-772): [#def3] + librtas-2.0.2/librtasevent_src/rtas_srcfru.c:259: alloc_fn: Storage is returned from allocation function "malloc". + librtas-2.0.2/librtasevent_src/rtas_srcfru.c:259: var_assign: Assigning: "fru" = storage returned from "malloc(120UL)". + librtas-2.0.2/librtasevent_src/rtas_srcfru.c:266: noescape: Resource "fru" is not freed or pointed-to in "memset". [Note: The source code implementation of the function has been overridden by a builtin model.] + librtas-2.0.2/librtasevent_src/rtas_srcfru.c:269: noescape: Resource "fru" is not freed or pointed-to in "parse_fru_scn". + librtas-2.0.2/librtasevent_src/rtas_srcfru.c:291: leaked_storage: Variable "fru" going out of scope leaks the storage it points to. + 289| if (cur_fruhdr == NULL) { + 290| cleanup_rtas_event(re); + 291|-> return -1; + 292| } + 293| + + Error: RESOURCE_LEAK (CWE-772): [#def4] + librtas-2.0.2/librtasevent_src/rtas_srcfru.c:208: alloc_fn: Storage is returned from allocation function "malloc". + librtas-2.0.2/librtasevent_src/rtas_srcfru.c:208: var_assign: Assigning: "src_raw" = storage returned from "malloc(88UL)". + librtas-2.0.2/librtasevent_src/rtas_srcfru.c:216: noescape: Resource "src_raw" is not freed or pointed-to in "memset". [Note: The source code implementation of the function has been overridden by a builtin model.] + librtas-2.0.2/librtasevent_src/rtas_srcfru.c:219: noescape: Resource "src_raw" is not freed or pointed-to in "rtas_copy". + librtas-2.0.2/librtasevent_src/rtas_srcfru.c:220: noescape: Resource "&src_raw->v6hdr" is not freed or pointed-to in "parse_v6_hdr". + librtas-2.0.2/librtasevent_src/rtas_srcfru.c:239: noescape: Resource "&src_raw->v6hdr" is not freed or pointed-to in "re_scn_id". + librtas-2.0.2/librtasevent_src/rtas_srcfru.c:244: noescape: Resource "(char *)src_raw + 80 + 4" is not freed or pointed-to in "rtas_copy". + librtas-2.0.2/librtasevent_src/rtas_srcfru.c:291: leaked_storage: Variable "src_raw" going out of scope leaks the storage it points to. + 289| if (cur_fruhdr == NULL) { + 290| cleanup_rtas_event(re); + 291|-> return -1; + 292| } + 293| + + Error: RESOURCE_LEAK (CWE-772): [#def5] + librtas-2.0.2/librtasevent_src/rtas_srcfru.c:208: alloc_fn: Storage is returned from allocation function "malloc". + librtas-2.0.2/librtasevent_src/rtas_srcfru.c:208: var_assign: Assigning: "src_raw" = storage returned from "malloc(88UL)". + librtas-2.0.2/librtasevent_src/rtas_srcfru.c:216: noescape: Resource "src_raw" is not freed or pointed-to in "memset". [Note: The source code implementation of the function has been overridden by a builtin model.] + librtas-2.0.2/librtasevent_src/rtas_srcfru.c:219: noescape: Resource "src_raw" is not freed or pointed-to in "rtas_copy". + librtas-2.0.2/librtasevent_src/rtas_srcfru.c:220: noescape: Resource "&src_raw->v6hdr" is not freed or pointed-to in "parse_v6_hdr". + librtas-2.0.2/librtasevent_src/rtas_srcfru.c:239: noescape: Resource "&src_raw->v6hdr" is not freed or pointed-to in "re_scn_id". + librtas-2.0.2/librtasevent_src/rtas_srcfru.c:244: noescape: Resource "(char *)src_raw + 80 + 4" is not freed or pointed-to in "rtas_copy". + librtas-2.0.2/librtasevent_src/rtas_srcfru.c:312: leaked_storage: Variable "src_raw" going out of scope leaks the storage it points to. + 310| } while (total_len < srcsub_len); + 311| + 312|-> return 0; + 313| } + 314| + + Error: RESOURCE_LEAK (CWE-772): [#def6] + librtas-2.0.2/librtasevent_src/rtas_vend.c:104: alloc_fn: Storage is returned from allocation function "malloc". + librtas-2.0.2/librtasevent_src/rtas_vend.c:104: var_assign: Assigning: "ve" = storage returned from "malloc(40UL)". + librtas-2.0.2/librtasevent_src/rtas_vend.c:111: noescape: Resource "(char *)ve + 24UL" is not freed or pointed-to in "rtas_copy". + librtas-2.0.2/librtasevent_src/rtas_vend.c:119: leaked_storage: Variable "ve" going out of scope leaks the storage it points to. + 117| if (ve->vendor_data == NULL) { + 118| errno = ENOMEM; + 119|-> return -1; + 120| } + 121| + + Signed-off-by: Than Ngo <t...@rehat.com> + Signed-off-by: Tyrel Datwyler <tyr...@linux.ibm.com> + +commit 2d2ac80a3b413e0e7ad3ebb47426923a9bf39b33 +Author: Nathan Lynch <nath...@linux.ibm.com> +Date: Fri Feb 18 09:17:19 2022 -0600 + + ci: override CFLAGS in configure + + Set CFLAGS to something fairly conventional and include -Werror so jobs + will fail on compiler warnings. For CI purposes this should be an + acceptable way to start enforcing a no new warnings policy. + + Signed-off-by: Nathan Lynch <nath...@linux.ibm.com> + Signed-off-by: Tyrel Datwyler <tyr...@linux.ibm.com> + +commit 92d3fb040b25d931357a46f3d161e27d653caeb4 +Author: Nathan Lynch <nath...@linux.ibm.com> +Date: Fri Feb 18 09:25:25 2022 -0600 + + ci: make builds more verbose + + While we're experimenting with the CI configuration (compiler flags etc) + we'll need the ability to inspect the exact commands used even in + successful builds. So, for now at least, use V=1 with our make invocations. + + Signed-off-by: Nathan Lynch <nath...@linux.ibm.com> + Signed-off-by: Tyrel Datwyler <tyr...@linux.ibm.com> + +commit 4fc1d726c5db4412a43a01a0cc0e21069c05271f +Author: Nathan Lynch <nath...@linux.ibm.com> +Date: Wed Feb 9 22:01:46 2022 -0600 + + librtas: fix printf format mismatches for 32-bit build + + Several issues of this form: + + Warning: librtas_src/syscall.h:68:11: warning: format â%lxâ expects + argument of type âlong unsigned intâ, but argument 4 has type âuint64_tâ + {aka âlong long unsigned intâ} [-Wformat=] + 68 | printf("librtas %s(): " _fmt, __func__, ##_args); \ + | ^~~~~~~~~~~~~~~~ + librtas_src/syscall_calls.c:516:2: note: in expansion of macro âdbgâ + 516 | dbg("(0x%x, 0x%lx, %d) = %d, 0x%x\n", config_addr, phb_id, func, + | ^~~ + librtas_src/syscall_calls.c:516:18: note: format string is defined here + 516 | dbg("(0x%x, 0x%lx, %d) = %d, 0x%x\n", config_addr, phb_id, func, + | ~~^ + | | + | long unsigned int + | %llx + + Convert this and others to PRIx64 to accommodate uint64_t. + + Signed-off-by: Nathan Lynch <nath...@linux.ibm.com> + Signed-off-by: Tyrel Datwyler <tyr...@linux.ibm.com> + +commit 6e4535968b1667eca0569621d3c9f0fd234429de +Author: Nathan Lynch <nath...@linux.ibm.com> +Date: Wed Feb 9 21:30:54 2022 -0600 + + librtasevent: fix 'taking address of packed member' warnings + + Address the following warnings: + + Warning: librtasevent_src/get_rtas_event.c:282:37: warning: taking address + of packed member of âstruct rtas_event_exthdr_rawâ may result in an + unaligned pointer value [-Waddress-of-packed-member] + 282 | parse_rtas_time(&rex_hdr->time, &rawhdr->time); + | ^~~~~~~~~~~~~ + Warning: librtasevent_src/get_rtas_event.c:283:37: warning: taking address + of packed member of âstruct rtas_event_exthdr_rawâ may result in an + unaligned pointer value [-Waddress-of-packed-member] + 283 | parse_rtas_date(&rex_hdr->date, &rawhdr->date); + | ^~~~~~~~~~~~~ + librtasevent_src/rtas_v6_misc.c: In function âparse_priv_hdr_scnâ: + Warning: librtasevent_src/rtas_v6_misc.c:119:37: warning: taking address of + packed member of âstruct rtas_priv_hdr_scn_rawâ may result in an unaligned + pointer value [-Waddress-of-packed-member] + 119 | parse_rtas_date(&privhdr->date, &rawhdr->date); + | ^~~~~~~~~~~~~ + Warning: librtasevent_src/rtas_v6_misc.c:120:37: warning: taking address of + packed member of âstruct rtas_priv_hdr_scn_rawâ may result in an unaligned + pointer value [-Waddress-of-packed-member] + 120 | parse_rtas_time(&privhdr->time, &rawhdr->time); + | ^~~~~~~~~~~~~ + + by passing the small "raw" date/time objects by value instead of taking their + addresses. + + Signed-off-by: Nathan Lynch <nath...@linux.ibm.com> + Signed-off-by: Tyrel Datwyler <tyr...@linux.ibm.com> + +commit 5c207ca281b93e47a3f751fa1b6f1f610357a71d +Author: Nathan Lynch <n...@pobox.com> +Date: Mon Jan 31 13:45:22 2022 -0600 + + ci: add GitHub Actions build tests + + GitHub's hosted x86 Ubuntu runners have cross toolchains suitable for + building librtas for its targeted architectures. Add a matrix build + including these (32- and 64-bit big-endian, 64-bit little-endian) which + performs a basic build and distcheck. + + Also perform a native x86 build since it "works": it produces nothing you + would want to run, but the build succeeds. If we are to add tests in the + future, running them as native code on the build host may be the best + option. So it's in our interest to keep the x86 build working. + + Signed-off-by: Nathan Lynch <nath...@linux.ibm.com> + Signed-off-by: Tyrel Datwyler <tyr...@linux.ibm.com> + +commit 6447b24d9f8d892e750b9517f7c136855967ea61 +Author: Fabian Groffen <grob...@gentoo.org> +Date: Mon May 24 10:06:54 2021 +0200 + + librtasevent: include endian.h for beXXtoh macros + + In particular using musl libc, without this include, the calls to + be16toh/be32toh result in a compiler warning about an undefined symbol. + Since in musl these are actually implemented by macros, the symbols + remain undefined in the final shared library, making the library + unusable. + + Issue: https://github.com/ibm-power-utilities/librtas/issues/10 + Signed-off-by: Fabian Groffen <grob...@gentoo.org> + Reviewed-by: Vasant Hegde <hegdevas...@linux.vnet.ibm.com> + Reviewed-by: Nathan Lynch <nath...@linux.ibm.com> + Signed-off-by: Tyrel Datwyler <tyr...@linux.ibm.com> + +commit 0bb5704e6452886f8d93ed905efe058f13e26a6a +Author: Andrew Donnellan <a...@linux.ibm.com> +Date: Sat Apr 25 00:32:57 2020 +1000 + + syscall_calls: fix typo in comment + + Signed-off-by: Andrew Donnellan <a...@linux.ibm.com> + Reviewed-by: Nathan Lynch <nath...@linux.ibm.com> + Signed-off-by: Tyrel Datwyler <tyr...@linux.ibm.com> + +commit f8a1f6df25263afc75cabb9c40ddb8e54cf086e3 +Author: Tyrel Datwyler <tyr...@linux.ibm.com> +Date: Thu Dec 16 13:37:15 2021 -0800 + + librtasevent: Fix memory page address print issue + + The logical resource address lo and hi fields are currently printed by rtas_dump + infering that their naming refers to significance when in fact they refer to the + bit numbering. + + lri_mem_addr_lo == Memory Logical Address (bit 0-31) + lri_mem_addr_hi == Memory Logical Address (bit 32-64)) + + Hence rtas_dump command is printing the logical address output with those two + fields swapped. + + This patch fixes rtas_lri_scn fields so that we get legitimate addresses. + + Current output: + -------------- + Logical Address: 2ab0a0000000014f + + Correct output: + ------------- + Logical Address: 0x0000014F2AB0A000 + + Signed-off-by: Vasant Hegde <hegdevas...@linux.vnet.ibm.com> + Reviewed-by: Nathan Lynch <nath...@linux.ibm.com> + [tyreld: reworded commit message] + Signed-off-by: Tyrel Datwyler <tyr...@linux.ibm.com> + Changelog for librtas-2.0.2 ======================================= commit 26970c42bc017ad68b864e7134cf941c07443aa8 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/librtas-2.0.2/Makefile.am new/librtas-2.0.4/Makefile.am --- old/librtas-2.0.2/Makefile.am 2018-06-15 01:49:01.000000000 +0200 +++ new/librtas-2.0.4/Makefile.am 2023-01-24 19:08:58.000000000 +0100 @@ -6,16 +6,14 @@ docdir = $(datadir)/doc/@PACKAGE@ doc_DATA = README COPYING.LESSER -pkgconfigdir = $(libdir)/pkgconfig -pkgconfig_DATA = librtas.pc - bin_PROGRAMS= lib_LTLIBRARIES= man_MANS= noinst_HEADERS= library_include_HEADERS= -AM_CFLAGS = -I$(top_srcdir)/librtas_src/ -I$(top_srcdir)/librtasevent_src/ +AM_CFLAGS = -Wall +AM_CPPFLAGS = -I$(top_srcdir)/librtas_src/ -I$(top_srcdir)/librtasevent_src/ library_includedir=$(includedir) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/librtas-2.0.2/configure.ac new/librtas-2.0.4/configure.ac --- old/librtas-2.0.2/configure.ac 2018-06-15 01:49:01.000000000 +0200 +++ new/librtas-2.0.4/configure.ac 2023-01-24 19:08:58.000000000 +0100 @@ -1,20 +1,16 @@ -AC_INIT([librtas],[2.0.2],[See README]) +AC_INIT([librtas],[2.0.4],[See README]) +AC_PREREQ([2.69]) +AC_CONFIG_SRCDIR([librtas_src/librtas.h]) AC_CONFIG_AUX_DIR([config]) AC_CONFIG_MACRO_DIR([m4]) -AC_CANONICAL_TARGET - AM_INIT_AUTOMAKE([-Wall -Werror -Wno-portability subdir-objects foreign tar-ustar]) -m4_ifdef([AM_PROG_AR], [AM_PROG_AR]) - AC_CONFIG_HEADERS([config.h]) -PKG_PROG_PKG_CONFIG AC_CHECK_FUNCS([memset munmap strrchr]) AC_CHECK_HEADERS([fcntl.h]) -AC_C_INLINE AC_FUNC_MALLOC AC_FUNC_MMAP AC_FUNC_REALLOC @@ -24,24 +20,10 @@ AC_TYPE_UINT32_T AC_TYPE_UINT64_T -AC_DEFUN([LOCAL_CHECK_FLAGS],[ - AC_REQUIRE([AX_CHECK_LINK_FLAG]) - AC_REQUIRE([AX_APPEND_COMPILE_FLAGS]) - AC_LANG_PUSH([C]) - AX_APPEND_COMPILE_FLAGS([-Wall]) - AX_APPEND_COMPILE_FLAGS([-D_FORTIFY_SOURCE=2 -fstack-protector-all]) - AX_APPEND_COMPILE_FLAGS([-fwrapv -fPIE -Wstack-protector]) - AX_APPEND_COMPILE_FLAGS([--param=ssp-buffer-size=1]) - AX_CHECK_LINK_FLAG([-z relro -z now]) - AX_CHECK_LINK_FLAG([-pie]) - AC_LANG_POP -]) -LOCAL_CHECK_FLAGS - LT_INIT LT_LANG([C]) m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) -AC_CONFIG_FILES([Makefile librtas.pc librtas.spec]) +AC_CONFIG_FILES([Makefile librtas.spec]) AC_OUTPUT diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/librtas-2.0.2/librtas.pc.in new/librtas-2.0.4/librtas.pc.in --- old/librtas-2.0.2/librtas.pc.in 2018-06-15 01:49:01.000000000 +0200 +++ new/librtas-2.0.4/librtas.pc.in 1970-01-01 01:00:00.000000000 +0100 @@ -1,10 +0,0 @@ -prefix=@prefix@ -exec_prefix=@exec_prefix@ -libdir=@libdir@ -includedir=@includedir@ - -Name: librtas -Description: The librtas package provides an interface for Run-Time Abstraction Services (RTAS) calls on PAPR platforms. The libraries allow users to examine and manipulate hardware, and parse RTAS events. -Version: @PACKAGE_VERSION@ -Libs: -L${libdir} -lrtas-2.0 -lofdt-2.0 -lrtasevent-2.0 -Cflags: -I${includedir}/librtas-2.0 -I${libdir}/librtas-2.0/include diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/librtas-2.0.2/librtas.spec.in new/librtas-2.0.4/librtas.spec.in --- old/librtas-2.0.2/librtas.spec.in 2018-06-15 01:49:01.000000000 +0200 +++ new/librtas-2.0.4/librtas.spec.in 2023-01-24 19:08:58.000000000 +0100 @@ -75,7 +75,6 @@ %{_includedir}/librtasevent.h %{_includedir}/librtasevent_v4.h %{_includedir}/librtasevent_v6.h -%{_libdir}/pkgconfig/librtas.pc %files static %{_libdir}/librtas.a diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/librtas-2.0.2/librtas_src/syscall_calls.c new/librtas-2.0.4/librtas_src/syscall_calls.c --- old/librtas-2.0.2/librtas_src/syscall_calls.c 2018-06-15 01:49:01.000000000 +0200 +++ new/librtas-2.0.4/librtas_src/syscall_calls.c 2023-01-24 19:08:58.000000000 +0100 @@ -513,7 +513,7 @@ *info = be32toh(be_info); - dbg("(0x%x, 0x%lx, %d) = %d, 0x%x\n", config_addr, phb_id, func, + dbg("(0x%x, 0x%"PRIx64", %d) = %d, 0x%x\n", config_addr, phb_id, func, rc ? rc : status, *info); return rc ? rc : status; } @@ -815,7 +815,7 @@ /** * rtas_lpar_perftools - * @brief Interface to the ibm,lpa-perftools rtas call + * @brief Interface to the ibm,lpar-perftools rtas call * * @param subfunc * @param workarea additional args to the rtas call @@ -886,7 +886,7 @@ 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(); @@ -935,7 +935,7 @@ bytes_lo = be32toh(bytes_lo); *bytes_ret = BITS64(bytes_hi, bytes_lo); - dbg("(0x%lx, 0x%lx, %p, %zd, %p, %p) = %d, 0x%lx, 0x%lx\n", + dbg("(0x%"PRIx64", 0x%"PRIx64", %p, %zd, %p, %p) = %d, 0x%"PRIx64", 0x%"PRIx64"\n", dump_tag, sequence, buffer, length, seq_next, bytes_ret, rc ? rc : status, *seq_next, *bytes_ret); return rc ? rc : status; @@ -967,7 +967,7 @@ *state = be32toh(*state); *eeh = be32toh(*eeh); - dbg("(0x%x, 0x%lx, %p, %p) = %d, %d, %d\n", cfg_addr, phbid, state, + dbg("(0x%x, 0x%"PRIx64", %p, %p) = %d, %d, %d\n", cfg_addr, phbid, state, eeh, rc ? rc : status, *state, *eeh); return rc ? rc : status; } @@ -1079,7 +1079,7 @@ htobe32(BITS32_HI(phbid)), htobe32(BITS32_LO(phbid)), htobe32(function), &status); - dbg("(0x%x, 0x%lx, %d) = %d\n", cfg_addr, phbid, function, + dbg("(0x%x, 0x%"PRIx64", %d) = %d\n", cfg_addr, phbid, function, rc ? rc : status); return rc ? rc : status; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/librtas-2.0.2/librtas_src/syscall_rmo.c new/librtas-2.0.4/librtas_src/syscall_rmo.c --- old/librtas-2.0.2/librtas_src/syscall_rmo.c 2018-06-15 01:49:01.000000000 +0200 +++ new/librtas-2.0.4/librtas_src/syscall_rmo.c 2023-01-24 19:08:58.000000000 +0100 @@ -125,7 +125,7 @@ * @param mask * @return 0 on success, !0 otherwise */ -static inline uint64_t get_bits(short lobit, short hibit, uint64_t mask) +static uint64_t get_bits(short lobit, short hibit, uint64_t mask) { short num_bits = hibit - lobit + 1; uint64_t ones_mask = (1ll << (num_bits)) - 1; @@ -142,7 +142,7 @@ * @param mask * @return 0 on success, !0 otherwise */ -static inline void set_bits(short lobit, short hibit, uint64_t value, +static void set_bits(short lobit, short hibit, uint64_t value, uint64_t *mask) { short num_bits = hibit - lobit + 1; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/librtas-2.0.2/librtasevent_src/get_rtas_event.c new/librtas-2.0.4/librtasevent_src/get_rtas_event.c --- old/librtas-2.0.2/librtasevent_src/get_rtas_event.c 2018-06-15 01:49:01.000000000 +0200 +++ new/librtas-2.0.4/librtasevent_src/get_rtas_event.c 2023-01-24 19:08:58.000000000 +0100 @@ -279,8 +279,8 @@ rex_hdr->config_change = (rawhdr->data4 & 0x02) >> 1; rex_hdr->post = rawhdr->data4 & 0x01; - parse_rtas_time(&rex_hdr->time, &rawhdr->time); - parse_rtas_date(&rex_hdr->date, &rawhdr->date); + parse_rtas_time(&rex_hdr->time, rawhdr->time); + parse_rtas_date(&rex_hdr->date, rawhdr->date); re->offset += RE_EXT_HDR_SZ; add_re_scn(re, rex_hdr, RTAS_EVENT_EXT_HDR); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/librtas-2.0.2/librtasevent_src/rtas_event.h new/librtas-2.0.4/librtasevent_src/rtas_event.h --- old/librtas-2.0.2/librtasevent_src/rtas_event.h 2018-06-15 01:49:01.000000000 +0200 +++ new/librtas-2.0.4/librtasevent_src/rtas_event.h 2023-01-24 19:08:58.000000000 +0100 @@ -23,6 +23,8 @@ #ifndef _H_RTAS_EVENT #define _H_RTAS_EVENT +#include <endian.h> + #define PRNT_FMT "%-20s%08x" #define PRNT_FMT_L PRNT_FMT" " #define PRNT_FMT_R PRNT_FMT"\n" @@ -32,8 +34,8 @@ void rtas_copy(void *, struct rtas_event *, uint32_t); /* parse routines */ -void parse_rtas_date(struct rtas_date *, struct rtas_date_raw *); -void parse_rtas_time(struct rtas_time *, struct rtas_time_raw *); +void parse_rtas_date(struct rtas_date *, struct rtas_date_raw); +void parse_rtas_time(struct rtas_time *, struct rtas_time_raw); void parse_v6_hdr(struct rtas_v6_hdr *, struct rtas_v6_hdr_raw *); int parse_priv_hdr_scn(struct rtas_event *); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/librtas-2.0.2/librtasevent_src/rtas_lri.c new/librtas-2.0.4/librtasevent_src/rtas_lri.c --- old/librtas-2.0.2/librtasevent_src/rtas_lri.c 2018-06-15 01:49:01.000000000 +0200 +++ new/librtas-2.0.4/librtasevent_src/rtas_lri.c 2023-01-24 19:08:58.000000000 +0100 @@ -113,8 +113,8 @@ case 0x40: len += rtas_print("(Memory Page)\n" PRNT_FMT_ADDR, - "Logical Address:", lri->lri_mem_addr_hi, - lri->lri_mem_addr_lo); + "Logical Address:", lri->lri_mem_addr_lo, + lri->lri_mem_addr_hi); break; case 0x41: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/librtas-2.0.2/librtasevent_src/rtas_srcfru.c new/librtas-2.0.4/librtasevent_src/rtas_srcfru.c --- old/librtas-2.0.2/librtasevent_src/rtas_srcfru.c 2018-06-15 01:49:01.000000000 +0200 +++ new/librtas-2.0.4/librtasevent_src/rtas_srcfru.c 2023-01-24 19:08:58.000000000 +0100 @@ -74,13 +74,13 @@ 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 @@ 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 @@ total_len = RE_SRC_SUBSCN_SZ; last_fru = NULL; + free(src_raw); do { uint32_t fru_len, fru_end; @@ -288,6 +290,7 @@ if (cur_fruhdr == NULL) { cleanup_rtas_event(re); + free(fru); return -1; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/librtas-2.0.2/librtasevent_src/rtas_v6_misc.c new/librtas-2.0.4/librtasevent_src/rtas_v6_misc.c --- old/librtas-2.0.2/librtasevent_src/rtas_v6_misc.c 2018-06-15 01:49:01.000000000 +0200 +++ new/librtas-2.0.4/librtasevent_src/rtas_v6_misc.c 2023-01-24 19:08:58.000000000 +0100 @@ -40,19 +40,19 @@ "Dec"}; void parse_rtas_date(struct rtas_date *rtas_date, - struct rtas_date_raw *rawdate) + struct rtas_date_raw rawdate) { - rtas_date->year = be16toh(rawdate->year); - rtas_date->month = rawdate->month; - rtas_date->day = rawdate->day; + rtas_date->year = be16toh(rawdate.year); + rtas_date->month = rawdate.month; + rtas_date->day = rawdate.day; } -void parse_rtas_time(struct rtas_time *rtas_time, struct rtas_time_raw *rawtime) +void parse_rtas_time(struct rtas_time *rtas_time, struct rtas_time_raw rawtime) { - rtas_time->hour = rawtime->hour; - rtas_time->minutes = rawtime->minutes; - rtas_time->seconds = rawtime->seconds; - rtas_time->hundredths = rawtime->hundredths; + rtas_time->hour = rawtime.hour; + rtas_time->minutes = rawtime.minutes; + rtas_time->seconds = rawtime.seconds; + rtas_time->hundredths = rawtime.hundredths; } void parse_v6_hdr(struct rtas_v6_hdr *v6hdr, struct rtas_v6_hdr_raw *rawv6) @@ -116,8 +116,8 @@ rawhdr = (struct rtas_priv_hdr_scn_raw *)(re->buffer + re->offset); parse_v6_hdr(&privhdr->v6hdr, &rawhdr->v6hdr); - parse_rtas_date(&privhdr->date, &rawhdr->date); - parse_rtas_time(&privhdr->time, &rawhdr->time); + parse_rtas_date(&privhdr->date, rawhdr->date); + parse_rtas_time(&privhdr->time, rawhdr->time); privhdr->creator_id = rawhdr->creator_id; privhdr->scn_count = rawhdr->scn_count; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/librtas-2.0.2/librtasevent_src/rtas_vend.c new/librtas-2.0.4/librtasevent_src/rtas_vend.c --- old/librtas-2.0.2/librtasevent_src/rtas_vend.c 2018-06-15 01:49:01.000000000 +0200 +++ new/librtas-2.0.4/librtasevent_src/rtas_vend.c 2023-01-24 19:08:58.000000000 +0100 @@ -116,6 +116,7 @@ ve->vendor_data = malloc(ve->vendor_data_sz); if (ve->vendor_data == NULL) { errno = ENOMEM; + free(ve); return -1; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/librtas-2.0.2/m4/ax_append_compile_flags.m4 new/librtas-2.0.4/m4/ax_append_compile_flags.m4 --- old/librtas-2.0.2/m4/ax_append_compile_flags.m4 2018-06-15 01:49:01.000000000 +0200 +++ new/librtas-2.0.4/m4/ax_append_compile_flags.m4 1970-01-01 01:00:00.000000000 +0100 @@ -1,65 +0,0 @@ -# =========================================================================== -# http://www.gnu.org/software/autoconf-archive/ax_append_compile_flags.html -# =========================================================================== -# -# SYNOPSIS -# -# AX_APPEND_COMPILE_FLAGS([FLAG1 FLAG2 ...], [FLAGS-VARIABLE], [EXTRA-FLAGS]) -# -# DESCRIPTION -# -# For every FLAG1, FLAG2 it is checked whether the compiler works with the -# flag. If it does, the flag is added FLAGS-VARIABLE -# -# If FLAGS-VARIABLE is not specified, the current language's flags (e.g. -# CFLAGS) is used. During the check the flag is always added to the -# current language's flags. -# -# If EXTRA-FLAGS is defined, it is added to the current language's default -# flags (e.g. CFLAGS) when the check is done. The check is thus made with -# the flags: "CFLAGS EXTRA-FLAGS FLAG". This can for example be used to -# force the compiler to issue an error when a bad flag is given. -# -# NOTE: This macro depends on the AX_APPEND_FLAG and -# AX_CHECK_COMPILE_FLAG. Please keep this macro in sync with -# AX_APPEND_LINK_FLAGS. -# -# LICENSE -# -# Copyright (c) 2011 Maarten Bosmans <mkbosm...@gmail.com> -# -# 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 3 of the License, or (at your -# option) any later version. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -# Public License for more details. -# -# You should have received a copy of the GNU General Public License along -# with this program. If not, see <http://www.gnu.org/licenses/>. -# -# As a special exception, the respective Autoconf Macro's copyright owner -# gives unlimited permission to copy, distribute and modify the configure -# scripts that are the output of Autoconf when processing the Macro. You -# need not follow the terms of the GNU General Public License when using -# or distributing such scripts, even though portions of the text of the -# Macro appear in them. The GNU General Public License (GPL) does govern -# all other use of the material that constitutes the Autoconf Macro. -# -# This special exception to the GPL applies to versions of the Autoconf -# Macro released by the Autoconf Archive. When you make and distribute a -# modified version of the Autoconf Macro, you may extend this special -# exception to the GPL to apply to your modified version as well. - -#serial 4 - -AC_DEFUN([AX_APPEND_COMPILE_FLAGS], -[AX_REQUIRE_DEFINED([AX_CHECK_COMPILE_FLAG]) -AX_REQUIRE_DEFINED([AX_APPEND_FLAG]) -for flag in $1; do - AX_CHECK_COMPILE_FLAG([$flag], [AX_APPEND_FLAG([$flag], [$2])], [], [$3]) -done -])dnl AX_APPEND_COMPILE_FLAGS diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/librtas-2.0.2/m4/ax_append_flag.m4 new/librtas-2.0.4/m4/ax_append_flag.m4 --- old/librtas-2.0.2/m4/ax_append_flag.m4 2018-06-15 01:49:01.000000000 +0200 +++ new/librtas-2.0.4/m4/ax_append_flag.m4 1970-01-01 01:00:00.000000000 +0100 @@ -1,69 +0,0 @@ -# =========================================================================== -# http://www.gnu.org/software/autoconf-archive/ax_append_flag.html -# =========================================================================== -# -# SYNOPSIS -# -# AX_APPEND_FLAG(FLAG, [FLAGS-VARIABLE]) -# -# DESCRIPTION -# -# FLAG is appended to the FLAGS-VARIABLE shell variable, with a space -# added in between. -# -# If FLAGS-VARIABLE is not specified, the current language's flags (e.g. -# CFLAGS) is used. FLAGS-VARIABLE is not changed if it already contains -# FLAG. If FLAGS-VARIABLE is unset in the shell, it is set to exactly -# FLAG. -# -# NOTE: Implementation based on AX_CFLAGS_GCC_OPTION. -# -# LICENSE -# -# Copyright (c) 2008 Guido U. Draheim <gui...@gmx.de> -# Copyright (c) 2011 Maarten Bosmans <mkbosm...@gmail.com> -# -# 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 3 of the License, or (at your -# option) any later version. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -# Public License for more details. -# -# You should have received a copy of the GNU General Public License along -# with this program. If not, see <http://www.gnu.org/licenses/>. -# -# As a special exception, the respective Autoconf Macro's copyright owner -# gives unlimited permission to copy, distribute and modify the configure -# scripts that are the output of Autoconf when processing the Macro. You -# need not follow the terms of the GNU General Public License when using -# or distributing such scripts, even though portions of the text of the -# Macro appear in them. The GNU General Public License (GPL) does govern -# all other use of the material that constitutes the Autoconf Macro. -# -# This special exception to the GPL applies to versions of the Autoconf -# Macro released by the Autoconf Archive. When you make and distribute a -# modified version of the Autoconf Macro, you may extend this special -# exception to the GPL to apply to your modified version as well. - -#serial 2 - -AC_DEFUN([AX_APPEND_FLAG], -[AC_PREREQ(2.59)dnl for _AC_LANG_PREFIX -AS_VAR_PUSHDEF([FLAGS], [m4_default($2,_AC_LANG_PREFIX[FLAGS])])dnl -AS_VAR_SET_IF(FLAGS, - [case " AS_VAR_GET(FLAGS) " in - *" $1 "*) - AC_RUN_LOG([: FLAGS already contains $1]) - ;; - *) - AC_RUN_LOG([: FLAGS="$FLAGS $1"]) - AS_VAR_SET(FLAGS, ["AS_VAR_GET(FLAGS) $1"]) - ;; - esac], - [AS_VAR_SET(FLAGS,["$1"])]) -AS_VAR_POPDEF([FLAGS])dnl -])dnl AX_APPEND_FLAG diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/librtas-2.0.2/m4/ax_check_compile_flag.m4 new/librtas-2.0.4/m4/ax_check_compile_flag.m4 --- old/librtas-2.0.2/m4/ax_check_compile_flag.m4 2018-06-15 01:49:01.000000000 +0200 +++ new/librtas-2.0.4/m4/ax_check_compile_flag.m4 1970-01-01 01:00:00.000000000 +0100 @@ -1,74 +0,0 @@ -# =========================================================================== -# http://www.gnu.org/software/autoconf-archive/ax_check_compile_flag.html -# =========================================================================== -# -# SYNOPSIS -# -# AX_CHECK_COMPILE_FLAG(FLAG, [ACTION-SUCCESS], [ACTION-FAILURE], [EXTRA-FLAGS], [INPUT]) -# -# DESCRIPTION -# -# Check whether the given FLAG works with the current language's compiler -# or gives an error. (Warnings, however, are ignored) -# -# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on -# success/failure. -# -# If EXTRA-FLAGS is defined, it is added to the current language's default -# flags (e.g. CFLAGS) when the check is done. The check is thus made with -# the flags: "CFLAGS EXTRA-FLAGS FLAG". This can for example be used to -# force the compiler to issue an error when a bad flag is given. -# -# INPUT gives an alternative input source to AC_COMPILE_IFELSE. -# -# NOTE: Implementation based on AX_CFLAGS_GCC_OPTION. Please keep this -# macro in sync with AX_CHECK_{PREPROC,LINK}_FLAG. -# -# LICENSE -# -# Copyright (c) 2008 Guido U. Draheim <gui...@gmx.de> -# Copyright (c) 2011 Maarten Bosmans <mkbosm...@gmail.com> -# -# 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 3 of the License, or (at your -# option) any later version. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -# Public License for more details. -# -# You should have received a copy of the GNU General Public License along -# with this program. If not, see <http://www.gnu.org/licenses/>. -# -# As a special exception, the respective Autoconf Macro's copyright owner -# gives unlimited permission to copy, distribute and modify the configure -# scripts that are the output of Autoconf when processing the Macro. You -# need not follow the terms of the GNU General Public License when using -# or distributing such scripts, even though portions of the text of the -# Macro appear in them. The GNU General Public License (GPL) does govern -# all other use of the material that constitutes the Autoconf Macro. -# -# This special exception to the GPL applies to versions of the Autoconf -# Macro released by the Autoconf Archive. When you make and distribute a -# modified version of the Autoconf Macro, you may extend this special -# exception to the GPL to apply to your modified version as well. - -#serial 3 - -AC_DEFUN([AX_CHECK_COMPILE_FLAG], -[AC_PREREQ(2.59)dnl for _AC_LANG_PREFIX -AS_VAR_PUSHDEF([CACHEVAR],[ax_cv_check_[]_AC_LANG_ABBREV[]flags_$4_$1])dnl -AC_CACHE_CHECK([whether _AC_LANG compiler accepts $1], CACHEVAR, [ - ax_check_save_flags=$[]_AC_LANG_PREFIX[]FLAGS - _AC_LANG_PREFIX[]FLAGS="$[]_AC_LANG_PREFIX[]FLAGS $4 $1" - AC_COMPILE_IFELSE([m4_default([$5],[AC_LANG_PROGRAM()])], - [AS_VAR_SET(CACHEVAR,[yes])], - [AS_VAR_SET(CACHEVAR,[no])]) - _AC_LANG_PREFIX[]FLAGS=$ax_check_save_flags]) -AS_IF([test x"AS_VAR_GET(CACHEVAR)" = xyes], - [m4_default([$2], :)], - [m4_default([$3], :)]) -AS_VAR_POPDEF([CACHEVAR])dnl -])dnl AX_CHECK_COMPILE_FLAGS diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/librtas-2.0.2/m4/ax_check_link_flag.m4 new/librtas-2.0.4/m4/ax_check_link_flag.m4 --- old/librtas-2.0.2/m4/ax_check_link_flag.m4 2018-06-15 01:49:01.000000000 +0200 +++ new/librtas-2.0.4/m4/ax_check_link_flag.m4 1970-01-01 01:00:00.000000000 +0100 @@ -1,73 +0,0 @@ -# =========================================================================== -# http://www.gnu.org/software/autoconf-archive/ax_check_link_flag.html -# =========================================================================== -# -# SYNOPSIS -# -# AX_CHECK_LINK_FLAG(FLAG, [ACTION-SUCCESS], [ACTION-FAILURE], [EXTRA-FLAGS], [INPUT]) -# -# DESCRIPTION -# -# Check whether the given FLAG works with the linker or gives an error. -# (Warnings, however, are ignored) -# -# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on -# success/failure. -# -# If EXTRA-FLAGS is defined, it is added to the linker's default flags -# when the check is done. The check is thus made with the flags: "LDFLAGS -# EXTRA-FLAGS FLAG". This can for example be used to force the linker to -# issue an error when a bad flag is given. -# -# INPUT gives an alternative input source to AC_LINK_IFELSE. -# -# NOTE: Implementation based on AX_CFLAGS_GCC_OPTION. Please keep this -# macro in sync with AX_CHECK_{PREPROC,COMPILE}_FLAG. -# -# LICENSE -# -# Copyright (c) 2008 Guido U. Draheim <gui...@gmx.de> -# Copyright (c) 2011 Maarten Bosmans <mkbosm...@gmail.com> -# -# 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 3 of the License, or (at your -# option) any later version. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -# Public License for more details. -# -# You should have received a copy of the GNU General Public License along -# with this program. If not, see <http://www.gnu.org/licenses/>. -# -# As a special exception, the respective Autoconf Macro's copyright owner -# gives unlimited permission to copy, distribute and modify the configure -# scripts that are the output of Autoconf when processing the Macro. You -# need not follow the terms of the GNU General Public License when using -# or distributing such scripts, even though portions of the text of the -# Macro appear in them. The GNU General Public License (GPL) does govern -# all other use of the material that constitutes the Autoconf Macro. -# -# This special exception to the GPL applies to versions of the Autoconf -# Macro released by the Autoconf Archive. When you make and distribute a -# modified version of the Autoconf Macro, you may extend this special -# exception to the GPL to apply to your modified version as well. - -#serial 3 - -AC_DEFUN([AX_CHECK_LINK_FLAG], -[AS_VAR_PUSHDEF([CACHEVAR],[ax_cv_check_ldflags_$4_$1])dnl -AC_CACHE_CHECK([whether the linker accepts $1], CACHEVAR, [ - ax_check_save_flags=$LDFLAGS - LDFLAGS="$LDFLAGS $4 $1" - AC_LINK_IFELSE([m4_default([$5],[AC_LANG_PROGRAM()])], - [AS_VAR_SET(CACHEVAR,[yes])], - [AS_VAR_SET(CACHEVAR,[no])]) - LDFLAGS=$ax_check_save_flags]) -AS_IF([test x"AS_VAR_GET(CACHEVAR)" = xyes], - [m4_default([$2], :)], - [m4_default([$3], :)]) -AS_VAR_POPDEF([CACHEVAR])dnl -])dnl AX_CHECK_LINK_FLAGS diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/librtas-2.0.2/m4/ax_require_defined.m4 new/librtas-2.0.4/m4/ax_require_defined.m4 --- old/librtas-2.0.2/m4/ax_require_defined.m4 2018-06-15 01:49:01.000000000 +0200 +++ new/librtas-2.0.4/m4/ax_require_defined.m4 1970-01-01 01:00:00.000000000 +0100 @@ -1,37 +0,0 @@ -# =========================================================================== -# http://www.gnu.org/software/autoconf-archive/ax_require_defined.html -# =========================================================================== -# -# SYNOPSIS -# -# AX_REQUIRE_DEFINED(MACRO) -# -# DESCRIPTION -# -# AX_REQUIRE_DEFINED is a simple helper for making sure other macros have -# been defined and thus are available for use. This avoids random issues -# where a macro isn't expanded. Instead the configure script emits a -# non-fatal: -# -# ./configure: line 1673: AX_CFLAGS_WARN_ALL: command not found -# -# It's like AC_REQUIRE except it doesn't expand the required macro. -# -# Here's an example: -# -# AX_REQUIRE_DEFINED([AX_CHECK_LINK_FLAG]) -# -# LICENSE -# -# Copyright (c) 2014 Mike Frysinger <vap...@gentoo.org> -# -# Copying and distribution of this file, with or without modification, are -# permitted in any medium without royalty provided the copyright notice -# and this notice are preserved. This file is offered as-is, without any -# warranty. - -#serial 1 - -AC_DEFUN([AX_REQUIRE_DEFINED], [dnl - m4_ifndef([$1], [m4_fatal([macro ]$1[ is not defined; is a m4 file missing?])]) -])dnl AX_REQUIRE_DEFINED diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/librtas-2.0.2/m4/lib-pathname.m4 new/librtas-2.0.4/m4/lib-pathname.m4 --- old/librtas-2.0.2/m4/lib-pathname.m4 2018-06-15 01:49:01.000000000 +0200 +++ new/librtas-2.0.4/m4/lib-pathname.m4 1970-01-01 01:00:00.000000000 +0100 @@ -1,62 +0,0 @@ -dnl Determine the library path name. -dnl -dnl Red Hat systems and some other Linux systems use lib64 and lib32 rather -dnl than just lib in some circumstances. This file provides an Autoconf -dnl macro, RRA_SET_LDFLAGS, which given a variable, a prefix, and an optional -dnl suffix, adds -Lprefix/lib, -Lprefix/lib32, or -Lprefix/lib64 to the -dnl variable depending on which directories exist and the size of a long in -dnl the compilation environment. If a suffix is given, a slash and that -dnl suffix will be appended, to allow for adding a subdirectory of the library -dnl directory. -dnl -dnl This file also provides the Autoconf macro RRA_SET_LIBDIR, which sets the -dnl libdir variable to PREFIX/lib{,32,64} as appropriate. -dnl -dnl The canonical version of this file is maintained in the rra-c-util -dnl package, available at <http://www.eyrie.org/~eagle/software/rra-c-util/>. -dnl -dnl Written by Russ Allbery <ea...@eyrie.org> -dnl Copyright 2008, 2009 -dnl The Board of Trustees of the Leland Stanford Junior University -dnl -dnl This file is free software; the authors give unlimited permission to copy -dnl and/or distribute it, with or without modifications, as long as this -dnl notice is preserved. - -dnl Probe for the alternate library name that we should attempt on this -dnl architecture, given the size of an int, and set rra_lib_arch_name to that -dnl name. Separated out so that it can be AC_REQUIRE'd and not run multiple -dnl times. -dnl -dnl There is an unfortunate abstraction violation here where we assume we know -dnl the cache variable name used by Autoconf. Unfortunately, Autoconf doesn't -dnl provide any other way of getting at that information in shell that I can -dnl see. -AC_DEFUN([_RRA_LIB_ARCH_NAME], -[rra_lib_arch_name=lib - AC_CHECK_SIZEOF([long]) - AS_IF([test "$ac_cv_sizeof_long" -eq 4 && test -d /usr/lib32], - [rra_lib_arch_name=lib32], - [AS_IF([test "$ac_cv_sizeof_long" -eq 8 && test -d /usr/lib64], - [rra_lib_arch_name=lib64])])]) - -dnl Set VARIABLE to -LPREFIX/lib{,32,64} or -LPREFIX/lib{,32,64}/SUFFIX as -dnl appropriate. -AC_DEFUN([RRA_SET_LDFLAGS], -[AC_REQUIRE([_RRA_LIB_ARCH_NAME]) - AS_IF([test -d "$2/$rra_lib_arch_name"], - [AS_IF([test x"$3" = x], - [$1="[$]$1 -L$2/${rra_lib_arch_name}"], - [$1="[$]$1 -L$2/${rra_lib_arch_name}/$3"])], - [AS_IF([test x"$3" = x], - [$1="[$]$1 -L$2/lib"], - [$1="[$]$1 -L$2/lib/$3"])]) - $1=`echo "[$]$1" | sed -e 's/^ *//'`]) - -dnl Set libdir to PREFIX/lib{,32,64} as appropriate. -AC_DEFUN([RRA_SET_LIBDIR], -[AC_REQUIRE([_RRA_LIB_ARCH_NAME]) - AS_IF([test -d "$1/$rra_lib_arch_name"], - [libdir="$1/${rra_lib_arch_name}"], - [libdir="$1/lib"])]) - ++++++ librtas.fix_doc_path.patch ++++++ --- /var/tmp/diff_new_pack.EwW04d/_old 2023-01-25 17:50:10.486304627 +0100 +++ /var/tmp/diff_new_pack.EwW04d/_new 2023-01-25 17:50:10.490304647 +0100 @@ -1,8 +1,7 @@ -Index: librtas-2.0.1/Makefile.am -=================================================================== ---- librtas-2.0.1.orig/Makefile.am -+++ librtas-2.0.1/Makefile.am -@@ -3,7 +3,7 @@ ACLOCAL_AMFLAGS = -I m4 +diff -ur librtas-2.0.4~/Makefile.am librtas-2.0.4/Makefile.am +--- librtas-2.0.4~/Makefile.am 2023-01-24 19:08:58.000000000 +0100 ++++ librtas-2.0.4/Makefile.am 2023-01-25 12:35:10.011935185 +0100 +@@ -3,7 +3,7 @@ EXTRA_DIST = README COPYING.LESSER EXTRA_DIST += doc/doxygen.rtas doc/doxygen.rtasevent Changelog @@ -10,5 +9,5 @@ +docdir = $(datadir)/doc/packages/@PACKAGE@ doc_DATA = README COPYING.LESSER - pkgconfigdir = $(libdir)/pkgconfig + bin_PROGRAMS=