ReproNim / reproman

ReproMan (AKA NICEMAN, AKA ReproNim TRD3)
https://reproman.readthedocs.io
Other
24 stars 14 forks source link

tracer: for bin -> usr/bin symlink on debian systems we might to track both paths #591

Open yarikoptic opened 1 year ago

yarikoptic commented 1 year ago

somewhat more info on https://github.com/VIDA-NYU/reprozip/issues/390 but the overall issue is:

❯ ls -ld /bin
lrwxrwxrwx 1 root root 7 Nov  5  2019 /bin -> usr/bin/

❯ dpkg -S /{,usr/}bin/ls
coreutils: /bin/ls
dpkg-query: no path found matching pattern /usr/bin/ls

❯ dpkg -S /{,usr/}bin/whoami
dpkg-query: no path found matching pattern /bin/whoami
coreutils: /usr/bin/whoami

so for some binaries package would know about /usr/bin path and for other, /bin paths. In both cases users might run one or another and reprozip might dereference symlink (https://github.com/VIDA-NYU/reprozip/issues/390) so we could end up with /usr/bin paths. I think we can "hard code" logic that iff issymlink('/bin'): trace both paths .