docker: Add options to tar for normal-user mode behavior

Default behavior of super-user mode tar is to keep uid/gid and
permissions in extracting files/directories from archives.

It conflicts with security settings of rootless mode podman while
building container images from recent releases of ubuntu and fedora,
resulting in errors as follows:

  tar: latexpand-v1.3/tests/df-conflict/b: Cannot change mode to rwxrwxr-x: Operation not permitted
  tar: latexpand-v1.3/tests/df-conflict: Cannot change mode to rwxrwxr-x: Operation not permitted
  tar: latexpand-v1.3/tests/expected/err: Cannot change mode to rwxrwxr-x: Operation not permitted
  tar: latexpand-v1.3/tests/expected: Cannot change mode to rwxrwxr-x: Operation not permitted
  tar: latexpand-v1.3/tests: Cannot change mode to rwxrwxr-x: Operation not permitted
  tar: latexpand-v1.3: Cannot change mode to rwxrwxr-x: Operation not permitted
  tar: Exiting with failure status due to previous errors

Add --no-same-owner and --no-same-permission options to tar and make
it behave the same way as in its normal-user mode.

Signed-off-by: Akira Yokosawa <akiyks@gmail.com>
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
2 files changed