Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
celllframe-node
Manage
Activity
Members
Labels
Plan
Issues
5
Issue boards
Milestones
Code
Merge requests
15
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
cellframe
celllframe-node
Commits
13430836
Commit
13430836
authored
2 years ago
by
Roman Khlopkov
🔜
Browse files
Options
Downloads
Plain Diff
[*] Conflicts resolved
parents
d96cfe27
c13ee2bd
No related branches found
Branches containing commit
No related tags found
Tags containing commit
2 merge requests
!974
bugfix-8996
,
!873
Hotfix 8568
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
CMakeLists.txt
+24
-17
24 additions, 17 deletions
CMakeLists.txt
sources/main_node_tool.c
+2
-3
2 additions, 3 deletions
sources/main_node_tool.c
with
26 additions
and
20 deletions
CMakeLists.txt
+
24
−
17
View file @
13430836
...
@@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.10)
...
@@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.10)
project
(
cellframe-node C
)
project
(
cellframe-node C
)
include
(
cellframe-sdk/cmake/ReadMKFile.cmake
)
include
(
cellframe-sdk/cmake/ReadMKFile.cmake
)
include
(
FetchContent
)
include
(
FetchContent
)
set
(
CMAKE_ENABLE_EXPORTS ON
)
set
(
CMAKE_ENABLE_EXPORTS ON
)
set
(
CMAKE_VERBOSE_MAKEFILE ON
)
set
(
CMAKE_VERBOSE_MAKEFILE ON
)
...
@@ -102,21 +102,21 @@ if(UNIX)
...
@@ -102,21 +102,21 @@ if(UNIX)
OUTPUT_VARIABLE CPACK_DEBIAN_PACKAGE_ARCHITECTURE
OUTPUT_VARIABLE CPACK_DEBIAN_PACKAGE_ARCHITECTURE
OUTPUT_STRIP_TRAILING_WHITESPACE
)
OUTPUT_STRIP_TRAILING_WHITESPACE
)
endif
()
endif
()
else
()
else
()
set
(
CPACK_DEBIAN_PACKAGE_ARCHITECTURE
${
CPACK_TARGET_ARCHITECTURE
}
)
set
(
CPACK_DEBIAN_PACKAGE_ARCHITECTURE
${
CPACK_TARGET_ARCHITECTURE
}
)
endif
()
endif
()
if
(
CPACK_DEBIAN_PACKAGE_ARCHITECTURE MATCHES
"arm"
)
if
(
CPACK_DEBIAN_PACKAGE_ARCHITECTURE MATCHES
"arm"
)
SET
(
BUILD_WITH_PYTHON_ENV OFF
)
SET
(
BUILD_WITH_PYTHON_ENV OFF
)
endif
()
endif
()
if
(
NOT CPACK_SYSTEM_NAME
)
if
(
NOT CPACK_SYSTEM_NAME
)
set
(
CPACK_SYSTEM_NAME
${
CPACK_DEBIAN_PACKAGE_ARCHITECTURE
}
)
set
(
CPACK_SYSTEM_NAME
${
CPACK_DEBIAN_PACKAGE_ARCHITECTURE
}
)
endif
()
endif
()
SET
(
CPACK_PACKAGE_VERSION
"
${
CPACK_PACKAGE_VERSION_MAJOR
}
.
${
CPACK_PACKAGE_VERSION_MINOR
}
-
${
CPACK_PACKAGE_VERSION_PATCH
}
"
)
SET
(
CPACK_PACKAGE_VERSION
"
${
CPACK_PACKAGE_VERSION_MAJOR
}
.
${
CPACK_PACKAGE_VERSION_MINOR
}
-
${
CPACK_PACKAGE_VERSION_PATCH
}
"
)
if
(
BUILD_WITH_GDB_DRIVER_PGSQL
)
if
(
BUILD_WITH_GDB_DRIVER_PGSQL
)
SET
(
CPACK_PACKAGE_VERSION
"
${
CPACK_PACKAGE_VERSION
}
-pgsql"
)
SET
(
CPACK_PACKAGE_VERSION
"
${
CPACK_PACKAGE_VERSION
}
-pgsql"
)
endif
()
endif
()
...
@@ -131,7 +131,7 @@ if(UNIX)
...
@@ -131,7 +131,7 @@ if(UNIX)
SET
(
CPACK_DEBIAN_PACKAGE_DESCRIPTION
"CellFrame Node"
)
SET
(
CPACK_DEBIAN_PACKAGE_DESCRIPTION
"CellFrame Node"
)
SET
(
CPACK_DEBIAN_PACKAGE_SECTION
"extra"
)
SET
(
CPACK_DEBIAN_PACKAGE_SECTION
"extra"
)
SET
(
CPACK_DEBIAN_PACKAGE_DEPENDS
"debconf (>=1.5), dpkg (>=1.17), bash (>=4), debconf-utils, dconf-cli, less, pv, psmisc, logrotate, irqbalance, xz-utils"
)
SET
(
CPACK_DEBIAN_PACKAGE_DEPENDS
"debconf (>=1.5), dpkg (>=1.17), bash (>=4), debconf-utils, dconf-cli, less, pv, psmisc, logrotate, irqbalance, xz-utils"
)
#have to figure out how to use it properly with custom RPATH for python plugins...
#have to figure out how to use it properly with custom RPATH for python plugins...
if
(
NOT SUPPORT_PYTHON_PLUGINS
)
if
(
NOT SUPPORT_PYTHON_PLUGINS
)
SET
(
CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON
)
SET
(
CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON
)
...
@@ -206,6 +206,9 @@ if(BSD)
...
@@ -206,6 +206,9 @@ if(BSD)
endif
()
endif
()
target_link_libraries
(
${
NODE_TARGET
}
${
NODE_LIBRARIES
}
crc32c_adler
)
target_link_libraries
(
${
NODE_TOOL_TARGET
}
${
NODE_TOOL_LIBRARIES
}
crc32c_adler
)
if
(
UNIX AND NOT WIN32
)
if
(
UNIX AND NOT WIN32
)
message
(
"[*] Unix library set"
)
message
(
"[*] Unix library set"
)
...
@@ -218,12 +221,12 @@ if(UNIX AND NOT WIN32)
...
@@ -218,12 +221,12 @@ if(UNIX AND NOT WIN32)
if
(
SUPPORT_PYTHON_PLUGINS
)
if
(
SUPPORT_PYTHON_PLUGINS
)
message
(
"[+] Build with python plugins support"
)
message
(
"[+] Build with python plugins support"
)
set
(
CMAKE_C_FLAGS
"
${
CMAKE_C_FLAGS
}
-DDAP_SUPPORT_PYTHON_PLUGINS"
)
set
(
CMAKE_C_FLAGS
"
${
CMAKE_C_FLAGS
}
-DDAP_SUPPORT_PYTHON_PLUGINS"
)
add_definitions
(
"-DDAP_SUPPORT_PYTHON_PLUGINS"
)
add_definitions
(
"-DDAP_SUPPORT_PYTHON_PLUGINS"
)
if
(
BUILD_WITH_PYTHON_ENV
)
if
(
BUILD_WITH_PYTHON_ENV
)
message
(
"[+] Build with python environment"
)
message
(
"[+] Build with python environment"
)
message
(
" Downloading static prebuild cpython3.7..."
)
message
(
" Downloading static prebuild cpython3.7..."
)
#this python was build by compiling and installing static python distrip to /opt/cellframe-node/ and
#this python was build by compiling and installing static python distrip to /opt/cellframe-node/ and
...
@@ -236,7 +239,7 @@ if(UNIX AND NOT WIN32)
...
@@ -236,7 +239,7 @@ if(UNIX AND NOT WIN32)
FetchContent_MakeAvailable
(
CPython37Static
)
FetchContent_MakeAvailable
(
CPython37Static
)
set
(
CMAKE_PREFIX_PATH
${
cpython37static_SOURCE_DIR
}
)
set
(
CMAKE_PREFIX_PATH
${
cpython37static_SOURCE_DIR
}
)
set
(
Python_ADDITIONAL_VERSIONS 3.7
)
set
(
Python_ADDITIONAL_VERSIONS 3.7
)
find_package
(
PythonLibs REQUIRED
)
find_package
(
PythonLibs REQUIRED
)
...
@@ -248,9 +251,9 @@ if(UNIX AND NOT WIN32)
...
@@ -248,9 +251,9 @@ if(UNIX AND NOT WIN32)
find_package
(
PythonLibs REQUIRED
)
find_package
(
PythonLibs REQUIRED
)
endif
()
endif
()
message
(
"[!] Python includes path: "
${
PYTHON_INCLUDE_DIR
}
)
message
(
"[!] Python includes path: "
${
PYTHON_INCLUDE_DIR
}
)
message
(
"[!] Python library path: "
${
PYTHON_LIBRARY_PATH
}
)
message
(
"[!] Python library path: "
${
PYTHON_LIBRARY_PATH
}
)
include_directories
(
${
PYTHON_INCLUDE_DIR
}
include/
)
include_directories
(
${
PYTHON_INCLUDE_DIR
}
include/
)
add_subdirectory
(
python-cellframe
)
add_subdirectory
(
python-cellframe
)
...
@@ -268,6 +271,10 @@ if(UNIX AND NOT WIN32)
...
@@ -268,6 +271,10 @@ if(UNIX AND NOT WIN32)
endif
()
endif
()
endif
()
endif
()
target_link_libraries
(
${
NODE_TARGET
}
${
NODE_LIBRARIES
}
crc32c_adler
)
target_link_libraries
(
${
NODE_TOOL_TARGET
}
${
NODE_TOOL_LIBRARIES
}
crc32c_adler
)
target_include_directories
(
${
PROJECT_NAME
}
INTERFACE .
)
target_include_directories
(
${
PROJECT_NAME
}
INTERFACE .
)
if
(
NOT ANDROID
)
if
(
NOT ANDROID
)
...
@@ -291,22 +298,22 @@ else()
...
@@ -291,22 +298,22 @@ else()
elseif
(
BSD
)
elseif
(
BSD
)
INSTALL
(
DIRECTORY
${
CMAKE_CURRENT_SOURCE_DIR
}
/dist.bsd/ DESTINATION
${
CMAKE_INSTALL_PREFIX
}
FILES_MATCHING PATTERN
"*"
PATTERN
"*"
)
INSTALL
(
DIRECTORY
${
CMAKE_CURRENT_SOURCE_DIR
}
/dist.bsd/ DESTINATION
${
CMAKE_INSTALL_PREFIX
}
FILES_MATCHING PATTERN
"*"
PATTERN
"*"
)
endif
()
endif
()
INSTALL
(
TARGETS
${
PROJECT_NAME
}
DESTINATION
${
CMAKE_INSTALL_PREFIX
}
/bin
)
INSTALL
(
TARGETS
${
PROJECT_NAME
}
DESTINATION
${
CMAKE_INSTALL_PREFIX
}
/bin
)
INSTALL
(
TARGETS
${
NODE_CLI_TARGET
}
DESTINATION
${
CMAKE_INSTALL_PREFIX
}
/bin
)
INSTALL
(
TARGETS
${
NODE_CLI_TARGET
}
DESTINATION
${
CMAKE_INSTALL_PREFIX
}
/bin
)
INSTALL
(
TARGETS
${
NODE_TOOL_TARGET
}
DESTINATION
${
CMAKE_INSTALL_PREFIX
}
/bin
)
INSTALL
(
TARGETS
${
NODE_TOOL_TARGET
}
DESTINATION
${
CMAKE_INSTALL_PREFIX
}
/bin
)
if
(
NOT ANDROID
)
if
(
NOT ANDROID
)
#install all python-specific files back to its original location
#install all python-specific files back to its original location
if
(
SUPPORT_PYTHON_PLUGINS AND BUILD_WITH_PYTHON_ENV
)
if
(
SUPPORT_PYTHON_PLUGINS AND BUILD_WITH_PYTHON_ENV
)
INSTALL
(
FILES
${
cpython37static_SOURCE_DIR
}
/bin/pip3 DESTINATION
${
CMAKE_INSTALL_PREFIX
}
/bin/pip3
)
INSTALL
(
FILES
${
cpython37static_SOURCE_DIR
}
/bin/pip3 DESTINATION
${
CMAKE_INSTALL_PREFIX
}
/bin/pip3
)
INSTALL
(
DIRECTORY
${
cpython37static_SOURCE_DIR
}
/lib/python3.7 DESTINATION
${
CMAKE_INSTALL_PREFIX
}
/lib/ USE_SOURCE_PERMISSIONS
)
INSTALL
(
DIRECTORY
${
cpython37static_SOURCE_DIR
}
/lib/python3.7 DESTINATION
${
CMAKE_INSTALL_PREFIX
}
/lib/ USE_SOURCE_PERMISSIONS
)
endif
()
endif
()
endif
()
endif
()
INSTALL
(
DIRECTORY
${
CMAKE_CURRENT_SOURCE_DIR
}
/scripts/ DESTINATION
${
CMAKE_INSTALL_PREFIX
}
/sbin FILES_MATCHING PATTERN
"*"
PATTERN
"*"
PERMISSIONS OWNER_EXECUTE;OWNER_READ;OWNER_WRITE;WORLD_READ;GROUP_READ
)
INSTALL
(
DIRECTORY
${
CMAKE_CURRENT_SOURCE_DIR
}
/scripts/ DESTINATION
${
CMAKE_INSTALL_PREFIX
}
/sbin FILES_MATCHING PATTERN
"*"
PATTERN
"*"
PERMISSIONS OWNER_EXECUTE;OWNER_READ;OWNER_WRITE;WORLD_READ;GROUP_READ
)
endif
()
endif
()
INCLUDE
(
CPack
)
INCLUDE
(
CPack
)
This diff is collapsed.
Click to expand it.
sources/main_node_tool.c
+
2
−
3
View file @
13430836
...
@@ -195,7 +195,7 @@ static int s_wallet_create(int argc, const char **argv) {
...
@@ -195,7 +195,7 @@ static int s_wallet_create(int argc, const char **argv) {
exit
(
-
2003
);
exit
(
-
2003
);
}
}
const
char
*
l_wallet_name
=
argv
[
3
];
const
char
*
l_wallet_name
=
argv
[
3
]
,
*
l_pass_str
=
argv
[
5
]
;
dap_sign_type_t
l_sig_type
=
dap_sign_type_from_str
(
argv
[
4
]
);
dap_sign_type_t
l_sig_type
=
dap_sign_type_from_str
(
argv
[
4
]
);
dap_chain_wallet_t
*
l_wallet
=
NULL
;
dap_chain_wallet_t
*
l_wallet
=
NULL
;
...
@@ -220,14 +220,13 @@ static int s_wallet_create(int argc, const char **argv) {
...
@@ -220,14 +220,13 @@ static int s_wallet_create(int argc, const char **argv) {
//
//
// Check unsupported tesla algorithm
// Check unsupported tesla algorithm
//
//
if
(
l_sig_type
.
type
==
SIG_TYPE_TESLA
)
if
(
l_sig_type
.
type
==
SIG_TYPE_TESLA
)
{
{
log_it
(
L_ERROR
,
"Tesla algorithm is not supported, please, use another variant"
);
log_it
(
L_ERROR
,
"Tesla algorithm is not supported, please, use another variant"
);
exit
(
-
2004
);
exit
(
-
2004
);
}
}
l_wallet
=
dap_chain_wallet_create
(
l_wallet_name
,
s_system_wallet_dir
,
l_sig_type
,
NULL
);
l_wallet
=
dap_chain_wallet_create
(
l_wallet_name
,
s_system_wallet_dir
,
l_sig_type
,
l_pass_str
);
return
0
;
return
0
;
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment