Tar cannot change ownership


#1

I use Google’s depot_tools to build the Dart SDK into an RPM. It works locally, but on CircleCI I get this:

...
________ running '/usr/bin/python sdk/build/linux/sysroot_scripts/install-sysroot.py --arch i386' in '/tmp/build/BUILD/dart-2.1.1'
Installing Debian Jessie i386 root image: /tmp/build/BUILD/dart-2.1.1/sdk/build/linux/debian_jessie_i386-sysroot
Downloading https://commondatastorage.googleapis.com/chrome-linux-sysroot/toolchain/7031a828c5dcedc937bbf375c42daab08ca6162f/debian_jessie_i386_sysroot.tgz
tar: ./var/lib/misc/Makefile: Cannot change ownership to uid 376730, gid 5000: Invalid argument
tar: ./var/lib/misc: Cannot change ownership to uid 376730, gid 5000: Invalid argument
tar: ./var/lib: Cannot change ownership to uid 376730, gid 5000: Invalid argument
tar: ./var/log/speech-dispatcher: Cannot change ownership to uid 376730, gid 5000: Invalid argument
tar: ./var/log: Cannot change ownership to uid 376730, gid 5000: Invalid argument
tar: ./var: Cannot change ownership to uid 376730, gid 5000: Invalid argument
tar: ./etc/default/libnss-db: Cannot change ownership to uid 376730, gid 5000: Invalid argument
...

Quite similar to this (ignored) question by @nbuonin1 :

Anything I’m missing? I don’t control the tar file, nor the unpacking command. The uid 376730 also looks strange to me (out of 16-bit range). Do I file an issue against depot_tools?


#2

I think that since --no-same-owner works, we may need to kick this to depot_tools

The issue is, I suspect, that each container gets a different UUID for root (for security), and the tool can’t handle that, as it tries to give it back to the id that owned it when it was saved.

Interested in other’s thoughts (posts no longer auto-close until marked solved)


#3

Yes, @drazisil, you’ve set me on the right path with --no-same-owner. I found this config of someone where they used TAR_OPTIONS environment to inject this option, and it helps.

Sincerely thanks, your support appreciated.


closed #4

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.