We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Create a directory with a symlink contained in it:
% mkdir ora-test % cd ora-test % mkdir src % touch src/FILE1.md % ln -s FILE1.md src/FILE2.md % ls -las src total 0 0 drwxr-xr-x 4 graham wheel 128 10 Jan 17:50 . 0 drwxr-xr-x 3 graham wheel 96 10 Jan 17:50 .. 0 -rw-r--r-- 1 graham wheel 0 10 Jan 17:50 FILE1.md 0 lrwxr-xr-x 1 graham wheel 8 10 Jan 17:50 FILE2.md -> FILE1.md
Push this to an image registry.
% (cd src; oras push localhost:5001/oras-test:latest .) Uploading cd6f0d9b1610 . Uploaded cd6f0d9b1610 . Pushed localhost:5001/oras-test:latest Digest: sha256:db78ceca3debd8a61bdcbfb3d8b979f5cacbe199ef21a9b6043777fb123053bd
Create a directory unpack it and pull back image.
% mkdir dst % (cd dst; oras pull localhost:5001/oras-test:latest) Downloading cd6f0d9b1610 . Downloaded cd6f0d9b1610 . Pulled localhost:5001/oras-test:latest Digest: sha256:e31c3c6b2f3c52da5a1bc46e71400cd0d645139cd602fa00b3ae450bb1264fd4 % ls -las dst total 0 0 drwxr-xr-x 4 graham wheel 128 10 Jan 17:52 . 0 drwxr-xr-x 4 graham wheel 128 10 Jan 17:51 .. 0 -rw-r--r-- 1 graham wheel 0 10 Jan 17:50 FILE1.md 0 lrwxr-xr-x 1 graham wheel 8 10 Jan 17:52 FILE2.md -> FILE1.md
This handles the symlink in the image fine when unpacking it.
Pull image again, but this time supply output directory with is a relative path.
% rm -rf dst % oras pull localhost:5001/oras-test:latest -o dst Downloading cd6f0d9b1610 . Downloaded cd6f0d9b1610 . Pulled localhost:5001/oras-test:latest Digest: sha256:e31c3c6b2f3c52da5a1bc46e71400cd0d645139cd602fa00b3ae450bb1264fd4 % ls -las dst total 0 0 drwxr-xr-x 4 graham wheel 128 10 Jan 17:53 . 0 drwxr-xr-x 4 graham wheel 128 10 Jan 17:53 .. 0 -rw-r--r-- 1 graham wheel 0 10 Jan 17:50 FILE1.md 0 lrwxr-xr-x 1 graham wheel 8 10 Jan 17:53 FILE2.md -> FILE1.md
This also works fine.
Now pull image one more time, but this time use an absolute directory.
% rm -rf dst % oras pull localhost:5001/oras-test:latest -o `pwd`/dst Downloading cd6f0d9b1610 . Error: failed to extract tar to /tmp/ora-test/dst: Rel: can't make /tmp/ora-test/dst/FILE1.md relative to .
This fails.
Would expect unpacking of the image with symlink would still work even though absolute path was supplied for output directory.
See steps above.
% oras version Version: 0.16.0+Homebrew Go version: go1.19.3
Darwin xxx 22.2.0 Darwin Kernel Version 22.2.0: Fri Nov 11 02:08:47 PST 2022; root:xnu-8792.61.2~4/RELEASE_X86_64 x86_64
The text was updated successfully, but these errors were encountered:
@Wwwsylvia Could you take a look? It seems a bug in the oras-go.
oras-go
Sorry, something went wrong.
The error is thrown at here in oras-go. I've opened an issue in the oras-go repo to track: oras-project/oras-go#402
@GrahamDumpleton Thank you for reporting this bug. It has been fixed by the new release v1.0.0-rc.1 and the fix has been verified.
Please try it out.
Wwwsylvia
No branches or pull requests
What happened in your environment?
Create a directory with a symlink contained in it:
Push this to an image registry.
Create a directory unpack it and pull back image.
This handles the symlink in the image fine when unpacking it.
Pull image again, but this time supply output directory with is a relative path.
This also works fine.
Now pull image one more time, but this time use an absolute directory.
This fails.
What did you expect to happen?
Would expect unpacking of the image with symlink would still work even though absolute path was supplied for output directory.
How can we reproduce it?
See steps above.
What is the version of your ORAS CLI?
What is your OS environment?
Darwin xxx 22.2.0 Darwin Kernel Version 22.2.0: Fri Nov 11 02:08:47 PST 2022; root:xnu-8792.61.2~4/RELEASE_X86_64 x86_64
Are you willing to submit PRs to fix it?
The text was updated successfully, but these errors were encountered: