public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Filipe Rosset <filiperosset@fedoraproject.org>
To: git-commits@fedoraproject.org
Subject: [rpms/python-dunamai] rawhide: added patch to fix build against fossil-2.28
Date: Mon, 27 Jul 2026 08:50:40 GMT	[thread overview]
Message-ID: <178514224089.1.16078724969675667696.rpms-python-dunamai-0f869c09b3f2@fedoraproject.org> (raw)

            A new commit has been pushed.

            Repo   : rpms/python-dunamai
            Branch : rawhide
            Commit : 0f869c09b3f2a851b97c72b8e517652ebed387e6
            Author : Filipe Rosset <filiperosset@fedoraproject.org>
            Date   : 2026-07-24T20:06:46-03:00
            Stats  : +35/-1 in 2 file(s)
            URL    : https://src.fedoraproject.org/rpms/python-dunamai/c/0f869c09b3f2a851b97c72b8e517652ebed387e6?branch=rawhide

            Log:
            added patch to fix build against fossil-2.28

Signed-off-by: Filipe Rosset <filiperosset@fedoraproject.org>

---
diff --git a/fossil-2.28.patch b/fossil-2.28.patch
new file mode 100644
index 0000000..6ecce98
--- /dev/null
+++ b/fossil-2.28.patch
@@ -0,0 +1,33 @@
+--- a/dunamai/__init__.py
++++ b/dunamai/__init__.py
+@@ -1813,18 +1813,18 @@
+         code, msg = _run_cmd("fossil branch current", path)
+         branch = msg
+ 
+-        code, msg = _run_cmd("fossil sql \"SELECT value FROM vvar WHERE name = 'checkout-hash' LIMIT 1\"", path)
++        code, msg = _run_cmd("fossil sql -quote \"SELECT value FROM vvar WHERE name = 'checkout-hash' LIMIT 1\"", path)
+         commit = msg.strip("'")[:commit_length]
+ 
+         code, msg = _run_cmd(
+-            'fossil sql "'
++            'fossil sql -quote "'
+             "SELECT DATETIME(mtime) FROM event JOIN blob ON event.objid=blob.rid WHERE type = 'ci'"
+             " AND uuid = (SELECT value FROM vvar WHERE name = 'checkout-hash' LIMIT 1) LIMIT 1\"",
+             path,
+         )
+         timestamp = dt.datetime.strptime(msg.strip("'") + "+0000", "%Y-%m-%d %H:%M:%S%z")
+ 
+-        code, msg = _run_cmd("fossil sql \"SELECT count() FROM event WHERE type = 'ci'\"", path)
++        code, msg = _run_cmd("fossil sql -quote \"SELECT count() FROM event WHERE type = 'ci'\"", path)
+         # The repository creation itself counts as a commit.
+         total_commits = int(msg) - 1
+         if total_commits <= 0:
+@@ -1863,7 +1863,7 @@
+                 WHERE tagxref.tagtype = 1
+                 ORDER BY event.mtime DESC, tagxref.mtime DESC;
+         """
+-        code, msg = _run_cmd('fossil sql "{}"'.format(" ".join(query.splitlines())), path)
++        code, msg = _run_cmd('fossil sql -quote "{}"'.format(" ".join(query.splitlines())), path)
+         if not msg:
+             try:
+                 distance = int(total_commits)

diff --git a/python-dunamai.spec b/python-dunamai.spec
index 2f93a34..736c5ae 100644
--- a/python-dunamai.spec
+++ b/python-dunamai.spec
@@ -18,6 +18,7 @@ Summary:        Dynamic version generation
 License:        MIT
 URL:            https://pypi.org/pypi/dunamai
 Source:         %{pypi_source dunamai}
+Patch:          fossil-2.28.patch
 
 BuildArch:      noarch
 
@@ -45,7 +46,7 @@ BuildRequires:  help2man
 %description -n python3-dunamai %_description
 
 %prep
-%autosetup -n dunamai-%{version}
+%autosetup -p1 -n dunamai-%{version}
 
 # Fix CRLF line endings in documentation
 sed -i 's/\r$//' CHANGELOG.md

                 reply	other threads:[~2026-07-27  8:50 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=178514224089.1.16078724969675667696.rpms-python-dunamai-0f869c09b3f2@fedoraproject.org \
    --to=filiperosset@fedoraproject.org \
    --cc=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