Skip to content

Commit 8a67263

Browse files
committed
Update:
- all downloading from github change to codeload method (main contributor: Kai Luo) - add contributor informations - modify download_url function in tool_kit.sh to support --no-check-certificate option and --no-checksum mode
1 parent 7a0cbe9 commit 8a67263

7 files changed

Lines changed: 55 additions & 42 deletions

File tree

toolchain/scripts/stage3/install_elpa.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
# shellcheck disable=all
55

66
# Last Update in 2025-0308
7+
# other contributor: Benrui Tang
78

89
[ "${BASH_SOURCE[0]}" ] && SCRIPT_NAME="${BASH_SOURCE[0]}" || SCRIPT_NAME=$0
910
SCRIPT_DIR="$(cd "$(dirname "$SCRIPT_NAME")/.." && pwd -P)"

toolchain/scripts/stage4/install_cereal.sh

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
[ "${BASH_SOURCE[0]}" ] && SCRIPT_NAME="${BASH_SOURCE[0]}" || SCRIPT_NAME=$0
1111
SCRIPT_DIR="$(cd "$(dirname "$SCRIPT_NAME")/.." && pwd -P)"
1212

13-
cereal_ver="1.3.2"
14-
cereal_sha256="16a7ad9b31ba5880dac55d62b5d6f243c3ebc8d46a3514149e56b5e7ea81f85f"
13+
cereal_ver="master" # latest version, instead of "1.3.2"
14+
cereal_sha256="--no-checksum" # latest version cannot maintain checksum
1515
source "${SCRIPT_DIR}"/common_vars.sh
1616
source "${SCRIPT_DIR}"/tool_kit.sh
1717
source "${SCRIPT_DIR}"/signal_trap.sh
@@ -31,24 +31,27 @@ case "$with_cereal" in
3131
pkg_install_dir="${INSTALLDIR}/$dirname"
3232
#pkg_install_dir="${HOME}/lib/cereal/${cereal_ver}"
3333
install_lock_file="$pkg_install_dir/install_successful"
34-
url="https://github.com/USCiLab/cereal/archive/refs/tags/v${cereal_ver}.tar.gz"
35-
filename="cereal-${cereal_ver}.tar.gz"
34+
# url="https://github.com/USCiLab/cereal/archive/refs/tags/v${cereal_ver}.tar.gz"
35+
# filename="cereal-${cereal_ver}.tar.gz"
36+
url="https://codeload.github.com/USCiLab/cereal/zip/refs/heads/${cereal_ver}"
37+
filename="cereal-${cereal_ver}.zip"
3638
if verify_checksums "${install_lock_file}"; then
3739
echo "$dirname is already installed, skipping it."
3840
else
3941
if [ -f $filename ]; then
4042
echo "$filename is found"
4143
else
4244
# download from github.com and checksum
43-
echo "===> Notice: This version of CEREAL is downloaded in GitHub Release, which will always be out-of-date version <==="
45+
echo "===> Notice: This version of CEREAL is downloaded in GitHub master repository <==="
4446
download_pkg_from_url "${cereal_sha256}" "${filename}" "${url}"
4547
fi
4648
if [ "${PACK_RUN}" = "__TRUE__" ]; then
4749
echo "--pack-run mode specified, skip installation"
4850
else
4951
echo "Installing from scratch into ${pkg_install_dir}"
5052
[ -d $dirname ] && rm -rf $dirname
51-
tar -xzf $filename
53+
#tar -xzf $filename
54+
unzip -q $filename
5255
mkdir -p "${pkg_install_dir}"
5356
cp -r $dirname/* "${pkg_install_dir}/"
5457
write_checksums "${install_lock_file}" "${SCRIPT_DIR}/stage4/$(basename ${SCRIPT_NAME})"

toolchain/scripts/stage4/install_libcomm.sh

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,13 @@
77
# LibComm is under highly-active development, the git submodule installation is more recommended
88

99
# Last Update in 2024-0815
10+
# other contributor: Peize Lin
1011

1112
[ "${BASH_SOURCE[0]}" ] && SCRIPT_NAME="${BASH_SOURCE[0]}" || SCRIPT_NAME=$0
1213
SCRIPT_DIR="$(cd "$(dirname "$SCRIPT_NAME")/.." && pwd -P)"
1314

14-
libcomm_ver="0.1.1"
15-
libcomm_sha256="9c47b6ea9573bffa4232c0bef63714d4c3af820c6b7539cfa6e294ca2b8ba4af"
15+
libcomm_ver="master"
16+
libcomm_sha256="--no-checksum"
1617
source "${SCRIPT_DIR}"/common_vars.sh
1718
source "${SCRIPT_DIR}"/tool_kit.sh
1819
source "${SCRIPT_DIR}"/signal_trap.sh
@@ -32,24 +33,27 @@ case "$with_libcomm" in
3233
pkg_install_dir="${INSTALLDIR}/$dirname"
3334
#pkg_install_dir="${HOME}/lib/libcomm/${libcomm_ver}"
3435
install_lock_file="$pkg_install_dir/install_successful"
35-
url="https://github.com/abacusmodeling/LibComm/archive/refs/tags/v${libcomm_ver}.tar.gz"
36-
filename="LibComm-${libcomm_ver}.tar.gz"
36+
# url="https://github.com/abacusmodeling/LibComm/archive/refs/tags/v${libcomm_ver}.tar.gz"
37+
# filename="LibComm-${libcomm_ver}.tar.gz"
38+
url="https://codeload.github.com/abacusmodeling/LibComm/zip/refs/heads/${libcomm_ver}"
39+
filename="LibComm-${libcomm_ver}.zip"
3740
if verify_checksums "${install_lock_file}"; then
3841
echo "$dirname is already installed, skipping it."
3942
else
4043
if [ -f $filename ]; then
4144
echo "$filename is found"
4245
else
4346
# download from github.com and checksum
44-
echo "===> Notice: This version of LibComm is downloaded in GitHub Release, which will always be out-of-date version <==="
47+
echo "===> Notice: This version of LibComm is downloaded in GitHub master repository <==="
4548
download_pkg_from_url "${libcomm_sha256}" "${filename}" "${url}"
4649
fi
4750
if [ "${PACK_RUN}" = "__TRUE__" ]; then
4851
echo "--pack-run mode specified, skip installation"
4952
else
5053
echo "Installing from scratch into ${pkg_install_dir}"
5154
[ -d $dirname ] && rm -rf $dirname
52-
tar -xzf $filename
55+
#tar -xzf $filename
56+
unzip -q $filename
5357
cp -r $dirname "${pkg_install_dir}/"
5458
write_checksums "${install_lock_file}" "${SCRIPT_DIR}/stage4/$(basename ${SCRIPT_NAME})"
5559
fi

toolchain/scripts/stage4/install_libnpy.sh

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111
[ "${BASH_SOURCE[0]}" ] && SCRIPT_NAME="${BASH_SOURCE[0]}" || SCRIPT_NAME=$0
1212
SCRIPT_DIR="$(cd "$(dirname "$SCRIPT_NAME")/.." && pwd -P)"
1313

14-
libnpy_ver="1.0.1"
15-
libnpy_sha256="43452a4db1e8c1df606c64376ea1e32789124051d7640e7e4e8518ab4f0fba44"
14+
libnpy_ver="master"
15+
libnpy_sha256="--no-checksum"
1616
source "${SCRIPT_DIR}"/common_vars.sh
1717
source "${SCRIPT_DIR}"/tool_kit.sh
1818
source "${SCRIPT_DIR}"/signal_trap.sh
@@ -32,24 +32,27 @@ case "$with_libnpy" in
3232
pkg_install_dir="${INSTALLDIR}/$dirname"
3333
#pkg_install_dir="${HOME}/lib/libnpy/${libnpy_ver}"
3434
install_lock_file="$pkg_install_dir/install_successful"
35-
url="https://github.com/llohse/libnpy/archive/refs/tags/v${libnpy_ver}.tar.gz"
36-
filename="libnpy-${libnpy_ver}.tar.gz"
35+
#url="https://github.com/llohse/libnpy/archive/refs/tags/v${libnpy_ver}.tar.gz"
36+
#filename="libnpy-${libnpy_ver}.tar.gz"
37+
url="https://codeload.github.com/llohse/libnpy/zip/refs/heads/${libnpy_ver}"
38+
filename="libnpy-${libnpy_ver}.zip"
3739
if verify_checksums "${install_lock_file}"; then
3840
echo "$dirname is already installed, skipping it."
3941
else
4042
if [ -f $filename ]; then
4143
echo "$filename is found"
4244
else
4345
# download from github.com and checksum
44-
echo "===> Notice: This version of Libnpy is downloaded in GitHub Release, which will always be out-of-date version <==="
46+
echo "===> Notice: This version of Libnpy is downloaded in GitHub master repository <==="
4547
download_pkg_from_url "${libnpy_sha256}" "${filename}" "${url}"
4648
fi
4749
if [ "${PACK_RUN}" = "__TRUE__" ]; then
4850
echo "--pack-run mode specified, skip installation"
4951
else
5052
echo "Installing from scratch into ${pkg_install_dir}"
5153
[ -d $dirname ] && rm -rf $dirname
52-
tar -xzf $filename
54+
#tar -xzf $filename
55+
unzip -q $filename
5356
mkdir -p "${pkg_install_dir}"
5457
cp -r $dirname/* "${pkg_install_dir}/"
5558
write_checksums "${install_lock_file}" "${SCRIPT_DIR}/stage4/$(basename ${SCRIPT_NAME})"

toolchain/scripts/stage4/install_libri.sh

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,13 @@
77
# LibRI is under highly-active development, the git submodule installation is more recommended
88

99
# Last Update in 2024-0815
10+
# other contributor: Peize Lin
1011

1112
[ "${BASH_SOURCE[0]}" ] && SCRIPT_NAME="${BASH_SOURCE[0]}" || SCRIPT_NAME=$0
1213
SCRIPT_DIR="$(cd "$(dirname "$SCRIPT_NAME")/.." && pwd -P)"
13-
# libri 0.2.0 need to be used in newer ABACUS
14-
libri_ver="0.2.1.0"
15-
libri_sha256="66a5540daba36effdad6ce2fe5e8368b96ddd4a7e148af90894ef21dc20ff29f"
14+
# libri 0.2.0 and above need to be used in newer ABACUS
15+
libri_ver="master"
16+
libri_sha256="--no-checksum"
1617
source "${SCRIPT_DIR}"/common_vars.sh
1718
source "${SCRIPT_DIR}"/tool_kit.sh
1819
source "${SCRIPT_DIR}"/signal_trap.sh
@@ -32,24 +33,25 @@ case "$with_libri" in
3233
pkg_install_dir="${INSTALLDIR}/$dirname"
3334
#pkg_install_dir="${HOME}/lib/libri/${libri_ver}"
3435
install_lock_file="$pkg_install_dir/install_successful"
35-
url="https://github.com/abacusmodeling/LibRI/archive/refs/tags/v${libri_ver}.tar.gz"
36-
filename="LibRI-${libri_ver}.tar.gz"
36+
#url="https://github.com/abacusmodeling/LibRI/archive/refs/tags/v${libri_ver}.tar.gz"
37+
url="https://codeload.github.com/abacusmodeling/LibRI/zip/refs/heads/${libri_ver}"
38+
filename="LibRI-${libri_ver}.zip"
3739
if verify_checksums "${install_lock_file}"; then
3840
echo "$dirname is already installed, skipping it."
3941
else
4042
if [ -f $filename ]; then
4143
echo "$filename is found"
4244
else
4345
# download from github.com and checksum
44-
echo "===> Notice: This version of LibRI is downloaded in GitHub Release, which will always be out-of-date version <==="
46+
echo "===> Notice: This version of rapidjson is downloaded in GitHub master repository <==="
4547
download_pkg_from_url "${libri_sha256}" "${filename}" "${url}"
4648
fi
4749
if [ "${PACK_RUN}" = "__TRUE__" ]; then
4850
echo "--pack-run mode specified, skip installation"
4951
else
5052
echo "Installing from scratch into ${pkg_install_dir}"
5153
[ -d $dirname ] && rm -rf $dirname
52-
tar -xzf $filename
54+
unzip -q $filename
5355
cp -r $dirname "${pkg_install_dir}/"
5456
write_checksums "${install_lock_file}" "${SCRIPT_DIR}/stage4/$(basename ${SCRIPT_NAME})"
5557
fi

toolchain/scripts/stage4/install_rapidjson.sh

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@
55
# RAPIDJSON is not need any complex setting
66
# Only problem is the installation from github.com
77

8-
# Last Update in 2024-0119
9-
# Last Update in 2025-04-28 by Kai Luo
8+
# Last Update in 2025-05-01
9+
# other contributor: Kai Luo, XingLiang Peng
1010

1111
[ "${BASH_SOURCE[0]}" ] && SCRIPT_NAME="${BASH_SOURCE[0]}" || SCRIPT_NAME=$0
1212
SCRIPT_DIR="$(cd "$(dirname "$SCRIPT_NAME")/.." && pwd -P)"
1313

1414
rapidjson_ver="master" # latest version, instead of "1.1.0" fixing issue of #5518
15-
rapidjson_sha256="bf7ced29704a1e696fbccf2a2b4ea068e7774fa37f6d7dd4039d0787f8bed98e"
15+
rapidjson_sha256="--no-checksum" # latest version cannot maintain checksum
1616
source "${SCRIPT_DIR}"/common_vars.sh
1717
source "${SCRIPT_DIR}"/tool_kit.sh
1818
source "${SCRIPT_DIR}"/signal_trap.sh
@@ -33,8 +33,8 @@ case "$with_rapidjson" in
3333
#pkg_install_dir="${HOME}/lib/rapidjson/${rapidjson_ver}"
3434
install_lock_file="$pkg_install_dir/install_successful"
3535
#url="https://github.com/Tencent/rapidjson/archive/refs/tags/v${rapidjson_ver}.tar.gz" # commented by Kai Luo in 2025/04/28
36-
url="https://codeload.github.com/Tencent/rapidjson/zip/refs/heads/master"
37-
# filename="rapidjson-${rapidjson_ver}.tar.gz"
36+
url="https://codeload.github.com/Tencent/rapidjson/zip/refs/heads/${rapidjson_ver}"
37+
# changed by Kai Luo in 2025/04/28, modified by Zhaoqing Liu in 2025/05/01
3838
filename="rapidjson-${rapidjson_ver}.zip" # changed by Kai Luo in 2025/04/28
3939
if verify_checksums "${install_lock_file}"; then
4040
echo "$dirname is already installed, skipping it."
@@ -43,17 +43,16 @@ case "$with_rapidjson" in
4343
echo "$filename is found"
4444
else
4545
# download from github.com and checksum
46-
echo "===> Notice: This version of rapidjson is downloaded in GitHub Release, which will always be out-of-date version <==="
47-
# download_pkg_from_url "${rapidjson_sha256}" "${filename}" "${url}"
48-
wget "${url}" -O "${filename}" --no-check-certificate # use wget directly instead of download_pkg_from_url
46+
echo "===> Notice: This version of rapidjson is downloaded in GitHub master repository <==="
47+
download_pkg_from_url "${rapidjson_sha256}" "${filename}" "${url}"
48+
# wget "${url}" -O "${filename}" --no-check-certificate # use wget directly instead of download_pkg_from_url
4949
fi
5050
if [ "${PACK_RUN}" = "__TRUE__" ]; then
5151
echo "--pack-run mode specified, skip installation"
5252
else
5353
echo "Installing from scratch into ${pkg_install_dir}"
5454
[ -d $dirname ] && rm -rf $dirname
55-
# tar -xzf $filename
56-
unzip -q $filename # downloaded file is a zip file, so use unzip instead of tar, use -q to suppress output
55+
unzip -q $filename # use -q to suppress output
5756
mkdir -p "${pkg_install_dir}"
5857
cp -r $dirname/* "${pkg_install_dir}/"
5958
# for CMake to find rapidjson

toolchain/scripts/tool_kit.sh

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,8 @@ And re-run toolchain installation script.
5757
You can manually install requirements packages via:
5858
1. Download from www.cp2k.org/static/downloads (for OpenBLAS, OpenMPI and Others)
5959
2. Download from github.com (for CEREAL, RapidJSON, libnpy, LibRI and others stage4 packages)
60-
3. Use git submodule update --init --recursive (for LibRI)
61-
4. wget https://bohrium-api.dp.tech/ds-dl/abacus-deps-93wi-v2 -O abacus-deps.zip
62-
5. for Intel-oneAPI, please contact your server manager our visit Intel official website
60+
3. wget https://bohrium-api.dp.tech/ds-dl/abacus-deps-93wi-v2 -O abacus-deps.zip (a mirror in Bohrium)
61+
4. for Intel-oneAPI and AMD AOCC/AOCL, please contact your server manager our visit Intel official website
6362
EOF
6463
}
6564

@@ -665,22 +664,24 @@ download_pkg_from_ABACUS_org() {
665664

666665
download_pkg_from_url() {
667666
# usage: download_pkg_from_url sha256 filename url
668-
local __sha256="$1"
667+
local __sha256="$1" # if set to "--no-checksum", do not check checksum
669668
local __filename="$2"
670669
local __url="$3"
671670
# download
672671
#echo "wget ${DOWNLOADER_FLAGS} --quiet $__url -O $__filename"
673672
#if ! wget ${DOWNLOADER_FLAGS} --quiet $__url -O $__filename; then
674-
echo "wget ${DOWNLOADER_FLAGS} $__url -O $__filename"
675-
if ! wget ${DOWNLOADER_FLAGS} $__url -O $__filename; then
673+
echo "wget ${DOWNLOADER_FLAGS} $__url -O $__filename --no-check-certificate"
674+
if ! wget ${DOWNLOADER_FLAGS} $__url -O $__filename --no-check-certificate; then
676675
report_error "failed to download $__url"
677676
recommend_offline_installation $__filename $__url
678677
if [ "${PACK_RUN}" != "__TRUE__" ]; then
679678
return 1
680679
fi
681680
fi
682681
# checksum
683-
checksum "$__filename" "$__sha256"
682+
if [ "$__sha256" != "--no-checksum" ]; then
683+
checksum "$__filename" "$__sha256"
684+
fi
684685
}
685686

686687
# verify the checksums inside the given checksum file

0 commit comments

Comments
 (0)