Skip to content
This repository was archived by the owner on Aug 14, 2019. It is now read-only.

API Changes 2.0

synack edited this page Sep 13, 2010 · 2 revisions

REST API

Adding a package

Old and busted

$ curl -F"package=@package.tar.gz;type=application/x-tar-gz" http://repoman.example.com/repository/myotherrepo

New hotness

$ curl -X PUT -F"package=@package.tar.gz;type=application/x-tar-gz" http://repoman.example.com/repository/myotherrepo

Copying a package

Old and busted

$ curl -X POST http://repoman.example.com/repository/myotherrepo/digg-example/copy?dstdist=anotherrepo

New hotness

$ curl -X POST —data “action=copy&srcdist=sourcerepo&package=examplepkg” http://repoman.example.com/repository/targetrepo

Configuration

Changed options

buildbot.pbuilderrc

Has been replaced with buildbot.environments dict. Example:

{
    "buildbot": {
        "environments": {
            "stable": "/etc/pbuilder/pbuilderrc-stable",
            "testing": "/etc/pbuilder/pbuilderrc-testing",
            "unstable": "/etc/pbuilder/pbuilderrc-unstable"
    }
}

The buildbot defaults to environment=stable. To select a different build environment, pass an environment=testing POST parameter to /buildbot/

New options

repository.backup

Automatically copy the old version of a package to a backup dist upon upgrade. The following example causes replaced packages in example-stable-lenny to be copied to example-backup-lenny.

{
    "repository":
        "backup": {
            "example-stable-lenny": "example-backup-lenny"
        }
}

This option also introduces a new API action:
$ curl -X POST —data “action=rollback&package=examplepkg” http://repoman.example.com/repository/example-stable-lenny