%global goipath github.com/peak/s5cmd/v2 %global commit 991c9fbc16709341b4bac04513232a1445941f63 Name: s5cmd Version: 2.3.0 Release: 1%{?dist} Summary: Parallel S3 and local filesystem execution tool # s5cmd itself is MIT. The upstream tarball ships its Go dependencies in # vendor/, and the licence below covers only the modules linked into the # binary (go list -deps -mod=vendor ., f44, 2026-10-11), not everything # vendored for tests: # MIT: s5cmd, ewma, fatih/color, go-md2man, go-shellquote, # go-colorable, go-isatty, go-runewidth, uniseg, urfave/cli, # smetrics # Apache-2.0: aws-sdk-go, go-jmespath, lanrat/extsort, go.uber.org/mock # BSD-2-Clause: godirwalk, blackfriday # BSD-3-Clause: cheggaaa/pb, golang.org/x/sync, golang.org/x/sys # MPL-2.0: hashicorp/errwrap, hashicorp/go-multierror # MIT OR PSF-2.0: termie/go-shutil, whose whole LICENSE says it is Python's # licence, or MIT if that does not apply License: MIT AND Apache-2.0 AND BSD-2-Clause AND BSD-3-Clause AND MPL-2.0 AND (MIT OR PSF-2.0) URL: https://github.com/peak/s5cmd Source0: %{url}/archive/v%{version}/%{name}-%{version}.tar.gz # Go is not built for every architecture Fedora has; this covers ours. ExclusiveArch: %{golang_arches} BuildRequires: golang BuildRequires: go-rpm-macros # Linked statically, as Go does; listed so security tooling can find them. Provides: bundled(golang(github.com/aws/aws-sdk-go)) = 1.44.298 Provides: bundled(golang(github.com/VividCortex/ewma)) = 1.2.0 Provides: bundled(golang(github.com/cheggaaa/pb/v3)) = 3.1.4 Provides: bundled(golang(github.com/cpuguy83/go-md2man/v2)) = 2.0.2 Provides: bundled(golang(github.com/fatih/color)) = 1.15.0 Provides: bundled(golang(github.com/hashicorp/errwrap)) = 1.0.0 Provides: bundled(golang(github.com/hashicorp/go-multierror)) = 1.1.1 Provides: bundled(golang(github.com/jmespath/go-jmespath)) = 0.4.0 Provides: bundled(golang(github.com/karrick/godirwalk)) = 1.15.3 Provides: bundled(golang(github.com/kballard/go-shellquote)) Provides: bundled(golang(github.com/lanrat/extsort)) = 1.0.2 Provides: bundled(golang(github.com/mattn/go-colorable)) = 0.1.13 Provides: bundled(golang(github.com/mattn/go-isatty)) = 0.0.19 Provides: bundled(golang(github.com/mattn/go-runewidth)) = 0.0.14 Provides: bundled(golang(github.com/rivo/uniseg)) = 0.2.0 Provides: bundled(golang(github.com/russross/blackfriday/v2)) = 2.1.0 Provides: bundled(golang(github.com/termie/go-shutil)) Provides: bundled(golang(github.com/urfave/cli/v2)) = 2.11.2 Provides: bundled(golang(github.com/xrash/smetrics)) Provides: bundled(golang(go.uber.org/mock)) = 0.4.0 Provides: bundled(golang(golang.org/x/sync)) = 0.7.0 Provides: bundled(golang(golang.org/x/sys)) = 0.20.0 %description s5cmd is a very fast S3 and local filesystem execution tool. It copies, lists, moves and deletes objects in parallel, runs batches of commands from a file, and works with any S3-compatible service. The Imaging Data Commons Python client uses it to download DICOM series from public buckets. %prep %autosetup -p1 # Every vendored module must be the one go.mod/go.sum name (go would refuse # -mod=vendor otherwise); fail here rather than build against a stale tree. test -f vendor/modules.txt %build export GO111MODULE=on GOFLAGS=-mod=vendor GOTOOLCHAIN=local export GO_LDFLAGS="-X %{goipath}/version.Version=v%{version} -X %{goipath}/version.GitCommit=%{sub %{commit} 1 7}" %gobuild -o _build/s5cmd . %install install -Dpm 0755 _build/s5cmd %{buildroot}%{_bindir}/s5cmd %check export GO111MODULE=on GOFLAGS=-mod=vendor GOTOOLCHAIN=local # Unit tests run against an in-process fake S3 (gofakes3) and need no network. # e2e/ builds and drives the binary in many parallel subprocesses; it is left # to the smoke test below, which runs the binary we actually ship. go test $(go list ./... | grep -v -e /e2e -e /benchmark) # The shipped binary reports the release version, not the v0.0.0 fallback. %{buildroot}%{_bindir}/s5cmd version | grep -Fx "v%{version}-%{sub %{commit} 1 7}" # And does real work on the local filesystem (local-to-local cp is refused by # design, so list and size a tree instead; the S3 side is the unit tests'). mkdir -p t/src && printf hello > t/src/a.txt %{buildroot}%{_bindir}/s5cmd ls 't/src/*' | grep -q 'a\.txt$' %{buildroot}%{_bindir}/s5cmd du 't/src/*' | grep -q '^5 bytes in 1 objects' %files %license LICENSE %doc README.md CHANGELOG.md %{_bindir}/s5cmd %changelog * Sun Oct 11 2026 Morgan Hough - 2.3.0-1 - Initial package, for the Imaging Data Commons client (idc-index)