Commit 1a327ae
committed
builder: fix get_sources — quote PERCONAFT/TOKUBACKUP tests, pick cmake3 fallback
Two bugs in get_sources() on the release-9.7.0-1-1 Jenkins build:
1. Lines 223 / 226: `[ ${PERCONAFT_REPO} = 0 ]` / `[ ${TOKUBACKUP_REPO} = 0 ]`
When PERCONAFT_REPO / TOKUBACKUP_REPO are empty or unset (the
normal case for non-TokuDB builds) the unquoted substitution
collapses the test to literal `[ = 0 ]` and bash reports:
./ps_builder.sh: line 223: [: =: unary operator expected
./ps_builder.sh: line 226: [: =: unary operator expected
Quote both sides + add `:-` default so the test evaluates as
`[ "" = "0" ]` (false) rather than producing a syntax error.
2. Line 269: `cmake . -DWITH_SSL=system ...`
PS 9.x requires CMake >= 3.17.5 (top-level CMakeLists.txt:112).
Some release build agents still ship CMake 3.16.3 as the default
`cmake`, so the configure step aborts:
CMake Error at CMakeLists.txt:112 (CMAKE_MINIMUM_REQUIRED):
CMake 3.17.5 or higher is required. You are running version 3.16.3
With cmake failing, no Makefile is generated, `make dist` then
reports `No rule to make target 'dist'`, and EXPORTED_TAR / PSDIR
end up empty. Every later step cascades into corruption:
`tar xzf` with no arg, rsync targets resolve to absolute `/storage/...`
paths, `cd ${PSDIR}` becomes `cd` (home dir), and the subsequent
sed of `build-ps/debian/rules` fails with "No such file".
On hosts that have both `cmake` (old) and `cmake3` (EPEL /
backports alternative), prefer `cmake3` when the default `cmake`
is older than 3.17.5. Same pattern build-ps/pxc_builder.sh
already uses for PXC on EL7.
This does NOT help hosts where neither `cmake` nor `cmake3` is
>= 3.17.5 — those need either a base-image cmake bump or a
cmake install in install_deps. Note: the make dist step legitimately
needs cmake to copy bison-generated sql_yacc.{h,cc} /
sql_hints.yy.{h,cc} into the tarball and to autoreconf UDF/, so
replacing it with plain `git archive` would silently drop those
pre-generated files. Keeping the cmake+make-dist path and just
choosing a sufficient cmake binary is the right answer.1 parent 0a3a307 commit 1a327ae
1 file changed
Lines changed: 22 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
220 | 220 | | |
221 | 221 | | |
222 | 222 | | |
223 | | - | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
224 | 226 | | |
225 | 227 | | |
226 | | - | |
| 228 | + | |
227 | 229 | | |
228 | 230 | | |
229 | 231 | | |
| |||
266 | 268 | | |
267 | 269 | | |
268 | 270 | | |
269 | | - | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
270 | 289 | | |
271 | 290 | | |
272 | 291 | | |
| |||
0 commit comments