oVirt/ovirt-imageio

Building ovirt-imageio without build files

liranr23 opened this issue · 6 comments

When building using bazel and installing ovirt-imageio-common RPM to the image it ended up with:
Error processing tar file(exit status 1): link /usr/lib64/python3.9/site-packages/ovirt_imageio/_internal/handlers/pycache/checksum.cpython-39.pyc /usr/lib64/python3.9/site-packages/ovirt_imageio/_internal/handlers/pycache/checksum.cpython-39.opt-1.pyc: no such file or directory

Hopefully, if we remove the build files bazel will succeed to build the image.

nirs commented

What do you mean by "building using bazel"?

We don't have such build. Why are you building ovirt-imageio and not using released
package or pip?

I am trying to build an image using bazel, the running code is with golang and needs ovirt-imageio installed in the image. I install in the image ovirt-image-common RPM. But the build fails with the above error.

pyc files give better performance to run the package, avoiding re-parsing files every time. I'm not sure if it is a good idea to remove them.

Have you tried to install the package using pip?

pyc files give better performance to run the package, avoiding re-parsing files every time. I'm not sure if it is a good idea to remove them.

Fair enough

Have you tried to install the package using pip?

That would probably work but we try to build the images using bazeldnf as @liranr23 pointed out and seems it has an issue with links..

rmohr commented

Are the links "dead links"? That is something I did not consider in bazeldnf. We can probably handle that gracefully on the bazeldnf side if there are really dead links in the tar file. If the links are not dead, then maybe bazeldnf has a bug when reading the tar content.

rmohr commented

Also bazeldnf -- intended by design -- does not execute post-install scripts (in case the pyc files get generated there). That decisions favours reproducible builds and zero-privileges over full dnf/rpm compatibility.