public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/gdb] rawhide: Update RPM patch management
@ 2026-07-02 18:09 Michal Kolar
  0 siblings, 0 replies; only message in thread
From: Michal Kolar @ 2026-07-02 18:09 UTC (permalink / raw)
  To: git-commits

            A new commit has been pushed.

            Repo   : rpms/gdb
            Branch : rawhide
            Commit : 18cb61718cfdb7025b4efccfe95c58e420e15e4d
            Author : Michal Kolar <mkolar@redhat.com>
            Date   : 2026-06-19T20:32:17+00:00
            Stats  : +2/-30 in 4 file(s)
            URL    : https://src.fedoraproject.org/rpms/gdb/c/18cb61718cfdb7025b4efccfe95c58e420e15e4d?branch=rawhide

            Log:
            Update RPM patch management

Replace the manual, multi-file patch inclusion mechanism with the modern
`%autosetup` macro.

---
diff --git a/README.local-patches.md b/README.local-patches.md
index fc2eb90..b9ef2c6 100644
--- a/README.local-patches.md
+++ b/README.local-patches.md
@@ -84,8 +84,6 @@ control files.  These control files are:
 
   - `_gdb.spec.Patch.include`: This file contains the `Patch:` directives.
 
-  - `_gdb.spec.patch.include`: This file contains the `%patch` directives.
-
   - `_patch_order`: This file contains the patches, in the exact order
     that they must be applied.  It is used when importing the patches
     into the git repository.

diff --git a/_gdb.spec.patch.include b/_gdb.spec.patch.include
deleted file mode 100644
index 5df36dd..0000000
--- a/_gdb.spec.patch.include
+++ /dev/null
@@ -1,16 +0,0 @@
-%patch -p1 -P001
-%patch -p1 -P002
-%patch -p1 -P003
-%patch -p1 -P004
-%patch -p1 -P005
-%patch -p1 -P006
-%patch -p1 -P007
-%patch -p1 -P008
-%patch -p1 -P009
-%patch -p1 -P010
-%patch -p1 -P011
-%patch -p1 -P012
-%patch -p1 -P013
-%patch -p1 -P014
-%patch -p1 -P015
-%patch -p1 -P016

diff --git a/gdb.spec b/gdb.spec
index 0accbc0..45c6725 100644
--- a/gdb.spec
+++ b/gdb.spec
@@ -142,7 +142,6 @@ Source4: gdbinit
 # Include the auto-generated file containing the "Patch:" directives.
 # See README.local-patches for more details.
 Source9998: _gdb.spec.Patch.include
-Source9999: _gdb.spec.patch.include
 %include %{SOURCE9998}
 
 BuildRequires: readline-devel%{buildisa} >= 7.0
@@ -321,7 +320,7 @@ and printing their data.
 This package provides INFO, HTML and PDF user manual for GDB.
 
 %prep
-%setup -q -n %{gdb_src}
+%autosetup -p1 -n %{gdb_src}
 
 # Files have `# <number> <file>' statements breaking VPATH / find-debuginfo.sh .
 (cd gdb;rm -fv $(perl -pe 's/\\\n/ /' <Makefile.in|sed -n 's/^YYFILES = //p'))
@@ -330,12 +329,6 @@ This package provides INFO, HTML and PDF user manual for GDB.
 # we build in GDB_BUILD, just to be sure.
 find -name "*.info*"|xargs rm -f
 
-# Apply patches defined on _gdb.spec.Patch.include
-
-# Include the auto-generated patch directives.
-# See README.local-patches for more details.
-%include %{SOURCE9999}
-
 find -name "*.orig" | xargs rm -f
 ! find -name "*.rej" # Should not happen.
 

diff --git a/generate-patches-from-git-repo.sh b/generate-patches-from-git-repo.sh
index 1937a3c..6003008 100755
--- a/generate-patches-from-git-repo.sh
+++ b/generate-patches-from-git-repo.sh
@@ -69,10 +69,9 @@ common_ancestor=`git merge-base HEAD $commit_or_tag`
 test -z "$common_ancestor" && die "Could not find common ancestor between HEAD and $commit_or_tag."
 
 temp_PATCH_file=/tmp/_gdb.spec.Patch.include
-temp_patch_file=/tmp/_gdb.spec.patch.include
 temp_patch_order_file=/tmp/_patch_order
 
-rm -f $temp_PATCH_file $temp_patch_file $temp_patch_order_file
+rm -f $temp_PATCH_file $temp_patch_order_file
 
 for c in `git rev-list --reverse ${common_ancestor}..HEAD` ; do
     fname=`git log -1 --pretty='format:%s' $c`
@@ -100,13 +99,11 @@ for c in `git rev-list --reverse ${common_ancestor}..HEAD` ; do
 `git log -1 --pretty='format:%b' $c | sed -n 's/^;;/#/p'`
 EOF
     printf "Patch%03d: %s\n\n" $idx $fname >> $temp_PATCH_file
-    printf "%%patch -p1 -P%03d\n" $idx >> $temp_patch_file
     echo $fname >> $temp_patch_order_file
     idx=`expr $idx + 1`
 done
 
 cd $orig_dir
 mv $temp_PATCH_file _gdb.spec.Patch.include
-mv $temp_patch_file _gdb.spec.patch.include
 mv $temp_patch_order_file _patch_order
 echo "$common_ancestor" > _git_upstream_commit

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

only message in thread, other threads:[~2026-07-02 18:09 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-07-02 18:09 [rpms/gdb] rawhide: Update RPM patch management Michal Kolar

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