Skip to content

Commit f1ca95f

Browse files
committed
support compilation on ubuntu-resolute
- Workaround: uutils/coreutils#11469 - Use dynamically linked libboost_program_options Current galera cmake configuration does not like static linking under resolute cmake+gcc toolchains. This avoids needing to custom patch (GPLv2) build configuration. The libboost_program_options.so is now installed under the Percona XtraDB Cluster lib/private directory similar to other MySQL vendored thirdparty libraries. This largely impacts the bin/garbd binary (currently unused by pxc-release) - Adjust Boost configuration to adapt to cmake v4.2 removing builtin FindBoost.cmake module in favor of the boost provided by modern boost v1.70.0+ - Workaround legacy libtirpc conventions by using -std=gnu17 CFLAGS - ubuntu-resolute stemcells no longer provide libicu-dev packages, so use the bundled version instead - replace chpst with runuser in galera-agent service script - (e2e-tests) correct too strict test assertions that fail under ubuntu-resolute and remove an unnecessary syslog test
1 parent 1b45c23 commit f1ca95f

8 files changed

Lines changed: 43 additions & 48 deletions

File tree

‎jobs/galera-agent/templates/service.bash‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,6 @@ fi
2727
mount --make-rslave /sys/fs/cgroup
2828
umount --recursive /sys/fs/cgroup
2929
umount /var/vcap/bosh/etc
30-
exec chpst -u vcap -- /var/vcap/packages/galera-agent/bin/galera-agent \
30+
exec runuser -u vcap -g vcap -- /var/vcap/packages/galera-agent/bin/galera-agent \
3131
--configPath=/var/vcap/jobs/galera-agent/config/galera-agent-config.yml \
3232
--timeFormat="<%= p('logging.format.timestamp') %>"

‎operations/test/with-syslog.yml‎

Lines changed: 0 additions & 27 deletions
This file was deleted.

‎packages/percona-xtrabackup-8.0/packaging‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,13 @@
33
set -o errexit
44
set -o nounset
55

