public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: W. Michael Petullo <mike@flyn.org>
To: git-commits@fedoraproject.org
Subject: [rpms/hugo] epel8: Fix build on Go 1.24
Date: Fri, 06 Nov 2026 05:43:40 GMT	[thread overview]
Message-ID: <179394382097.1.11014651597459352792.rpms-hugo-1659a0e3be8c@fedoraproject.org> (raw)

            A new commit has been pushed.

            Repo   : rpms/hugo
            Branch : epel8
            Commit : 1659a0e3be8cb563c0e58430f1034f2d05adc215
            Author : W. Michael Petullo <mike@flyn.org>
            Date   : 2025-01-20T20:02:34-06:00
            Stats  : +39/-0 in 2 file(s)
            URL    : https://src.fedoraproject.org/rpms/hugo/c/1659a0e3be8cb563c0e58430f1034f2d05adc215?branch=epel8

            Log:
            Fix build on Go 1.24

Signed-off-by: W. Michael Petullo <mike@flyn.org>

---
diff --git a/0020-remove-non-const-fmt-string.patch b/0020-remove-non-const-fmt-string.patch
new file mode 100644
index 0000000..85866b6
--- /dev/null
+++ b/0020-remove-non-const-fmt-string.patch
@@ -0,0 +1,36 @@
+diff -u --recursive hugo-0.140.2-vanilla/common/hugio/hasBytesWriter_test.go hugo-0.140.2/common/hugio/hasBytesWriter_test.go
+--- hugo-0.140.2-vanilla/common/hugio/hasBytesWriter_test.go	2024-12-30 09:01:53.000000000 -0600
++++ hugo-0.140.2/common/hugio/hasBytesWriter_test.go	2025-01-20 18:52:14.826348255 -0600
+@@ -48,16 +48,16 @@
+ 
+ 	for i := 0; i < 22; i++ {
+ 		h, w := neww()
+-		fmt.Fprintf(w, rndStr()+"abc __foobar"+rndStr())
++		fmt.Fprint(w, rndStr()+"abc __foobar"+rndStr())
+ 		c.Assert(h.Patterns[0].Match, qt.Equals, true)
+ 
+ 		h, w = neww()
+-		fmt.Fprintf(w, rndStr()+"abc __f")
+-		fmt.Fprintf(w, "oo bar"+rndStr())
++		fmt.Fprint(w, rndStr()+"abc __f")
++		fmt.Fprint(w, "oo bar"+rndStr())
+ 		c.Assert(h.Patterns[0].Match, qt.Equals, true)
+ 
+ 		h, w = neww()
+-		fmt.Fprintf(w, rndStr()+"abc __moo bar")
++		fmt.Fprint(w, rndStr()+"abc __moo bar")
+ 		c.Assert(h.Patterns[0].Match, qt.Equals, false)
+ 	}
+ 
+diff -u --recursive hugo-0.140.2-vanilla/common/hugo/hugo.go hugo-0.140.2/common/hugo/hugo.go
+--- hugo-0.140.2-vanilla/common/hugo/hugo.go	2024-12-30 09:01:53.000000000 -0600
++++ hugo-0.140.2/common/hugo/hugo.go	2025-01-20 19:03:24.885134059 -0600
+@@ -423,7 +423,7 @@
+ 		msg = fmt.Sprintf("%s was deprecated in Hugo %s and will be removed in a future release. %s", item, version, alternative)
+ 	}
+ 
+-	loggers.Log().Logger().WithLevel(level).WithField(loggers.FieldNameCmd, "deprecated").Logf(msg)
++	loggers.Log().Logger().WithLevel(level).WithField(loggers.FieldNameCmd, "deprecated").Logf("%s", msg)
+ }
+ 
+ // We usually do about one minor version a month.

diff --git a/hugo.spec b/hugo.spec
index 483f4ab..0acace8 100644
--- a/hugo.spec
+++ b/hugo.spec
@@ -42,6 +42,9 @@ Source0:        %{gosource}
 # Skip tests that uses the network.
 # Based on https://sources.debian.org/data/main/h/hugo/0.58.3-1/debian/patches/0005-skip-modules-TestClient.patch
 Patch0001:      0010-skip-modules-TestClient.patch
+# Fix build on Go 1.24.
+# Submitted upstream as https://github.com/gohugoio/hugo/pull/13285
+Patch0002:      0020-remove-non-const-fmt-string.patch
 
 BuildRequires:  golang(github.com/bep/golibsass/libsass) >= 0.7.0
 BuildRequires:  golang-github-gohugoio-hugo-goldmark-extensions-devel

                 reply	other threads:[~2026-11-06  5:43 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=179394382097.1.11014651597459352792.rpms-hugo-1659a0e3be8c@fedoraproject.org \
    --to=mike@flyn.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