Commit 33ba6a93 authored by satmandu's avatar satmandu Committed by GitHub

FIX crew error on reinstall, Add llvm to base install & use llvm-strip instead of strip (#4975)

* Have crew use llvm-strip if available

* Add llvm to base install

* Fix "no implicit conversion of String into Array (TypeError)" error

* uprev
parent f436adf7
......@@ -590,7 +590,7 @@ def build_and_preconfigure (target_dir)
@pkg.build
@pkg.in_build = false
# wipe crew destdir
FileUtils.rm_rf Dir.glob("#{CREW_DEST_DIR}/*") + @fileutils_verbose
FileUtils.rm_rf Dir.glob("#{CREW_DEST_DIR}/*") + @fileutils_verbose.to_s
puts 'Preconfiguring package...'
@pkg.install
......@@ -650,11 +650,11 @@ end
def strip_find_files (find_cmd, strip_option = "")
# check whether crew should strip
return if CREW_NOT_STRIP || ENV['CREW_NOT_STRIP'] || !File.exist?("#{CREW_PREFIX}/bin/strip")
return if CREW_NOT_STRIP || ENV['CREW_NOT_STRIP'] || !File.exist?("#{CREW_PREFIX}/bin/llvm-strip")
# run find_cmd and strip only ar or ELF files
system "#{find_cmd} | xargs -r chmod u+w"
system "#{find_cmd} | xargs -r sh -c 'for i in \"$0\" \"$@\"; do case \"$(head -c 4 $i)\" in ?ELF|\!?ar) echo \"$i\";; esac ; done' | xargs -r strip #{strip_option}"
system "#{find_cmd} | xargs -r sh -c 'for i in \"$0\" \"$@\"; do case \"$(head -c 4 $i)\" in ?ELF|\!?ar) echo \"$i\";; esac ; done' | xargs -r llvm-strip #{strip_option}"
end
def install_package (pkgdir)
......@@ -843,7 +843,7 @@ def resolve_dependencies_and_build
ensure
#cleanup
unless @opt_keep
FileUtils.rm_rf Dir.glob("#{CREW_BREW_DIR}/*") + @fileutils_verbose
FileUtils.rm_rf Dir.glob("#{CREW_BREW_DIR}/*") + @fileutils_verbose.to_s
FileUtils.mkdir_p "#{CREW_BREW_DIR}/dest" #this is a little ugly, feel free to find a better way
end
end
......
......@@ -65,6 +65,8 @@ case "${ARCH}" in
fi
urls+=('https://dl.bintray.com/chromebrew/chromebrew/gcc10-10.2.1-0f64-chromeos-armv7l.tar.xz')
sha256s+=('dc0760c6fc123a48a72a6f5492f56d2be4273c29be3dfce6e7b202521c659365')
urls+=('https://dl.bintray.com/chromebrew/chromebrew/llvm-11.1.0-rc1-chromeos-armv7l.tar.xz')
sha256s+=('5ecb72e60483b15c7588446a7ac424d64cdd3f21ca0fa5ffea4737a25dedca89')
urls+=('https://dl.bintray.com/chromebrew/chromebrew/brotli-1.0.8-chromeos-armv7l.tar.xz')
sha256s+=('636a5bb46059311e280f1828aa032e2d2bad83905b124549159b73e279856688')
urls+=('https://dl.bintray.com/chromebrew/chromebrew/c_ares-1.15.0-chromeos-armv7l.tar.xz')
......@@ -109,6 +111,8 @@ case "${ARCH}" in
"i686")
urls+=('https://dl.bintray.com/chromebrew/chromebrew/gcc10-10.2.1-0f64-chromeos-i686.tar.xz')
sha256s+=('52850f19acb5c7def3b7116a5873a5c68c4f9a7fa254b5198deacff36f1e15aa')
urls+=('https://dl.bintray.com/chromebrew/chromebrew/llvm-11.1.0-rc1-chromeos-i686.tar.xz')
sha256s+=('5595ca097aa454bd54b8a336d467ee266f8afd4bd8100d1a3831e3face9b4f43')
urls+=('https://dl.bintray.com/chromebrew/chromebrew/brotli-1.0.8-chromeos-i686.tar.xz')
sha256s+=('c16396d2d9a4a000b360fd6f096e4f0053abafb7bf1f8c84766527ea7a4b074f')
urls+=('https://dl.bintray.com/chromebrew/chromebrew/c_ares-1.15.0-chromeos-i686.tar.xz')
......@@ -153,6 +157,8 @@ case "${ARCH}" in
"x86_64")
urls+=('https://dl.bintray.com/chromebrew/chromebrew/gcc10-10.2.1-0f64-chromeos-x86_64.tar.xz')
sha256s+=('438ae78481cbbfcc38c6d917498f6b6f0681627a798b263bb9b8ef222ee38b35')
urls+=('https://dl.bintray.com/chromebrew/chromebrew/llvm-11.1.0-rc1-chromeos-x86_64.tar.xz')
sha256s+=('031f6f3510ebbc5a1270fac07934d7efa9126c8e89f98695505b1376d6d233a5')
urls+=('https://dl.bintray.com/chromebrew/chromebrew/brotli-1.0.8-chromeos-x86_64.tar.xz')
sha256s+=('921fc1be57c195176d500f82bf96a52566824e62036c329ced629a0177c7c9d1')
urls+=('https://dl.bintray.com/chromebrew/chromebrew/c_ares-1.15.0-chromeos-x86_64.tar.xz')
......
# Defines common constants used in different parts of crew
CREW_VERSION = '1.5.7'
CREW_VERSION = '1.5.8'
ARCH_ACTUAL = `uname -m`.strip
# 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