← Back to team overview

maria-discuss team mailing list archive

Re: MariaDB Compile Size

 

Hi, Reindl!

On May 19, Reindl Harald wrote:
> Am 19.05.2018 um 07:33 schrieb Tom Jay:
> > 
> > Has anyone got any idea how to reduce the MariaDB install size, when
> > compiling from source? I've had multiple attempts, all with
> > different options such as 'WITHOUT_EXAMPLE_STORAGE_ENGINE=1' and
> > 'FEATURE_SET:STRING=large', for example, but with no effect. The
> > installation size is usually around 2.1 GB, whereas the official
> > Arch package, which also compiles from source, is about 231.78 MB.
> > 
> > The official Arch build script is here
> > [https://git.archlinux.org/svntogit/packages.git/tree/trunk/PKGBUILD?h=packages/mariadb],
> > and the only difference I can notice is that they delete a lot of
> > stuff afterwards. Is there any reference for stuff that can be
> > deleted after MariaDB has been installed?
> 
> 2.1 GB? *lol*
> 
> * first learn to build packages
> * second split into subpackages
> * build only what you need
> * install only what you need

Reindl,
He's using *Arch*, right?
Splitting in multiple rpm's or deb's won't help directly.
But - thanks for the idea, they could still help.

Tom, there're two approaches:

RPM: files are split into packages by using cmake "components".
Every installed file belongs to some component. And rpm builder uses
this information to group them.

But you don't need rpms, you can install a component directly with

  cmake -DCOMPONENT="componentname" -P cmake_install.cmake 

(untested, I've googled it). You can see the list of components and how they
map to rpm packages in cmake/cpack_rpm.cmake (e.g. components Server,
ManPagesServer, IniFiles, Server_Scripts, and SupportFiles all go into
the "server" rpm package).

DEB is doing it differently, see *.install files in debian/ directory.
For example, if you want to install the client only, you'll only need
files from mariadb-client-*.install. And dependencies.

Regards,
Sergei
Chief Architect MariaDB
and security@xxxxxxxxxxx


Follow ups

References