steam-for-linux icon indicating copy to clipboard operation
steam-for-linux copied to clipboard

add support to libarchive

Open tpgxyz opened this issue 9 years ago • 5 comments

Your system information

  • Steam client version:
  • Distribution (e.g. Ubuntu): OpenMandriva Lx 3.0
  • Opted into Steam client beta?: [Yes/No] Yes
  • Have you checked for system updates?: [Yes/No] Yes

Please describe your issue in as much detail as possible:

Some systems uses libarchive (www.libarchive.org) as default tar program. In this case there are a lot of "tar'isms" in stream shell scripts, one of them is --checkpoint switch for tar. Would be nice if steam's shell scripts were aware of libarchive, and make use of it when detected.

Steps for reproducing this issue:

  1. Install/update Steam on system where libarchive is default tar implementation
  2. Steam fails to install/update

tpgxyz avatar Oct 31 '16 21:10 tpgxyz

~~GNU-tar is always available as gtar even when it is not the default tar provider, so that can be used in scripts to avoid breakage.~~

danielkza avatar Nov 04 '16 12:11 danielkza

gtar is not a thing on Gentoo Linux, I can't speak for other distros.

Tele42 avatar Nov 04 '16 12:11 Tele42

@Tele42 You are correct, I thought gtar was created by the upstream build, but it isn't, and hence, Gentoo doesn't have it. My mistake.

danielkza avatar Nov 04 '16 12:11 danielkza

Not sure when this changed, but Gentoo has gtar now. Also on gentoo it is now possible to set libarchive (AKA bsdtar) as the default tar, so this can break some gentoo systems.

Regardless, it should be possible to just inspect tar --version and change behavior based on whether the string GNU tar is found or not.

Here is some really terrible, untested example code to do just that (placed in the public domain):

if which gtar && gtar --version | grep --silent --fixed-strings 'GNU tar'; then
  # Override `tar` in case `tar` is a different implementation than GNU tar
  alias tar=gtar
elif tar --version | grep --invert-match --silent --fixed-strings 'GNU tar'; then
  echo 'GNU tar must be present as either gtar or tar.'
  exit 1
fi

eestrada avatar Nov 18 '25 05:11 eestrada

To be honest, the progress bar could just be dropped now. This takes a second or two on most systems these days.

chewi avatar Dec 04 '25 23:12 chewi