Skip to content

Ship systemd unit files in the Linux static tarballs - #578

Open
piyush15102003 wants to merge 1 commit into
Mirantis:masterfrom
piyush15102003:fix/ship-systemd-units-in-static-tarballs
Open

piyush15102003 wants to merge 1 commit into
Mirantis:masterfrom
piyush15102003:fix/ship-systemd-units-in-static-tarballs

Conversation

@piyush15102003

Copy link
Copy Markdown

Ship the systemd unit files inside the Linux static tarballs

Closes #249.

What

packaging/static/Makefile now copies packaging/systemd/cri-docker.service and
cri-docker.socket into the archive directory before tar runs, for both the static-linux
(amd64) and cross-arm (arm64) targets. The Mac and Windows archives are unchanged since the
units are Linux-only.

The manual install page is updated to say the unit files are in the archive, keeping the
wget from packaging/systemd as the fallback for older releases.

Why

The release .tgz only contained the binary, while the manual-install instructions read as if
the unit files were in it. Anyone installing on an unsupported platform had to go find them in
the source tree separately, which is what #249 reports. The deb/rpm packages already install
these two files; the tarballs were the only distribution that left them out.

How I tested

Ran the real Makefile targets in an Alpine container with make, bash and a stub go on
PATH (so the recipe runs end to end without a 10-minute vendored Go build):

make -C packaging/static static-linux VERSION=0.0.0-test
tar -tzvf packaging/static/build/linux/cri-dockerd-0.0.0-test.amd64.tgz
make -C packaging/static cross-arm VERSION=0.0.0-test
tar -tzf packaging/static/build/arm/cri-dockerd-0.0.0-test.arm64.tgz

Both archives list cri-dockerd/cri-dockerd, cri-dockerd/cri-docker.service and
cri-dockerd/cri-docker.socket; cmp confirms the units are byte-identical to
packaging/systemd/, and they land as 0644 regardless of the checkout's file modes
(install -m 0644, not cp). The Go build step itself is untouched.

The release .tgz archives only contained the binary, while the manual
install docs implied cri-docker.service and cri-docker.socket were in
them. Copy both units from packaging/systemd into the archive directory
for the static-linux and cross-arm targets, and update the manual
install page accordingly.

Fixes Mirantis#249

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Package the systemd service and socket files with tarballs

1 participant