Environment Preparation¶
Getting Started¶
Note
If you are preparing to generate a SIMP ISO from a release tarball, you don’t need mock
!
Required Packages¶
Before we go any further, you’ll want to make sure that you have a few RPM packages installed on your system and that your build system has access to the Internet. If you’re using Enterprise Linux as your build system, you will need to enable EPEL for your system prior to proceeding.
Required RPMs¶
# Installing from EL 6:
$ sudo yum install -y augeas-devel createrepo genisoimage git gnupg2 \
libicu-devel libxml2 libxml2-devel libxslt libxslt-devel \
mock rpm-sign rpmdevtools clamav gcc gcc-c++ ruby-devel
# Installing from EL 7:
$ sudo yum install -y augeas-devel createrepo genisoimage git gnupg2 \
libicu-devel libxml2 libxml2-devel libxslt libxslt-devel \
mock rpm-sign rpmdevtools clamav-update gcc gcc-c++ ruby-devel
# Installing from Fedora 23/24:
$ sudo dnf install -y augeas-devel createrepo genisoimage git gnupg \
libicu-devel libxml2 libxml2-devel libxslt libxslt-devel \
mock rpm-sign rpmdevtools clamav-update gcc gcc-c++ ruby-devel
Warning
Please use a non-root user for building SIMP!
Note
The SIMP build generates various keys and does quite a bit of package
signing. As such, your systems needs to be able to keep its entropy pool
reasonably full at all times. If you check
/proc/sys/kernel/random/entropy_avail
and it shows a number below 1024,
then you should either make sure that rngd
is running and pointed to a
hardware source (preferred) or install and use haveged. It is not
recommended that you use haveged in production but it may be your only
choice if building on a virtual system.
Set Up Ruby¶
We highly recommend using RVM to make it easy to develop and test against several versions of Ruby at once without damaging your underlying Operating System.
RVM Installation¶
The following commands, taken from the RVM Installation Page can be used to install RVM for your user.
$ gpg2 --keyserver hkp://keys.gnupg.net --recv-keys \
409B6B1796C275462A1703113804BB82D39DC0E3
$ \curl -sSL https://get.rvm.io | bash -s stable --ruby=2.1.9
$ source ~/.rvm/scripts/rvm
Set the Default Ruby¶
You’ll want to use Ruby 2.1.9 as your default RVM for SIMP development.
$ rvm use --default 2.1.9
Note
Once this is done, you can simply type rvm use 2.1.9
.
Bundler¶
The next important tool is Bundler. Bundler makes it easy to install Gems and their dependencies. It gets this information from the Gemfile found in the root of each repo. The Gemfile contains all of the gems required for working with the repo. More info on Bundler can be found on the Bundler Rationale Page and more information on Rubygems can be found at Rubygems.org.
$ rvm all do gem install bundler
Configure Mock¶
Building SIMP from scratch makes heavy use of Mock to create clean packages. As such, you need to ensure that your system is ready. If you plan on just buidling from a tarball, you can skip this section.
Add Your User to the Mock Group¶
$ getent group mock > /dev/null || sudo newgrp mock
$ sudo usermod -a -G mock $USER
You may need to run newgrp or logout and back in for the group settings to take effect.
Prepare to Work¶
You are now ready to begin development!
Clone simp-core:
$ git clone https://github.com/simp/simp-core
$ cd simp-core
Check out your desired branch of SIMP:
- To check out a stable SIMP release, check out a tag:
$ git checkout tags/5.2.0-0
- To check out an unstable SIMP release, check out the latest 5.X or 4.X HEAD:
$ git checkout 5.1.X
$ git checkout 4.2.X
Note
SIMP >= 5.2.X, >= 4.3.X are still developed on the 5.1.X and 4.2.X branches, respectively. We have not migrated our development to new branches.
Grab gem dependencies:
$ bundle install