importd: Always specify file unpacked by tar
authorArsen Arsenović <arsen@gentoo.org>
Sat, 28 Jan 2023 21:32:41 +0000 (22:32 +0100)
committerLennart Poettering <lennart@poettering.net>
Tue, 31 Jan 2023 11:21:44 +0000 (12:21 +0100)
commit181eea677dd364d2b22dc691647792142b271074
tree7d3469b886964f9aa61913545b3615fe9b5a0ddd
parenta4440918401240533a68afd3adebe5f125e1cf18
importd: Always specify file unpacked by tar

Despite popular belief, the default file extracted by GNU tar is not stdin.  It
is the value of the TAPE environment variable, falling back on a compile-time
constant.  On my system, the default value is /dev/full, which causes tar to
just spin forever due to --ignore-zeros.  Always specifying this flag is the
safe thing to do.

  ~$ tar --show-defaults
  --format=gnu -f/dev/full -b20 --quoting-style=escape
  --rmt-command=/usr/sbin/grmt

See also: ``(tar)defaults'', available via Info viewers, and in HTML form at:
https://www.gnu.org/s/tar/manual/html_node/defaults.html
src/import/import-common.c