Dominique Leuenberger 2022-10-16 14:09:24 +00:00 committed by Git OBS Bridge
commit c879a9d792
4 changed files with 20 additions and 9 deletions

View File

@ -2,7 +2,7 @@
<!-- CDI needs larger disk for builds --> <!-- CDI needs larger disk for builds -->
<hardware> <hardware>
<disk> <disk>
<size unit="G">6</size> <size unit="G">10</size>
</disk> </disk>
</hardware> </hardware>
</constraints> </constraints>

View File

@ -0,0 +1 @@
addFilter("statically-linked-binary")

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Sat Oct 15 13:41:00 UTC 2022 - Vasily Ulyanov <vasily.ulyanov@suse.com>
- Build tools/cdi-containerimage-server with CGO_ENABLED=0
------------------------------------------------------------------- -------------------------------------------------------------------
Mon Oct 10 07:07:51 UTC 2022 - Dirk Müller <dmueller@suse.com> Mon Oct 10 07:07:51 UTC 2022 - Dirk Müller <dmueller@suse.com>

View File

@ -26,6 +26,7 @@ URL: https://github.com/kubevirt/containerized-data-importer
Source0: %{name}-%{version}.tar.gz Source0: %{name}-%{version}.tar.gz
Source1: cdi_containers_meta Source1: cdi_containers_meta
Source2: cdi_containers_meta.service Source2: cdi_containers_meta.service
Source100: %{name}-rpmlintrc
BuildRequires: golang-packaging BuildRequires: golang-packaging
BuildRequires: libnbd-devel BuildRequires: libnbd-devel
BuildRequires: pkgconfig BuildRequires: pkgconfig
@ -177,13 +178,13 @@ sed -i"" \
%{S:1} %{S:1}
export GOPATH=%{_builddir}/go export GOPATH=%{_builddir}/go
export GOFLAGS="-buildmode=pie -mod=vendor" export GOFLAGS="-mod=vendor"
env \ export CDI_SOURCE_DATE_EPOCH="$(date -r LICENSE +%s)"
CDI_SOURCE_DATE_EPOCH="$(date -r LICENSE +%s)" \ export CDI_GIT_COMMIT='v%{version}'
CDI_GIT_COMMIT='v%{version}' \ export CDI_GIT_VERSION='v%{version}'
CDI_GIT_VERSION='v%{version}' \ export CDI_GIT_TREE_STATE="clean"
CDI_GIT_TREE_STATE="clean" \
./hack/build/build-go.sh build \ GOFLAGS="-buildmode=pie ${GOFLAGS}" ./hack/build/build-go.sh build \
cmd/cdi-apiserver \ cmd/cdi-apiserver \
cmd/cdi-cloner \ cmd/cdi-cloner \
cmd/cdi-controller \ cmd/cdi-controller \
@ -191,11 +192,15 @@ CDI_GIT_TREE_STATE="clean" \
cmd/cdi-uploadproxy \ cmd/cdi-uploadproxy \
cmd/cdi-uploadserver \ cmd/cdi-uploadserver \
cmd/cdi-operator \ cmd/cdi-operator \
tools/cdi-containerimage-server \
tools/cdi-image-size-detection \ tools/cdi-image-size-detection \
tools/cdi-source-update-poller \ tools/cdi-source-update-poller \
%{nil} %{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}
env DOCKER_PREFIX=$reg_path DOCKER_TAG=%{version}-%{release} ./hack/build/build-manifests.sh env DOCKER_PREFIX=$reg_path DOCKER_TAG=%{version}-%{release} ./hack/build/build-manifests.sh
%install %install