File go-mtree.spec of Package go-mtree
#
# spec file for package go-mtree
#
# 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 http://bugs.opensuse.org/
%define project github.com/vbatts/go-mtree
Name: go-mtree
Version: 0.6.0
Release: 0
Summary: Filesystem verification utility
License: BSD-3-Clause
Group: Productivity/File utilities
Url: https://github.com/vbatts/go-mtree
Source0: https://github.com/vbatts/go-mtree/archive/refs/tags/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
# FIX-UPSTREAM: Backports of <https://github.com/vbatts/go-mtree/pull/212>,
# <https://github.com/vbatts/go-mtree/pull/214>, and
# <https://github.com/vbatts/go-mtree/pull/211>.
Patch101: 0001-compare-properly-compare-tar_time-and-time.patch
Patch102: 0002-compare-improve-tar_time-truncation.patch
Patch103: 0003-go.mod-run-tidy-and-vendor.patch
Patch104: 0004-gha-add-ci-job-to-check-go-mod-and-vendor.patch
Patch105: 0005-test-use-t.TempDir.patch
Patch106: 0006-test-migrate-most-tests-to-testify.patch
Patch107: 0007-mtree-test-correctly-check-number-of-types.patch
Patch108: 0008-govis-switch-to-testify-tests.patch
Patch109: 0009-govis-add-SPDX-license-tag.patch
Patch110: 0010-govis-modernise-errors.patch
Patch111: 0011-unvis-add-some-more-error-tests.patch
Patch112: 0012-unvis-switch-to-methods-for-parser.patch
Patch113: 0013-unvis-make-Next-return-chars-and-add-Step-helper.patch
Patch114: 0014-unvis-improve-performance-by-reducing-allocations.patch
Patch115: 0015-vis-improve-performance-by-reducing-allocations.patch
Patch116: 0016-vis-switch-to-switch-for-non-escaped-logic.patch
Patch117: 0017-vis-make-all-logic-byte-native.patch
Patch118: 0018-compare-export-official-way-to-modify-InodeDelta.Dif.patch
Patch119: 0019-compare-modernise-compareEntry.patch
Patch120: 0020-compare-modernise-DirectoryHierarchy-compare-impl.patch
Patch121: 0021-govis-support-double-quote-escapes.patch
Patch122: 0022-cmd-validate-remove-dead-current-keyword-code.patch
Patch123: 0023-cmd-validate-restructure-filtering-to-use-filter-fun.patch
Patch124: 0024-compare-move-FreeBSD-loose-keyword-comparisons-to-go.patch
Patch125: 0025-cmd-validate-add-strict-mode.patch
BuildRequires: go >= 1.24
%description
go-mtree is a reimplementation of the BSD utility mtree(8) for GNU/Linux,
focusing on UX compatibility. In addition, it exposes a library allowing for
other developers to implement effective filesystem verification and comparison.
%prep
%autosetup -p1
%build
go build -buildmode=pie -o gomtree %{project}/cmd/gomtree
%install
install -D -m 0755 gomtree "%{buildroot}/%{_bindir}/gomtree"
%files
%defattr(-,root,root)
%doc LICENSE README.md
%{_bindir}/gomtree
%changelog