Skip to content

Commit

Permalink
Merge pull request #2084 from /pull/2009
Browse files Browse the repository at this point in the history
When using zstd, use tar flags that are compatible with both gnu tar and bsdtar (#2009)
  • Loading branch information
jordansissel authored Dec 9, 2024
2 parents 28fea4c + b2f2fc6 commit f714f4b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/fpm/package/deb.rb
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ def extract_info(package)
compression = "-J"
when "zst"
controltar = "control.tar.zst"
compression = "-I zstd"
compression = "--use-compress-program 'zstd -d'"
when 'tar'
controltar = "control.tar"
compression = ""
Expand Down Expand Up @@ -480,7 +480,7 @@ def extract_files(package)
compression = "-J"
when "zst"
datatar = "data.tar.zst"
compression = "-I zstd"
compression = "--use-compress-program 'zstd -d'"
when 'tar'
datatar = "data.tar"
compression = ""
Expand Down Expand Up @@ -698,7 +698,7 @@ def output(output_path)
when "zst"
datatar = build_path("data.tar.zst")
controltar = build_path("control.tar.zst")
compression_flags = ["-I zstd"]
compression_flags = ["--use-compress-program", "zstd"]
compressor_options = {"ZSTD_CLEVEL" => "-#{self.attributes[:deb_compression_level] || 3}"}
when "none"
datatar = build_path("data.tar")
Expand Down Expand Up @@ -1018,7 +1018,7 @@ def write_control_tarball
compressor_options = {"XZ_OPT" => "-#{self.attributes[:deb_compression_level] || 3}"}
when "zst"
controltar = "control.tar.zst"
compression_flags = ["-I zstd"]
compression_flags = ["--use-compress-program", "zstd"]
compressor_options = {"ZSTD_CLEVEL" => "-#{self.attributes[:deb_compression_level] || 3}"}
when "none"
controltar = "control.tar"
Expand Down

0 comments on commit f714f4b

Please sign in to comment.