From f036e214bd50353106261fa4d0ab0abdcf28dcd4 Mon Sep 17 00:00:00 2001 From: Jaime Fullaondo Date: Wed, 28 Nov 2018 14:53:03 +0100 Subject: [PATCH 1/5] [aix] update_config_guess should use a different build dir (not tmp) --- lib/omnibus/builder.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/omnibus/builder.rb b/lib/omnibus/builder.rb index 060df926f..4320f978d 100644 --- a/lib/omnibus/builder.rb +++ b/lib/omnibus/builder.rb @@ -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" From 24e5e19cac295179e10c9440c3bc101a96a8fdd2 Mon Sep 17 00:00:00 2001 From: Jaime Fullaondo Date: Fri, 1 Feb 2019 15:58:13 +0100 Subject: [PATCH 2/5] [bff] add support for extra_package_files --- lib/omnibus/packagers/bff.rb | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/lib/omnibus/packagers/bff.rb b/lib/omnibus/packagers/bff.rb index 7b9fd387a..aca83b8fb 100644 --- a/lib/omnibus/packagers/bff.rb +++ b/lib/omnibus/packagers/bff.rb @@ -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 From 97a01b076b6ffcb7b48cd42b880b08bda469d492 Mon Sep 17 00:00:00 2001 From: Jaime Fullaondo Date: Wed, 20 Mar 2019 02:03:38 +0100 Subject: [PATCH 3/5] [packager] allow overriding the staging dir --- lib/omnibus/packagers/base.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/omnibus/packagers/base.rb b/lib/omnibus/packagers/base.rb index 26f0e4132..9d475c995 100644 --- a/lib/omnibus/packagers/base.rb +++ b/lib/omnibus/packagers/base.rb @@ -177,7 +177,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']) end # From bd0d6eac208a4e4d04213cd82018657c21785345 Mon Sep 17 00:00:00 2001 From: Jaime Fullaondo Date: Thu, 25 Apr 2019 19:24:24 +0200 Subject: [PATCH 4/5] [aix] fix broken healthcheck --- lib/omnibus/health_check.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/omnibus/health_check.rb b/lib/omnibus/health_check.rb index 447eca909..32df27291 100644 --- a/lib/omnibus/health_check.rb +++ b/lib/omnibus/health_check.rb @@ -482,7 +482,8 @@ def health_check_aix current_library = nil bad_libs = {} - read_shared_libs("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 + read_shared_libs("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| case line when /^(.+) needs:$/ current_library = Regexp.last_match[1] From 7293cbd3a601b30c105cd6ac71b41738b58b8278 Mon Sep 17 00:00:00 2001 From: Jaime Fullaondo Date: Fri, 13 Sep 2019 18:26:28 +0200 Subject: [PATCH 5/5] [health] fix AIX shared lib iteration --- lib/omnibus/health_check.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/omnibus/health_check.rb b/lib/omnibus/health_check.rb index d4aa3671b..c4289d727 100644 --- a/lib/omnibus/health_check.rb +++ b/lib/omnibus/health_check.rb @@ -557,7 +557,7 @@ def health_check_aix bad_libs = {} # Executables, .so, .a and .o - read_shared_libs("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| + 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| case line when /^(.+) needs:$/ current_library = Regexp.last_match[1]