Update lz4, add force option for downloader checksum, let crew try to use zstd to extract downloads. (#10277)

* Update lz4, add force option for downloader checksum.

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

* update lz4 package

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

* Add lz4 to essential packages

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

* updates

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-08 15:32:42 -04:00
committed by GitHub
parent e08c731038
commit d84b4066f9
9 changed files with 59 additions and 46 deletions

View File

@@ -600,7 +600,11 @@ def unpack(meta)
system 'unzip', (CREW_VERBOSE ? '-v' : '-qq'), '-d', @extract_dir, meta[:filename], exception: true
when /\.(tar(\.(gz|bz2|xz|lzma|lz))?|tgz|tbz|txz|tpxz)$/i
puts "Unpacking archive using 'tar', this may take a while..."
system 'tar', "-x#{@verbose}f", meta[:filename], '-C', @extract_dir, exception: true
if Kernel.system('zstd --help 2>/dev/null| grep -q lzma', %i[out err] => File::NULL)
system 'tar', '-Izstd', "-x#{@verbose}f", meta[:filename], '-C', @extract_dir, exception: true
else
system 'tar', "-x#{@verbose}f", meta[:filename], '-C', @extract_dir, exception: true
end
when /\.tar\.zst$/i
puts "Unpacking archive using 'tar', this may take a while..."
system 'tar', '-Izstd', "-x#{@verbose}f", meta[:filename], '-C', @extract_dir, exception: true

View File

@@ -2,7 +2,7 @@
# Defines common constants used in different parts of crew
require 'etc'
CREW_VERSION = '1.49.10'
CREW_VERSION = '1.49.11'
# Kernel architecture.
KERN_ARCH = Etc.uname[:machine]
@@ -40,7 +40,7 @@ else
HOME = File.join(CREW_PREFIX, Dir.home)
end
CREW_ESSENTIAL_PACKAGES = %w[gcc_lib glibc gmp ruby zlib zstd]
CREW_ESSENTIAL_PACKAGES = %w[gcc_lib glibc gmp lz4 ruby zlib zstd]
CREW_IN_CONTAINER = File.exist?('/.dockerenv') || ENV.fetch('CREW_IN_CONTAINER', '0').eql?('1')

View File

@@ -59,16 +59,21 @@ def downloader(url, sha256sum, filename = File.basename(url), verbose = false)
calc_sha256sum = Digest::SHA256.hexdigest(File.read(filename))
unless (sha256sum =~ /^SKIP$/i) || (calc_sha256sum == sha256sum)
FileUtils.rm_f filename
if @opt_force
puts "Updating checksum for #{filename} from #{sha256sum} to #{calc_sha256sum} in #{CREW_LOCAL_REPO_ROOT}/packages/#{@pkg_name}.rb .".lightblue
system "sed -i 's/#{sha256sum}/#{calc_sha256sum}/' #{CREW_LOCAL_REPO_ROOT}/packages/#{@pkg_name}.rb"
else
FileUtils.rm_f filename
warn 'Checksum mismatch :/ Try again?'.lightred, <<~EOT
#{''}
Filename: #{filename.lightblue}
Expected checksum (SHA256): #{sha256sum.green}
Calculated checksum (SHA256): #{calc_sha256sum.red}
EOT
warn 'Checksum mismatch :/ Try again?'.lightred, <<~EOT
#{''}
Filename: #{filename.lightblue}
Expected checksum (SHA256): #{sha256sum.green}
Calculated checksum (SHA256): #{calc_sha256sum.red}
EOT
exit 2
exit 2
end
end
rescue StandardError => e
warn e.full_message

View File

@@ -3,15 +3,16 @@
/usr/local/bin/lz4cat
/usr/local/bin/unlz4
/usr/local/include/lz4.h
/usr/local/include/lz4file.h
/usr/local/include/lz4frame.h
/usr/local/include/lz4frame_static.h
/usr/local/include/lz4hc.h
/usr/local/lib/liblz4.a
/usr/local/lib/liblz4.so
/usr/local/lib/liblz4.so.1
/usr/local/lib/liblz4.so.1.9.4
/usr/local/lib/liblz4.so.1.10.0
/usr/local/lib/pkgconfig/liblz4.pc
/usr/local/share/man/man1/lz4.1.gz
/usr/local/share/man/man1/lz4c.1.gz
/usr/local/share/man/man1/lz4cat.1.gz
/usr/local/share/man/man1/unlz4.1.gz
/usr/local/share/man/man1/lz4.1.zst
/usr/local/share/man/man1/lz4c.1.zst
/usr/local/share/man/man1/lz4cat.1.zst
/usr/local/share/man/man1/unlz4.1.zst

View File

@@ -3,15 +3,16 @@
/usr/local/bin/lz4cat
/usr/local/bin/unlz4
/usr/local/include/lz4.h
/usr/local/include/lz4file.h
/usr/local/include/lz4frame.h
/usr/local/include/lz4frame_static.h
/usr/local/include/lz4hc.h
/usr/local/lib/liblz4.a
/usr/local/lib/liblz4.so
/usr/local/lib/liblz4.so.1
/usr/local/lib/liblz4.so.1.9.4
/usr/local/lib/liblz4.so.1.10.0
/usr/local/lib/pkgconfig/liblz4.pc
/usr/local/share/man/man1/lz4.1.gz
/usr/local/share/man/man1/lz4c.1.gz
/usr/local/share/man/man1/lz4cat.1.gz
/usr/local/share/man/man1/unlz4.1.gz
/usr/local/share/man/man1/lz4.1.zst
/usr/local/share/man/man1/lz4c.1.zst
/usr/local/share/man/man1/lz4cat.1.zst
/usr/local/share/man/man1/unlz4.1.zst

View File

@@ -1,11 +1,11 @@
/usr/local/bin/virtualenv
/usr/local/lib/python3.12/site-packages/virtualenv-20.25.0.dist-info/INSTALLER
/usr/local/lib/python3.12/site-packages/virtualenv-20.25.0.dist-info/METADATA
/usr/local/lib/python3.12/site-packages/virtualenv-20.25.0.dist-info/RECORD
/usr/local/lib/python3.12/site-packages/virtualenv-20.25.0.dist-info/REQUESTED
/usr/local/lib/python3.12/site-packages/virtualenv-20.25.0.dist-info/WHEEL
/usr/local/lib/python3.12/site-packages/virtualenv-20.25.0.dist-info/entry_points.txt
/usr/local/lib/python3.12/site-packages/virtualenv-20.25.0.dist-info/licenses/LICENSE
/usr/local/lib/python3.12/site-packages/virtualenv-20.26.3.dist-info/INSTALLER
/usr/local/lib/python3.12/site-packages/virtualenv-20.26.3.dist-info/METADATA
/usr/local/lib/python3.12/site-packages/virtualenv-20.26.3.dist-info/RECORD
/usr/local/lib/python3.12/site-packages/virtualenv-20.26.3.dist-info/REQUESTED
/usr/local/lib/python3.12/site-packages/virtualenv-20.26.3.dist-info/WHEEL
/usr/local/lib/python3.12/site-packages/virtualenv-20.26.3.dist-info/entry_points.txt
/usr/local/lib/python3.12/site-packages/virtualenv-20.26.3.dist-info/licenses/LICENSE
/usr/local/lib/python3.12/site-packages/virtualenv/__init__.py
/usr/local/lib/python3.12/site-packages/virtualenv/__main__.py
/usr/local/lib/python3.12/site-packages/virtualenv/__pycache__/__init__.cpython-312.pyc
@@ -175,10 +175,12 @@
/usr/local/lib/python3.12/site-packages/virtualenv/seed/wheels/bundle.py
/usr/local/lib/python3.12/site-packages/virtualenv/seed/wheels/embed/__init__.py
/usr/local/lib/python3.12/site-packages/virtualenv/seed/wheels/embed/__pycache__/__init__.cpython-312.pyc
/usr/local/lib/python3.12/site-packages/virtualenv/seed/wheels/embed/pip-23.3.1-py3-none-any.whl
/usr/local/lib/python3.12/site-packages/virtualenv/seed/wheels/embed/pip-24.0-py3-none-any.whl
/usr/local/lib/python3.12/site-packages/virtualenv/seed/wheels/embed/pip-24.1-py3-none-any.whl
/usr/local/lib/python3.12/site-packages/virtualenv/seed/wheels/embed/setuptools-68.0.0-py3-none-any.whl
/usr/local/lib/python3.12/site-packages/virtualenv/seed/wheels/embed/setuptools-69.0.2-py3-none-any.whl
/usr/local/lib/python3.12/site-packages/virtualenv/seed/wheels/embed/setuptools-70.1.0-py3-none-any.whl
/usr/local/lib/python3.12/site-packages/virtualenv/seed/wheels/embed/wheel-0.42.0-py3-none-any.whl
/usr/local/lib/python3.12/site-packages/virtualenv/seed/wheels/embed/wheel-0.43.0-py3-none-any.whl
/usr/local/lib/python3.12/site-packages/virtualenv/seed/wheels/periodic_update.py
/usr/local/lib/python3.12/site-packages/virtualenv/seed/wheels/util.py
/usr/local/lib/python3.12/site-packages/virtualenv/util/__init__.py

View File

@@ -3,15 +3,16 @@
/usr/local/bin/lz4cat
/usr/local/bin/unlz4
/usr/local/include/lz4.h
/usr/local/include/lz4file.h
/usr/local/include/lz4frame.h
/usr/local/include/lz4frame_static.h
/usr/local/include/lz4hc.h
/usr/local/lib64/liblz4.a
/usr/local/lib64/liblz4.so
/usr/local/lib64/liblz4.so.1
/usr/local/lib64/liblz4.so.1.9.4
/usr/local/lib64/liblz4.so.1.10.0
/usr/local/lib64/pkgconfig/liblz4.pc
/usr/local/share/man/man1/lz4.1.gz
/usr/local/share/man/man1/lz4c.1.gz
/usr/local/share/man/man1/lz4cat.1.gz
/usr/local/share/man/man1/unlz4.1.gz
/usr/local/share/man/man1/lz4.1.zst
/usr/local/share/man/man1/lz4c.1.zst
/usr/local/share/man/man1/lz4cat.1.zst
/usr/local/share/man/man1/unlz4.1.zst

View File

@@ -3,22 +3,22 @@ require 'package'
class Lz4 < Package
description 'LZ4 is lossless compression algorithm, providing compression speed at 400 MB/s per core (0.16 Bytes/cycle).'
homepage 'https://lz4.org/'
version '1.9.4'
version '1.10.0'
license 'BSD-2 and GPL-2'
compatibility 'all'
source_url 'https://github.com/lz4/lz4/archive/v1.9.4.tar.gz'
source_sha256 '0b0e3aa07c8c063ddf40b082bdf7e37a1562bda40a0ff5272957f3e987e0e54b'
binary_compression 'tar.zst'
source_url 'https://github.com/lz4/lz4.git'
git_hashtag "v#{version}"
binary_compression 'tar.xz'
binary_sha256({
aarch64: '8248d98221d940f8a06a0c19562572b5128afe214b9eb83e4c0fc5240706c2e1',
armv7l: '8248d98221d940f8a06a0c19562572b5128afe214b9eb83e4c0fc5240706c2e1',
i686: 'ab796d7ebec72971369520ff7a7a87cbdf1c76cd04a2a095c2bf712e72741c5a',
x86_64: '76a2f4eccf84e78f32bbd2f8e6042f3ed4cda506ca74706fbbc4d60488b54a2a'
aarch64: '441620cf23567ee829c2c61e44c96f3230aa5df9780ef46708a16da3c1d13984',
armv7l: '441620cf23567ee829c2c61e44c96f3230aa5df9780ef46708a16da3c1d13984',
i686: 'c1ee1b29762fe352bb1fa588b5ae8ddc4589b45479bebe0723449258fabac7b2',
x86_64: '6e07a8d095f778015b2e30681f3d17e37bbd33b13c52f1ae2468e3f90a85cffd'
})
depends_on 'glibc' # R
no_patchelf
no_zstd
def self.build
system 'make', "PREFIX=#{CREW_PREFIX}"

View File

@@ -3,8 +3,7 @@ require 'buildsystems/pip'
class Py3_virtualenv < Pip
description 'Virtualenv is a Virtual Environment builder for Python.'
homepage 'https://virtualenv.pypa.io/'
@_ver = '20.8.1'
version "#{@_ver}-py3.12"
version '20.26.3-py3.12'
license 'MIT'
compatibility 'all'
source_url 'SKIP'