rbm-publish man page

rbm-publish — Publish some packages or files

Synopsis

rbm publish <project> [--publish-src-dir=<dir>] [options]

Description

Build a package and publish it. See rbm-pkg(1) for details about how the package is built.

If the option --publish-src-dir is used, then the package is not built, and instead the packages or files present in that directory are published.

Configuration Options

publish

This is the content of the script that is used to upload the packages or files to a repository. This script will be executed from the directory containing the files to publish. This option has no default value.

See rbm_config(7) for all other options.

Command Line Options

The command line options related to publish are :

--publish-src-dir

The directory containing the files that are going to be published.

See rbm_cli(7) for all other options.

Examples

In this example, we want to publish packages for Mageia and Debian. On Mageia, the repository metadata are generated using genhdlist2. On Debian the new package is included in the repository using reprepro.

The rbm configuration looks like this :

targets:
  Mageia:
    repo_dir: /path/to/mageia/repo
    publish: |
     #!/bin/sh
     cp -va noarch/*.rpm [% c('repo_dir') %]
     genhdlist2 [% c('repo_dir') %]
  Debian:
    repo_dir: /path/to/debian/repo
    publish: |
      #!/bin/sh
      reprepro -b [% c('repo_dir') %] include \
                  [% c('lsb_release/codename') %] *.changes

If we want to upload the packages on a remote server, before including them on the repository, this can be done like this :

targets:
  Debian:
    repo_dir: /path/to/debian/repo
    publish: |
      #!/bin/sh
      reprepro -b [% c('repo_dir') %] include \
                  [% c('lsb_release/codename') %] *.changes
steps:
  publish:
    ssh_host: publish_server.somedomain
    remote_exec: "[% c('remote_ssh') %]"

An alternative could be to generate the repository locally, and add an rsync command at the end of the publish script to upload the repository to your publication server :

targets:
  Debian:
    local_repo: /path/to/debian/repo
    publish: |
      #!/bin/sh
      reprepro -b [% c('local_repo') %] include \
                  [% c('lsb_release/codename') %] *.changes
      rsync -avH --delete [% c('local_repo') %] publish_server.somedomain:/repo

See Also

rbm(1), rbm-pkg(1)

Referenced By

rbm(1).

11/04/2016