# Copyright (C) 2024 Maxwell G # SPDX-License-Identifier: MIT # License text: https://spdx.org/licenses/MIT %bcond manpages 1 # Whether license scanner deps are wanted at buildtime %bcond license_scanners %[ %{defined fedora} || %{defined epel} ] # Whether to enable any extras (not all dependencies are in ELN) %bcond extras %[%{defined fedora} || %{defined epel}] # scancode-specific handling --- it has a lot of deps and is not packaged for EPEL. # Whether to build the scancode extra %bcond scancode %[ %{with license_scanners} && %{defined fedora} ] # Only run scancode tests (and install scancode at buildtime) when arch is not i386 %bcond scancode_tests %[ %{with scancode} && "%{_arch}" != "i386"] %global forgeurl https://gitlab.com/fedora/sigs/go/go-vendor-tools %define tag v%{version_no_tilde %{quote:%nil}} Name: go-vendor-tools Version: 0.12.0^20260805.052704.22.577869b %forgemeta Release: 1%{?dist} Summary: Tools for handling Go library vendoring in Fedora # BSD-3-Clause: src/go_vendor_tools/archive.py License: MIT AND BSD-3-Clause URL: %{forgeurl} Source0: go-vendor-tools-0.12.0^20260805.052704.22.577869b.tar.gz BuildArch: noarch BuildRequires: python3-devel # Generate shell completions at buildtime BuildRequires: python3-argcomplete # Test dependencies %if %{with license_scanners} BuildRequires: askalono-cli BuildRequires: trivy %endif # Specify these manually instead of using the test extra since it pulls in # extras deps not wanted in ELN. # TODO: Get rid of Python extras and switch to more fine-grained pyproject # dependency groups for dev deps. BuildRequires: %{py3_dist pytest} BuildRequires: %{py3_dist pytest-mock} %if %{with manpages} BuildRequires: scdoc %endif # First choice backend Recommends: askalono-cli # Used by default for go_vendor_license report --autofill Recommends: go-vendor-tools+scancode Recommends: go-vendor-tools+all # NOTE(gotmax23): Buildflags from go-rpm-macros are used by %%gocheck2 defined # in this package, but we don't want to depend on it directly. # Packages should still explicitly require go-rpm-macros, and the license # scanning in this package could potentially be useful outside of the Go ecosystem, # so it would be nice to avoid dependning on go-rpm-macros in this package. # Requires: go-rpm-macros %global common_description %{expand: go-vendor-tools provides tools and macros for handling Go library vendoring in Fedora.} %description %common_description %package doc Summary: Documentation for go-vendor-tools Enhances: go-vendor-tools %description doc %common_description %prep %autosetup -p1 %generate_buildrequires %pyproject_buildrequires %{?with_extras:-x all} %{?with_scancode_tests:-x scancode} %build %pyproject_wheel %if %{with manpages} ./doc/man/mkman.sh %endif mkdir -p bash_completions fish_completions zsh_completions for bin in go_vendor_archive go_vendor_license gocheck2; do register-python-argcomplete --shell bash "${bin}" > "bash_completions/${bin}" register-python-argcomplete --shell fish "${bin}" > "fish_completions/${bin}.fish" # Compatibility with old argcomplete versions that don't direcrly support zsh if ! (register-python-argcomplete --shell zsh "${bin}" > "zsh_completions/_${bin}"); then echo "#compdef ${bin}" > "zsh_completions/_${bin}" echo -e "autoload -Uz bashcompinit\nbashcompinit" >> "zsh_completions/_${bin}" cat "bash_completions/${bin}" >> "zsh_completions/_${bin}" fi done %install %pyproject_install %pyproject_save_files go_vendor_tools -l # Install RPM macros install -Dpm 0644 rpm/macros.go_vendor_tools -t %{buildroot}%{_rpmmacrodir} install -Dpm 0644 rpm/macros.gocheck2 -t %{buildroot}%{_rpmmacrodir} # Install documentation mkdir -p %{buildroot}%{_docdir}/go-vendor-tools-doc cp -rL doc/* %{buildroot}%{_docdir}/go-vendor-tools-doc # Install manpages %if %{with manpages} install -Dpm 0644 doc/man/*.1 -t %{buildroot}%{_mandir}/man1/ install -Dpm 0644 doc/man/*.5 -t %{buildroot}%{_mandir}/man5/ %endif # Install completions install -Dpm 0644 bash_completions/* -t %{buildroot}%{bash_completions_dir}/ install -Dpm 0644 fish_completions/* -t %{buildroot}%{fish_completions_dir}/ install -Dpm 0644 zsh_completions/* -t %{buildroot}%{zsh_completions_dir}/ %check %if %{defined rhel} && %{undefined epel} export GVTT_FORCE_LICENSE_CHECK_ENABLE=1 %endif %pyproject_check_import export MACRO_DIR=%{buildroot}%{_rpmmacrodir} %pytest %files -f %{pyproject_files} # Install top-level markdown files %doc *.md %{_bindir}/gocheck2 %{_bindir}/go_vendor* %{bash_completions_dir}/go* %{fish_completions_dir}/go*.fish %{zsh_completions_dir}/_go* %{_rpmmacrodir}/macros.gocheck2 %{_rpmmacrodir}/macros.go_vendor_tools %if %{with manpages} %{_mandir}/man1/go*.1* %{_mandir}/man5/go*.5* %endif %files doc %doc %{_docdir}/go-vendor-tools-doc/ # We always include the extras on ELN so that they are built for ELN Extras. %if %{with extras} || %{defined eln} %pyproject_extras_subpkg -n go-vendor-tools all %{?with_scancode:scancode} %endif %changelog * Wed Aug 05 2026 Maxwell G - 0.12.0^20260805.052704.22.577869b-1 - ci: make PIP_CONSTRAINT path absolute * Wed Aug 05 2026 Maxwell G - 0.12.0^20260805.052355.21.77f1c32-1 - ci: make sure pipx uses constraints file * Wed Aug 05 2026 Maxwell G - 0.12.0^20260805.051153.20.f675e89-1 - ci: add constraint for argcomplete * Wed Aug 05 2026 Maxwell G - 0.12.0^20260805.044304.19.f4edd7c-1 - ci: set NOX_DEFAULT_VENV_BACKEND for python3.9 compat * Wed Aug 05 2026 Maxwell G - 0.12.0^20260805.042721.18.5583807-1 - trigger ci * Tue Aug 04 2026 Maxwell G - 0.12.0^20260804.051807.17.ffcdb95-1 - archive: cleanly error when python3-specfile is not installed * Tue Aug 04 2026 Maxwell G - 0.12.0^20260804.051807.16.cc58fb4-1 - ci: add tmt test scaffolding and initial go_vendor_archive check * Tue Aug 04 2026 Maxwell G - 0.12.0^20260804.051807.15.9aa72b2-1 - ci: packit: use packaged go-vendor-tools for integration tests * Tue Aug 04 2026 Maxwell G - 0.12.0^20260804.051807.14.5f0d5a9-1 - ci: packit: enable minimal tests on ELN * Tue Aug 04 2026 Maxwell G - 0.12.0^20260804.051807.13.c2c57e0-1 - tests: integration: remove trivy dep on RHEL * Tue Aug 04 2026 Maxwell G - 0.12.0^20260804.051802.12.0be59d0-1 - Fix CI and ELN build minimization * Tue Jul 28 2026 Yaakov Selkowitz - 0.12.0^20260728.170004.11.729945f-1 - spec: build minimal version for RHEL * Tue Jul 28 2026 Yaakov Selkowitz - 0.12.0^20260728.165959.10.097b2d3-1 - Skip tests which call commands that need_tomlkit if absent * Tue Jul 28 2026 Maxwell G - 0.12.0^20260728.042914.9.6e5e78f-1 - lint: ignore additional new ruff error * Tue Jul 28 2026 Maxwell G - 0.12.0^20260728.040609.8.def2180-1 - lint: ignore additional ruff errors * Tue Jul 28 2026 Maxwell G - 0.12.0^20260728.040434.7.33f62e0-1 - gomod: fix allow_missing behavior * Tue Jul 28 2026 Maxwell G - 0.12.0^20260728.040422.6.4a85ce9-1 - doc scenarios: add additional details and Guidelines link * Thu Jun 11 2026 Maxwell G - 0.12.0^20260611.033845.5.29714c9-1 - ci: python3.9 -> python3.9-devel * Thu Jun 11 2026 Maxwell G - 0.12.0^20260611.021704.4.a19ad57-1 - ci: add Python 3.14 to matrix * Thu Jun 11 2026 Maxwell G - 0.12.0^20260611.020225.3.1466eef-1 - ci: update Fedora versions * Tue May 19 2026 Mikel - 0.12.0^20260519.145703.2.3b0e43f-1 - archive: fail clearly when --config path is missing or invalid * Wed Apr 22 2026 Maxwell G - 0.12.0^20260422.022026.1.7b32f5a-1 - Post-release version bump * Wed Apr 22 2026 Maxwell G - 0.12.0-1 - Release 0.12.0. * Wed Mar 18 2026 Maxwell G - 0.11.0-1 - Release 0.11.0. * Fri Oct 31 2025 Maxwell G - 0.10.0-1 - Release 0.10.0. * Thu Oct 02 2025 Maxwell G - 0.9.0-1 - Release 0.9.0. * Thu Jul 17 2025 Maxwell G - 0.8.0-1 - Release 0.8.0. * Sun Mar 23 2025 Maxwell G - 0.7.0-1 - Release 0.7.0. * Wed Aug 28 2024 Maxwell G - 0.6.0-1 - Release 0.6.0. * Thu Apr 11 2024 Maxwell G - 0.5.1-1 - Release 0.5.1. * Thu Apr 11 2024 Maxwell G - 0.5.0-1 - Release 0.5.0. * Wed Apr 10 2024 Maxwell G - 0.4.0-1 - Release 0.4.0. * Wed Apr 10 2024 Maxwell G - 0.4.0~b1-1 - Release 0.4.0b1. * Thu Mar 28 2024 Maxwell G - 0.3.0-1 - Release 0.3.0. * Sat Mar 16 2024 Maxwell G - 0.2.0-1 - Release 0.2.0. * Sat Mar 09 2024 Maxwell G - 0.1.0-1 - Release 0.1.0. * Tue Mar 05 2024 Maxwell G - 0.0.1-1 - Release 0.0.1.