6161%{?el8: %global systemd 1}
6262%{?el9: %global systemd 1}
6363%{?el10: %global systemd 1}
64+ %{?amzn2023: %global systemd 1}
6465%{! ?with_debuginfo: %global nodebuginfo 0}
6566%{! ?product_suffix: %global product_suffix -80}
6667%{! ?feature_set: %global feature_set community}
@@ -256,7 +257,7 @@ Requires: percona-icu-data-files
256257Requires: curl
257258Requires: openssl
258259Requires: bash
259- %if 0%{?rhel } >= 8
260+ %if 0%{?rhel } >= 8 || 0%{? amzn } >= 2023
260261Requires: percona-telemetry-agent
261262%endif
262263Obsoletes: community-mysql-bench
@@ -379,7 +380,7 @@ Provides: mysql-devel%{?_isa} = %{version}-%{release}
379380Conflicts: Percona-SQL-devel-50 Percona-Server-devel-51 Percona-Server-devel-55 Percona-Server-devel-56 Percona-Server-devel-57
380381Conflicts: percona-server-devel-pro
381382Obsoletes: mariadb-connector-c-devel
382- %if 0%{?rhel } > 6
383+ %if 0%{?rhel } > 6 || 0%{? amzn } >= 2023
383384Obsoletes: mariadb-devel
384385%endif
385386
@@ -401,9 +402,11 @@ Conflicts: percona-server-shared-pro
401402Provides: mysql-shared
402403%ifarch x86_64
403404%if 0%{?rhel } < 9
405+ %if 0%{?amzn } != 2023
404406Requires(pre): percona-server-shared-compat
405407%endif
406408%endif
409+ %endif
407410
408411%description -n percona-server-shared
409412This package contains the shared libraries (*.so*) which certain languages
@@ -580,7 +583,7 @@ mkdir debug
580583 -DWITH_ZSTD= bundled \
581584 -DWITH_READLINE= system \
582585 -DWITH_LIBEVENT= bundled \
583- %if 0%{?rhel } >= 8
586+ %if 0%{?rhel } >= 8 || 0%{? amzn } >= 2023
584587 -DWITH_PERCONA_TELEMETRY= ON \
585588%endif
586589%if 0%{?add_fido_plugins }
@@ -590,7 +593,7 @@ mkdir debug
590593%endif
591594 -DWITH_ENCRYPTION_UDF= ON \
592595 -DWITH_KEYRING_VAULT= ON \
593- %if 0%{?rhel } > 8
596+ %if 0%{?rhel } > 8 || 0%{? amzn } >= 2023
594597 -DWITH_LTO= ON \
595598%endif
596599 %{?ssl_option } \
@@ -645,7 +648,7 @@ mkdir release
645648 -DWITH_READLINE= system \
646649 -DWITH_LIBEVENT= bundled \
647650 -DWITH_ZSTD= bundled \
648- %if 0%{?rhel } >= 8
651+ %if 0%{?rhel } >= 8 || 0%{? amzn } >= 2023
649652 -DWITH_PERCONA_TELEMETRY= ON \
650653%endif
651654%if 0%{?add_fido_plugins }
@@ -655,7 +658,7 @@ mkdir release
655658%endif
656659 -DWITH_ENCRYPTION_UDF= ON \
657660 -DWITH_KEYRING_VAULT= ON \
658- %if 0%{?rhel } > 8
661+ %if 0%{?rhel } > 8 || 0%{? amzn } >= 2023
659662 -DWITH_LTO= ON \
660663%endif
661664 %{?ssl_option } \
@@ -705,8 +708,10 @@ install -d %{buildroot}%{_sysconfdir}/my.cnf.d
705708#%if 0%{?systemd}
706709#%else
707710%if 0%{?rhel } < 7
711+ %if 0%{?amzn } != 2023
708712 install -D -m 0755 $MBD/%{src_dir }/build-ps/rpm/mysql.init %{buildroot }%{_sysconfdir }/init.d/mysql
709713%endif
714+ %endif
710715
711716# Add libdir to linker
712717install -d -m 0755 %{buildroot }%{_sysconfdir }/ld.so.conf.d
812817 /sbin/chkconfig --add mysql
813818 fi
814819%endif
815- %if 0%{?rhel } > = 8
820+ %if 0%{?rhel } > = 8 || 0%{? amzn } > = 2023
816821mkdir -p %{ps_telemetry }
817822chown mysql:percona-telemetry %{ps_telemetry }
818823chmod 775 %{ps_telemetry }
831836
832837cp %SOURCE999 /tmp/ 2> /dev/null ||
833838bash /tmp/call-home.sh -f "PRODUCT_FAMILY_PS" -v %{mysql_version }-%{percona_server_version }-%{rpm_release } -d "PACKAGE" &> /dev/null || :
834- %if 0%{?rhel } >= 8
839+ %if 0%{?rhel } >= 8 || 0%{? amzn } >= 2023
835840chgrp percona-telemetry /usr/local /percona/telemetry_uuid &> /dev/null || :
836841chmod 664 /usr/local /percona/telemetry_uuid &> /dev/null || :
837842%endif
871876 /sbin/service mysql condrestart > /dev/null 2>&1 || :
872877 fi
873878%endif
874- %if 0%{?rhel } > = 8
879+ %if 0%{?rhel } > = 8 || 0%{? amzn } > = 2023
875880rm -rf %{ps_telemetry }
876881%endif
877882
@@ -888,7 +893,7 @@ if [ ! -d %{_datadir}/mysql ] && [ ! -L %{_datadir}/mysql ]; then
888893 ln -s %{_datadir }/percona-server %{_datadir }/mysql
889894fi
890895
891- %if 0%{?rhel } >= 9
896+ %if 0%{?rhel } >= 9 || 0%{? amzn } >= 2023
892897if [ -f /usr/lib/systemd/system/mysqld.service ]; then
893898 if [ ! -e /etc/systemd/system/mysql.service ] && [ -d /etc/systemd/system ]; then
894899 ln -s /usr/lib/systemd/system/mysqld.service /etc/systemd/system/mysql.service
@@ -1023,8 +1028,10 @@ fi
10231028%attr(644, root, root) %{_mandir }/man1/lz4_decompress.1*
10241029%attr(644, root, root) %{_mandir }/man1/zlib_decompress.1*
10251030%if 0%{?rhel } < 7
1031+ %if 0%{?amzn } ! = 2023
10261032%attr(644, root, root) %{_mandir }/man1/mysql.server.1*
10271033%endif
1034+ %endif
10281035
10291036%config(noreplace) %{_sysconfdir }/my.cnf
10301037%dir %{_sysconfdir }/my.cnf.d
10791086%attr(755, root, root) %{_libdir }/mysql/plugin/component_validate_password.so
10801087%attr(755, root, root) %{_libdir }/mysql/plugin/component_audit_api_message_emit.so
10811088%attr(755, root, root) %{_libdir }/mysql/plugin/component_query_attributes.so
1082- %if 0%{?rhel } >= 8
1089+ %if 0%{?rhel } >= 8 || 0%{? amzn } >= 2023
10831090%attr(755, root, root) %{_libdir }/mysql/plugin/component_percona_telemetry.so
10841091%endif
10851092%attr(755, root, root) %{_libdir }/mysql/plugin/connection_control.so
11371144%attr(755, root, root) %{_libdir }/mysql/plugin/debug/component_validate_password.so
11381145%attr(755, root, root) %{_libdir }/mysql/plugin/debug/component_audit_api_message_emit.so
11391146%attr(755, root, root) %{_libdir }/mysql/plugin/debug/component_query_attributes.so
1140- %if 0%{?rhel } >= 8
1147+ %if 0%{?rhel } >= 8 || 0%{? amzn } >= 2023
11411148%attr(755, root, root) %{_libdir }/mysql/plugin/debug/component_percona_telemetry.so
11421149%endif
11431150%attr(755, root, root) %{_libdir }/mysql/plugin/debug/connection_control.so
12201227%attr(755, root, root) %{_libdir }/mysql/plugin/authentication_ldap_sasl.so
12211228%attr(755, root, root) %{_libdir }/mysql/plugin/debug/authentication_ldap_sasl.so
12221229
1223- %if 0%{?rhel } > 6
1230+ %if 0%{?rhel } > 6 || 0%{? amzn } >= 2023
12241231%attr(755, root, root) %{_libdir }/mysql/plugin/component_encryption_udf.so
12251232%attr(755, root, root) %{_libdir }/mysql/plugin/debug/component_encryption_udf.so
12261233%endif
0 commit comments