libctf: update regexp to allow makeinfo to build document

Signed-off-by: WizardHowl <liuwenyu7@huawei.com>
This commit is contained in:
Wenyu Liu 2023-08-03 17:34:29 +08:00
parent 2eb8f50a82
commit bffdd7c6f1
2 changed files with 81 additions and 1 deletions

View File

@ -0,0 +1,76 @@
From 24669c55aed712c192b80456295cce122c7d5f73 Mon Sep 17 00:00:00 2001
From: Enze Li <enze.li@hotmail.com>
Date: Sat, 14 Jan 2023 11:33:48 +0800
Subject: [PATCH] libctf: update regexp to allow makeinfo to build document
While trying to build gdb on latest openSUSE Tumbleweed, I noticed the
following warning,
checking for makeinfo... makeinfo --split-size=5000000
configure: WARNING:
*** Makeinfo is too old. Info documentation will not be built.
then I checked the version of makeinfo, it said,
======
$ makeinfo --version
texi2any (GNU texinfo) 7.0.1
Copyright (C) 2022 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
======
After digging a little bit, it became quite obvious that a dot is
missing in regexp that makes it impossible to match versions higher than
7.0, and here's the solution:
- | egrep 'texinfo[^0-9]*(6\.[3-9]|[7-9][0-9])' >/dev/null 2>&1; then
+ | egrep 'texinfo[^0-9]*(6\.[3-9]|[7-9]\.[0-9])' >/dev/null 2>&1; then
However, Eli pointed out that the solution above has another problem: it
will stop working when Texinfo 10.1 will be released. Meanwhile, he
suggested to solve this problem permanently. That is, we don't care
about the minor version for Texinfo > 6.9, we only care about the major
version.
In this way, the problem will be resolved permanently, thanks to Eli.
libctf/ChangeLog:
* configure: Regenerated.
* configure.ac: Update regexp to match versions higher than 7.0.
---
libctf/configure | 2 +-
libctf/configure.ac | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/libctf/configure b/libctf/configure
index c22f7dffd2c..a0e40f49a80 100755
--- a/libctf/configure
+++ b/libctf/configure
@@ -14864,7 +14864,7 @@ esac
# We require texinfo to be 6.3 or later, for a working synindex
# and validatemenus: otherwise we fall back to /bin/true.
if ${MAKEINFO} --version \
- | egrep 'texinfo[^0-9]*(6\.[3-9]|[7-9][0-9])' >/dev/null 2>&1; then
+ | egrep 'texinfo[^0-9]*(6\.[3-9]|[7-9]|[1-6][0-9])' >/dev/null 2>&1; then
build_info=yes
else
build_info=
diff --git a/libctf/configure.ac b/libctf/configure.ac
index 1d0cf4d0fa5..6a5eade1855 100644
--- a/libctf/configure.ac
+++ b/libctf/configure.ac
@@ -184,7 +184,7 @@ changequote(,)
# We require texinfo to be 6.3 or later, for a working synindex
# and validatemenus: otherwise we fall back to /bin/true.
if ${MAKEINFO} --version \
- | egrep 'texinfo[^0-9]*(6\.[3-9]|[7-9][0-9])' >/dev/null 2>&1; then
+ | egrep 'texinfo[^0-9]*(6\.[3-9]|[7-9]|[1-6][0-9])' >/dev/null 2>&1; then
build_info=yes
else
build_info=
--
2.33.0

View File

@ -1,6 +1,6 @@
Name: gdb
Version: 12.1
Release: 5
Release: 6
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-1.3
Source: https://ftp.gnu.org/gnu/gdb/gdb-%{version}.tar.xz
@ -93,6 +93,7 @@ Patch80: gdb-python-remove-Python-2-support.patch
Patch81: gdb-Use-bool-for-evregpy_no_listeners_p.patch
Patch82: gdb-Make-import-gdb.events-work.patch
Patch83: gdb-Handle-Python-3.11-deprecation-of-PySys_SetPath-and-.patch
Patch84: gdb-libctf-update-regexp-to-allow-makeinfo-to-build-docu.patch
%global gdb_src gdb-%{version}
%global gdb_build build-%{_target_platform}
@ -368,6 +369,9 @@ rm -f $RPM_BUILD_ROOT%{_datadir}/gdb/python/gdb/command/backtrace.py
%{_infodir}/ctf-spec.info.gz
%changelog
* Thu Aug 3 2023 Wenyu Liu <liuwenyu7@huawei.com> - 12.1-6
- libctf: update regexp to allow makeinfo to build document
* Thu Jul 27 2023 Wenyu Liu <liuwenyu7@huawei.com> - 12.1-5
- Handle Python 3.11 deprecation of PySys_SetPath and Py_SetProgramName