Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
chromebrew
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
chromebrew
Commits
dda47947
Commit
dda47947
authored
Feb 24, 2019
by
Ed Reel
Committed by
Chris Thurber
Feb 24, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update rust from 1.23.0 to 1.32.0 (#3192)
Convert file operations to use FileUtils Add pre-built binaries
parent
06dae0ca
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
27 deletions
+25
-27
packages/rust.rb
packages/rust.rb
+25
-27
No files found.
packages/rust.rb
View file @
dda47947
...
@@ -3,45 +3,43 @@ require 'package'
...
@@ -3,45 +3,43 @@ require 'package'
class
Rust
<
Package
class
Rust
<
Package
description
'Rust is a systems programming language that runs blazingly fast, prevents segfaults, and guarantees thread safety.'
description
'Rust is a systems programming language that runs blazingly fast, prevents segfaults, and guarantees thread safety.'
homepage
'https://www.rust-lang.org/'
homepage
'https://www.rust-lang.org/'
version
'1.
23
.0'
version
'1.
32
.0'
source_url
'https://raw.githubusercontent.com/rust-lang/rust/1.
23
.0/RELEASES.md'
source_url
'https://raw.githubusercontent.com/rust-lang/rust/1.
32
.0/RELEASES.md'
source_sha256
'
05a4f35bad7643aea094066815cf856009b115170086bbd916cfb0ee9a31f54e
'
source_sha256
'
df6b99927285143d5296c6c9b5bf4211dae7c3170624e410a1b708935dd90314
'
binary_url
({
binary_url
({
aarch64:
'https://dl.bintray.com/chromebrew/chromebrew/rust-1.23.0-chromeos-armv7l.tar.xz'
,
aarch64:
'https://dl.bintray.com/chromebrew/chromebrew/rust-1.32.0-chromeos-armv7l.tar.xz'
,
armv7l:
'https://dl.bintray.com/chromebrew/chromebrew/rust-1.23.0-chromeos-armv7l.tar.xz'
,
armv7l:
'https://dl.bintray.com/chromebrew/chromebrew/rust-1.32.0-chromeos-armv7l.tar.xz'
,
i686:
'https://dl.bintray.com/chromebrew/chromebrew/rust-1.23.0-chromeos-i686.tar.xz'
,
x86_64:
'https://dl.bintray.com/chromebrew/chromebrew/rust-1.32.0-chromeos-x86_64.tar.xz'
,
x86_64:
'https://dl.bintray.com/chromebrew/chromebrew/rust-1.23.0-chromeos-x86_64.tar.xz'
,
})
})
binary_sha256
({
binary_sha256
({
aarch64:
'a68c57e384a5434fec9c210c015e6acd9e22eaac938ed6e1e8afd6e38d2675df'
,
aarch64:
'7a235ab8da40dc9dd5fb3db6cf8fd04744ec20b7c3eb68cfd39ea32722cf5732'
,
armv7l:
'a68c57e384a5434fec9c210c015e6acd9e22eaac938ed6e1e8afd6e38d2675df'
,
armv7l:
'7a235ab8da40dc9dd5fb3db6cf8fd04744ec20b7c3eb68cfd39ea32722cf5732'
,
i686:
'932c881bdf3d726ae9d8782dfcabe42acbc3142edce6a08e558f0c2e4390d478'
,
x86_64:
'cd235a8998415b5456a709158188294296fe47f3ae147d033537046d8a716245'
,
x86_64:
'f6c0ab056802e0d82a8e87664b8a3af8f536a2122e064596a795189bd73bed20'
,
})
})
def
self
.
install
def
self
.
install
if
ARCH
==
'armv7l'
if
ARCH
==
'armv7l'
default_host
=
"armv7-unknown-linux-gnueabihf"
default_host
=
'armv7-unknown-linux-gnueabihf'
else
else
default_host
=
"
#{
ARCH
}
-unknown-linux-gnu"
default_host
=
ARCH
+
'-unknown-linux-gnu'
end
end
system
"curl -Ls https://sh.rustup.rs -o rust.sh"
system
'curl -Ls https://sh.rustup.rs -o rust.sh'
abort
'Checksum mismatch. :/ Try again.'
.
lightred
unless
Digest
::
SHA256
.
hexdigest
(
File
.
read
(
'rust.sh'
)
)
==
'40328ad8fa5cfc15cdb0446bb812a4bba4c22b5aee195cfb8d64b8ef1de5879c'
system
"sed -i 's,
\$
(mktemp -d 2>/dev/null || ensure mktemp -d -t rustup),
#{
CREW_DEST_DIR
}
,' rust.sh"
system
"sed -i 's,
\$
(mktemp -d 2>/dev/null || ensure mktemp -d -t rustup),
#{
CREW_DEST_DIR
}
,' rust.sh"
system
"bash rust.sh -y --no-modify-path --default-host
#{
default_host
}
--default-toolchain stable"
FileUtils
.
rm_rf
(
HOME
+
'/.cargo'
)
system
"mkdir -p
#{
CREW_DEST_DIR
}
/$HOME"
FileUtils
.
rm_rf
(
HOME
+
'/.rustup'
)
system
"mkdir -p
#{
CREW_DEST_PREFIX
}
/bin"
system
"bash ./rust.sh -y --no-modify-path --default-host
#{
default_host
}
--default-toolchain stable"
system
"mkdir -p
#{
CREW_DEST_PREFIX
}
/share/cargo"
FileUtils
.
mkdir_p
(
CREW_DEST_HOME
)
system
"mkdir -p
#{
CREW_DEST_PREFIX
}
/share/rustup"
FileUtils
.
mkdir_p
(
CREW_DEST_PREFIX
+
'/bin'
)
system
"cp -r ~/.cargo/.
#{
CREW_DEST_PREFIX
}
/share/cargo"
FileUtils
.
mkdir_p
(
CREW_DEST_PREFIX
+
'/share/cargo'
)
system
"cp -r ~/.rustup/.
#{
CREW_DEST_PREFIX
}
/share/rustup"
FileUtils
.
mkdir_p
(
CREW_DEST_PREFIX
+
'/share/rustup'
)
FileUtils
.
cd
(
"
#{
CREW_DEST_PREFIX
}
/share/cargo/bin"
)
do
FileUtils
.
cp_r
(
HOME
+
'/.cargo/.'
,
CREW_DEST_PREFIX
+
'/share/cargo'
)
FileUtils
.
cp_r
(
HOME
+
'/.rustup/.'
,
CREW_DEST_PREFIX
+
'/share/rustup'
)
FileUtils
.
cd
(
CREW_DEST_PREFIX
+
'/share/cargo/bin'
)
do
system
"find . -type f -exec ln -s
#{
CREW_PREFIX
}
/share/cargo/bin/{}
#{
CREW_DEST_PREFIX
}
/bin
\\
;"
system
"find . -type f -exec ln -s
#{
CREW_PREFIX
}
/share/cargo/bin/{}
#{
CREW_DEST_PREFIX
}
/bin
\\
;"
end
end
system
"rm -rf ~/.cargo ~/.rustup"
FileUtils
.
ln_s
(
CREW_PREFIX
+
'/share/cargo'
,
CREW_DEST_HOME
+
'/.cargo'
)
system
"ln -s
#{
CREW_PREFIX
}
/share/cargo $HOME/.cargo"
FileUtils
.
ln_s
(
CREW_PREFIX
+
'/share/rustup'
,
CREW_DEST_HOME
+
'/.rustup'
)
system
"ln -s
#{
CREW_PREFIX
}
/share/rustup $HOME/.rustup"
system
"ln -s
#{
CREW_PREFIX
}
/share/cargo
#{
CREW_DEST_DIR
}
/$HOME/.cargo"
system
"ln -s
#{
CREW_PREFIX
}
/share/rustup
#{
CREW_DEST_DIR
}
/$HOME/.rustup"
end
end
end
end
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment