@ -1,13 +1,18 @@
%global debug_package %{nil}
%global _version 27.0.3
%global _release 1
%global _origversion %{_version}
Name: docker-ce-cli
Version: %{_version}
Release: %{_release}%{?dist}
Release: %{_release}%{?dist}.inferit
Epoch: 1
Summary: The open-source application container engine
Group: Tools/Docker
License: ASL 2.0
Source0: cli.tgz
Source1: man.tgz
URL: https://www.docker.com
Vendor: Docker
Packager: Docker <support@docker.com>
@ -29,8 +34,10 @@ Recommends: docker-compose-plugin
%endif
BuildRequires: make
BuildRequires: golang
BuildRequires: libtool-ltdl-devel
BuildRequires: git
BuildRequires: kernel-rpm-macros
# conflicting packages
Conflicts: docker
@ -50,16 +57,17 @@ for deploying and scaling web apps, databases, and backend services without
depending on a particular stack or provider.
%prep
%setup -q -c -n src -a 0
%setup -q -c -n src -a 1
%build
mkdir -p /go/src/github.com/docker
rm -f /go/src/github.com/docker/cli
ln -snf ${RPM_BUILD_DIR}/src/cli /go/src/github.com/docker/cli
pushd /go/src/github.com/docker/cli
VERSION=%{_origversion} GITCOMMIT=%{_gitcommit_cli} GO_LINKMODE=dynamic ./scripts/build/binary && DISABLE_WARN_OUTSIDE_CONTAINER=1 make manpages # cli
mkdir -p ${RPM_BUILD_DIR} /go/src/github.com/docker
rm -f ${RPM_BUILD_DIR} /go/src/github.com/docker/cli
ln -s ${RPM_BUILD_DIR}/src/cli ${RPM_BUILD_DIR} /go/src/github.com/docker/cli
pushd ${RPM_BUILD_DIR} /go/src/github.com/docker/cli
GOPATH="${RPM_BUILD_DIR}/go" VERSION=%{_origversion} GITCOMMIT=%{_gitcommit_cli} GO_LINKMODE=dynamic ./scripts/build/binary
popd
%check
ver="$(cli/build/docker --version)"; \
test "$ver" = "Docker version %{_origversion}, build %{_gitcommit_cli}" && echo "PASS: cli version OK" || (echo "FAIL: cli version ($ver) did not match" && exit 1)
@ -79,11 +87,11 @@ install -p -m 644 cli/contrib/completion/fish/docker.fish ${RPM_BUILD_ROOT}%{_da
# install manpages
install -d ${RPM_BUILD_ROOT}%{_mandir}/man1
install -p -m 644 cli/ man/man1/*.1 ${RPM_BUILD_ROOT}%{_mandir}/man1
install -p -m 644 man/man1/*.1.gz ${RPM_BUILD_ROOT}%{_mandir}/man1
install -d ${RPM_BUILD_ROOT}%{_mandir}/man5
install -p -m 644 cli/ man/man5/*.5 ${RPM_BUILD_ROOT}%{_mandir}/man5
install -p -m 644 man/man5/*.5.gz ${RPM_BUILD_ROOT}%{_mandir}/man5
install -d ${RPM_BUILD_ROOT}%{_mandir}/man8
install -p -m 644 cli/ man/man8/*.8 ${RPM_BUILD_ROOT}%{_mandir}/man8
install -p -m 644 man/man8/*.8.gz ${RPM_BUILD_ROOT}%{_mandir}/man8
mkdir -p build-docs
for cli_file in LICENSE MAINTAINERS NOTICE README.md; do
@ -109,3 +117,7 @@ if ! getent group docker > /dev/null; then
fi
%changelog
* Tue Jul 23 2024 Sergey Cherevko <s.cherevko@msvsphere-os.ru> - 1:27.0.3-1.inferit
- Adapted for MSVphere 9 build
- Rebuilt for MSVSphere 9.4