Skip to content

Commit

Permalink
spec: fix rpm build on Fedora 34
Browse files Browse the repository at this point in the history
Not proud of the fix but it should work for now. See the comment in the spec
file for more information and also the upstream PR for more context:

getkin/kin-openapi#351

Signed-off-by: Ondřej Budai <ondrej@budai.cz>
  • Loading branch information
ondrejbudai committed May 8, 2021
1 parent 9a0236e commit 31a0ca3
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions osbuild-composer.spec
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,15 @@ sed -i "s$// +build !kolo_xmlrpc_oldapi$// +build kolo_xmlrpc_oldapi$" internal/
sed -i "s$// +build !azblob_oldapi$// +build azblob_oldapi$" internal/upload/azure/page_blob_url.go
%endif

%if 0%{?fedora} >= 34
# Fedora 34 and newer ships a newer version of github.com/getkin/kin-openapi
# package which has a different API than the older ones. Let's make the auto-
# generated code compatible by applying some sed magic.
#
# Remove when F33 is EOL
sed -i "s/openapi3.Swagger/openapi3.T/;s/openapi3.NewSwaggerLoader().LoadSwaggerFromData/openapi3.NewLoader().LoadFromData/" internal/cloudapi/openapi.gen.go
%endif

%build
%if 0%{?rhel}
GO_BUILD_PATH=$PWD/_build
Expand Down

0 comments on commit 31a0ca3

Please sign in to comment.