jordansissel / fpm

Effing package management! Build packages for multiple platforms (deb, rpm, etc) with great ease and sanity.
http://fpm.readthedocs.io/en/latest/
Other
11.09k stars 1.07k forks source link

Skip tests requiring bzip2 if bzip2 is not available #2003

Open jordansissel opened 1 year ago

jordansissel commented 1 year ago

The test FPM::Package::Deb compression when --deb-compression is bzip2 should not cause lintian to crash crashes if the bzip2 binary is not installed with a slightly confusing error:

  2) FPM::Package::Deb compression when --deb-compression is bzip2 should not cause lintian to crash
     Failure/Error: deb.output(target)
     FPM::Util::ProcessFailed:
       tar failed (exit code 2). Full command was:["tar", "-C", "/tmp/package-deb-staging-2e79c03cd0671f7874ccdbda0e60b64efea664dc72149695bf12223fd7c7", "-j", "--numeric-owner", "--owner", "0", "--numeric-owner", "--group", "0", "-cf", "/tmp/package-deb-build-180500d02ac682fa59de90785470d91f939d00f95d4583679cb967c0058a/data.tar.bz2", "."]
     # ./lib/fpm/util.rb:194:in `safesystem'
     # ./lib/fpm/package/deb.rb:668:in `output'
     # ./spec/fpm/package/deb_spec.rb:551:in `block (5 levels) in <top (required)>'

The problem is that tar -j will invoke bzip2 and fail if this program is not in $PATH. I can reproduce the failure with tar alone using -j:

% tar -jcf asdf.tar.bz2  Gemfile
/bin/sh: line 1: bzip2: command not found
tar: Child returned status 127
tar: Error is not recoverable: exiting now