-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathkubescape.spec
182 lines (136 loc) · 6.28 KB
/
kubescape.spec
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
#
# spec file for building package kubescape in openSUSE Build Service (OBS)
#
# Copyright (c) 2023 The Kubescape Authors
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://github.com/kubescape/kubescape/issues
#
Name: kubescape
Version: 3.0.8
Release: 0
Summary: CLI interface of a Kubernetes security platform
License: Apache-2.0
Group: Development/Tools/Other
URL: https://github.com/kubescape/%{name}
Source0: %{name}_%{version}.tar.xz
BuildRequires: golang
%description
An open-source Kubernetes security platform for your IDE, CI/CD pipelines, and clusters.
It includes risk analysis, security, compliance, and misconfiguration scanning, saving
Kubernetes users and administrators precious time, effort, and resources.
%package bash-completion
Summary: Bash Completion for %{name}
Group: System/Shells
Requires: bash-completion
Supplements: packageand(%{name}:bash)
BuildArch: noarch
%description bash-completion
The official bash completion script for %{name}, generated during the build.
%package zsh-completion
Summary: Zsh Completion for %{name}
Group: System/Shells
Requires: zsh-completion
Supplements: packageand(%{name}:zsh)
BuildArch: noarch
%description zsh-completion
The official zsh completion script for %{name}, generated during the build.
%package fish-completion
Summary: Fish Completion for %{name}
Group: System/Shells
Requires: fish-completion
Supplements: packageand(%{name}:fish)
BuildArch: noarch
%description fish-completion
The official fish completion script for %{name}, generated during the build.
%prep
%setup -q -n deb
%build
export GOVERSION_MAJOR=$(go version | cut -f1 -d. | cut -f4 -do)
export GOVERSION_MINOR=$(go version | cut -f2 -d. | cut -f1 -d' ')
# Use our go compiler if golang version is less than 1.20
if [[ ${GOVERSION_MAJOR} -lt 1 || ${GOVERSION_MINOR} -lt 20 ]]; then
export GOROOT=$(pwd)/golang
export PATH=${GOROOT}/bin:$PATH
cd golang/src; bash ./make.bash; cd ../..
fi
cd %{name}
go version
go build -mod=vendor -buildmode=pie -buildvcs=false -ldflags="-s -w -X github.com/kubescape/%{name}/v3/core/cautils.BuildNumber=v%{version}" -o %{name}
%install
install -Dpm 0755 %{name}/%{name} %{buildroot}%{_bindir}/%{name}
# Bash autocomplete file
%{buildroot}/%{_bindir}/%{name} completion bash > %{name}-autocomplete.sh
install -Dm 644 %{name}-autocomplete.sh %{buildroot}%{_datadir}/bash-completion/completions/%{name}
# Zsh autocomplete file
%{buildroot}/%{_bindir}/%{name} completion zsh > %{name}-autocomplete.sh
install -Dm 644 %{name}-autocomplete.sh %{buildroot}%{_datadir}/zsh/vendor-completions/_%{name}
# Fish autocomplete file
%{buildroot}/%{_bindir}/%{name} completion fish > %{name}-autocomplete.sh
install -Dm 644 %{name}-autocomplete.sh %{buildroot}%{_datadir}/fish/vendor_completions.d/%{name}.fish
%check
if [ "$(%{buildroot}%{_bindir}/%{name} version)" != "Your current version is: v%{version}" ]; then exit 1; fi
%files
%license %{name}/LICENSE
%doc %{name}/README.md
%{_bindir}/%{name}
%files bash-completion
%{_datadir}/bash-completion
%files zsh-completion
%{_datadir}/zsh
%files fish-completion
%{_datadir}/fish
%changelog
* Thu Mar 28 2024 Kubescape Maintainers <[email protected]> - 3.0.8
- Update to 3.0.8
* Mon Mar 18 2024 Kubescape Maintainers <[email protected]> - 3.0.7
- Update to 3.0.7
* Thu Mar 14 2024 Kubescape Maintainers <[email protected]> - 3.0.6
- Update to 3.0.6
* Wed Mar 13 2024 Kubescape Maintainers <[email protected]> - 3.0.5
- Update to 3.0.5
* Sun Mar 10 2024 Kubescape Maintainers <[email protected]> - 3.0.4
- Update to 3.0.4
* Mon Jan 08 2024 Kubescape Maintainers <[email protected]> - 3.0.3
- Update to 3.0.3
* Thu Dec 07 2023 Kubescape Maintainers <[email protected]> - 3.0.1
- Update to 3.0.1
* Sun Aug 13 2023 Kubescape Maintainers <[email protected]> - 2.9.0
- Update to 2.9.0
* Tue Jul 25 2023 Kubescape Maintainers <[email protected]> - 2.3.8
- Update to 2.3.8
* Thu Jul 06 2023 Kubescape Maintainers <[email protected]> - 2.3.7
- Update to 2.3.7
* Thu Jun 15 2023 Kubescape Maintainers <[email protected]> - 2.3.6
- Update to 2.3.6
* Sun Jun 04 2023 Kubescape Maintainers <[email protected]> - 2.3.5
- Update to 2.3.5
* Sun May 28 2023 Kubescape Maintainers <[email protected]> - 2.3.4
- Update to 2.3.4
* Tue May 16 2023 Kubescape Maintainers <[email protected]> - 2.3.3
- Update to 2.3.3
* Mon May 15 2023 Kubescape Maintainers <[email protected]> - 2.3.2
- Update to 2.3.2
* Tue May 09 2023 Kubescape Maintainers <[email protected]> - 2.3.1
- Update to 2.3.1
* Mon Apr 03 2023 Kubescape Maintainers <[email protected]> - 2.2.6
- Update to 2.2.6
* Fri Mar 24 2023 Kubescape Maintainers <[email protected]> - 2.2.5
- Update to 2.2.5
* Sat Mar 11 2023 Kubescape Maintainers <[email protected]> - 2.2.4
- Update to 2.2.4
* Sun Feb 26 2023 Kubescape Maintainers <[email protected]> - 2.2.2
- Upgrade with patches
* Thu Feb 23 2023 Kubescape Maintainers <[email protected]> - 2.2.1
- Upgrade
* Wed Feb 15 2023 Kubescape Maintainers <[email protected]> - 2.2.0
- New control statuses (https://github.com/kubescape/kubescape/pull/1016)
* Fri Feb 10 2023 Kubescape Maintainers <[email protected]> - 2.1.3
- Init kubescape package