## START: Set by rpmautospec ## (rpmautospec version 0.7.3) ## RPMAUTOSPEC: autorelease, autochangelog %define autorelease(e:s:pb:n) %{?-p:0.}%{lua: release_number = 1; base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}")); print(release_number + base_release_number - 1); }%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}} ## END: Set by rpmautospec # Generated by go2rpm 1.15.0.post0 %bcond check 1 # https://github.com/moby/buildkit %global goipath github.com/moby/buildkit Version: 0.20.0~rc3 %global tag v%{gsub %{version} ~ -} %gometa -L -f %global common_description %{expand: Concurrent, cache-efficient, and Dockerfile-agnostic builder toolkit.} Name: docker-buildkit Release: %autorelease Summary: Concurrent, cache-efficient, and Dockerfile-agnostic builder toolkit # Generated by go-vendor-tools License: Apache-2.0 AND BSD-2-Clause AND BSD-3-Clause AND CC-BY-4.0 AND CC-BY-SA-4.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 BuildRequires: git # Upstream binary package includes the package equivalents below Requires: containerd Requires: runc Requires: containernetworking-plugins Recommends: qemu-user-static Provides: golang-github-moby-buildkit = %{version}-%{release} Obsoletes: golang-github-moby-buildkit < 0.12.0-1 %description %{common_description} %prep %goprep -A %setup -q -T -D -a1 %{forgesetupargs} # no patch file at this time # %%autopatch -p1 %generate_buildrequires %go_vendor_license_buildrequires -c %{S:2} %build # see upstream Dockerfile for any changes to buildtags or ldflags %global buildtags seccomp %global specldflags -X %{goipath}/version.Version=%{version} -X %{goipath}/version.Revision=%{release} -X %{goipath}/version.Package=%{goipath} export GO_BUILDTAGS="%{buildtags}" export GO_LDFLAGS="%{specldflags}" # set currentgoldflags to nil; blocks default -X version string # %%global currentgoldflags %%{specldflags} for cmd in cmd/* ; do %gobuild -o %{gobuilddir}/bin/$(basename $cmd) %{goipath}/$cmd done %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} # skip specific tests that fail with 'operation not permitted'. for test in \ "TestGetRemotes" \ "TestExtractOnMutable" \ "TestMergeOp" \ "TestDiffOp" \ "TestCLIIntegration" \ "TestSnapshotExtract" \ "TestJobsIntegration" \ "TestGhaCacheIntegration" \ ; do awk -i inplace '/^func.*'"$test"'\(/ { print; print "\tt.Skip(\"disabled failing test\")"; next}1' $(grep -rl $test) done # tags and ldflags defined to mimic build settings # currentgoldflags is reset under check and ignores being set check # use LDFLAGS export LDFLAGS="%{specldflags}" %define gotestflags %{gocompilerflags} -tags "%{buildtags}" # exclude directories where tests fail with 'operation not permitted' errors %gocheck -d cache/contenthash -t source -d client -d frontend -t frontend/dockerfile -d snapshot -t util/overlay %endif %files -f %{go_vendor_license_filelist} %license vendor/modules.txt %doc docs examples AUTHORS README.md %{_bindir}/buildctl %{_bindir}/buildkitd %changelog ## START: Generated by rpmautospec * Wed Feb 19 2025 Bradley G Smith - 0.20.0~rc3-1 - Uncommitted changes * Mon Feb 03 2025 Bradley G Smith - 0.19.0-1 - Initialize repository with release v0.19.0 - Resolves rhbz#2342034 - Replaces golang-github-moby-buildkit package ## END: Generated by rpmautospec