VDR ports docs

After a quick dis­cus­sion with nox@ I made a copy&paste of his “VDR is com­mit­ted now”-mail into the FreeB­SD wiki. I also re-styled some small parts of it to fit bet­ter into the wiki. It is not per­fect, but already usable. Now inter­est­ed peo­ple can go and improve the docs there.

Thanks to Juer­gen for all his work in this area!

Con­vert­ing from Couri­er IMAP to dove­cot is easy

I have used Couri­er IMAP at home since a long time. As I want to update a dove­cot 1.2 set­up to dove­cot 2.x, I decid­ed to first have a look at dove­cot 2.x at home.

Switch­ing from Couri­er IMAP to dove­cot is real­ly easy. I just con­fig­ured the cor­rect path to the maildir, set­up a passdb/userdb, and it was working.

The impor­tant part was the cor­rect trans­fer of the pass­words. I used already an userdb in Couri­er IMAP with MD5 pass­words. For each user it has imappw=XXX with XXX sim­i­lar to $1$abc.

This can be con­vert­ed into a dove­cot passdb/userdb line very easily:

username:{MD5-CRYPT}$1$abc::UID:GID::HOMEDIR::userdb_mail=maildir:~/path/to/maildir

The cor­re­spond­ing passdb/userdb set­tings for dove­cot are:

passdb {
   args = scheme=MD5-CRYPT username_format=%u /usr/local/etc/dovecot/dovecot.pws
   driver = passwd-file
}
userdb {
   args = username_format=%u /usr/local/etc/dovecot/dovecot.pws
   driver = passwd-file
}

Com­pared to when I had a look the last time, dove­cot is also able to use OTP as an authen­ti­ca­tion mech­a­nism now. Unfor­tu­nate­ly I did not find any doc­u­men­ta­tion how to configure/use it.

Non-default lin­ux base ports deprecated

Yes­ter­day I dep­re­cat­ed the non-default Fedo­ra based Lin­ux base ports. This means fc6, f7, f8 and f9 will van­ish soon (I decid­ed for one month of expiry time). This is because all of them are End of Life upstream since a long time (= no secu­ri­ty updates).

The fc4 and f10 ones are still avail­able – even if they are End of Life too – because FreeB­SD 7.x can not use some­thing new­er than the fc4 one, and we have not test­ed yet a more recent Lin­ux distribution.

Prob­a­bly the most easy way to update the Lin­ux base ports to some­thing new­er is to stay with Fedo­ra (we have a lot of ports-infrastructure for it already). Unfor­tu­nate­ly it is not known if some­thing new­er works with­out prob­lems (miss­ing epoll/inotify sup­port could be a road­block here in case it is exten­sive­ly used in a more recent version).

I want to get some time to have a look if a more recent Fedo­ra ver­sion is suit­able for the use as a Lin­ux base in FreeB­SD 8.x+, but I do not have an esti­mate when I can start and how long it may take. In case some­one already test­ed a more recent Fedo­ra ver­sion feel free to share your experience.

HOWTO: cre­at­ing your own updat­ed lin­ux RPM for the FreeB­SD linuxulator

Back­ground info

The FreeB­SD lin­ux com­pat­i­bil­i­ty envi­ron­ment cur­rent­ly uses RPMs from Fedo­ra 10. Unfor­tu­nate­ly Fedo­ra 10 is end of life since a while. For one of the RPMs (the pan­go one) we where aware of a secu­ri­ty vul­ner­a­bil­i­ty. As we do not know if it is fea­si­ble to update the lin­ux­u­la­tor ports to some­thing more recent, I decid­ed to set­up a VM with Fedo­ra 10 and gen­er­ate a new RPM for the linux-f10-pango port. Thanks to Luchesar V. ILIEV for explain­ing me how to do this.

Set­up of the VM

I used Vir­tu­al­Box 4.0.4 on a Solaris 10 x86 machine. I con­fig­ured a fixed size disk of 16 GB and kept the default net­work set­up (after installing the guest tools / ker­nel mod­ules I switched to vir­tio, as I was not able to do any­thing use­ful besides a ping) and RAM size. The CD/DVD dri­ve was con­fig­ured to use the image of the full Fedo­ra 10 DVD for i386 systems.

Set­up of Fedo­ra 10

