crew: Fix upx decompression algorithm (#11881)

* crew: Fix upx decompression algorithm

Signed-off-by: SupeChicken666 <me@supechicken666.dev>

* Bump version

Signed-off-by: SupeChicken666 <me@supechicken666.dev>

---------

Signed-off-by: SupeChicken666 <me@supechicken666.dev>
This commit is contained in:
SupeChicken666
2025-05-07 18:41:59 +08:00
committed by GitHub
parent 98d257e141
commit 349ef33529
2 changed files with 3 additions and 5 deletions

View File

@@ -900,13 +900,11 @@ def fix_interpreter_path(dir)
execfiles.each_line(chomp: true) do |execfiletopatch|
execfiletopatch = Dir.pwd + execfiletopatch.delete_prefix('.')
neededlibs = `patchelf --print-needed #{execfiletopatch}`
next if neededlibs.to_s.empty?
system "upx -qq -d #{execfiletopatch} 2> /dev/null"
puts "Running patchelf on #{execfiletopatch}".orange
system "patchelf --set-interpreter #{CREW_GLIBC_INTERPRETER} #{execfiletopatch} 2> /dev/null"
system "patchelf --remove-rpath #{execfiletopatch} 2> /dev/null"
system "patchelf --set-interpreter #{CREW_GLIBC_INTERPRETER} #{execfiletopatch} > /dev/null 2> /dev/null"
system "patchelf --remove-rpath #{execfiletopatch} > /dev/null 2> /dev/null"
end
end
end

View File

@@ -3,7 +3,7 @@
require 'etc'
OLD_CREW_VERSION ||= defined?(CREW_VERSION) ? CREW_VERSION : '1.0'
CREW_VERSION ||= '1.60.2' unless defined?(CREW_VERSION) && CREW_VERSION == OLD_CREW_VERSION
CREW_VERSION ||= '1.60.3' unless defined?(CREW_VERSION) && CREW_VERSION == OLD_CREW_VERSION
# Kernel architecture.
KERN_ARCH ||= Etc.uname[:machine]