fpm
fpm copied to clipboard
Getting Started example fails on macOS Monterey 12.5 with Apple M1 Max chip
Following: https://fpm.readthedocs.io/en/latest/getting-started.html
pmoore@Peters-MacBook-Pro:~ $ fpm -s dir -t deb -p hello-world-0.1.0-1-any.deb --name hello-world --license agpl3 --version 0.1.0 --architecture all --depends bash --depends lolcat --description "Say hi!" --url "https://example.com/hello-world" --maintainer "You The Amazing Person <you are an amazing person at example dot com>" hello-world=/usr/bin/hello-world hello-world.1=/usr/share/man/man1/hello-world.1
/opt/homebrew/lib/ruby/gems/3.1.0/gems/fpm-1.14.2/lib/fpm/package.rb:334: warning: Passing safe_level with the 2nd argument of ERB.new is deprecated. Do not use it, and specify other arguments as keyword arguments.
/opt/homebrew/lib/ruby/gems/3.1.0/gems/fpm-1.14.2/lib/fpm/package.rb:334: warning: Passing trim_mode with the 3rd argument of ERB.new is deprecated. Use keyword argument like ERB.new(str, trim_mode: ...) instead.
/opt/homebrew/lib/ruby/gems/3.1.0/gems/fpm-1.14.2/lib/fpm/package.rb:334: warning: Passing safe_level with the 2nd argument of ERB.new is deprecated. Do not use it, and specify other arguments as keyword arguments.
/opt/homebrew/lib/ruby/gems/3.1.0/gems/fpm-1.14.2/lib/fpm/package.rb:334: warning: Passing trim_mode with the 3rd argument of ERB.new is deprecated. Use keyword argument like ERB.new(str, trim_mode: ...) instead.
Process failed: tar failed (exit code 1). Full command was:["tar", "-C", "/var/folders/kc/p5r32hgd42xcwxhc9lyfxtwm0000gn/T/package-deb-build-2b7ce2112d713e6b7a709b8633e4697e9e286fdd200480104b33ce59fb9a/control", "-z", "-cf", "/var/folders/kc/p5r32hgd42xcwxhc9lyfxtwm0000gn/T/package-deb-build-2b7ce2112d713e6b7a709b8633e4697e9e286fdd200480104b33ce59fb9a/control.tar.gz", "--owner=0", "--group=0", "--numeric-owner", "."] {:level=>:error}
pmoore@Peters-MacBook-Pro:~ $
The hello-world
and hello-world.1
files are present and correct in working directory, tar
is available in PATH
, so is lolcat
.
System information:
pmoore@Peters-MacBook-Pro:~ $ uname -a
Darwin Peters-MacBook-Pro.local 21.6.0 Darwin Kernel Version 21.6.0: Sat Jun 18 17:07:22 PDT 2022; root:xnu-8020.140.41~1/RELEASE_ARM64_T6000 arm64
Thanks for the report! I don’t have a mac so I can’t test this directly.
I’ll see if anything changes recently regarding fpm’s use of tar or maybe macOS changes it’s tar implementation.. but these are just guesses for a starting point for investigation
Just came across this issue. I did a little digging and it fails because the macOS tar doesn't support the --owner
and --group
options when creating control.tar.gz here. A workaround is to use gnu-tar from homebrew (brew install gnu-tar
). You'll have to add its bin directory to your PATH so fpm picks it up.
Many thanks Dan!