public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
To: git-commits@fedoraproject.org
Subject: [rpms/bup] f45: Add patches that backport fixes for test-rm tests for older/newer git
Date: Fri, 23 Oct 2026 00:35:44 GMT	[thread overview]
Message-ID: <179271574426.1.8886563482491158706.rpms-bup-bc7daea16bd6@fedoraproject.org> (raw)

A new commit has been pushed.

Repo   : rpms/bup
Branch : f45
Commit : bc7daea16bd69f6955b4b4362f3db2af82c041a7
Author : Tadej Janež <tadej.j@nez.si>
Date   : 2018-07-27T14:56:51+02:00
Stats  : +212/-1 in 3 file(s)
URL    : https://src.fedoraproject.org/rpms/bup/c/bc7daea16bd69f6955b4b4362f3db2af82c041a7?branch=f45

Log:
Add patches that backport fixes for test-rm tests for older/newer git

---
diff --git a/0001-test-rm-accommodate-packed-refs-creation-by-newer-gi.patch b/0001-test-rm-accommodate-packed-refs-creation-by-newer-gi.patch
new file mode 100644
index 0000000..dc88cc6
--- /dev/null
+++ b/0001-test-rm-accommodate-packed-refs-creation-by-newer-gi.patch
@@ -0,0 +1,82 @@
+From 21555fc9ff10a9fda7ec583f593258a5a7033af1 Mon Sep 17 00:00:00 2001
+From: Rob Browning <rlb@defaultvalue.org>
+Date: Sat, 21 Oct 2017 11:27:15 -0500
+Subject: [PATCH 1/2] test-rm: accommodate packed-refs creation by newer git
+
+It looks like newer versions of git (as of at least 2.150 rc1) are
+automatically creating packed-refs.  Adjust test-rm.sh to accommodate
+that possibility.
+
+Signed-off-by: Rob Browning <rlb@defaultvalue.org>
+Tested-by: Rob Browning <rlb@defaultvalue.org>
+---
+ t/test-rm.sh | 20 +++++++++++++++-----
+ 1 file changed, 15 insertions(+), 5 deletions(-)
+
+diff --git a/t/test-rm.sh b/t/test-rm.sh
+index e0c9b53..d5c7bef 100755
+--- a/t/test-rm.sh
++++ b/t/test-rm.sh
+@@ -52,8 +52,10 @@ observed="$(compare-trees bup/ bup-baseline/ | LC_ALL=C sort)" || exit $?
+ wv_matches_rx "$observed" \
+ '\*deleting[ ]+logs/refs/heads/src
+ \*deleting[ ]+refs/heads/src
++(\.d\.\.t\.\.\.\.\.\.[ ]+\./)?
+ \.d\.\.t\.\.\.[.]*[ ]+logs/refs/heads/
+-\.d\.\.t\.\.\.[.]*[ ]+refs/heads/'
++\.d\.\.t\.\.\.[.]*[ ]+refs/heads/
++(>f\+\+\+\+\+\+\+\+\+[ ]+packed-refs)?'
+ 
+ 
+ WVSTART "rm /foo (one of many)"
+@@ -72,8 +74,10 @@ observed="$(compare-trees bup/ bup-baseline/ | LC_ALL=C sort)" || exit $?
+ wv_matches_rx "$observed" \
+ "\*deleting[ ]+logs/refs/heads/src
+ \*deleting[ ]+refs/heads/src
++(\.d\.\.t\.\.\.\.\.\.[ ]+\./)?
+ \.d\.\.t\.\.\.[.]*[ ]+logs/refs/heads/
+-\.d\.\.t\.\.\.[.]*[ ]+refs/heads/"
++\.d\.\.t\.\.\.[.]*[ ]+refs/heads/
++(>f\+\+\+\+\+\+\+\+\+[ ]+packed-refs)?"
+ 
+ 
+ WVSTART "rm /foo /bar (multiple of many)"
+@@ -94,8 +98,10 @@ wv_matches_rx "$observed" \
+ \*deleting[ ]+logs/refs/heads/src-4
+ \*deleting[ ]+refs/heads/src-2
+ \*deleting[ ]+refs/heads/src-4
++(\.d\.\.t\.\.\.\.\.\.[ ]+\./)?
+ \.d\.\.t\.\.\.[.]*[ ]+logs/refs/heads/
+-\.d\.\.t\.\.\.[.]*[ ]+refs/heads/"
++\.d\.\.t\.\.\.[.]*[ ]+refs/heads/
++(>f\+\+\+\+\+\+\+\+\+[ ]+packed-refs)?"
+ 
+ 
+ WVSTART "rm /foo /bar (all)"
+@@ -116,8 +122,10 @@ wv_matches_rx "$observed" \
+ \*deleting[ ]+refs/heads/src-3
+ \*deleting[ ]+refs/heads/src-4
+ \*deleting[ ]+refs/heads/src-5
++(\.d\.\.t\.\.\.\.\.\.[ ]+\./)?
+ \.d\.\.t\.\.\.[.]*[ ]+logs/refs/heads/
+-\.d\.\.t\.\.\.[.]*[ ]+refs/heads/"
++\.d\.\.t\.\.\.[.]*[ ]+refs/heads/
++(>f\+\+\+\+\+\+\+\+\+[ ]+packed-refs)?"
+ 
+ 
+ WVSTART "rm /foo/bar (lone save - equivalent to rm /foo)"
+@@ -137,8 +145,10 @@ observed="$(compare-trees bup/ bup-baseline/ | LC_ALL=C sort)" || exit $?
+ wv_matches_rx "$observed" \
+ "\*deleting[ ]+logs/refs/heads/src
+ \*deleting[ ]+refs/heads/src
++(\.d\.\.t\.\.\.\.\.\.[ ]+\./)?
+ \.d\.\.t\.\.\.[.]*[ ]+logs/refs/heads/
+-\.d\.\.t\.\.\.[.]*[ ]+refs/heads/"
++\.d\.\.t\.\.\.[.]*[ ]+refs/heads/
++(>f\+\+\+\+\+\+\+\+\+[ ]+packed-refs)?"
+ 
+ 
+ verify-changes-caused-by-rewriting-save()
+-- 
+2.17.1
+

