dimanche 7 février 2016

Making MariaDB work on musl for Alpine Linux


First of all, I wish to thank the father of MariaDB, Michael Widenius commited my code to MariaDB.

It has been a long journey to making MariaDB  musl compatible and we've finally done it. 



The world of lightweight, portable and secure distros


Alpine Linux :

Alpine linux is a security-oriented distro based on musl libc and busybox.

Portability: The image itself is an 82 MB iso file. So, as you may guess, no bloatware, virtually no vulnerabilities 
and very portable. Heck! that thing can run from my oldest 128MB thumb drive.

Resource efficiency: And don't forget also that this tiny distro is resource efficient too. You might need around 8-256MB of RAM to get it up and running.

Security: Quoted from the official website itself  "The kernel is patched with grsecurity/PaX out of the box, and all userland binaries are compiled as Position Independent Executables (PIE) with stack smashing protection. These proactive security features prevent exploitation of entire classes of zero-day and other vulnerabilities. "

Musl libc :

We've already talked about musl libc in a previous post. For those who weren't following, please refer to: this article

So, how do i use it ?

I'm glad you asked ! Well for starters, you can run MariaDB on Alpine Linux by compiling MariaDB from source.
The way its done is by downloading MariaDB from the most recent source tree.
And compiling it using your favourite compiler.

But for it to be compatible with musl we need to disable TokuDB.

Of course, TokuDB compatibility under musl is still a work in progress and will be available in no time.

Commands to get MariaDB to run with musl :

cd to source directory
cmake . -DWITHOUT_TOKUDB=1
make

There you go ! You are now running MariaDB on a secure box using musl libc :)

Switching to Fedora 23


My first post of February. Been a long time. I have been quite busy preparing for my new job.

I've switched from Debian to Fedora Core 23 as my main on my personal laptop.

A few things that i had to adapt to on the way...

Yum...mmm - Package Manager ==> DNF

No more apt-get. We're yumming everything now. Btw yum is obsolete now. We're dnfing it out.

Well, you're still allowed to yum it out but it passes the commands to dnf automatically. So, I

switched to the more powerful and intelligent dnf. 

dnf syntax is easy - same as every other package manager i would say.

#dnf install PACKAGENAME


But why was yum crushed and thrown to oblivion ?

1. Undocumented Yum API

- Because of this, all ongoing development to yum, was very slow. Developers like you and I, when we saw bugs on yum, were like 'huh...broken package manager. sad. Lets try another distro'

Soon, maybe i'll get a patch to dnf's tree. Already seen a few annoying bugs :-(

2. Python 3

- Here comes the good part. Fedora moved to native python 3. yum was doomed. DNF supports both Python 2 and 3.

So yeah, yum had to go.

What we're now getting using the yum command is a warning :

Yum command has been deprecated, redirecting to '/usr/bin/dnf install api'.
See 'man dnf' and 'man yum2dnf' for more information.
To transfer transaction metadata from yum to DNF, run:
'dnf install python-dnf-plugins-extras-migrate && dnf-2 migrate'


OpenStack


Openstack public cloud recommended Ubuntu or Fedora/RedHat. I've already tried ubuntu, but been a long time since i used Fedora. So why not?
I'm trying out a few mini images.
I'll post about OpenStack once i get the hang of it.


Fedora - Resource consumption - 

Fedora's resource management is impressive. My laptop's uptime is 8-10 hours of usage when on battery. I used to clock around 5 hours max on my Debian machine.
+1 for Fedora


Fedora Representative

A few friends suggested that I become the Mauritius Fedora Representative, and that they would back me up too =) . So I gladly accepted.

Feel free to contact me for any questions on Fedora :-) 
My profile : https://fedoraproject.org/wiki/User:Codarren