paketo-buildpacks/packit

Error evaluating symlinks during tgz extraction

thitch97 opened this issue · 0 comments

What happened?

  • What were you attempting to do?
    Extract a dependency artifact (.tgz) using vacation.

  • What did you expect to happen?
    Files are extracted successfully

  • What was the actual behavior? Please provide log output, if possible.
    Extraction failed with the following error:

failed to evaluate symlink /layers/paketo-buildpacks_cpython/cpython/bin/python: lstat /layers/paketo-buildpacks_cpython/cpython/bin/python3: no such file or directory

For additional context:
This operation was attempted with two separate versions of the cpython dependency (v3.6.14 & v3.6.15)

The vacation code responsible for sorting and evaluating symlinks was modified to display the sorted list of symlink headers, producing the following output:

cpython v3.6.14 Symlink headers sorted:

[builder] ./bin/2to3 ### 2to3-3.6 ### /layers/paketo-buildpacks_cpython/cpython/bin/2to3
[builder] ./bin/idle3 ### idle3.6 ### /layers/paketo-buildpacks_cpython/cpython/bin/idle3
[builder] ./bin/pydoc3 ### pydoc3.6 ### /layers/paketo-buildpacks_cpython/cpython/bin/pydoc3

Symlink A >>>[builder] ./bin/python3 ### python3.6 ### /layers/paketo-buildpacks_cpython/cpython/bin/python3
Symlink B >>>[builder] ./bin/python ### ./python3 ### /layers/paketo-buildpacks_cpython/cpython/bin/python


[builder] ./bin/python3.6-config ### python3.6m-config ### /layers/paketo-buildpacks_cpython/cpython/bin/python3.6-config
[builder] ./bin/python3-config ### python3.6-config ### /layers/paketo-buildpacks_cpython/cpython/bin/python3-config
[builder] ./bin/pyvenv ### pyvenv-3.6 ### /layers/paketo-buildpacks_cpython/cpython/bin/pyvenv
[builder] ./lib/libpython3.6m.so ### libpython3.6m.so.1.0 ### /layers/paketo-buildpacks_cpython/cpython/lib/libpython3.6m.so
[builder] ./lib/pkgconfig/python3.pc ### python-3.6.pc ### /layers/paketo-buildpacks_cpython/cpython/lib/pkgconfig/python3.pc
[builder] ./lib/pkgconfig/python-3.6m.pc ### python-3.6.pc ### /layers/paketo-buildpacks_cpython/cpython/lib/pkgconfig/python-3.6m.pc
[builder] ./share/man/man1/python3.1 ### python3.6.1 ### /layers/paketo-buildpacks_cpython/cpython/share/man/man1/python3.1
[builder] ./usr/lib/x86_64-linux-gnu/libXss.so.1 ### libXss.so.1.0.0 ### /layers/paketo-buildpacks_cpython/cpython/usr/lib/x86_64-linux-gnu/libXss.so.1
[builder] ./usr/lib/x86_64-linux-gnu/libtcl8.6.so.0 ### libtcl8.6.so ### /layers/paketo-buildpacks_cpython/cpython/usr/lib/x86_64-linux-gnu/libtcl8.6.so.0
[builder] ./usr/lib/x86_64-linux-gnu/libtk8.6.so.0 ### libtk8.6.so ### /layers/paketo-buildpacks_cpython/cpython/usr/lib/x86_64-linux-gnu/libtk8.6.so.0

cpython v3.6.15 Symlink headers sorted:

[builder] ./bin/2to3 ### 2to3-3.6 ### /layers/paketo-buildpacks_cpython/cpython/bin/2to3
[builder] ./bin/idle3 ### idle3.6 ### /layers/paketo-buildpacks_cpython/cpython/bin/idle3
[builder] ./bin/pydoc3 ### pydoc3.6 ### /layers/paketo-buildpacks_cpython/cpython/bin/pydoc3

Symlink B >>> [builder] ./bin/python ### ./python3 ### /layers/paketo-buildpacks_cpython/cpython/bin/python

[builder] ./bin/python3.6-config ### python3.6m-config ### /layers/paketo-buildpacks_cpython/cpython/bin/python3.6-config
[builder] ./bin/python3-config ### python3.6-config ### /layers/paketo-buildpacks_cpython/cpython/bin/python3-config

Symlink A >>> [builder] ./bin/python3 ### python3.6 ### /layers/paketo-buildpacks_cpython/cpython/bin/python3

[builder] ./bin/pyvenv ### pyvenv-3.6 ### /layers/paketo-buildpacks_cpython/cpython/bin/pyvenv
[builder] ./lib/libpython3.6m.so ### libpython3.6m.so.1.0 ### /layers/paketo-buildpacks_cpython/cpython/lib/libpython3.6m.so
[builder] ./lib/pkgconfig/python3.pc ### python-3.6.pc ### /layers/paketo-buildpacks_cpython/cpython/lib/pkgconfig/python3.pc
[builder] ./lib/pkgconfig/python-3.6m.pc ### python-3.6.pc ### /layers/paketo-buildpacks_cpython/cpython/lib/pkgconfig/python-3.6m.pc
[builder] ./share/man/man1/python3.1 ### python3.6.1 ### /layers/paketo-buildpacks_cpython/cpython/share/man/man1/python3.1
[builder] ./usr/lib/x86_64-linux-gnu/libXss.so.1 ### libXss.so.1.0.0 ### /layers/paketo-buildpacks_cpython/cpython/usr/lib/x86_64-linux-gnu/libXss.so.1
[builder] ./usr/lib/x86_64-linux-gnu/libtcl8.6.so.0 ### libtcl8.6.so ### /layers/paketo-buildpacks_cpython/cpython/usr/lib/x86_64-linux-gnu/libtcl8.6.so.0
[builder] ./usr/lib/x86_64-linux-gnu/libtk8.6.so.0 ### libtk8.6.so ### /layers/paketo-buildpacks_cpython/cpython/usr/lib/x86_64-linux-gnu/libtk8.6.so.0