diff --git a/0002-test-rm-fix-regexes-to-handle-newer-and-older-git.patch b/0002-test-rm-fix-regexes-to-handle-newer-and-older-git.patch
new file mode 100644
index 0000000..fa69175
--- /dev/null
+++ b/0002-test-rm-fix-regexes-to-handle-newer-and-older-git.patch
@@ -0,0 +1,115 @@
+From 820fd7f6b131c527b23b5ecb4f11ffb331439f3a Mon Sep 17 00:00:00 2001
+From: Rob Browning <rlb@defaultvalue.org>
+Date: Sat, 11 Nov 2017 11:53:56 -0600
+Subject: [PATCH 2/2] test-rm: fix regexes to handle newer *and* older git
+
+To accommodate optional lines, we need to use a construct like this:
+
+  foo(
+  bar)?
+
+instead of this:
+
+  foo
+  (bar)?
+
+The problem became apparent when people tested against older git after
+the introduction of the patch to work with newer git:
+292361d86d1cf0cc555681ae43371d66c8ebb366
+
+Thanks to Greg Troxel and Basil Mohamed Gohar for reporting the
+problem.
+
+Signed-off-by: Rob Browning <rlb@defaultvalue.org>
+Tested-by: Rob Browning <rlb@defaultvalue.org>
+---
+ t/test-rm.sh | 40 ++++++++++++++++++++--------------------
+ 1 file changed, 20 insertions(+), 20 deletions(-)
+
+diff --git a/t/test-rm.sh b/t/test-rm.sh
+index d5c7bef..b8df754 100755
+--- a/t/test-rm.sh
++++ b/t/test-rm.sh
+@@ -51,11 +51,11 @@ WVPASS bup rm --unsafe /src
+ observed="$(compare-trees bup/ bup-baseline/ | LC_ALL=C sort)" || exit $?
+ wv_matches_rx "$observed" \
+ '\*deleting[ ]+logs/refs/heads/src
+-\*deleting[ ]+refs/heads/src
+-(\.d\.\.t\.\.\.\.\.\.[ ]+\./)?
++\*deleting[ ]+refs/heads/src(
++\.d\.\.t\.\.\.\.\.\.[ ]+\./)?
+ \.d\.\.t\.\.\.[.]*[ ]+logs/refs/heads/
+-\.d\.\.t\.\.\.[.]*[ ]+refs/heads/
+-(>f\+\+\+\+\+\+\+\+\+[ ]+packed-refs)?'
++\.d\.\.t\.\.\.[.]*[ ]+refs/heads/(
++>f\+\+\+\+\+\+\+\+\+[ ]+packed-refs)?'
+ 
+ 
+ WVSTART "rm /foo (one of many)"
+@@ -73,11 +73,11 @@ WVPASS bup rm --unsafe /src
+ observed="$(compare-trees bup/ bup-baseline/ | LC_ALL=C sort)" || exit $?
+ wv_matches_rx "$observed" \
+ "\*deleting[ ]+logs/refs/heads/src
+-\*deleting[ ]+refs/heads/src
+-(\.d\.\.t\.\.\.\.\.\.[ ]+\./)?
++\*deleting[ ]+refs/heads/src(
++\.d\.\.t\.\.\.\.\.\.[ ]+\./)?
+ \.d\.\.t\.\.\.[.]*[ ]+logs/refs/heads/
+-\.d\.\.t\.\.\.[.]*[ ]+refs/heads/
+-(>f\+\+\+\+\+\+\+\+\+[ ]+packed-refs)?"
++\.d\.\.t\.\.\.[.]*[ ]+refs/heads/(
++>f\+\+\+\+\+\+\+\+\+[ ]+packed-refs)?"
+ 
+ 
+ WVSTART "rm /foo /bar (multiple of many)"
+@@ -97,11 +97,11 @@ wv_matches_rx "$observed" \
+ "\*deleting[ ]+logs/refs/heads/src-2
+ \*deleting[ ]+logs/refs/heads/src-4
+ \*deleting[ ]+refs/heads/src-2
+-\*deleting[ ]+refs/heads/src-4
+-(\.d\.\.t\.\.\.\.\.\.[ ]+\./)?
++\*deleting[ ]+refs/heads/src-4(
++\.d\.\.t\.\.\.\.\.\.[ ]+\./)?
+ \.d\.\.t\.\.\.[.]*[ ]+logs/refs/heads/
+-\.d\.\.t\.\.\.[.]*[ ]+refs/heads/
+-(>f\+\+\+\+\+\+\+\+\+[ ]+packed-refs)?"
++\.d\.\.t\.\.\.[.]*[ ]+refs/heads/(
++>f\+\+\+\+\+\+\+\+\+[ ]+packed-refs)?"
+ 
+ 
+ WVSTART "rm /foo /bar (all)"
+@@ -121,11 +121,11 @@ wv_matches_rx "$observed" \
+ \*deleting[ ]+refs/heads/src-2
+ \*deleting[ ]+refs/heads/src-3
+ \*deleting[ ]+refs/heads/src-4
+-\*deleting[ ]+refs/heads/src-5
+-(\.d\.\.t\.\.\.\.\.\.[ ]+\./)?
++\*deleting[ ]+refs/heads/src-5(
++\.d\.\.t\.\.\.\.\.\.[ ]+\./)?
+ \.d\.\.t\.\.\.[.]*[ ]+logs/refs/heads/
+-\.d\.\.t\.\.\.[.]*[ ]+refs/heads/
+-(>f\+\+\+\+\+\+\+\+\+[ ]+packed-refs)?"
++\.d\.\.t\.\.\.[.]*[ ]+refs/heads/(
++>f\+\+\+\+\+\+\+\+\+[ ]+packed-refs)?"
+ 
+ 
+ WVSTART "rm /foo/bar (lone save - equivalent to rm /foo)"
+@@ -144,11 +144,11 @@ WVPASS bup rm --unsafe /src/"$save1"
+ observed="$(compare-trees bup/ bup-baseline/ | LC_ALL=C sort)" || exit $?
+ wv_matches_rx "$observed" \
+ "\*deleting[ ]+logs/refs/heads/src
+-\*deleting[ ]+refs/heads/src
+-(\.d\.\.t\.\.\.\.\.\.[ ]+\./)?
++\*deleting[ ]+refs/heads/src(
++\.d\.\.t\.\.\.\.\.\.[ ]+\./)?
+ \.d\.\.t\.\.\.[.]*[ ]+logs/refs/heads/
+-\.d\.\.t\.\.\.[.]*[ ]+refs/heads/
+-(>f\+\+\+\+\+\+\+\+\+[ ]+packed-refs)?"
++\.d\.\.t\.\.\.[.]*[ ]+refs/heads/(
++>f\+\+\+\+\+\+\+\+\+[ ]+packed-refs)?"
+ 
+ 
+ verify-changes-caused-by-rewriting-save()
+-- 
+2.17.1
+

