Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
b7471464
T
TDengine
项目概览
taosdata
/
TDengine
大约 1 年 前同步成功
通知
1185
Star
22015
Fork
4786
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
b7471464
编写于
12月 25, 2019
作者:
P
plum-lihui
提交者:
GitHub
12月 25, 2019
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #971 from xrdavies/alpine_support
Alpine support
上级
8f7b7adb
687897be
变更
20
隐藏空白更改
内联
并排
Showing
20 changed file
with
94 addition
and
18 deletion
+94
-18
CMakeLists.txt
CMakeLists.txt
+21
-0
packaging/deb/makedeb.sh
packaging/deb/makedeb.sh
+1
-1
packaging/release.sh
packaging/release.sh
+1
-1
packaging/rpm/makerpm.sh
packaging/rpm/makerpm.sh
+1
-1
packaging/tools/get_os.sh
packaging/tools/get_os.sh
+14
-0
packaging/tools/install.sh
packaging/tools/install.sh
+1
-1
packaging/tools/install_client.sh
packaging/tools/install_client.sh
+1
-1
packaging/tools/make_install.sh
packaging/tools/make_install.sh
+1
-1
packaging/tools/makeclient.sh
packaging/tools/makeclient.sh
+1
-1
packaging/tools/makepkg.sh
packaging/tools/makepkg.sh
+1
-1
packaging/tools/post.sh
packaging/tools/post.sh
+1
-1
packaging/tools/repair_link.sh
packaging/tools/repair_link.sh
+1
-1
src/kit/shell/src/shellLinux.c
src/kit/shell/src/shellLinux.c
+5
-1
src/kit/taosdemo/taosdemo.c
src/kit/taosdemo/taosdemo.c
+10
-1
src/kit/taosdump/taosdump.c
src/kit/taosdump/taosdump.c
+10
-1
src/os/linux/inc/os.h
src/os/linux/inc/os.h
+8
-0
src/os/linux/src/tlinux.c
src/os/linux/src/tlinux.c
+9
-2
src/os/linux/src/tsystem.c
src/os/linux/src/tsystem.c
+5
-2
src/system/detail/inc/dnodeSystem.h
src/system/detail/inc/dnodeSystem.h
+1
-0
src/system/detail/src/vnodeImport.c
src/system/detail/src/vnodeImport.c
+1
-1
未找到文件。
CMakeLists.txt
浏览文件 @
b7471464
...
...
@@ -70,6 +70,13 @@ IF (NOT DEFINED TD_CLUSTER)
ENDIF
()
ENDIF
()
#
# Get OS information and store in variable TD_OS_INFO.
#
execute_process
(
COMMAND chmod 777
${
TD_COMMUNITY_DIR
}
/packaging/tools/get_os.sh
)
execute_process
(
COMMAND
${
TD_COMMUNITY_DIR
}
/packaging/tools/get_os.sh
""
OUTPUT_VARIABLE TD_OS_INFO
)
MESSAGE
(
STATUS
"The current os is "
${
TD_OS_INFO
}
)
IF
(
${
CMAKE_SYSTEM_NAME
}
MATCHES
"Linux"
)
IF
(
${
CMAKE_SIZEOF_VOID_P
}
MATCHES 8
)
SET
(
TD_LINUX_64 TRUE
)
...
...
@@ -150,6 +157,13 @@ IF (NOT DEFINED TD_CLUSTER)
ENDIF
()
ADD_DEFINITIONS
(
-DLINUX
)
ADD_DEFINITIONS
(
-D_REENTRANT -D__USE_POSIX -D_LIBC_REENTRANT
)
IF
(
${
TD_OS_INFO
}
MATCHES
"Alpine"
)
MESSAGE
(
STATUS
"The current OS is Alpine, append extra flags"
)
SET
(
COMMON_FLAGS
"
${
COMMON_FLAGS
}
-largp"
)
link_libraries
(
/usr/lib/libargp.a
)
ELSE
()
ADD_DEFINITIONS
(
-D__USE_GNU
)
ENDIF
()
ELSEIF
(
TD_LINUX_32
)
IF
(
NOT TD_ARM
)
EXIT
()
...
...
@@ -160,6 +174,13 @@ IF (NOT DEFINED TD_CLUSTER)
ADD_DEFINITIONS
(
-DLINUX
)
ADD_DEFINITIONS
(
-D_REENTRANT -D__USE_POSIX -D_LIBC_REENTRANT
)
ADD_DEFINITIONS
(
-DUSE_LIBICONV
)
IF
(
${
TD_OS_INFO
}
MATCHES
"Alpine"
)
MESSAGE
(
STATUS
"The current OS is Alpine, add extra flags"
)
SET
(
COMMON_FLAGS
"
${
COMMON_FLAGS
}
-largp"
)
link_library
(
/usr/lib/libargp.a
)
ELSE
()
ADD_DEFINITIONS
(
-D__USE_GNU
)
ENDIF
()
ELSEIF
(
TD_WINDOWS_64
)
SET
(
CMAKE_GENERATOR
"NMake Makefiles"
CACHE INTERNAL
""
FORCE
)
SET
(
COMMON_FLAGS
"/nologo /WX- /Oi /Oy- /Gm- /EHsc /MT /GS /Gy /fp:precise /Zc:wchar_t /Zc:forScope /Gd /errorReport:prompt /analyze-"
)
...
...
packaging/deb/makedeb.sh
浏览文件 @
b7471464
...
...
@@ -10,7 +10,7 @@ tdengine_ver=$3
armver
=
$4
script_dir
=
"
$(
dirname
$(
readlink
-f
$0
))
"
top_dir
=
"
$(
readlink
-
m
${
script_dir
}
/../..
)
"
top_dir
=
"
$(
readlink
-
f
${
script_dir
}
/../..
)
"
pkg_dir
=
"
${
top_dir
}
/debworkroom"
#echo "curr_dir: ${curr_dir}"
...
...
packaging/release.sh
浏览文件 @
b7471464
...
...
@@ -9,7 +9,7 @@ armver=$1
curr_dir
=
$(
pwd
)
script_dir
=
"
$(
dirname
$(
readlink
-f
$0
))
"
top_dir
=
"
$(
readlink
-
m
${
script_dir
}
/..
)
"
top_dir
=
"
$(
readlink
-
f
${
script_dir
}
/..
)
"
versioninfo
=
"
${
top_dir
}
/src/util/src/version.c"
csudo
=
""
...
...
packaging/rpm/makerpm.sh
浏览文件 @
b7471464
...
...
@@ -12,7 +12,7 @@ tdengine_ver=$3
armver
=
$4
script_dir
=
"
$(
dirname
$(
readlink
-f
$0
))
"
top_dir
=
"
$(
readlink
-
m
${
script_dir
}
/../..
)
"
top_dir
=
"
$(
readlink
-
f
${
script_dir
}
/../..
)
"
pkg_dir
=
"
${
top_dir
}
/rpmworkroom"
spec_file
=
"
${
script_dir
}
/tdengine.spec"
...
...
packaging/tools/get_os.sh
0 → 100644
浏览文件 @
b7471464
#!/bin/bash
#
# This file is used to install TAOS time-series database on linux systems. The operating system
# is required to use systemd to manage services at boot
set
-e
# set -x
# -----------------------Variables definition---------------------
OS
=
$(
cat
/etc/
*
-release
|
grep
"^NAME="
|
cut
-d
=
-f2
)
len
=
$(
echo
${#
OS
}
)
len
=
$((
len-2
))
retval
=
$(
echo
-ne
${
OS
:1:
${
len
}}
|
cut
-d
" "
-f0
)
echo
-ne
$retval
packaging/tools/install.sh
浏览文件 @
b7471464
...
...
@@ -7,7 +7,7 @@ set -e
#set -x
# -----------------------Variables definition---------------------
script_dir
=
$(
dirname
$(
readlink
-
m
"
$0
"
))
script_dir
=
$(
dirname
$(
readlink
-
f
"
$0
"
))
# Dynamic directory
data_dir
=
"/var/lib/taos"
log_dir
=
"/var/log/taos"
...
...
packaging/tools/install_client.sh
浏览文件 @
b7471464
...
...
@@ -7,7 +7,7 @@ set -e
#set -x
# -----------------------Variables definition---------------------
script_dir
=
$(
dirname
$(
readlink
-
m
"
$0
"
))
script_dir
=
$(
dirname
$(
readlink
-
f
"
$0
"
))
# Dynamic directory
data_dir
=
"/var/lib/taos"
log_dir
=
"/var/log/taos"
...
...
packaging/tools/make_install.sh
浏览文件 @
b7471464
...
...
@@ -9,7 +9,7 @@ set -e
# -----------------------Variables definition---------------------
source_dir
=
$1
binary_dir
=
$2
script_dir
=
$(
dirname
$(
readlink
-
m
"
$0
"
))
script_dir
=
$(
dirname
$(
readlink
-
f
"
$0
"
))
# Dynamic directory
data_dir
=
"/var/lib/taos"
log_dir
=
"/var/log/taos"
...
...
packaging/tools/makeclient.sh
浏览文件 @
b7471464
...
...
@@ -11,7 +11,7 @@ build_time=$3
armver
=
$4
script_dir
=
"
$(
dirname
$(
readlink
-f
$0
))
"
top_dir
=
"
$(
readlink
-
m
${
script_dir
}
/../..
)
"
top_dir
=
"
$(
readlink
-
f
${
script_dir
}
/../..
)
"
# create compressed install file.
build_dir
=
"
${
compile_dir
}
/build"
...
...
packaging/tools/makepkg.sh
浏览文件 @
b7471464
...
...
@@ -9,7 +9,7 @@ build_time=$3
armver
=
$4
script_dir
=
"
$(
dirname
$(
readlink
-f
$0
))
"
top_dir
=
"
$(
readlink
-
m
${
script_dir
}
/../..
)
"
top_dir
=
"
$(
readlink
-
f
${
script_dir
}
/../..
)
"
# create compressed install file.
build_dir
=
"
${
compile_dir
}
/build"
...
...
packaging/tools/post.sh
浏览文件 @
b7471464
...
...
@@ -4,7 +4,7 @@
# is required to use systemd to manage services at boot
#set -x
# -----------------------Variables definition---------------------
script_dir
=
$(
dirname
$(
readlink
-
m
"
$0
"
))
script_dir
=
$(
dirname
$(
readlink
-
f
"
$0
"
))
# Dynamic directory
data_dir
=
"/var/lib/taos"
log_dir
=
"/var/log/taos"
...
...
packaging/tools/repair_link.sh
浏览文件 @
b7471464
...
...
@@ -17,7 +17,7 @@ done
declare
-A
dirHash
for
linkFile
in
$(
find
-L
$linkDir
-xtype
l
)
;
do
targetFile
=
$(
readlink
-
m
$linkFile
)
targetFile
=
$(
readlink
-
f
$linkFile
)
echo
"targetFile:
${
targetFile
}
"
# TODO : Extract directory part and basename part
dirName
=
$(
dirname
$(
dirname
${
targetFile
}
))
...
...
src/kit/shell/src/shellLinux.c
浏览文件 @
b7471464
...
...
@@ -130,7 +130,11 @@ void shellParseArgument(int argc, char *argv[], struct arguments *arguments) {
argp_parse
(
&
argp
,
argc
,
argv
,
0
,
0
,
arguments
);
if
(
arguments
->
abort
)
{
error
(
10
,
0
,
"ABORTED"
);
#ifdef __USE_GNU
error
(
10
,
0
,
"ABORTED"
);
#else
abort
();
#endif
}
}
...
...
src/kit/taosdemo/taosdemo.c
浏览文件 @
b7471464
...
...
@@ -17,7 +17,10 @@
#include <argp.h>
#include <assert.h>
#if !defined (__USE_GNU) && defined (LINUX)
#else
#include <error.h>
#endif
#include <pthread.h>
#include <semaphore.h>
#include <stdbool.h>
...
...
@@ -309,7 +312,13 @@ int main(int argc, char *argv[]) {
argp_parse
(
&
argp
,
argc
,
argv
,
0
,
0
,
&
arguments
);
if
(
arguments
.
abort
)
error
(
10
,
0
,
"ABORTED"
);
if
(
arguments
.
abort
)
{
#ifdef __USE_GNU
error
(
10
,
0
,
"ABORTED"
);
#else
abort
();
#endif
}
enum
MODE
query_mode
=
arguments
.
mode
;
char
*
ip_addr
=
arguments
.
host
;
...
...
src/kit/taosdump/taosdump.c
浏览文件 @
b7471464
...
...
@@ -15,7 +15,10 @@
#include <argp.h>
#include <assert.h>
#if !defined (__USE_GNU) && defined (LINUX)
#else
#include <error.h>
#endif
#include <fcntl.h>
#include <stdbool.h>
#include <stdio.h>
...
...
@@ -335,7 +338,13 @@ int main(int argc, char *argv[]) {
reflected in arguments. */
argp_parse
(
&
argp
,
argc
,
argv
,
0
,
0
,
&
arguments
);
if
(
arguments
.
abort
)
error
(
10
,
0
,
"ABORTED"
);
if
(
arguments
.
abort
)
{
#ifdef __USE_GNU
error
(
10
,
0
,
"ABORTED"
);
#else
abort
();
#endif
}
if
(
taosCheckParam
(
&
arguments
)
<
0
)
{
exit
(
EXIT_FAILURE
);
...
...
src/os/linux/inc/os.h
浏览文件 @
b7471464
...
...
@@ -229,6 +229,14 @@ void taosSetCoreDump();
void
taosBlockSIGPIPE
();
#ifndef __USE_GNU
typedef
int
(
*
__compar_fn_t
)(
const
void
*
,
const
void
*
);
void
error
(
int
,
int
,
const
char
*
);
#ifndef PTHREAD_MUTEX_RECURSIVE_NP
#define PTHREAD_MUTEX_RECURSIVE_NP PTHREAD_MUTEX_RECURSIVE
#endif
#endif
#define BUILDIN_CLZL(val) __builtin_clzl(val)
#define BUILDIN_CLZ(val) __builtin_clz(val)
#define BUILDIN_CTZL(val) __builtin_ctzl(val)
...
...
src/os/linux/src/tlinux.c
浏览文件 @
b7471464
...
...
@@ -234,8 +234,15 @@ void *taosProcessAlarmSignal(void *tharg) {
timer_t
timerId
;
struct
sigevent
sevent
;
sevent
.
sigev_notify
=
SIGEV_THREAD_ID
;
sevent
.
_sigev_un
.
_tid
=
syscall
(
__NR_gettid
);
#ifndef __USE_GNU
sevent
.
sigev_notify
=
SIGEV_THREAD
;
sevent
.
sigev_value
.
sival_int
=
syscall
(
__NR_gettid
);
#else
sevent
.
sigev_notify
=
SIGEV_THREAD_ID
;
sevent
.
_sigev_un
.
_tid
=
syscall
(
__NR_gettid
);
#endif
sevent
.
sigev_signo
=
SIGALRM
;
if
(
timer_create
(
CLOCK_REALTIME
,
&
sevent
,
&
timerId
)
==
-
1
)
{
...
...
src/os/linux/src/tsystem.c
浏览文件 @
b7471464
...
...
@@ -27,12 +27,15 @@
#include <unistd.h>
#include <sys/types.h>
#include <sys/resource.h>
#include <sys/sysctl.h>
#include <sys/syscall.h>
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#ifndef __USE_GNU
#include <linux/sysctl.h>
#else
#include <sys/sysctl.h>
#endif
#include "tglobalcfg.h"
#include "tlog.h"
...
...
src/system/detail/inc/dnodeSystem.h
浏览文件 @
b7471464
...
...
@@ -21,6 +21,7 @@ extern "C" {
#endif
#include <stdint.h>
#include <pthread.h>
#define tsetModuleStatus(mod) \
{ tsModuleStatus |= (1 << mod); }
...
...
src/system/detail/src/vnodeImport.c
浏览文件 @
b7471464
...
...
@@ -579,7 +579,7 @@ static int vnodeCloseImportFiles(SMeterObj *pObj, SImportHandle *pHandle) {
SVnodeObj
*
pVnode
=
vnodeList
+
pObj
->
vnode
;
char
dpath
[
TSDB_FILENAME_LEN
]
=
"
\0
"
;
SCompInfo
compInfo
;
__
off_t
offset
=
0
;
off_t
offset
=
0
;
if
(
pVnode
->
nfd
>
0
)
{
offset
=
lseek
(
pVnode
->
nfd
,
0
,
SEEK_CUR
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录