nanovms / ops

ops - build and run nanos unikernels
https://ops.city
MIT License
1.27k stars 132 forks source link

Minor pkg command changes #1544

Closed BunningsWarehouseOfficial closed 10 months ago

BunningsWarehouseOfficial commented 10 months ago

Made a few changes to pkg to address some things I came across while learning to use it recently.

Another change I wanted to make was to make ops pkg from-docker with the --copy flag copy over symlink files (the links themselves, not what they point to) into the package's sysroot. This was because the Python Docker image I was using tried and failed to use the version compatibility link libz.so.1 (among others) despite the linked to file, libz.so.1.2.11, being present in the sysroot, resulting in a crash. I figured it’d be in the spirit of “copying the whole file system” (as --copy is described) for something like a Python package to just work off the bat. I thought the change would be fairly trivial, but was mistaken; couldn't get it to work in a reasonable amount of time. Keen to hear thoughts on this

eyberg commented 10 months ago

thanks!

for the symlink issue - feel free to open up a new issue - as i didn't see anything that was tied to this directly

i feel like local pkgs had that support added but wasn't sure cause it was marked wip - https://github.com/nanovms/ops/issues/591 && https://github.com/nanovms/ops/pull/1476

the from-docker code looks like it's missing symlink support - you can find some examples in fs/manifest.go if you grep for ModeSymlink - for fixing it - ideally we could re-use/consolidate code that might already exist