Skip to content

alexandrecunha/package-builder

 
 

Repository files navigation

Stories in Ready

package-builder

Builds OS packages inside a docker container. A Dockerfile and build context are dynamically
generated to construct the package development environment. Then build command is executed
and the build results are extracted.

After the build, you can test the package inside a new docker container only
using --test parameter.

now is only suported for Mac OS, and RPM packages
suggestions, issues and pull requests are welcome.

Install

$ pip install git+https://github.com/wagnersza/package-builder

Preparing environment

Install and start a new boot2docker VM and prepares the package development environment

$ package-builder --up

Build packages

The package-builder expects to be inside a directory that contains the spec file,

It scans the package looking for sources, put inside the docker image and run the build command.

the package-builder supports using the url of the source to automatically download into the container now package-builder don't convert spec variables, you must use the full name.
for instance:
not suported: Source0: http://meupacote.com/%{name}-%{version}.tar.gz
suported: Source0: http://meupacote.com/pacote-0.0.1.tar.gz
suported spec file example in https://github.com/wagnersza/tsuru-spec

$ package-builder --build

Test packages builded

Testing the generated package into a clean container

$ package-builder --test

the packages can be found inside the directories /RPM and /SRPM

Select Docker image to build a package

Now by default package-builder uses centos:centos7 image, but can changed
using --image parameter

see the options in https://registry.hub.docker.com

$ package-builder --image <docker image>

About

Builds OS packages inside a docker container.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 92.9%
  • Makefile 7.1%