Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
b5a1246f
T
TDengine
项目概览
taosdata
/
TDengine
1 年多 前同步成功
通知
1185
Star
22016
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看板
未验证
提交
b5a1246f
编写于
3月 28, 2023
作者:
sangshuduo
提交者:
GitHub
3月 28, 2023
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix: post script add jemalloc (#20672)
* fix: tools/post.sh to ldconfig for jemalloc * fix: rpm spec for jemalloc
上级
4ba0fb97
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
68 addition
and
26 deletion
+68
-26
packaging/rpm/tdengine.spec
packaging/rpm/tdengine.spec
+14
-26
packaging/tools/post.sh
packaging/tools/post.sh
+54
-0
未找到文件。
packaging/rpm/tdengine.spec
浏览文件 @
b5a1246f
...
...
@@ -90,45 +90,33 @@ cp %{_compiledir}/../include/libs/function/taosudf.h %{buildroot}%{homepat
cp -r %{_compiledir}/../examples/* %{buildroot}%{homepath}/examples
if [ -f %{_compiledir}/build/bin/jemalloc-config ]; then
mkdir -p %{buildroot}%{userlocalpath}/bin
mkdir -p %{buildroot}%{userlocalpath}/lib
mkdir -p %{buildroot}%{userlocalpath}/lib/pkgconfig
mkdir -p %{buildroot}%{userlocalpath}/include
mkdir -p %{buildroot}%{userlocalpath}/include/jemalloc
mkdir -p %{buildroot}%{userlocalpath}/share
mkdir -p %{buildroot}%{userlocalpath}/share/doc
mkdir -p %{buildroot}%{userlocalpath}/share/doc/jemalloc
mkdir -p %{buildroot}%{userlocalpath}/share/man
mkdir -p %{buildroot}%{userlocalpath}/share/man/man3
cp %{_compiledir}/build/bin/jemalloc-config %{buildroot}%{userlocalpath}/bin/
mkdir -p %{buildroot}%{homepath}/jemalloc/ ||:
mkdir -p %{buildroot}%{homepath}/jemalloc/include/jemalloc/ ||:
mkdir -p %{buildroot}%{homepath}/jemalloc/lib/ ||:
mkdir -p %{buildroot}%{homepath}/jemalloc/lib/pkgconfig ||:
cp %{_compiledir}/build/bin/jemalloc-config %{buildroot}%{homepath}/jemalloc/bin
if [ -f %{_compiledir}/build/bin/jemalloc.sh ]; then
cp %{_compiledir}/build/bin/jemalloc.sh %{buildroot}%{
userlocalpath}/bin/
cp %{_compiledir}/build/bin/jemalloc.sh %{buildroot}%{
homepath}/jemalloc/bin
fi
if [ -f %{_compiledir}/build/bin/jeprof ]; then
cp %{_compiledir}/build/bin/jeprof %{buildroot}%{
userlocalpath}/bin/
cp %{_compiledir}/build/bin/jeprof %{buildroot}%{
homepath}/jemalloc/bin
fi
if [ -f %{_compiledir}/build/include/jemalloc/jemalloc.h ]; then
cp %{_compiledir}/build/include/jemalloc/jemalloc.h %{buildroot}%{
userlocalpath}
/include/jemalloc/
cp %{_compiledir}/build/include/jemalloc/jemalloc.h %{buildroot}%{
homepath}/jemalloc
/include/jemalloc/
fi
if [ -f %{_compiledir}/build/lib/libjemalloc.so.2 ]; then
cp %{_compiledir}/build/lib/libjemalloc.so.2 %{buildroot}%{
userlocalpath}/lib/
ln -sf libjemalloc.so.2 %{buildroot}%{
userlocalpath}
/lib/libjemalloc.so
cp %{_compiledir}/build/lib/libjemalloc.so.2 %{buildroot}%{
homepath}/jemalloc/lib
ln -sf libjemalloc.so.2 %{buildroot}%{
homepath}/jemalloc
/lib/libjemalloc.so
fi
if [ -f %{_compiledir}/build/lib/libjemalloc.a ]; then
cp %{_compiledir}/build/lib/libjemalloc.a %{buildroot}%{
userlocalpath}/lib/
cp %{_compiledir}/build/lib/libjemalloc.a %{buildroot}%{
homepath}/jemalloc/lib
fi
if [ -f %{_compiledir}/build/lib/libjemalloc_pic.a ]; then
cp %{_compiledir}/build/lib/libjemalloc_pic.a %{buildroot}%{
userlocalpath}/lib/
cp %{_compiledir}/build/lib/libjemalloc_pic.a %{buildroot}%{
homepath}/jemalloc/lib
fi
if [ -f %{_compiledir}/build/lib/pkgconfig/jemalloc.pc ]; then
cp %{_compiledir}/build/lib/pkgconfig/jemalloc.pc %{buildroot}%{userlocalpath}/lib/pkgconfig/
fi
if [ -f %{_compiledir}/build/share/doc/jemalloc/jemalloc.html ]; then
cp %{_compiledir}/build/share/doc/jemalloc/jemalloc.html %{buildroot}%{userlocalpath}/share/doc/jemalloc/
fi
if [ -f %{_compiledir}/build/share/man/man3/jemalloc.3 ]; then
cp %{_compiledir}/build/share/man/man3/jemalloc.3 %{buildroot}%{userlocalpath}/share/man/man3/
cp %{_compiledir}/build/lib/pkgconfig/jemalloc.pc %{buildroot}%{homepath}/jemalloc/lib/pkgconfig
fi
fi
...
...
packaging/tools/post.sh
浏览文件 @
b5a1246f
...
...
@@ -145,6 +145,59 @@ function install_include() {
log_print
"install include success"
}
function
install_jemalloc
()
{
jemalloc_dir
=
${
script_dir
}
/../jemalloc
if
[
-d
${
jemalloc_dir
}
]
;
then
${
csudo
}
/usr/bin/install
-c
-d
/usr/local/bin
if
[
-f
${
jemalloc_dir
}
/bin/jemalloc-config
]
;
then
${
csudo
}
/usr/bin/install
-c
-m
755
${
jemalloc_dir
}
/bin/jemalloc-config /usr/local/bin
fi
if
[
-f
${
jemalloc_dir
}
/bin/jemalloc.sh
]
;
then
${
csudo
}
/usr/bin/install
-c
-m
755
${
jemalloc_dir
}
/bin/jemalloc.sh /usr/local/bin
fi
if
[
-f
${
jemalloc_dir
}
/bin/jeprof
]
;
then
${
csudo
}
/usr/bin/install
-c
-m
755
${
jemalloc_dir
}
/bin/jeprof /usr/local/bin
fi
if
[
-f
${
jemalloc_dir
}
/include/jemalloc/jemalloc.h
]
;
then
${
csudo
}
/usr/bin/install
-c
-d
/usr/local/include/jemalloc
${
csudo
}
/usr/bin/install
-c
-m
644
${
jemalloc_dir
}
/include/jemalloc/jemalloc.h /usr/local/include/jemalloc
fi
if
[
-f
${
jemalloc_dir
}
/lib/libjemalloc.so.2
]
;
then
${
csudo
}
/usr/bin/install
-c
-d
/usr/local/lib
${
csudo
}
/usr/bin/install
-c
-m
755
${
jemalloc_dir
}
/lib/libjemalloc.so.2 /usr/local/lib
${
csudo
}
ln
-sf
libjemalloc.so.2 /usr/local/lib/libjemalloc.so
${
csudo
}
/usr/bin/install
-c
-d
/usr/local/lib
if
[
-f
${
jemalloc_dir
}
/lib/libjemalloc.a
]
;
then
${
csudo
}
/usr/bin/install
-c
-m
755
${
jemalloc_dir
}
/lib/libjemalloc.a /usr/local/lib
fi
if
[
-f
${
jemalloc_dir
}
/lib/libjemalloc_pic.a
]
;
then
${
csudo
}
/usr/bin/install
-c
-m
755
${
jemalloc_dir
}
/lib/libjemalloc_pic.a /usr/local/lib
fi
if
[
-f
${
jemalloc_dir
}
/lib/libjemalloc_pic.a
]
;
then
${
csudo
}
/usr/bin/install
-c
-d
/usr/local/lib/pkgconfig
${
csudo
}
/usr/bin/install
-c
-m
644
${
jemalloc_dir
}
/lib/pkgconfig/jemalloc.pc /usr/local/lib/pkgconfig
fi
fi
if
[
-f
${
jemalloc_dir
}
/share/doc/jemalloc/jemalloc.html
]
;
then
${
csudo
}
/usr/bin/install
-c
-d
/usr/local/share/doc/jemalloc
${
csudo
}
/usr/bin/install
-c
-m
644
${
jemalloc_dir
}
/share/doc/jemalloc/jemalloc.html /usr/local/share/doc/jemalloc
fi
if
[
-f
${
jemalloc_dir
}
/share/man/man3/jemalloc.3
]
;
then
${
csudo
}
/usr/bin/install
-c
-d
/usr/local/share/man/man3
${
csudo
}
/usr/bin/install
-c
-m
644
${
jemalloc_dir
}
/share/man/man3/jemalloc.3 /usr/local/share/man/man3
fi
if
[
-d
/etc/ld.so.conf.d
]
;
then
echo
"/usr/local/lib"
|
${
csudo
}
tee
/etc/ld.so.conf.d/jemalloc.conf
>
/dev/null
||
echo
-e
"failed to write /etc/ld.so.conf.d/jemalloc.conf"
${
csudo
}
ldconfig
else
echo
"/etc/ld.so.conf.d not found!"
fi
fi
}
function
install_lib
()
{
log_print
"start install lib from
${
lib_dir
}
to
${
lib_link_dir
}
"
${
csudo
}
rm
-f
${
lib_link_dir
}
/libtaos
*
||
:
...
...
@@ -663,6 +716,7 @@ function install_TDengine() {
# Install include, lib, binary and service
install_include
&&
install_lib
&&
install_jemalloc
install_bin
if
[[
"
$?
"
!=
0
]]
;
then
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录