gebn / bmc_exporter

Exposes Baseboard Management Controller data in Prometheus format.
GNU Lesser General Public License v3.0
45 stars 3 forks source link

Issues extracting release tar.gz #49

Closed gebn closed 2 years ago

gebn commented 4 years ago
$ tar xf bmc_exporter-1.0.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

The extracted binary still functions correctly.

gebn commented 4 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.

gebn commented 4 years ago

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
gebn commented 4 years ago

Try changing the UID and GID to something other than 0. Why is there a ./ dir in the archive - is this the problem?

gebn commented 4 years ago

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