← Back to team overview

maria-developers team mailing list archive

Re: How you build the MariaDB packages for Ubuntu

 

Change the RPM Spec its actually very simply done, to make this state that
it supplies the Centos Specific requirements for mysql-libs

The libmysqlclient is cross compatible, it simply needs to be changed so
that it upgrades or obsoletes mysql-libs, and also provides it
via the appropriate package (MariaDB-shared I believe and MariaDB-server
for static or server linkage, MariaDB-devel I typically always installed
as well).
In Summary:
    - Add "Provides: mysql-libs" to the appropriate package description.
    - Install MariaDB (removing mysql-libs) use rpm -f --nodeps msyql-libs
if needed to not also remove the rest of the already installed
dependent packages.
     - If not already installed yum -y install postfix will now indicate
that mysql-libs is provided by MariaDB when the install check is
performed, because the Conflicts tag is removed and provides is
added.
    - If binary compatibility is an issue for you (it was not for me) with
the new versions of the shared libraries then you will also need to
change the installation directory to something like /usr/local/mysql,
etc. This is so that mysql-libs can be installed without a file
location conflict (once again provided that you remove the "Conflicts:
mysql-libs" tag from the spec file.

I have done this and deployed it on a variety of primarily default package
set installations, without ever having a single issue. Ignore the
conflicts tag and you are ready to rock once you get the old provider
removed (which is mysql - the server package I believe).

I can send you an example spec for this if you want it, just let me know.

Jakob Lorberblatt

> On Tuesday 01 November 2011 16:28:01 Kristian Nielsen wrote:
>> Marian Marinov <mm@xxxxxxxx> writes:
>> > I'm trying to build MariaDB packages for CentOS.
>> > But the problem I have is that the Policy of the distro does not allow
>> > packages that are drop-in replacements of core packages.
>> > Meaning that I can not simply build MariaDB which will provide
>> > libmysqlclient and mysql binaries.
>> >
>> > Can you share with me what is the situation over in the Debian/Ubuntu
>> > camp ?
>>
>> In Debian/Ubuntu, there are no "Official" MariaDB packages yet. The ones
>> we
>> provide do replace the standard mysql packages, which is possible since
>> there are no policies enforced for 3rd-party repositories.
>>
>> It will need to be fixed eventually, of course. The normal way I think
>> in
>> Debian is to have MariaDB and MySQL as alternatives, just like Some
>> versions of Ubuntu/Debian have mysql-5.0 and mysql-5.1 as alternatives
>> (can install one or the other, but not both).
>>
>> It is not 100% clear to me what your situation is (I'm not much familiar
>> with CentOS or RPM). Are you saying that the MariaDB packages you create
>> *must* be possible to install alongside the Official CentOS packages?
>>
>> In that case I suppose you have little option but to run mariadb on a
>> different port, different data directory, different socket, different
>> binary names. It seems to be sub-optimal for users, as they would need
>> to
>> reconfigure anything they want to use with MariaDB away from the
>> standard
>> port/names in the MySQL world.
>>
>> Still, this is perfectly possible to do. Configure a non-standard port
>> in
>> your my.cnf, build and install mariadb with a different --prefix,
>> /opt/mariadb or whatever.
>
> What I'm doing at the moment with Percona is exactly that. I change the
> Makefiles and patch the code to produce binaries and libraries that are
> completely different.
>
> And what I will do is create a simple RPM package that when installed will
> replace the MySQL package configuration and init script, and this way
> effectively giving the user easy way to replace the mysql packages
> installed on
> the machine.
>
>>
>>  - Kristian.
>
> --
> Best regards,
> Marian Marinov
> _______________________________________________
> Mailing list: https://launchpad.net/~maria-developers
> Post to     : maria-developers@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~maria-developers
> More help   : https://help.launchpad.net/ListHelp
>




References