[MDEV-17393] Galera sources changed Created: 2018-10-08 Updated: 2019-01-11 Resolved: 2019-01-11 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Galera |
| Affects Version/s: | N/A |
| Fix Version/s: | N/A |
| Type: | Bug | Priority: | Major |
| Reporter: | Michal Schorm | Assignee: | Daniel Bartholomew |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | Galera | ||
| Description |
|
Hello, Codership, the Galera upstream, changed the way they treat file 'wsrep_api.h'. Basically thay added the file as a git submodule to their project, which leads to a state, where your downstream (MariaDB) Galera sources asre missing that file. I recommend adjusting the source-making process of the Galera traball, so it carries the file again. It would be inconvenient for me to build the Galera for Fedora from two sources - base tarball from MariaDB and wsrep_api.h file from Codership. Thank you |
| Comments |
| Comment by Daniel Bartholomew [ 2018-10-10 ] | ||||||||||||||
|
Looks like the error is in the gen_source_archive function of the scripts/build.sh script. This function uses git checkout-index to create the source dir like so:
And then the source dir is tarred up and we're good. Or at least we were. The problem is the checkout-index command does not consider submodules, I don't think it is even aware of them, so the wsrep/src/ directory in the source dir remains empty. We could use git submodule foreach to copy the submodule contents into the source dir, but this seems a bit hacky. I'm open to suggestions. | ||||||||||||||
| Comment by Michal Schorm [ 2018-10-11 ] | ||||||||||||||
|
Since git 1.7.3
Your variant seems to be a valid solution for older Git. (not so hacky) ( I'm not that confident with Git, I just googled around. But without any other suggestions, I'd try this) | ||||||||||||||
| Comment by Daniel Bartholomew [ 2018-10-11 ] | ||||||||||||||
|
The checkout-index command creates a source dir suitable for tarring up and distributing (it strips out .git files & etc...). We already run the 'submodule update' command to populate the wsrep/ dir with the correct files before doing the checkout index to create the source dir, it just doesn't consider submodules when it does its copying. I think the simplest solution will be to just copy all submodule files over manually after preparing the initial tarball with the build.sh script, gunzipping and updating the src tarball, and then gzipping it back up. The following additions to my prep-galera script should work:
| ||||||||||||||
| Comment by Daniel Bartholomew [ 2018-10-11 ] | ||||||||||||||
|
jplindst: Any thoughts on this? I don't think I should be the one to modify the scripts/build.sh script, better you or someone from Codership as it's part of the galera repository, so my 'solution' tackles the issue from the outside. It would be preferable for the build.sh script to create completely valid source tarballs by itself, so if you or Codership want to take that on, just let me know. Otherwise I'll go with my solution for now. | ||||||||||||||
| Comment by Michal Schorm [ 2019-01-03 ] | ||||||||||||||
|
The severity can be probbably lowered. Your galera 25.3.25 release has it fixed, no longer a major issue for me. | ||||||||||||||
| Comment by Daniel Bartholomew [ 2019-01-09 ] | ||||||||||||||
|
I worked around this issue by adding some steps after the source tarball is generated by the build.sh script to update the source tarball with the submodule files. The changes were made to the prep-galera script as part of this commit (lines 500-503). The changes should have been made as a separate commit, but they were accidentally included in this larger set of updates to the prep-galera script. The basic layout of the workaround is to:
The changes were made just prior to doing the galera 25.3.25 update, and everything seemed to work. So the plan is to do the same for all future updates. mschorm Let me know if it is OK to close this issue. Thanks. | ||||||||||||||
| Comment by Michal Schorm [ 2019-01-10 ] | ||||||||||||||
|
Yes, you can close it whenever. | ||||||||||||||
| Comment by Daniel Bartholomew [ 2019-01-11 ] | ||||||||||||||
|
Workaround in place and working, so closing. |