Mar/23
2009

Openfiler remote Quota and Howto rebuild a Package

The past days were kind of a journey for me. I had installed a new storage backend at our hoster wich consists of two drbd-mirrored server with the openfiler distri. On major feature wich i evaluated previosly was quota support. But as usual things changed. Instead of normal quota support i faced the problem that i've to set quota remotely over an nfs share and as you can except openfiler doesn't support it by default. One alternative was to install some perl modules on the filers, but i didn't want to polute it so much.
So...i had to dig very deep in the rpath infrastructure to extract a few usefull lines at the end. The whole action took me 6 days, the first half to trace the problem down, 2.5 days for research, a few hours to make it but the major part of the last step was to get a appropriate testmachine.

!!! Caution !!!
Keep in mind that this is a 'hack'. If you use this, it's on you on your own risk.
If you update your installation, this changes may be overwritten and you will have to do this again.

In first place you have to setup a development environment, or in other words install exactly the same system in a local vm.

Then you have to install two dev packages:
conary update rmake conary-build

The cvc command should now be available, if not the python script is located under /usr/lib/python2.4/site-packages/conary

Now install the following packages, wich are requiered to build quota:
conary update binutils:devellib debugcedit:runtime e2fsprogs:devel elfutils:runtime gcc:devel gcc:devellib gcc:lib gcc:runtime gettext:runtime glibc:devel glibc:devellib libgcc:devellib patch:runtime tcp_wrappers:devel

If you got that, add a new user for the compile action or just give the user rmake a shell, su into the user and check out quota:
cvc checkout quota

Now open the recipe and add the following to configure: --enable-rpcsetquota=yes
Finally start the cooking:
cvc cook quota/quota.recipe

If no error appears you should get the build under: /srv/rmake/conary/builds/quota/

Test it and make your it has the -S option avaiable, then you can copy it to your production system.