[MDEV-20339] FreeBSD VM builder Created: 2013-06-14 Updated: 2022-09-21 |
|
| Status: | Open |
| Project: | MariaDB Server |
| Component/s: | None |
| Fix Version/s: | None |
| Type: | Task | Priority: | Critical |
| Reporter: | Sergei Golubchik | Assignee: | Sergei Golubchik |
| Resolution: | Unresolved | Votes: | 2 |
| Labels: | None | ||
| Issue Links: |
|
||||||||||||||||||||||||||||||||||||
| Description |
|
We need a FreeBSD VM in the buildbot. |
| Comments |
| Comment by Sergei Golubchik [ 2013-09-29 ] | ||||||||||||||||||||||||
|
Daniel, any news on that? | ||||||||||||||||||||||||
| Comment by Sergei Golubchik [ 2013-09-30 ] | ||||||||||||||||||||||||
|
According to the MariaDB port maintainer in FreeBSD, we should use FreeBSD 9.2 and 10.0 in buildbot. | ||||||||||||||||||||||||
| Comment by Sergei Golubchik [ 2019-08-06 ] | ||||||||||||||||||||||||
|
Daniel, could you please add a reasonably recent FreeBSD VM to buildbot? To the main group, not experimental. This makes us to test on FreeBSD, we getting "do not compile" bugs quite regularly. And it'll test with clang, which we don't have either. If there are any old FreeBSD builders — please remove them. | ||||||||||||||||||||||||
| Comment by Daniel Bartholomew [ 2019-08-06 ] | ||||||||||||||||||||||||
|
We do have some old FreeBSD 11 builders. I'll get them removed and then add a new FreeBSD 12.0 builder. I assume we're only interested in amd64, correct? | ||||||||||||||||||||||||
| Comment by Daniel Bartholomew [ 2019-08-06 ] | ||||||||||||||||||||||||
|
Removed old FreeBSD 11 builder: https://github.com/MariaDB/mariadb.org-tools/commit/bb175bbf3795 | ||||||||||||||||||||||||
| Comment by Daniel Bartholomew [ 2019-08-08 ] | ||||||||||||||||||||||||
|
FreeBSD 12 VMs created Now working on tweaking the build VM and working on defining build steps that are repeatable (and therefore can be automated in buildbot) | ||||||||||||||||||||||||
| Comment by Sergei Golubchik [ 2019-08-08 ] | ||||||||||||||||||||||||
|
Ideally, we want to build from ports. These are my notes from few years ago when I tried to build 10.0 from ports:
| ||||||||||||||||||||||||
| Comment by Daniel Bartholomew [ 2019-08-08 ] | ||||||||||||||||||||||||
|
I've tweaked the build-VM and I've gotten it to a point where the following succeeds for 10.1 through 10.4:
Using your notes I'll work next on using our tarballs instead of the ones in the ports tree. | ||||||||||||||||||||||||
| Comment by Daniel Bartholomew [ 2019-08-12 ] | ||||||||||||||||||||||||
|
Status update: The following sequence works for building 10.1:
And a mostly similar sequence works for 10.3:
For whatever reason, 10.3 won't compile unless I build galera first. 10.2 and 10.4 don't build. 10.2 fails to cleanly compile mariadb102-client but I can force it to complete with by adding MAKE_JOBS_UNSAFE=yes to the make line for mariadb102-client, and on mariadb102-server it fails almost immediately with the following error: => FreeBSD patch patch-plugin_auth__ed25519_CMakeLists.txt failed to apply cleanly. 10.4 on the other hand fails with a use of undeclared identifier 'uint' error while compiling the auth_pam plugin. For 10.1 and 10.3, I did the following after compiling to run mtr tests:
10.1 dies almost immediately with a Died at lib/mtr_misc.pl line 72. error. 10.3 actually runs tests, but fails the rpl.temporal_row-9560 test. So it is farthest along, but still not 100% there yet. | ||||||||||||||||||||||||
| Comment by Daniel Bartholomew [ 2019-08-12 ] | ||||||||||||||||||||||||
|
Build sequence for 10.2:
Build sequence for 10.4:
| ||||||||||||||||||||||||
| Comment by Sergei Golubchik [ 2022-02-22 ] | ||||||||||||||||||||||||
|
because port files (namely, patches) are tightly coupled to the server code, we should maintain our own version of the port, where all files (server's and port's) are changed in sync. Port maintainer can then use our version (either verbatim or as a guideline) when upgrading MariaDB. Then the procedure should be amended by adding something like
which will unpack our port files for the subsequent make command to use. For */freebsd/* files to exist, they need to be added to the source tree. Let's start from a separate branch bb-10.3-freebsd and have buildbot use the port build procedure only for *-freebsd branches. Also, the VM likely needs to be upgraded to 12.3 or 13.0 but let's first get the build working. | ||||||||||||||||||||||||
| Comment by Sergei Golubchik [ 2022-02-23 ] | ||||||||||||||||||||||||
|
spil, could you, please, comment on the above? I've just realized that if we'll have the port files inside the mariadb source tree, it'll mean that they won't depend on FreeBSD version. Can we assume that mariadb port files are basically the same in all supported FreeBSD version? Will we need some FreeBSD-version-specific checks in the Makefile or somewhere? | ||||||||||||||||||||||||
| Comment by Elena Stepanova [ 2022-04-04 ] | ||||||||||||||||||||||||
We need this already if we want CI with ports. For example, a patch for wsrep_sst_mariabackup.sh in 10.3-10.5 ports doesn't apply after Otherwise, 10.3+ builds from ports / main MTR tests have been added to buildbot with a few extra tweaks:
The buildbot runs FreeBSD 13.0 for all 10.3+ branches and FreeBSD 12.3 for main 10.3+ branches unless we decide otherwise. With MTR failures as of April 13: | ||||||||||||||||||||||||
| Comment by Bernard Spil [ 2022-04-10 ] | ||||||||||||||||||||||||
|
serg First off: lame excuses: Apologies for a delay in responses. Paid work, holidays and a nice bit of viral infections are eating my available time on porting. I wake up mostly on the quarterly security updates :/. You mean akin to the /debian/* structure? If that is what make the Debian packages that would be swell!
We sure can! And I would be all for it! There's issues with the current build infra where FreeBSD behaves very different from Linux packaging. We'd need to resolve these: 1. FreeBSD builds the "parts" separately. I.e. it should actually build `databases/mariadb-connector-c`, then build `databases/mariadb[0-9]-client` which depends on the correct connector-c port and then build `databases/mariadb[0-9]-server' port which depends on the correct mariadb-client port. If this requires a versioned `mariadb-connector-c` port, I believe it does, this WILL happen. I'm insufficiently skilled in CMake to rip apart these parts to properly make them depend out-of-source to e.g. `/usr/local/lib/`. I believe the Linux distros build the whole thing (libraries/client/server) and then split the resulting files in separate packages: FreeBSD fails on this feature. Many kloc of CMake code make MariaDB not an easy entry to CMake (GUIDE ME!) FWIW. I managed to reduce the number of patches required for MariaDB significantly by ignoring/commenting the server/client specific files in the package. You can clearly see this when you compare the number of patches required at the expense of maintaining "what files are client, which are server?" in the pkg-list. I very much hope this doesn't sound like an insurmountable list of requirements to you. I could really do with some help here! In return you can count on me to support you with all the FreeBSD port intricacies. Cheers, Bernard. | ||||||||||||||||||||||||
| Comment by Sergei Golubchik [ 2022-05-05 ] | ||||||||||||||||||||||||
| ||||||||||||||||||||||||
| Comment by Marko Mäkelä [ 2022-09-21 ] | ||||||||||||||||||||||||
|
The https://github.com/freebsd/freebsd-ports/blob/main/databases/mariadb106-server/Makefile will no longer work on MariaDB Server 10.7 or later starting with this merge because there will be no files matching storage/innobase/*.cmake. Before 10.7 and I had a quick look at the patch- files in https://github.com/freebsd/freebsd-ports/tree/main/databases/mariadb106-server/files and I think that we should simply try to apply them to the MariaDB code base. patch-tpool_CMakeLists.txt seems to miss some condition, so that the addition would only apply to FreeBSD. spil, how could we best proceed with the patch- files? Would it be possible to submit them as pull requests? | ||||||||||||||||||||||||
| Comment by Elena Stepanova [ 2022-09-21 ] | ||||||||||||||||||||||||
|
I have added a workaround for the innobase cmake files problem above, just one more time. |