An open API service indexing awesome lists of open source software.

https://github.com/werrett/rpm-recipes

Custom RPM recipes using FPM Cookery
https://github.com/werrett/rpm-recipes

centos devops fpm-cookery rpm

Last synced: about 1 year ago
JSON representation

Custom RPM recipes using FPM Cookery

Awesome Lists containing this project

README

          

# FPM Recipes

Various recipes to build custom RPMs. It uses
[FPM](https://github.com/jordansissel/fpm) and [FPM
Cookery](https://github.com/bernd/fpm-cookery) to build RPMs for RHEL-like
environments.

A CentOS build environment is provided using
[Vagrant](https://www.vagrantup.com/).

## Installation

Use the included `Vagrantfile` to build a CentOS 7 environment with all the
required dependencies. Simply run:

```bash
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` RPMs
* `fpm-cookery` Ruby Gem

## Building RPMs

The included RPM build scripts are mounted in the Vagrant VM under `/vagrant`

To build single RPMs (eg. `Redis`):
```bash
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:
```bash
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:
```bash
cd /vagrant
./scripts/clean-all.sh
./scripts/cook-all.sh
```

## Creating an new RPM

```bash
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.

## Todo

* 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