Cross package maker. DEB/RPM generation or conversion. Derived from jordansissel/fpm.

⌈⌋ ⎇ branch:  cross package maker


Artifact [e41ce40ff7]

Artifact e41ce40ff7e2b8fb7dc3074708d80a808467808f:

Wiki page [cross package maker] by mario 2015-04-17 13:10:25.
D 2015-04-17T13:10:25.220
L cross\spackage\smaker
N text/x-markdown
P 0c02b625c8033acddcb34740a06f96d4021887d3
U mario
W 5615
<a href="https://github.com/jordansissel/fpm" title="Effing Package Management ;)">fpm</a> greatly simplifies distribution package generation.<br>
<a href="http://fossil.include-once.org/xpm/"><em title="Cross Package Maker">xpm</em></a> is a feature-oriented branch of fpm.

<img src=logo align=right width=130 height=154 alt=xpm style="margin:25pt">
It creates or converts between

  * Debian <kbd>`deb`</kbd>
  * RedHat <kbd>`rpm`</kbd>
  * Node <kbd>`npm`</kbd>
  * OSX <kbd>`pkg`</kbd>
  * Ruby <kbd>`gem`</kbd>
  * Solaris packages, plain <kbd>`zip`</kbd> or <kbd>`tar`</kbd> archives, and a few more..

See the [→ Howto](wiki/Howto) on common `fpm` usage examples.


### xpm target/source plugins

This variant (precautiosly renamed for parallel installation) adds a few more source/target modules:

  *  <kbd>[*-t* **exe**](wiki/exe)</kbd> assembles Windows SFX "installers"

  *  <kbd>[*-s* **src**](wiki/src)</kbd> consumes per-file relative `pack:` specifiers from meta comment fields for source-based apps

  *  <kbd>[*-t* **phar**](wiki/phar)</kbd> bundles PHP scripts into `.phar`/zip/tars with meta fields

  *  <kbd>[*-t* **ipk**](wiki/ipk)</kbd> creates a static Listaller (.IPK) or Limba archive (which is a cross-distro packaging format)

  *  <kbd>[*-s* **composer**](wiki/source_composer)</kbd> fetches PHP bundles per composer, allows to pack them as phars or system packages (or matroska phar in deb/rpm)

A few more are currently pondered..


### new features

This fpm branch already provides a few extensions:

  *  [**Multi-target**](wiki/multi-target) creation in one swoop.

        xpm -t deb,rpm,exe

     Avoids having to call fpm multiple times for creating distinct system packages. Usually package-specific flags `--deb-…` and `--rpm-…` can be mixed in one invocation - when they're non-overlapping.

  *  Simple post-processing with [**update filters**](wiki/update+filters):

        xpm -u man,appdata

     Update filters are run between input file collection and target package building. They're intended for quick tasks or semi-build functionality. Existing filters:

      * <kbd>[man](wiki/update+filters#man)</kbd> - compresses man pages
      * <kbd>[appdata](wiki/update+filters#appdata)</kbd> - creates pkg.appdata.xml for distro managers
      * <kbd>[desktop](wiki/update+filters#desktop)</kbd> - add stub fpm:pkg.desktop file
      * <kbd>[composer](wiki/update+filters#update_composer)</kbd> - update/generate `composer.json` for <kbd>phar</kbd> target
      * <kbd>[fixperms](wiki/update+filters#fixperms)</kbd> - limit file permissions (umask 755 / 644)
      * <kbd>[strip](wiki/update+filters#strip)</kbd> - strip debugging symbols from binaries
      * <kbd>[deps](wiki/update+filters#deps)</kbd> - resolve cross-distro library names per whohas/distromatch
      * <kbd>[unprefix](wiki/update+filters#unprefix)</kbd> - workaround for converting system packages back to local paths
      * <kbd>[lcase](wiki/update+filters#lcase)</kbd> - lowercase filenames prior packaging
      * <kbd>[packfile](wiki/update+filters#packfile)</kbd> - runs any `Packfile` within the /tmp/staging dir on assembled files

  *  Debian [package signing](wiki/package+signing) with `--deb-sign KEYNAME` integrated.

  *  Additional <kbd>--attr</kbd> option to add custom control header fields (practically an alias for --deb-field, but also works for phar packages, based on `attrs{}`, so src plugin implicitly populates extra fields).


### possible extensions

It's planned or at least considered to add:

  * <kbd>[*-t* **inst**](wiki/inst)</kbd> → a GUI/Python-based BSD/Linux cross-distro installer (reusing zip, deb, alien, pkcon, xdg-tools)

  * <kbd>[*-t* **msi**](wiki/msi)</kbd> - for proper Windows packages

  * depending on further research, one of the AppImage-formats (utilizing their actual tools) might make sense

See [Research](wiki/Research) on existing and inactive cross-distro packagers, schemes and initiatives.


### build and installation

Meanwhile xpm installs as `xpm`, to keep any mainline `fpm` accessible. It's installed per rubygems easily. Either download a [prebuilt gem ($stats_latest_version) from `apt.io`](http://apt.include-once.org/xpm-$stats_latest_version.gem) or assemble it yourself:

  1. Download the [xpm.tgz](tarball/xpm.tgz?uuid=trunk) tarball, extract somewhere
  2. `gem build ./xpm.gemspec`
  3. `gem install ./xpm-$stas_latest_version.gem`

Take note that this fetches a few other dependencies, even compiles `ffi`; so may take a few more seconds. But basically that's it.


### fossil → git

I just don't fancy git. That is all. But this fossil repo will be synced back to [https://github.com/prof-milki/xpm](https://github.com/prof-milki/xpm) once in a while.

Or you can just sync it directly from here. Download or install the single [fossil binary](http://www.fossil-scm.org/download.html), then:

  1. `fossil clone http://fossil.include-once.org/xpm/ xpm.fsl`
  2. `fossil open xpm.fsl`
  3. `fossil ui`

From there you could also just `fossil export --git` and pipe that into `git fast-import`.

Alternatively just use the new direct remote export:

  1. `wget //fossil.include-once.org/xpm/git-fast-export`

It should be noted that Git is occasionally flaky with its own export format though.


### links

  *  mainline fpm version [https://github.com/jordansissel/fpm](https://github.com/jordansissel/fpm)
  *  apt/yum repo builder [https://github.com/dnbert/prm](https://github.com/dnbert/prm)

Z a82b1d8c84d7bd02c202d4c10fa9f3d0