# Generated by go2rpm 1.16.0 %bcond check 1 # Two categories of upstream tests need skipping so %check is deterministic: # 1) Broken by Go 1.27 (Fedora 45 / rawhide) stdlib changes: # - TestMetrics_CompressibleData (repo): compress/flate output 36 -> 33 bytes # - TestFormatV1/V2/TestCompression_CompressibleData (repo/content): 79 -> 75 # - TestBuildFromExtraError (repo/maintenancestats): encoding/json v2 makes # "[]" -> "null", changing the asserted error text # 2) Upstream data race (architecture flaky, seen on fedora-45-ppc64le): # - TestFormatV1/V2/TestFlushWaitsForAllPendingWriters: a goroutine calls # t.Errorf after the parent test has completed, so Go reports # "Fail in goroutine after test has completed" # Go 1.27 fixes are upstream commit 56ff291 (#5681); the race has no fix yet. # Only those tests are skipped; everything else still runs. Note: go test -skip # treats "/" as parent/subtest path, so top-level names must be alternated into # the first segment and sibling names grouped into the second; the value must # stay unquoted (it is expanded unquoted via $GO_TEST_FLAGS). %global gotestflags %{gocompilerflags} -skip TestMetrics_CompressibleData|TestBuildFromExtraError|TestFormatV[12]/(TestCompression_CompressibleData|TestFlushWaitsForAllPendingWriters) # https://github.com/kopia/kopia %global goipath github.com/kopia/kopia Version: 0.23.1 %gometa -L -f %global common_description %{expand: Cross-platform backup tool for Windows, macOS & Linux with fast, incremental backups, client-side end-to-end encryption, compression and data deduplication.} Name: kopia Release: %autorelease Summary: Incremental backup tool with encryption, compression and deduplication # Generated by go-vendor-tools License: Apache-2.0 AND BSD-2-Clause AND BSD-3-Clause AND CC0-1.0 AND ISC AND MIT AND MPL-2.0 URL: %{gourl} Source0: %{gosource} # Generated by go-vendor-tools Source1: %{archivename}-vendor.tar.bz2 Source2: go-vendor-tools.toml BuildRequires: go-vendor-tools # for go test BuildRequires: openssh # for external storage support Recommends: rclone %description %{common_description} %prep %goprep -A %setup -q -T -D -a1 %{forgesetupargs} %generate_buildrequires %go_vendor_license_buildrequires -c %{S:2} %build export LDFLAGS=" \ -X github.com/kopia/kopia/repo.BuildVersion=%{version} \ -X github.com/kopia/kopia/repo.BuildInfo=fedora-rpm:%{version}-%{release} \ -X github.com/kopia/kopia/repo.BuildGitHubRepo=kopia/kopia" %gobuild -o %{gobuilddir}/bin/kopia %{goipath} %install %go_vendor_license_install -c %{S:2} install -m 0755 -vd %{buildroot}%{_bindir} install -m 0755 -vp %{gobuilddir}/bin/* %{buildroot}%{_bindir}/ %check %go_vendor_license_check -c %{S:2} %if %{with check} %gocheck %endif %files -f %{go_vendor_license_filelist} %license vendor/modules.txt %doc README.md %{_bindir}/kopia %changelog %autochangelog