Initial commit

This commit is contained in:
2025-01-10 16:25:46 +01:00
committed by demus
commit 53eec9c3e5
4 changed files with 238 additions and 0 deletions
+37
View File
@@ -0,0 +1,37 @@
# ---> Go
# If you prefer the allow list template instead of the deny list, see community template:
# https://github.com/github/gitignore/blob/main/community/Golang/Go.AllowList.gitignore
#
# Binaries for programs and plugins
*.exe
*.exe~
*.dll
*.so
*.dylib
# Test binary, built with `go test -c`
*.test
# Output of the go coverage tool, specifically when used with LiteIDE
*.out
# Dependency directories (remove the comment below to include it)
# vendor/
# Go workspace file
go.work
# ---> VisualStudioCode
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
!.vscode/*.code-snippets
# Local History for Visual Studio Code
.history/
# Built Visual Studio Code Extensions
*.vsix
+9
View File
@@ -0,0 +1,9 @@
MIT License
Copyright (c) 2025 demus
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+3
View File
@@ -0,0 +1,3 @@
# golang-rpm
Template repo for golang fedora packaging
+189
View File
@@ -0,0 +1,189 @@
## START: Set by rpmautospec
## (rpmautospec version 0.6.5)
## RPMAUTOSPEC: autorelease, autochangelog
%define autorelease(e:s:pb:n) %{?-p:0.}%{lua:
release_number = 30;
base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}"));
print(release_number + base_release_number - 1);
}%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}}
## END: Set by rpmautospec
# Generated by go2rpm
# rounding error on some arch
%ifarch x86_64
%bcond_without check
%endif
# https://github.com/kubernetes/kube-openapi
%global goipath k8s.io/kube-openapi
%global forgeurl https://github.com/kubernetes/kube-openapi
%global commit 32ad38e42d3faf1ce94eb29f4ea6d763339b258e
%gometa
%global common_description %{expand:
Kubernetes OpenAPI spec generation & serving.}
%global golicenses LICENSE
%global godocs CONTRIBUTING.md README.md code-of-conduct.md
Name: %{goname}
Version: 0
Release: %autorelease -p
Summary: Kubernetes OpenAPI spec generation & serving
# Upstream license specification: Apache-2.0
License: ASL 2.0
URL: %{gourl}
Source0: %{gosource}
BuildRequires: golang(bitbucket.org/ww/goautoneg)
BuildRequires: golang(github.com/asaskevich/govalidator)
BuildRequires: golang(github.com/emicklei/go-restful)
BuildRequires: golang(github.com/go-openapi/jsonreference)
BuildRequires: golang(github.com/go-openapi/swag)
BuildRequires: golang(github.com/golang/protobuf/proto)
BuildRequires: golang(github.com/googleapis/gnostic/openapiv2)
BuildRequires: golang(github.com/json-iterator/go)
BuildRequires: golang(github.com/mitchellh/mapstructure)
BuildRequires: golang(github.com/NYTimes/gziphandler)
BuildRequires: golang(github.com/spf13/pflag)
BuildRequires: golang(gopkg.in/yaml.v2)
BuildRequires: golang(k8s.io/gengo/args)
# BuildRequires: golang(k8s.io/gengo/examples/set-gen/sets)
BuildRequires: golang(k8s.io/gengo/v2/generator)
BuildRequires: golang(k8s.io/gengo/v2/namer)
BuildRequires: golang(k8s.io/gengo/v2/types)
BuildRequires: golang(k8s.io/klog/v2)
BuildRequires: golang(sigs.k8s.io/structured-merge-diff/v4/schema)
%if %{with check}
# Tests
BuildRequires: golang(github.com/davecgh/go-spew/spew)
BuildRequires: golang(github.com/google/gofuzz)
BuildRequires: golang(github.com/google/uuid)
BuildRequires: golang(github.com/onsi/ginkgo/v2)
BuildRequires: golang(github.com/onsi/ginkgo/v2/config)
BuildRequires: golang(github.com/onsi/ginkgo/v2/types)
BuildRequires: golang(github.com/onsi/gomega)
BuildRequires: golang(github.com/stretchr/testify/assert)
BuildRequires: golang(github.com/stretchr/testify/require)
BuildRequires: golang(k8s.io/gengo/parser)
BuildRequires: golang(sigs.k8s.io/yaml)
%endif
%description
%{common_description}
%gopkg
%prep
%goprep
# sed -i "s|github.com/munnerz/goautoneg|bitbucket.org/ww/goautoneg|" $(find . -name "*.go")
# sed -i 's|github.com/googleapis/gnostic|github.com/googleapis/gnostic-0.4|' $(find . -iname "*.go" -type f)
%build
for cmd in cmd/* ; do
%gobuild -o %{gobuilddir}/bin/$(basename $cmd) %{goipath}/$cmd
done
%install
%gopkginstall
install -m 0755 -vd %{buildroot}%{_bindir}
install -m 0755 -vp %{gobuilddir}/bin/* %{buildroot}%{_bindir}/
%if %{with check}
%check
%gocheck -d pkg/aggregator -d pkg/handler
%endif
%files
%license LICENSE
%doc CONTRIBUTING.md README.md code-of-conduct.md pkg/generators/README.md
%{_bindir}/*
%gopkgfiles
%changelog
## START: Generated by rpmautospec
* Thu Jul 18 2024 Fedora Release Engineering <releng@fedoraproject.org> - 0-0.30
- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild
* Sun Feb 11 2024 Maxwell G <maxwell@gtmx.me> - 0-0.29
- Rebuild for golang 1.22.0
* Wed Jan 24 2024 Fedora Release Engineering <releng@fedoraproject.org> - 0-0.28
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Sat Jan 20 2024 Fedora Release Engineering <releng@fedoraproject.org> - 0-0.27
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Thu Jul 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 0-0.26
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
* Thu Jan 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 0-0.25
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
* Wed Aug 10 2022 Maxwell G <gotmax@e.email> - 0-0.24
- Rebuild to fix FTBFS
* Thu Jul 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0-0.23
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
* Tue Jul 19 2022 Maxwell G <gotmax@e.email> - 0-0.22
- Rebuild for
CVE-2022-{1705,32148,30631,30633,28131,30635,30632,30630,1962} in golang
* Sat Jun 18 2022 Robert-André Mauchin <zebob.m@gmail.com> - 0-0.21
- Rebuilt for CVE-2022-1996, CVE-2022-24675, CVE-2022-28327,
CVE-2022-27191, CVE-2022-29526, CVE-2022-30629
* Sat Apr 16 2022 Fabio Alessandro Locati <me@fale.io> - 0-0.20
- Rebuilt for CVE-2022-27191
* Thu Jan 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0-0.19
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
* Fri Aug 13 2021 Robert-André Mauchin <zebob.m@gmail.com> - 0-0.18
- Bump to commit 3c818078ee3de6569a8f02b6345ea3c4cc8b0998
* Thu Jul 22 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0-0.13
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0-0.12
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Wed Jan 13 21:52:15 CET 2021 Robert-André Mauchin <zebob.m@gmail.com> - 0-0.11.20210113git45edf8a
- Bump to commit 45edf8a2a574ed1c5ba4dc5c7621f60f32d9d26c
* Sat Sep 19 20:13:36 CEST 2020 Robert-André Mauchin <zebob.m@gmail.com> - 0-0.1.20200919git64514a1
- Bump to commit 64514a1d5d596b96e6f957e2be275ae14d6b0804
* Tue Aug 18 01:21:32 CEST 2020 Robert-André Mauchin <zebob.m@gmail.com> - 0-0.9.20200614git656914f
- Add patch to fix compatibility with latest gnostic
* Mon Jul 27 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0-0.8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Sun Jun 14 16:27:09 CEST 2020 Robert-André Mauchin <zebob.m@gmail.com> - 0-0.7.20200614git656914f
- Bump to commit 656914f816f9f6bcb37ec2b40cb7c16fd9084d4c
* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0-0.6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0-0.5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
* Sat Jul 06 22:40:41 CEST 2019 Robert-André Mauchin <zebob.m@gmail.com> - 0-0.4.20190706gitb3a7cee
- Bump to commit b3a7cee44a305be0a69e1b9ac03018307287e1b0
* Sat Jul 06 21:51:58 CEST 2019 Robert-André Mauchin <zebob.m@gmail.com> - 0-0.3.20190706gita5f05d4
- Bump to commit a5f05d44704602ce36b50a0201a439b616649972
* Sat Jul 06 19:08:03 CEST 2019 Robert-André Mauchin <zebob.m@gmail.com> - 0-0.2.20190706gitdb7b694
- Bump to commit db7b694dc208eead64d38030265f702db593fcf2
* Thu May 09 20:58:52 CEST 2019 Robert-André Mauchin <zebob.m@gmail.com> - 0-0.1.20190509git411b248
- Initial package
## END: Generated by rpmautospec