Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Grand Package Manager

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 bin
Octocat-spinner-32 features
Octocat-spinner-32 lib
Octocat-spinner-32 spec
Octocat-spinner-32 templates
Octocat-spinner-32 .gitignore
Octocat-spinner-32 Gemfile
Octocat-spinner-32 Gemfile.lock
Octocat-spinner-32 Guardfile
Octocat-spinner-32 README.md
Octocat-spinner-32 gpm.gemspec
README.md

GPM - The Grand Package Manager

GPM is a tool to package things from diverse sources (directories, gems, ...) into native packages like .deb or .rpm At the moment only gem input and .deb output are supported.

Installation

GPM is hosted on Rubygems.org, so a simple

gem install gpm

should work.

Common usage

Build a DEB package from a bundler directory:

bin/gpm package $SERVICE_DIR/Gemfile -d $DESTINATION_DIR_ON_TARGET -s bundler -t deb

Build a DEB package from a gem package:

bin/gpm package $SERVICE_DIR/$service_name.gem -d $DESTINATION_DIR_ON_TARGET -s gem -t deb

Relation to FPM

GPM is mostly a rewrite of FPM and might be merged with it if FPM's maintainers are OK with that. GPM is developed in a behaviour-driven style (BDD) using Cucumber and RSpec. One major internal difference is that GPM tries to use convention over configuration. Template expansion works by reading all template files from a directory with the same name as the package type and then applying certain operations based on the file name:

  • Files named some_file.gz.erb are standard ERB templates which automatically get gzipped to some_file.gz after expansion
  • Directories named some_directory.tar.gz.dir get tar-gzipped to a file some_directory.tar.gz after expanding all templates

GPM Target Plugins

GPM has a plugin system for packaging targets, where modules and classes can contribute to packaging steps (at the moment file_creation and packaging). For a simple example see lib/gpm/target/zip_directories.

To Do

  • When the package/postinst script gets packaged uncomment the step which checks that the DEBIAN postinst script calls it
  • Use Tilt for expanding templates so developers can choose between templating engines
  • GPM should not modify the origin directory. At the moment it does this by calling "bundle install" and "bundle install --deployment" in it.
  • Eliminate current Source::War. It can be replaced by using Source::Maven and specifying the WAR file in included-files
Something went wrong with that request. Please try again.