Skip to content

Commit

Permalink
brew vendor-gems: commit updates.
Browse files Browse the repository at this point in the history
  • Loading branch information
BrewTestBot committed Feb 17, 2024
1 parent 62cfe0e commit c0a5401
Show file tree
Hide file tree
Showing 36 changed files with 27 additions and 25 deletions.
2 changes: 2 additions & 0 deletions Library/Homebrew/Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,8 @@ GEM
yard (>= 0.9)

PLATFORMS
aarch64-linux
arm-linux
arm64-darwin
x86_64-darwin
x86_64-linux
Expand Down
4 changes: 2 additions & 2 deletions Library/Homebrew/vendor/bundle/bundler/setup.rb
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def self.extension_api_version
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/commander-4.6.0/lib")
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/diff-lcs-1.5.1/lib")
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/docile-1.4.0/lib")
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/elftools-1.2.0/lib")
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/elftools-1.3.0/lib")
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/erubi-1.12.0/lib")
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/hana-1.3.7/lib")
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/extensions/arm64-darwin-20/#{Gem.extension_api_version}/hpricot-0.8.6")
Expand All @@ -68,7 +68,7 @@ def self.extension_api_version
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/rainbow-3.1.1/lib")
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/sorbet-runtime-0.5.11261/lib")
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/parlour-8.1.0/lib")
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/patchelf-1.4.0/lib")
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/patchelf-1.5.0/lib")
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/plist-3.7.1/lib")
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/prettier_print-1.2.1/lib")
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/extensions/arm64-darwin-20/#{Gem.extension_api_version}/prism-0.24.0")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ def tag_at(n)
@tag_at_map ||= {}
return @tag_at_map[n] if @tag_at_map[n]

dyn = Structs::ELF_Dyn.new(endian: endian)
dyn = Structs::ELF_Dyn.new(endian:)
dyn.elf_class = header.elf_class
stream.pos = tag_start + n * dyn.num_bytes
dyn.offset = stream.pos
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def header
return @header if defined?(@header)

stream.pos = 0
@header = Structs::ELF_Ehdr.new(endian: endian, offset: stream.pos)
@header = Structs::ELF_Ehdr.new(endian:, offset: stream.pos)
@header.elf_class = elf_class
@header.read(stream)
end
Expand Down Expand Up @@ -237,7 +237,7 @@ def segments
# #=> #<ELFTools::Segments::NoteSegment:0x005629dda1e4f8>
#
# # this is ok
# elf.segment_by_type('note') # will be tranformed into `PT_NOTE`
# elf.segment_by_type('note') # will be transformed into `PT_NOTE`
# #=> #<ELFTools::Segments::NoteSegment:0x005629dda1e4f8>
# @example
# elf.segment_by_type(1337)
Expand Down Expand Up @@ -358,7 +358,7 @@ def identify

