patchelf 1.4.0 → 1.5.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 275f2e51c3ce1332b2069f3d9bb058351c1b0953df6bb5aad9d34f1af3adb9a4
4
- data.tar.gz: a4f2c422bac7e669601a4c29e30046cdaa2076f9937d767152bd5f08920abdf4
3
+ metadata.gz: d1e44d5adb39d260d124ebc5231362a134e0719cf2f4a379ddab0d4a7343db66
4
+ data.tar.gz: a1cdf1d41641b728e205de2559c86eb4fb7a98f09d6a1882123310edf6701bcf
5
5
  SHA512:
6
- metadata.gz: 97c66ab530c8f00f95c67dbeb07dfcc426c786c0d90b4a85cede69dc205283beb3d9d1c393b910b1ff88312bf80d040e6a2dccd5ed35300665015fcc3e3ce7e7
7
- data.tar.gz: 9d09373c7ef6d6aa3f7a3541afefd3486b9e9906091a98277141fa25decbd32f0eee3e214ebd97e7f8e56c89cd8646a7c4b3ccde3a48151b345c9ebc170c5173
6
+ metadata.gz: 432fd63c969cd337644e4360dbc110a0fae0aaba480174ea3162ddab17814fea9eceeff266cc2f98c571b06830f4ff94ac148b762c49d6fe2135cb692a212a29
7
+ data.tar.gz: 9d7b9769ae80913cbc621801f6caee0e1e61ccbc32514302f892e7ecbff3c8439ae89557c1bb3b10d27e21732fe1e7a36bf8be12b8296237a3f6dd39a6b76c3b
@@ -177,7 +177,7 @@ module PatchELF
177
177
  end
178
178
 
179
179
  def modify_needed
180
- # due to gsoc time constraints only implmenting features used by brew.
180
+ # due to gsoc time constraints only implementing features used by brew.
181
181
  raise NotImplementedError
182
182
  end
183
183
 
@@ -257,7 +257,7 @@ module PatchELF
257
257
  new_rpath_strtab_idx = shdr_dynstr.sh_size.to_i
258
258
  new_dynstr[new_rpath_strtab_idx..(new_rpath_strtab_idx + new_rpath.size)] = "#{new_rpath}\x00"
259
259
 
260
- dyn_tags.each do |_, dyn|
260
+ dyn_tags.each_value do |dyn|
261
261
  dyn[:header].d_val = new_rpath_strtab_idx
262
262
  with_buf_at(dyn[:offset]) { |b| dyn[:header].write(b) }
263
263
  end
@@ -273,7 +273,7 @@ module PatchELF
273
273
  def modify_soname
274
274
  return unless ehdr.e_type == ELFTools::Constants::ET_DYN
275
275
 
276
- # due to gsoc time constraints only implmenting features used by brew.
276
+ # due to gsoc time constraints only implementing features used by brew.
277
277
  raise NotImplementedError
278
278
  end
279
279
 
@@ -306,7 +306,7 @@ module PatchELF
306
306
  # consider DT_NULL when copying
307
307
  replacement_size = (dt_null_idx + 1) * dyn_num_bytes
308
308
 
309
- # make space for dt_runpath tag at the top, shift data by one tag positon
309
+ # make space for dt_runpath tag at the top, shift data by one tag position
310
310
  new_dynamic_data[dyn_num_bytes..(replacement_size + dyn_num_bytes)] = new_dynamic_data[0..replacement_size]
311
311
 
312
312
  dyn_rpath = ELFTools::Structs::ELF_Dyn.new endian: endian, elf_class: elf_class
@@ -966,7 +966,7 @@ module PatchELF
966
966
  def overwrite_replaced_sections
967
967
  # the original source says this has to be done separately to
968
968
  # prevent clobbering the previously written section contents.
969
- @replaced_sections.each do |rsec_name, _|
969
+ @replaced_sections.each_key do |rsec_name|
970
970
  shdr = find_section(rsec_name)&.header
971
971
  next unless shdr
972
972
 
@@ -976,7 +976,7 @@ module PatchELF
976
976
  end
977
977
  end
978
978
 
979
- def write_section_aligment(shdr)
979
+ def write_section_alignment(shdr)
980
980
  return if shdr.sh_type == ELFTools::Constants::SHT_NOTE && shdr.sh_addralign <= @section_alignment
981
981
 
982
982
  shdr.sh_addralign = @section_alignment
@@ -1012,7 +1012,7 @@ module PatchELF
1012
1012
  shdr.sh_addr = start_addr + (cur_off - start_offset)
1013
1013
  shdr.sh_size = rsec_data.size
1014
1014
 
1015
- write_section_aligment(shdr)
1015
+ write_section_alignment(shdr)
1016
1016
 
1017
1017
  seg_type = {
1018
1018
  '.interp' => ELFTools::Constants::PT_INTERP,
data/lib/patchelf/cli.rb CHANGED
@@ -63,11 +63,11 @@ module PatchELF
63
63
 
64
64
  def patch_requests
65
65
  @options[:set].each do |sym, val|
66
- patcher.__send__("#{sym}=".to_sym, val)
66
+ patcher.__send__(:"#{sym}=", val)
67
67
  end
68
68
 
69
69
  @options[:needed].each do |type, val|
70
- patcher.__send__("#{type}_needed".to_sym, *val)
70
+ patcher.__send__(:"#{type}_needed", *val)
71
71
  end
72
72
  end
73
73
 
@@ -2,5 +2,5 @@
2
2
 
3
3
  module PatchELF
4
4
  # Current gem version.
5
- VERSION = '1.4.0'.freeze
5
+ VERSION = '1.5.0'.freeze
6
6
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: patchelf
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.0
4
+ version: 1.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - david942j
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-11-04 00:00:00.000000000 Z
11
+ date: 2024-02-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: elftools
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: '1.2'
19
+ version: '1.3'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - ">="
25
25
  - !ruby/object:Gem::Version
26
- version: '1.2'
26
+ version: '1.3'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rake
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -70,22 +70,16 @@ dependencies:
70
70
  name: simplecov
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - "~>"
74
- - !ruby/object:Gem::Version
75
- version: '0.17'
76
- - - "<"
73
+ - - ">="
77
74
  - !ruby/object:Gem::Version
78
- version: '0.18'
75
+ version: '0.22'
79
76
  type: :development
80
77
  prerelease: false
81
78
  version_requirements: !ruby/object:Gem::Requirement
82
79
  requirements:
83
- - - "~>"
84
- - !ruby/object:Gem::Version
85
- version: '0.17'
86
- - - "<"
80
+ - - ">="
87
81
  - !ruby/object:Gem::Version
88
- version: '0.18'
82
+ version: '0.22'
89
83
  - !ruby/object:Gem::Dependency
90
84
  name: tty-platform
91
85
  requirement: !ruby/object:Gem::Requirement
@@ -149,14 +143,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
149
143
  requirements:
150
144
  - - ">="
151
145
  - !ruby/object:Gem::Version
152
- version: '2.6'
146
+ version: '3.1'
153
147
  required_rubygems_version: !ruby/object:Gem::Requirement
154
148
  requirements:
155
149
  - - ">="
156
150
  - !ruby/object:Gem::Version
157
151
  version: '0'
158
152
  requirements: []
159
- rubygems_version: 3.1.6
153
+ rubygems_version: 3.5.3
160
154
  signing_key:
161
155
  specification_version: 4
162
156
  summary: patchelf