diff --git a/bup.spec b/bup.spec
index 255cf47..a4c927a 100644
--- a/bup.spec
+++ b/bup.spec
@@ -34,6 +34,13 @@ Source1: README.Fedora.md
 Source2: bup-web.service
 Source3: README-bup-web.Fedora.md
 
+# Backport of upstream commit 292361d86d1cf0cc555681ae43371d66c8ebb366:
+# test-rm: accommodate packed-refs creation by newer git
+Patch0: 0001-test-rm-accommodate-packed-refs-creation-by-newer-gi.patch
+# Backport of upstream commit 36476fee097cd8dd24c52ca1f460d7a4f45ea209:
+# test-rm: fix regexes to handle newer *and* older git
+Patch1: 0002-test-rm-fix-regexes-to-handle-newer-and-older-git.patch
+
 BuildRequires: gcc
 BuildRequires: python2-devel
 BuildRequires: git-core
@@ -107,10 +114,15 @@ bup repositories.
 
 
 %prep
-%autosetup
+%autosetup -S git
 
 
 %build
+# Remove .git/ directory otherwise bup's make command fails with:
+# error: detected release, but found ./.git
+# Makefile:43: *** Version configuration failed.  Stop
+rm -r .git/
+
 # NOTE: We can't use %%configure since bup uses a non-standard configure script
 # which is executed during the execution of the make command.
 # To configure the build process, we need to pass variables to the make
@@ -191,6 +203,8 @@ install -p -m 0644 note/*.md %{buildroot}%{_pkgdocdir}
 %changelog
 * Thu Jul 26 2018 Tadej Janež <tadej.j@nez.si> - 0.29.1-1
 - Update to version 0.29.1
+- Add patches that backport fixes for test-rm tests that make them work with
+  older and newer versions of git
 
 * Sat Jul 21 2018 Tadej Janež <tadej.j@nez.si> - 0.29-9
 - Add gcc to BuildRequires to account for

                 reply	other threads:[~2026-10-23  0:35 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=179271574426.1.8886563482491158706.rpms-bup-bc7daea16bd6@fedoraproject.org \
    --to=git-commits@fedoraproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox