I'm installing ONOS and following this guide: https://wiki.onosproject.org/display/ONOS/Developer+Quick+Start
I executed the command
sudo bazel build onos
This will compile and assemble the installable onos.tar.gz, which is located in the bazel-bin directory.
But I get the following error:
tar: apache-karaf-4.2.6/examples/karaf-war-example: Cannot change ownership to uid 1001, gid 1001: Invalid argument
I know some people resolved this in this page, and it has to do with CIFS: https://www.krenger.ch/blog/linux-tar-cannot-change-ownership-to-permission-denied/
They used the parameter --no-same-owner with the command tar
# tar xzf $INPUT_FOLDER/archive.tar.gz --no-same-owner -C /mnt/test-nas/[..]
The problem is, that in my case, tar is used by bazel, I'm not calling tar from the superuser, bazel is using tar and it fails. How can I fix this ?