Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

containerd: set version and revision strings #1248

Merged
merged 1 commit into from
Dec 17, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion packages/containerd/containerd.spec
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

%global gover 1.3.7
%global rpmver %{gover}
%global gitrev 8fba4e9a7d01810a393d5d25a3621dc101981175

%global _dwz_low_mem_die_limit 0

Expand Down Expand Up @@ -65,14 +66,21 @@ Requires: %{_cross_os}systemd
%build
%cross_go_configure %{goimport}
export BUILDTAGS="no_btrfs seccomp selinux"
export LD_VERSION="-X github.com/containerd/containerd/version.Version=%{gover}+bottlerocket"
export LD_REVISION="-X github.com/containerd/containerd/version.Revision=%{gitrev}"
for bin in \
containerd \
containerd-shim \
containerd-shim-runc-v1 \
containerd-shim-runc-v2 \
ctr ;
do
go build -buildmode=pie -ldflags=-linkmode=external -tags="${BUILDTAGS}" -o ${bin} %{goimport}/cmd/${bin}
go build \
-buildmode=pie \
-ldflags="-linkmode=external ${LD_VERSION} ${LD_REVISION}" \
-tags="${BUILDTAGS}" \
-o ${bin} \
%{goimport}/cmd/${bin}
done

%install
Expand Down