install fixups (#10293)

* install fixups

Signed-off-by: Satadru Pramanik <satadru@gmail.com>

* installer workaround

Signed-off-by: Satadru Pramanik <satadru@gmail.com>

* add crew_sudo binaries

Signed-off-by: Satadru Pramanik <satadru@gmail.com>

* cleanup install.sh

Signed-off-by: Satadru Pramanik <satadru@gmail.com>

* update crew_sudo package

Signed-off-by: Satadru Pramanik <satadru@gmail.com>

* suggested changes

Signed-off-by: Satadru Pramanik <satadru@gmail.com>

---------

Signed-off-by: Satadru Pramanik <satadru@gmail.com>
This commit is contained in:
Satadru Pramanik, DO, MPH, MEng
2024-08-10 12:27:21 -04:00
committed by GitHub
parent 20880057b1
commit 86a5701497
5 changed files with 50 additions and 5 deletions

View File

@@ -328,7 +328,11 @@ echo_info "\nRunning Bootstrap package postinstall scripts...\n"
# Due to a bug in crew where it accepts spaces in package files names rather than
# splitting strings at spaces, we cannot quote ${BOOTSTRAP_PACKAGES}.
# shellcheck disable=SC2086
crew postinstall ${BOOTSTRAP_PACKAGES}
for i in ${BOOTSTRAP_PACKAGES}
do
echo_info "Doing postinstall for $i"
crew postinstall $i || echo_error "Postinstall for $i failed."
done
if ! "${CREW_PREFIX}"/bin/git version &> /dev/null; then
echo_error "\nGit is broken on your system, and crew update will not work properly."

View File

@@ -0,0 +1,17 @@
/usr/local/bin/crew-sudo
/usr/local/bin/sudo
/usr/local/etc/bash.d/crew_sudo
/usr/local/etc/env.d/crew_sudo
/usr/local/lib/crew-sudo/LICENSE
/usr/local/lib/crew-sudo/README.md
/usr/local/lib/crew-sudo/autocomplete/crew-sudo.sh
/usr/local/lib/crew-sudo/autostart/crew-sudo.conf
/usr/local/lib/crew-sudo/autostart/crew-sudo.sh
/usr/local/lib/crew-sudo/component/client.rb
/usr/local/lib/crew-sudo/component/daemon.rb
/usr/local/lib/crew-sudo/crew-sudo
/usr/local/lib/crew-sudo/images/how-it-works.svg
/usr/local/lib/crew-sudo/install.sh
/usr/local/lib/crew-sudo/lib/const.rb
/usr/local/lib/crew-sudo/lib/function.rb
/usr/local/lib/crew-sudo/lib/pty_helper.rb

View File

@@ -0,0 +1,17 @@
/usr/local/bin/crew-sudo
/usr/local/bin/sudo
/usr/local/etc/bash.d/crew_sudo
/usr/local/etc/env.d/crew_sudo
/usr/local/lib/crew-sudo/LICENSE
/usr/local/lib/crew-sudo/README.md
/usr/local/lib/crew-sudo/autocomplete/crew-sudo.sh
/usr/local/lib/crew-sudo/autostart/crew-sudo.conf
/usr/local/lib/crew-sudo/autostart/crew-sudo.sh
/usr/local/lib/crew-sudo/component/client.rb
/usr/local/lib/crew-sudo/component/daemon.rb
/usr/local/lib/crew-sudo/crew-sudo
/usr/local/lib/crew-sudo/images/how-it-works.svg
/usr/local/lib/crew-sudo/install.sh
/usr/local/lib/crew-sudo/lib/const.rb
/usr/local/lib/crew-sudo/lib/function.rb
/usr/local/lib/crew-sudo/lib/pty_helper.rb

View File

@@ -5,15 +5,20 @@ class Crew_sudo < Package
homepage 'https://github.com/chromebrew/crew-sudo'
version '1.1'
license 'GPL-3'
compatibility 'all'
compatibility 'x86_64 aarch64 armv7l'
source_url 'https://github.com/chromebrew/crew-sudo.git'
git_hashtag "v#{@version}"
binary_compression 'tar.zst'
no_compile_needed
binary_sha256({
aarch64: '978c7fad9ecd7f1e3917843f94b709e2b15b62a4dea0327375eda17a75e38ecc',
armv7l: '978c7fad9ecd7f1e3917843f94b709e2b15b62a4dea0327375eda17a75e38ecc',
x86_64: '486cc1227bed448edfeb828f78c3776290a5a553fbcffb6e76d4df87c1ffc4d6'
})
def self.install
system({ 'CREW_DEST_PREFIX' => CREW_DEST_PREFIX }, './install.sh')
FileUtils.rm_rf File.join(CREW_DEST_PREFIX, 'lib/crew-sudo/.git')
end
def self.postinstall

View File

@@ -77,7 +77,9 @@ class Glibc_lib237 < Package
if File.file?(File.join(CREW_LIB_PREFIX, 'libC.so.6'))
Dir.chdir(CREW_LIB_PREFIX) do
libc_patch_libraries.each do |lib|
Kernel.system "patchelf --add-needed libC.so.6 #{lib}" and Kernel.system "patchelf --remove-needed libc.so.6 #{lib}"
FileUtils.cp lib, "#{lib}.tmp"
Kernel.system "patchelf --add-needed libC.so.6 #{lib}.tmp" and Kernel.system "patchelf --remove-needed libc.so.6 #{lib}.tmp"
FileUtils.mv "#{lib}.tmp", lib
puts "#{lib} patched for use with Chromebrew's glibc.".lightgreen
end
end