Boot­ing the VM from the DVD leads to the graph­i­cal Fedo­ra 10 install soft­ware (after chos­ing to install a new sys­tem on the con­sole). There I accept­ed all the defaults, except for the soft­ware to install. I des­e­lect­ed the Office and Pro­duc­tiv­i­ty group and select­ed the Soft­ware Devel­op­ment group. When I was asked if I want to install some addi­tion­al RPMs I had a look at the com­plete list and installed some I thought are nec­es­sary. I do not remem­ber any­more which ones I chose, but every­thing which looks relat­ed to RPM build­ing is a good candidate.

After a while the install will be fin­ished and you can boot into the new sys­tem (eject the DVD from the dri­ve before reboot). After reboot chose to install the Guest Addi­tions in the menu of the VM. This should mount the ISO image in the VM. As root exe­cute the file for Lin­ux. This will build some ker­nel mod­ules for bet­ter inte­gra­tion (e.g. seam­less inte­gra­tion of the mouse between your desk­top and the VM). At this point I reboot­ed and con­fig­ured vir­tio as the NIC. I also had to con­fig­ure the net­work set­tings by hand, as the GUI tool did not safe all the set­tings correctly.

Update and install of required RPMs

After the VM was up and the net­work con­fig­ured, I updat­ed the entire sys­tem (chose Sys­tem Update in the menu). To update the pan­go port, I had to install the libthai-devel RPM. I had the RPM for it (and all the files I need to build a new pan­go RPM) already down­loaded, so I did a “yum install /path/to/rpm”. At this point I was ready to cre­ate the RPM build environment.

The RPM build environment

As a nor­mal user I exe­cut­ed the com­mand rpmdev-setuptree which cre­ates the direc­to­ry rpm­build and pop­u­lates it with some direc­to­ries. Now you just need to find a suit­able .spec file and put it into rpmbuild/SPECS, put the sources (and maybe patch­es ref­er­enced in the .spec file) into rpmbuild/SOURCES, and you are ready to go (I patched pango.spec for a more recent pan­go ver­sion, basi­cal­ly just chang­ing the ver­sion num­bers). If you want to have a cus­tom pack­ager and ven­dor attribute in the RPM, you can add a line for each to ~/.rpmmacros, e.g. %pack­ager your­name­here and %ven­dor what­ev­eris­ap­pro­pri­ate. I used my @FreeBSD.org EMail address as the pack­ager, and FreeB­SD as the vendor.

Build­ing a RPM

I used rpm­build ‑ba –tar­get i386-redhat-linux-gnu –clean rpmbuild/SPECS/pango.spec to build the new pan­go RPM. If every­thing is OK, the result­ing RPMs (a source RPM, a dev­el RPM, a debug­in­fo RPM and the RPM for the bina­ries) are in rpmbuild/RPMS and rpmbuild/SRPMS. For a FreeB­SD port we just need the source RPM (to com­ply to the (L)GPL) and the RPM for the binaries.

Addi­tion­al info

The i386-redhat-linux-gnu string which is used for the –tar­get option of the rpm­build com­mand is what seems to be used to build the Fedo­ra 10 RPMs. After build­ing pan­go, the RPM has i686-pc-linux-gnu in some file­names instead (the default val­ue for this set­up). The bina­ries seem to be com­piled for i386, so there should be no prob­lem even for old systems.

A new linux-f10-pango port is ready

In the last days I took (and even had) the time to install a VM with Fedo­ra 10, updat­ed all the pack­ages after instal­la­tion, and cre­at­ed a new linux-f10-pango port (v 1.28.3). I did this because the port has a secu­ri­ty vul­ner­a­bil­i­ty accord­ing to our VuXML DB and there where more and more reports in the last months from users which had a prob­lem with this.

Dur­ing the update of the port I noticed that the port does not con­tain a FORBIDDEN entry, just por­tau­dit com­plains about it because there is an entry in the VuXML. That is not nice. I was told that the ports slush will be lift­ed soon (I need to bump some PORTRE­VI­SIONs), this means that I can com­mit the update prob­a­bly tomor­row, just in time when the new RPM should hit the FreeB­SD dis­tri­b­u­tion infra­struc­ture (MASTER_SITE_LOCAL is updat­ed once a day from a spe­cif­ic fold­er in our home directories).

Thanks to Luchesar V. ILIEV for the nice write­up of what to install in Fedo­ra 10 to be able to build RPMs, and the descrip­tion of how to build your own RPM.