Skip to content

[27.x backport] pkg/reexec: deprecate and migrate to github.com/moby/sys/reexec#49135

Merged
thaJeztah merged 5 commits intomoby:27.xfrom
thaJeztah:27.x_backport_migrate_reexec
Dec 19, 2024
Merged

[27.x backport] pkg/reexec: deprecate and migrate to github.com/moby/sys/reexec#49135
thaJeztah merged 5 commits intomoby:27.xfrom
thaJeztah:27.x_backport_migrate_reexec

Conversation

@thaJeztah
Copy link
Member

backport:


- Description for the changelog

pkg/reexec: deprecate and migrate to github.com/moby/sys/reexec. This package is deprecated and moved to a separate module. Use github.com/moby/sys/reexec instead.

- A picture of a cute animal (not mandatory but encouraged)

vvoland and others added 5 commits December 19, 2024 12:52
The alias is not needed as the package is already named `units`.
It was also not aliases consistently across the project.

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
(cherry picked from commit c004547)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Also use a slightly different name, because "reexec" is used so
widely as term in this package, making it somewhat confusing.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 7672d60)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
The reexec package originally was platform-agnostic, but gained some
Linux-specific handling in 1cb17f0.

When Windows support was implemented in Docker, the pkg/reexec package
was adjusted accordingly in 64715c4,
which now made the package with with either Linux or Windows, with various
other platforms (freebsd, solaris, darwin) being added back in separate
changes.

Based on the history above, this package should be platform-agnostic, except
for Linux-specific changes introduced in 1cb17f0
and 5aee880.

This patch:

- removes the stub-implementation to make it functional on other platforms.
- renames the files for consistency

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 6568c06)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Move the exported `Command` to a platform-agnostic file, and un-export
the platform-specific implementations. This allows us to maintain the
GoDoc in a single place, describing platform-specific differences where
needed.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 8fd177d)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 4f5ec99)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
@thaJeztah thaJeztah added status/2-code-review impact/changelog impact/deprecation kind/refactor PR's that refactor, or clean-up code area/go-sdk impact/go-sdk Noteworthy (compatibility changes) in the Go SDK labels Dec 19, 2024
@thaJeztah thaJeztah added this to the 27.5.0 milestone Dec 19, 2024
@thaJeztah thaJeztah self-assigned this Dec 19, 2024
@thaJeztah thaJeztah merged commit 29f12c5 into moby:27.x Dec 19, 2024
@thaJeztah thaJeztah deleted the 27.x_backport_migrate_reexec branch December 19, 2024 12:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/go-sdk impact/changelog impact/deprecation impact/go-sdk Noteworthy (compatibility changes) in the Go SDK kind/refactor PR's that refactor, or clean-up code status/2-code-review

Projects

Development

Successfully merging this pull request may close these issues.

2 participants