From c007c183564d22cfa0b20899a768bdbaeb091569 Mon Sep 17 00:00:00 2001 From: eabdullin Date: Wed, 1 Jun 2022 16:15:20 +0300 Subject: [PATCH] Fix errors with %setup --- SPECS/containerd.spec | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/SPECS/containerd.spec b/SPECS/containerd.spec index fdbce51..05cfa2e 100644 --- a/SPECS/containerd.spec +++ b/SPECS/containerd.spec @@ -1,5 +1,6 @@ %bcond_without ctr %bcond_with debug +%define tarball_name containerd %if %{with debug} %global _dwz_low_mem_die_limit 0 @@ -12,7 +13,7 @@ %global runc_nokmem %{getenv:RUNC_NOKMEM} Name: containerd.io -Provides: containerd +Provides: %{tarball_name} # Conflicting packages @@ -66,10 +67,10 @@ low-level storage and network attachments, etc. %prep -%setup -q +%setup -q -n %{tarball_name}-%{version} # symlink the go source path to our build directory mkdir -p ${RPM_BUILD_DIR}/go/src/github.com/containerd/ -ln -s %{_topdir}/BUILD/containerd-1.6.4 ${RPM_BUILD_DIR}/go/src/%{import_path} +ln -s %{_topdir}/BUILD/%{tarball_name}-%{version} ${RPM_BUILD_DIR}/go/src/%{import_path} %build GO111MODULE=auto make man @@ -88,7 +89,7 @@ bin/containerd --version bin/ctr --version %install -cd %{_topdir}/BUILD/containerd-1.6.4 +cd %{_topdir}/BUILD/%{tarball_name}-%{version} mkdir -p %{buildroot}%{_bindir} install -D -m 0755 bin/* %{buildroot}%{_bindir} install -D -m 0644 containerd.service %{buildroot}%{_unitdir}/containerd.service