Files
cosign/cosign.spec
Marcus Meissner dd8a687f46 - Update to version 3.0.3:
* 4554: Closes 4554 - Add warning when --output* is used (#4556)
  * chore(deps): bump golangci/golangci-lint-action from 8.0.0 to 9.1.0 (#4545)
  * chore(deps): bump github.com/buildkite/agent/v3 from 3.111.0 to 3.113.0 (#4542)
  * chore(deps): bump github.com/awslabs/amazon-ecr-credential-helper/ecr-login (#4543)
  * chore(deps): bump actions/checkout from 5.0.0 to 6.0.0 (#4546)
  * chore(deps): bump the actions group with 4 updates (#4544)
  * chore(deps): bump the gomod group across 1 directory with 5 updates (#4567)
  * chore(deps): bump golang from 1.25.4 to 1.25.5 in the all group (#4568)
  * update builder to use go1.25.5 (#4566)
  * Protobuf bundle support for subcommand `clean` (#4539)
  * Add staging flag to initialize with staging TUF metadata
  * update slack invite link (#4560)
  * Updating sign-blob to also support signing with a certificate (#4547)
  * Bump sigstore library dependencies (#4532)
  * Protobuf bundle support for subcommands `save` and `load` (#4538)
  * Fix cert attachment for new bundle with signing config
  * Fix OCI verification with local cert - old bundle
  * chore(deps): bump github.com/sigstore/fulcio from 1.7.1 to 1.8.1 (#4519)
  * chore(deps): bump golang.org/x/crypto in /test/fakeoidc (#4535)
  * chore(deps): bump golang.org/x/crypto from 0.43.0 to 0.45.0 (#4536)
  * update go builder and cosign (#4529)
  * chore(deps): bump the gomod group across 1 directory with 7 updates (#4528)
  * chore(deps): bump sigstore/cosign-installer from 3.10.0 to 4.0.0 (#4478)
  * chore(deps): bump gitlab.com/gitlab-org/api/client-go (#4520)
  * chore(deps): bump golang from 1.25.3 to 1.25.4 in the all group (#4515)
  * chore(deps): bump golang.org/x/oauth2 from 0.32.0 to 0.33.0 (#4518)
  * chore(deps): bump cuelang.org/go from 0.14.2 to 0.15.0 (#4524)
  * chore(deps): bump github.com/open-policy-agent/opa from 1.9.0 to 1.10.1 (#4521)
  * chore(deps): bump actions/upload-artifact from 4.6.2 to 5.0.0 (#4502)

OBS-URL: https://build.opensuse.org/package/show/security/cosign?expand=0&rev=60
2025-12-20 13:56:49 +00:00

125 lines
4.1 KiB
RPMSpec

#
# spec file for package cosign
#
# Copyright (c) 2025 SUSE LLC and contributors
#
# 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://bugs.opensuse.org/
#
Name: cosign
Version: 3.0.3
Release: 0
Summary: Container Signing, Verification and Storage in an OCI registry
License: Apache-2.0
URL: https://github.com/sigstore/cosign
Source: https://github.com/sigstore/cosign/archive/refs/tags/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
Source1: vendor.tar.zst
BuildRequires: golang-packaging
BuildRequires: zstd
BuildRequires: golang(API) = 1.25
%description
Cosign aims to make signatures invisible infrastructure.
Cosign supports:
- Hardware and KMS signing
- Bring-your-own PKI
- Our free OIDC PKI (Fulcio)
- Built-in binary transparency and timestamping service (Rekor)
%package -n %{name}-bash-completion
Summary: Bash Completion for %{name}
Group: System/Shells
Requires: %{name} = %{version}
Requires: bash-completion
Supplements: (%{name} and bash-completion)
BuildArch: noarch
%description -n %{name}-bash-completion
Bash command line completion support for %{name}.
%package -n %{name}-fish-completion
Summary: Fish Completion for %{name}
Group: System/Shells
Requires: %{name} = %{version}
Supplements: (%{name} and fish)
BuildArch: noarch
%description -n %{name}-fish-completion
Fish command line completion support for %{name}.
%package -n %{name}-zsh-completion
Summary: Zsh Completion for %{name}
Group: System/Shells
Requires: %{name} = %{version}
Supplements: (%{name} and zsh)
BuildArch: noarch
%description -n %{name}-zsh-completion
zsh command line completion support for %{name}.
%prep
%autosetup -p1 -a1
%build
COMMIT_HASH="$(sed -n 's/commit: \(.*\)/\1/p' %_sourcedir/%{name}.obsinfo)"
DATE_FMT="+%%Y-%%m-%%dT%%H:%%M:%%SZ"
BUILD_DATE=$(date -u -d "@${SOURCE_DATE_EPOCH}" "${DATE_FMT}" 2>/dev/null || date -u -r "${SOURCE_DATE_EPOCH}" "${DATE_FMT}" 2>/dev/null || date -u "${DATE_FMT}")
CLI_PKG=sigs.k8s.io/release-utils/version
CLI_LDFLAGS="-X ${CLI_PKG}.gitVersion=%{version} -X ${CLI_PKG}.gitCommit=$COMMIT_HASH -X ${CLI_PKG}.gitTreeState=release -X ${CLI_PKG}.buildDate=${BUILD_DATE}"
export GOFIPS140=v1.0.0
CGO_ENABLED=1 go build -mod=vendor -buildmode=pie -trimpath -ldflags "${CLI_LDFLAGS}" -o cosign ./cmd/cosign
%check
./cosign version
%install
install -D -m 0755 cosign %{buildroot}%{_bindir}/cosign
# create the bash completion file
mkdir -p %{buildroot}%{_datarootdir}/bash-completion/completions/
%{buildroot}/%{_bindir}/%{name} completion bash > %{buildroot}%{_datarootdir}/bash-completion/completions/%{name}
# create the fish completion file
mkdir -p %{buildroot}%{_datarootdir}/fish/vendor_completions.d/
%{buildroot}/%{_bindir}/%{name} completion fish > %{buildroot}%{_datarootdir}/fish/vendor_completions.d/%{name}.fish
# create the zsh completion file
mkdir -p %{buildroot}%{_datarootdir}/zsh_completion.d/
%{buildroot}/%{_bindir}/%{name} completion zsh > %{buildroot}%{_datarootdir}/zsh_completion.d/_%{name}
%files
%license LICENSE
%doc *.md
%{_bindir}/cosign
%files -n %{name}-bash-completion
%dir %{_datarootdir}/bash-completion/completions/
%{_datarootdir}/bash-completion/completions/%{name}
%files -n %{name}-fish-completion
%dir %{_datarootdir}/fish
%dir %{_datarootdir}/fish/vendor_completions.d
%{_datarootdir}/fish/vendor_completions.d/%{name}.fish
%files -n %{name}-zsh-completion
%defattr(-,root,root)
%dir %{_datarootdir}/zsh_completion.d/
%{_datarootdir}/zsh_completion.d/_%{name}
%changelog