mirror of
https://github.com/chromebrew/chromebrew.git
synced 2026-01-10 07:57:59 -05:00
Just some package cleanups... (#11885)
* Package cleanups. Signed-off-by: Satadru Pramanik <satadru@gmail.com> * lint Signed-off-by: Satadru Pramanik <satadru@gmail.com> * Fix rust package, and rebuild sudo_rs. Signed-off-by: Satadru Pramanik <satadru@gmail.com> --------- Signed-off-by: Satadru Pramanik <satadru@gmail.com>
This commit is contained in:
committed by
GitHub
parent
f90106a0f3
commit
58b55ccc69
@@ -118,7 +118,7 @@ class Glibc_standalone < Package
|
||||
end
|
||||
|
||||
def self.postinstall
|
||||
puts "Please immediately run 'source ~/.bashrc && crew upgrade'".lightgreen
|
||||
puts "Please immediately run: 'source ~/.bashrc && crew upgrade'".lightgreen
|
||||
# update search cache for ld.so
|
||||
system "source ~/.bashrc && LD_AUDIT= #{CREW_PREFIX}/bin/ldconfig", %i[out err] => File::NULL
|
||||
end
|
||||
|
||||
@@ -3,7 +3,7 @@ require 'package'
|
||||
class Rust < Package
|
||||
description 'Rust is a systems programming language that runs blazingly fast, prevents segfaults, and guarantees thread safety.'
|
||||
homepage 'https://www.rust-lang.org/'
|
||||
version '1.86.0-4'
|
||||
version '1.86.0-5'
|
||||
license 'Apache-2.0 and MIT'
|
||||
compatibility 'all'
|
||||
source_url 'https://github.com/rust-lang/rustup.git'
|
||||
@@ -11,10 +11,10 @@ class Rust < Package
|
||||
binary_compression 'tar.zst'
|
||||
|
||||
binary_sha256({
|
||||
aarch64: 'd2a9dd259f5f26327b436c11f841c90f3fa4997eb758df755bc0af89cc1ec571',
|
||||
armv7l: 'd2a9dd259f5f26327b436c11f841c90f3fa4997eb758df755bc0af89cc1ec571',
|
||||
i686: 'ae70f3782af4be1f2088395eef36f935bc450e09edcdc2dc429764139b7f7f61',
|
||||
x86_64: '736baec0e802fef703a9bb43fafaab5c05464d539ebfdaf0150097f1b3ce0b18'
|
||||
aarch64: 'd833484999d92e034c83460cd5079c195cfdb4d27bd81d2c4f5436893227dfb0',
|
||||
armv7l: 'd833484999d92e034c83460cd5079c195cfdb4d27bd81d2c4f5436893227dfb0',
|
||||
i686: '3360be0df39866d180f949f461a93eb752f1f870d1f64d732e4fb1423e873bba',
|
||||
x86_64: 'e937243be9789c83635a244441fb8625eb48c1ed00396472c4467b427406f3f7'
|
||||
})
|
||||
|
||||
depends_on 'gcc_lib' # R
|
||||
@@ -30,7 +30,7 @@ class Rust < Package
|
||||
ENV['RUST_BACKTRACE'] = 'full'
|
||||
ENV['CARGO_HOME'] = "#{CREW_DEST_PREFIX}/share/cargo"
|
||||
ENV['RUSTUP_HOME'] = "#{CREW_DEST_PREFIX}/share/rustup"
|
||||
ENV['RUSTFLAGS'] = "-Cdebuginfo=0 -Copt-level=3 -Clink-arg=-fuse-ld=mold -Clink-arg=-Wl,--dynamic-linker,#{CREW_GLIBC_INTERPRETER} -Clink-arg=-Wl,-rpath,#{CREW_GLIBC_INTERPRETER}:#{CREW_LIB_PREFIX} -Clink-arg=-L#{CREW_GLIBC_PREFIX} -Clink-arg=-L#{CREW_LIB_PREFIX}"
|
||||
ENV['RUSTFLAGS'] = "-Cdebuginfo=0 -Copt-level=3 -Clink-arg=-fuse-ld=mold -Clink-arg=-Wl,--dynamic-linker,#{CREW_GLIBC_INTERPRETER} -Clink-arg=-Wl,-rpath,#{CREW_GLIBC_PREFIX}:#{CREW_LIB_PREFIX} -Clink-arg=-L#{CREW_GLIBC_PREFIX} -Clink-arg=-L#{CREW_LIB_PREFIX}"
|
||||
|
||||
ENV['RUSTUP_TOOLCHAIN'] = 'stable'
|
||||
default_host = %w[aarch64 armv7l].include?(ARCH) ? 'armv7-unknown-linux-gnueabihf' : "#{ARCH}-unknown-linux-gnu"
|
||||
|
||||
@@ -6,18 +6,18 @@ require 'buildsystems/rust'
|
||||
class Sudo_rs < RUST
|
||||
description 'A safety oriented and memory safe implementation of sudo and su written in Rust.'
|
||||
homepage 'https://github.com/trifectatechfoundation/sudo-rs'
|
||||
version '0.2.6'
|
||||
version '0.2.6-1'
|
||||
license 'Apache-2.0 AND MIT'
|
||||
compatibility 'all'
|
||||
source_url 'https://github.com/trifectatechfoundation/sudo-rs.git'
|
||||
git_hashtag "v#{version}"
|
||||
git_hashtag "v#{version.split('-').first}"
|
||||
binary_compression 'tar.zst'
|
||||
|
||||
binary_sha256({
|
||||
aarch64: 'aa5e2649728724c2d6e39e4b858dfec270487f85bb2ebb337308c5e436eef7b3',
|
||||
armv7l: 'aa5e2649728724c2d6e39e4b858dfec270487f85bb2ebb337308c5e436eef7b3',
|
||||
i686: '83786ea5d7aa47fdbeba0a93e5a74a5a6ec0025723889ddfe4931e84799ee764',
|
||||
x86_64: '1fd7bfcdaf161fd7e22830ef3143a9c6667340b7788311f04f03f0c172927587'
|
||||
aarch64: 'c5c1abf2f86fc0db8d677b5b1c945e894ce6fddb8b31fee0e785820cc95fc891',
|
||||
armv7l: 'c5c1abf2f86fc0db8d677b5b1c945e894ce6fddb8b31fee0e785820cc95fc891',
|
||||
i686: 'a99cb6e34734f4d07b2c6e03d16992187bc9df667e2b9d22dbf5e4e6a523c1b8',
|
||||
x86_64: '69d3b5706a2fb442fc34b9450091919ef93e7ff17beea9286c1f3e5191234af9'
|
||||
})
|
||||
|
||||
depends_on 'gcc_lib' # R
|
||||
@@ -26,14 +26,11 @@ class Sudo_rs < RUST
|
||||
conflicts_ok # su conflict with util_linux
|
||||
|
||||
def self.postinstall
|
||||
unless CREW_IN_CONTAINER
|
||||
puts 'Installation of sudo_rs will fail unless in the Chromebrew container.'
|
||||
return
|
||||
end
|
||||
puts 'Installation of sudo_rs will fail unless in the Chromebrew container or crew_sudo has been installed.'.orange unless CREW_IN_CONTAINER
|
||||
|
||||
%w[su sudo visudo].each do |bin|
|
||||
system "/usr/bin/sudo chown root:root #{CREW_PREFIX}/bin/#{bin}"
|
||||
system "/usr/bin/sudo chmod 4755 #{CREW_PREFIX}/bin/#{bin}"
|
||||
system "/usr/bin/sudo chown root:root #{CREW_PREFIX}/bin/#{bin}", exception: false
|
||||
system "/usr/bin/sudo chmod 4755 #{CREW_PREFIX}/bin/#{bin}", exception: false
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user