Notification time stamped 2023-06-30 22:52:17 UTC
From d5dc87ea90091b6e3664fe94da0c8ece672fb320 Mon Sep 17 00:00:00 2001
From: Kevin Buettner <kevinb(a)redhat.com>
Date: Jun 30 2023 22:20:10 +0000
Subject: Suppress repeated warnings when loading a core file
Backport upstream changes which prevent repeated warnings from being
printed when loading a core file (RHBZ 2160211, Lancelot SIX).
---
diff --git a/_gdb.spec.Patch.include b/_gdb.spec.Patch.include
index 1befb33..eeed776 100644
--- a/_gdb.spec.Patch.include
+++ b/_gdb.spec.Patch.include
@@ -206,3 +206,8 @@ Patch046: gdb-binutils29988-read_indexed_address.patch
# first seen when building with GCC 13.1.1 20230426 (Red Hat ;; 13.1.1-1).
Patch047: gdb-rhbz2192105-ftbs-dangling-pointer
+# Backport two commits, 0ad504dd464 and ea70f941f9b, from Lancelot SIX
+# which prevent repeated warnings from being printed while loading a
+# core file. (RH BZ 2160211)
+Patch048: gdb-rhbz2160211-excessive-core-file-warnings.patch
+
diff --git a/_gdb.spec.patch.include b/_gdb.spec.patch.include
index 8258dc9..ef55dd0 100644
--- a/_gdb.spec.patch.include
+++ b/_gdb.spec.patch.include
@@ -45,3 +45,4 @@
%patch -p1 -P045
%patch -p1 -P046
%patch -p1 -P047
+%patch -p1 -P048
diff --git a/_patch_order b/_patch_order
index 6c3981d..cddc2ce 100644
--- a/_patch_order
+++ b/_patch_order
@@ -45,3 +45,4 @@ gdb-add-index.patch
gdb-rhbz1553104-s390x-arch12-test.patch
gdb-binutils29988-read_indexed_address.patch
gdb-rhbz2192105-ftbs-dangling-pointer
+gdb-rhbz2160211-excessive-core-file-warnings.patch
diff --git a/gdb-rhbz2160211-excessive-core-file-warnings.patch b/gdb-rhbz2160211-excessive-core-file-warnings.patch
new file mode 100644
index 0000000..a790054
--- /dev/null
+++ b/gdb-rhbz2160211-excessive-core-file-warnings.patch
@@ -0,0 +1,108 @@
+From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
+From: Kevin Buettner <kevinb(a)redhat.com>
+Date: Thu, 29 Jun 2023 18:20:30 -0700
+Subject: gdb-rhbz2160211-excessive-core-file-warnings.patch
+
+;; Backport two commits, 0ad504dd464 and ea70f941f9b, from Lancelot SIX
+;; which prevent repeated warnings from being printed while loading a
+;; core file. (RH BZ 2160211)
+
+gdb/corelow.c: avoid repeated warnings in build_file_mappings
+
+When GDB opens a coredump it tries to locate and then open all files
+which were mapped in the process.
+
+If a file is found but cannot be opened with BFD (bfd_open /
+bfd_check_format fails), then a warning is printed to the user. If the
+same file was mapped multiple times in the process's address space, the
+warning is printed once for each time the file was mapped. I find this
+un-necessarily noisy.
+
+This patch makes it so the warning message is printed only once per
+file.
+
+There was a comment in the code assuming that if the file was found on
+the system, opening it (bfd_open + bfd_check_format) should always
+succeed. A recent change in BFD (014a602b86f "Don't optimise bfd_seek
+to same position") showed that this assumption is not valid. For
+example, it is possible to have a core dump of a process which had
+mmaped an IO page from a DRI render node (/dev/dri/runderD$NUM). In
+such case the core dump does contain the information that portions of
+this special file were mapped in the host process, but trying to seek to
+position 0 will fail, making bfd_check_format fail. This patch removes
+this comment.
+
+Reviewed-By: John Baldwin <jhb(a)FreeBSD.org>
+Approved-By: Andrew Burgess <aburgess(a)redhat.com>
+
+gdb/corelow.c: do not try to reopen a file if open failed once
+
+In the current implementation, core_target::build_file_mappings will try
+to locate and open files which were mapped in the process for which the
+core dump was produced. If the file cannot be found or cannot be
+opened, GDB will re-try to open it once for each time it was mapped in
+the process's address space.
+
+This patch makes it so GDB recognizes that it has already failed to open
+a given file once and does not re-try the process for each mapping.
+
+Reviewed-By: John Baldwin <jhb(a)FreeBSD.org>
+Approved-By: Andrew Burgess <aburgess(a)redhat.com>
+
+diff --git a/gdb/corelow.c b/gdb/corelow.c
+--- a/gdb/corelow.c
++++ b/gdb/corelow.c
+@@ -237,6 +237,16 @@ core_target::build_file_mappings ()
+ weed out non-file-backed mappings. */
+ gdb_assert (filename != nullptr);
+
++ if (unavailable_paths.find (filename) != unavailable_paths.end ())
++ {
++ /* We have already seen some mapping for FILENAME but failed to
++ find/open the file. There is no point in trying the same
++ thing again so just record that the range [start, end) is
++ unavailable. */
++ m_core_unavailable_mappings.emplace_back (start, end - start);
++ return;
++ }
++
+ struct bfd *bfd = bfd_map[filename];
+ if (bfd == nullptr)
+ {
+@@ -254,11 +264,10 @@ core_target::build_file_mappings ()
+ if (expanded_fname == nullptr)
+ {
+ m_core_unavailable_mappings.emplace_back (start, end - start);
+- /* Print just one warning per path. */
+- if (unavailable_paths.insert (filename).second)
+- warning (_("Can't open file %s during file-backed mapping "
+- "note processing"),
+- filename);
++ unavailable_paths.insert (filename);
++ warning (_("Can't open file %s during file-backed mapping "
++ "note processing"),
++ filename);
+ return;
+ }
+
+@@ -268,18 +277,11 @@ core_target::build_file_mappings ()
+ if (bfd == nullptr || !bfd_check_format (bfd, bfd_object))
+ {
+ m_core_unavailable_mappings.emplace_back (start, end - start);
+- /* If we get here, there's a good chance that it's due to
+- an internal error. We issue a warning instead of an
+- internal error because of the possibility that the
+- file was removed in between checking for its
+- existence during the expansion in exec_file_find()
+- and the calls to bfd_openr() / bfd_check_format().
+- Output both the path from the core file note along
+- with its expansion to make debugging this problem
+- easier. */
++ unavailable_paths.insert (filename);
+ warning (_("Can't open file %s which was expanded to %s "
+ "during file-backed mapping note processing"),
+ filename, expanded_fname.get ());
++
+ if (bfd != nullptr)
+ bfd_close (bfd);
+ return;
diff --git a/gdb.spec b/gdb.spec
index ba0ab43..13e4f89 100644
--- a/gdb.spec
+++ b/gdb.spec
@@ -57,7 +57,7 @@ Version: 13.2
# The release always contains a leading reserved number, start it at 1.
# `upstream' is not a part of `name' to stay fully rpm dependencies compatible for the testing.
-Release: 2%{?dist}
+Release: 3%{?dist}
License: GPLv3+ and GPLv3+ with exceptions and GPLv2+ and GPLv2+ with exceptions and GPL+ and LGPLv2+ and LGPLv3+ and BSD and Public Domain and GFDL
# Do not provide URL for snapshots as the file lasts there only for 2 days.
@@ -1252,10 +1252,14 @@ fi
%endif
%changelog
-* Wed Jun 28 2023 Python Maint <python-maint(a)redhat.com>
+* Fri Jun 30 2023 Kevin Buettner <kevinb(a)redhat.com> - 13.2-3
+- Backport upstream changes which prevent repeated warnings from being
+ printed when loading a core file (RHBZ 2160211, Lancelot SIX).
+
+* Wed Jun 28 2023 Python Maint <python-maint(a)redhat.com> - 13.2-2
- Rebuilt for Python 3.12
-* Sun Jun 25 2023 Alexandra Hájková <ahajkova(a)redhat.com> - 13.2
+* Sun Jun 25 2023 Alexandra Hájková <ahajkova(a)redhat.com> - 13.2-1
- Rebase to FSF GDB 13.22.
- Remove gdb-rhbz2177655-aarch64-pauth-valid-regcache.patch.
- Remove gdb-rhbz2183595-rustc-inside_main.patch.
https://src.fedoraproject.org/rpms/gdb/c/d5dc87ea90091b6e3664fe94da0c8ece67…
Notification time stamped 2023-06-30 22:13:59 UTC
From dd85126482279a858caae33415135f7a4739fb3d Mon Sep 17 00:00:00 2001
From: Mark Wielaard <mjw(a)redhat.com>
Date: Jun 30 2023 22:13:07 +0000
Subject: 5.0-9 - Add 0001-find-debuginfo-Add-v-verbose-for-per-file-messages.patch
---
diff --git a/0001-find-debuginfo-Add-v-verbose-for-per-file-messages.patch b/0001-find-debuginfo-Add-v-verbose-for-per-file-messages.patch
new file mode 100644
index 0000000..a8294a9
--- /dev/null
+++ b/0001-find-debuginfo-Add-v-verbose-for-per-file-messages.patch
@@ -0,0 +1,199 @@
+From 84cfaca936a9dcfc26bd9d59edbdeeae88fc4763 Mon Sep 17 00:00:00 2001
+From: Denys Vlasenko <dvlasenk(a)redhat.com>
+Date: Thu, 22 Jun 2023 15:31:03 +0200
+Subject: [PATCH] find-debuginfo: Add -v,--verbose for per file messages
+
+Only print messages what big steps we are at without --verbose.
+
+For a reader of rpmbuild's log, it's rather unclear what find-debuginfo
+is doing. It used to be too verbose, "extracting debug info from FILE"
+for every file, and while this can be suppressed now, we still end up
+with something semi-mysterious like this:
+
+...
+extracting debug info from /builddir/build/BUILDROOT/xyz
+gdb-add-index: No index was created for /builddir/build/BUILDROOT/xyz
+gdb-add-index: [Was there no debuginfo? Was there already an index?]
+symlinked /usr/lib/debug/usr/lib64/libcpupower.so.0.0.1.debug to /usr/lib/debug/usr/lib64/libcpupower.so.debug
+symlinked /usr/lib/debug/usr/lib64/libcpupower.so.0.0.1.debug to /usr/lib/debug/usr/lib64/libcpupower.so.0.debug
+cpio: binutils-2.30/bfd: Cannot stat: No such file or directory
+cpio: binutils-2.30/bfd/aout-target.h: Cannot stat: No such file or directory
+cpio: binutils-2.30/bfd/aoutx.h: Cannot stat: No such file or directory
+cpio: binutils-2.30/bfd/archive.c: Cannot stat: No such file or directory
+cpio: binutils-2.30/bfd/archive64.c: Cannot stat: No such file or directory
+...
+775655 blocks
++ /usr/lib/rpm/check-buildroot
++ /usr/lib/rpm/redhat/brp-ldconfig
+...
+
+The reader is left confused. "What these cpio errors are about?
+Why those sources are not found?" (Well, because not every source
+name extracted by 'debugedit -l' has to exist, but this requires
+considerable digging aroung to understand).
+
+We can give a few messages explaining what general steps we go through:
+
+ Extracting debug info from N files
+ DWARF-compressing N files
+ Creating .debug symlinks for symlinks to ELF files
+ Copying sources found by 'debugedit -l'
+
+This is also useful to get a feeling which steps are time consuming.
+Kernel builds often need to investigate this aspect. To help a bit more,
+add "find-debuginfo: starting" and "find-debuginfo: done" messages too.
+
+This patch adds these messages.
+The -q options suppress these messages too.
+
+It also adds a --verbose flag to print per file messages.
+Those per file messages are now suppressed by default and
+only the general step messages are show. Unless -q is given,
+which suppresses all non-error output.
+
+Signed-off-by: Denys Vlasenko <dvlasenk(a)redhat.com>
+Signed-off-by: Mark Wielaard <mark(a)klomp.org>
+---
+ scripts/find-debuginfo.in | 36 +++++++++++++++++++++++++++---------
+ 1 file changed, 27 insertions(+), 9 deletions(-)
+
+diff --git a/scripts/find-debuginfo.in b/scripts/find-debuginfo.in
+index f87b777..5613f69 100755
+--- a/scripts/find-debuginfo.in
++++ b/scripts/find-debuginfo.in
+@@ -26,7 +26,7 @@ Usage: find-debuginfo [OPTION]... [builddir]
+ automagically generates debug info and file lists
+
+ Options:
+-[--strict-build-id] [-g] [-r] [-m] [-i] [-n] [-q]
++[--strict-build-id] [-g] [-r] [-m] [-i] [-n] [-q] [-v]
+ [--keep-section SECTION] [--remove-section SECTION]
+ [--g-libs]
+ [-j N] [--jobs N]
+@@ -94,7 +94,9 @@ will be called /usr/debug/src/<BASE>. This makes sure the debug source
+ dirs are unique between package version, release and achitecture (Use
+ --unique-debug-src-base "%{name}-%{VERSION}-%{RELEASE}.%{_arch}")
+
+-The -q or --quiet flag silences non-error output from the script.
++The -q or --quiet flag silences all non-error output from the script.
++The -v or --verbose flag add more output for all files processed.
++When neither -q or -v is given then only output for each pass is given.
+
+ All file names in switches are relative to builddir ('.' if not given).
+ EOF
+@@ -150,9 +152,12 @@ n_jobs=1
+ # exit early on --version or --help
+ done=false
+
+-# silence non-error output
++# silence all output
+ quiet=false
+
++# add more non-error output
++verbose=false
++
+ BUILDDIR=.
+ out=debugfiles.list
+ srcout=
+@@ -248,6 +253,11 @@ while [ $# -gt 0 ]; do
+ ;;
+ -q|--quiet)
+ quiet=true
++ verbose=false
++ ;;
++ -v|--verbose)
++ quiet=false
++ verbose=true
+ ;;
+ --version)
+ echo "find-debuginfo @VERSION@"
+@@ -291,6 +301,8 @@ if [ "$strip_g" = "true" ] && [ "$strip_glibs" = "true" ]; then
+ exit 2
+ fi
+
++$quiet || echo "find-debuginfo: starting" 2>&1
++
+ i=0
+ while ((i < nout)); do
+ outs[$i]="$BUILDDIR/${outs[$i]}"
+@@ -447,7 +459,7 @@ do_file()
+ get_debugfn "$f"
+ [ -f "${debugfn}" ] && return
+
+- $quiet || echo "extracting debug info from $f"
++ $verbose && echo "extracting debug info from $f"
+ # See also cpio SOURCEFILE copy. Directories must match up.
+ debug_base_name="$RPM_BUILD_DIR"
+ debug_dest_name="/usr/src/debug"
+@@ -523,7 +535,7 @@ do_file()
+ grep "^$inum " "$temp/linked" | while read inum linked; do
+ link=$debugfn
+ get_debugfn "$linked"
+- $quiet || echo "hard linked $link to $debugfn"
++ $verbose && echo "hard linked $link to $debugfn"
+ mkdir -p "$(dirname "$debugfn")" && ln -nf "$link" "$debugfn"
+ done
+ fi
+@@ -551,6 +563,7 @@ run_job()
+ }
+
+ n_files=$(wc -l <"$temp/primary")
++$quiet || echo "Extracting debug info from $n_files files" 2>&1
+ if [ $n_jobs -gt $n_files ]; then
+ n_jobs=$n_files
+ fi
+@@ -589,7 +602,8 @@ if $run_dwz \
+ && [ -d "${RPM_BUILD_ROOT}/usr/lib/debug" ]; then
+ readarray dwz_files < <(cd "${RPM_BUILD_ROOT}/usr/lib/debug"; find -type f -name \*.debug | LC_ALL=C sort)
+ if [ ${#dwz_files[@]} -gt 0 ]; then
+- $quiet || size_before=$(du -sk ${RPM_BUILD_ROOT}/usr/lib/debug | cut -f1)
++ $quiet || echo "DWARF-compressing ${#dwz_files[@]} files" 2>&1
++ $verbose && size_before=$(du -sk ${RPM_BUILD_ROOT}/usr/lib/debug | cut -f1)
+ dwz_multifile_name="${RPM_PACKAGE_NAME}-${RPM_PACKAGE_VERSION}-${RPM_PACKAGE_RELEASE}.${RPM_ARCH}"
+ dwz_multifile_suffix=
+ dwz_multifile_idx=0
+@@ -613,8 +627,8 @@ if $run_dwz \
+ echo >&2 "*** ERROR: DWARF compression requested, but no dwz installed"
+ exit 2
+ fi
+- $quiet || size_after=$(du -sk ${RPM_BUILD_ROOT}/usr/lib/debug | cut -f1)
+- $quiet || echo "original debug info size: ${size_before}kB, size after compression: ${size_after}kB"
++ $verbose && size_after=$(du -sk ${RPM_BUILD_ROOT}/usr/lib/debug | cut -f1)
++ $verbose && echo "original debug info size: ${size_before}kB, size after compression: ${size_after}kB"
+ # Remove .dwz directory if empty
+ rmdir "${RPM_BUILD_ROOT}/usr/lib/debug/.dwz" 2>/dev/null
+
+@@ -627,6 +641,7 @@ fi
+
+ # For each symlink whose target has a .debug file,
+ # make a .debug symlink to that file.
++$quiet || echo "Creating .debug symlinks for symlinks to ELF files" 2>&1
+ find "$RPM_BUILD_ROOT" ! -path "${debugdir}/*" -type l -print |
+ while read f
+ do
+@@ -634,7 +649,7 @@ do
+ f=${f#$RPM_BUILD_ROOT}
+ t=${t#$RPM_BUILD_ROOT}
+ if [ -f "$debugdir$t" ]; then
+- $quiet || echo "symlinked /usr/lib/debug$t to /usr/lib/debug${f}.debug"
++ $verbose && echo "symlinked /usr/lib/debug$t to /usr/lib/debug${f}.debug"
+ debug_link "/usr/lib/debug$t" "${f}.debug"
+ fi
+ done
+@@ -648,6 +663,7 @@ if [ -s "$SOURCEFILE" ]; then
+ debug_dest_name="/usr/src/debug/${unique_debug_src_base}"
+ fi
+
++ $quiet || echo "Copying sources found by 'debugedit -l' to ${debug_dest_name}" 2>&1
+ mkdir -p "${RPM_BUILD_ROOT}${debug_dest_name}"
+ # Filter out anything compiler generated which isn't a source file.
+ # e.g. <internal>, <built-in>, <__thread_local_inner macros>.
+@@ -763,3 +779,5 @@ if ((nout > 0)); then
+ cat "$LISTFILE" >> "${LISTFILE}.new"
+ mv "${LISTFILE}.new" "$LISTFILE"
+ fi
++
++$quiet || echo "find-debuginfo: done" 2>&1
+--
+2.39.3
+
diff --git a/debugedit.spec b/debugedit.spec
index fe6e7a4..f256590 100644
--- a/debugedit.spec
+++ b/debugedit.spec
@@ -1,6 +1,6 @@
Name: debugedit
Version: 5.0
-Release: 8%{?dist}
+Release: 9%{?dist}
Summary: Tools for debuginfo creation
License: GPLv3+ and GPLv2+ and LGPLv2+
URL: https://sourceware.org/debugedit/
@@ -48,6 +48,7 @@ Patch4: 0002-configure.ac-Use-AC_LINK_IFELSE-for-gz-none-check.patch
Patch5: 0003-configure.ac-Use-AC_LANG_PROGRAM-for-AC_LINK_IFELSE-.patch
Patch6: 0004-scripts-find-debuginfo.in-Add-q-quiet.patch
Patch7: 0001-find-debuginfo-Prefix-install_dir-to-PATH.patch
+Patch8: 0001-find-debuginfo-Add-v-verbose-for-per-file-messages.patch
%description
The debugedit project provides programs and scripts for creating
@@ -89,6 +90,9 @@ make check %{?_smp_mflags}
%{_mandir}/man1/find-debuginfo.1*
%changelog
+* Fri Jun 30 2023 Mark Wielaard <mjw(a)fedoraproject.org> - 5.0-9
+- Add 0001-find-debuginfo-Add-v-verbose-for-per-file-messages.patch
+
* Fri Jun 30 2023 Mark Wielaard <mjw(a)fedoraproject.org> - 5.0-8
- Add 0001-find-debuginfo-Prefix-install_dir-to-PATH.patch
https://src.fedoraproject.org/rpms/debugedit/c/dd85126482279a858caae3341513…
Notification time stamped 2023-06-30 21:23:38 UTC
From d8c250c97c99ae059588e4a1ea79789bf421ff5b Mon Sep 17 00:00:00 2001
From: Jerry James <loganjerry(a)gmail.com>
Date: Jun 30 2023 21:23:24 +0000
Subject: Initial import
---
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..6baf5b5
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
+/ppx_stable_witness-*.tar.gz
diff --git a/ocaml-ppx-stable-witness.spec b/ocaml-ppx-stable-witness.spec
new file mode 100644
index 0000000..fd2057f
--- /dev/null
+++ b/ocaml-ppx-stable-witness.spec
@@ -0,0 +1,54 @@
+%ifnarch %{ocaml_native_compiler}
+%global debug_package %{nil}
+%endif
+
+Name: ocaml-ppx-stable-witness
+Version: 0.16.0
+Release: 1%{?dist}
+Summary: Derive a witness that a type is intended to be stable
+
+License: MIT
+URL: https://github.com/janestreet/ppx_stable_witness
+Source0: %{url}/archive/v%{version}/ppx_stable_witness-%{version}.tar.gz
+
+BuildRequires: ocaml >= 4.14.0
+BuildRequires: ocaml-dune >= 2.0.0
+BuildRequires: ocaml-base-devel
+BuildRequires: ocaml-ppxlib-devel >= 0.28.0
+
+%description
+Ppx_stable_witnesss is a ppx extension for deriving a witness that a
+type is intended to be stable. In this context, stable means that the
+serialization format will never change. This allows programs running at
+different versions of the code to communicate safely.
+
+%package devel
+Summary: Development files for %{name}
+Requires: %{name}%{?_isa} = %{version}-%{release}
+Requires: ocaml-base-devel%{?_isa}
+Requires: ocaml-ppxlib-devel%{?_isa}
+
+%description devel
+The %{name}-devel package contains libraries and signature
+files for developing applications that use %{name}.
+
+%prep
+%autosetup -n ppx_stable_witness-%{version}
+
+%build
+%dune_build
+
+%install
+%dune_install
+
+%check
+%dune_check
+
+%files -f .ofiles
+%license LICENSE.md
+
+%files devel -f .ofiles-devel
+
+%changelog
+* Sat Jun 24 2023 Jerry James <loganjerry(a)gmail.com> - 0.16.0-1
+- Initial RPM
diff --git a/sources b/sources
new file mode 100644
index 0000000..3c6234f
--- /dev/null
+++ b/sources
@@ -0,0 +1 @@
+SHA512 (ppx_stable_witness-0.16.0.tar.gz) = 386688f6b9bed1fa481030f881b124681c18a49c8a1933233a7cd90dff5ddb4f1739cfb2d1c5262b2e7c2c2e593c9f141af6565a5596547c1770e19e2422ea36
https://src.fedoraproject.org/rpms/ocaml-ppx-stable-witness/c/d8c250c97c99a…