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] epel9: Patch to work with current golang-github-getkin-kin-openapi-devel package
Date: Fri, 06 Nov 2026 05:41:27 GMT [thread overview]
Message-ID: <179394368745.1.4295482309851203754.rpms-hugo-c018edf91ffa@fedoraproject.org> (raw)
A new commit has been pushed.
Repo : rpms/hugo
Branch : epel9
Commit : c018edf91ffad568716319f445f398ef5c3396e2
Author : W. Michael Petullo <mike@flyn.org>
Date : 2021-09-29T16:32:14-05:00
Stats : +44/-1 in 2 file(s)
URL : https://src.fedoraproject.org/rpms/hugo/c/c018edf91ffad568716319f445f398ef5c3396e2?branch=epel9
Log:
Patch to work with current golang-github-getkin-kin-openapi-devel package
It seems that the API exported by golang-github-getkin-kin-openapi-devel
changed out from under Hugo. the README.md from
golang-github-getkin-kin-openapi-devel contains:
Sub-v0 breaking API changes
v0.61.0
* Renamed `openapi2.Swagger` to `openapi2.T`.
* Renamed `openapi2conv.FromV3Swagger` to `openapi2conv.FromV3`.
* Renamed `openapi2conv.ToV3Swagger` to `openapi2conv.ToV3`.
* Renamed `openapi3.LoadSwaggerFromData` to `openapi3.LoadFromData`.
* Renamed `openapi3.LoadSwaggerFromDataWithPath` to `openapi3.LoadFromDataWithPath`.
* Renamed `openapi3.LoadSwaggerFromFile` to `openapi3.LoadFromFile`.
* Renamed `openapi3.LoadSwaggerFromURI` to `openapi3.LoadFromURI`.
* Renamed `openapi3.NewSwaggerLoader` to `openapi3.NewLoader`.
* Renamed `openapi3.Swagger` to `openapi3.T`.
* Renamed `openapi3.SwaggerLoader` to `openapi3.Loader`.
* Renamed `openapi3filter.ValidationHandler.SwaggerFile` to `openapi3filter.ValidationHandler.File`.
* Renamed `routers.Route.Swagger` to `routers.Route.Spec`.
This adds a patch to make use of the new name T.
Signed-off-by: W. Michael Petullo <mike@flyn.org>
---
diff --git a/0007-rename-openapi3-Swagger.patch b/0007-rename-openapi3-Swagger.patch
new file mode 100644
index 0000000..73c249b
--- /dev/null
+++ b/0007-rename-openapi3-Swagger.patch
@@ -0,0 +1,37 @@
+diff -u --recursive hugo-0.80.0-vanilla/tpl/openapi/openapi3/openapi3.go hugo-0.80.0/tpl/openapi/openapi3/openapi3.go
+--- hugo-0.80.0-vanilla/tpl/openapi/openapi3/openapi3.go 2020-12-31 07:36:35.000000000 -0600
++++ hugo-0.80.0/tpl/openapi/openapi3/openapi3.go 2021-09-29 16:23:36.914066659 -0500
+@@ -48,7 +48,7 @@
+ deps *deps.Deps
+ }
+
+-func (ns *Namespace) Unmarshal(r resource.UnmarshableResource) (*kopenapi3.Swagger, error) {
++func (ns *Namespace) Unmarshal(r resource.UnmarshableResource) (*kopenapi3.T, error) {
+ key := r.Key()
+ if key == "" {
+ return nil, errors.New("no Key set in Resource")
+@@ -71,7 +71,7 @@
+ return nil, err
+ }
+
+- s := &kopenapi3.Swagger{}
++ s := &kopenapi3.T{}
+ switch f {
+ case metadecoders.YAML:
+ err = gyaml.Unmarshal(b, s)
+@@ -82,7 +82,7 @@
+ return nil, err
+ }
+
+- err = kopenapi3.NewSwaggerLoader().ResolveRefsIn(s, nil)
++ err = kopenapi3.NewLoader().ResolveRefsIn(s, nil)
+
+ return s, err
+ })
+@@ -90,5 +90,5 @@
+ return nil, err
+ }
+
+- return v.(*kopenapi3.Swagger), nil
++ return v.(*kopenapi3.T), nil
+ }
diff --git a/hugo.spec b/hugo.spec
index 24a7e69..73e5ae3 100644
--- a/hugo.spec
+++ b/hugo.spec
@@ -17,7 +17,7 @@ and templates and renders them into a full HTML website.}
%global godocs docs examples README.md CONTRIBUTING.md
Name: hugo
-Release: 3%{?dist}
+Release: 4%{?dist}
Summary: The world’s fastest framework for building websites
# Upstream license specification: Apache-2.0 and MIT
@@ -35,6 +35,8 @@ Patch0004: 0001-Update-to-minify-2.9.4.patch
Patch0005: 0001-Remove-trailing-semicolon.patch
# Bump afero to 1.5.1
Patch0006: 0001-Bump-afero-to-1.5.1.patch
+# Modify to use golang-github-getkin-kin-openapi-devel >= 0.61.0
+Patch0007: 0007-rename-openapi3-Swagger.patch
BuildRequires: golang(github.com/bep/golibsass/libsass) >= 0.7.0
@@ -51,6 +53,7 @@ BuildRequires: golang(github.com/bep/golibsass/libsass) >= 0.7.0
%patch0004 -p1
%patch0005 -p1
%patch0006 -p1
+%patch0007 -p1
# Replace blackfriday import path to avoid conflict with v2
sed -i \
@@ -110,6 +113,9 @@ install -Dp man/* -t %{buildroot}%{_mandir}/man1
%changelog
+* Wed Sep 29 2021 W. Michael Petullo <mike@flyn.org> - 0.80.0-4
+- Patch to work with current golang-github-getkin-kin-openapi-devel package
+
* Thu Jul 22 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.80.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
reply other threads:[~2026-11-06 5:41 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=179394368745.1.4295482309851203754.rpms-hugo-c018edf91ffa@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