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
7b411097
Commit
7b411097
authored
Jun 28, 2017
by
lyxell
Committed by
GitHub
Jun 28, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #817 from jam7/refactor/sha256
Change crew to support both sha1 and sha256.
parents
e7527df8
8b816183
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
6 deletions
+21
-6
crew
crew
+6
-1
lib/package.rb
lib/package.rb
+1
-1
packages/compressdoc.rb
packages/compressdoc.rb
+14
-4
No files found.
crew
View file @
7b411097
...
...
@@ -363,12 +363,16 @@ def download
filename
=
File
.
basename
(
uri
.
path
)
if
source
sha1sum
=
@
pkg
.
source_sha1
sha256sum
=
@
pkg
.
source_sha256
else
sha1sum
=
@
pkg
.
binary_sha1
[@
device
[:
architecture
]]
sha256sum
=
@
pkg
.
binary_sha256
[@
device
[:
architecture
]]
end
Dir
.
chdir
CREW_BREW_DIR
do
system
(
'wget'
,
'--continue'
,
'--no-check-certificate'
,
url
,
'-O'
,
filename
)
abort
'Checksum mismatch. :/ Try again.'
.
lightred
unless
Digest
::
SHA1
.
hexdigest
(
File
.
read
(
"./#{filename}"
)
)
==
sha1sum
abort
'Checksum mismatch. :/ Try again.'
.
lightred
unless
Digest
::
SHA1
.
hexdigest
(
File
.
read
(
"./#{filename}"
)
)
==
sha1sum
or
Digest
::
SHA256
.
hexdigest
(
File
.
read
(
"./#{filename}"
)
)
==
sha256sum
end
puts
"Archive downloaded"
.
lightgreen
return
{
source
:
source
,
filename
:
filename
}
...
...
@@ -658,6 +662,7 @@ def archive_package (pwd)
end
Dir
.
chdir
pwd
do
system
"sha1sum #{pkg_name} > #{pkg_name}.sha1"
system
"sha256sum #{pkg_name} > #{pkg_name}.sha256"
end
puts
"#{pkg_name} is built!"
.
lightgreen
end
...
...
lib/package.rb
View file @
7b411097
require
'package_helpers'
class
Package
property
:description
,
:homepage
,
:version
,
:binary_url
,
:binary_sha1
,
:
source_url
,
:source_sha1
,
:is_fake
property
:description
,
:homepage
,
:version
,
:binary_url
,
:binary_sha1
,
:
binary_sha256
,
:source_url
,
:source_sha1
,
:source_sha256
,
:is_fake
class
<<
self
attr_reader
:is_fake
...
...
packages/compressdoc.rb
View file @
7b411097
...
...
@@ -4,10 +4,20 @@ class Compressdoc < Package
description
'Compress (with bzip2 or gzip) all man pages in a hierarchy and update symlinks'
homepage
'https://github.com/ojab/BLFS/blob/master/auxfiles/compressdoc'
version
'9b2b12'
source_url
'https://github.com/ojab/BLFS/archive/9b2b12c0d809e287e1ea3fa4790a73a71feffbe4.zip'
source_sha1
'dd55e750128972ffd1022808b1b26cff2de242b1'
depends_on
'unzip'
source_url
'https://github.com/ojab/BLFS/archive/9b2b12c0d809e287e1ea3fa4790a73a71feffbe4.tar.gz'
source_sha256
'6ebe4a9bbef5d0e84a36e56ac6fb1f0a2cfa86cb00c49628a0d3151d37f5d2f1'
binary_url
({
aarch64:
'https://github.com/jam7/chromebrew/releases/download/binaries/compressdoc-9b2b12-chromeos-x86_64.tar.xz'
,
armv7l:
'https://github.com/jam7/chromebrew/releases/download/binaries/compressdoc-9b2b12-chromeos-x86_64.tar.xz'
,
i686:
'https://github.com/jam7/chromebrew/releases/download/binaries/compressdoc-9b2b12-chromeos-x86_64.tar.xz'
,
x86_64:
'https://github.com/jam7/chromebrew/releases/download/binaries/compressdoc-9b2b12-chromeos-x86_64.tar.xz'
,
})
binary_sha256
({
aarch64:
'4743bfb71bf851cb659dce71465e034fae19250e72f97aa7a50d6d8298f03347'
,
armv7l:
'4743bfb71bf851cb659dce71465e034fae19250e72f97aa7a50d6d8298f03347'
,
i686:
'4743bfb71bf851cb659dce71465e034fae19250e72f97aa7a50d6d8298f03347'
,
x86_64:
'4743bfb71bf851cb659dce71465e034fae19250e72f97aa7a50d6d8298f03347'
,
})
def
self
.
install
system
"chmod +x auxfiles/compressdoc"
...
...
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