Skip to content
Open
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/omnibus/builder.rb
Original file line number Diff line number Diff line change
Expand Up @@ -701,7 +701,7 @@ def sync(source, destination, options = {})
# Default: [:config_guess, :config_sub]
def update_config_guess(target: ".", install: [:config_guess, :config_sub])
build_commands << BuildCommand.new("update_config_guess `target: #{target} install: #{install.inspect}'") do
config_guess_dir = "/tmp/build/embedded/lib/config_guess"
config_guess_dir = "#{install_dir}/embedded/lib/config_guess"
%w{config.guess config.sub}.each do |c|
unless File.exist?(File.join(config_guess_dir, c))
raise "Can not find #{c}. Make sure you add a dependency on 'config_guess' in your software definition"
Expand Down
3 changes: 2 additions & 1 deletion lib/omnibus/health_check.rb
Original file line number Diff line number Diff line change
Expand Up @@ -556,7 +556,8 @@ def health_check_aix
current_library = nil
bad_libs = {}

yield_shellout_results("find #{project.install_dir}/ -type f | xargs file | grep \"RISC System\" | awk -F: '{print $1}' | xargs -n 1 ldd") do |line|
# Executables, .so, .a and .o
yield_shellout_results("find #{project.install_dir}/ -type f -perm -u=x -o -perm -g=x -o -name \"*.so*\" -o -name \"*.a\" -o -name \"*.o\" | xargs file | grep -E \"RISC System|XCOFF\" | awk -F: '{print $1}' | xargs -n 1 ldd") do |line|
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll trust you on this one 😄

case line
when /^(.+) needs:$/
current_library = Regexp.last_match[1]
Expand Down
2 changes: 1 addition & 1 deletion lib/omnibus/packagers/base.rb
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ def package_path
# @return [String]
#
def staging_dir
@staging_dir ||= Dir.mktmpdir(project.package_name)
@staging_dir ||= Dir.mktmpdir(project.package_name, ENV['OMNIBUS_STAGING_DIR'])
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm curious: why is this needed in particular for AIX?

end

#
Expand Down
21 changes: 21 additions & 0 deletions lib/omnibus/packagers/bff.rb
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,27 @@ class Packager::BFF < Packager::Base
destination = File.join(staging_dir, project.install_dir)
FileSyncer.sync(project.install_dir, destination, exclude: exclusions)

# Copy over any user-specified extra package files.
#
# Files retain their relative paths inside the scratch directory, so
# we need to grab the dirname of the file, create that directory, and
# then copy the file into that directory.
#
# extra_package_file '/path/to/foo.txt' #=> /tmp/BUILD/path/to/foo.txt
project.extra_package_files.each do |file|
parent = File.dirname(file)

if File.directory?(file)
destination = File.join("#{staging_dir}", file)
create_directory(destination)
FileSyncer.sync(file, destination)
else
destination = File.join("#{staging_dir}", parent)
create_directory(destination)
copy_file(file, destination)
end
end

# Create the scripts staging directory
create_directory(scripts_staging_dir)
end
Expand Down