# Copyright (C) 2024 Maxwell G # SPDX-License-Identifier: MIT # License text: https://spdx.org/licenses/MIT %bcond manpages 1 %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.6.0^55.20250223.2211c2c %forgemeta Release: 1%{?dist} Summary: Tools for handling Go library vendoring in Fedora [SEE NOTE IN DESCRIPTION] # BSD-3-Clause: src/go_vendor_tools/archive.py License: MIT AND BSD-3-Clause URL: %{forgeurl} Source0: go-vendor-tools-0.6.0^55.20250223.2211c2c.tar.gz BuildArch: noarch BuildRequires: tomcli BuildRequires: python3-devel %if %{with manpages} BuildRequires: scdoc %endif Recommends: (askalono-cli or trivy) Recommends: go-vendor-tools+all %global common_description %{expand: go-vendor-tools provides tools and macros for handling Go library vendoring in Fedora. STABILITY NOTE: go-vendor-tools is under active development and available in the stable Fedora and Fedora EPEL repos for testing purposes. Expect some breaking changes between releases. Anyone using the `%%go_vendor_*` macros in active Fedora packages MUST join the Fedora Golang Matrix room and Fedora Go SIG mailing list to be notified of any major changes.} %description %common_description %package doc Summary: Documentation for go-vendor-tools Enhances: go-vendor-tools %description doc %common_description %prep %autosetup -p1 # Remove scancode-toolkit test dependency. # It's not available on s390x and not needed for unit tests. tomcli-set pyproject.toml lists delitem \ 'project.optional-dependencies.test' 'scancode-toolkit.*' %generate_buildrequires %pyproject_buildrequires -x all,test %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; 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 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 # TODO(anyone): Use -l flag once supported by EL 9. %pyproject_save_files go_vendor_tools # Install RPM macros install -Dpm 0644 rpm/macros.go_vendor_tools -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 %pytest %files -f %{pyproject_files} # Install top-level markdown files %doc *.md %license LICENSES/* %{_bindir}/go_vendor* %{bash_completions_dir}/go_vendor_* %{fish_completions_dir}/go_vendor_*.fish %{zsh_completions_dir}/_go_vendor_* %{_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/ %pyproject_extras_subpkg -n go-vendor-tools all %changelog * Sun Feb 23 2025 Maxwell G - 0.6.0^55.20250223.2211c2c-1 - rpm: remove wrapping and expr * Sun Feb 23 2025 Maxwell G - 0.6.0^54.20250223.584d48c-1 - license_detection search: include LICENSE.docs in root directory * Sun Feb 23 2025 Maxwell G - 0.6.0^53.20250223.03faa1e-1 - license_detection scancode; remove unused constants * Sun Feb 23 2025 Maxwell G - 0.6.0^52.20250223.22370d4-1 - lint basedpyright: remove duplicate pyproject configuration * Thu Feb 20 2025 Maxwell G - 0.6.0^51.20250220.5cbfced-1 - license_detection find_license_files: error for invalid manual entries * Thu Feb 20 2025 Maxwell G - 0.6.0^50.20250220.c160033-1 - doc: document RPM macros * Wed Feb 19 2025 Maxwell G - 0.6.0^49.20250219.a164b51-1 - doc: add go_vendor_license markdown docs * Wed Feb 19 2025 Maxwell G - 0.6.0^48.20250219.7c2e81e-1 - doc: add manpages for `go_vendor_license` and config * Wed Feb 19 2025 Maxwell G - 0.6.0^47.20250219.5288c4c-1 - license_detection: add detector_name to license data dict * Wed Feb 19 2025 Maxwell G - 0.6.0^46.20250219.8eec404-1 - cli license --update-spec: don't update if detection failed * Wed Feb 19 2025 Maxwell G - 0.6.0^45.20250219.300df05-1 - cli license: add help message * Wed Feb 19 2025 Maxwell G - 0.6.0^44.20250219.0b37b3e-1 - licensing compare_licenses: don't validate licenses * Wed Feb 19 2025 Maxwell G - 0.6.0^43.20250219.c18a042-1 - load get_detctors: fix typo in function name * Wed Feb 19 2025 Maxwell G - 0.6.0^42.20250219.2a300bb-1 - rpm: check for go_vendor_license_check_disable truthiness ... * Wed Feb 19 2025 Maxwell G - 0.6.0^41.20250219.8be62e1-1 - cli license: write detector_config when --write-config is enabled * Wed Feb 19 2025 Maxwell G - 0.6.0^40.20250219.ee7dab9-1 - licensing: add detector_config option * Wed Feb 19 2025 Maxwell G - 0.6.0^39.20250219.81c0536-1 - doc: document pre_commands and post_commands * Wed Feb 19 2025 Maxwell G - 0.6.0^38.20250219.d4459d6-1 - license_detection: support askalono --multiple and test REUSE * Tue Feb 18 2025 Maxwell G - 0.6.0^37.20250218.6006f52-1 - Revert "[wip] license_detection: workaround vendor.txt requirement" * Tue Feb 18 2025 Maxwell G - 0.6.0^36.20250218.32b86ae-1 - ci packit: disable osh scan * Tue Feb 18 2025 Maxwell G - 0.6.0^35.20250218.da9ede5-1 - tests: add missing specfile dependency * Tue Feb 18 2025 Maxwell G - 0.6.0^34.20250218.78a9655-1 - Implement go_vendor_license_check_disable * Tue Feb 18 2025 Maxwell G - 0.6.0^33.20250218.281fb50-1 - cli: make tomlkit optional again * Tue Feb 18 2025 Maxwell G - 0.6.0^32.20250218.5861371-1 - cli: make tomlkit optional again * Tue Feb 18 2025 Maxwell G - 0.6.0^31.20250218.f94034e-1 - lint basedpyright: exclude .nox from linting * Tue Feb 18 2025 Maxwell G - 0.6.0^30.20250218.972ff72-1 - specfile: make python3-specfile optional * Tue Feb 18 2025 Maxwell G - 0.6.0^29.20250218.407488a-1 - Add specfile module; allow updating specfile license * Mon Feb 17 2025 Maxwell G - 0.6.0^28.20250217.525b8d3-1 - specfile_sources: add docstrings * Sun Feb 16 2025 Maxwell G - 0.6.0^27.20250216.307b11c-1 - cli: catch_vendor_tools_error * Sun Feb 16 2025 Maxwell G - 0.6.0^26.20250216.f25cb12-1 - lint nox: fix typing errors with latest nox * Sun Feb 16 2025 Maxwell G - 0.6.0^25.20250216.865079b-1 - archive create: don't leave empty archive file if creation fails * Sun Feb 16 2025 Maxwell G - 0.6.0^24.20250216.8ee8125-1 - cli archive: add comment marking args loaded from config options * Sun Feb 09 2025 Maxwell G - 0.6.0^23.20250209.9de77fb-1 - nox bump: re-enable twine check * Sun Feb 09 2025 Maxwell G - 0.6.0^22.20250209.82f3a37-1 - ci: allow disabling scancode tests * Sun Feb 09 2025 Maxwell G - 0.6.0^21.20250209.3589fd1-1 - Finish implementing detect_only support * Fri Feb 07 2025 Maxwell G - 0.6.0^20.20250207.887e9a8-1 - lint: format with new black style * Fri Feb 07 2025 Maxwell G - 0.6.0^19.20250207.9ba9aca-1 - contrib devenv: add ipython * Wed Jan 29 2025 Maxwell G - 0.6.0^18.20250129.a768606-1 - license_detection: initial detect_only mode support * Wed Jan 29 2025 Maxwell G - 0.6.0^17.20250129.34ee2e9-1 - license_detection: cleanup trivy code and initial REUSE support * Wed Jan 29 2025 Maxwell G - 0.6.0^16.20250129.1a17717-1 - ci: temporarily disable Fedora Rawhide * Wed Jan 29 2025 Maxwell G - 0.6.0^15.20250129.ce0bf62-1 - ci: update Matrix for Fedora 41 * Wed Jan 29 2025 Maxwell G - 0.6.0^14.20250129.92a0de8-1 - [wip] license_detection: workaround vendor.txt requirement * Wed Jan 29 2025 Maxwell G - 0.6.0^13.20250129.8bf9550-1 - [wip] license_detection: add TODO comments * Wed Jan 29 2025 Maxwell G - 0.6.0^12.20250129.64d5117-1 - [wip] license_detection: use consistent method to find license files * Tue Jan 21 2025 Maxwell G - 0.6.0^11.20250121.89aa428-1 - dev doc README: fix dev branch name * Tue Jan 21 2025 Maxwell G - 0.6.0^10.20250121.63858f2-1 - dev doc README: add active development note * Fri Jan 17 2025 Maxwell G - 0.6.0^9.20250117.3bc8ea6-1 - internal contrib: add missing executable bit to script * Fri Jan 17 2025 Maxwell G - 0.6.0^8.20250117.d68271a-1 - dev: add devenv script * Thu Dec 12 2024 Maxwell G - 0.6.0^7.20241212.bdb6d6e-1 - doc: enable search * Wed Oct 02 2024 Maxwell G - 0.6.0^6.20241002.722c983-1 - doc scenarios: adjust generate specfile example * Mon Sep 23 2024 Maxwell G - 0.6.0^5.20240923.fc29f2d-1 - doc example-specfile: update go_vendor_archive create usage * Tue Sep 10 2024 Maxwell G - 0.6.0^4.20240910.c483b94-1 - packaging: remove scancode-toolkit dependency * Sun Sep 08 2024 Maxwell G - 0.6.0^3.20240908.2fb1fb2-1 - doc mkdocs: add meta tag for site description * Sun Sep 08 2024 Maxwell G - 0.6.0^2.20240908.6ea1338-1 - doc README: remove incorrect Fedora EPEL reference * Wed Aug 28 2024 Maxwell G - 0.6.0^1.20240828.cbc179f-1 - Post-release version bump * 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.