Skip to content

Commit c5623cb

Browse files
committed
PKG-1095 Packaging tasks for release - PS 8.0.44
1 parent c2363d0 commit c5623cb

File tree

3 files changed

+39
-25
lines changed

3 files changed

+39
-25
lines changed

build-ps/debian/rules

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,7 @@ override_dh_auto_build:
163163
[ -f $(EXPORTED_SOURCE_TARBALL) ] || tar -zcf $(EXPORTED_SOURCE_TARBALL) \
164164
--exclude=debian . \
165165
--transform="s,^\./,percona-server/,"
166+
grep -q unistd.h extra/coredumper/src/thread_lister.c || sed -i '1i #include <unistd.h>' extra/coredumper/src/thread_lister.c
166167

167168
ifeq ($(SKIP_DEBUG_BINARY),)
168169
#cd $(builddebug) && $(MAKE) -j$(NCPU)

build-ps/percona-server-8.0_builder.sh

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -383,13 +383,19 @@ enable_zenfs() {
383383

384384
get_system(){
385385
if [ -f /etc/redhat-release ]; then
386-
GLIBC_VER_TMP="$(rpm glibc -qa --qf %{VERSION})"
387-
RHEL=$(rpm --eval %rhel)
388-
ARCH=$(echo $(uname -m) | sed -e 's:i686:i386:g')
389-
OS_NAME="el$RHEL"
390-
OS="rpm"
386+
export GLIBC_VER_TMP="$(rpm glibc -qa --qf %{VERSION})"
387+
export RHEL=$(rpm --eval %rhel)
388+
export ARCH=$(echo $(uname -m) | sed -e 's:i686:i386:g')
389+
export OS_NAME="el$RHEL"
390+
export OS="rpm"
391+
elif [ -f /etc/amazon-linux-release ]; then
392+
export GLIBC_VER_TMP="$(rpm glibc -qa --qf %{VERSION})"
393+
export RHEL=$(rpm --eval %amzn)
394+
export ARCH=$(echo $(uname -m) | sed -e 's:i686:i386:g')
395+
export OS_NAME="amzn$RHEL"
396+
export OS="rpm"
391397
else
392-
GLIBC_VER_TMP="$(dpkg-query -W -f='${Version}' libc6 | awk -F'-' '{print $1}')"
398+
GLIBC_VER_TMP="$(dpkg-query -W -f='${Version}' libc6 | awk -F'-' '{print $1}')"
393399
ARCH=$(uname -m)
394400
OS_NAME="$(lsb_release -sc)"
395401
OS="deb"
@@ -566,7 +572,7 @@ install_deps() {
566572
apt-get -y install libmecab-dev libncurses5-dev libreadline-dev libpam-dev zlib1g-dev libcurl4-openssl-dev
567573
apt-get -y install libldap2-dev libnuma-dev libjemalloc-dev libc6-dbg valgrind libjson-perl libsasl2-dev patchelf
568574
apt-get -y install libatomic1
569-
if [ x"${DIST}" = xfocal -o x"${DIST}" = xhirsute -o x"${DIST}" = xbullseye -o x"${DIST}" = xjammy -o x"${DIST}" = xbookworm -o x"${DIST}" = xnoble ]; then
575+
if [ x"${DIST}" = xfocal -o x"${DIST}" = xhirsute -o x"${DIST}" = xbullseye -o x"${DIST}" = xjammy -o x"${DIST}" = xbookworm -o x"${DIST}" = xnoble -o x"${DIST}" = xtrixie ]; then
570576
apt-get -y install python3-mysqldb
571577
else
572578
apt-get -y install python-mysqldb
@@ -588,21 +594,21 @@ install_deps() {
588594
else
589595
apt-get -y install gcc g++
590596
fi
591-
if [ x"${DIST}" = xfocal -o x"${DIST}" = xbionic -o x"${DIST}" = xdisco -o x"${DIST}" = xbuster -o x"${DIST}" = xhirsute -o x"${DIST}" = xbullseye -o x"${DIST}" = xjammy -o x"${DIST}" = xbookworm -o x"${DIST}" = xnoble ]; then
597+
if [ x"${DIST}" = xfocal -o x"${DIST}" = xbionic -o x"${DIST}" = xdisco -o x"${DIST}" = xbuster -o x"${DIST}" = xhirsute -o x"${DIST}" = xbullseye -o x"${DIST}" = xjammy -o x"${DIST}" = xbookworm -o x"${DIST}" = xnoble -o x"${DIST}" = xtrixie ]; then
592598
apt-get -y install libeatmydata1
593599
fi
594-
if [ x"${DIST}" = xfocal -o x"${DIST}" = xbionic -o x"${DIST}" = xstretch -o x"${DIST}" = xdisco -o x"${DIST}" = xbuster -o x"${DIST}" = xhirsute -o x"${DIST}" = xbullseye -o x"${DIST}" = xjammy -o x"${DIST}" = xbookworm -o x"${DIST}" = xnoble ]; then
600+
if [ x"${DIST}" = xfocal -o x"${DIST}" = xbionic -o x"${DIST}" = xstretch -o x"${DIST}" = xdisco -o x"${DIST}" = xbuster -o x"${DIST}" = xhirsute -o x"${DIST}" = xbullseye -o x"${DIST}" = xjammy -o x"${DIST}" = xbookworm -o x"${DIST}" = xnoble -o x"${DIST}" = xtrixie ]; then
595601
apt-get -y install libzstd-dev
596602
else
597603
apt-get -y install libzstd1-dev
598604
fi
599605
if [ x${DIST} = xhirsute ]; then
600606
apt-get -y install libzbd-dev clang-12 pkg-config make libgflags-dev nvme-cli util-linux fio zbd-utils
601607
fi
602-
if [[ ${DIST} == 'focal' ]] || [[ ${DIST} == 'hirsute' ]] || [[ ${DIST} == 'bullseye' ]] || [[ ${DIST} == 'jammy' ]] || [[ ${DIST} == 'bookworm' ]] || [[ ${DIST} == 'noble' ]]; then
608+
if [[ ${DIST} == 'focal' ]] || [[ ${DIST} == 'hirsute' ]] || [[ ${DIST} == 'bullseye' ]] || [[ ${DIST} == 'jammy' ]] || [[ ${DIST} == 'bookworm' ]] || [[ ${DIST} == 'noble' ]] || [[ ${DIST} == 'trixie' ]]; then
603609
apt-get -y install libgflags-dev
604610
fi
605-
if [ x${DIST} = xnoble ]; then
611+
if [ x${DIST} = xnoble -o x"${DIST}" = xtrixie ]; then
606612
apt-get -y install libtirpc-dev gsasl-common
607613
fi
608614
apt-get install -y libsasl2-dev libsasl2-modules-gssapi-mit libkrb5-dev
@@ -987,7 +993,7 @@ build_deb(){
987993
rm -f call-home.sh
988994
cd ../
989995

990-
if [ ${DEBIAN_VERSION} != trusty -a ${DEBIAN_VERSION} != xenial -a ${DEBIAN_VERSION} != jessie -a ${DEBIAN_VERSION} != stretch -a ${DEBIAN_VERSION} != artful -a ${DEBIAN_VERSION} != bionic -a ${DEBIAN_VERSION} != focal -a "${DEBIAN_VERSION}" != disco -a "${DEBIAN_VERSION}" != buster -a "${DEBIAN_VERSION}" != hirsute -a "${DEBIAN_VERSION}" != bullseye -a "${DEBIAN_VERSION}" != jammy -a "${DEBIAN_VERSION}" != bookworm -a "${DEBIAN_VERSION}" != noble ]; then
996+
if [ ${DEBIAN_VERSION} != trusty -a ${DEBIAN_VERSION} != xenial -a ${DEBIAN_VERSION} != jessie -a ${DEBIAN_VERSION} != stretch -a ${DEBIAN_VERSION} != artful -a ${DEBIAN_VERSION} != bionic -a ${DEBIAN_VERSION} != focal -a "${DEBIAN_VERSION}" != disco -a "${DEBIAN_VERSION}" != buster -a "${DEBIAN_VERSION}" != hirsute -a "${DEBIAN_VERSION}" != bullseye -a "${DEBIAN_VERSION}" != jammy -a "${DEBIAN_VERSION}" != bookworm -a "${DEBIAN_VERSION}" != noble -a "${DEBIAN_VERSION}" != trixie ]; then
991997
gcc47=$(which gcc-4.7 2>/dev/null || true)
992998
if [ -x "${gcc47}" ]; then
993999
export CC=gcc-4.7

build-ps/percona-server.spec

Lines changed: 20 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@
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
256257
Requires: curl
257258
Requires: openssl
258259
Requires: bash
259-
%if 0%{?rhel} >= 8
260+
%if 0%{?rhel} >= 8 || 0%{?amzn} >= 2023
260261
Requires: percona-telemetry-agent
261262
%endif
262263
Obsoletes: community-mysql-bench
@@ -379,7 +380,7 @@ Provides: mysql-devel%{?_isa} = %{version}-%{release}
379380
Conflicts: Percona-SQL-devel-50 Percona-Server-devel-51 Percona-Server-devel-55 Percona-Server-devel-56 Percona-Server-devel-57
380381
Conflicts: percona-server-devel-pro
381382
Obsoletes: mariadb-connector-c-devel
382-
%if 0%{?rhel} > 6
383+
%if 0%{?rhel} > 6 || 0%{?amzn} >= 2023
383384
Obsoletes: mariadb-devel
384385
%endif
385386

@@ -401,9 +402,11 @@ Conflicts: percona-server-shared-pro
401402
Provides: mysql-shared
402403
%ifarch x86_64
403404
%if 0%{?rhel} < 9
405+
%if 0%{?amzn} != 2023
404406
Requires(pre): percona-server-shared-compat
405407
%endif
406408
%endif
409+
%endif
407410

408411
%description -n percona-server-shared
409412
This 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
712717
install -d -m 0755 %{buildroot}%{_sysconfdir}/ld.so.conf.d
@@ -812,7 +817,7 @@ fi
812817
/sbin/chkconfig --add mysql
813818
fi
814819
%endif
815-
%if 0%{?rhel} >= 8
820+
%if 0%{?rhel} >= 8 || 0%{?amzn} >= 2023
816821
mkdir -p %{ps_telemetry}
817822
chown mysql:percona-telemetry %{ps_telemetry}
818823
chmod 775 %{ps_telemetry}
@@ -831,7 +836,7 @@ fi
831836

832837
cp %SOURCE999 /tmp/ 2>/dev/null ||
833838
bash /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
835840
chgrp percona-telemetry /usr/local/percona/telemetry_uuid &>/dev/null || :
836841
chmod 664 /usr/local/percona/telemetry_uuid &>/dev/null || :
837842
%endif
@@ -871,7 +876,7 @@ fi
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
875880
rm -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
889894
fi
890895

891-
%if 0%{?rhel} >= 9
896+
%if 0%{?rhel} >= 9 || 0%{?amzn} >= 2023
892897
if [ -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
@@ -1079,7 +1086,7 @@ fi
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
@@ -1137,7 +1144,7 @@ fi
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
@@ -1220,7 +1227,7 @@ fi
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

Comments
 (0)