Commit ca5c78e7 authored by satmandu's avatar satmandu Committed by GitHub

crew: modify ldconfig & curl usage (#5326)

* modify ldconfig & curl usage

* bump ver
parent d0bae68e
...@@ -51,6 +51,9 @@ DOCOPT ...@@ -51,6 +51,9 @@ DOCOPT
# If CREW_XZ_OPT is defined, use it by default. Use `-7e`, otherwise. # If CREW_XZ_OPT is defined, use it by default. Use `-7e`, otherwise.
ENV["XZ_OPT"] = ENV['CREW_XZ_OPT'] || "-7e -T #{CREW_NPROC}" ENV["XZ_OPT"] = ENV['CREW_XZ_OPT'] || "-7e -T #{CREW_NPROC}"
# If CURL environment variable exists use it in lieu of curl.
CURL = ENV['CURL'] || 'curl'
# Parse arguments using docopt # Parse arguments using docopt
require_relative 'lib/docopt' require_relative 'lib/docopt'
begin begin
...@@ -327,6 +330,7 @@ def const (var) ...@@ -327,6 +330,7 @@ def const (var)
'ARCH', 'ARCH',
'ARCH_LIB', 'ARCH_LIB',
'CHROMEOS_RELEASE', 'CHROMEOS_RELEASE',
'CURL',
'CREW_BREW_DIR', 'CREW_BREW_DIR',
'CREW_BUILD', 'CREW_BUILD',
'CREW_CMAKE_LIBSUFFIX_OPTIONS', 'CREW_CMAKE_LIBSUFFIX_OPTIONS',
...@@ -529,7 +533,7 @@ def download ...@@ -529,7 +533,7 @@ def download
end end
end end
system "curl --retry 3 -#{@verbose}#LC - --insecure \'#{url}\' --output #{filename}" system "#{CURL} --retry 3 -#{@verbose}#LC - --insecure \'#{url}\' --output #{filename}"
abort 'Checksum mismatch. :/ Try again.'.lightred unless abort 'Checksum mismatch. :/ Try again.'.lightred unless
Digest::SHA256.hexdigest( File.read(filename) ) == sha256sum Digest::SHA256.hexdigest( File.read(filename) ) == sha256sum
...@@ -836,7 +840,8 @@ def install ...@@ -836,7 +840,8 @@ def install
file.write JSON.pretty_generate(output) file.write JSON.pretty_generate(output)
end end
# Update shared library cache after install is complete. # Update shared library cache after install is complete.
system "#{CREW_PREFIX}/sbin/ldconfig || true" system "echo #{CREW_LIB_PREFIX} > #{CREW_PREFIX}/etc/ld.so.conf"
system "#{CREW_PREFIX}/sbin/ldconfig -f #{CREW_PREFIX}/etc/ld.so.conf -C #{CREW_PREFIX}/etc/ld.so.cache"
end end
def resolve_dependencies_and_build def resolve_dependencies_and_build
......
# Defines common constants used in different parts of crew # Defines common constants used in different parts of crew
CREW_VERSION = '1.7.8' CREW_VERSION = '1.7.9'
ARCH_ACTUAL = `uname -m`.strip ARCH_ACTUAL = `uname -m`.strip
# This helps with virtualized builds on aarch64 machines # This helps with virtualized builds on aarch64 machines
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment