[MDEV-7066] No Source RPMs ... (and so no "yum-builddep MariaDB-server" either) Created: 2014-11-11 Updated: 2019-03-27 Resolved: 2019-03-27 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Packaging |
| Affects Version/s: | 5.5, 10.0, 10.1 |
| Fix Version/s: | 10.2.24, 10.1.39, 10.3.14 |
| Type: | Bug | Priority: | Major |
| Reporter: | Hartmut Holzgraefe | Assignee: | Sergei Golubchik |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | contribution, foundation | ||
| Environment: |
CentOS, RHEL (all RPM based distributions?) |
||
| Issue Links: |
|
||||||||||||
| Description |
|
The Knowledge Base article on "why we don't have SRPMs" says: "We are currently investigating using a source RPM generator as documented via a macro." I couldn't find any related Jira issue though, thus I've now submitted this one. Reason for this is that I'm missing the ability to say
to pull in all build dependencies required to compile MySQL from source. |
| Comments |
| Comment by Hartmut Holzgraefe [ 2018-01-08 ] | ||||||||||||||||||||||||||||||||||||||
|
On CentOS 7 this currently has the effect that when following our build environment setup instructions from https://mariadb.com/kb/en/library/Build_Environment_Setup_for_Linux you'd actually end up with the build dependencies for MariaDB 5.5 being installed instead of those for current 10.x versions, as CentOS actually provides a source RPM, but still only comes with MariaDB 5.5 by default. This is even still true whe setting up MariaDB.(org|com) yum repositories. As there's no source RPM to fetch build dependencies from in our repositories yum-builddep will still use the 5.5 source RPM from the CentOS repository | ||||||||||||||||||||||||||||||||||||||
| Comment by Daniel Black [ 2018-02-03 ] | ||||||||||||||||||||||||||||||||||||||
|
https://src.fedoraproject.org/rpms/mariadb/blob/master/f/mariadb.spec used as base for 2 pull requests as attached. Needed as part of buildbot to generate src.rpm:
| ||||||||||||||||||||||||||||||||||||||
| Comment by Daniel Black [ 2018-02-04 ] | ||||||||||||||||||||||||||||||||||||||
|
pull requests add Build-Depends unconditionally so a src rpm will (should at least) contain the full list of dependencies for every component of building mariadb. If this is the wrong approach, the conditionals can be used further down the cmake files to where they are accepted/fully enabled. | ||||||||||||||||||||||||||||||||||||||
| Comment by Sergey Vojtovich [ 2018-03-13 ] | ||||||||||||||||||||||||||||||||||||||
|
Overdue PR. | ||||||||||||||||||||||||||||||||||||||
| Comment by Sergei Golubchik [ 2018-06-24 ] | ||||||||||||||||||||||||||||||||||||||
|
danblack, I'll reply here, not in github, ok? Three pull requests, one comment, don't want to copy it in three places. Two thoughts.
2. This seems way too manual. It'll probably be out-of-sync even before we push it. Can we come up with something less fragile? One way of doing it would be, say, a macro (or function, whatever)
To be used like (say, in cracklib plugin)
and in cpack_rpm.cmake or at the end of the main CMakeListst.txt there's a check that verifies that for every FIND_PROGRAM and CHECK_LIBRARY_EXISTS there is a matching BUILD_REQUIRES. Similar to how I do it at the end of plugin.cmake. Another option would be to replace all FIND_PROGRAM and CHECK_LIBRARY_EXISTS to require a new argument, but the first option looks easier. | ||||||||||||||||||||||||||||||||||||||
| Comment by Daniel Black [ 2018-06-27 ] | ||||||||||||||||||||||||||||||||||||||
|
Ok. Thanks for the review. I like the idea of the macro. I don't remember hitting the scope issues. | ||||||||||||||||||||||||||||||||||||||
| Comment by Sergei Golubchik [ 2018-06-29 ] | ||||||||||||||||||||||||||||||||||||||
|
Here's a new idea, even less intrusive. A patch is worth a thousand words, so the PoC:
What needs to be done:
| ||||||||||||||||||||||||||||||||||||||
| Comment by Sergei Golubchik [ 2018-08-31 ] | ||||||||||||||||||||||||||||||||||||||
|
Ok, "_(EXECUTABLE|LIBRARY)$" is certainly not enough. It won't detect boost, for example, or any other header-only library. For this one needs to analyze headers, and this is generator-dependent. For example, for Ninja it's something like
| ||||||||||||||||||||||||||||||||||||||
| Comment by Sergei Golubchik [ 2019-03-25 ] | ||||||||||||||||||||||||||||||||||||||
|
source rpm builds work in bb-10.1-serg now. Left to do:
| ||||||||||||||||||||||||||||||||||||||
| Comment by Sergei Golubchik [ 2019-03-26 ] | ||||||||||||||||||||||||||||||||||||||
|
1 and 2 are done. dbart, 3. is on you | ||||||||||||||||||||||||||||||||||||||
| Comment by Daniel Black [ 2019-03-27 ] | ||||||||||||||||||||||||||||||||||||||
|
Nice work serg. Thankyou. | ||||||||||||||||||||||||||||||||||||||
| Comment by Daniel Bartholomew [ 2019-03-27 ] | ||||||||||||||||||||||||||||||||||||||
|
3 is done. 4 is something I'll work with greenman on to make sure it updated documentation is ready for our first release with src.rpm files. serg: Which release do you expect will be the first one with this? | ||||||||||||||||||||||||||||||||||||||
| Comment by Daniel Bartholomew [ 2019-03-27 ] | ||||||||||||||||||||||||||||||||||||||
|
For the docs, a new Building MariaDB from a src.rpm page will need to be created and this page will need to be updated: There might be other existing pages that also need to be updated, but this one needs to be updated for sure so that it mentions that some Distributions now have source RPMs available (after they're actually available of course). | ||||||||||||||||||||||||||||||||||||||
| Comment by Sergei Golubchik [ 2019-03-27 ] | ||||||||||||||||||||||||||||||||||||||
|
I'll try to merge it into the upcoming 10.3 release, but if it'll take too long to merge, then the next 10.1. |