Skip to content

Commit

Permalink
remove gsl for portable artifacts; add -f key to generate-random-id i…
Browse files Browse the repository at this point in the history
…n order to read addr_list from file;
  • Loading branch information
neodix42 committed Dec 22, 2024
1 parent 61134fd commit fb0fc08
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 4 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/build-ton-linux-x86-64-portable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,9 @@ jobs:

- name: Install system libraries
run: |
sudo apt-get update
sudo apt-get install -y build-essential git cmake ninja-build libc++-dev libc++abi-dev
sudo apt update
sudo apt install -y build-essential git cmake ninja-build libc++-dev libc++abi-dev
sudo apt remove libgsl-dev
- if: matrix.os != 'ubuntu-24.04'
run: |
Expand Down
4 changes: 2 additions & 2 deletions assembly/native/build-ubuntu-portable.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ git clone https://github.com/lz4/lz4.git
cd lz4
lz4Path=`pwd`
git checkout v1.9.4
make -j12
CFLAGS="-fPIC" make -j12
test $? -eq 0 || { echo "Can't compile lz4"; exit 1; }
cd ..
# ./lib/liblz4.a
Expand Down Expand Up @@ -102,7 +102,7 @@ fi

cmake -GNinja .. \
-DCMAKE_CXX_FLAGS="-stdlib=libc++ -I/usr/lib/llvm-16/include/c++/v1" \
-DCMAKE_EXE_LINKER_FLAGS="-stdlib=libc++ -I/usr/lib/llvm-16/include/c++/v1" \
-DCMAKE_EXE_LINKER_FLAGS="-stdlib=libc++ -static-libgcc -static-libstdc++ /usr/lib/llvm-14/lib/libc++abi.a -I/usr/lib/llvm-16/include/c++/v1" \
-DPORTABLE=1 \
-DCMAKE_BUILD_TYPE=Release \
-DOPENSSL_FOUND=1 \
Expand Down
13 changes: 13 additions & 0 deletions utils/generate-random-id.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,19 @@ int main(int argc, char *argv[]) {
TRY_RESULT_PREFIX_ASSIGN(addr_list, ton::adnl::AdnlAddressList::create(addr_list_tl), "bad addr list: ");
return td::Status::OK();
});
p.add_checked_option('f', "path to file with addr-list", "addr list to sign", [&](td::Slice key) {
if (addr_list) {
return td::Status::Error("duplicate '-f' option");
}

td::BufferSlice bs(key);
TRY_RESULT_PREFIX(data, td::read_file(key.str()), "failed to read addr-list: ");
TRY_RESULT_PREFIX(as_json_value, data), "bad addr list JSON: ");
ton::tl_object_ptr<ton::ton_api::adnl_addressList> addr_list_tl;
TRY_STATUS_PREFIX(td::from_json(addr_list_tl, std::move(as_json_value)), "bad addr list TL: ");
TRY_RESULT_PREFIX_ASSIGN(addr_list, ton::adnl::AdnlAddressList::create(addr_list_tl), "bad addr list: ");
return td::Status::OK();
});
p.add_checked_option('i', "network-id", "dht network id (default: -1)", [&](td::Slice key) {
if (network_id_opt) {
return td::Status::Error("duplicate '-i' option");
Expand Down

0 comments on commit fb0fc08

Please sign in to comment.