On my mac machine this just works as expected:
#!/bin/sh -euf
touch test.sh
chown 888:888 test.sh
busybox tar -czvf out.tar.gz test.sh
Invocation:
$ fakeroot -- ./generateArchive.sh
$ busybox tar -tzvf out.tar.gz
-rw-r--r-- 888/888 0 2017-08-02 20:52:50 test.sh
But on my virtual ubuntu machine I get:
$ fakeroot -- ./generateArchive.sh
$ busybox tar -tzvf out.tar.gz
-rwxrwxr-x marco/marco 215 2017-08-02 20:53:32 test.sh
Why does busybox on ubuntu not "fall" for the faked ownership?
It works on ubuntu when I use tar
instead of busybox tar
.
Additional information:
Mac (10.12.5):
fakeroot version 1.20.2
BusyBox v1.20.0.git (2017-05-17 10:01:40 CEST) multi-call binary.
Ubuntu (14.04.5 LTS):
fakeroot version 1.20
BusyBox v1.21.1 (Ubuntu 1:1.21.0-1ubuntu1) multi-call binary.