HowTo Build NST 18: Difference between revisions

From MediaWiki
Jump to navigationJump to search
Line 48: Line 48:


If the above command fails, it means you skipped a step during the development machine setup section. You will need to fix this before continuing.
If the above command fails, it means you skipped a step during the development machine setup section. You will need to fix this before continuing.
If the above command passes (or you are logged in as ''root''), you should be able to run the following commands:
cd $HOME/repo
./configure
The first invocation will take a long time as many packages will need to be installed onto your development machine in order to make it capable of building the NST.
If the configuration script does not complete successfully, it indicates one of the following issues:
* A core package needs to be installed by hand. In this case, a error message should be displayed showing you what ''yum'' command to run in order to install the core package.
* There was a networking issue in downloading and installing one of the required packages.
* One of the packages that needed to be built and installed locally failed. This typically indicates that the remote server where the source is downloaded from was temporarily down (or that we need to update the source URL for the package in the NST source code).
= Initial Build =
Once you have successfully completed the configuration process, you should be able to build the NST yum repository and NST ISO image using the following commands:
cd $HOME/repo
make
If things work correctly, this should take a long time (many hours) and produce:
;nst-18.x86_64.iso or nst-18.i686.iso
: The 64 bit or 32 bit ISO image which can be burned to DVD or installed on a USB memory stick (using the '''live-iso-to-disk''' command).
;yum/repo
: The directory containing the NST yum repository. You can push this out to a web server if you want to maintain your own yum repository for your deployed NST systems to get updates from.
= Subsequent Builds =
Subsequent builds will run much faster (less than two hours) as less things should need to be downloaded, installed and built. Use the following commands to update your subversion area to the latest code and rebuild the NST yum repository and ISO image:
cd $HOME/repo
svn update && ./configure && make

Revision as of 11:59, 14 April 2013

Building NST 18

The following page provides details on building the NST 18 yum repository and ISO images directly from source code. The procedure boils down to the following steps:

  • Setting up a development machine.
  • Checking out copy of the source code.
  • Installing the necessary packages to build.
  • Building the yum repository and ISO image.

Setting Up A Development Machine

In order to set up a development machine, you will need to download either the 32 bit or 64 bit Live Installable version of Fedora 18 (http://fedoraproject.org/get-fedora). Choose the 32 bit version if you want to build the 32 bit version of NST and choose the 64 bit version if you want to build the 64 bit version of NST. If you want to build both a 32 bit version and 64 bit version of the NST, you will need to set up two development machines.

You can use a virtual environment as your development machines. If you do this, I'd recommend allocated at least 2GB of RAM and 40 GB of disk space and two CPUs. Even though it takes longer to build within a virtual environment, I find that the convenience is typically worth it. I typically use VirtualBox (https://www.virtualbox.org/) for my personal builds. The NST project uses VMware (http://www.vmware.com/) environments for nightly test builds.

Be aware that there are parts of the build process which require root access. Because of this, it is recommended that you set up a dedicated machine for NST development.

Regardless of whether you are using real hardware or virtual hardware, after you install Fedora 18, make sure you do the following:

  • Update the /etc/sudo file such that your account (or wheel group) can run the sudo command without being prompted for a password (NOTE: you can skip this step if you will be using the root account).
sudo visudo
  • Update all of the packages on the system:
sudo yum update
  • Reboot the system to load the newest kernel:
sudo reboot
  • Install/update any device drivers for you hardware or virtual environment.
  • Make sure that the subversion package is installed.
sudo yum install subversion 
  • Reboot the system to make sure the device drivers load properly.
sudo reboot

Check Out The Source Code

Once you have your Fedora 18 development machine set up, you can check out a copy of the NST source code. It is recommended that you check out the repo area from subversion as this is the active area that is kept up to date.

The following commands will check out a copy of the repo area to the $HOME/repo directory on your system:

cd $HOME
svn checkout http://svn.code.sf.net/p/nst/code/repo repo

It may take a bit, but the above should get a current copy of what we are currently using to build the current version of the NST distribution.

Initial Configuration

When you run the top level ./configure script, the configuration script may automatically be able to determine what packages are missing and add them to your development system. In order for the script to do this, you must either be logged in as the root user or using a account which has sudo privileges. To check whether or not your account has sudo privileges, try running the following:

sudo tail /var/log/messages

If the above command fails, it means you skipped a step during the development machine setup section. You will need to fix this before continuing.

If the above command passes (or you are logged in as root), you should be able to run the following commands:

cd $HOME/repo
./configure

The first invocation will take a long time as many packages will need to be installed onto your development machine in order to make it capable of building the NST.

If the configuration script does not complete successfully, it indicates one of the following issues:

  • A core package needs to be installed by hand. In this case, a error message should be displayed showing you what yum command to run in order to install the core package.
  • There was a networking issue in downloading and installing one of the required packages.
  • One of the packages that needed to be built and installed locally failed. This typically indicates that the remote server where the source is downloaded from was temporarily down (or that we need to update the source URL for the package in the NST source code).

Initial Build

Once you have successfully completed the configuration process, you should be able to build the NST yum repository and NST ISO image using the following commands:

cd $HOME/repo
make

If things work correctly, this should take a long time (many hours) and produce:

nst-18.x86_64.iso or nst-18.i686.iso
The 64 bit or 32 bit ISO image which can be burned to DVD or installed on a USB memory stick (using the live-iso-to-disk command).
yum/repo
The directory containing the NST yum repository. You can push this out to a web server if you want to maintain your own yum repository for your deployed NST systems to get updates from.

Subsequent Builds

Subsequent builds will run much faster (less than two hours) as less things should need to be downloaded, installed and built. Use the following commands to update your subversion area to the latest code and rebuild the NST yum repository and ISO image:

cd $HOME/repo
svn update && ./configure && make