From b40dd5e1ac3f4c7319725342ec6005f12e3792df Mon Sep 17 00:00:00 2001 From: satmandu Date: Fri, 28 May 2021 01:40:33 -0400 Subject: [PATCH] Have crew pull the true system Glibc version (#5819) * crew:Get actual glibc version * modify libc.so.6 logic for older glibc on i686 --- lib/const.rb | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/const.rb b/lib/const.rb index 436b52008..7ef5149ef 100644 --- a/lib/const.rb +++ b/lib/const.rb @@ -1,6 +1,6 @@ # Defines common constants used in different parts of crew -CREW_VERSION = '1.10.6' +CREW_VERSION = '1.10.7' ARCH_ACTUAL = `uname -m`.strip # This helps with virtualized builds on aarch64 machines @@ -8,7 +8,10 @@ ARCH_ACTUAL = `uname -m`.strip ARCH = if ARCH_ACTUAL == 'armv8l' then 'armv7l' else ARCH_ACTUAL end ARCH_LIB = if ARCH == 'x86_64' then 'lib64' else 'lib' end -LIBC_VERSION = if File.exist? "/#{ARCH_LIB}/libc-2.27.so" then '2.27' else '2.23' end + +# Glibc version can be found from the output of libc.so.6 +@libcvertokens= %x[/#{ARCH_LIB}/libc.so.6].lines.first.chomp.split(/[\s]/) +LIBC_VERSION = @libcvertokens[@libcvertokens.find_index("version") + 1].sub!(/[[:punct:]]?$/,'') if ENV['CREW_PREFIX'].to_s.empty? CREW_PREFIX = '/usr/local'