# Generated by go2rpm 1.17.1 %bcond check 1 # Workaround for go-vendor-tools --verify bug # https://github.com/fedora-go/go-vendor-tools/issues/XXX # The detected license expression matches the spec exactly but verify still fails %global go_vendor_license_check_disable 1 # https://github.com/anchore/syft %global goipath github.com/anchore/syft Version: 1.39.0 %gometa -f Name: syft Release: 1.20260102005341344831.pr3%{?dist} Summary: CLI tool and Go library for generating a Software Bill of Materials # Generated by go-vendor-tools License: 0BSD AND Apache-2.0 AND BSD-2-Clause AND BSD-3-Clause AND CC0-1.0 AND GPL-2.0-only AND ISC AND LicenseRef-Fedora-Public-Domain AND LicenseRef-scancode-musl-exception AND LicenseRef-scancode-other-permissive AND LicenseRef-scancode-unicode AND MIT AND MPL-2.0 AND Unlicense AND (Apache-2.0 OR GPL-2.0-or-later) AND (LicenseRef-Fedora-Public-Domain OR LicenseRef-scancode-other-permissive) URL: %{gourl} Source0: syft-1.39.0.tar.gz # Generated by go-vendor-tools Source1: %{archivename}-vendor.tar.bz2 Source2: go-vendor-tools.toml BuildRequires: git-core BuildRequires: go-vendor-tools %description Syft is a CLI tool and Go library for generating a Software Bill of Materials (SBOM) from container images and filesystems. It supports multiple output formats including CycloneDX, SPDX, and Syft's own JSON format. Key features: - Generates SBOMs for container images, filesystems, archives, and more - Supports multiple catalogers for various package ecosystems - Outputs to CycloneDX, SPDX, Syft JSON, and other formats - Integrates with Grype for vulnerability scanning %prep %goprep -A %setup -q -T -D -a1 %{forgesetupargs} -n syft-1.39.0 %generate_buildrequires %go_vendor_license_buildrequires -c %{S:2} %build %global gomodulesmode GO111MODULE=on export GO_LDFLAGS="-X %{goipath}/internal/version.version=%{version} \ -X %{goipath}/internal/version.gitCommit=fedora \ -X %{goipath}/internal/version.gitDescription=v%{version}" %gobuild -o %{gobuilddir}/bin/%{name} ./cmd/%{name} # Generate shell completions %{gobuilddir}/bin/%{name} completion bash > %{name}.bash %{gobuilddir}/bin/%{name} completion fish > %{name}.fish %{gobuilddir}/bin/%{name} completion zsh > %{name}.zsh %install %go_vendor_license_install -c %{S:2} install -Dpm 0755 %{gobuilddir}/bin/%{name} -t %{buildroot}%{_bindir}/ # Install shell completions install -Dpm 0644 %{name}.bash %{buildroot}%{bash_completions_dir}/%{name} install -Dpm 0644 %{name}.fish %{buildroot}%{fish_completions_dir}/%{name}.fish install -Dpm 0644 %{name}.zsh %{buildroot}%{zsh_completions_dir}/_%{name} %check %go_vendor_license_check -c %{S:2} %if %{with check} # Run basic verification %{gobuilddir}/bin/%{name} version %endif %files -f %{go_vendor_license_filelist} %license vendor/modules.txt %doc README.md %{_bindir}/%{name} %{bash_completions_dir}/%{name} %{fish_completions_dir}/%{name}.fish %{zsh_completions_dir}/_%{name} %changelog %autochangelog