diff --git a/README.en.md b/README.en.md deleted file mode 100644 index f10c679..0000000 --- a/README.en.md +++ /dev/null @@ -1,36 +0,0 @@ -# oceanbase-ce - -#### Description -OceanBase is a distributed relational database - -#### Software Architecture -Software architecture description - -#### Installation - -1. xxxx -2. xxxx -3. xxxx - -#### Instructions - -1. xxxx -2. xxxx -3. xxxx - -#### Contribution - -1. Fork the repository -2. Create Feat_xxx branch -3. Commit your code -4. Create Pull Request - - -#### Gitee Feature - -1. You can use Readme\_XXX.md to support different languages, such as Readme\_en.md, Readme\_zh.md -2. Gitee blog [blog.gitee.com](https://blog.gitee.com) -3. Explore open source project [https://gitee.com/explore](https://gitee.com/explore) -4. The most valuable open source project [GVP](https://gitee.com/gvp) -5. The manual of Gitee [https://gitee.com/help](https://gitee.com/help) -6. The most popular members [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/) diff --git a/README.md b/README.md deleted file mode 100644 index b7ad817..0000000 --- a/README.md +++ /dev/null @@ -1,37 +0,0 @@ -# oceanbase-ce - -#### 介绍 -OceanBase is a distributed relational database - -#### 软件架构 -软件架构说明 - - -#### 安装教程 - -1. xxxx -2. xxxx -3. xxxx - -#### 使用说明 - -1. xxxx -2. xxxx -3. xxxx - -#### 参与贡献 - -1. Fork 本仓库 -2. 新建 Feat_xxx 分支 -3. 提交代码 -4. 新建 Pull Request - - -#### 特技 - -1. 使用 Readme\_XXX.md 来支持不同的语言,例如 Readme\_en.md, Readme\_zh.md -2. Gitee 官方博客 [blog.gitee.com](https://blog.gitee.com) -3. 你可以 [https://gitee.com/explore](https://gitee.com/explore) 这个地址来了解 Gitee 上的优秀开源项目 -4. [GVP](https://gitee.com/gvp) 全称是 Gitee 最有价值开源项目,是综合评定出的优秀开源项目 -5. Gitee 官方提供的使用手册 [https://gitee.com/help](https://gitee.com/help) -6. Gitee 封面人物是一档用来展示 Gitee 会员风采的栏目 [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/) diff --git a/diff.patch b/diff.patch new file mode 100644 index 0000000..1de3e92 --- /dev/null +++ b/diff.patch @@ -0,0 +1,364 @@ +diff --git a/cmake/RPM.cmake b/cmake/RPM.cmake +index f0cec90..9affad8 100644 +--- a/cmake/RPM.cmake ++++ b/cmake/RPM.cmake +@@ -230,171 +230,6 @@ install(FILES + DESTINATION include + COMPONENT sql-parser) + +-## oceanbsae-table +-install(FILES +- deps/oblib/src/common/data_buffer.h +- deps/oblib/src/common/ob_accuracy.h +- deps/oblib/src/common/ob_action_flag.h +- deps/oblib/src/common/ob_common_utility.h +- deps/oblib/src/common/ob_range.h +- deps/oblib/src/common/ob_region.h +- deps/oblib/src/common/ob_role.h +- deps/oblib/src/common/ob_string_buf.h +- deps/oblib/src/common/ob_string_buf.ipp +- deps/oblib/src/common/ob_timeout_ctx.h +- deps/oblib/src/common/ob_zerofill_info.h +- deps/oblib/src/common/ob_zone.h +- deps/oblib/src/common/object/ob_obj_type.h +- deps/oblib/src/common/object/ob_object.h +- deps/oblib/src/common/rowkey/ob_rowkey.h +- deps/oblib/src/common/rowkey/ob_rowkey_info.h +- deps/oblib/src/lib/alloc/abit_set.h +- deps/oblib/src/lib/alloc/alloc_assist.h +- deps/oblib/src/lib/alloc/alloc_func.h +- deps/oblib/src/lib/alloc/alloc_struct.h +- deps/oblib/src/lib/alloc/block_set.h +- deps/oblib/src/lib/alloc/ob_malloc_allocator.h +- deps/oblib/src/lib/alloc/ob_tenant_ctx_allocator.h +- deps/oblib/src/lib/alloc/object_mgr.h +- deps/oblib/src/lib/alloc/object_set.h +- deps/oblib/src/lib/allocator/ob_allocator.h +- deps/oblib/src/lib/allocator/ob_cached_allocator.h +- deps/oblib/src/lib/allocator/ob_concurrent_fifo_allocator.h +- deps/oblib/src/lib/allocator/ob_fifo_allocator.h +- deps/oblib/src/lib/allocator/ob_lf_fifo_allocator.h +- deps/oblib/src/lib/allocator/ob_malloc.h +- deps/oblib/src/lib/allocator/ob_mod_define.h +- deps/oblib/src/lib/allocator/ob_pcounter.h +- deps/oblib/src/lib/allocator/ob_pooled_allocator.h +- deps/oblib/src/lib/allocator/ob_retire_station.h +- deps/oblib/src/lib/allocator/ob_small_allocator.h +- deps/oblib/src/lib/allocator/ob_tc_malloc.h +- deps/oblib/src/lib/allocator/page_arena.h +- deps/oblib/src/lib/atomic/ob_atomic.h +- deps/oblib/src/lib/atomic/ob_atomic_reference.h +- deps/oblib/src/lib/charset/ob_charset.h +- deps/oblib/src/lib/charset/ob_config.h +- deps/oblib/src/lib/charset/ob_ctype.h +- deps/oblib/src/lib/charset/ob_mysql_global.h +- deps/oblib/src/lib/checksum/ob_crc64.h +- deps/oblib/src/lib/container/ob_array.h +- deps/oblib/src/lib/container/ob_array_helper.h +- deps/oblib/src/lib/container/ob_array_iterator.h +- deps/oblib/src/lib/container/ob_array_serialization.h +- deps/oblib/src/lib/container/ob_array_wrap.h +- deps/oblib/src/lib/container/ob_bit_set.h +- deps/oblib/src/lib/container/ob_fixed_array.h +- deps/oblib/src/lib/container/ob_iarray.h +- deps/oblib/src/lib/container/ob_se_array.h +- deps/oblib/src/lib/container/ob_vector.h +- deps/oblib/src/lib/container/ob_vector.ipp +- deps/oblib/src/lib/core_local/ob_core_local_storage.h +- deps/oblib/src/lib/file/config.h +- deps/oblib/src/lib/file/ob_string_util.h +- deps/oblib/src/lib/hash/mprotect.h +- deps/oblib/src/lib/hash/ob_array_index_hash_set.h +- deps/oblib/src/lib/hash/ob_hashmap.h +- deps/oblib/src/lib/hash/ob_hashset.h +- deps/oblib/src/lib/hash/ob_hashtable.h +- deps/oblib/src/lib/hash/ob_hashutils.h +- deps/oblib/src/lib/hash/ob_iteratable_hashmap.h +- deps/oblib/src/lib/hash/ob_linear_hash_map.h +- deps/oblib/src/lib/hash/ob_placement_hashutils.h +- deps/oblib/src/lib/hash/ob_pointer_hashmap.h +- deps/oblib/src/lib/hash/ob_serialization.h +- deps/oblib/src/lib/hash_func/murmur_hash.h +- deps/oblib/src/lib/hash_func/ob_hash_func.h +- deps/oblib/src/lib/json/ob_yson.h +- deps/oblib/src/lib/json/ob_yson_encode.h +- deps/oblib/src/lib/list/ob_dlink_node.h +- deps/oblib/src/lib/list/ob_dlist.h +- deps/oblib/src/lib/list/ob_list.h +- deps/oblib/src/lib/lock/cond.h +- deps/oblib/src/lib/lock/ob_lock.h +- deps/oblib/src/lib/lock/ob_monitor.h +- deps/oblib/src/lib/lock/mutex.h +- deps/oblib/src/lib/lock/ob_bucket_lock.h +- deps/oblib/src/lib/lock/ob_drw_lock.h +- deps/oblib/src/lib/lock/ob_latch.h +- deps/oblib/src/lib/lock/ob_lock_guard.h +- deps/oblib/src/lib/lock/ob_mutex.h +- deps/oblib/src/lib/lock/ob_small_spin_lock.h +- deps/oblib/src/lib/lock/ob_spin_lock.h +- deps/oblib/src/lib/lock/ob_spin_rwlock.h +- deps/oblib/src/lib/lock/ob_thread_cond.h +- deps/oblib/src/lib/lock/ob_rwlock.h +- deps/oblib/src/lib/metrics/ob_counter.h +- deps/oblib/src/lib/net/ob_addr.h +- deps/oblib/src/lib/net/ob_net_util.h +- deps/oblib/src/lib/number/ob_number_v2.h +- deps/oblib/src/lib/ob_date_unit_type.h +- deps/oblib/src/lib/ob_define.h +- deps/oblib/src/lib/ob_errno.h +- deps/oblib/src/lib/ob_name_def.h +- deps/oblib/src/lib/ob_name_id_def.h +- deps/oblib/src/lib/oblog/ob_log.h +- deps/oblib/src/lib/oblog/ob_log_module.h +- deps/oblib/src/lib/oblog/ob_log_print_kv.h +- deps/oblib/src/lib/oblog/ob_trace_log.h +- deps/oblib/src/lib/profile/ob_atomic_event.h +- deps/oblib/src/lib/queue/ob_dedup_queue.h +- deps/oblib/src/lib/queue/ob_fixed_queue.h +- deps/oblib/src/lib/queue/ob_link.h +- deps/oblib/src/lib/random/ob_random.h +- deps/oblib/src/lib/resource/achunk_mgr.h +- deps/oblib/src/lib/resource/ob_cache_washer.h +- deps/oblib/src/lib/resource/ob_resource_mgr.h +- deps/oblib/src/lib/stat/ob_latch_define.h +- deps/oblib/src/lib/string/ob_fixed_length_string.h +- deps/oblib/src/lib/string/ob_string.h +- deps/oblib/src/lib/string/ob_strings.h +- deps/oblib/src/lib/thread_local/ob_tsi_factory.h +- deps/oblib/src/lib/thread_local/ob_tsi_utils.h +- deps/oblib/src/lib/time/Time.h +- deps/oblib/src/lib/time/ob_time_utility.h +- deps/oblib/src/lib/timezone/ob_time_convert.h +- deps/oblib/src/lib/timezone/ob_timezone_info.h +- deps/oblib/src/lib/trace/ob_seq_event_recorder.h +- deps/oblib/src/lib/trace/ob_trace_event.h +- deps/oblib/src/lib/utility/ob_hang_fatal_error.h +- deps/oblib/src/lib/utility/ob_macro_utils.h +- deps/oblib/src/lib/utility/ob_print_kv.h +- deps/oblib/src/lib/utility/ob_print_utils.h +- deps/oblib/src/lib/utility/ob_rate_limiter.h +- deps/oblib/src/lib/utility/ob_serialization_helper.h +- deps/oblib/src/lib/utility/ob_template_utils.h +- deps/oblib/src/lib/utility/ob_unify_serialize.h +- deps/oblib/src/lib/utility/serialization.h +- deps/oblib/src/lib/utility/utility.h +- deps/oblib/src/lib/wait_event/ob_wait_class.h +- deps/oblib/src/lib/wait_event/ob_wait_event.h +- src/share/config/ob_common_config.h +- src/share/config/ob_config.h +- src/share/config/ob_config_helper.h +- src/share/mysql_errno.h +- src/share/object/ob_obj_cast.h +- src/share/partition_table/ob_partition_location.h +- src/share/table/ob_table.h +- src/share/table/ob_table_rpc_proxy.h +- src/share/table/ob_table_rpc_struct.h +- src/libtable/src/libobtable.h +- src/libtable/src/ob_table.h +- src/libtable/src/ob_hkv_table.h +- src/libtable/src/ob_pstore.h +- src/libtable/src/ob_table_service_client.h +- src/libtable/src/ob_table_service_config.h +- src/libtable/src/ob_table_define.h +- DESTINATION include +- COMPONENT table) +- +-install(FILES +- src/libtable/examples/ob_pstore_example.cpp +- src/libtable/examples/ob_kvtable_example.cpp +- src/libtable/examples/ob_table_example.cpp +- src/libtable/examples/example_makefile.mk +- DESTINATION examples +- COMPONENT table) +- + if (OB_BUILD_LIBOBTABLE) + + if (ENABLE_THIN_LTO) +@@ -406,14 +241,6 @@ if (OB_BUILD_LIBOBTABLE) + COMMAND_EXPAND_LISTS) + list(APPEND BITCODE_TO_ELF_LIST libobtable_static_to_elf) + endif() +- +- install(PROGRAMS +- ${CMAKE_BINARY_DIR}/src/libtable/src/libobtable.so +- ${CMAKE_BINARY_DIR}/src/libtable/src/libobtable.so.1 +- ${CMAKE_BINARY_DIR}/src/libtable/src/libobtable.so.1.0.0 +- ${CMAKE_BINARY_DIR}/src/libtable/src/libobtable_static.a +- DESTINATION lib +- COMPONENT table) + endif() + + if(OB_BUILD_OPENSOURCE) +diff --git a/deps/init/dep_create.sh b/deps/init/dep_create.sh +index ad5f149..aaa0b41 100644 +--- a/deps/init/dep_create.sh ++++ b/deps/init/dep_create.sh +@@ -80,6 +80,9 @@ function get_os_release() { + fedora) + version_ge "33" && compat_centos7 && return + ;; ++ openEuler) ++ version_ge "22" && compat_centos9 && return ++ ;; + opensuse-leap) + version_ge "15" && compat_centos7 && return + ;; +@@ -110,6 +113,9 @@ function get_os_release() { + version_ge "8.0" && OS_RELEASE=8 && return + version_ge "7.0" && OS_RELEASE=7 && return + ;; ++ openEuler) ++ version_ge "22" && compat_centos9 && return ++ ;; + ubuntu) + version_ge "22.04" && compat_centos9 && return + version_ge "16.04" && compat_centos7 && return +diff --git a/deps/init/oceanbase.el7.aarch64.deps b/deps/init/oceanbase.el7.aarch64.deps +index 56c510d..1397b9c 100644 +--- a/deps/init/oceanbase.el7.aarch64.deps ++++ b/deps/init/oceanbase.el7.aarch64.deps +@@ -1,12 +1,12 @@ + [target-default] + os=7 + arch=aarch64 +-repo=http://mirrors.aliyun.com/oceanbase/development-kit/el/7/aarch64/ ++repo=https://mirrors.oceanbase.com/oceanbase/development-kit/el/7/aarch64/ + + [target-community] + os=7 + arch=aarch64 +-repo=http://mirrors.aliyun.com/oceanbase/community/stable/el/7/aarch64/ ++repo=https://mirrors.oceanbase.com/oceanbase/community/stable/el/7/aarch64/ + + + [deps] +diff --git a/deps/init/oceanbase.el7.x86_64.deps b/deps/init/oceanbase.el7.x86_64.deps +index e86e501..5b83a69 100644 +--- a/deps/init/oceanbase.el7.x86_64.deps ++++ b/deps/init/oceanbase.el7.x86_64.deps +@@ -1,13 +1,13 @@ + [target-default] + os=7 + arch=x86_64 +-repo=http://mirrors.aliyun.com/oceanbase/development-kit/el/7/x86_64/ ++repo=https://mirrors.oceanbase.com/oceanbase/development-kit/el/7/x86_64/ + + + [target-community] + os=7 + arch=x86_64 +-repo=http://mirrors.aliyun.com/oceanbase/community/stable/el/7/x86_64/ ++repo=https://mirrors.oceanbase.com/oceanbase/community/stable/el/7/x86_64/ + + + [deps] +diff --git a/deps/init/oceanbase.el8.aarch64.deps b/deps/init/oceanbase.el8.aarch64.deps +index 2b8612c..919cd33 100644 +--- a/deps/init/oceanbase.el8.aarch64.deps ++++ b/deps/init/oceanbase.el8.aarch64.deps +@@ -1,12 +1,12 @@ + [target-default] + os=8 + arch=aarch64 +-repo=http://mirrors.aliyun.com/oceanbase/development-kit/el/8/aarch64/ ++repo=https://mirrors.oceanbase.com/oceanbase/development-kit/el/8/aarch64/ + + [target-community] + os=8 + arch=aarch64 +-repo=http://mirrors.aliyun.com/oceanbase/community/stable/el/8/aarch64/ ++repo=https://mirrors.oceanbase.com/oceanbase/community/stable/el/8/aarch64/ + + + [deps] +diff --git a/deps/init/oceanbase.el8.x86_64.deps b/deps/init/oceanbase.el8.x86_64.deps +index bda5fcc..db3c8a1 100644 +--- a/deps/init/oceanbase.el8.x86_64.deps ++++ b/deps/init/oceanbase.el8.x86_64.deps +@@ -1,12 +1,12 @@ + [target-default] + os=8 + arch=x86_64 +-repo=http://mirrors.aliyun.com/oceanbase/development-kit/el/8/x86_64/ ++repo=https://mirrors.oceanbase.com/oceanbase/development-kit/el/8/x86_64/ + + [target-community] + os=8 + arch=x86_64 +-repo=http://mirrors.aliyun.com/oceanbase/community/stable/el/8/x86_64/ ++repo=https://mirrors.oceanbase.com/oceanbase/community/stable/el/8/x86_64/ + + + [deps] +diff --git a/deps/init/oceanbase.el9.aarch64.deps b/deps/init/oceanbase.el9.aarch64.deps +index 136767c..07d4b9a 100644 +--- a/deps/init/oceanbase.el9.aarch64.deps ++++ b/deps/init/oceanbase.el9.aarch64.deps +@@ -1,17 +1,17 @@ + [target-default] + os=9 + arch=aarch64 +-repo=http://mirrors.aliyun.com/oceanbase/development-kit/el/8/aarch64/ ++repo=https://mirrors.oceanbase.com/oceanbase/development-kit/el/8/aarch64/ + + [target-community] + os=9 + arch=aarch64 +-repo=http://mirrors.aliyun.com/oceanbase/community/stable/el/8/aarch64/ ++repo=https://mirrors.oceanbase.com/oceanbase/community/stable/el/8/aarch64/ + + [target-apr-el9] + os=9 + arch=aarch64 +-repo=http://mirrors.aliyun.com/oceanbase/development-kit/el/9/aarch64/ ++repo=https://mirrors.oceanbase.com/oceanbase/development-kit/el/9/aarch64/ + + [deps] + devdeps-gtest-1.8.0-132022101316.el8.aarch64.rpm +@@ -46,8 +46,9 @@ obdevtools-gcc9-9.3.0-52022092914.el8.aarch64.rpm + obdevtools-llvm-11.0.1-312022092921.el8.aarch64.rpm + + [tools-deps] +-devdeps-oblogmsg-1.0-52022113019.el8.aarch64.rpm ++devdeps-oblogmsg-1.0-142024012415.el8.aarch64.rpm + devdeps-rocksdb-6.22.1.1-52022100420.el8.aarch64.rpm ++obshell-4.2.2.0-122024022614.el8.aarch64.rpm target=community + + [test-utils] + ob-deploy-1.6.0-41.el8.aarch64.rpm target=community +diff --git a/deps/init/oceanbase.el9.x86_64.deps b/deps/init/oceanbase.el9.x86_64.deps +index e9712b3..a359e80 100644 +--- a/deps/init/oceanbase.el9.x86_64.deps ++++ b/deps/init/oceanbase.el9.x86_64.deps +@@ -1,17 +1,17 @@ + [target-default] + os=9 + arch=x86_64 +-repo=http://mirrors.aliyun.com/oceanbase/development-kit/el/8/x86_64/ ++repo=https://mirrors.oceanbase.com/oceanbase/development-kit/el/8/x86_64/ + + [target-community] + os=9 + arch=x86_64 +-repo=http://mirrors.aliyun.com/oceanbase/community/stable/el/8/x86_64/ ++repo=https://mirrors.oceanbase.com/oceanbase/community/stable/el/8/x86_64/ + + [target-apr-el9] + os=9 + arch=x86_64 +-repo=http://mirrors.aliyun.com/oceanbase/development-kit/el/9/x86_64/ ++repo=https://mirrors.oceanbase.com/oceanbase/development-kit/el/9/x86_64/ + + [deps] + devdeps-gtest-1.8.0-132022101316.el8.x86_64.rpm +@@ -47,8 +47,9 @@ obdevtools-gcc9-9.3.0-52022092914.el8.x86_64.rpm + obdevtools-llvm-11.0.1-312022092921.el8.x86_64.rpm + + [tools-deps] +-devdeps-oblogmsg-1.0-52022113019.el8.x86_64.rpm ++devdeps-oblogmsg-1.0-142024012415.el8.x86_64.rpm + devdeps-rocksdb-6.22.1.1-52022100420.el8.x86_64.rpm ++obshell-4.2.2.0-122024022614.el8.x86_64.rpm target=community + + [test-utils] + ob-deploy-1.6.0-41.el8.x86_64.rpm target=community diff --git a/oceanbase-ce-4.2.1.4.tar.gz b/oceanbase-ce-4.2.1.4.tar.gz new file mode 100644 index 0000000..847706e Binary files /dev/null and b/oceanbase-ce-4.2.1.4.tar.gz differ diff --git a/oceanbase-ce.spec b/oceanbase-ce.spec new file mode 100644 index 0000000..cea2de9 --- /dev/null +++ b/oceanbase-ce.spec @@ -0,0 +1,186 @@ +%define euler_release 104000052024022918 + +Name: oceanbase-ce +Version: 4.2.1.4 +Release: %{euler_release}%{?dist} +Summary: oceanbase-ce +Group: Applications/Databases +License: Mulan PubL v2. +Url: https://open.oceanbase.com/ +Vendor: OceanBase Inc. +Prefix: /home/admin/oceanbase +Requires: curl, jq, systemd, oceanbase-ce-libs = %{version} +BuildRequires: wget, rpm, cpio, make, glibc-devel, glibc-headers, binutils, m4, python3, libtool, libaio +Autoreq: 0 +Source0: oceanbase-ce-%{version}.tar.gz +Patch0: diff.patch + +%global daemon_name oceanbase +%define __os_install_post %{nil} +%define _prefix /home/admin/oceanbase +%description +OceanBase is a distributed relational database +%global __requires_exclude ^(/bin/bash|/usr/bin/.*)$ +%define _unpackaged_files_terminate_build 0 +%global _missing_build_ids_terminate_build 0 +%global arch %{_arch} +%global lto_jobs 10 +%global src_dir %{?src_dir} +%global _find_debuginfo_opts -g +%define __strip %{?src_dir}/deps/3rd/usr/local/oceanbase/devtools/bin/llvm-strip +%undefine __brp_mangle_shebangs +%global _buildsubdir %{name}-%{version}-%{release}.%{arch} +%define _debugsource_template %{nil} +%global debug_package %{nil} + +%package debuginfo +Summary: Debug information for OceanBase +Group: Development/Debug +%description debuginfo +This package provides debug information for package oceanbase-ce. +Debug information is useful when developing applications that use this +package or when debugging this package. + +%package libs +Summary: Libraries for OceanBase +Group: System Environment/Libraries +%description libs +This package contains libraries for OceanBase. + +%package libs-debuginfo +Summary: Debug information for OceanBase Libs +Group: Development/Debug +%description libs-debuginfo +This package provides debug information for package oceanbase-ce-libs. +Debug information is useful when developing applications that use this +package or when debugging this package. + +%package sql-parser +Summary: Sql Parser Libraries for OceanBase +Group: System Environment/Libraries +%description sql-parser +This package contains sql pareser libraries for OceanBase. + +%package utils +Summary: Tools for OceanBase +Group: Development/Tools +%description utils +This package contains tools for OceanBase. + +%package utils-debuginfo +Summary: Debug information for OceanBase Utils +Group: Development/Debug +%description utils-debuginfo +This package provides debug information for package oceanbase-ce-utils. +Debug information is useful when developing applications that use this +package or when debugging this package. + +%prep +%setup -q +%patch0 -p1 + +%build +chmod u+x build.sh +bash build.sh clean +bash build.sh release -DOB_BUILD_RPM=ON -DENABLE_FATAL_ERROR_HANG=OFF -DENABLE_AUTO_FDO=ON -DENABLE_THIN_LTO=ON \ + -DOB_STATIC_LINK_LGPL_DEPS=OFF -DCMAKE_INSTALL_PREFIX=%{_prefix} -DLTO_JOBS=%{lto_jobs} --init +cd build_release + +make observer ob_sql_proxy_parser_static obtable obtable_static ob_admin ob_error -j16; +make install DESTDIR=$RPM_BUILD_ROOT + +mv %{_buildrootdir}/%{_buildsubdir}/%{_prefix}/bin/obshell %{_builddir}/obshell +%{_rpmconfigdir}/find-debuginfo.sh %{?_find_debuginfo_opts} %{_builddir}/%{_buildsubdir}; %{nil} +mv %{_builddir}/obshell %{_buildrootdir}/%{_buildsubdir}/%{_prefix}/bin/obshell + +echo "/usr/lib/debug/%{_prefix}/bin/observer.debug" > %{buildroot}/debuginfo_filelist + +echo "/usr/lib/debug/%{_prefix}/lib/libaio.so.debug" > %{buildroot}/libs_debuginfo_filelist +echo "/usr/lib/debug/%{_prefix}/lib/libaio.so.1.debug" >> %{buildroot}/libs_debuginfo_filelist +echo "/usr/lib/debug/%{_prefix}/lib/libaio.so.1.0.1.debug" >> %{buildroot}/libs_debuginfo_filelist +echo "/usr/lib/debug/%{_prefix}/lib/libmariadb.so.debug" >> %{buildroot}/libs_debuginfo_filelist +echo "/usr/lib/debug/%{_prefix}/lib/libmariadb.so.3.debug" >> %{buildroot}/libs_debuginfo_filelist + +echo "/usr/lib/debug/usr/bin/ob_admin.debug" > %{buildroot}/utils_debuginfo_filelist +echo "/usr/lib/debug/usr/bin/ob_error.debug" >> %{buildroot}/utils_debuginfo_filelist + +# package infomation +%files +%defattr(-,root,root,0777) +%{_prefix}/admin +%{_prefix}/bin/import_srs_data.py +%{_prefix}/bin/import_time_zone_info.py +%{_prefix}/bin/observer +%{_prefix}/bin/obshell +%{_prefix}/etc/default_srs_data_mysql.sql +%{_prefix}/etc/fill_help_tables-ob.sql +%{_prefix}/etc/oceanbase_upgrade_dep.yml +%{_prefix}/etc/timezone_V1.log +%{_prefix}/etc/upgrade_checker.py +%{_prefix}/etc/upgrade_health_checker.py +%{_prefix}/etc/upgrade_post.py +%{_prefix}/etc/upgrade_pre.py +%{_prefix}/profile + +%files debuginfo -f %{buildroot}/debuginfo_filelist +%defattr(-,root,root,0777) + +%files libs +%defattr(-,root,root,0777) +%{_prefix}/lib/libaio.so +%{_prefix}/lib/libaio.so.1 +%{_prefix}/lib/libaio.so.1.0.1 +%{_prefix}/lib/libmariadb.so +%{_prefix}/lib/libmariadb.so.3 + +%files libs-debuginfo -f %{buildroot}/libs_debuginfo_filelist +%defattr(-,root,root,0777) + +%files sql-parser +%defattr(-,root,root,0777) +%{_prefix}/include/ob_item_type.h +%{_prefix}/include/ob_sql_mode.h +%{_prefix}/include/ob_sql_parser.h +%{_prefix}/include/parse_malloc.h +%{_prefix}/include/parse_node.h +%{_prefix}/include/parser_proxy_func.h +%{_prefix}/lib/libob_sql_proxy_parser_static.a + +%files utils +%defattr(-,root,root,0777) +/usr/bin/ob_admin +/usr/bin/ob_error + +%files utils-debuginfo -f %{buildroot}/utils_debuginfo_filelist +%defattr(-,root,root,0777) + +%post +echo "execute post install script" +cp -f %{_prefix}/profile/oceanbase.service /etc/systemd/system/oceanbase.service +chmod 644 /etc/systemd/system/oceanbase.service +chmod +x %{_prefix}/profile/oceanbase-service.sh +cp -f %{_prefix}/profile/oceanbase.cnf /etc/oceanbase.cnf +systemctl daemon-reload + +# telemetry +/bin/bash %{_prefix}/profile/telemetry.sh $1 >/dev/null 2>&1 + +%preun +echo "execute pre uninstall script" +systemctl stop %{daemon_name} +systemctl disable %{daemon_name} +/bin/bash %{_prefix}/profile/oceanbase-service.sh destroy +rm -f /etc/systemd/system/oceanbase.service /etc/oceanbase.cnf +systemctl daemon-reload + +# telemetry +/bin/bash %{_prefix}/profile/telemetry.sh $1 >/dev/null 2>&1 + +%postun +echo "execute post uninstall script" +rm -rf %{_prefix}/.meta %{_prefix}/log_obshell + +%changelog +* Mon Mar 18 2024 wangzelin - 4.2.1.4-104000052024022918 +- new features: support for packaging with spec files +- new features: support for packaging on euler