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

[master] deb,rpm: include dockerd man-page in docker-ce package #1159

Merged
merged 2 commits into from
Jan 27, 2025
Merged
Show file tree
Hide file tree
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
3 changes: 2 additions & 1 deletion deb/common/control
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions deb/common/docker-ce.manpages
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
engine/man/man*/*
3 changes: 3 additions & 0 deletions deb/common/rules
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
18 changes: 9 additions & 9 deletions rpm/SPECS/docker-ce-cli.spec
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
7 changes: 7 additions & 0 deletions rpm/SPECS/docker-ce.spec
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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

Expand All @@ -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
Expand Down
Loading