2626%global mysql_vendor Oracle and/or its affiliates
2727%global mysqldatadir /var/lib/mysql
2828
29+ # Pass --define 'with_cluster 1' to build with cluster support
30+ %{?with_cluster: %global cluster 1}
31+
2932# Regression tests may take a long time, override the default to skip them
3033%{!?runselftest:%global runselftest 1}
3134
3538%{!?compilation_comment_debug: %global compilation_comment_debug MySQL Community - GPL - Debug}
3639%{!?compilation_comment_server_release: %global compilation_comment_server_release MySQL Community Server - GPL}
3740%{!?compilation_comment_server_debug: %global compilation_comment_server_debug MySQL Community Server - GPL - Debug}
38- %{!?src_base: %global src_base mysql}
41+ %{!?src_base: %global src_base mysql%{?cluster:-cluster-gpl} }
3942
4043%global src_dir %{src_base}-@VERSION_SRC@
4144%global license_files_server %{src_dir}/LICENSE %{src_dir}/README
4851
4952%global min 8.0.11
5053
51- Name: mysql-%{product_suffix}
54+ Name: mysql%{?cluster:-cluster} -%{product_suffix}
5255Summary: A very fast and reliable SQL database server
5356Version: @MYSQL_NO_DASH_VERSION@
5457Release: 10@MYSQL_VERSION_EXTRA_DOT@%{?dist}
@@ -108,6 +111,9 @@ BuildRequires: sed
108111BuildRequires: systemd
109112BuildRequires: time
110113BuildRequires: zlib-devel
114+ %if 0%{?cluster}
115+ BuildRequires: /usr/bin/pathfix.py
116+ %endif
111117# For rpm => 4.9 only: https://fedoraproject.org/wiki/Packaging:AutoProvidesAndRequiresFiltering
112118%global _privatelibs libprotobuf.*
113119%global _privateperl perl\\((GD|hostnames|lib::mtr|lib::v1|mtr_|My::)
@@ -204,6 +210,7 @@ to run and administer a MySQL server.
204210Summary: The debug version of MySQL server
205211%if 0%{?commercial}
206212Requires: mysql-commercial-server = %{version}-%{release}
213+ Obsoletes: mysql-community-server-debug < %{version}-%{release}
207214%else
208215Requires: mysql-community-server = %{version}-%{release}
209216%endif
@@ -244,7 +251,6 @@ Provides: mysql-common%{?_isa} = %{version}-%{release}
244251This packages contains common files needed by MySQL client library and
245252MySQL database server.
246253
247-
248254%package test
249255Summary: Test suite for the MySQL database server
250256Requires: gzip
@@ -280,6 +286,10 @@ Requires: perl(Sys::Hostname)
280286Requires: perl(Time::HiRes)
281287Requires: perl(Time::localtime)
282288Requires: procps
289+ %if 0%{?cluster}
290+ Requires: %{name}-data-node%{?_isa} >= %{min}
291+ Requires: %{name}-management-server%{?_isa} >= %{min}
292+ %endif
283293%if 0%{?commercial}
284294Requires: mysql-commercial-server%{?_isa} >= %{min}
285295Obsoletes: mysql-community-test < %{version}-%{release}
@@ -375,6 +385,79 @@ Requires: mysql-router-community = %{version}-%{release}
375385This package contains the development header files and libraries
376386necessary to develop MySQL Router applications.
377387
388+ %if 0%{?cluster}
389+ %package management-server
390+ Summary: MySQL Cluster Management Server Daemon
391+ %description management-server
392+ This package contains the MySQL Cluster Management Server Daemon,
393+ which reads the cluster configuration file and distributes this
394+ information to all nodes in the cluster.
395+
396+ %package data-node
397+ Summary: MySQL Cluster Data Node Daemon
398+ %description data-node
399+ This package contains MySQL Cluster Data Node Daemon, it is the process
400+ that is used to handle all the data in tables using the NDB Cluster
401+ storage engine. It comes in two variants: ndbd and ndbmtd, the former
402+ is single threaded while the latter is multi-threaded.
403+
404+ %package auto-installer
405+ Summary: Web-based graphical configuration installer for MySQL Cluster
406+ Requires: %{name}-server%{?_isa} = %{version}-%{release}
407+ Requires: python-paramiko
408+ %description auto-installer
409+ This package contains the MySQL Cluster web-based graphical
410+ configuration installer, which can be used to set up and start or stop
411+ a MySQL Cluster on one or more host computers.
412+
413+ %package ndbclient
414+ Summary: Shared libraries for MySQL NDB storage engine client applications
415+ %description ndbclient
416+ This package contains the shared libraries for MySQL MySQL NDB storage
417+ engine client applications.
418+
419+ %package ndbclient-devel
420+ Summary: Development files for MySQL NDB storage engine client applications
421+ Requires: %{name}-devel%{?_isa} = %{version}-%{release}
422+ Requires: %{name}-ndbclient%{?_isa} = %{version}-%{release}
423+ %description ndbclient-devel
424+ This package contains the development header files and libraries
425+ necessary to develop client applications for MySQL NDB storage engine.
426+
427+ %if 0%{?ndb_nodejs_extras_path:1}
428+ %package nodejs
429+ Summary: Set of Node.js adapters for MySQL Cluster
430+ %description nodejs
431+ This package contains MySQL NoSQL Connector for JavaScript, a set of
432+ Node.js adapters for MySQL Cluster and MySQL Server, which make it
433+ possible to write JavaScript applications for Node.js using MySQL
434+ data.
435+ %endif
436+
437+ %package java
438+ Summary: MySQL Cluster Connector for Java
439+ %description java
440+ This package contains MySQL Cluster Connector for Java, which includes
441+ ClusterJ and ClusterJPA, a plugin for use with OpenJPA.
442+
443+ ClusterJ is a high level database API that is similar in style and
444+ concept to object-relational mapping persistence frameworks such as
445+ Hibernate and JPA.
446+
447+ ClusterJPA is an OpenJPA implementation for MySQL Cluster that
448+ attempts to offer the best possible performance by leveraging the
449+ strengths of both ClusterJ and JDBC.
450+
451+ %package memcached
452+ Summary: Memcached API for MySQL Cluster implemented as a loadable storage engine for memcached
453+ Requires: %{name}-server%{?_isa} = %{version}-%{release}
454+ %description memcached
455+ This package contains the standard memcached server and a loadable
456+ storage engine for memcached using the Memcache API for MySQL Cluster
457+ to provide a persistent MySQL Cluster data store.
458+
459+ %endif # cluster
460+
378461%prep
379462%setup -q -T -a 0 -a 1 -c -n %{src_dir}
380463
@@ -406,7 +489,7 @@ mkdir debug
406489 -DCMAKE_C_FLAGS="$optflags" \
407490 -DCMAKE_CXX_FLAGS="$optflags" \
408491 -DWITH_SYSTEMD=1 \
409- %if 0%{?with_cluster :1}
492+ %if 0%{?cluster :1}
410493 -DWITH_NDBCLUSTER=1 \
411494%endif
412495%if 0%{?ndb_nodejs_path:1}
@@ -444,7 +527,7 @@ mkdir release
444527 -DCMAKE_C_FLAGS="%{optflags}" \
445528 -DCMAKE_CXX_FLAGS="%{optflags}" \
446529 -DWITH_SYSTEMD=1 \
447- %if 0%{?with_cluster :1}
530+ %if 0%{?cluster :1}
448531 -DWITH_NDBCLUSTER=1 \
449532%endif
450533%if 0%{?ndb_nodejs_path:1}
@@ -510,6 +593,11 @@ if %multilib_capable ; then
510593 echo "%{_bindir}/mysql_config-%{__isa_bits}" >> devel.list
511594fi
512595
596+ # Fix a cluster script
597+ %if 0%{?cluster}
598+ /usr/bin/pathfix.py -i /usr/bin/python2 -n -p %{buildroot}%{_bindir}/ndb_setup.py
599+ %endif
600+
513601# Remove files pages we explicitly do not want to package
514602rm -rf %{buildroot}%{_infodir}/mysql.info*
515603rm -rf %{buildroot}%{_datadir}/mysql-*/mysql.server
@@ -750,11 +838,74 @@ rm -r $(readlink var) var
750838%attr(644, root, root) %{_mandir}/man1/mysqlslap.1*
751839%attr(644, root, root) %{_mandir}/man1/mysql_config_editor.1*
752840
841+ %if 0%{?cluster}
842+ %attr(755, root, root) %{_bindir}/ndb_blob_tool
843+ %attr(755, root, root) %{_bindir}/ndb_config
844+ %attr(755, root, root) %{_bindir}/ndb_delete_all
845+ %attr(755, root, root) %{_bindir}/ndb_desc
846+ %attr(755, root, root) %{_bindir}/ndb_drop_index
847+ %attr(755, root, root) %{_bindir}/ndb_drop_table
848+ %attr(755, root, root) %{_bindir}/ndb_error_reporter
849+ %attr(755, root, root) %{_bindir}/ndb_index_stat
850+ %attr(755, root, root) %{_bindir}/ndb_import
851+ %attr(755, root, root) %{_bindir}/ndb_mgm
852+ %attr(755, root, root) %{_bindir}/ndb_move_data
853+ %attr(755, root, root) %{_bindir}/ndb_perror
854+ %attr(755, root, root) %{_bindir}/ndb_print_backup_file
855+ %attr(755, root, root) %{_bindir}/ndb_print_file
856+ %attr(755, root, root) %{_bindir}/ndb_print_frag_file
857+ %attr(755, root, root) %{_bindir}/ndb_print_schema_file
858+ %attr(755, root, root) %{_bindir}/ndb_print_sys_file
859+ %attr(755, root, root) %{_bindir}/ndb_redo_log_reader
860+ %attr(755, root, root) %{_bindir}/ndb_restore
861+ %attr(755, root, root) %{_bindir}/ndb_select_all
862+ %attr(755, root, root) %{_bindir}/ndb_select_count
863+ %attr(755, root, root) %{_bindir}/ndb_setup.py
864+ %attr(755, root, root) %{_bindir}/ndb_show_tables
865+ %attr(755, root, root) %{_bindir}/ndb_size.pl
866+ %attr(755, root, root) %{_bindir}/ndb_top
867+ %attr(755, root, root) %{_bindir}/ndb_waiter
868+ %attr(755, root, root) %{_bindir}/ndbinfo_select_all
869+
870+ %attr(644, root, root) %{_mandir}/man1/ndb-common-options.1*
871+ %attr(644, root, root) %{_mandir}/man1/ndb_blob_tool.1*
872+ %attr(644, root, root) %{_mandir}/man1/ndb_config.1*
873+ %attr(644, root, root) %{_mandir}/man1/ndb_cpcd.1*
874+ %attr(644, root, root) %{_mandir}/man1/ndb_delete_all.1*
875+ %attr(644, root, root) %{_mandir}/man1/ndb_desc.1*
876+ %attr(644, root, root) %{_mandir}/man1/ndb_drop_index.1*
877+ %attr(644, root, root) %{_mandir}/man1/ndb_drop_table.1*
878+ %attr(644, root, root) %{_mandir}/man1/ndb_error_reporter.1*
879+ %attr(644, root, root) %{_mandir}/man1/ndb_import.1*
880+ %attr(644, root, root) %{_mandir}/man1/ndb_index_stat.1*
881+ %attr(644, root, root) %{_mandir}/man1/ndb_mgm.1*
882+ %attr(644, root, root) %{_mandir}/man1/ndb_move_data.1*
883+ %attr(644, root, root) %{_mandir}/man1/ndb_perror.1*
884+ %attr(644, root, root) %{_mandir}/man1/ndb_print_backup_file.1*
885+ %attr(644, root, root) %{_mandir}/man1/ndb_print_file.1*
886+ %attr(644, root, root) %{_mandir}/man1/ndb_print_frag_file.1*
887+ %attr(644, root, root) %{_mandir}/man1/ndb_print_schema_file.1*
888+ %attr(644, root, root) %{_mandir}/man1/ndb_print_sys_file.1*
889+ %attr(644, root, root) %{_mandir}/man1/ndb_restore.1*
890+ %attr(644, root, root) %{_mandir}/man1/ndb_select_all.1*
891+ %attr(644, root, root) %{_mandir}/man1/ndb_select_count.1*
892+ %attr(644, root, root) %{_mandir}/man1/ndb_setup.py.1*
893+ %attr(644, root, root) %{_mandir}/man1/ndb_show_tables.1*
894+ %attr(644, root, root) %{_mandir}/man1/ndb_size.pl.1*
895+ %attr(644, root, root) %{_mandir}/man1/ndb_top.1*
896+ %attr(644, root, root) %{_mandir}/man1/ndb_waiter.1*
897+ %attr(644, root, root) %{_mandir}/man1/ndb_redo_log_reader.1*
898+ %attr(644, root, root) %{_mandir}/man1/ndbinfo_select_all.1*
899+ %endif #cluster
900+
753901%files -f devel.list devel
754902%doc %{?license_files_server}
755903%attr(644, root, root) %{_mandir}/man1/comp_err.1*
756904%attr(644, root, root) %{_mandir}/man1/mysql_config.1*
757905%{_includedir}/mysql
906+ %if 0%{?cluster}
907+ %exclude %{_includedir}/mysql/storage
908+ %endif #cluster
758909%{_datadir}/aclocal/mysql.m4
759910%{_libdir}/mysql/libmysqlclient.a
760911%{_libdir}/mysql/libmysqlservices.a
@@ -928,6 +1079,56 @@ rm -r $(readlink var) var
9281079%attr(755, root, root) %{_libdir}/mysql/plugin/debug/test_services_host_application_signal.so
9291080%attr(755, root, root) %{_libdir}/mysql/plugin/debug/component_mysqlx_global_reset.so
9301081
1082+ %if 0%{?cluster}
1083+ %files management-server
1084+ %doc %{?license_files_server}
1085+ %attr(755, root, root) %{_sbindir}/ndb_mgmd
1086+ %attr(644, root, root) %{_mandir}/man8/ndb_mgmd.8*
1087+
1088+ %files data-node
1089+ %doc %{?license_files_server}
1090+ %attr(755, root, root) %{_sbindir}/ndbd
1091+ %attr(755, root, root) %{_sbindir}/ndbmtd
1092+ %attr(644, root, root) %{_mandir}/man8/ndbd.8*
1093+ %attr(644, root, root) %{_mandir}/man8/ndbmtd.8*
1094+
1095+ %files auto-installer
1096+ %defattr(-, root, root, -)
1097+ %doc %{?license_files_server}
1098+ %attr(755, root, root) %{_bindir}/mcc_config.py
1099+ %{_datadir}/mysql-*/mcc/
1100+ %exclude %{_datadir}/mysql-*/mcc/tst/
1101+
1102+ %files memcached
1103+ %doc %{?license_files_server}
1104+ %attr(755, root, root) %{_bindir}/memclient
1105+ %attr(755, root, root) %{_sbindir}/memcached
1106+ %attr(755, root, root) %{_libdir}/mysql/ndb_engine.so
1107+ %{_datadir}/mysql-*/memcache-api/
1108+
1109+ %files ndbclient
1110+ %defattr(-, root, root, -)
1111+ %doc %{?license_files_server}
1112+ %attr(755, root, root) %{_libdir}/mysql/libndbclient.so.6.1.0
1113+
1114+ %files ndbclient-devel
1115+ %doc %{?license_files_server}
1116+ %attr(644, root, root) %{_libdir}/mysql/libndbclient_static.a
1117+ %{_libdir}/mysql/libndbclient.so
1118+ %{_includedir}/mysql/storage
1119+
1120+ %if 0%{?ndb_nodejs_extras_path:1}
1121+ %files nodejs
1122+ %defattr(-, root, root, -)
1123+ %doc %{?license_files_server}
1124+ %{_datadir}/mysql-*/nodejs/
1125+ %endif
1126+
1127+ %files java
1128+ %doc %{?license_files_server}
1129+ %{_datadir}/mysql-*/java/
1130+ %endif # cluster
1131+
9311132%files -n mysql-router-%{product_suffix}
9321133%doc %{src_dir}/router/README.router %{src_dir}/router/LICENSE.router
9331134%dir %{_sysconfdir}/mysqlrouter
@@ -952,6 +1153,7 @@ rm -r $(readlink var) var
9521153%changelog
9531154* Wed Aug 14 2019 Rahul Sisondia <
[email protected] > - 8.0.19-1
9541155- Added component_test_udf_services test component
1156+ - Added back support for cluster
9551157
9561158* Wed Jun 26 2019 Maheedhar PV <
[email protected] > - 8.0.18-1
9571159- Add component_mysqlbackup component
0 commit comments