Merge pull request #1159 from thaJeztah/dockerd_manpages

[master] deb,rpm: include dockerd man-page in docker-ce package
This commit is contained in:
Sebastiaan van Stijn 2025-01-27 16:52:05 +01:00 коммит произвёл GitHub
Родитель 6f3090691d 3ded61e6d7
Коммит 90ffcbe8d0
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: B5690EEEBB952194
5 изменённых файлов: 22 добавлений и 10 удалений

Просмотреть файл

@ -40,7 +40,8 @@ Suggests: cgroupfs-mount | cgroup-lite,
Conflicts: docker (<< 1.5~),
docker-engine,
docker.io
Replaces: docker-engine
Replaces: docker-engine,
docker-ce-cli (<< 5:28.0.0)
Description: Docker: the open-source application container engine
Docker is a product for you to build, ship and run any application as a
lightweight container

Просмотреть файл

@ -0,0 +1 @@
engine/man/man*/*

Просмотреть файл

@ -26,6 +26,9 @@ override_dh_auto_build:
cd engine && TMP_GOPATH="/go" hack/dockerfile/install/install.sh tini
cd engine && TMP_GOPATH="/go" hack/dockerfile/install/install.sh rootlesskit dynamic
# build man-pages
make -C engine/man
# Build the CLI
make -C /go/src/github.com/docker/cli DISABLE_WARN_OUTSIDE_CONTAINER=1 VERSION=$(VERSION) GITCOMMIT=$(CLI_GITCOMMIT) LDFLAGS='' dynbinary manpages shell-completion

Просмотреть файл

@ -62,11 +62,14 @@ install -D -p -m 644 cli/build/completion/bash/docker ${RPM_BUILD_ROOT}%{_datadi
install -D -p -m 644 cli/build/completion/zsh/_docker ${RPM_BUILD_ROOT}%{_datadir}/zsh/vendor-completions/_docker
install -D -p -m 644 cli/build/completion/fish/docker.fish ${RPM_BUILD_ROOT}%{_datadir}/fish/vendor_completions.d/docker.fish
# install manpages
# Note: we need to create destination dirs first (instead "install -D") due to wildcards used.
install -d ${RPM_BUILD_ROOT}%{_mandir}/man1 && install -p -m 644 cli/man/man1/*.1 ${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 -d ${RPM_BUILD_ROOT}%{_mandir}/man8 && install -p -m 644 cli/man/man8/*.8 ${RPM_BUILD_ROOT}%{_mandir}/man8
# install man-pages
for sec in $(seq 1 9); do
if [ -d "cli/man/man${sec}" ]; then
# Note: we need to create destination dirs first (instead "install -D") due to wildcards used.
install -d ${RPM_BUILD_ROOT}%{_mandir}/man${sec} && \
install -p -m 644 cli/man/man${sec}/*.${sec} ${RPM_BUILD_ROOT}%{_mandir}/man${sec};
fi
done
mkdir -p build-docs
for cli_file in LICENSE MAINTAINERS NOTICE README.md; do
@ -80,10 +83,7 @@ done
%{_datadir}/bash-completion/completions/docker
%{_datadir}/zsh/vendor-completions/_docker
%{_datadir}/fish/vendor_completions.d/docker.fish
%doc
%{_mandir}/man1/*
%{_mandir}/man5/*
%{_mandir}/man8/*
%{_mandir}/man*/*
%post

Просмотреть файл

@ -72,6 +72,9 @@ TMP_GOPATH="/go" hack/dockerfile/install/install.sh tini
VERSION=%{_origversion} PRODUCT=docker hack/make.sh dynbinary
popd
# build man-pages
make -C ${RPM_BUILD_DIR}/src/engine/man
%check
ver="$(engine/bundles/dynbinary-daemon/dockerd --version)"; \
test "$ver" = "Docker version %{_origversion}, build %{_gitcommit_engine}" && echo "PASS: daemon version OK" || (echo "FAIL: daemon version ($ver) did not match" && exit 1)
@ -85,6 +88,9 @@ install -D -p -m 0755 /usr/local/bin/docker-init ${RPM_BUILD_ROOT}%{_libexecdir}
install -D -p -m 0644 engine/contrib/init/systemd/docker.service ${RPM_BUILD_ROOT}%{_unitdir}/docker.service
install -D -p -m 0644 engine/contrib/init/systemd/docker.socket ${RPM_BUILD_ROOT}%{_unitdir}/docker.socket
# install manpages
make -C ${RPM_BUILD_DIR}/src/engine/man DESTDIR=${RPM_BUILD_ROOT} prefix=%{_mandir} install
# create the config directory
mkdir -p ${RPM_BUILD_ROOT}/etc/docker
@ -94,6 +100,7 @@ mkdir -p ${RPM_BUILD_ROOT}/etc/docker
%{_libexecdir}/docker/docker-init
%{_unitdir}/docker.service
%{_unitdir}/docker.socket
%{_mandir}/man*/*
%dir /etc/docker
%post