kata-pkgsync
is a tool to synchronize Kata package from OBS to Packagecloud.
kata-pkgsync
autonomously discovers OBS packages, repositories, and architectures
in a OBS project.
It can detect:
- which of the binary files published on OBS are already stored on Packagecloud,
- which ones still needs to be synchronized,
- which packages on Packagecloud are orphans, i.e. do not have a corresponding file published on OBS.
Based on this information, kata-pkgsyncs
can download only the necessary
files from OBS, upload them on Packagecloud, and delete orphans Packagecloud packages.
This is the sequence of tasks executed:
- Fetch the configuration from a YAML config file.
- For each OBS project specified, retrieve the available repositories,
architectures, packages. For each combination of
{repository,architecture,package}
, retrieve the list of the build artifacts (i.e. the "rpm" / "deb" package files). - Get the list of files/packages already uploaded on Packagecloud. This is to avoid re-uploading packages already sent to Packagecloud.
- Build a list of files that needs to be synchronized from OBS to Packagecloud, and identify which of the Packagecloud files have a corresponding file published on OBS.
- Download the identified files from OBS. The download phase create a local cache of packages, to avoid re-downloading files if already done.
- Upload the identified files to Packagecloud.
- Optionally, delete orphans files from Packagecloud.
Install with:
$ go get github.com/kata-containers/packaging/cmd/kata-pkgsync`
Create your configuration:
$ cd $GOPATH/src/github.com/kata-containers/packaging/cmd/kata-pkgsync
$ cp config-example.yaml config.yaml
Run in "default" mode:
$ ~/go/bin/kata-pkgsync
See the help (kata-pkgsync -h
) for more details.