This package was forked from the https://github.com/distribution/distribution
repository in commit 901bcb2231, but that commit
did a plain copy of the code (minus tests), and rewrote the code to be in a
single file. The same commit also removed some deprecated code for handling
"shortid" references (ParseAnyReferenceWithSet() function), in order to avoid
the "digestset" dependency from the distribution repo.
At the time, containerd used the distribution/distribution package from this
commit: 0d3efadf01
Since the code was forked, both containerd and distribution have received
improvements and fixes, so unfortunately, the code started to diverge.
I'm planning to reconcile the packages (potentially by using a shared module),
and this is the first commit to assist with that.
This patch restructures the reference/docker package to split the code into the
same files as are used in the upstream distribution/distribution repository.
This makes it easier to compare the implementations in both repositories (to
allow synchronizing changes).
No changes are applied yet, other than splitting the code (follow-up commits
will take care of syncing changes across).
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Fetching blobs without foreknown descriptors is useful for using a registry as a general-purpose CAS.
Related: `oras blob fetch` (ORAS v0.15.0)
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
This change spins up a new goroutine, locks it to a thread, then
unshares CLONE_FS which allows us to `Chdir` from inside the thread
without affecting the rest of the program.
The thread is no longer usable after unshare so it leaves the thread
locked to prevent go from returning the thread to the thread pool.
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
This change modifies WithLinuxDevice to take an option `followSymlink`
and be unexported as `withLinuxDevice`. An option
`WithLinuxDeviceFollowSymlinks` will call this unexported option to
follow a symlink, which will resolve a symlink before calling
`DeviceFromPath`. `WithLinuxDevice` has been changed to call
`withLinuxDevice` without following symlinks.
Signed-off-by: Gavin Inglis <giinglis@amazon.com>
Signed-off-by: Swagat Bora <sbora@amazon.com>
Add spans around image unpack operations
Use image.ref to denote image name and image.id for the image config digest
Add top-level spand and record errors in the CRI instrumentation service
Cleaning up TODO's. If we're on >= 5.11 we need userxattr so check
the kernel version to skip the manual check via mounting. It feels
odd to use contrib/seccomp here but the alternative is pulling that
kernel parsing code out into the main pkgs. Another is using the moby
parser but that's in moby/moby which is also a dep we don't want here..
Signed-off-by: Danny Canter <danny@dcantah.dev>
Following how some of the other stores/services are returned in the
client package, it makes sense to me to move the remoteFooBars in
the sandbox API to a proxy sub-package under /sandbox. Given this
has only been in a 1.7 beta, I hope this is fine to move around still.
Signed-off-by: Danny Canter <danny@dcantah.dev>
This change adds two new environment variables to cri-integration tests
on Windows that enable Hyper-V isolation.
Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>