Various recipes to build custom RPMs. It uses FPM and FPM Cookery to build RPMs for RHEL-like environments.
A CentOS build environment is provided using Vagrant.
Use the included Vagrantfile
to build a CentOS 7 environment with all the
required dependencies. Simply run:
vagrant up
vagrant ssh
However, the list of prerequisites for building RPMs with FPM Cookery are:
- Ruby 2.0 or greater
git
zlib
zlib-devel
openssl-devel
readline-devel
RPMsfpm-cookery
Ruby Gem
The included RPM build scripts are mounted in the Vagrant VM under /vagrant
To build single RPMs (eg. Redis
):
cd /vagrant/redis
fpm-cook clean
fpm-cook
If you run into any problems, the partial build files are in the tmp-build
directory. Troubleshoot in there and then go through the cook steps above again.
Once an RPM is built you can examine, install and remove it via:
rpm -qpil pkg/new-package-name.version.rpm
sudo rpm -ivh pkg/new-package-name.version.rpm
sudo rpm -ev new-package-name
Included in the scripts
directory are helpers to clean and build all the
include RPMs in one go:
cd /vagrant
./scripts/clean-all.sh
./scripts/cook-all.sh
cp -r example new-rpm-name
cd new-rpm-name
mv recipe.rb.example recipe.rb
vim recipe.rb
vim README.md
The example recipe.rb
gives you the basic outline.
- Include Puppet install with Vagrant VM
- Include
vboxsf
install with Vagrant VM - Test build dependencies from basic Centos image
- Expand
VIM
plugins - Debian-ize recipes and build apt packages