Closed gebn closed 2 years ago
It would be good to name the inner directory after the tar file name, but there's no obvious way to do this inside Bazel. We'd need access to stamp and platform vars.
This is still a problem:
$ tar xf bmc_exporter-1.1.0-linux_arm.tar.gz
tar: .: Cannot utime: Operation not permitted
tar: .: Cannot change mode to rwxr-xr-t: Operation not permitted
tar: Exiting with failure status due to previous errors
$ tar -tvf bmc_exporter-1.1.0-linux_arm.tar.gz
drwxr-xr-x 0/0 0 2000-01-01 00:00 ./
drwxr-xr-x 0/0 0 2000-01-01 00:00 ./bmc_exporter/
-r-xr-xr-x 0/0 16243385 2000-01-01 00:00 ./bmc_exporter/bmc_exporter
Try changing the UID and GID to something other than 0. Why is there a ./
dir in the archive - is this the problem?
UID and GID is a red-herring; suspect it's caused by ./
, which unfortunately isn't optional at the moment: https://github.com/bazelbuild/rules_pkg/issues/50
The extracted binary still functions correctly.