public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/rpm] pmatilai-v6: Revert %%autosetup patch due to another regression
@ 2026-11-23  9:34 Michal Domonkos
  0 siblings, 0 replies; only message in thread
From: Michal Domonkos @ 2026-11-23  9:34 UTC (permalink / raw)
  To: git-commits

            A new commit has been pushed.

            Repo   : rpms/rpm
            Branch : pmatilai-v6
            Commit : d8119b93a1f5975327884b0870d37b273b4de62c
            Author : Michal Domonkos <mdomonko@redhat.com>
            Date   : 2022-08-02T15:00:44+02:00
            Stats  : +20/-41 in 3 file(s)
            URL    : https://src.fedoraproject.org/rpms/rpm/c/d8119b93a1f5975327884b0870d37b273b4de62c?branch=pmatilai-v6

            Log:
            Revert %%autosetup patch due to another regression

The repo may be initialized before the macro runs, in which case we
would fail to create the initial main branch and thus fail on "git
branch --set-upstream-to=main".  This caused an FTBFS in the edk2
package:

https://github.com/rpm-software-management/rpm/pull/2121#issuecomment-1202349789

Revert the patch for now as a hotfit and revisit the actual use case
later upstream, either fixing it properly or reverting there as well.

---
diff --git a/0001-Use-explicit-default-branch-in-autosetup-S-git.patch b/0001-Use-explicit-default-branch-in-autosetup-S-git.patch
deleted file mode 100644
index efb042b..0000000
--- a/0001-Use-explicit-default-branch-in-autosetup-S-git.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-From fdb2de52f24111b64b7e41ab052e8751f0ec3df9 Mon Sep 17 00:00:00 2001
-From: Michal Domonkos <mdomonko@redhat.com>
-Date: Mon, 11 Jul 2022 13:14:49 +0200
-Subject: [PATCH 1/2] Use explicit default branch in %autosetup -S git
-
-Commit 3a6b1d8fbf846d3f1b139d343fdfddebe99ae42b assumed "master" as the
-default git branch to track, however the name can be changed globally,
-so make it explicit.
-
-Given the choice now, go with "main" as the general trend, e.g:
-https://fedoraproject.org/wiki/Changes/GitRepos-master-to-main
----
- macros.in | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/macros.in b/macros.in
-index 6177e6fec..db5f5b11f 100644
---- a/macros.in
-+++ b/macros.in
-@@ -1166,7 +1166,7 @@ package or when debugging this package.\
- 
- # Git
- %__scm_setup_git(q)\
--%{__git} init %{-q}\
-+%{__git} init %{-q} --initial-branch=main\
- %{__git} config user.name "%{__scm_username}"\
- %{__git} config user.email "%{__scm_usermail}"\
- %{__git} config gc.auto 0\
-@@ -1175,7 +1175,7 @@ package or when debugging this package.\
- 	--author "%{__scm_author}" -m "%{NAME}-%{VERSION} base"\
- %{__git} branch rpm-build \
- %{__git} checkout rpm-build \
--%{__git} branch --set-upstream-to=master
-+%{__git} branch --set-upstream-to=main
- 
- %__scm_apply_git(qp:m:)\
- %{__git} apply --index --reject %{-p:-p%{-p*}} -\
--- 
-2.36.1
-

diff --git a/rpm-4.17.1-revert-autopatch-branch.patch b/rpm-4.17.1-revert-autopatch-branch.patch
new file mode 100644
index 0000000..4d028f6
--- /dev/null
+++ b/rpm-4.17.1-revert-autopatch-branch.patch
@@ -0,0 +1,15 @@
+diff -up rpm-4.17.1/macros.in.orig rpm-4.17.1/macros.in
+--- rpm-4.17.1/macros.in.orig	2022-08-02 14:19:36.496729048 +0200
++++ rpm-4.17.1/macros.in	2022-08-02 14:19:56.270615191 +0200
+@@ -1166,10 +1166,7 @@ package or when debugging this package.\
+ %{__git} config gc.auto 0\
+ %{__git} add --force .\
+ %{__git} commit %{-q} --allow-empty -a\\\
+-	--author "%{__scm_author}" -m "%{NAME}-%{VERSION} base"\
+-%{__git} branch rpm-build \
+-%{__git} checkout rpm-build \
+-%{__git} branch --set-upstream-to=master
++	--author "%{__scm_author}" -m "%{NAME}-%{VERSION} base"
+ 
+ %__scm_apply_git(qp:m:)\
+ %{__git} apply --index --reject %{-p:-p%{-p*}} -\

diff --git a/rpm.spec b/rpm.spec
index 99a790b..658cac6 100644
--- a/rpm.spec
+++ b/rpm.spec
@@ -56,13 +56,14 @@ Patch1: rpm-4.17.x-siteconfig.patch
 Patch3: rpm-4.9.90-no-man-dirs.patch
 
 # Patches already upstream:
-Patch100: 0001-Use-explicit-default-branch-in-autosetup-S-git.patch
 Patch101: 0002-Exclude-.src.rpm-from-check-buildroot.patch
 
 # These are not yet upstream
 Patch906: rpm-4.7.1-geode-i686.patch
 # Probably to be upstreamed in slightly different form
 Patch907: rpm-4.15.x-ldflags.patch
+# Hotfix, needs revert or fix upstream
+Patch908: rpm-4.17.1-revert-autopatch-branch.patch
 
 # Partially GPL/LGPL dual-licensed and some bits with BSD
 # SourceLicense: (GPLv2+ and LGPLv2+ with exceptions) and BSD
@@ -612,6 +613,9 @@ fi
 %doc docs/librpm/html/*
 
 %changelog
+* Tue Aug 02 2022 Michal Domonkos <mdomonko@redhat.com> - 4.18.0-0.beta1.4
+- Revert %%autosetup -S git patch due to another regression
+
 * Sat Jul 23 2022 Fedora Release Engineering <releng@fedoraproject.org> - 4.18.0-0.beta1.3
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
 

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

only message in thread, other threads:[~2026-11-23  9:34 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-23  9:34 [rpms/rpm] pmatilai-v6: Revert %%autosetup patch due to another regression Michal Domonkos

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