Note that in the case of v3.6.15, symlinks A and B appear out of order in the sorted list of symlink headers. Since Symlink B depends on the existence of Symlink A, the evaluation of Symlink B fails. It is peculiar that this error appears only in the case of v3.6.15, since the names of the files in the relevant directories (/bin) seem identical across the two versions.

3.6.14 bin directory

lrwxr-xr-x   1 pivotal  staff      8 Jun 28 15:57 2to3 -> 2to3-3.6
-rwxr-xr-x   1 pivotal  staff    114 Jun 28 15:57 2to3-3.6
-rwxr-xr-x   1 pivotal  staff    255 Jun 28 15:57 easy_install-3.6
lrwxr-xr-x   1 pivotal  staff      7 Jun 28 15:57 idle3 -> idle3.6
-rwxr-xr-x   1 pivotal  staff    112 Jun 28 15:57 idle3.6
-rwxr-xr-x   1 pivotal  staff    237 Jun 28 15:58 pip3
-rwxr-xr-x   1 pivotal  staff    237 Jun 28 15:58 pip3.6
lrwxr-xr-x   1 pivotal  staff      8 Jun 28 15:57 pydoc3 -> pydoc3.6
-rwxr-xr-x   1 pivotal  staff     97 Jun 28 15:57 pydoc3.6
lrwxr-xr-x   1 pivotal  staff      9 Jun 28 15:58 python -> ./python3
lrwxr-xr-x   1 pivotal  staff      9 Jun 28 15:57 python3 -> python3.6
lrwxr-xr-x   1 pivotal  staff     16 Jun 28 15:57 python3-config -> python3.6-config
-rwxr-xr-x   1 pivotal  staff  33144 Jun 28 15:57 python3.6
lrwxr-xr-x   1 pivotal  staff     17 Jun 28 15:57 python3.6-config -> python3.6m-config
-rwxr-xr-x   1 pivotal  staff  33144 Jun 28 15:57 python3.6m
-rwxr-xr-x   1 pivotal  staff   3102 Jun 28 15:57 python3.6m-config
lrwxr-xr-x   1 pivotal  staff     10 Jun 28 15:57 pyvenv -> pyvenv-3.6
-rwxr-xr-x   1 pivotal  staff    454 Jun 28 15:57 pyvenv-3.6

3.6.15 bin directory

lrwxr-xr-x   1 pivotal  staff      8 Sep  4 19:07 2to3 -> 2to3-3.6
-rwxr-xr-x   1 pivotal  staff    115 Sep  4 19:07 2to3-3.6
-rwxr-xr-x   1 pivotal  staff    256 Sep  4 19:07 easy_install-3.6
lrwxr-xr-x   1 pivotal  staff      7 Sep  4 19:07 idle3 -> idle3.6
-rwxr-xr-x   1 pivotal  staff    113 Sep  4 19:07 idle3.6
-rwxr-xr-x   1 pivotal  staff    238 Sep  4 19:07 pip3
-rwxr-xr-x   1 pivotal  staff    238 Sep  4 19:07 pip3.6
lrwxr-xr-x   1 pivotal  staff      8 Sep  4 19:07 pydoc3 -> pydoc3.6
-rwxr-xr-x   1 pivotal  staff     98 Sep  4 19:07 pydoc3.6
lrwxr-xr-x   1 pivotal  staff      9 Sep  4 19:07 python -> ./python3
lrwxr-xr-x   1 pivotal  staff      9 Sep  4 19:07 python3 -> python3.6
lrwxr-xr-x   1 pivotal  staff     16 Sep  4 19:07 python3-config -> python3.6-config
-rwxr-xr-x   1 pivotal  staff  33144 Sep  4 19:07 python3.6
lrwxr-xr-x   1 pivotal  staff     17 Sep  4 19:07 python3.6-config -> python3.6m-config
-rwxr-xr-x   1 pivotal  staff  33144 Sep  4 19:07 python3.6m
-rwxr-xr-x   1 pivotal  staff   3103 Sep  4 19:07 python3.6m-config
lrwxr-xr-x   1 pivotal  staff     10 Sep  4 19:07 pyvenv -> pyvenv-3.6
-rwxr-xr-x   1 pivotal  staff    455 Sep  4 19:07 pyvenv-3.6

Build Configuration

  • What buildpacks are you using? Please include versions.
    Cpython buildpack

  • Can you provide a sample app or relevant configuration (buildpack.yml,
    nginx.conf, etc.)?
    cpython dependency (v3.6.14 & v3.6.15)

Checklist

  • I have included log output.
  • The log output includes an error message.
  • I have included steps for reproduction.