# Generated by go2rpm 1.16.0 %bcond check 1 # Upstream embeds a pre-generated, minified copy of its web UI from # github.com/kopia/htmluibuild. The original UI source is a separate # repository; Source3 is the kopia/htmlui tree matching the assets shipped # in htmluibuild (the htmluibuild commit message records the htmlui commit # e9f6ace72ea3a9edd4f8526e133885afa33c42e7). Fedora requires the source for # pre-generated code to be present in the source package. Regenerating the # bundle would require the complete npm/vite dependency chain, which is not # packaged in Fedora, so the pre-generated bundle is retained as a # documented significant-hardship case under the JavaScript guidelines. # The bundled npm libraries are declared with Provides below and their # license texts are installed from Source4. # https://docs.fedoraproject.org/en-US/packaging-guidelines/what-can-be-packaged/#pregenerated-code # https://docs.fedoraproject.org/en-US/packaging-guidelines/JavaScript/ # 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: gocheck2 # combines the -s values into a single go test -skip expression, where "/" # separates parent and subtest names, so the full subtest paths are passed # below. # ppc64le uses 64K filesystem blocks, equal to iocopy.BufSize. The sparse # restore test assumes a smaller block size, underflows an offset, and then # checks the wrong physical allocation sizes. %ifarch ppc64le %global skip_ppc64le_tests -s TestSnapshotSparseRestore %endif # This randomized stress test has been observed to fail on s390x with a # deleted-flag mismatch (upstream has no deterministic fix yet). %ifarch s390x %global skip_s390x_tests -s TestIndexBlobManagerStress %endif # 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 CC-BY-4.0 AND ISC AND MIT AND MPL-2.0 AND 0BSD URL: %{gourl} Source0: %{gosource} # Generated by go-vendor-tools Source1: %{archivename}-vendor.tar.bz2 Source2: go-vendor-tools.toml # Source for the pre-generated HTML UI, see the comment at the top Source3: https://github.com/kopia/htmlui/archive/e9f6ace72ea3a9edd4f8526e133885afa33c42e7/htmlui-e9f6ace72ea3a9edd4f8526e133885afa33c42e7.tar.gz # License texts for the npm libraries bundled in the pre-generated HTML UI Source4: htmlui-npm-licenses.txt # Bundled npm libraries in the pre-generated HTML UI (versions from # htmlui/package-lock.json at commit e9f6ace72ea3a9edd4f8526e133885afa33c42e7) Provides: bundled(npm(@babel/runtime)) = 7.27.1 Provides: bundled(npm(@fortawesome/fontawesome-common-types)) = 6.7.2 Provides: bundled(npm(@fortawesome/fontawesome-common-types)) = 7.1.0 Provides: bundled(npm(@fortawesome/fontawesome-svg-core)) = 6.7.2 Provides: bundled(npm(@fortawesome/free-regular-svg-icons)) = 6.7.2 Provides: bundled(npm(@fortawesome/free-solid-svg-icons)) = 7.1.0 Provides: bundled(npm(@fortawesome/react-fontawesome)) = 0.2.2 Provides: bundled(npm(@popperjs/core)) = 2.11.8 Provides: bundled(npm(@react-aria/ssr)) = 3.9.8 Provides: bundled(npm(@restart/hooks)) = 0.4.16 Provides: bundled(npm(@restart/hooks)) = 0.5.1 Provides: bundled(npm(@restart/ui)) = 1.9.4 Provides: bundled(npm(@swc/helpers)) = 0.5.17 Provides: bundled(npm(@tanstack/react-table)) = 8.21.3 Provides: bundled(npm(@tanstack/table-core)) = 8.21.3 Provides: bundled(npm(axios)) = 1.16.0 Provides: bundled(npm(bootstrap)) = 5.3.6 Provides: bundled(npm(classnames)) = 2.5.1 Provides: bundled(npm(cookie)) = 1.1.1 Provides: bundled(npm(dequal)) = 2.0.3 Provides: bundled(npm(dom-helpers)) = 5.2.1 Provides: bundled(npm(invariant)) = 2.2.4 Provides: bundled(npm(js-tokens)) = 4.0.0 Provides: bundled(npm(loose-envify)) = 1.4.0 Provides: bundled(npm(moment)) = 2.30.1 Provides: bundled(npm(object-assign)) = 4.1.1 Provides: bundled(npm(prop-types)) = 15.8.1 Provides: bundled(npm(prop-types-extra)) = 1.1.1 Provides: bundled(npm(react)) = 19.1.0 Provides: bundled(npm(react-bootstrap)) = 2.10.10 Provides: bundled(npm(react-dom)) = 19.1.0 Provides: bundled(npm(react-is)) = 16.13.1 Provides: bundled(npm(react-lifecycles-compat)) = 3.0.4 Provides: bundled(npm(react-router)) = 7.17.0 Provides: bundled(npm(react-router-dom)) = 7.17.0 Provides: bundled(npm(react-transition-group)) = 4.4.5 Provides: bundled(npm(scheduler)) = 0.26.0 Provides: bundled(npm(set-cookie-parser)) = 2.7.2 Provides: bundled(npm(tslib)) = 2.8.1 Provides: bundled(npm(uncontrollable)) = 7.2.1 Provides: bundled(npm(uncontrollable)) = 8.0.4 Provides: bundled(npm(warning)) = 4.0.3 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} # Place the bundled npm license texts in the source tree so that # go-vendor-tools installs them and includes them in the license check. cp -p %{S:4} . %generate_buildrequires %go_vendor_license_buildrequires -c %{S:2} %build export GO_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} %gocheck2 -F -s TestMetrics_CompressibleData -s TestBuildFromExtraError -s TestFormatV1/TestCompression_CompressibleData -s TestFormatV1/TestFlushWaitsForAllPendingWriters -s TestFormatV2/TestCompression_CompressibleData -s TestFormatV2/TestFlushWaitsForAllPendingWriters %{?skip_ppc64le_tests} %{?skip_s390x_tests} -- -p 1 %endif %files -f %{go_vendor_license_filelist} %doc README.md %{_bindir}/kopia %changelog %autochangelog