CVS and Devshell

From FedoraProject

Jump to: navigation, search

This guide explains in several easy steps how to get started doing Fedora CVS with Devshell. It goes through the steps of getting the source, and converting your Fedora package to a Git repository in not easy steps.

These directions are clearly not going to be the final workflow. They are intended only as directions to test your favourite packages against Devshell, for the purposes of QA testing.

Contents

Getting the Source

In order to begin, you will need the latest source. Currently, this is only available through git. Open a handy terminal window and follow along.

$ git clone git://git.fedorahosted.org/fedora-devshell.git

Since this is the raw upstream, there's a chance the code may not work.

Launching Ports

Since there are no built in tools yet for building a package, the only way to interact with the code is via the source directory itself. Therefore it's necessary to modify the command line path to make this work.

$ export PATH=/path/to/fedora-devshell/:$PATH

$ ports.py 
 * PackageSource
 * SourceBall
 * Audit
 * Directory
Traceback (most recent call last):
  File "/path/to/fedora-devshell/ports.py", line 36, in <module>
    main()
  File "/path/to/fedora-devshell/ports.py", line 31, in main
    output, module, params = do_command(args)
  File "/path/to/fedora-devshell/base/base.py", line 176, in do_command
    output = top(*params)
TypeError: 'NoneType' object is not callable

This confirms that the code is running at least partially. The list of names there is a list of the available modules, albeit repeated.

Converting your package

There's really only one real step to test. Figure out which module you want to test, namely, 'smolt' is the name of a module. 'smolt/F-11' is not a name of a module.

$ ports.py -v rpmcvspackage revisor.trialrun.1 revisor
[DEBUG] Loading modules
[INFO]  * RevisionControl
[INFO]  * Fetcher
[INFO]  * Fetcher
[INFO]  * Hackage
[INFO]  * Directory
[INFO]  * Package
[DEBUG] ['rpmcvspackage', 'revisor.trialrun.1, 'revisor']
[DEBUG] changing dir to /tmp/tmpBiNIVc
[INFO] Fetching full source from CVS... please wait...
[DEBUG] changing dir to revisor/common
[DEBUG] changing dir to /tmp/tmpBiNIVc
[DEBUG] changing dir to revisor
[DEBUG] changing dir to /tmp/tmpBiNIVc
[INFO] Fetching partial source from CVS for EL-5... please wait...

I've cut this example short, for time reasons. It should finish error free. The directory 'smolt.trialrun.1' should be a git repository.

Then in the source directory, in the file /path/to/fedora-devshell/modules/rpmcvspackage.py, modify the variable CVSROOT to use your CVS credentials.

$ ports.py -v rpmcvspackage revisor.trialrun.2 revisor
[DEBUG] Loading modules
[INFO]  * RevisionControl
[INFO]  * Fetcher
[INFO]  * Fetcher
[INFO]  * Hackage
[INFO]  * Directory
[INFO]  * Package
[DEBUG] ['rpmcvspackage', 'revisor.trialrun.2, 'revisor']
[DEBUG] changing dir to /tmp/tmpBiNIVc
[INFO] Fetching full source from CVS... please wait...
[DEBUG] changing dir to revisor/common
[DEBUG] changing dir to /tmp/tmpBiNIVc
[DEBUG] changing dir to revisor
[DEBUG] changing dir to /tmp/tmpBiNIVc
[INFO] Fetching partial source from CVS for EL-5... please wait...

Testing the results

smolt.trialrun.2 should also be a git repository. In order to test them, follow these guidelines.

  1. Pull the latest git tree from the master branch
  2. Set up your running environment
  3. Pull <package_name> from the Fedora CVS as an anonymous user and make it <package_name>.trial.1
  4. Pull <package_name> again but with your login credentials, and make it <package_name>.trial.2
  5. Use your favorite git history browser and verify that things look ok.
  6. Make sure that there are no discrepencies between the two trials.

Please send bug reports to the fedora-devshell trac instance.

Report Bugs