mirror of
https://github.com/chromebrew/chromebrew.git
synced 2026-01-08 23:18:10 -05:00
Add postinstall to glibc to add symlinks. (#12116)
* Add postinstall to glibc to add symlinks. Signed-off-by: Satadru Pramanik <satadru@gmail.com> * Update packages/glibc.rb Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * Update packages/glibc.rb Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * Update packages/glibc.rb Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * Update glibc version Signed-off-by: Satadru Pramanik <satadru@gmail.com> --------- Signed-off-by: Satadru Pramanik <satadru@gmail.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
a01ff03482
commit
663d280d9f
@@ -7,7 +7,7 @@ unless CREW_PRE_GLIBC_STANDALONE
|
||||
class Glibc < Package
|
||||
description 'The GNU C Library project provides the core libraries for GNU/Linux systems.'
|
||||
homepage 'https://www.gnu.org/software/libc/'
|
||||
version '2.41-5'
|
||||
version '2.41-6'
|
||||
license 'LGPL-2.1+, BSD, HPND, ISC, inner-net, rc, and PCRE'
|
||||
compatibility 'all'
|
||||
source_url 'https://sourceware.org/git/glibc.git'
|
||||
@@ -171,6 +171,25 @@ unless CREW_PRE_GLIBC_STANDALONE
|
||||
end
|
||||
|
||||
def self.postinstall
|
||||
glibc_libraries = %w[ld libBrokenLocale libSegFault libanl libc libcrypt
|
||||
libdl libm libmemusage libmvec libnsl libnss_compat libnss_db
|
||||
libnss_dns libnss_files libnss_hesiod libpcprofile libpthread
|
||||
libthread_db libresolv librlv librt libthread_db-1.0 libutil]
|
||||
glibc_libraries.each do |lib|
|
||||
# Reject entries which aren't libraries ending in .so, and which aren't files.
|
||||
# Reject text files such as libc.so because they points to files like
|
||||
# libc_nonshared.a, which are not provided by ChromeOS
|
||||
Dir["#{CREW_GLIBC_PREFIX}/#{lib}.so*"].compact.reject { |f| File.directory?(f) }.each do |f|
|
||||
glibc_filetype = `file #{f}`.chomp
|
||||
puts "f: #{glibc_filetype}" if @opt_verbose
|
||||
if ['shared object', 'symbolic link'].any? { |type| glibc_filetype.include?(type) }
|
||||
g = File.basename(f)
|
||||
FileUtils.ln_sf f.to_s, "#{CREW_LIB_PREFIX}/#{g}"
|
||||
elsif @opt_verbose
|
||||
puts "#{f} excluded because #{glibc_filetype}"
|
||||
end
|
||||
end
|
||||
end
|
||||
# update search cache for ld.so
|
||||
system "#{CREW_PREFIX}/bin/ldconfig", %i[out err] => File::NULL
|
||||
puts "Please run 'crew update' immediately to finish the install.".lightblue
|
||||
|
||||
Reference in New Issue
Block a user