Building Nano

For lab 2 of the SPO600 course we have to build from source two linux packages. I will be building these packages in a Fedora 28 VM. The first package I will be building is nano, the command line text editor. This build of Fedora does not have nano installed, so we may be missing some dependancies.

I downloaded the tar file into my home directory and extracted it.

The install file gives details on how to install this package and the various options it has. One interesting feature I noticed is the ability to build for multiple architecture at once. However I am just doing a simple build.

Running ./configure tells me I need to get ncurses lib. It also tells me the name of the package in various distributions, for Fedora this is ncurses-devel.

With this requirement met ./configure ran successfully. Configure has set up the makefile, and now it should be fully setup to build for our system.

Make will build the libraries and configure gcc, it will eventually produce a executable file for nano. That file is put in the src directory.

Now I have a working version of nano we can run from this directory.

It can be installed with make install. However it is much better to install programs through dnf, as it leaves a record, meaning it can be removed or updated easier.

This build process was very easy. Which is in part due to how small this package is, and how few dependencies it has. But also the configure process told me exactly what I needed to make it work. This is very useful as the same this may have a different name in a different package management system.