def create_section(n)
stream.pos = header.e_shoff + n * header.e_shentsize
shdr = Structs::ELF_Shdr.new(endian: endian, offset: stream.pos)
shdr = Structs::ELF_Shdr.new(endian:, offset: stream.pos)
shdr.elf_class = elf_class
shdr.read(stream)
Sections::Section.create(shdr, stream,
Expand All @@ -369,7 +369,7 @@ def create_section(n)

def create_segment(n)
stream.pos = header.e_phoff + n * header.e_phentsize
phdr = Structs::ELF_Phdr[elf_class].new(endian: endian, offset: stream.pos)
phdr = Structs::ELF_Phdr[elf_class].new(endian:, offset: stream.pos)
phdr.elf_class = elf_class
Segments::Segment.create(phdr.read(stream), stream, offset_from_vma: method(:offset_from_vma))
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ def endian
end

def create_note(cur)
nhdr = Structs::ELF_Nhdr.new(endian: endian, offset: stream.pos).read(stream)
nhdr = Structs::ELF_Nhdr.new(endian:, offset: stream.pos).read(stream)
ELFTools::Note::Note.new(nhdr, stream, cur)
end

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def initialize(header, stream, offset_from_vma: nil, strtab: nil, **_kwargs)
@offset_from_vma = offset_from_vma
end

# Return +header.sh_type+ in a simplier way.
# Return +header.sh_type+ in a simpler way.
# @return [Integer]
# The type, meaning of types are defined in {Constants::SHT}.
def type
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def initialize(header, stream, offset_from_vma: nil)
@offset_from_vma = offset_from_vma
end

# Return +header.p_type+ in a simplier way.
# Return +header.p_type+ in a simpler way.
# @return [Integer]
# The type, meaning of types are defined in {Constants::PT}.
def type
Expand All @@ -35,19 +35,19 @@ def data
end

# Is this segment readable?
# @return [Boolean] Ture or false.
# @return [Boolean] True or false.
def readable?
(header.p_flags & 4) == 4
end

# Is this segment writable?
# @return [Boolean] Ture or false.
# @return [Boolean] True or false.
def writable?
(header.p_flags & 2) == 2
end

# Is this segment executable?
# @return [Boolean] Ture or false.
# @return [Boolean] True or false.
def executable?
(header.p_flags & 1) == 1
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ module ELFTools
module Util
# Class methods.
module ClassMethods
# Round up the number to be mulitple of
# Round up the number to be multiple of
# +2**bit+.
# @param [Integer] num Number to be rounded-up.
# @param [Integer] bit How many bit to be aligned.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@

module ELFTools
# Current gem version
VERSION = '1.2.0'
VERSION = '1.3.0'
end
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ def modify_interpreter
end

def modify_needed
# due to gsoc time constraints only implmenting features used by brew.
# due to gsoc time constraints only implementing features used by brew.
raise NotImplementedError
end

Expand Down Expand Up @@ -257,7 +257,7 @@ def modify_rpath_helper(new_rpath, force_rpath: false)
new_rpath_strtab_idx = shdr_dynstr.sh_size.to_i
new_dynstr[new_rpath_strtab_idx..(new_rpath_strtab_idx + new_rpath.size)] = "#{new_rpath}\x00"

dyn_tags.each do |_, dyn|
dyn_tags.each_value do |dyn|
dyn[:header].d_val = new_rpath_strtab_idx
with_buf_at(dyn[:offset]) { |b| dyn[:header].write(b) }
end
Expand All @@ -273,7 +273,7 @@ def modify_rpath_helper(new_rpath, force_rpath: false)
def modify_soname
return unless ehdr.e_type == ELFTools::Constants::ET_DYN

# due to gsoc time constraints only implmenting features used by brew.
# due to gsoc time constraints only implementing features used by brew.
raise NotImplementedError
end

Expand Down Expand Up @@ -306,7 +306,7 @@ def add_dt_rpath!(d_tag: nil, d_val: nil)
# consider DT_NULL when copying
replacement_size = (dt_null_idx + 1) * dyn_num_bytes

# make space for dt_runpath tag at the top, shift data by one tag positon
# make space for dt_runpath tag at the top, shift data by one tag position
new_dynamic_data[dyn_num_bytes..(replacement_size + dyn_num_bytes)] = new_dynamic_data[0..replacement_size]

dyn_rpath = ELFTools::Structs::ELF_Dyn.new endian: endian, elf_class: elf_class
Expand Down Expand Up @@ -966,7 +966,7 @@ def find_or_create_section_header(rsec_name)
def overwrite_replaced_sections
# the original source says this has to be done separately to
# prevent clobbering the previously written section contents.
@replaced_sections.each do |rsec_name, _|
@replaced_sections.each_key do |rsec_name|
shdr = find_section(rsec_name)&.header
next unless shdr

Expand All @@ -976,7 +976,7 @@ def overwrite_replaced_sections
end
end

def write_section_aligment(shdr)
def write_section_alignment(shdr)
return if shdr.sh_type == ELFTools::Constants::SHT_NOTE && shdr.sh_addralign <= @section_alignment

shdr.sh_addralign = @section_alignment
Expand Down Expand Up @@ -1012,7 +1012,7 @@ def write_replaced_sections(cur_off, start_addr, start_offset)
shdr.sh_addr = start_addr + (cur_off - start_offset)
shdr.sh_size = rsec_data.size

write_section_aligment(shdr)
write_section_alignment(shdr)

seg_type = {
'.interp' => ELFTools::Constants::PT_INTERP,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,11 @@ def readonly

def patch_requests
@options[:set].each do |sym, val|
patcher.__send__("#{sym}=".to_sym, val)
patcher.__send__(:"#{sym}=", val)
end

@options[:needed].each do |type, val|
patcher.__send__("#{type}_needed".to_sym, *val)
patcher.__send__(:"#{type}_needed", *val)
end
end

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@

module PatchELF
# Current gem version.
VERSION = '1.4.0'.freeze
VERSION = '1.5.0'.freeze
end

0 comments on commit c0a5401

Please sign in to comment.