public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/gdb] f44: Update RPM patch management
@ 2026-06-25 0:56 Michal Kolar
0 siblings, 0 replies; only message in thread
From: Michal Kolar @ 2026-06-25 0:56 UTC (permalink / raw)
To: git-commits
A new commit has been pushed.
Repo : rpms/gdb
Branch : f44
Commit : 130e7827af6f6ef47f142de8fe4c094bd4956de0
Author : Michal Kolar <mkolar@redhat.com>
Date : 2026-06-24T21:20:23+00:00
Stats : +2/-14 in 3 file(s)
URL : https://src.fedoraproject.org/rpms/gdb/c/130e7827af6f6ef47f142de8fe4c094bd4956de0?branch=f44
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 b/gdb.spec
index fdf12b0..32766eb 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
@@ -322,7 +321,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'))
@@ -331,12 +330,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-06-25 0:56 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-06-25 0:56 [rpms/gdb] f44: 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