Move `pkg/archive` out of main module/repository
Description
Summary
Move pkg/archive out of the main module into its own repository
Currently relevant dependencies
github.com/docker/docker/pkg/archive
├ github.com/docker/docker/pkg/idtools
├ github.com/docker/docker/pkg/ioutils
├ github.com/docker/docker/pkg/pools
├ github.com/docker/docker/pkg/system
├ github.com/moby/patternmatcher
├ github.com/moby/sys/sequential
└ github.com/moby/sys/userns
github.com/docker/docker/pkg/idtools
└ github.com/moby/sys/user
github.com/docker/docker/pkg/ioutils (nothing relevant)
github.com/docker/docker/pkg/pools
└ github.com/docker/docker/pkg/ioutils
github.com/docker/docker/pkg/system (nothing relevant)
Proposal and steps
- [x] Copy relevant
pkg/systemfunctionality #49072 - [ ] Remove parts of
pkg/systemonly used for archive,pkg/systemis not suitable for standalone library since most of the functionality is considered temporary until officially supported.pkg/systemshould become internal. - [x] Copy relevant
pkg/ioutils, only used for one simple thing #49073 - [ ] Copy relevant parts of
pkg/poolto archive or move pool - [ ] Move
pkg/idtoolsundergithub.com/moby/sys#49087 - [x] Remove uses of
pkg/errorshttps://github.com/moby/moby/pull/49101 - [ ] Move
pkg/archiveto a new repository undergithub/moby
Related / prior ticket;
- https://github.com/moby/moby/issues/21700
- related (epic); https://github.com/moby/moby/issues/32989
I think you could close those older issues.
Do the steps I outline sound reasonable to you? I'll open them one at a time to make sure it make sense along the way and I can turn this issue into check boxes.
Also opened a PR to remove use of pkg/errors; most errors were already using stdlib, and only 2 or 3 locations used pkg/errors; https://github.com/moby/moby/pull/49101
All the prerequisites for the move are complete. The current plan is to create the new repo as https://github.com/moby/archive. We could also consider a name better than "archive" or possibly making it a sub-repo of an image specific repo similar to moby/sys. It does not belong in moby/sys though. Let me know if anyone has any thoughts or opinions, I'm going to prepare the new repo.