From e98c432bf4ba32caa41f29610b1fbb7bd0cd3c98 Mon Sep 17 00:00:00 2001 From: eulerstorage Date: Wed, 8 Jan 2020 14:46:02 +0800 Subject: [PATCH 1/3] repackaged --- README.md | 39 --------------------------------------- mariadb-server-galera.te | 23 ----------------------- mariadb.spec | 18 ++++-------------- 3 files changed, 4 insertions(+), 76 deletions(-) delete mode 100644 README.md delete mode 100644 mariadb-server-galera.te diff --git a/README.md b/README.md deleted file mode 100644 index 96b5060..0000000 --- a/README.md +++ /dev/null @@ -1,39 +0,0 @@ -# mariadb - -#### 介绍 -{**以下是码云平台说明,您可以替换此简介** -码云是 OSCHINA 推出的基于 Git 的代码托管平台(同时支持 SVN)。专为开发者提供稳定、高效、安全的云端软件开发协作平台 -无论是个人、团队、或是企业,都能够用码云实现代码托管、项目管理、协作开发。企业项目请看 [https://gitee.com/enterprises](https://gitee.com/enterprises)} - -#### 软件架构 -软件架构说明 - - -#### 安装教程 - -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. 码云官方博客 [blog.gitee.com](https://blog.gitee.com) -3. 你可以 [https://gitee.com/explore](https://gitee.com/explore) 这个地址来了解码云上的优秀开源项目 -4. [GVP](https://gitee.com/gvp) 全称是码云最有价值开源项目,是码云综合评定出的优秀开源项目 -5. 码云官方提供的使用手册 [https://gitee.com/help](https://gitee.com/help) -6. 码云封面人物是一档用来展示码云会员风采的栏目 [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/) diff --git a/mariadb-server-galera.te b/mariadb-server-galera.te deleted file mode 100644 index bdce127..0000000 --- a/mariadb-server-galera.te +++ /dev/null @@ -1,23 +0,0 @@ - -module mariadb-server-galera 1.0; - -require { - type mysqld_t; - type rsync_exec_t; - type anon_inodefs_t; - type proc_net_t; - type kerberos_port_t; - class file { read execute execute_no_trans getattr open }; - class tcp_socket { name_bind name_connect }; - class process { setpgid siginh rlimitinh noatsecure }; -} - -# allow mysqld to run rsyncd -allow mysqld_t self:process setpgid; -allow mysqld_t rsync_exec_t:file { read execute execute_no_trans getattr open }; -allow mysqld_t anon_inodefs_t:file getattr; -allow mysqld_t proc_net_t:file { read open }; - -# allow rsyncd to listen on port 4444 -allow mysqld_t kerberos_port_t:tcp_socket { name_bind name_connect }; - diff --git a/mariadb.spec b/mariadb.spec index c6dd079..30d908f 100644 --- a/mariadb.spec +++ b/mariadb.spec @@ -2,14 +2,13 @@ Name: mariadb Version: 10.3.9 -Release: 4 +Release: 5 Epoch: 3 Summary: One of the most popular database servers License: GPLv2 with exceptions and LGPLv2 and BSD URL: http://mariadb.org Source0: https://downloads.mariadb.org/interstitial/mariadb-%{version}/source/mariadb-%{version}.tar.gz -Source1: mariadb-server-galera.te BuildRequires: selinux-policy-devel, cmake, gcc-c++ BuildRequires: systemd, systemd-devel, multilib-rpm-config @@ -191,9 +190,6 @@ This contains test suitte for the developing of MariaDB. %autosetup -n %{name}-%{version} -p1 find . -name "*.jar" -type f -exec rm --verbose -f {} \; -mkdir selinux -sed 's/mariadb-server-galera/%{name}-server-galera/' %{SOURCE1} > selinux/%{name}-server-galera.te - pcre_maj=`grep '^m4_define(pcre_major' pcre/configure.ac | sed -r 's/^m4_define\(pcre_major, \[([0-9]+)\]\)/\1/'` pcre_min=`grep '^m4_define(pcre_minor' pcre/configure.ac | sed -r 's/^m4_define\(pcre_minor, \[([0-9]+)\]\)/\1/'` @@ -282,8 +278,6 @@ cmake -L %make_build VERBOSE=1 -make -C selinux -f /usr/share/selinux/devel/Makefile %{name}-server-galera.pp - %install %make_install @@ -315,10 +309,6 @@ rm %{buildroot}%{_libexecdir}/rcmysql rm %{buildroot}%{_tmpfilesdir}/tmpfiles.conf echo "d %{_rundir}/%{name} 0755 mysql mysql -" >>%{buildroot}%{_tmpfilesdir}/%{name}.conf - -install -p -m 644 -D selinux/%{name}-server-galera.pp %{buildroot}%{_datadir}/selinux/packages/%{name}/%{name}-server-galera.pp - - mv %{buildroot}%{_datadir}/mysql-test/lib/My/SafeProcess/my_safe_process %{buildroot}%{_bindir} ln -s ../../../../../bin/my_safe_process %{buildroot}%{_datadir}/mysql-test/lib/My/SafeProcess/my_safe_process @@ -408,7 +398,6 @@ export MTR_BUILD_THREAD=%{__isa_bits} semanage port -a -t mysqld_port_t -p tcp 4568 &> /dev/null || : semanage port -a -t mysqld_port_t -p tcp 4567 &> /dev/null || : semanage port -a -t mysqld_port_t -p udp 4567 &> /dev/null || : -semodule -i %{_datadir}/selinux/packages/%{name}/%{name}-server-galera.pp &> /dev/null || : %post server %systemd_post %{name}.service @@ -555,8 +544,6 @@ fi %{_bindir}/galera_new_cluster %{_bindir}/galera_recovery %{_datadir}/%{name}/systemd/use_galera_new_cluster.conf -%{_datadir}/selinux/packages/%{name}/%{name}-server-galera.pp - %files gssapi-server %config(noreplace) %{_sysconfdir}/my.cnf.d/auth_gssapi.cnf @@ -611,6 +598,9 @@ fi %changelog +* Wed Jan 8 2020 openEuler Buildteam - 3:10.3.9-5 +- Repackaged + * Tue Dec 31 2019 openEuler Buildteam - 3:10.3.9-4 - Package rewrap and update the release number -- Gitee From eebb6126dac221074af986804af461433bf3e75e Mon Sep 17 00:00:00 2001 From: eulerstorage Date: Mon, 13 Jan 2020 09:48:10 +0800 Subject: [PATCH 2/3] test --- README.md | 39 +++++++++++++++++++++++++++++++++++++++ mariadb-server-galera.te | 23 +++++++++++++++++++++++ mariadb.spec | 18 ++++++++++++++---- 3 files changed, 76 insertions(+), 4 deletions(-) create mode 100644 README.md create mode 100644 mariadb-server-galera.te diff --git a/README.md b/README.md new file mode 100644 index 0000000..96b5060 --- /dev/null +++ b/README.md @@ -0,0 +1,39 @@ +# mariadb + +#### 介绍 +{**以下是码云平台说明,您可以替换此简介** +码云是 OSCHINA 推出的基于 Git 的代码托管平台(同时支持 SVN)。专为开发者提供稳定、高效、安全的云端软件开发协作平台 +无论是个人、团队、或是企业,都能够用码云实现代码托管、项目管理、协作开发。企业项目请看 [https://gitee.com/enterprises](https://gitee.com/enterprises)} + +#### 软件架构 +软件架构说明 + + +#### 安装教程 + +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. 码云官方博客 [blog.gitee.com](https://blog.gitee.com) +3. 你可以 [https://gitee.com/explore](https://gitee.com/explore) 这个地址来了解码云上的优秀开源项目 +4. [GVP](https://gitee.com/gvp) 全称是码云最有价值开源项目,是码云综合评定出的优秀开源项目 +5. 码云官方提供的使用手册 [https://gitee.com/help](https://gitee.com/help) +6. 码云封面人物是一档用来展示码云会员风采的栏目 [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/) diff --git a/mariadb-server-galera.te b/mariadb-server-galera.te new file mode 100644 index 0000000..bdce127 --- /dev/null +++ b/mariadb-server-galera.te @@ -0,0 +1,23 @@ + +module mariadb-server-galera 1.0; + +require { + type mysqld_t; + type rsync_exec_t; + type anon_inodefs_t; + type proc_net_t; + type kerberos_port_t; + class file { read execute execute_no_trans getattr open }; + class tcp_socket { name_bind name_connect }; + class process { setpgid siginh rlimitinh noatsecure }; +} + +# allow mysqld to run rsyncd +allow mysqld_t self:process setpgid; +allow mysqld_t rsync_exec_t:file { read execute execute_no_trans getattr open }; +allow mysqld_t anon_inodefs_t:file getattr; +allow mysqld_t proc_net_t:file { read open }; + +# allow rsyncd to listen on port 4444 +allow mysqld_t kerberos_port_t:tcp_socket { name_bind name_connect }; + diff --git a/mariadb.spec b/mariadb.spec index 30d908f..c6dd079 100644 --- a/mariadb.spec +++ b/mariadb.spec @@ -2,13 +2,14 @@ Name: mariadb Version: 10.3.9 -Release: 5 +Release: 4 Epoch: 3 Summary: One of the most popular database servers License: GPLv2 with exceptions and LGPLv2 and BSD URL: http://mariadb.org Source0: https://downloads.mariadb.org/interstitial/mariadb-%{version}/source/mariadb-%{version}.tar.gz +Source1: mariadb-server-galera.te BuildRequires: selinux-policy-devel, cmake, gcc-c++ BuildRequires: systemd, systemd-devel, multilib-rpm-config @@ -190,6 +191,9 @@ This contains test suitte for the developing of MariaDB. %autosetup -n %{name}-%{version} -p1 find . -name "*.jar" -type f -exec rm --verbose -f {} \; +mkdir selinux +sed 's/mariadb-server-galera/%{name}-server-galera/' %{SOURCE1} > selinux/%{name}-server-galera.te + pcre_maj=`grep '^m4_define(pcre_major' pcre/configure.ac | sed -r 's/^m4_define\(pcre_major, \[([0-9]+)\]\)/\1/'` pcre_min=`grep '^m4_define(pcre_minor' pcre/configure.ac | sed -r 's/^m4_define\(pcre_minor, \[([0-9]+)\]\)/\1/'` @@ -278,6 +282,8 @@ cmake -L %make_build VERBOSE=1 +make -C selinux -f /usr/share/selinux/devel/Makefile %{name}-server-galera.pp + %install %make_install @@ -309,6 +315,10 @@ rm %{buildroot}%{_libexecdir}/rcmysql rm %{buildroot}%{_tmpfilesdir}/tmpfiles.conf echo "d %{_rundir}/%{name} 0755 mysql mysql -" >>%{buildroot}%{_tmpfilesdir}/%{name}.conf + +install -p -m 644 -D selinux/%{name}-server-galera.pp %{buildroot}%{_datadir}/selinux/packages/%{name}/%{name}-server-galera.pp + + mv %{buildroot}%{_datadir}/mysql-test/lib/My/SafeProcess/my_safe_process %{buildroot}%{_bindir} ln -s ../../../../../bin/my_safe_process %{buildroot}%{_datadir}/mysql-test/lib/My/SafeProcess/my_safe_process @@ -398,6 +408,7 @@ export MTR_BUILD_THREAD=%{__isa_bits} semanage port -a -t mysqld_port_t -p tcp 4568 &> /dev/null || : semanage port -a -t mysqld_port_t -p tcp 4567 &> /dev/null || : semanage port -a -t mysqld_port_t -p udp 4567 &> /dev/null || : +semodule -i %{_datadir}/selinux/packages/%{name}/%{name}-server-galera.pp &> /dev/null || : %post server %systemd_post %{name}.service @@ -544,6 +555,8 @@ fi %{_bindir}/galera_new_cluster %{_bindir}/galera_recovery %{_datadir}/%{name}/systemd/use_galera_new_cluster.conf +%{_datadir}/selinux/packages/%{name}/%{name}-server-galera.pp + %files gssapi-server %config(noreplace) %{_sysconfdir}/my.cnf.d/auth_gssapi.cnf @@ -598,9 +611,6 @@ fi %changelog -* Wed Jan 8 2020 openEuler Buildteam - 3:10.3.9-5 -- Repackaged - * Tue Dec 31 2019 openEuler Buildteam - 3:10.3.9-4 - Package rewrap and update the release number -- Gitee From 9582b349324332474b7909768a2ad40171e535ea Mon Sep 17 00:00:00 2001 From: eulerstorage Date: Mon, 13 Jan 2020 10:50:39 +0800 Subject: [PATCH 3/3] test1 --- mariadb.spec | 3 +++ remove-test.list | 61 ++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 64 insertions(+) create mode 100644 remove-test.list diff --git a/mariadb.spec b/mariadb.spec index c6dd079..afc6c4b 100644 --- a/mariadb.spec +++ b/mariadb.spec @@ -10,6 +10,7 @@ URL: http://mariadb.org Source0: https://downloads.mariadb.org/interstitial/mariadb-%{version}/source/mariadb-%{version}.tar.gz Source1: mariadb-server-galera.te +Source13: remove-test.list BuildRequires: selinux-policy-devel, cmake, gcc-c++ BuildRequires: systemd, systemd-devel, multilib-rpm-config @@ -191,6 +192,8 @@ This contains test suitte for the developing of MariaDB. %autosetup -n %{name}-%{version} -p1 find . -name "*.jar" -type f -exec rm --verbose -f {} \; +cat %{SOURCE13} | tee -a mysql-test/unstable-tests + mkdir selinux sed 's/mariadb-server-galera/%{name}-server-galera/' %{SOURCE1} > selinux/%{name}-server-galera.te diff --git a/remove-test.list b/remove-test.list new file mode 100644 index 0000000..d339bf0 --- /dev/null +++ b/remove-test.list @@ -0,0 +1,61 @@ +# The SSL test are failing correctly. Fro more explanation, see: +# https://jira.mariadb.org/browse/MDEV-8404?focusedCommentId=84275&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-84275 +main.ssl_7937 : #1399847 +main.ssl_crl_clients : #1399847 +main.ssl_cert_verify : + +main.ssl_8k_key : + +# From 10.3.9 +main.openssl_1 : +main.openssl_6975 : +main.ssl : +main.ssl_cipher : + +# +perfschema.nesting : #1399847 +perfschema.socket_summary_by_instance_func : #1399847 +perfschema.socket_summary_by_event_name_func : + +# ------------------------------ +# Tests that fails because of 'Self Signed Certificate in the Certificate Chain' +perfschema.cnf_option : + +rpl.rpl_row_img_blobs : +rpl.rpl_row_img_eng_min : +rpl.rpl_row_img_eng_noblob : + +sys_vars.slave_parallel_threads_basic : + +# ------------------------------ +# Fails since 10.1.12 +innodb.innodb_defrag_binlog : + +# on x86_64 after 10.2.12 and 10.2.13 after some unidentified change in Rawhide buildroot +mroonga/storage.index_multiple_column_range_all_used_less_than : +mroonga/storage.index_multiple_column_range_all_used_less_than_or_equal : +mroonga/storage.index_multiple_column_range_partially_used_have_prefix_less_than : +mroonga/storage.index_multiple_column_range_partially_used_have_prefix_less_than_or_equal : +mroonga/storage.index_multiple_column_range_partially_used_no_prefix_less_than : +mroonga/storage.index_multiple_column_range_partially_used_no_prefix_less_than_or_equal : +mroonga/storage.optimization_order_limit_optimized_datetime_less_than : +mroonga/storage.optimization_order_limit_optimized_datetime_less_than_or_equal : + +# Fails everywhere since 10.2.15 +main.userstat : + +# Fails on x86_64 since 10.2.15 +rocksdb.bulk_load_errors : +rocksdb.index_merge_rocksdb : +rocksdb.index_merge_rocksdb2 : +rocksdb.read_only_tx : +rocksdb_rpl.mdev12179 : +rocksdb.shutdown : +rocksdb.2pc_group_commit : + +# Fails on ppc and arm since 10.2.15 +innodb_gis.rtree_compress2 : +parts.partition_alter4_innodb : + +# Fails from 10.3.9 +encryption.innodb-redo-badkey : -- Gitee