Development/Packaging/RepositorySystem/Submitting

From Mandriva Community Wiki

Jump to: navigation, search
Submitting a package using repsys

NOTE: the new buildsystem is not yet in place. This is a description about how things will probably be after it is in place.

Contents


[edit] Quickstart

Let's say you commited a fix to the kolab package in SVN (revision 929) and now want to submit it to cooker. In the previous buildsystem, you would have to build your package in one of the cluster machines, test it and use ftpcooker or ftpcontrib to submit it. With the new buildsystem, you execute the following command on some machine (your own, for example):

   $ repsys submit -t cooker https://cvs.mandriva.com/svn/packages/cooker/kolab 929

This means: "please checkout revision 929 of the kolab package and send it to the cooker repository, thanks". It will prompt you for a username and a password so that the submitter is properly authenticated and authorized. Now just wait: the server is now building the requested .src.rpm (rpm -bs). When this is done and the source package has been sent to the build machine/cluster, the repsys command will finish.

[edit] Overview

The picture below shows an overview of the submitting process:

Image:submitting.png

  1. submit: the user issues the submit command via repsys. If authentication and authorization is successful, the submit command is sent to the XML RPC server;
  2. svn checkout: the XML RPC server checks out the requested revision of the package from SVN (the SVN layout is explained in RepositorySystem)
  3. rpm -bs: the XML RPC server creates a .src.rpm file with the data checked out from SVN. A generic script/program can optionally be called prior to "rpm -bs" to, for example, change the release number in the spec file (we call this "rebrand");
  4. send away: the XML RPC server stores or sends the .src.rpm file somewhere to be picked up by the build daemon;
  5. build: the build daemon/machine grabs the .src.rpm, builds it and tests it and the resulting binaries;
  6. markrelease: if the build succeeded, and the package passed all tests, then the build daemon/machine creates a new entry in the "release" directory in SVN for this package;
  7. ready: the .src.rpm file and the binaries just built are stored/sent somewhere, ready to be, for example, signed and uploaded to a mirror.

[edit] Notes

  • the repsys tool is blocked from step 1 through step 4. Errors in any one of these steps are reported back to the client. If repsys returns success, then steps 1 through 4 were completed without errors, i.e. the source rpm package was built and placed somewhere to be picked up by the build process;
  • step 1 is authenticated and authorized by apache basic authentication/authorization controls. The XML RPC server is a python CGI script which should reside in a location covered by the mentioned controls;
  • step 3 automatically creates a %changelog section based on the SVN commit log messages. Usernames (from the commit log) are mapped to email addresses via /etc/repsys.conf;
  • in step 4, the XML RPC server currently just places the .src.rpm file in some configured path. If the build daemon is running on another machine, then this could be an NFS export, for example;
  • the whole procedure for step 5 is more complex and is explained elsewhere. Basically, the .src.rpm package is tested (rpmlint), built (HelioCastro is working on this part) and the resulting binaries are tested again (rpmlint);
  • if all tests were successful, the build daemon/machine places the source and binaries somewhere where they can be further processed, like being signed, uploaded, etc. Its job is finished;
  • the XML RPC service, SVN and build daemon can all be located in the same box, or completely separated as shown in the above figure.

[edit] Deployment considerations

This section makes some deployment considerations, like bandwidth usage, security controls and others.

[edit] Bandwidth

How much bw do I need? Where is the big traffic jam?

[edit] Security

What sort of authentication/authorization is performed? Is the password transmitted in clear text?

[edit] Resources

How many machines do I need?

[edit] RepSys

The repsys tool is a collection of python modules and scripts authored by Gustavo Niemeyer while he was working at Conectiva. They are used to send packages for building, extracting .src.rpm files and more.

Personal tools