public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/gdb] gdb-17.2-rebase-f44: avoid reading git config files for generate-patches-from-git-repo.sh
@ 2026-06-28  0:01 Andrew Burgess
  0 siblings, 0 replies; only message in thread
From: Andrew Burgess @ 2026-06-28  0:01 UTC (permalink / raw)
  To: git-commits

            A new commit has been pushed.

            Repo   : rpms/gdb
            Branch : gdb-17.2-rebase-f44
            Commit : 12e32a6cf8778410bce3a327a039d6ae70da1b12
            Author : Andrew Burgess <aburgess@redhat.com>
            Date   : 2025-01-03T10:33:34+00:00
            Stats  : +27/-13 in 5 file(s)
            URL    : https://src.fedoraproject.org/rpms/gdb/c/12e32a6cf8778410bce3a327a039d6ae70da1b12?branch=gdb-17.2-rebase-f44

            Log:
            avoid reading git config files for generate-patches-from-git-repo.sh

On a different pull request[1] it was pointed out that, when others
regenerated the patches, they were seeing changes in the diff headers
relating the texinfo files, for example:

  diff --git a/gdb-remove-qnx-neutrino-support.patch b/gdb-remove-qnx-neutrino-support.patch
  index 3a35b17..d13c9a1 100644
  --- a/gdb-remove-qnx-neutrino-support.patch
  +++ b/gdb-remove-qnx-neutrino-support.patch
  @@ -151,7 +151,7 @@ diff --git a/gdb/configure.tgt b/gdb/configure.tgt
   diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
   --- a/gdb/doc/gdb.texinfo
   +++ b/gdb/doc/gdb.texinfo
  -@@ -2742,7 +2742,7 @@
  +@@ -2742,7 +2742,7 @@ environment:
    @end smallexample

    This command is available when debugging locally on most targets, excluding

Notice the change on the '@@' line.  This was caused by me having
'diff.texinfo.xfuncname' set in my ~/.gitconfig file.  Actually, the
value I had set was incorrect, which is why the line was originally
blank, but that's not really relevant here.

What this highlights is that different users might have different git
settings in place, and these settings can impact the diff generation,
which is not good when we rely on consistent .patch file creation.

Obviously, different versions of git might themselves result in
slightly different patch files, but for now we choose to ignore that
problem.

However, we can solve the problem of different users having different
git settings in their configuration files, by instructing git to not
read any configuration files when creating the .patch files, this is
done by setting both GIT_CONFIG_SYSTEM and GIT_CONFIG_GLOBAL to
/dev/null.  These environment variables were added in git 2.32.

This commit makes this change, and then regenerates the .patch files.
Hopefully, these files should all regenerate consistently from now
on.

[1] https://src.fedoraproject.org/rpms/gdb/pull-request/164

---
diff --git a/gdb-add-rpm-suggestion-script.patch b/gdb-add-rpm-suggestion-script.patch
index 8309b39..51357f4 100644
--- a/gdb-add-rpm-suggestion-script.patch
+++ b/gdb-add-rpm-suggestion-script.patch
@@ -25,7 +25,7 @@ diff --git a/gdb/data-directory/Makefile.in b/gdb/data-directory/Makefile.in
 diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
 --- a/gdb/doc/gdb.texinfo
 +++ b/gdb/doc/gdb.texinfo
-@@ -186,6 +186,7 @@
+@@ -186,6 +186,7 @@ software in general.  We will miss him.
  * Trace File Format::		@value{GDBN} trace file format
  * Index Section Format::        .gdb_index section format
  * Debuginfod::                  Download debugging resources with @code{debuginfod}
@@ -33,7 +33,7 @@ diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
  * Man Pages::                   Manual pages
  * Copying::                     GNU General Public License says
                                  how you can copy and share @value{GDBN}
-@@ -50341,6 +50342,111 @@
+@@ -50341,6 +50342,111 @@ Show the current verbosity setting.
  
  @end table
  

diff --git a/gdb-backport-buildid-related-changes.patch b/gdb-backport-buildid-related-changes.patch
index 4dd2d8b..7ace8c5 100644
--- a/gdb-backport-buildid-related-changes.patch
+++ b/gdb-backport-buildid-related-changes.patch
@@ -1504,7 +1504,7 @@ diff --git a/gdb/debuginfod-support.c b/gdb/debuginfod-support.c
 diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
 --- a/gdb/doc/gdb.texinfo
 +++ b/gdb/doc/gdb.texinfo
-@@ -21786,6 +21786,7 @@
+@@ -21786,6 +21786,7 @@ contained in @var{filename} by using the @samp{-readnever} option.
  @c (eg rooted in val of env var GDBSYMS) could exist for mappable symbol
  @c files.
  
@@ -1512,7 +1512,7 @@ diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
  @kindex core-file
  @item core-file @r{[}@var{filename}@r{]}
  @itemx core
-@@ -24534,6 +24535,10 @@
+@@ -24534,6 +24535,10 @@ future connections is shown.  The available settings are:
  @tab @code{vFile:fstat}
  @tab Host I/O
  
@@ -1523,7 +1523,7 @@ diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
  @item @code{hostio-setfs-packet}
  @tab @code{vFile:setfs}
  @tab Host I/O
-@@ -46289,6 +46294,13 @@
+@@ -46289,6 +46294,13 @@ and the return value is the size of this attachment in bytes.
  If an error occurs the return value is -1.  The format of the
  returned binary attachment is as described in @ref{struct stat}.
  
@@ -1540,7 +1540,7 @@ diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
 diff --git a/gdb/doc/python.texi b/gdb/doc/python.texi
 --- a/gdb/doc/python.texi
 +++ b/gdb/doc/python.texi
