Skip to content

Commit

Permalink
Lazily require xz at the last possible moment to avoid dependency on …
Browse files Browse the repository at this point in the history
…liblzma.so.5

Fixes jordansissel#1090
  • Loading branch information
ketan committed Jun 10, 2016
1 parent 390ee71 commit 1ff6b51
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/fpm/package/freebsd.rb
Expand Up @@ -3,7 +3,6 @@
require "fpm/util"
require "digest"
require "fileutils"
require "xz"

class FPM::Package::FreeBSD < FPM::Package
SCRIPT_MAP = {
Expand All @@ -30,6 +29,10 @@ def self.default_abi
:default => "fpm/<name>"

def output(output_path)
# See https://github.com/jordansissel/fpm/issues/1090
# require xz later, because this triggers a load of liblzma.so.5 that is
# unavailable on older CentOS/RH distros.
require "xz"
output_check(output_path)

# Build the packaging metadata files.
Expand Down

0 comments on commit 1ff6b51

Please sign in to comment.