Rgsyn is a client wrapping the REST API provided by Rgsyn-server. Rgsyn serves as a conversion tool between Gem and RPM formats (of RubyGems libraries).
This web service was created within Tool for RubyGems -- RPM synchronization thesis. For more information see the thesis itself.
Typical usage consists of first uploading the package(s) with the upload
command (e.g. rgsyn upload mylib-0.1.0.gem
), then calling the desired
conversion method on the library (e.g. rgsyn gem2rpm mylib
).
It is important to remember that packages are upon upload grouped together into
entities called library, based on the name and version of the library they
contain. Thus rgsyn upload mylib-0.1.0.gem rubygem-mylib-0.1.0-1.fc17.src.rpm
should end up in the same library entity, as long as they follow naming
conventions.
During the Gem to RPM conversion the RPM specfile used for resulting RPMs is
automatically generated by the gem2rpm script [1]. As extraction of licensing
information from Gem packages automatically is difficult, the user can manually
specify the license that applies with the --license
switch
(e.g. rgsyn gem2rpm mylib --license=GNU
).
In addition, Gem packages are unable to keep track of dependencies outside of
other RubyGems libraries; these should be however present in the resulting
RPMs and can be added with the --dep
switch. Similarly, dependencies needed
during build can be added with --bdep
(e.g. rgsyn gem2rpm mylib --dep systemlib --bdep systemlib-devel
).
Finally, if the generated specfile must be changed more, it can be downloaded
using the specfile
command (e.g. rgsyn specfile mylib --os fc17
) and then
used for the conversion with the --specfile
switch
(e.g. rgsyn gem2rpm mylib --specfile=file.spec
).
During the RPM to Gem conversion (e.g. rgsyn rpm2gem mylib
), all RPM
packages with the same target operating system will be used in the process.
Therefore, if library entity mylib-0.1.0 has both
rubygem-mylib-0.1.0-1.fc17.src.rpm and rubygem-mylib-0.1.0-1.fc17.noarch.rpm,
both will be used in the conversion process. If the library entity also has
rubygem-mylib-0.1.0-1.fc16.src.rpm, the operating system of the packages we want
to use must be specified (e.g. rgsyn rpm2gem mylib --os=fc17
).
If there is only one RPM entering as input in the conversion process and the RPM is source RPM (SRPM), the server first builds binary RPMs before continuing.