-@@ -231,6 +231,7 @@
+@@ -231,6 +231,7 @@ optional arguments while skipping others.  Example:
  * TUI Windows In Python::       Implementing new TUI windows.
  * Disassembly In Python::       Instruction Disassembly In Python
  * Missing Debug Info In Python:: Handle missing debug info from Python.
@@ -1548,7 +1548,7 @@ diff --git a/gdb/doc/python.texi b/gdb/doc/python.texi
  @end menu
  
  @node Basic Python
-@@ -5370,10 +5371,11 @@
+@@ -5370,10 +5371,11 @@ The @code{frame_filters} attribute is a dictionary of frame filter
  objects.  @xref{Frame Filter API}, for more information.
  @end defvar
  
@@ -1564,7 +1564,7 @@ diff --git a/gdb/doc/python.texi b/gdb/doc/python.texi
  @end defvar
  
  A program space has the following methods:
-@@ -5549,6 +5551,7 @@
+@@ -5549,6 +5551,7 @@ Separate debug info objfiles are added with the
  @code{gdb.Objfile.add_separate_debug_file} method, described below.
  @end defvar
  
@@ -1572,7 +1572,7 @@ diff --git a/gdb/doc/python.texi b/gdb/doc/python.texi
  @defvar Objfile.build_id
  The build ID of the objfile as a string.
  If the objfile does not have a build ID then the value is @code{None}.
-@@ -8137,6 +8140,189 @@
+@@ -8137,6 +8140,189 @@ returns a value other than @code{None}, no further handlers are called
  for this objfile.
  @end defun
  

diff --git a/gdb-remove-qnx-neutrino-support.patch b/gdb-remove-qnx-neutrino-support.patch
index 3a35b17..d13c9a1 100644
--- a/gdb-remove-qnx-neutrino-support.patch
+++ b/gdb-remove-qnx-neutrino-support.patch
@@ -151,7 +151,7 @@ diff --git a/gdb/configure.tgt b/gdb/configure.tgt
 diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
 --- a/gdb/doc/gdb.texinfo
 +++ b/gdb/doc/gdb.texinfo
-@@ -2742,7 +2742,7 @@
+@@ -2742,7 +2742,7 @@ environment:
  @end smallexample
  
  This command is available when debugging locally on most targets, excluding
@@ -160,7 +160,7 @@ diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
  
  @kindex set startup-with-shell
  @anchor{set startup-with-shell}
-@@ -22011,7 +22011,7 @@
+@@ -22011,7 +22011,7 @@ name and remembers it that way.
  @cindex shared libraries
  @anchor{Shared Libraries}
  @value{GDBN} supports @sc{gnu}/Linux, MS-Windows, SunOS,
@@ -169,7 +169,7 @@ diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
  DSBT (TIC6X) shared libraries.
  
  On MS-Windows @value{GDBN} must be linked with the Expat library to support
-@@ -25203,16 +25203,6 @@
+@@ -25203,16 +25203,6 @@ Show the file to which @code{procfs} API trace is written.
  These commands enable and disable tracing of entries into and exits
  from the @code{syscall} interface.
  

diff --git a/gdb.spec b/gdb.spec
index 1169987..d082119 100644
--- a/gdb.spec
+++ b/gdb.spec
@@ -928,6 +928,13 @@ fi
 # endif scl
 
 %changelog
+* Thu Jan 02 2025 Andrew Burgess <aburgess@redhat.com>
+- Update generate-patches-from-git-repo.sh script, and regenerate
+  patches.  This changed gdb-add-rpm-suggestion-script.patch,
+  gdb-backport-buildid-related-changes.patch, and
+  gdb-remove-qnx-neutrino-support.patch.  In each case, there is no
+  significant change, only the diff header itself changed.
+
 * Wed Dec 11 2024 Andrew Burgess <aburgess@redhat.com>
 - Remove gdb-6.6-buildid-locate-tests.patch patch, merge the tests
   from this patch into gdb-add-rpm-suggestion-script.patch.  The tests

diff --git a/generate-patches-from-git-repo.sh b/generate-patches-from-git-repo.sh
index d399d78..1937a3c 100755
--- a/generate-patches-from-git-repo.sh
+++ b/generate-patches-from-git-repo.sh
@@ -83,7 +83,14 @@ for c in `git rev-list --reverse ${common_ancestor}..HEAD` ; do
     # before, even if nothing has changed.  This is bad, so we replace
     # the commit hash by something constant (the string
     # "FEDORA_PATCHES").
-    git format-patch --no-base --no-thread --no-signature --no-stat \
+    #
+    # Also, different users, or systems, might configure git in
+    # different ways (e.g. the diff.*.xfuncname setting), which can
+    # mean the generated diff files will change from system to system.
+    # Avoid this by disabling all config file reading, this relies on
+    # git 2.32 or later.
+    GIT_CONFIG_SYSTEM=/dev/null GIT_CONFIG_GLOBAL=/dev/null \
+      git format-patch --no-base --no-thread --no-signature --no-stat \
         --keep-subject -1 --stdout $c \
         | sed -e '1 s/^From [0-9a-f]\+ \(.*\)/From FEDORA_PATCHES \1/' \
               -e '/^index [0-9a-f]\+\.\.[0-9a-f]\+.*$/d' > $orig_dir/$fname

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-06-28  0:01 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-06-28  0:01 [rpms/gdb] gdb-17.2-rebase-f44: avoid reading git config files for generate-patches-from-git-repo.sh Andrew Burgess

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox