%bcond check 1 # https://github.com/containers/oci-delta %global goipath github.com/containers/oci-delta %global with_debug 1 %global gobuildtags exclude_graphdriver_aufs exclude_graphdriver_btrfs exclude_graphdriver_zfs %if 0%{?with_debug} %global _find_debuginfo_dwz_opts %{nil} %global _dwz_low_mem_die_limit 0 %else %global debug_package %{nil} %endif Version: 0.3.0 %gometa -L -f Name: oci-delta Release: %autorelease Summary: Create and apply delta files between OCI image archives # Generated by go-vendor-tools License: Apache-2.0 AND BSD-2-Clause AND BSD-3-Clause AND MIT AND MPL-2.0 URL: %{gourl} Source0: %{gosource} # Generated by go-vendor-tools Source1: %{archivename}-vendor.tar.bz2 BuildRequires: go-rpm-macros BuildRequires: pkgconfig(ostree-1) %description Creates and applies delta files between OCI image archives for bootc systems. Delta files are significantly smaller than full OCI archives because they exclude layers already present on the target system and use binary diffs (tar-diff) for changed layers. %prep %goprep -A %setup -q -T -D -a1 %{forgesetupargs} cp vendor/LICENSE-BREAKDOWN.txt modules.txt %build %global gomodulesmode GO111MODULE=on # https://github.com/golang/go/issues/75079 export GOEXPERIMENT="nodwarf5" %gobuild -o %{gobuilddir}/bin/oci-delta -tags "%{gobuildtags}" . %install install -m 0755 -vd %{buildroot}%{_bindir} install -m 0755 -vp %{gobuilddir}/bin/* %{buildroot}%{_bindir} install -D -m 0644 -vp docs/man/oci-delta.1 %{buildroot}%{_mandir}/man1/oci-delta.1 %check %if %{with check} %gotest -tags "%{gobuildtags}" ./... %endif %files %license LICENSE modules.txt %doc README.md %{_bindir}/oci-delta %{_mandir}/man1/oci-delta.1* %changelog %autochangelog