All Projects → zalando → package-build

zalando / package-build

Licence: MIT license
A toolset for building system packages using Docker and fpm-cookery

Programming Languages

ruby
36898 projects - #4 most used programming language
shell
77523 projects
Dockerfile
14818 projects
Makefile
30231 projects
perl
6916 projects
HCL
1544 projects

Projects that are alternatives of or similar to package-build

Fpm Within Docker
Leverage fpm inside pre-baked docker images in order to build and test native DEB and RPM packages.
Stars: ✭ 80 (+122.22%)
Mutual labels:  packaging, deb, rpm
foreman-packaging
Packaging files (RPMs, debs) for Foreman and its dependencies
Stars: ✭ 38 (+5.56%)
Mutual labels:  packaging, deb, rpm
python-deb-pkg-tools
Debian packaging tools
Stars: ✭ 36 (+0%)
Mutual labels:  packaging, apt, deb
deezer-linux
An universal linux port of deezer, supporting both Flatpak and AppImage
Stars: ✭ 141 (+291.67%)
Mutual labels:  packaging, deb, rpm
Open Build Service
Build and distribute Linux packages from sources in an automatic, consistent and reproducible way #obs
Stars: ✭ 599 (+1563.89%)
Mutual labels:  packaging, deb, rpm
Jenkins Bootstrap Shared
Jenkins as immutable infrastructure made easy. A repository of shared scripts meant to be used as a git submodule. Packing Jenkins, plugins, and scripts into immutable packages and images.
Stars: ✭ 270 (+650%)
Mutual labels:  packaging, deb, rpm
Debreate
A utility for creating Debian packages.
Stars: ✭ 70 (+94.44%)
Mutual labels:  packaging, deb
Exrm deb
Create a deb for your elixir release with ease
Stars: ✭ 75 (+108.33%)
Mutual labels:  packaging, deb
LAMPP-Manager
A simple LAMPP manager designed to automate all the work.
Stars: ✭ 117 (+225%)
Mutual labels:  deb, rpm
Rpmvenv
RPM packager for Python virtualenv.
Stars: ✭ 128 (+255.56%)
Mutual labels:  packaging, rpm
Aptly
aptly - Debian repository management tool
Stars: ✭ 2,065 (+5636.11%)
Mutual labels:  packaging, apt
Mason
Cross platform package manager for C/C++ apps
Stars: ✭ 230 (+538.89%)
Mutual labels:  packaging, apt
rpm-rs
A pure rust library for building and parsing RPM's
Stars: ✭ 32 (-11.11%)
Mutual labels:  packaging, rpm
rabbitmq-server-release
RabbitMQ packaging and release engineering bits that do not belong to the Concourse pipelines.
Stars: ✭ 13 (-63.89%)
Mutual labels:  packaging, rpm
Boostnote-packages
Repo containing .rpm, .deb and Boostnote app folder
Stars: ✭ 31 (-13.89%)
Mutual labels:  deb, rpm
Docker Rpm Builder
Build native RPM packages for Centos/RHEL/Fedora from any Linux distro or even OSX, by leveraging docker capabilities.
Stars: ✭ 366 (+916.67%)
Mutual labels:  packaging, rpm
repogen
Easy-to-use signed APT repository generator with a web-based package browser.
Stars: ✭ 34 (-5.56%)
Mutual labels:  apt, deb
elementary-nightly-rpms
nightly Pantheon DE + elementary applications packages for fedora (unofficial)
Stars: ✭ 34 (-5.56%)
Mutual labels:  packaging, rpm
obs-service-go modules
OBS Source Service to download, verify, and vendor Go module dependency sources
Stars: ✭ 18 (-50%)
Mutual labels:  packaging, rpm
aptly-web-ui
Simple web UI for aptly
Stars: ✭ 32 (-11.11%)
Mutual labels:  apt, deb

Package Build

Package-build is a toolset for creating native system packages: .deb for Debian-like and .rpm for RedHat-like OSes. It is useable out-of-the-box.

The Idea

With a few simple scripts, you can use package-build to create isolated, self-contained packages; provide them in your internal repos; and not worry about deployment and dependencies. You can even use these scripts to package tarballs that are randomly dropped into a web folder. Because a simple shell script performs the actual package-building, you can easily use the same commands in a continuous integration context — i.e., to automatically build packages every time a recipe changes or a new one has been added.

Details:

  • the whole build process is triggered from Fabric tasks running on the "build host"
  • build slaves are Docker containers to maintain a clean, well-defined environment
  • actual package building is done with fpm and fpm-cookery

Setup

Clone the repo and install the Python requirements:

sudo pip install -r requirements.txt

cp package-build.yaml-example ~/.config/package-build.yaml
vim ~/.config/package-build.yaml # adapt to your repo server and distributions for which you want to build packages
fab docker_build # this will setup the required Docker images and could take a while

If pycrypto makes trouble here, install Python's headers before: sudo apt-get install python-dev or sudo yum install python-devel depending on your OS.

How-to

Docker containers provide the build environments, so you'll have to create a new subfolder under docker/ with a Dockerfile for all the distributions for which you want to create a package. Create an entry in the config file ~/.config/package-build.yaml for each distribution to map it to a package format ("rpm" or "deb", see the example config file).

As stated above, fpm and fpm-cookery do the actual package build. (fpm-cookery automatically builds [only a package for the distribution/OS where it's running] (https://github.com/bernd/fpm-cookery/blob/master/spec/facts_spec.rb#L72).) Create a recipe.rb under a subfolder in recipes/. Optionally, create a script called prepare.sh, meant to be run before fpm-cook package is executed.

$ Command Line Examples

To start the packaging process for different distributions and packages, see the examples below.

Build facter for Ubuntu 16.04 ("Xenial"):

fab package_build:facter,ubuntu16.04

Build facter for all configured distributions:

fab package_build:facter

For testing: The created package will not automatically upload and publish to your repositories unless you set the parameter upload to True:

fab package_build:debian7,upload=True

Publish a package to the internal repository for ubuntu16.04 (which is the default distribution):

fab repo_deb_add:~/path/to/package.deb

To publish a package in the repos for other distributions, you have to pass them explicitly:

fab repo_deb_add:~/path/to/package.deb,dist=ubuntu12.04

To delete a package from the repo for a specified distribution:

fab repo_deb_del:dist=ubuntu12.04,chimp

More Recipe Examples

Test Coverage

Currently, there are no tests for this project and test contributions are very welcome. Please see also the Contributing section.

Contributing

Thanks for your interest in contributing! There are many ways to contribute to this project. Get started here.

License

The contents of this repository are licensed under the MIT License.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].