-
Notifications
You must be signed in to change notification settings - Fork 563
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
fd65237
commit 17aea59
Showing
1 changed file
with
28 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,7 +18,7 @@ | |
Summary: Container native virtualization | ||
Name: containerized-data-importer | ||
Version: 1.57.0 | ||
Release: 4%{?dist} | ||
Release: 5%{?dist} | ||
License: ASL 2.0 | ||
Vendor: Microsoft Corporation | ||
Distribution: Azure Linux | ||
|
@@ -115,26 +115,30 @@ tar --strip-components=1 -xf %{SOURCE0} | |
%build | ||
|
||
export GOPATH=%{_builddir}/go | ||
export GOFLAGS+="-buildmode=pie -mod=vendor" | ||
env \ | ||
CDI_SOURCE_DATE_EPOCH="$(date -r LICENSE +%s)" \ | ||
CDI_GIT_COMMIT='v%{version}' \ | ||
CDI_GIT_VERSION='v%{version}' \ | ||
CDI_GIT_TREE_STATE="clean" \ | ||
./hack/build/build-go.sh build \ | ||
cmd/cdi-apiserver \ | ||
cmd/cdi-cloner \ | ||
cmd/cdi-controller \ | ||
cmd/cdi-importer \ | ||
cmd/cdi-uploadproxy \ | ||
cmd/cdi-uploadserver \ | ||
cmd/cdi-operator \ | ||
tools/cdi-containerimage-server \ | ||
tools/cdi-image-size-detection \ | ||
tools/cdi-source-update-poller \ | ||
tools/csv-generator \ | ||
%{nil} | ||
|
||
export GOFLAGS="-mod=vendor" | ||
export CDI_SOURCE_DATE_EPOCH="$(date -r LICENSE +%s)" | ||
export CDI_GIT_COMMIT='v%{version}' | ||
export CDI_GIT_VERSION='v%{version}' | ||
export CDI_GIT_TREE_STATE="clean" | ||
|
||
GOFLAGS="-buildmode=pie ${GOFLAGS}" ./hack/build/build-go.sh build \ | ||
cmd/cdi-apiserver \ | ||
cmd/cdi-cloner \ | ||
cmd/cdi-controller \ | ||
cmd/cdi-importer \ | ||
cmd/cdi-uploadproxy \ | ||
cmd/cdi-uploadserver \ | ||
cmd/cdi-operator \ | ||
tools/cdi-image-size-detection \ | ||
tools/cdi-source-update-poller \ | ||
tools/csv-generator \ | ||
%{nil} | ||
|
||
# Disable cgo to build static binaries, so they can run on scratch images | ||
CGO_ENABLED=0 ./hack/build/build-go.sh build \ | ||
tools/cdi-containerimage-server \ | ||
%{nil} | ||
|
||
./hack/build/build-manifests.sh | ||
|
||
%install | ||
|
@@ -217,6 +221,9 @@ install -m 0644 _out/manifests/release/cdi-cr.yaml %{buildroot}%{_datadir}/cdi/m | |
%{_datadir}/cdi/manifests | ||
|
||
%changelog | ||
* Fri Sep 06 2024 Aditya Dubey <[email protected]> - 1.57.0-5 | ||
- Statically building binaries | ||
|
||
* Fri Jul 19 2024 Aditya Dubey <[email protected]> - 1.57.0-4 | ||
- Building cdi tool binaries within package build | ||
|
||
|