Add libc version and chromeos milestone to container bash prompts (#10335)

* Use agree_to_remove in ruby_pry.rb.

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

* Add cmake options for build_relative_dir

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

* Adjust cmake buildsystems.

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

* Alphabetize properties in buildsystems/python.

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

* Add updated crew_profile_base.

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

* Add missing filelists, add glibc fallback to gcc packages.

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

* Add milestone to container git prompt.

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

* Use more heredocs for the git commands.

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

* Adjust git postinstall.

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

* Add binaries.

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

* Adjust unit test to do build test right after crew upgrade.

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

* lint

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-22 22:26:03 -04:00
committed by GitHub
parent e626eecde2
commit 66ca77930b
15 changed files with 4428 additions and 88 deletions

View File

@@ -248,40 +248,39 @@ end
def update
abort "'crew update' is used to update crew itself. Use 'crew upgrade <package1> [<package2> ...]' to update specific packages.".orange if @pkg_name
# update crew from git.
Dir.chdir(CREW_LIB_PATH) do
# Fix git checkout if .git is missing.
unless Dir.exist?(File.join(CREW_LIB_PATH, '.git'))
puts 'Fixing Chromebrew system git repo clone...'.orange
# Run git setup commands from install.sh
system(<<~GIT_REPAIR_COMMANDS, %i[out err] => File::NULL)
cd #{CREW_LIB_PATH}
# Make the git default branch error messages go away.
git config --global init.defaultBranch main
# Setup the dir with git information.
git init --ref-format=reftable
git remote add origin #{CREW_REPO}
# Help handle situations where GitHub is down.
git config --local http.lowSpeedLimit 1000
git config --local http.lowSpeedTime 5
# Checkout, overwriting local files.
git fetch --all
git checkout -f master
git reset --hard origin/#{CREW_BRANCH}
GIT_REPAIR_COMMANDS
end
system(<<~GIT_UPDATE_COMMANDS, exception: true)
cd #{CREW_LIB_PATH}
# Set sparse-checkout folders.
git sparse-checkout set packages manifest/#{ARCH} lib commands bin crew tests tools
git sparse-checkout reapply
git fetch #{CREW_REPO} #{CREW_BRANCH}
git reset --hard FETCH_HEAD
GIT_UPDATE_COMMANDS
system 'git-restore-mtime -sq 2>/dev/null', exception: true if File.file?("#{CREW_PREFIX}/bin/git-restore-mtime")
unless Dir.exist?(File.join(CREW_LIB_PATH, '.git'))
puts 'Fixing Chromebrew system git repo clone...'.orange
system(<<~GIT_REPAIR_COMMANDS, chdir: CREW_LIB_PATH, %i[out err] => File::NULL)
## Run the git setup commands used in install.sh.
# Make the git default branch error messages go away.
git config --global init.defaultBranch main
# Setup the dir with git information.
git init --ref-format=reftable
git remote add origin #{CREW_REPO}
# Help handle situations where GitHub is down.
git config --local http.lowSpeedLimit 1000
git config --local http.lowSpeedTime 5
# Checkout, overwriting local files.
git fetch --all
git checkout -f master
git reset --hard origin/#{CREW_BRANCH}
GIT_REPAIR_COMMANDS
end
system(<<~GIT_UPDATE_COMMANDS, chdir: CREW_LIB_PATH, exception: true)
## Update crew from git.
# Set sparse-checkout folders.
git sparse-checkout set packages manifest/#{ARCH} lib commands bin crew tests tools
git sparse-checkout reapply
git fetch #{CREW_REPO} #{CREW_BRANCH}
git reset --hard FETCH_HEAD
GIT_UPDATE_COMMANDS
system(<<~GIT_RESTORE_MTIME_COMMAND, chdir: CREW_LIB_PATH, exception: true) if File.file?("#{CREW_PREFIX}/bin/git-restore-mtime")
# Set the mtime on each file in git to the date the file was added,
# not to the date of the last git pull.
git-restore-mtime -sq 2>/dev/null
GIT_RESTORE_MTIME_COMMAND
if Time.now.to_i - @last_update_check > (CREW_UPDATE_CHECK_INTERVAL * 3600 * 24)
puts 'Updating RubyGems.'.orange
system 'gem update -N --system'
@@ -857,11 +856,6 @@ def prepare_package(destdir)
strip_dir destdir
# Patchelf currently disabled for security reasons
# See https://github.com/upx/upx/issues/655#issuecomment-1457434081
# Use patchelf to set need paths for all binaries.
# patchelf_set_need_paths destdir
# use upx on executables
shrink_dir destdir
end

View File

@@ -1,24 +1,31 @@
require 'package'
class CMake < Package
property :cmake_options, :pre_cmake_options, :cmake_build_extras, :cmake_install_extras
property :cmake_build_extras, :cmake_build_relative_dir, :cmake_install_extras, :cmake_options, :pre_cmake_options
attr_accessor :cmake_build_relative_dir
def initialize
super
@cmake_build_relative_dir = '.'
end
def self.build
puts "Additional cmake_options being used: #{@pre_cmake_options.nil? ? '<no pre_cmake_options>' : @pre_cmake_options} #{@cmake_options.nil? ? '<no cmake_options>' : @cmake_options}".orange
@crew_cmake_options = @no_lto ? CREW_CMAKE_FNO_LTO_OPTIONS : CREW_CMAKE_OPTIONS
@mold_linker_prefix_cmd = CREW_LINKER == 'mold' ? 'mold -run' : ''
system "#{@pre_cmake_options} #{@mold_linker_prefix_cmd} cmake -B builddir -G Ninja #{@crew_cmake_options} #{@cmake_options}"
system "#{CREW_NINJA} -C builddir"
system "#{@pre_cmake_options} #{@mold_linker_prefix_cmd} cmake -C #{@cmake_build_relative_dir} -B builddir -G Ninja #{@crew_cmake_options} #{@cmake_options}"
system "#{CREW_NINJA} -C #{@cmake_build_relative_dir}/builddir"
@cmake_build_extras&.call
end
def self.install
system "DESTDIR=#{CREW_DEST_DIR} #{CREW_NINJA} -C builddir install"
system "DESTDIR=#{CREW_DEST_DIR} #{CREW_NINJA} -C #{@cmake_build_relative_dir}/builddir install"
@cmake_install_extras&.call
end
def self.check
puts "Testing with #{CREW_NINJA} test.".orange if @run_tests
system "#{CREW_NINJA} -C builddir test" if @run_tests
system "#{CREW_NINJA} -C #{@cmake_build_relative_dir}/builddir test" if @run_tests
end
end

View File

@@ -1,7 +1,7 @@
require 'package'
class Python < Package
property :python_build_options, :python_install_options, :python_build_extras, :python_install_extras, :no_svem
property :no_svem, :python_build_extras, :python_build_options, :python_build_relative_dir, :python_install_extras, :python_install_options
attr_accessor :python_build_relative_dir

View File

@@ -2,7 +2,7 @@
# Defines common constants used in different parts of crew
require 'etc'
CREW_VERSION = '1.50.9'
CREW_VERSION = '1.51.0'
# Kernel architecture.
KERN_ARCH = Etc.uname[:machine]

View File

@@ -0,0 +1,60 @@
/usr/local/include/nlopt.h
/usr/local/include/nlopt.hpp
/usr/local/lib/cmake/nlopt/NLoptConfig.cmake
/usr/local/lib/cmake/nlopt/NLoptConfigVersion.cmake
/usr/local/lib/cmake/nlopt/NLoptLibraryDepends-release.cmake
/usr/local/lib/cmake/nlopt/NLoptLibraryDepends.cmake
/usr/local/lib/libnlopt.so
/usr/local/lib/libnlopt.so.0
/usr/local/lib/libnlopt.so.0.12.0
/usr/local/lib/octave/9.2.0/site/oct/armv7l-cros-linux-gnueabihf/nlopt_optimize.oct
/usr/local/lib/pkgconfig/nlopt.pc
/usr/local/share/man/man3/nlopt.3.zst
/usr/local/share/man/man3/nlopt_minimize.3.zst
/usr/local/share/man/man3/nlopt_minimize_constrained.3.zst
/usr/local/share/octave/9.2.0/site/m/NLOPT_AUGLAG.m
/usr/local/share/octave/9.2.0/site/m/NLOPT_AUGLAG_EQ.m
/usr/local/share/octave/9.2.0/site/m/NLOPT_GD_MLSL.m
/usr/local/share/octave/9.2.0/site/m/NLOPT_GD_MLSL_LDS.m
/usr/local/share/octave/9.2.0/site/m/NLOPT_GD_STOGO.m
/usr/local/share/octave/9.2.0/site/m/NLOPT_GD_STOGO_RAND.m
/usr/local/share/octave/9.2.0/site/m/NLOPT_GN_AGS.m
/usr/local/share/octave/9.2.0/site/m/NLOPT_GN_CRS2_LM.m
/usr/local/share/octave/9.2.0/site/m/NLOPT_GN_DIRECT.m
/usr/local/share/octave/9.2.0/site/m/NLOPT_GN_DIRECT_L.m
/usr/local/share/octave/9.2.0/site/m/NLOPT_GN_DIRECT_L_NOSCAL.m
/usr/local/share/octave/9.2.0/site/m/NLOPT_GN_DIRECT_L_RAND.m
/usr/local/share/octave/9.2.0/site/m/NLOPT_GN_DIRECT_L_RAND_NOSCAL.m
/usr/local/share/octave/9.2.0/site/m/NLOPT_GN_DIRECT_NOSCAL.m
/usr/local/share/octave/9.2.0/site/m/NLOPT_GN_ESCH.m
/usr/local/share/octave/9.2.0/site/m/NLOPT_GN_ISRES.m
/usr/local/share/octave/9.2.0/site/m/NLOPT_GN_MLSL.m
/usr/local/share/octave/9.2.0/site/m/NLOPT_GN_MLSL_LDS.m
/usr/local/share/octave/9.2.0/site/m/NLOPT_GN_ORIG_DIRECT.m
/usr/local/share/octave/9.2.0/site/m/NLOPT_GN_ORIG_DIRECT_L.m
/usr/local/share/octave/9.2.0/site/m/NLOPT_G_MLSL.m
/usr/local/share/octave/9.2.0/site/m/NLOPT_G_MLSL_LDS.m
/usr/local/share/octave/9.2.0/site/m/NLOPT_LD_AUGLAG.m
/usr/local/share/octave/9.2.0/site/m/NLOPT_LD_AUGLAG_EQ.m
/usr/local/share/octave/9.2.0/site/m/NLOPT_LD_CCSAQ.m
/usr/local/share/octave/9.2.0/site/m/NLOPT_LD_LBFGS.m
/usr/local/share/octave/9.2.0/site/m/NLOPT_LD_LBFGS_NOCEDAL.m
/usr/local/share/octave/9.2.0/site/m/NLOPT_LD_MMA.m
/usr/local/share/octave/9.2.0/site/m/NLOPT_LD_SLSQP.m
/usr/local/share/octave/9.2.0/site/m/NLOPT_LD_TNEWTON.m
/usr/local/share/octave/9.2.0/site/m/NLOPT_LD_TNEWTON_PRECOND.m
/usr/local/share/octave/9.2.0/site/m/NLOPT_LD_TNEWTON_PRECOND_RESTART.m
/usr/local/share/octave/9.2.0/site/m/NLOPT_LD_TNEWTON_RESTART.m
/usr/local/share/octave/9.2.0/site/m/NLOPT_LD_VAR1.m
/usr/local/share/octave/9.2.0/site/m/NLOPT_LD_VAR2.m
/usr/local/share/octave/9.2.0/site/m/NLOPT_LN_AUGLAG.m
/usr/local/share/octave/9.2.0/site/m/NLOPT_LN_AUGLAG_EQ.m
/usr/local/share/octave/9.2.0/site/m/NLOPT_LN_BOBYQA.m
/usr/local/share/octave/9.2.0/site/m/NLOPT_LN_COBYLA.m
/usr/local/share/octave/9.2.0/site/m/NLOPT_LN_NELDERMEAD.m
/usr/local/share/octave/9.2.0/site/m/NLOPT_LN_NEWUOA.m
/usr/local/share/octave/9.2.0/site/m/NLOPT_LN_NEWUOA_BOUND.m
/usr/local/share/octave/9.2.0/site/m/NLOPT_LN_PRAXIS.m
/usr/local/share/octave/9.2.0/site/m/NLOPT_LN_SBPLX.m
/usr/local/share/octave/9.2.0/site/m/nlopt_minimize.m
/usr/local/share/octave/9.2.0/site/m/nlopt_minimize_constrained.m

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,60 @@
/usr/local/include/nlopt.h
/usr/local/include/nlopt.hpp
/usr/local/lib64/cmake/nlopt/NLoptConfig.cmake
/usr/local/lib64/cmake/nlopt/NLoptConfigVersion.cmake
/usr/local/lib64/cmake/nlopt/NLoptLibraryDepends-release.cmake
/usr/local/lib64/cmake/nlopt/NLoptLibraryDepends.cmake
/usr/local/lib64/libnlopt.so
/usr/local/lib64/libnlopt.so.0
/usr/local/lib64/libnlopt.so.0.12.0
/usr/local/lib64/octave/9.2.0/site/oct/x86_64-cros-linux-gnu/nlopt_optimize.oct
/usr/local/lib64/pkgconfig/nlopt.pc
/usr/local/share/man/man3/nlopt.3.zst
/usr/local/share/man/man3/nlopt_minimize.3.zst
/usr/local/share/man/man3/nlopt_minimize_constrained.3.zst
/usr/local/share/octave/9.2.0/site/m/NLOPT_AUGLAG.m
/usr/local/share/octave/9.2.0/site/m/NLOPT_AUGLAG_EQ.m
/usr/local/share/octave/9.2.0/site/m/NLOPT_GD_MLSL.m
/usr/local/share/octave/9.2.0/site/m/NLOPT_GD_MLSL_LDS.m
/usr/local/share/octave/9.2.0/site/m/NLOPT_GD_STOGO.m
/usr/local/share/octave/9.2.0/site/m/NLOPT_GD_STOGO_RAND.m
/usr/local/share/octave/9.2.0/site/m/NLOPT_GN_AGS.m
/usr/local/share/octave/9.2.0/site/m/NLOPT_GN_CRS2_LM.m
/usr/local/share/octave/9.2.0/site/m/NLOPT_GN_DIRECT.m
/usr/local/share/octave/9.2.0/site/m/NLOPT_GN_DIRECT_L.m
/usr/local/share/octave/9.2.0/site/m/NLOPT_GN_DIRECT_L_NOSCAL.m
/usr/local/share/octave/9.2.0/site/m/NLOPT_GN_DIRECT_L_RAND.m
/usr/local/share/octave/9.2.0/site/m/NLOPT_GN_DIRECT_L_RAND_NOSCAL.m
/usr/local/share/octave/9.2.0/site/m/NLOPT_GN_DIRECT_NOSCAL.m
/usr/local/share/octave/9.2.0/site/m/NLOPT_GN_ESCH.m
/usr/local/share/octave/9.2.0/site/m/NLOPT_GN_ISRES.m
/usr/local/share/octave/9.2.0/site/m/NLOPT_GN_MLSL.m
/usr/local/share/octave/9.2.0/site/m/NLOPT_GN_MLSL_LDS.m
/usr/local/share/octave/9.2.0/site/m/NLOPT_GN_ORIG_DIRECT.m
/usr/local/share/octave/9.2.0/site/m/NLOPT_GN_ORIG_DIRECT_L.m
/usr/local/share/octave/9.2.0/site/m/NLOPT_G_MLSL.m
/usr/local/share/octave/9.2.0/site/m/NLOPT_G_MLSL_LDS.m
/usr/local/share/octave/9.2.0/site/m/NLOPT_LD_AUGLAG.m
/usr/local/share/octave/9.2.0/site/m/NLOPT_LD_AUGLAG_EQ.m
/usr/local/share/octave/9.2.0/site/m/NLOPT_LD_CCSAQ.m
/usr/local/share/octave/9.2.0/site/m/NLOPT_LD_LBFGS.m
/usr/local/share/octave/9.2.0/site/m/NLOPT_LD_LBFGS_NOCEDAL.m
/usr/local/share/octave/9.2.0/site/m/NLOPT_LD_MMA.m
/usr/local/share/octave/9.2.0/site/m/NLOPT_LD_SLSQP.m
/usr/local/share/octave/9.2.0/site/m/NLOPT_LD_TNEWTON.m
/usr/local/share/octave/9.2.0/site/m/NLOPT_LD_TNEWTON_PRECOND.m
/usr/local/share/octave/9.2.0/site/m/NLOPT_LD_TNEWTON_PRECOND_RESTART.m
/usr/local/share/octave/9.2.0/site/m/NLOPT_LD_TNEWTON_RESTART.m
/usr/local/share/octave/9.2.0/site/m/NLOPT_LD_VAR1.m
/usr/local/share/octave/9.2.0/site/m/NLOPT_LD_VAR2.m
/usr/local/share/octave/9.2.0/site/m/NLOPT_LN_AUGLAG.m
/usr/local/share/octave/9.2.0/site/m/NLOPT_LN_AUGLAG_EQ.m
/usr/local/share/octave/9.2.0/site/m/NLOPT_LN_BOBYQA.m
/usr/local/share/octave/9.2.0/site/m/NLOPT_LN_COBYLA.m
/usr/local/share/octave/9.2.0/site/m/NLOPT_LN_NELDERMEAD.m
/usr/local/share/octave/9.2.0/site/m/NLOPT_LN_NEWUOA.m
/usr/local/share/octave/9.2.0/site/m/NLOPT_LN_NEWUOA_BOUND.m
/usr/local/share/octave/9.2.0/site/m/NLOPT_LN_PRAXIS.m
/usr/local/share/octave/9.2.0/site/m/NLOPT_LN_SBPLX.m
/usr/local/share/octave/9.2.0/site/m/nlopt_minimize.m
/usr/local/share/octave/9.2.0/site/m/nlopt_minimize_constrained.m

View File

@@ -3,11 +3,11 @@ require 'package'
class Crew_profile_base < Package
description 'Crew-profile-base sets up Chromebrew\'s environment capabilities.'
homepage 'https://github.com/chromebrew/crew-profile-base'
version '0.0.21'
version '0.0.22'
license 'GPL-3+'
compatibility 'all'
source_url "https://github.com/chromebrew/crew-profile-base/archive/refs/tags/#{version}.tar.gz"
source_sha256 'd2f26488edc6f32ec7026f687c299fbfc2fbdd08bad093b4ae9598507f97959d'
source_sha256 'e3a1c2d8b4c532f46e18e0feccc10e51e8e693e1d996099a6d349a03370eac00'
no_compile_needed
print_source_bashrc

View File

@@ -3,14 +3,19 @@ require 'package'
class Gcc_build < Package
description 'The GNU Compiler Collection includes front ends for C, C++, Objective-C, Fortran, Ada, and Go.'
homepage 'https://www.gnu.org/software/gcc/'
version "14.2.0-glibc#{LIBC_VERSION}" # Do not use @_ver here, it will break the installer.
@gcc_libc_version = if %w[2.23 2.27 2.32 2.33 2.35 2.37].any? { |i| LIBC_VERSION.include? i }
LIBC_VERSION
else
ARCH.eql?('i686') ? '2.23' : '2.27'
end
version "14.2.0-glibc#{@gcc_libc_version}" # Do not use @_ver here, it will break the installer.
license 'GPL-3, LGPL-3, libgcc, FDL-1.2'
compatibility 'all'
source_url 'https://github.com/gcc-mirror/gcc.git'
git_hashtag "releases/gcc-#{version.split('-').first}"
binary_compression 'tar.zst'
case LIBC_VERSION
case @gcc_libc_version
when '2.23'
binary_sha256({
i686: '95b0aacd75c8ab2ba559b2992f0c7d1e13230cb22f1622cd282df6df3e53e7c0'
@@ -342,7 +347,7 @@ class Gcc_build < Package
def self.postinstall
# remove any previous gcc packages
@device = JSON.load_file("#{CREW_CONFIG_PATH}/device.json", symbolize_names: true)
@device = JSON.load_file(File.join(CREW_CONFIG_PATH, 'device.json'), symbolize_names: true).transform_values! { |val| val.is_a?(String) ? val.to_sym : val }
installed_gcc = @device[:installed_packages].select { |pkg| pkg[:name] =~ /^gcc\d+$/ }

View File

@@ -4,7 +4,12 @@ Package.load_package("#{__dir__}/gcc_build.rb")
class Gcc_dev < Package
description 'The GNU Compiler Collection: Everything (excepting libraries aside from libgccjit)'
homepage Gcc_build.homepage
version "14.2.0-glibc#{LIBC_VERSION}" # Do not use @_ver here, it will break the installer.
@gcc_libc_version = if %w[2.23 2.27 2.32 2.33 2.35 2.37].any? { |i| LIBC_VERSION.include? i }
LIBC_VERSION
else
ARCH.eql?('i686') ? '2.23' : '2.27'
end
version "14.2.0-glibc#{@gcc_libc_version}" # Do not use @_ver here, it will break the installer.
license Gcc_build.license
# When upgrading gcc_build, be sure to upgrade gcc_lib, gcc_dev, and libssp in tandem.
puts "#{self} version (#{version}) differs from gcc version #{Gcc_build.version}".orange if version.to_s != Gcc_build.version
@@ -12,7 +17,7 @@ class Gcc_dev < Package
source_url 'SKIP'
binary_compression 'tar.zst'
case LIBC_VERSION
case @gcc_libc_version
when '2.23'
binary_sha256({
i686: '77a2ba61cc2529d8dff15e03f10c736fb807f6ce1c112fea71d6050f5005d43a'

View File

@@ -4,7 +4,12 @@ Package.load_package("#{__dir__}/gcc_build.rb")
class Gcc_lib < Package
description 'GCC shared libs except libgccjit'
homepage Gcc_build.homepage
version "14.2.0-glibc#{LIBC_VERSION}" # Do not use @_ver here, it will break the installer.
@gcc_libc_version = if %w[2.23 2.27 2.32 2.33 2.35 2.37].any? { |i| LIBC_VERSION.include? i }
LIBC_VERSION
else
ARCH.eql?('i686') ? '2.23' : '2.27'
end
version "14.2.0-glibc#{@gcc_libc_version}" # Do not use @_ver here, it will break the installer.
license Gcc_build.license
# When upgrading gcc_build, be sure to upgrade gcc_lib, gcc_dev, and libssp in tandem.
puts "#{self} version (#{version}) differs from gcc version #{Gcc_build.version}".orange if version.to_s != Gcc_build.version
@@ -12,7 +17,7 @@ class Gcc_lib < Package
source_url 'SKIP'
binary_compression 'tar.zst'
case LIBC_VERSION
case @gcc_libc_version
when '2.23'
binary_sha256({
i686: '4f82296584a31339ea3d6212403cd844cab0e2c150878239c04211112be80181'

View File

@@ -1,20 +1,20 @@
require 'package'
require 'buildsystems/cmake'
class Git < Package
class Git < CMake
description 'Git is a free and open source distributed version control system designed to handle everything from small to very large projects with speed and efficiency.'
homepage 'https://git-scm.com/'
version '2.46.0' # Do not use @_ver here, it will break the installer.
version '2.46.0-1' # Do not use @_ver here, it will break the installer.
license 'GPL-2'
compatibility 'all'
source_url "https://mirrors.edge.kernel.org/pub/software/scm/git/git-#{version}.tar.xz"
source_url "https://mirrors.edge.kernel.org/pub/software/scm/git/git-#{version.split('-').first}.tar.xz"
source_sha256 '7f123462a28b7ca3ebe2607485f7168554c2b10dfc155c7ec46300666ac27f95'
binary_compression 'tar.zst'
binary_sha256({
aarch64: 'e8284efe6c433054d58c2c1a0e5a512c2a3a3020be0ce803e7007c32bebaf572',
armv7l: 'e8284efe6c433054d58c2c1a0e5a512c2a3a3020be0ce803e7007c32bebaf572',
i686: 'e1f3e6920899ffaab14b69504cfd67be1ab8df43b99702c3bf7a4355ad21cdfe',
x86_64: 'dc957c5b49a5880526248fe9c4a54d17ab158057802b85c17c6458cb78c68c66'
aarch64: 'a75eae1e96d4a9319e284afc682b7b68b50ec060e9ab518785df3c2a6ded5410',
armv7l: 'a75eae1e96d4a9319e284afc682b7b68b50ec060e9ab518785df3c2a6ded5410',
i686: '19e86f61ad78449fb1df678067ad38716430dd58767c953f2a3bac0cf632cc8a',
x86_64: 'fa26980dce128e72383fadbe3b0feedd6969e93f9cc1e9d461cc31ddf8ca9bcd'
})
depends_on 'ca_certificates' => :build
@@ -26,6 +26,8 @@ class Git < Package
depends_on 'zlib' # R
print_source_bashrc
cmake_build_relative_dir 'contrib/buildsystems'
cmake_options '-DUSE_VCPKG=FALSE'
def self.patch
# Patch to prevent error function conflict with libidn2
@@ -50,14 +52,7 @@ class Git < Package
system "sed -i 's,${CMAKE_INSTALL_PREFIX},\\\\$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX},g' contrib/buildsystems/CMakeLists.txt"
end
def self.build
system "mold -run cmake -B builddir \
#{CREW_CMAKE_OPTIONS} \
-DUSE_VCPKG=FALSE \
-Wdev \
-G Ninja \
contrib/buildsystems"
system "#{CREW_NINJA} -C builddir"
cmake_build_extras do
git_env = <<~EOF
GIT_PS1_SHOWDIRTYSTATE=yes
@@ -67,13 +62,18 @@ class Git < Package
GIT_PS1_DESCRIBE_STYLE=default
GIT_PS1_SHOWCOLORHINTS=yes
PS1='\\[\\033[1;34m\\]\\u@\\H \\[\\033[1;33m\\]\\w \\[\\033[1;31m\\]$(__git_ps1 "(%s)")\\[\\033[0m\\]\\$ '
# Add LIBC_VERSION and CHROMEOS_RELEASE_CHROME_MILESTONE set in
# crew_profile_base to prompt if in a container.
if [[ -e /.dockerenv ]] && [ -n "${LIBC_VERSION+1}" ] && [ -n "${CHROMEOS_RELEASE_CHROME_MILESTONE+1}" ]; then
PS1='\\[\\033[1;34m\\]\\u@\\H:$LIBC_VERSION M$CHROMEOS_RELEASE_CHROME_MILESTONE \\[\\033[1;33m\\]\\w \\[\\033[1;31m\\]$(__git_ps1 "(%s)")\\[\\033[0m\\]\\$ '
else
PS1='\\[\\033[1;34m\\]\\u@\\H \\[\\033[1;33m\\]\\w \\[\\033[1;31m\\]$(__git_ps1 "(%s)")\\[\\033[0m\\]\\$ '
fi
EOF
File.write('contrib/completion/git-prompt.sh', git_env, mode: 'a')
end
def self.install
system "DESTDIR=#{CREW_DEST_DIR} #{CREW_NINJA} -C builddir install"
cmake_install_extras do
FileUtils.mkdir_p "#{CREW_DEST_PREFIX}/share/git-completion"
FileUtils.cp_r Dir.glob('contrib/completion/.'), "#{CREW_DEST_PREFIX}/share/git-completion/"
@@ -99,6 +99,6 @@ class Git < Package
return unless File.directory?("#{CREW_PREFIX}/lib/crew/.git")
puts 'Running git garbage collection...'.lightblue
system 'git gc', chdir: "#{CREW_PREFIX}/lib/crew", exception: false
system 'git gc', chdir: CREW_LIB_PATH, exception: false
end
end

View File

@@ -4,7 +4,12 @@ Package.load_package("#{__dir__}/gcc_build.rb")
class Libssp < Package
description 'Libssp is a part of the GCC toolkit.'
homepage 'https://gcc.gnu.org/'
version "14.2.0-glibc#{LIBC_VERSION}" # Do not use @_ver here, it will break the installer.
@gcc_libc_version = if %w[2.23 2.27 2.32 2.33 2.35 2.37].any? { |i| LIBC_VERSION.include? i }
LIBC_VERSION
else
ARCH.eql?('i686') ? '2.23' : '2.27'
end
version "14.2.0-glibc#{@gcc_libc_version}" # Do not use @_ver here, it will break the installer.
license 'GPL-3, LGPL-3, libgcc, FDL-1.2'
# When upgrading gcc_build, be sure to upgrade gcc_lib, gcc_dev, and libssp in tandem.
puts "#{self} version (#{version}) differs from gcc version #{Gcc_build.version}".orange if version.to_s != Gcc_build.version
@@ -13,7 +18,7 @@ class Libssp < Package
git_hashtag "releases/gcc-#{version.split('-').first}"
binary_compression 'tar.zst'
case LIBC_VERSION
case @gcc_libc_version
when '2.23'
binary_sha256({
i686: '482ada83ade66f12de9370a91e3b48bde523248fa870d4729d4644b2115c8e04'

View File

@@ -28,14 +28,6 @@ class Ruby_pry < RUBY
end
def self.postremove
config_file = "#{HOME}/.pryrc"
if File.file? config_file
if agree("Would you like to remove the #{name} config file: #{config_file}? ")
FileUtils.rm_rf config_file
puts "#{config_file} removed.".lightgreen
else
puts "#{config_file} saved.".lightgreen
end
end
Package.agree_to_remove("#{HOME}/.pryrc")
end
end

View File

@@ -4,6 +4,10 @@ echo "ALL_CHANGED FILES: ${ALL_CHANGED_FILES}."
echo "CHANGED_PACKAGES: ${CHANGED_PACKAGES}."
cd /usr/local/lib/crew/packages/
yes | crew upgrade
(cd ~ && \
git clone --depth=1 https://github.com/chromebrew/chromebrew.git build_test && \
cd build_test && \
yes | CREW_CACHE_ENABLED=1 crew build -vf packages/hello_world_chromebrew.rb)
yes | crew install vim
yes | crew remove vim
ruby ../tests/commands/const.rb
@@ -44,7 +48,3 @@ if [[ -n ${ALL_CHANGED_FILES-} ]]; then
done
fi
fi
cd ~
git clone --depth=1 https://github.com/chromebrew/chromebrew.git build_test
cd build_test
yes | CREW_CACHE_ENABLED=1 crew build -vf packages/hello_world_chromebrew.rb