6+
# Workaround for uutils coreutils 0.7.0 (ubuntu-resolute): its `install -D`
7+
# replaces symlink path components with real directories instead of following
8+
# them. Resolve the real path so libaio's `make install` (which uses
9+
# `install -D`) writes to the correct location on persistent disk.
10+
# See https://github.com/uutils/coreutils/issues/11469
11+
BOSH_INSTALL_TARGET=$(readlink -f "${BOSH_INSTALL_TARGET}")
12+
613
main() {
714
install_build_dependencies
815
unpack_source

‎packages/percona-xtrabackup-8.4/packaging‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,13 @@
33
set -o errexit
44
set -o nounset
55

6+
# Workaround for uutils coreutils 0.7.0 (ubuntu-resolute): its `install -D`
7+
# replaces symlink path components with real directories instead of following
8+
# them. Resolve the real path so libaio's `make install` (which uses
9+
# `install -D`) writes to the correct location on persistent disk.
10+
# See https://github.com/uutils/coreutils/issues/11469
11+
BOSH_INSTALL_TARGET=$(readlink -f "${BOSH_INSTALL_TARGET}")
12+
613
main() {
714
install_build_dependencies
815
unpack_source

‎packages/percona-xtradb-cluster-8.0/packaging‎

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,13 @@ set -o errexit
44
set -o nounset
55
set -o pipefail
66

7+
# Workaround for uutils coreutils 0.7.0 (ubuntu-resolute): its `install -D`
8+
# replaces symlink path components with real directories instead of following
9+
# them. Resolve the real path so libaio's `make install` (which uses
10+
# `install -D`) writes to the correct location on persistent disk.
11+
# See https://github.com/uutils/coreutils/issues/11469
12+
BOSH_INSTALL_TARGET=$(readlink -f "${BOSH_INSTALL_TARGET}")
13+
714
main() {
815
install_build_dependencies
916
install_runtime_dependencies
@@ -29,7 +36,9 @@ install_build_dependencies() {
2936
tar -xf boost_*.tar.bz2
3037
cd boost_*/
3138
./bootstrap.sh --with-libraries=program_options,system
32-
./b2 -j "$(nproc)" link=static
39+
./b2 -j "$(nproc)" cxxstd=17 cxxflags="-fPIC" cflags="-fPIC"
40+
mkdir -p "${BOSH_INSTALL_TARGET}/lib/private"
41+
cp --preserve=all ./stage/lib/libboost_program_options.so.* "${BOSH_INSTALL_TARGET}/lib/private/"
3342
cd -
3443

3544
tar -xf check_*.tar.gz
@@ -81,7 +90,9 @@ build() {
8190
cmake .. \
8291
-DBUILD_CONFIG=mysql_release \
8392
-DBOOST_ROOT="${boost_dir}" \
93+
-DBoost_DIR="$(readlink -f "${boost_dir}"/stage/lib/cmake/Boost-*/)" \
8494
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
95+
-DCMAKE_C_FLAGS="-std=gnu17" \
8596
-DMINIMAL_RELWITHDEBINFO=OFF \
8697
-DCMAKE_CXX_COMPILER=g++ \
8798
-DCMAKE_C_COMPILER=gcc \
@@ -101,7 +112,7 @@ build() {
101112
-DWITH_AUTHENTICATION_KERBEROS=OFF \
102113
-DWITH_PERCONA_AUTHENTICATION_LDAP=OFF \
103114
-DWITH_BOOST="${boost_dir}" \
104-
-DWITH_ICU=system \
115+
-DWITH_ICU=bundled \
105116
-DWITH_READLINE=system \
106117
-DWITH_ROUTER=OFF \
107118
-DWITH_GROUP_REPLICATION=OFF \

‎packages/percona-xtradb-cluster-8.4/packaging‎

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,13 @@ set -o errexit
44
set -o nounset
55
set -o pipefail
66

7+
# Workaround for uutils coreutils 0.7.0 (ubuntu-resolute): its `install -D`
8+
# replaces symlink path components with real directories instead of following
9+
# them. Resolve the real path so libaio's `make install` (which uses
10+
# `install -D`) writes to the correct location on persistent disk.
11+
# See https://github.com/uutils/coreutils/issues/11469
12+
BOSH_INSTALL_TARGET=$(readlink -f "${BOSH_INSTALL_TARGET}")
13+
714
main() {
815
install_build_dependencies
916
install_runtime_dependencies
@@ -29,7 +36,9 @@ install_build_dependencies() {
2936
tar -xf boost_*.tar.bz2
3037
cd boost_*/
3138
./bootstrap.sh --with-libraries=program_options,system
32-
./b2 -j "$(nproc)" link=static
39+
./b2 -j "$(nproc)" cxxstd=17 cxxflags="-fPIC" cflags="-fPIC"
40+
mkdir -p "${BOSH_INSTALL_TARGET}/lib/private"
41+
cp --preserve=all ./stage/lib/libboost_program_options.so.* "${BOSH_INSTALL_TARGET}/lib/private/"
3342
cd -
3443

3544
tar -xf check_*.tar.gz
@@ -81,7 +90,9 @@ build() {
8190
cmake .. \
8291
-DBUILD_CONFIG=mysql_release \
8392
-DBOOST_ROOT="${boost_dir}" \
93+
-DBoost_DIR="$(readlink -f "${boost_dir}"/stage/lib/cmake/Boost-*/)" \
8494
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
95+
-DCMAKE_C_FLAGS="-std=gnu17" \
8596
-DMINIMAL_RELWITHDEBINFO=OFF \
8697
-DCMAKE_CXX_COMPILER=g++ \
8798
-DCMAKE_C_COMPILER=gcc \
@@ -100,7 +111,8 @@ build() {
100111
-DWITH_AUTHENTICATION_FIDO=OFF \
101112
-DWITH_AUTHENTICATION_KERBEROS=OFF \
102113
-DWITH_PERCONA_AUTHENTICATION_LDAP=OFF \
103-
-DWITH_ICU=system \
114+
-DWITH_BOOST="${boost_dir}" \
115+
-DWITH_ICU=bundled \
104116
-DWITH_READLINE=system \
105117
-DWITH_ROUTER=OFF \
106118
-DWITH_GROUP_REPLICATION=OFF \

‎src/e2e-tests/singlenode_test.go‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,7 @@ var _ = Describe(fmt.Sprintf("Single Node for PXC version %s", expectedMysqlVers
6767
Expect(queryResultString).ToNot(BeEmpty())
6868
})
6969
It("does not go through crash recovery", func() {
70-
output, err := bosh.RemoteCommand(deploymentName, "mysql/0", "stat /var/vcap/sys/log/pxc-mysql/pxc-57-recovery.log")
71-
Expect(output).To(ContainSubstring(`stat: cannot statx '/var/vcap/sys/log/pxc-mysql/pxc-57-recovery.log': No such file or directory`))
70+
_, err := bosh.RemoteCommand(deploymentName, "mysql/0", "test -e /var/vcap/sys/log/pxc-mysql/pxc-57-recovery.log")
7271
Expect(err).To(HaveOccurred())
7372
})
7473

‎src/e2e-tests/verification_test.go‎

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@ var _ = Describe("Feature Verification", Ordered, Label("verification"), func()
5656
bosh.Operation(`test/use-mtls.yml`),
5757
bosh.Operation(`test/tune-mysql-config.yml`),
5858
bosh.Operation(`test/with-wildcard-schema-access.yml`),
59-
bosh.Operation(`test/with-syslog.yml`),
6059
bosh.Operation(`test/optimize-vm-swappiness.yml`),
6160
bosh.Operation(`enable-jemalloc.yml`),
6261
bosh.Operation(`iaas/cluster.yml`),
@@ -654,20 +653,7 @@ var _ = Describe("Feature Verification", Ordered, Label("verification"), func()
654653
Expect(contents).To(ContainSubstring("No InnoDB statistics available for this query"))
655654
Expect(contents).To(ContainSubstring("DO sleep(10);"))
656655
})
657-
It("syslog does not forward slow queries", func() {
658-
// execute a slow query
659-
Expect(db.Exec(`DO sleep(10)`)).Error().NotTo(HaveOccurred())
660-
// fetch forwarded logs
661-
output, err := bosh.RemoteCommand(deploymentName, "syslog_storer", "cat /var/vcap/store/syslog_storer/syslog.log | grep '47450'")
662-
Expect(err).NotTo(HaveOccurred())
663656

664-
// assert the forwarded logs do not contain any slow queries
665-
Expect(output).To(Not(ContainSubstring("Tmp_tables: 0 Tmp_disk_tables: 0 Tmp_table_sizes: 0")))
666-
Expect(output).To(Not(ContainSubstring("Full_scan: No Full_join: No Tmp_table: No Tmp_table_on_disk: No")))
667-
Expect(output).To(Not(ContainSubstring("Filesort: No Filesort_on_disk: No Merge_passes: 0")))
668-
Expect(output).To(Not(ContainSubstring("No InnoDB statistics available for this query")))
669-
Expect(output).To(Not(ContainSubstring("DO sleep(10);")))
670-
})
671657
It("rotates the slow query log", func() {
672658
By("allocating 51 MiB to the mysql_slow_query log")
673659
_, err := bosh.RemoteCommand(deploymentName, "mysql/0", "sudo fallocate -l 51MiB /var/vcap/sys/log/pxc-mysql/mysql_slow_query")

0 commit comments

Comments
 (0)